-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Comparing changes
Open a pull request
base repository: github/copilot-sdk
base: main
head repository: github/copilot-sdk
compare: dev/mrayermannmsft/other/workflowsproto-1
- 6 commits
- 8 files changed
- 1 contributor
Commits on Jul 15, 2026
-
Phase 1: Contract skeleton and feature flag
Regenerate SDK wire types (nodejs/src/generated/rpc.ts) from the updated runtime schema for the new workflow.* methods and DTOs, and mirror WorkflowMeta/WorkflowLimits in the SDK public types (nodejs/src/types.ts) with exports via index.ts/extension.ts. No behavior wired (contract skeleton only). Verification: cd nodejs && npm run build (Node 22) exit 0. Deviations: none.
Configuration menu - View commit details
-
Copy full SHA for c4cc322 - Browse repository at this point
Copy the full SHA c4cc322View commit details -
Phase 2: SDK authoring surface (defineWorkflow + registration)
Add the SDK-side Dynamic Workflows authoring surface: defineWorkflow (opaque frozen WorkflowHandle, module-local name->{meta,run} map, optional limits that reject non-positive values), workflows?: WorkflowHandle[] on the extension JoinSessionConfig only (serializing just WorkflowMeta on the wire, never the run closure), the workflow.execute reverse handler (dispatch-by-name with a stub ctx of args+log-noop+return, structured error on unknown name) and workflow.abort handler (per-run AbortController keyed by runId), both registered before session.resume, and the session.workflow.run friendly wrapper (name/handle overloads; foreground unwraps completed result and throws exported WorkflowRunError on non-completed; background returns the envelope). Exports from index.ts and extension.ts. SDK-only; runtime untouched; no generated files edited. Verification (Node 22, exit 0): npm run build; npm test -- test/workflow.test.ts (12 passed); typecheck; targeted ESLint. Deviations: none.Configuration menu - View commit details
-
Copy full SHA for 594c688 - Browse repository at this point
Copy the full SHA 594c688View commit details -
Phase 4: Host API context, part 1 (args, log, phase, return)
Build the real run() WorkflowContext in the SDK workflow.execute handler (replacing the Phase 2 stub): populate args; set ctx.session to the identical CopilotSession instance joinSession returned (strict === identity, no wrapper); expose ctx.signal as the per-run AbortController's AbortSignal; and implement log()/phase() as synchronous calls that buffer each line with a monotonic seq and flush incrementally over workflow.log (at await boundaries, a short unref'd timer, and a guaranteed finally-flush so no buffered narration is lost on a throwing/aborted body). SDK side of Phase 4; runtime workflow.log handler is the companion commit. Verification (Node 22, exit 0): npm run build; npm test -- test/workflow.test.ts (16 passed); typecheck; lint. Deviations: none.
Configuration menu - View commit details
-
Copy full SHA for f29ad57 - Browse repository at this point
Copy the full SHA f29ad57View commit details -
Phase 5: The one-agent executor (
agent()via in-session subagents)Implement ctx.agent in the SDK run() context: it calls workflow.agent carrying the closed-over workflowRunId and the model, returns the subagent result text, and trims opts to label/schema/model only (effort/isolation/agentType/tool-narrowing are not v1). Schema handling arrives in Phase 6. Verification (Node 22, exit 0): npm run build; npm test -- test/workflow.test.ts (17 passed, asserts effort is dropped). Deviations: none.
Configuration menu - View commit details
-
Copy full SHA for 4ab5967 - Browse repository at this point
Copy the full SHA 4ab5967View commit details -
Phase 6: Structured output (
agent({ schema })) and retryDocument the supported schema subset on the WorkflowContext agent() schema option (examon validator subset, not arbitrary JSON Schema) so authors do not expect unsupported keywords. Companion to the runtime Rust parse/validate. Verification (Node 22, exit 0): npm run build; npm run typecheck; npm test -- test/workflow.test.ts. Deviations: none.
Configuration menu - View commit details
-
Copy full SHA for cc6e45b - Browse repository at this point
Copy the full SHA cc6e45bView commit details
Commits on Jul 16, 2026
-
Phase 7: Combinators (
parallel,pipeline) and the per-run limiterImplement ctx.parallel(thunks) as a barrier fan-out (awaits all; throwing thunk -> null) and ctx.pipeline(items, ...stages) as per-item staged flow with no barrier (throwing stage nulls that item and skips its remaining stages). Both are pure SDK control flow holding no slot; concurrency is enforced by the runtime per-run limiter (each leaf ctx.agent is a workflow.agent RPC that queues until admitted). Enforce the non-configurable 4096 per-fan-out item cap, and validate element types up front so passing already-invoked promises surfaces a clear pass-functions-not-promises diagnostic instead of silently resolving to all-nulls. Verification (Node 22, exit 0): npm run build; npm test -- test/workflow.test.ts (22 passed); typecheck. Deviations: none.
Configuration menu - View commit details
-
Copy full SHA for 209d9ae - Browse repository at this point
Copy the full SHA 209d9aeView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...dev/mrayermannmsft/other/workflowsproto-1