@excitedjs/dreamux-types 0.2.0 → 0.3.0-beta.100
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/dist/agent-runtime.d.ts +42 -113
- package/dist/agent-runtime.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/turn.d.ts +5 -16
- package/dist/turn.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -18,112 +18,46 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { DreamuxLogger } from './logger.js';
|
|
20
20
|
import type { AgentRuntimeProviderDescriptor, DreamuxEnvironment, ProviderBinCheck, ProviderDiagnosticRunner, ProviderDiagnosticScope, ProviderDiagnosticResult, ProviderFactory, ProviderOnboard } from './provider.js';
|
|
21
|
-
import type { InboundDeliveryHooks, InboundDeliveryResult, InboundTurnInput,
|
|
21
|
+
import type { InboundDeliveryHooks, InboundDeliveryResult, InboundTurnInput, TurnSettledSignal } from './turn.js';
|
|
22
22
|
export interface AgentRuntimeMcpServer {
|
|
23
23
|
name: string;
|
|
24
24
|
command: string;
|
|
25
25
|
args: string[];
|
|
26
26
|
}
|
|
27
|
-
/** The role Dreamux core assigns to a runtime instance. */
|
|
28
|
-
export type AgentRuntimeRole = 'dispatcher' | 'team_leader' | 'teammate' | 'team_member';
|
|
29
27
|
/**
|
|
30
28
|
* A bundled skill source core hands to a runtime. Core selects sources by role;
|
|
31
29
|
* the runtime package owns the mechanics of applying them to its engine.
|
|
32
30
|
*/
|
|
33
31
|
export interface AgentRuntimeSkillSource {
|
|
34
32
|
name: string;
|
|
33
|
+
/** Directory containing SKILL.md. */
|
|
35
34
|
path: string;
|
|
36
|
-
/**
|
|
37
|
-
* How the runtime should mount `path` into its engine. An open string, not a
|
|
38
|
-
* closed union: a new runtime may define its own layout without a types bump.
|
|
39
|
-
* Standard layouts core emits today are `skill-dir` (a single skill directory,
|
|
40
|
-
* e.g. a Codex `skills/extraRoots` entry) and `claude-skills-parent` (the
|
|
41
|
-
* parent of a `.claude/skills` tree, e.g. a Claude `--add-dir` root). A runtime
|
|
42
|
-
* that does not recognize a layout should ignore that source, not fail.
|
|
43
|
-
*/
|
|
44
|
-
layout: string;
|
|
45
35
|
source: 'dreamux-core' | string;
|
|
46
36
|
}
|
|
47
|
-
/**
|
|
48
|
-
* An open, source-agnostic completion delivery shape. Each runtime self-declares
|
|
49
|
-
* its own `kind` string inside its own capabilities; the shared contract never
|
|
50
|
-
* enumerates them.
|
|
51
|
-
*/
|
|
52
|
-
export interface CompletionDeliveryShape {
|
|
53
|
-
kind: string;
|
|
54
|
-
description: string;
|
|
55
|
-
}
|
|
56
37
|
export interface AgentRuntimeResumeCheckpoint {
|
|
57
|
-
/** Runtime-owned checkpoint
|
|
58
|
-
kind: string;
|
|
38
|
+
/** Runtime-owned checkpoint id persisted by Dreamux and interpreted by the runtime. */
|
|
59
39
|
id: string;
|
|
60
40
|
}
|
|
61
|
-
export
|
|
62
|
-
supported:
|
|
63
|
-
|
|
64
|
-
} | {
|
|
65
|
-
supported: false;
|
|
66
|
-
};
|
|
41
|
+
export interface AgentRuntimeResumeCapability {
|
|
42
|
+
supported: boolean;
|
|
43
|
+
}
|
|
67
44
|
export interface AgentRuntimeCapabilities {
|
|
68
|
-
/** Whether this runtime can resume a prior checkpoint
|
|
45
|
+
/** Whether this runtime can resume a prior checkpoint id from its create context. */
|
|
69
46
|
resume: AgentRuntimeResumeCapability;
|
|
47
|
+
}
|
|
48
|
+
export interface AgentRuntimeSystemPrompt {
|
|
49
|
+
/** Full role instructions for runtimes that replace their base prompt. */
|
|
50
|
+
replace?: string;
|
|
70
51
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* "steer" method — core still delivers through `channelInput`/`systemInput`,
|
|
74
|
-
* and this flag only tells core whether mid-turn delivery is absorbed.
|
|
75
|
-
*/
|
|
76
|
-
steer: {
|
|
77
|
-
supported: boolean;
|
|
78
|
-
};
|
|
79
|
-
/** How runtime events are surfaced to Dreamux. */
|
|
80
|
-
events: {
|
|
81
|
-
kind: 'push' | 'synthesized';
|
|
82
|
-
};
|
|
83
|
-
/** Whether {@link AgentRuntime.getLast} can report the last result. */
|
|
84
|
-
last: {
|
|
85
|
-
supported: boolean;
|
|
86
|
-
};
|
|
87
|
-
/** Whether {@link AgentRuntime.getContext} can report context-window usage. */
|
|
88
|
-
context: {
|
|
89
|
-
supported: boolean;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* How the launcher-supplied role/system prompt content is applied: `replace`
|
|
93
|
-
* swaps the engine's base instructions, `append` adds to them.
|
|
52
|
+
* Ordered role deltas for runtimes that append to an existing native prompt.
|
|
53
|
+
* Runtime adapters preserve order and choose their native isolation mechanic.
|
|
94
54
|
*/
|
|
95
|
-
|
|
96
|
-
mode: 'replace' | 'append';
|
|
97
|
-
};
|
|
98
|
-
/** Upward delivery shapes this runtime supports for teammate completion. */
|
|
99
|
-
teammateCompletion: readonly CompletionDeliveryShape[];
|
|
55
|
+
append?: readonly string[];
|
|
100
56
|
}
|
|
101
|
-
|
|
102
|
-
* A source-agnostic completion delivered upward to a runtime. `teammate` is one
|
|
103
|
-
* source; `id` identifies the completing entity within that source.
|
|
104
|
-
*/
|
|
105
|
-
export interface CompletionEnvelope {
|
|
106
|
-
source: string;
|
|
107
|
-
id: string;
|
|
108
|
-
status: 'completed' | 'failed' | 'stopped';
|
|
109
|
-
result: string;
|
|
110
|
-
}
|
|
111
|
-
export type TeamMateCompletionDeliveryResult = {
|
|
112
|
-
status: 'accepted';
|
|
113
|
-
} | {
|
|
114
|
-
status: 'unsupported';
|
|
115
|
-
reason: string;
|
|
116
|
-
} | {
|
|
117
|
-
status: 'failed';
|
|
118
|
-
error: Error;
|
|
119
|
-
};
|
|
120
|
-
export interface AgentRuntimeSystemInput {
|
|
121
|
-
kind: 'system';
|
|
57
|
+
export interface AgentRuntimeTextInput {
|
|
122
58
|
text: string;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
export interface AgentRuntimeResumeInput {
|
|
126
|
-
checkpoint?: AgentRuntimeResumeCheckpoint | null;
|
|
59
|
+
/** Correlation/dedupe metadata; not part of the model-visible text. */
|
|
60
|
+
sourceId?: string;
|
|
127
61
|
}
|
|
128
62
|
export interface AgentRuntimeLastResult {
|
|
129
63
|
text: string | null;
|
|
@@ -146,8 +80,6 @@ export interface AgentRuntimePathContext {
|
|
|
146
80
|
* own tree here.
|
|
147
81
|
*/
|
|
148
82
|
logsDir(): string;
|
|
149
|
-
/** The owning dispatcher's completion-spill directory in the cache tree. */
|
|
150
|
-
completionSpillDir(id: string): string;
|
|
151
83
|
/**
|
|
152
84
|
* Candidate directories for volatile rendezvous sockets, in host preference
|
|
153
85
|
* order. A runtime that needs a Unix-domain socket allocates a fresh random
|
|
@@ -186,15 +118,17 @@ export type AgentRuntimeStatus = 'declared' | 'starting' | 'ready' | 'degraded'
|
|
|
186
118
|
* host store type.
|
|
187
119
|
*/
|
|
188
120
|
export interface AgentRuntimeStateCallbacks {
|
|
189
|
-
setStatus(
|
|
121
|
+
setStatus(status: AgentRuntimeStatus, extras?: {
|
|
190
122
|
last_error?: string | null;
|
|
191
123
|
last_started_at?: number;
|
|
192
124
|
last_ready_at?: number;
|
|
193
125
|
}): Promise<void>;
|
|
194
|
-
|
|
195
|
-
|
|
126
|
+
setCheckpoint(checkpoint: AgentRuntimeResumeCheckpoint): Promise<void>;
|
|
127
|
+
recordLostCheckpoint?(lost: AgentRuntimeResumeCheckpoint, replacement: AgentRuntimeResumeCheckpoint, error: string): Promise<void>;
|
|
196
128
|
}
|
|
197
|
-
export type AgentRuntimeTurnResult = InboundDeliveryResult |
|
|
129
|
+
export type AgentRuntimeTurnResult = InboundDeliveryResult | {
|
|
130
|
+
status: 'skipped';
|
|
131
|
+
};
|
|
198
132
|
/**
|
|
199
133
|
* The neutral, launcher-supplied identity of the runtime instance. Replaces the
|
|
200
134
|
* host's `DispatcherRow` in the public create context: a provider reads only the
|
|
@@ -206,19 +140,18 @@ export interface AgentRuntimeIdentity {
|
|
|
206
140
|
runtime_id: string;
|
|
207
141
|
/**
|
|
208
142
|
* A prior resumable checkpoint id the launcher recovered, or null for a fresh
|
|
209
|
-
* start. The runtime interprets
|
|
143
|
+
* start. The runtime interprets the id in its own native format.
|
|
210
144
|
*/
|
|
211
145
|
checkpoint_id?: string | null;
|
|
212
146
|
}
|
|
213
147
|
/**
|
|
214
148
|
* The neutral create context a provider's `createRuntime` receives. Carries the
|
|
215
|
-
* runtime identity,
|
|
149
|
+
* runtime identity, parsed provider config, cwd, optional system-prompt
|
|
216
150
|
* content, MCP servers, bundled skill sources, and neutral logger/path/state
|
|
217
151
|
* sinks. It never exposes host dispatcher rows, stores, or config models.
|
|
218
152
|
*/
|
|
219
153
|
export interface AgentRuntimeCreateContext<TConfig = unknown> {
|
|
220
154
|
identity: AgentRuntimeIdentity;
|
|
221
|
-
role: AgentRuntimeRole;
|
|
222
155
|
/** Provider-parsed config (the output of the provider's own `readConfig`). */
|
|
223
156
|
config: TConfig;
|
|
224
157
|
/**
|
|
@@ -227,10 +160,10 @@ export interface AgentRuntimeCreateContext<TConfig = unknown> {
|
|
|
227
160
|
*/
|
|
228
161
|
cwd: string;
|
|
229
162
|
/**
|
|
230
|
-
* Launcher-supplied role/system-prompt content
|
|
231
|
-
*
|
|
163
|
+
* Launcher-supplied role/system-prompt content. Core supplies both canonical
|
|
164
|
+
* forms; runtime adapters decide which native prompt mechanic to use.
|
|
232
165
|
*/
|
|
233
|
-
|
|
166
|
+
systemPrompt?: AgentRuntimeSystemPrompt;
|
|
234
167
|
/**
|
|
235
168
|
* MCP servers the launcher injects for this runtime instance. Already fully
|
|
236
169
|
* resolved by core: an empty array means "no MCP servers", and the provider
|
|
@@ -274,40 +207,36 @@ export interface AgentRuntimeCreateContext<TConfig = unknown> {
|
|
|
274
207
|
export interface AgentRuntime {
|
|
275
208
|
readonly providerRef: string;
|
|
276
209
|
start(): Promise<void>;
|
|
277
|
-
resume(
|
|
210
|
+
resume(): Promise<void>;
|
|
278
211
|
stop(): Promise<void>;
|
|
279
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* Deliver a channel/user turn. The runtime owns rendering the neutral channel
|
|
214
|
+
* shape into its native input format.
|
|
215
|
+
*/
|
|
280
216
|
channelInput(input: InboundTurnInput, hooks?: InboundDeliveryHooks): Promise<AgentRuntimeTurnResult>;
|
|
281
|
-
/**
|
|
282
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Deliver a Dreamux-owned plain text turn. This is not channel input and must
|
|
219
|
+
* not receive channel/XML rendering.
|
|
220
|
+
*/
|
|
221
|
+
completionInput(input: AgentRuntimeTextInput): Promise<AgentRuntimeTurnResult>;
|
|
283
222
|
/**
|
|
284
223
|
* Resolve when no turn is in progress. Optional: runtimes that omit it are
|
|
285
224
|
* treated by core as always idle.
|
|
286
225
|
*/
|
|
287
226
|
waitIdle?(): Promise<void>;
|
|
288
227
|
getStatus(): AgentRuntimeStatus;
|
|
289
|
-
|
|
290
|
-
|
|
228
|
+
getCheckpoint(): AgentRuntimeResumeCheckpoint | null;
|
|
229
|
+
wasCheckpointResumed(): boolean;
|
|
291
230
|
/**
|
|
292
231
|
* The last assistant/user-visible result, or `null` when unavailable.
|
|
293
|
-
*
|
|
294
|
-
* rather than throwing or blocking — core treats `null` as "not reported".
|
|
232
|
+
* Core treats `null` as "not reported".
|
|
295
233
|
*/
|
|
296
234
|
getLast(): Promise<AgentRuntimeLastResult | null>;
|
|
297
235
|
/**
|
|
298
|
-
* Context-window usage, or `null` when unavailable.
|
|
299
|
-
* `capabilities.context.supported` is false returns `null` rather than
|
|
300
|
-
* throwing or blocking.
|
|
236
|
+
* Context-window usage, or `null` when unavailable.
|
|
301
237
|
*/
|
|
302
238
|
getContext(): Promise<AgentRuntimeContextSnapshot | null>;
|
|
303
239
|
getCapabilities(): AgentRuntimeCapabilities;
|
|
304
|
-
/**
|
|
305
|
-
* Deliver a teammate-completion envelope upward. Optional, and feature-detected
|
|
306
|
-
* by presence: a runtime that declares no `capabilities.teammateCompletion`
|
|
307
|
-
* shapes should omit this method entirely rather than ship a throwing/no-op
|
|
308
|
-
* stub, since callers test for the method, not the capability array.
|
|
309
|
-
*/
|
|
310
|
-
completionInput?(completion: CompletionEnvelope): Promise<TeamMateCompletionDeliveryResult>;
|
|
311
240
|
}
|
|
312
241
|
/**
|
|
313
242
|
* Per-runtime diagnostic context. Neutral: it carries the runtime instance id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EACf,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../src/agent-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACV,8BAA8B,EAC9B,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EACf,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,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CAC1E;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CAC1E,oBAAoB,CAAC,OAAO,CAAC,EAC7B,8BAA8B,CAC/B,CAAC;AAEF,8EAA8E;AAC9E,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export type { DreamuxLogger } from './logger.js';
|
|
24
24
|
export type { AgentRuntimeProviderDescriptor, BuiltinProviderRef, ChannelProviderDescriptor, DreamuxEnvironment, ProviderBinCheck, NpmProviderRef, ProviderDiagnosticRunner, ProviderDiagnosticScope, ProviderDescriptor, ProviderDiagnosticResult, ProviderFactory, ProviderFactoryContext, ProviderKind, ProviderOnboard, ProviderOnboardConfirmPrompt, ProviderOnboardContext, ProviderOnboardPromptHost, ProviderOnboardSecretPrompt, ProviderOnboardTextPrompt, ProviderRef, ProviderRefSource, SubscribeChannelProviderDescriptor, } from './provider.js';
|
|
25
|
-
export type { InboundAttachment, InboundDeliveryHooks, InboundDeliveryResult, InboundTurnInput,
|
|
26
|
-
export type { AgentRuntime, AgentRuntimeBinCheck, AgentRuntimeCapabilities, AgentRuntimeContextSnapshot, AgentRuntimeCreateContext, AgentRuntimeDiagnostic, AgentRuntimeDiagnosticContext, AgentRuntimeDiagnosticRunner, AgentRuntimeDiagnosticResult, AgentRuntimeIdentity, AgentRuntimeLastResult, AgentRuntimeMcpServer, AgentRuntimePathContext, AgentRuntimeProvider, AgentRuntimeProviderConfigReadContext, AgentRuntimeProviderFactory, AgentRuntimeResumeCapability, AgentRuntimeResumeCheckpoint,
|
|
25
|
+
export type { InboundAttachment, InboundDeliveryHooks, InboundDeliveryResult, InboundTurnInput, TurnSettledSignal, } from './turn.js';
|
|
26
|
+
export type { AgentRuntime, AgentRuntimeBinCheck, AgentRuntimeCapabilities, AgentRuntimeContextSnapshot, AgentRuntimeCreateContext, AgentRuntimeDiagnostic, AgentRuntimeDiagnosticContext, AgentRuntimeDiagnosticRunner, AgentRuntimeDiagnosticResult, AgentRuntimeIdentity, AgentRuntimeLastResult, AgentRuntimeMcpServer, AgentRuntimePathContext, AgentRuntimeProvider, AgentRuntimeProviderConfigReadContext, AgentRuntimeProviderFactory, AgentRuntimeResumeCapability, AgentRuntimeResumeCheckpoint, AgentRuntimeSkillSource, AgentRuntimeStateCallbacks, AgentRuntimeStatus, AgentRuntimeSystemPrompt, AgentRuntimeTextInput, AgentRuntimeTurnResult, } from './agent-runtime.js';
|
|
27
27
|
export type { ChannelBinCheck, ChannelConfigContext, ChannelDiagnostic, ChannelDiagnosticContext, ChannelDiagnosticRunner, ChannelDiagnosticResult, ChannelInboundEnvelope, ChannelMcpDescriptorContext, ChannelMessageTargetCheck, ChannelProvider, ChannelProviderFactory, ChannelReactInput, ChannelReplyInput, ChannelRoutes, ChannelSender, ChannelSession, ChannelSessionCreateContext, ChannelSessionlessToolContext, ChannelTarget, ChannelToolCall, ChannelToolContext, ChannelToolDescriptor, ChannelToolListContext, } from './channel.js';
|
|
28
28
|
export type { SubscribeChannelConfigContext, SubscribeChannelEvent, SubscribeChannelMcpDescriptorContext, SubscribeChannelProvider, SubscribeChannelProviderFactory, SubscribeChannelRoutes, SubscribeChannelSession, SubscribeChannelSessionCreateContext, } from './subscribe-channel.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EACV,8BAA8B,EAC9B,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,kCAAkC,GACnC,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EACV,8BAA8B,EAC9B,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,kCAAkC,GACnC,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,qCAAqC,EACrC,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,2BAA2B,EAC3B,6BAA6B,EAC7B,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,oCAAoC,EACpC,wBAAwB,EACxB,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,EACvB,oCAAoC,GACrC,MAAM,wBAAwB,CAAC"}
|
package/dist/turn.d.ts
CHANGED
|
@@ -53,21 +53,6 @@ export type InboundDeliveryResult = {
|
|
|
53
53
|
status: 'failed';
|
|
54
54
|
error: Error;
|
|
55
55
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Result of a best-effort restart-notice injection. `skipped` means a real
|
|
58
|
-
* inbound had already been handed to the runtime.
|
|
59
|
-
*/
|
|
60
|
-
export type NoticeInjectionResult = {
|
|
61
|
-
status: 'stopped';
|
|
62
|
-
} | {
|
|
63
|
-
status: 'skipped';
|
|
64
|
-
} | {
|
|
65
|
-
status: 'submitted';
|
|
66
|
-
turnId: string;
|
|
67
|
-
} | {
|
|
68
|
-
status: 'failed';
|
|
69
|
-
error: Error;
|
|
70
|
-
};
|
|
71
56
|
export interface InboundDeliveryHooks {
|
|
72
57
|
/**
|
|
73
58
|
* Called after process-local dedupe accepts the message and before the turn
|
|
@@ -80,8 +65,12 @@ export interface InboundDeliveryHooks {
|
|
|
80
65
|
* Capability-neutral — carries no channel or runtime specifics.
|
|
81
66
|
*/
|
|
82
67
|
export interface TurnSettledSignal {
|
|
83
|
-
turnId: string
|
|
68
|
+
turnId: string;
|
|
84
69
|
status: 'completed' | 'failed' | 'stopped';
|
|
70
|
+
result?: {
|
|
71
|
+
text: string | null;
|
|
72
|
+
truncated?: boolean;
|
|
73
|
+
};
|
|
85
74
|
error?: Error;
|
|
86
75
|
}
|
|
87
76
|
//# sourceMappingURL=turn.d.ts.map
|
package/dist/turn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../src/turn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChC,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC5C;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../src/turn.ts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CAAC;KACrB,CAAC;IACF,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@excitedjs/dreamux-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-beta.100",
|
|
4
4
|
"description": "Declaration-only provider-authoring contracts for Dreamux: Agent Runtime and Channel provider types external providers compile against without depending on @excitedjs/dreamux (issue excitedjs/dreamux#209).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|