@github/copilot-sdk-win32-x64 1.0.15-preview.3 → 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.
- package/copilot-sdk/client.d.ts +1 -0
- package/copilot-sdk/docs/extensions.md +0 -1
- package/copilot-sdk/docs/workflows.md +2 -4
- package/copilot-sdk/extension.d.ts +10 -24
- package/copilot-sdk/extension.js +402 -846
- package/copilot-sdk/generated/rpc.d.ts +5960 -4645
- package/copilot-sdk/generated/session-events.d.ts +197 -118
- package/copilot-sdk/index.d.ts +2 -4
- package/copilot-sdk/index.js +392 -832
- package/copilot-sdk/installationConfirmation.d.ts +19 -0
- package/copilot-sdk/session.d.ts +2 -25
- package/copilot-sdk/types.d.ts +10 -65
- package/copilot-sdk/workflow.d.ts +5 -2
- package/package.json +1 -1
- package/prebuilds/win32-x64/OneAuthInterop.dll +0 -0
- package/prebuilds/win32-x64/copilot-runtime.exe +0 -0
- package/prebuilds/win32-x64/runtime.node +2 -2
- package/ripgrep/bin/win32-x64/rg.exe +0 -0
- package/schemas/api.schema.json +18134 -16248
- package/schemas/session-events.schema.json +932 -842
- package/tgrep/bin/win32-x64/tgrep.exe +0 -0
- package/copilot-sdk/docs/factories.md +0 -296
- package/copilot-sdk/docs/factory-patterns.md +0 -194
- package/copilot-sdk/factory.d.ts +0 -327
- package/prebuilds/win32-x64/msal-node-runtime.node +0 -0
- package/prebuilds/win32-x64/msalruntime.dll +0 -0
package/copilot-sdk/client.d.ts
CHANGED
|
@@ -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
|
|
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 `
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
*
|