@github/copilot-sdk-win32-x64 1.0.15-preview.2 → 1.0.15-preview.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,6 +43,7 @@ export declare class CopilotClient {
43
43
  private sessionFsConfig;
44
44
  private requestHandler;
45
45
  private extensionLaunchProvider?;
46
+ private installationConfirmationHandler?;
46
47
  private builtinPluginDirectories;
47
48
  private onGitHubTelemetry?;
48
49
  private clientGlobalHandlers;
@@ -78,5 +78,4 @@ An approved extension can pass a granted value to anything it starts, so ask onl
78
78
 
79
79
  - `examples.md` — Practical code examples for tools, hooks, events, and complete extensions
80
80
  - `workflows.md` — Authoring, running, resuming, and observing Dynamic Workflows
81
- - `factories.md`: Authoring, running, resuming, and observing Agent Factories
82
81
  - `agent-author.md` — Step-by-step workflow for agents authoring extensions programmatically
@@ -2,8 +2,6 @@
2
2
 
3
3
  Dynamic Workflows are extension-authored, session-scoped workflows that coordinate subagents and durable steps. The API is experimental.
4
4
 
5
- Use Dynamic Workflows for new extension-authored orchestration. Existing Agent Factory extensions remain supported during the transition, but one `joinSession` call must register either `workflows` or `factories`, never both.
6
-
7
5
  ## Define and register a workflow
8
6
 
9
7
  Use `defineWorkflow` and pass the returned handle to `joinSession`:
@@ -242,7 +240,7 @@ if (settled.status === "completed") {
242
240
  }
243
241
  ```
244
242
 
245
- It watches the runtime's `factory.run_updated` compatibility event and re-reads the durable envelope on each invalidation, collapsing a burst of events into a single in-flight read. A low-frequency periodic re-read runs alongside the subscription, so a dropped or missing invalidation degrades into a slightly late resolution rather than an unbounded wait. Pass a `signal` to stop waiting:
243
+ It watches `workflow.run_updated` and re-reads the durable envelope on each invalidation, collapsing a burst of events into a single in-flight read. A low-frequency periodic re-read runs alongside the subscription, so a dropped or missing invalidation degrades into a slightly late resolution rather than an unbounded wait. Pass a `signal` to stop waiting:
246
244
 
247
245
  ```ts
248
246
  const controller = new AbortController();
@@ -252,6 +250,6 @@ const settled = await session.workflow.waitForRun(runId, { signal: controller.si
252
250
 
253
251
  Aborting rejects the wait and has no effect on the run, which keeps executing—use `pause(runId)` or `cancel(runId)` to stop it. The resolved object is a snapshot of that settled attempt. If its status is `paused`, a later resume updates the durable envelope under the same run ID. Call `getRun(runId)` to read the latest envelope. `isWorkflowRunTerminal(status)` exposes the same current-attempt settlement test for callers driving their own loop.
254
252
 
255
- Listen for the ephemeral `factory.run_updated` compatibility event. Its `{ runId, revision }` payload is an invalidation signal. Re-read the desired API when a newer monotonic revision arrives.
253
+ Listen for the ephemeral `workflow.run_updated` event. Its `{ runId, revision }` payload is an invalidation signal. Re-read the desired API when a newer monotonic revision arrives.
256
254
 
257
255
  Revisions cover durable lifecycle, accounting, phase, agent, and progress changes. Continuous read-time fields can change without a new revision. These include `observedAt`, active-time calculations, live counts, and a live agent's status or prompt-safe activity text. Workflow prompts are never exposed by these APIs. A run is visible only through the session that owns it.
@@ -1,27 +1,7 @@
1
1
  import type { CopilotSession } from "./session.js";
2
2
  import { type PermissionHandler, type ResumeSessionConfig } from "./types.js";
3
- import type { FactoryHandle } from "./factory.js";
4
3
  import type { WorkflowHandle } from "./workflow.js";
5
4
  export { Canvas, CanvasError, createCanvas, type CanvasAction, type CanvasDeclaration, type CanvasHostContext, type CanvasJsonSchema, type CanvasOptions, } from "./canvas.js";
6
- type JoinSessionContributionConfig = {
7
- /**
8
- * Factory handles to register when the extension joins the session.
9
- *
10
- * @experimental Part of the experimental Agent Factories surface and may
11
- * change or be removed in future SDK or CLI releases.
12
- */
13
- factories?: FactoryHandle[];
14
- workflows?: never;
15
- } | {
16
- factories?: never;
17
- /**
18
- * Workflow handles to register when the extension joins the session.
19
- *
20
- * @experimental Part of the experimental Dynamic Workflows surface and may
21
- * change or be removed in future SDK or CLI releases.
22
- */
23
- workflows?: WorkflowHandle[];
24
- };
25
5
  export type JoinSessionConfig = Omit<ResumeSessionConfig, "onPermissionRequest" | "extensionSdkPath"> & {
26
6
  onPermissionRequest?: PermissionHandler;
27
7
  /**
@@ -53,10 +33,16 @@ export type JoinSessionConfig = Omit<ResumeSessionConfig, "onPermissionRequest"
53
33
  * ```
54
34
  */
55
35
  requestedEnvironmentVariables?: string[];
56
- } & JoinSessionContributionConfig;
57
- export type { ExtensionInfo, FactoryLimits, FactoryMeta } from "./types.js";
58
- export { defineFactory, FactoryResumeError, isFactoryRunTerminal, type RunOptions, type ResumeOptions, type FactoryResumeErrorCode, type SessionFactoryApi, type FactoryAgentOptions, type FactoryContext, type FactoryDefinition, type FactoryHandle, type FactoryJsonSchema, type JsonValue, type FactoryPipelineStage, type FactoryStepOptions, type FactoryRunResult, type FactoryRunStatus, type FactoryRunSummary, type FactoryListRunsOptions, type FactoryRunsPage, type FactoryRunDetail, type FactoryProgressPage, type FactoryProgressLine, type FactoryPhaseObservation, type FactoryPhaseStatus, type FactoryAgentSummary, } from "./factory.js";
59
- export { defineWorkflow, WorkflowResumeError, isWorkflowRunTerminal, type WorkflowRunOptions, type WorkflowResumeOptions, type WorkflowLimitOverrides, type WorkflowResumeErrorCode, type SessionWorkflowApi, type WorkflowAgentOptions, type WorkflowContext, type WorkflowDefinition, type WorkflowHandle, type WorkflowJsonSchema, type WorkflowLimits, type WorkflowMeta, type WorkflowPipelineStage, type WorkflowStepOptions, type WorkflowRunResult, type WorkflowRunStatus, type WorkflowRunSummary, type WorkflowListRunsOptions, type WorkflowRunsPage, type WorkflowRunDetail, type WorkflowProgressPage, type WorkflowProgressLine, type WorkflowPhaseObservation, type WorkflowPhaseStatus, type WorkflowAgentSummary, } from "./workflow.js";
36
+ /**
37
+ * Workflow handles to register when the extension joins the session.
38
+ *
39
+ * @experimental Part of the experimental Dynamic Workflows surface and may
40
+ * change or be removed in future SDK or CLI releases.
41
+ */
42
+ workflows?: WorkflowHandle[];
43
+ };
44
+ export type { ExtensionInfo } from "./types.js";
45
+ export { defineWorkflow, WorkflowResumeError, isWorkflowRunTerminal, type WorkflowRunOptions, type WorkflowResumeOptions, type WorkflowLimitOverrides, type WorkflowResumeErrorCode, type SessionWorkflowApi, type WorkflowAgentOptions, type WorkflowContext, type WorkflowDefinition, type WorkflowHandle, type JsonValue, type WorkflowJsonSchema, type WorkflowLimits, type WorkflowMeta, type WorkflowPipelineStage, type WorkflowStepOptions, type WorkflowRunResult, type WorkflowRunStatus, type WorkflowRunSummary, type WorkflowListRunsOptions, type WorkflowRunsPage, type WorkflowRunDetail, type WorkflowProgressPage, type WorkflowProgressLine, type WorkflowPhaseObservation, type WorkflowPhaseStatus, type WorkflowAgentSummary, } from "./workflow.js";
60
46
  /**
61
47
  * Joins the current foreground session.
62
48
  *