condukt 0.6.19 → 0.6.20
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/README.md +180 -180
- package/dist/runtimes/copilot/copilot-backend.d.ts +2 -0
- package/dist/runtimes/copilot/copilot-backend.d.ts.map +1 -1
- package/dist/runtimes/copilot/lifecycle-events.d.ts +9 -4
- package/dist/runtimes/copilot/lifecycle-events.d.ts.map +1 -1
- package/dist/runtimes/copilot/lifecycle-events.js +74 -38
- package/dist/runtimes/copilot/lifecycle-events.js.map +1 -1
- package/dist/runtimes/copilot/sdk-backend.d.ts +1 -1
- package/dist/runtimes/copilot/sdk-backend.d.ts.map +1 -1
- package/dist/runtimes/copilot/sdk-backend.js +309 -69
- package/dist/runtimes/copilot/sdk-backend.js.map +1 -1
- package/dist/runtimes/copilot/subprocess-backend.js +3 -3
- package/dist/runtimes/copilot/subprocess-backend.js.map +1 -1
- package/dist/src/scheduler.d.ts.map +1 -1
- package/dist/src/scheduler.js +13 -4
- package/dist/src/scheduler.js.map +1 -1
- package/dist/state/reducer.d.ts.map +1 -1
- package/dist/state/reducer.js +5 -0
- package/dist/state/reducer.js.map +1 -1
- package/dist/ui/tool-display/ThinkingSection.js +13 -13
- package/package.json +144 -144
- package/ui/style.css +1 -1
package/README.md
CHANGED
|
@@ -1,180 +1,180 @@
|
|
|
1
|
-
# condukt
|
|
2
|
-
|
|
3
|
-
Composable AI agent workflow framework. Define pipelines as directed graphs, execute them with fan-out parallelism and bounded loops, persist state through event sourcing, and visualize everything with a dark-themed React UI.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/condukt)
|
|
6
|
-
[](#testing)
|
|
7
|
-
[](LICENSE)
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
npm install condukt
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Why condukt
|
|
14
|
-
|
|
15
|
-
- **Graph-based execution** — DAG scheduler with topological ordering, fan-out/fan-in, and bounded loop-back
|
|
16
|
-
- **Four node types** — `agent` (LLM), `deterministic` (pure function), `gate` (human approval), `verify` (iterative validation)
|
|
17
|
-
- **Event-sourced state** — every execution event is persisted; projections are recomputed from the log
|
|
18
|
-
- **Runtime-agnostic** — plug in any LLM backend via the `AgentRuntime` interface
|
|
19
|
-
- **Modular imports** — 12 sub-path exports; consumers install only what they use
|
|
20
|
-
- **Full React UI** — interactive flow graph, node panels, tool display, status bar — all dark-themed with warm charcoal tokens
|
|
21
|
-
|
|
22
|
-
## Quick start
|
|
23
|
-
|
|
24
|
-
### Define a pipeline
|
|
25
|
-
|
|
26
|
-
```typescript
|
|
27
|
-
import { agent, deterministic, gate } from 'condukt';
|
|
28
|
-
import type { FlowGraph } from 'condukt';
|
|
29
|
-
|
|
30
|
-
const pipeline: FlowGraph = {
|
|
31
|
-
nodes: [
|
|
32
|
-
agent('research', { prompt: 'Research the topic...' }),
|
|
33
|
-
deterministic('transform', async (input) => {
|
|
34
|
-
return { summary: extract(input), confidence: 0.94 };
|
|
35
|
-
}),
|
|
36
|
-
gate('review', { allowedResolutions: ['approved', 'rejected'] }),
|
|
37
|
-
],
|
|
38
|
-
edges: [
|
|
39
|
-
{ source: 'research', target: 'transform', action: 'default' },
|
|
40
|
-
{ source: 'transform', target: 'review', action: 'default' },
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Execute it
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
import { run, validateGraph } from 'condukt';
|
|
49
|
-
import { StateRuntime } from 'condukt/state';
|
|
50
|
-
import { FileStorage } from 'condukt/state/server';
|
|
51
|
-
import { createBridge } from 'condukt/bridge';
|
|
52
|
-
|
|
53
|
-
validateGraph(pipeline);
|
|
54
|
-
|
|
55
|
-
const storage = new FileStorage('.flow-data');
|
|
56
|
-
const state = new StateRuntime(storage);
|
|
57
|
-
const bridge = createBridge(state, runtime);
|
|
58
|
-
|
|
59
|
-
const execution = await bridge.launch(pipeline, { scenario: 'my-workflow' });
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Add the UI
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
import { FlowGraph } from 'condukt/ui/graph';
|
|
66
|
-
import { NodeDetailPanel } from 'condukt/ui/core';
|
|
67
|
-
import { useFlowExecution } from 'condukt/ui';
|
|
68
|
-
import 'condukt/ui/style.css';
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Architecture
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
┌─────────────────────────────────────────────────────────┐
|
|
75
|
-
│ Your code │
|
|
76
|
-
│ FlowGraph { nodes, edges } │
|
|
77
|
-
│ agent() · deterministic() · gate() · verify() │
|
|
78
|
-
└────────────────────────┬────────────────────────────────┘
|
|
79
|
-
│
|
|
80
|
-
┌────────────────────────▼────────────────────────────────┐
|
|
81
|
-
│ Execution src/ │
|
|
82
|
-
│ DAG scheduler · fan-out · fan-in · bounded loop-back │
|
|
83
|
-
│ Emits 16 event types as a stream │
|
|
84
|
-
└────────────────────────┬────────────────────────────────┘
|
|
85
|
-
│
|
|
86
|
-
┌────────────────────────▼────────────────────────────────┐
|
|
87
|
-
│ State state/ │
|
|
88
|
-
│ Pure reducer · JSONL persistence · crash recovery │
|
|
89
|
-
└────────────────────────┬────────────────────────────────┘
|
|
90
|
-
│
|
|
91
|
-
┌────────────────────────▼────────────────────────────────┐
|
|
92
|
-
│ Bridge bridge/ │
|
|
93
|
-
│ launch · stop · resume · retry · skip · approve │
|
|
94
|
-
└────────────────────────┬────────────────────────────────┘
|
|
95
|
-
│
|
|
96
|
-
┌────────────────────────▼────────────────────────────────┐
|
|
97
|
-
│ Runtimes runtimes/ │
|
|
98
|
-
│ AgentRuntime interface → any LLM backend │
|
|
99
|
-
│ Built-in: CopilotBackend · SdkBackend · MockRuntime │
|
|
100
|
-
└────────────────────────┬────────────────────────────────┘
|
|
101
|
-
│
|
|
102
|
-
┌────────────────────────▼────────────────────────────────┐
|
|
103
|
-
│ UI ui/ │
|
|
104
|
-
│ FlowGraph · MiniPipeline · NodePanel · FlowStatusBar │
|
|
105
|
-
│ ResponsePartRenderer · 50+ tool formatters │
|
|
106
|
-
│ Warm charcoal dark theme · React 19 + React Flow │
|
|
107
|
-
└─────────────────────────────────────────────────────────┘
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Imports
|
|
111
|
-
|
|
112
|
-
condukt is split into sub-path exports so you only pull in what you need.
|
|
113
|
-
|
|
114
|
-
| Import | What you get |
|
|
115
|
-
|--------|-------------|
|
|
116
|
-
| `condukt` | Core engine — `run`, `validateGraph`, node factories, types, events |
|
|
117
|
-
| `condukt/state` | `StateRuntime`, `MemoryStorage`, reducer |
|
|
118
|
-
| `condukt/state/server` | `FileStorage` (JSONL persistence, Node.js only) |
|
|
119
|
-
| `condukt/bridge` | `createBridge` → `BridgeApi` |
|
|
120
|
-
| `condukt/runtimes/copilot` | `SubprocessBackend`, `SdkBackend`, `adaptCopilotBackend` |
|
|
121
|
-
| `condukt/runtimes/mock` | `MockRuntime` for deterministic tests |
|
|
122
|
-
| `condukt/ui` | Full UI — hooks, components, graph (requires `react`, `@xyflow/react`) |
|
|
123
|
-
| `condukt/ui/core` | Design-system primitives — no xyflow dependency |
|
|
124
|
-
| `condukt/ui/graph` | `FlowGraph`, `FlowEdge` (requires `@xyflow/react`) |
|
|
125
|
-
| `condukt/ui/tool-display` | `ResponsePartRenderer`, `SubagentSection`, tool formatters |
|
|
126
|
-
| `condukt/theme` | Tailwind preset, `STATUS_COLORS`, design tokens |
|
|
127
|
-
| `condukt/utils` | Shared utilities |
|
|
128
|
-
|
|
129
|
-
## Node types
|
|
130
|
-
|
|
131
|
-
| Factory | Purpose | Example |
|
|
132
|
-
|---------|---------|---------|
|
|
133
|
-
| `agent(id, config)` | LLM call with crash recovery, setup/teardown hooks | Research, analysis, code generation |
|
|
134
|
-
| `deterministic(id, fn)` | Pure async function, no LLM | Parsing, validation, API calls |
|
|
135
|
-
| `gate(id, options)` | Pauses execution until a human resolves it | Approval workflows, review checkpoints |
|
|
136
|
-
| `verify(id, config)` | Iterative agent + property checks, retries until passing | Output validation, quality gates |
|
|
137
|
-
|
|
138
|
-
## Graph features
|
|
139
|
-
|
|
140
|
-
- **Fan-out** — one node fans out to multiple parallel branches
|
|
141
|
-
- **Fan-in** — multiple branches converge into a single node (waits for all)
|
|
142
|
-
- **Loop-back** — edges that point backward with `maxIterations` bounds and `loopFallback` strategy
|
|
143
|
-
- **Per-node timeout** — individual deadline per node
|
|
144
|
-
- **Abort / Resume** — stop mid-execution and pick up where you left off
|
|
145
|
-
|
|
146
|
-
## UI components
|
|
147
|
-
|
|
148
|
-
The UI layer is a complete React component library with a warm charcoal dark theme.
|
|
149
|
-
|
|
150
|
-
**Graph visualization** — `FlowGraph` renders the full interactive DAG via React Flow. `MiniPipeline` provides a compact thumbnail in three modes: graph (≤20 nodes), bar (21–50), and summary (>50).
|
|
151
|
-
|
|
152
|
-
**Node detail** — `NodeDetailPanel` is a zero-config convenience wrapper. For full control, use the compound `NodePanel.*` components: `Header`, `Info`, `ErrorBar`, `Gate`, `Controls`, `Output`.
|
|
153
|
-
|
|
154
|
-
**Tool display** — `ResponsePartRenderer` handles tool calls, thinking blocks, text, and sub-agent grouping. Ships with 50+ built-in tool formatters and a `renderToolExpanded` callback for custom rendering.
|
|
155
|
-
|
|
156
|
-
**Hooks** — `useFlowExecution` (SSE + REST), `useNodeOutput` (streaming per-node), `useAutoSelectNode`, `useNodeNavigation`.
|
|
157
|
-
|
|
158
|
-
### Tailwind preset
|
|
159
|
-
|
|
160
|
-
```js
|
|
161
|
-
// tailwind.config.js
|
|
162
|
-
const { flowFrameworkPreset } = require('condukt/theme');
|
|
163
|
-
|
|
164
|
-
module.exports = {
|
|
165
|
-
presets: [flowFrameworkPreset],
|
|
166
|
-
content: ['./src/**/*.{ts,tsx}', './node_modules/condukt/dist/**/*.js'],
|
|
167
|
-
};
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Testing
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
npm test # 659 tests across 50 suites
|
|
174
|
-
npm run typecheck # tsc --noEmit
|
|
175
|
-
npm run build # TypeScript → dist/
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## License
|
|
179
|
-
|
|
180
|
-
MIT
|
|
1
|
+
# condukt
|
|
2
|
+
|
|
3
|
+
Composable AI agent workflow framework. Define pipelines as directed graphs, execute them with fan-out parallelism and bounded loops, persist state through event sourcing, and visualize everything with a dark-themed React UI.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/condukt)
|
|
6
|
+
[](#testing)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install condukt
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Why condukt
|
|
14
|
+
|
|
15
|
+
- **Graph-based execution** — DAG scheduler with topological ordering, fan-out/fan-in, and bounded loop-back
|
|
16
|
+
- **Four node types** — `agent` (LLM), `deterministic` (pure function), `gate` (human approval), `verify` (iterative validation)
|
|
17
|
+
- **Event-sourced state** — every execution event is persisted; projections are recomputed from the log
|
|
18
|
+
- **Runtime-agnostic** — plug in any LLM backend via the `AgentRuntime` interface
|
|
19
|
+
- **Modular imports** — 12 sub-path exports; consumers install only what they use
|
|
20
|
+
- **Full React UI** — interactive flow graph, node panels, tool display, status bar — all dark-themed with warm charcoal tokens
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
### Define a pipeline
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { agent, deterministic, gate } from 'condukt';
|
|
28
|
+
import type { FlowGraph } from 'condukt';
|
|
29
|
+
|
|
30
|
+
const pipeline: FlowGraph = {
|
|
31
|
+
nodes: [
|
|
32
|
+
agent('research', { prompt: 'Research the topic...' }),
|
|
33
|
+
deterministic('transform', async (input) => {
|
|
34
|
+
return { summary: extract(input), confidence: 0.94 };
|
|
35
|
+
}),
|
|
36
|
+
gate('review', { allowedResolutions: ['approved', 'rejected'] }),
|
|
37
|
+
],
|
|
38
|
+
edges: [
|
|
39
|
+
{ source: 'research', target: 'transform', action: 'default' },
|
|
40
|
+
{ source: 'transform', target: 'review', action: 'default' },
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Execute it
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { run, validateGraph } from 'condukt';
|
|
49
|
+
import { StateRuntime } from 'condukt/state';
|
|
50
|
+
import { FileStorage } from 'condukt/state/server';
|
|
51
|
+
import { createBridge } from 'condukt/bridge';
|
|
52
|
+
|
|
53
|
+
validateGraph(pipeline);
|
|
54
|
+
|
|
55
|
+
const storage = new FileStorage('.flow-data');
|
|
56
|
+
const state = new StateRuntime(storage);
|
|
57
|
+
const bridge = createBridge(state, runtime);
|
|
58
|
+
|
|
59
|
+
const execution = await bridge.launch(pipeline, { scenario: 'my-workflow' });
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Add the UI
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { FlowGraph } from 'condukt/ui/graph';
|
|
66
|
+
import { NodeDetailPanel } from 'condukt/ui/core';
|
|
67
|
+
import { useFlowExecution } from 'condukt/ui';
|
|
68
|
+
import 'condukt/ui/style.css';
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Architecture
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
┌─────────────────────────────────────────────────────────┐
|
|
75
|
+
│ Your code │
|
|
76
|
+
│ FlowGraph { nodes, edges } │
|
|
77
|
+
│ agent() · deterministic() · gate() · verify() │
|
|
78
|
+
└────────────────────────┬────────────────────────────────┘
|
|
79
|
+
│
|
|
80
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
81
|
+
│ Execution src/ │
|
|
82
|
+
│ DAG scheduler · fan-out · fan-in · bounded loop-back │
|
|
83
|
+
│ Emits 16 event types as a stream │
|
|
84
|
+
└────────────────────────┬────────────────────────────────┘
|
|
85
|
+
│
|
|
86
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
87
|
+
│ State state/ │
|
|
88
|
+
│ Pure reducer · JSONL persistence · crash recovery │
|
|
89
|
+
└────────────────────────┬────────────────────────────────┘
|
|
90
|
+
│
|
|
91
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
92
|
+
│ Bridge bridge/ │
|
|
93
|
+
│ launch · stop · resume · retry · skip · approve │
|
|
94
|
+
└────────────────────────┬────────────────────────────────┘
|
|
95
|
+
│
|
|
96
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
97
|
+
│ Runtimes runtimes/ │
|
|
98
|
+
│ AgentRuntime interface → any LLM backend │
|
|
99
|
+
│ Built-in: CopilotBackend · SdkBackend · MockRuntime │
|
|
100
|
+
└────────────────────────┬────────────────────────────────┘
|
|
101
|
+
│
|
|
102
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
103
|
+
│ UI ui/ │
|
|
104
|
+
│ FlowGraph · MiniPipeline · NodePanel · FlowStatusBar │
|
|
105
|
+
│ ResponsePartRenderer · 50+ tool formatters │
|
|
106
|
+
│ Warm charcoal dark theme · React 19 + React Flow │
|
|
107
|
+
└─────────────────────────────────────────────────────────┘
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Imports
|
|
111
|
+
|
|
112
|
+
condukt is split into sub-path exports so you only pull in what you need.
|
|
113
|
+
|
|
114
|
+
| Import | What you get |
|
|
115
|
+
|--------|-------------|
|
|
116
|
+
| `condukt` | Core engine — `run`, `validateGraph`, node factories, types, events |
|
|
117
|
+
| `condukt/state` | `StateRuntime`, `MemoryStorage`, reducer |
|
|
118
|
+
| `condukt/state/server` | `FileStorage` (JSONL persistence, Node.js only) |
|
|
119
|
+
| `condukt/bridge` | `createBridge` → `BridgeApi` |
|
|
120
|
+
| `condukt/runtimes/copilot` | `SubprocessBackend`, `SdkBackend`, `adaptCopilotBackend` |
|
|
121
|
+
| `condukt/runtimes/mock` | `MockRuntime` for deterministic tests |
|
|
122
|
+
| `condukt/ui` | Full UI — hooks, components, graph (requires `react`, `@xyflow/react`) |
|
|
123
|
+
| `condukt/ui/core` | Design-system primitives — no xyflow dependency |
|
|
124
|
+
| `condukt/ui/graph` | `FlowGraph`, `FlowEdge` (requires `@xyflow/react`) |
|
|
125
|
+
| `condukt/ui/tool-display` | `ResponsePartRenderer`, `SubagentSection`, tool formatters |
|
|
126
|
+
| `condukt/theme` | Tailwind preset, `STATUS_COLORS`, design tokens |
|
|
127
|
+
| `condukt/utils` | Shared utilities |
|
|
128
|
+
|
|
129
|
+
## Node types
|
|
130
|
+
|
|
131
|
+
| Factory | Purpose | Example |
|
|
132
|
+
|---------|---------|---------|
|
|
133
|
+
| `agent(id, config)` | LLM call with crash recovery, setup/teardown hooks | Research, analysis, code generation |
|
|
134
|
+
| `deterministic(id, fn)` | Pure async function, no LLM | Parsing, validation, API calls |
|
|
135
|
+
| `gate(id, options)` | Pauses execution until a human resolves it | Approval workflows, review checkpoints |
|
|
136
|
+
| `verify(id, config)` | Iterative agent + property checks, retries until passing | Output validation, quality gates |
|
|
137
|
+
|
|
138
|
+
## Graph features
|
|
139
|
+
|
|
140
|
+
- **Fan-out** — one node fans out to multiple parallel branches
|
|
141
|
+
- **Fan-in** — multiple branches converge into a single node (waits for all)
|
|
142
|
+
- **Loop-back** — edges that point backward with `maxIterations` bounds and `loopFallback` strategy
|
|
143
|
+
- **Per-node timeout** — individual deadline per node
|
|
144
|
+
- **Abort / Resume** — stop mid-execution and pick up where you left off
|
|
145
|
+
|
|
146
|
+
## UI components
|
|
147
|
+
|
|
148
|
+
The UI layer is a complete React component library with a warm charcoal dark theme.
|
|
149
|
+
|
|
150
|
+
**Graph visualization** — `FlowGraph` renders the full interactive DAG via React Flow. `MiniPipeline` provides a compact thumbnail in three modes: graph (≤20 nodes), bar (21–50), and summary (>50).
|
|
151
|
+
|
|
152
|
+
**Node detail** — `NodeDetailPanel` is a zero-config convenience wrapper. For full control, use the compound `NodePanel.*` components: `Header`, `Info`, `ErrorBar`, `Gate`, `Controls`, `Output`.
|
|
153
|
+
|
|
154
|
+
**Tool display** — `ResponsePartRenderer` handles tool calls, thinking blocks, text, and sub-agent grouping. Ships with 50+ built-in tool formatters and a `renderToolExpanded` callback for custom rendering.
|
|
155
|
+
|
|
156
|
+
**Hooks** — `useFlowExecution` (SSE + REST), `useNodeOutput` (streaming per-node), `useAutoSelectNode`, `useNodeNavigation`.
|
|
157
|
+
|
|
158
|
+
### Tailwind preset
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
// tailwind.config.js
|
|
162
|
+
const { flowFrameworkPreset } = require('condukt/theme');
|
|
163
|
+
|
|
164
|
+
module.exports = {
|
|
165
|
+
presets: [flowFrameworkPreset],
|
|
166
|
+
content: ['./src/**/*.{ts,tsx}', './node_modules/condukt/dist/**/*.js'],
|
|
167
|
+
};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Testing
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npm test # 659 tests across 50 suites
|
|
174
|
+
npm run typecheck # tsc --noEmit
|
|
175
|
+
npm run build # TypeScript → dist/
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
MIT
|
|
@@ -13,6 +13,8 @@ export interface SessionConfig {
|
|
|
13
13
|
readonly model: string;
|
|
14
14
|
/** Thinking budget level for extended thinking models */
|
|
15
15
|
readonly thinkingBudget?: 'low' | 'medium' | 'high' | 'xhigh';
|
|
16
|
+
/** Context-window tier to request from the Copilot SDK. */
|
|
17
|
+
readonly contextTier?: 'default' | 'long_context';
|
|
16
18
|
/** Working directory for the agent (repo root) */
|
|
17
19
|
readonly cwd: string;
|
|
18
20
|
/** Additional directories the agent can access. [] = isolation (step 2a) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-backend.d.ts","sourceRoot":"","sources":["../../../runtimes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AAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;IAClG,4CAA4C;IAC5C,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;IAChG,wCAAwC;IACxC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAAC;IACvE,kEAAkE;IAClE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IAEhG,kDAAkD;IAClD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAE9D,wCAAwC;IACxC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhC,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* no actionable content and should be silently consumed by all backends.
|
|
2
|
+
* Classification for the GitHub Copilot SDK session event surface.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Unknown events are deliberately not treated as informational by callers: the
|
|
5
|
+
* SdkBackend applies a failure-shaped fallback and leaves silence to its
|
|
6
|
+
* heartbeat watchdog. Keep the informational shim for SubprocessBackend's
|
|
7
|
+
* JSONL warning suppression.
|
|
7
8
|
*/
|
|
9
|
+
export type SdkEventClass = 'terminal-success' | 'terminal-failure' | 'pending-request' | 'streaming-liveness' | 'informational';
|
|
10
|
+
export declare const KNOWN_SDK_EVENT_TYPES: Set<string>;
|
|
11
|
+
export declare function classifySdkEvent(type: string): SdkEventClass | undefined;
|
|
12
|
+
/** Legacy shim used by SubprocessBackend's separate JSONL vocabulary. */
|
|
8
13
|
export declare const LIFECYCLE_EVENT_TYPES: Set<string>;
|
|
9
14
|
//# sourceMappingURL=lifecycle-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle-events.d.ts","sourceRoot":"","sources":["../../../runtimes/copilot/lifecycle-events.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle-events.d.ts","sourceRoot":"","sources":["../../../runtimes/copilot/lifecycle-events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,aAAa,GACrB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAAC;AA2DpB,eAAO,MAAM,qBAAqB,aAMhC,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAOxE;AAED,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,aAAgB,CAAC"}
|
|
@@ -1,53 +1,89 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* no actionable content and should be silently consumed by all backends.
|
|
3
|
+
* Classification for the GitHub Copilot SDK session event surface.
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Unknown events are deliberately not treated as informational by callers: the
|
|
6
|
+
* SdkBackend applies a failure-shaped fallback and leaves silence to its
|
|
7
|
+
* heartbeat watchdog. Keep the informational shim for SubprocessBackend's
|
|
8
|
+
* JSONL warning suppression.
|
|
8
9
|
*/
|
|
9
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.LIFECYCLE_EVENT_TYPES = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
|
|
11
|
+
exports.LIFECYCLE_EVENT_TYPES = exports.KNOWN_SDK_EVENT_TYPES = void 0;
|
|
12
|
+
exports.classifySdkEvent = classifySdkEvent;
|
|
13
|
+
const TERMINAL_SUCCESS = new Set(['session.idle', 'session.task_complete']);
|
|
14
|
+
const TERMINAL_FAILURE = new Set(['session.error', 'model.call_failure', 'abort']);
|
|
15
|
+
const PENDING_REQUEST = new Set([
|
|
16
|
+
'sampling.requested',
|
|
17
|
+
'auto_mode_switch.requested',
|
|
18
|
+
'session_limits_exhausted.requested',
|
|
19
|
+
'mcp.headers_refresh_required',
|
|
20
|
+
]);
|
|
21
|
+
const STREAMING_LIVENESS = new Set([
|
|
22
|
+
'assistant.reasoning', 'assistant.reasoning_delta',
|
|
23
|
+
'assistant.message', 'assistant.message_start', 'assistant.message_delta',
|
|
24
|
+
'assistant.streaming_delta', 'assistant.tool_call_delta',
|
|
25
|
+
'assistant.turn_start', 'assistant.turn_end', 'assistant.intent',
|
|
26
|
+
'assistant.idle', 'assistant.usage',
|
|
27
|
+
'tool.user_requested', 'tool.execution_start',
|
|
28
|
+
'tool.execution_partial_result', 'tool.execution_progress',
|
|
29
|
+
'tool.execution_complete',
|
|
30
|
+
'subagent.started', 'subagent.completed', 'subagent.failed',
|
|
31
|
+
'session.compaction_start', 'session.compaction_complete',
|
|
32
|
+
]);
|
|
33
|
+
const INFORMATIONAL = new Set([
|
|
13
34
|
'session.start', 'session.resume', 'session.shutdown',
|
|
14
35
|
'session.info', 'session.warning', 'session.title_changed',
|
|
15
|
-
'session.context_changed', 'session.usage_info', 'session.
|
|
16
|
-
'session.
|
|
17
|
-
'session.
|
|
18
|
-
'session.
|
|
19
|
-
'session.
|
|
20
|
-
'session.
|
|
21
|
-
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
'
|
|
26
|
-
|
|
27
|
-
'
|
|
36
|
+
'session.context_changed', 'session.usage_info', 'session.usage_checkpoint',
|
|
37
|
+
'session.model_change', 'session.mode_changed', 'session.plan_changed',
|
|
38
|
+
'session.todos_changed', 'session.permissions_changed',
|
|
39
|
+
'session.session_limits_changed', 'session.remote_steerable_changed',
|
|
40
|
+
'session.schedule_created', 'session.schedule_cancelled', 'session.schedule_rearmed',
|
|
41
|
+
'session.autopilot_objective_changed', 'session.truncation',
|
|
42
|
+
'session.snapshot_rewind', 'session.workspace_file_changed', 'session.handoff',
|
|
43
|
+
'session.background_tasks_changed', 'session.skills_loaded',
|
|
44
|
+
'session.custom_agents_updated', 'session.extensions_loaded',
|
|
45
|
+
'session.mcp_server_status_changed', 'session.mcp_servers_loaded',
|
|
46
|
+
'session.tools_updated', 'session.binary_asset', 'session.custom_notification',
|
|
47
|
+
'session.extensions.attachments_pushed',
|
|
48
|
+
'user.message', 'pending_messages.modified', 'system.message',
|
|
49
|
+
'system.notification', 'skill.invoked',
|
|
28
50
|
'subagent.selected', 'subagent.deselected',
|
|
29
|
-
|
|
51
|
+
'permission.requested', 'permission.completed',
|
|
30
52
|
'user_input.requested', 'user_input.completed',
|
|
31
53
|
'elicitation.requested', 'elicitation.completed',
|
|
32
|
-
// External tool coordination
|
|
33
54
|
'external_tool.requested', 'external_tool.completed',
|
|
34
|
-
|
|
35
|
-
'command.queued', 'command.completed',
|
|
36
|
-
// Plan mode
|
|
55
|
+
'command.queued', 'command.execute', 'command.completed', 'commands.changed',
|
|
37
56
|
'exit_plan_mode.requested', 'exit_plan_mode.completed',
|
|
38
|
-
// Tool UI
|
|
39
|
-
'tool.user_requested', 'tool.execution_progress',
|
|
40
|
-
// Permission (completion is silent; request is handled separately)
|
|
41
|
-
'permission.completed',
|
|
42
|
-
// MCP server lifecycle (CLI handles MCP internally)
|
|
43
|
-
'session.mcp_server_status_changed', 'session.mcp_servers_loaded',
|
|
44
|
-
'session.tools_updated',
|
|
45
|
-
// New in SDK 0.2.0
|
|
46
|
-
'session.skills_loaded', 'session.extensions_loaded',
|
|
47
|
-
'agent_completed', 'agent_idle',
|
|
48
57
|
'mcp.oauth_required', 'mcp.oauth_completed',
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
58
|
+
'mcp.headers_refresh_completed', 'sampling.completed',
|
|
59
|
+
'auto_mode_switch.completed', 'session_limits_exhausted.completed',
|
|
60
|
+
'capabilities.changed',
|
|
61
|
+
'hook.start', 'hook.progress', 'hook.end',
|
|
62
|
+
'session.canvas.opened', 'session.canvas.registry_changed',
|
|
63
|
+
'session.canvas.closed', 'session.canvas.unavailable',
|
|
64
|
+
'session.canvas.recorded', 'session.canvas.removed',
|
|
65
|
+
'mcp_app.tool_call_complete',
|
|
66
|
+
]);
|
|
67
|
+
exports.KNOWN_SDK_EVENT_TYPES = new Set([
|
|
68
|
+
...TERMINAL_SUCCESS,
|
|
69
|
+
...TERMINAL_FAILURE,
|
|
70
|
+
...PENDING_REQUEST,
|
|
71
|
+
...STREAMING_LIVENESS,
|
|
72
|
+
...INFORMATIONAL,
|
|
52
73
|
]);
|
|
74
|
+
function classifySdkEvent(type) {
|
|
75
|
+
if (TERMINAL_SUCCESS.has(type))
|
|
76
|
+
return 'terminal-success';
|
|
77
|
+
if (TERMINAL_FAILURE.has(type))
|
|
78
|
+
return 'terminal-failure';
|
|
79
|
+
if (PENDING_REQUEST.has(type))
|
|
80
|
+
return 'pending-request';
|
|
81
|
+
if (STREAMING_LIVENESS.has(type))
|
|
82
|
+
return 'streaming-liveness';
|
|
83
|
+
if (INFORMATIONAL.has(type))
|
|
84
|
+
return 'informational';
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
/** Legacy shim used by SubprocessBackend's separate JSONL vocabulary. */
|
|
88
|
+
exports.LIFECYCLE_EVENT_TYPES = INFORMATIONAL;
|
|
53
89
|
//# sourceMappingURL=lifecycle-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle-events.js","sourceRoot":"","sources":["../../../runtimes/copilot/lifecycle-events.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"lifecycle-events.js","sourceRoot":"","sources":["../../../runtimes/copilot/lifecycle-events.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA0EH,4CAOC;AAxED,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC,CAAC;AAC5E,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,eAAe,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC;AACnF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,oBAAoB;IACpB,4BAA4B;IAC5B,oCAAoC;IACpC,8BAA8B;CAC/B,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,qBAAqB,EAAE,2BAA2B;IAClD,mBAAmB,EAAE,yBAAyB,EAAE,yBAAyB;IACzE,2BAA2B,EAAE,2BAA2B;IACxD,sBAAsB,EAAE,oBAAoB,EAAE,kBAAkB;IAChE,gBAAgB,EAAE,iBAAiB;IACnC,qBAAqB,EAAE,sBAAsB;IAC7C,+BAA+B,EAAE,yBAAyB;IAC1D,yBAAyB;IACzB,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB;IAC3D,0BAA0B,EAAE,6BAA6B;CAC1D,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,eAAe,EAAE,gBAAgB,EAAE,kBAAkB;IACrD,cAAc,EAAE,iBAAiB,EAAE,uBAAuB;IAC1D,yBAAyB,EAAE,oBAAoB,EAAE,0BAA0B;IAC3E,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB;IACtE,uBAAuB,EAAE,6BAA6B;IACtD,gCAAgC,EAAE,kCAAkC;IACpE,0BAA0B,EAAE,4BAA4B,EAAE,0BAA0B;IACpF,qCAAq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G,CAAC,IAAI,CAAC;QAAE,OAAO,oBAAoB,CAAC;IAC9D,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,eAAe,CAAC;IACpD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,yEAAyE;AAC5D,QAAA,qBAAqB,GAAG,aAAa,CAAC"}
|
|
@@ -18,7 +18,7 @@ export interface SdkBackendOptions {
|
|
|
18
18
|
extraPathDirs?: readonly string[];
|
|
19
19
|
/** Additional tool names to resolve and add to PATH (e.g. ['az', 'dotnet']). */
|
|
20
20
|
pathTools?: readonly string[];
|
|
21
|
-
/** Project root
|
|
21
|
+
/** Project root directory used by the CLI to discover .copilot configuration. */
|
|
22
22
|
configDir?: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-backend.d.ts","sourceRoot":"","sources":["../../../runtimes/copilot/sdk-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAA2C,MAAM,mBAAmB,CAAC;AAOhI,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,gFAAgF;IAChF,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,
|
|
1
|
+
{"version":3,"file":"sdk-backend.d.ts","sourceRoot":"","sources":["../../../runtimes/copilot/sdk-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAA2C,MAAM,mBAAmB,CAAC;AAOhI,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,aAAa,CA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