-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Dupe of feat(mcp): revamp firebase init with orchestration API integration #9182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b87a86
74f3687
6c2b93a
31e6327
b68727f
1c2cc10
d411761
a1cd048
647eb87
3309d71
0a0af59
193d196
5f3a6b9
e3afdee
9814ef9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export interface AiLogicInfo { | ||
// Minimal interface - no configuration needed | ||
[key: string]: unknown; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
export async function askQuestions(): Promise<void> { | ||
// No-op - questions already handled by MCP schema | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
Comment on lines
+13
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
export async function actuate(): Promise<void> { | ||
// No-op - AI Logic provisioning happens via API, no local config changes needed | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,12 @@ | |
instructions: string[]; | ||
|
||
/** Basic Project information */ | ||
project?: Record<string, any>; | ||
projectId?: string; | ||
projectLocation?: string; | ||
isBillingEnabled?: boolean; | ||
|
||
hosting?: Record<string, any>; | ||
} | ||
|
||
export interface SetupInfo { | ||
|
@@ -38,6 +38,7 @@ | |
dataconnectSdk?: features.DataconnectSdkInfo; | ||
storage?: features.StorageInfo; | ||
apptesting?: features.ApptestingInfo; | ||
ailogic?: features.AiLogicInfo; | ||
} | ||
|
||
interface Feature { | ||
|
@@ -96,12 +97,20 @@ | |
askQuestions: features.apptestingAskQuestions, | ||
actuate: features.apptestingAcutate, | ||
}, | ||
{ | ||
name: "ailogic", | ||
askQuestions: features.aiLogicAskQuestions, | ||
actuate: features.aiLogicActuate, | ||
}, | ||
{ name: "aitools", displayName: "AI Tools", doSetup: features.aitools }, | ||
]; | ||
|
||
const featureMap = new Map(featuresList.map((feature) => [feature.name, feature])); | ||
|
||
/** | ||
* | ||
*/ | ||
Comment on lines
+110
to
+112
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
export async function init(setup: Setup, config: Config, options: any): Promise<any> { | ||
Check warning on line 113 in src/init/index.ts
|
||
const nextFeature = setup.features?.shift(); | ||
if (nextFeature) { | ||
const start = process.uptime(); | ||
|
@@ -121,17 +130,17 @@ | |
); | ||
|
||
if (f.doSetup) { | ||
await f.doSetup(setup, config, options); | ||
} else { | ||
if (f.askQuestions) { | ||
await f.askQuestions(setup, config, options); | ||
} | ||
if (f.actuate) { | ||
await f.actuate(setup, config, options); | ||
} | ||
} | ||
if (f.postSetup) { | ||
await f.postSetup(setup, config, options); | ||
} | ||
|
||
const duration = Math.floor((process.uptime() - start) * 1000); | ||
|
@@ -142,7 +151,7 @@ | |
} | ||
|
||
/** Actuate the feature init flow from firebase_init MCP tool. */ | ||
export async function actuate(setup: Setup, config: Config, options: any): Promise<any> { | ||
Check warning on line 154 in src/init/index.ts
|
||
const nextFeature = setup.features?.shift(); | ||
if (nextFeature) { | ||
const start = process.uptime(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc comment for this function is empty. Adding a brief description, even for a no-op function, improves code clarity and helps other developers understand its purpose without reading the implementation details.