feat(v4): add core-next & cli-next packages with integration/E2E test…#15663
Draft
Alive-Fish wants to merge 69 commits intodevfrom
Draft
feat(v4): add core-next & cli-next packages with integration/E2E test…#15663Alive-Fish wants to merge 69 commits intodevfrom
Alive-Fish wants to merge 69 commits intodevfrom
Conversation
…s and CI workflows - Add core-next engine: operations, drivers, DA manifest, templates, lifecycle - Add cli-next CLI: Commander.js commands, action handlers, telemetry, auth - Add integration tests: 24 core-next + 62 cli-next - Add E2E tests: cli-syntax verification with scaffold tests - Add CI workflow (ci-next.yml): build, lint, format, unit+integration tests - Add E2E workflow (e2e-test-next.yml): matrix test execution with failure summary - Add instruction files, skills, and plans for v4 development
- Add esbuild.mjs config: single-file CJS bundle, node18 target, keepNames - Add bundle/package/prepack scripts to package.json - Lazy-load applicationinsights (require inside init, not top-level import) - Defer registerBuiltinDrivers() from startup to wrapHandlerWithContext() - Update cli.instructions.md and codebase.instructions.md with bundling docs Before: node cli.js --help took ~18.5s (unbundled tsc output) After: node cli.js --help takes ~490ms (esbuild bundle, 2.2MB prod)
…ame conflicts core-next: @microsoft/teamsfx-core -> @microsoft/teamsfx-core-next cli-next: @microsoft/m365agentstoolkit-cli -> @microsoft/m365agentstoolkit-cli-next Both packages shared names with their v3 counterparts (fx-core, cli), causing pnpm install to fail during CI setup.
- validateManifest: resolve manifestPath relative to ctx.projectPath (fixes ENOENT for csharp templates where cwd != projectPath) - engineAgent: add csharp template name override for function-calling (csharp.zip uses 'custom-copilot-weather-agent' not 'weather-agent') - declarativeAgent: mark da/api-plugin-oauth, da/mcp-remote, da/mcp-local as testable:false (infra/env prerequisites not available in CI) - lifecycle test: pass llmService='azure-openai' so Mustache conditionals for LLM client code render correctly (fixes 4 ts npm build failures) - lifecycle test: add collectUnresolvedParameterVars() to pre-populate dummy env vars for unresolved parameters.json placeholders (fixes rag-ai-search, bearer, teams-collaborator provision failures)
… fallback - Make baseUrl optional in oauth/register driver schema (matches fx-core behavior) - Add apiSpecPath support: extract server domains from OpenAPI spec when baseUrl absent - Re-enable da/api-plugin-oauth as testable (remove testable: false) - Improve extendToM365 error handling: surface Axios response body in error detail - Add unit tests for apiSpecPath domain extraction and missing baseUrl error
…ster and apiKey/register - oauth/register: output 'configurationId' instead of 'OAUTH2_CONFIGURATION_ID' so executor's outputs[yamlKey] lookup matches the writeToEnvironmentFile mapping - apiKey/register: output 'registrationId' instead of 'API_KEY_REGISTRATION_ID' for the same reason - The executor maps outputs[yamlKey] ?? outputs[envVarName]; these drivers' hardcoded keys matched neither side, silently dropping env vars
…dApp/update - oauth/register: output applicationIdUri from TDP response's resourceIdentifierUri for MicrosoftEntra identity provider (maps to AADAUTHCODE_APPLICATION_ID_URI) - aadApp/update: auto-generate AAD_APP_ACCESS_AS_USER_PERMISSION_ID UUID when the AAD manifest references it but no value exists in the environment - aadApp/update: include generated permission ID in driver outputs so the executor persists it to envMap/.env for subsequent runs
…or reporting - lifecycle.test.ts: only add teamsApp validator when YAML contains teamsApp/create, not for all templates with a provision lifecycle (connector/graph has provision but no teamsApp/create, so TEAMS_APP_ID is never set, causing validate to fail and trigger a flaky retry) - AzureArmClient: include armErr.details in DeployArmError message so CI logs show which specific resource(s) failed during ARM deployment
…Ms in createDriver
…instructions - createDriver.ts: revert metric key from durationMs back to duration (E2E tracer rules in cli-next expect 'duration' as the telemetry contract) - createDriver.test.ts: fix unit test assertion to match 'duration' key - Update driver count from 21 to 22 in codebase/features/fx-core instructions - Update template descriptor count from 43 to 24 in codebase instructions - Add cli/runDotnetCommand to fx-core driver table
- Update addActionFromMCP operation in core-next - Wire atk add action --api-plugin-type mcp in cli-next - Add unit, integration, and E2E tests for MCP action
|
|
||
| try { | ||
| await fs.access(envFilePath); | ||
| const envContent = await fs.readFile(envFilePath, "utf-8"); |
| const updated = envContent.replace(/^TEAMS_APP_ID=.*$/m, `TEAMS_APP_ID=${newUUID}`); | ||
| if (updated === envContent) { | ||
| // key didn't exist, append | ||
| await fs.appendFile(envFilePath, `\nTEAMS_APP_ID=${newUUID}\n`); |
| // key didn't exist, append | ||
| await fs.appendFile(envFilePath, `\nTEAMS_APP_ID=${newUUID}\n`); | ||
| } else { | ||
| await fs.writeFile(envFilePath, updated, "utf-8"); |
| }); | ||
| `; | ||
|
|
||
| await fs.appendFile(cmdsPath, code); |
- publishTeamsAppUpdate: retry without requiresReview=true on 400 (sideloaded Shared-scope apps don't support admin-review updates) - sendWithRetry: stop retrying 4xx client errors (except 429)
…ycle E2E - foundry-agent-to-m365: testable=false (needs Foundry endpoint + Azure) - da/metaos-upgrade: testable=false (gated by DAMetaOS feature flag) - Rename scaffold E2E test suite to clarify purpose
- publishTeamsAppUpdate: when 400 fallback also returns 404, return the existing catalog ID (Shared-scope sideloaded apps appear in the catalog query but lack a proper REST resource for update) - sendWithRetry: also exempt 412 PreconditionFailed from the no-retry rule alongside 429 (412 is a transient Graph API condition) - Add unit tests for 404 phantom fallback and 412 retry
- Document publish flow (publishTeamsApp → publishTeamsAppUpdate) - Document scope-dependent behavior (Personal vs Shared vs Admin) - Document sendWithRetry 412/429 exemptions - Document safe-to-ignore cleanup 404s - Add 4 new error patterns to the diagnosis table
Introduces a tag-driven, phase-scoped Validator interface for e2e lifecycle tests, replacing flat env-key-presence checks with tiered (shape/content/integration) assertions. Adds 14 built-in validators: project structure, teamsApp/aad/bot/tab/function identity checks, declarativeAgent and apiPlugin file-system validators, ARM output parity, and oauth/apiKey register persistence. Backfills validator tags on 12 testable templates and adds a unit test guarding tag taxonomy coverage.
Three fixes to the phased Validator framework after running against the full e2e matrix: 1. publishedAppValidator: remove 'publishable' tag so it fires only when the test explicitly pushes 'publishedApp' after publish. The legacy runValidators shim previously fired it after provision for any publishable template, making TEAMS_APP_PUBLISHED_APP_ID assertions fail before publish could run. 2. teamsAppValidator (manifest-valid check): downgrade TEAMS_APP_MANIFEST_VALID === 'true' and TEAMS_APP_PACKAGE_VALID === 'true' to severity: 'warning'. The driver can legitimately report 'false' on scaffolded projects (placeholder icons, optional metadata) without the lifecycle failing; surface the issue but don't block the run. 3. declarativeAgent.manifest / declarativeAgent.apiPlugin: resolve the DA manifest path through appPackage/manifest.json's copilotAgents.declarativeAgents[0].file reference instead of assuming the fixed name 'declarativeAgent.json'. api-plugin templates scaffold 'repairDeclarativeAgent.json' and must be looked up dynamically.
Adds .github/scripts/setup-agent-skills.{ps1,sh} which:
- registers obra/superpowers-marketplace and anthropics/skills marketplaces
- installs superpowers, document-skills, example-skills Copilot CLI plugins
- runs scoped 'npx skills add' for playwright-cli, planning-with-files,
frontend-design, and code-review-excellence (github-copilot agent only)
Also ignores /skills/ and /skills-temp/ scratch dirs created by the
skills CLI, and tracks skills-lock.json.
- dev-workflow: fix duplicate '### 6.' numbering in Phase 3 - lint-format: add missing 'argument-hint' frontmatter
Commits the 5 skills brought in by setup-agent-skills.{ps1,sh}:
code-review-excellence, dev, frontend-design, planning-with-files,
and playwright-cli. Vendoring keeps them available offline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…s and CI workflows