@gencode/shared 0.0.6 → 0.0.8
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-progress.d.ts +24 -1
- package/dist/agent-progress.d.ts.map +1 -1
- package/dist/agent-progress.js.map +1 -1
- package/dist/hitl.d.ts +180 -0
- package/dist/hitl.d.ts.map +1 -0
- package/dist/hitl.js +31 -0
- package/dist/hitl.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/run-events.d.ts +36 -19
- package/dist/run-events.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/agent-progress.d.ts
CHANGED
|
@@ -4,6 +4,13 @@ export type AgentProgressEventBase = {
|
|
|
4
4
|
parentSessionId?: string;
|
|
5
5
|
depth?: number;
|
|
6
6
|
};
|
|
7
|
+
export type AgentCustomProgressEvent = AgentProgressEventBase & {
|
|
8
|
+
type: "custom";
|
|
9
|
+
pluginId: string;
|
|
10
|
+
name: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
data?: Record<string, unknown>;
|
|
13
|
+
};
|
|
7
14
|
export type AgentDiagnosticLevel = "info" | "warn" | "error";
|
|
8
15
|
export type AgentDiagnosticScope = "runner" | "session" | "plugin" | "skill" | "memory" | "tool";
|
|
9
16
|
export type AgentDiagnosticEvent = AgentProgressEventBase & {
|
|
@@ -41,6 +48,7 @@ export type AgentProgressEvent = (AgentProgressEventBase & {
|
|
|
41
48
|
type: "tool_end";
|
|
42
49
|
toolCallId: string;
|
|
43
50
|
name: string;
|
|
51
|
+
input: unknown;
|
|
44
52
|
output: string;
|
|
45
53
|
isError: boolean;
|
|
46
54
|
}) | (AgentProgressEventBase & {
|
|
@@ -63,7 +71,7 @@ export type AgentProgressEvent = (AgentProgressEventBase & {
|
|
|
63
71
|
skillName: string;
|
|
64
72
|
agent: string;
|
|
65
73
|
taskId: string;
|
|
66
|
-
}) | (AgentProgressEventBase & {
|
|
74
|
+
}) | AgentCustomProgressEvent | (AgentProgressEventBase & {
|
|
67
75
|
type: "error";
|
|
68
76
|
message: string;
|
|
69
77
|
}) | (AgentProgressEventBase & {
|
|
@@ -76,6 +84,21 @@ export type AgentProgressEvent = (AgentProgressEventBase & {
|
|
|
76
84
|
childSessionId: string;
|
|
77
85
|
task: string;
|
|
78
86
|
status: "done" | "error" | "killed";
|
|
87
|
+
}) | (AgentProgressEventBase & {
|
|
88
|
+
type: "hitl_requested";
|
|
89
|
+
request: import("./hitl.js").HitlRequest;
|
|
90
|
+
}) | (AgentProgressEventBase & {
|
|
91
|
+
type: "hitl_resumed";
|
|
92
|
+
requestId: string;
|
|
93
|
+
resolution: import("./hitl.js").HitlResolution;
|
|
94
|
+
}) | (AgentProgressEventBase & {
|
|
95
|
+
type: "hitl_expired";
|
|
96
|
+
requestId: string;
|
|
97
|
+
reason: string;
|
|
98
|
+
}) | (AgentProgressEventBase & {
|
|
99
|
+
type: "hitl_cancelled";
|
|
100
|
+
requestId: string;
|
|
101
|
+
reason?: string;
|
|
79
102
|
}) | AgentDiagnosticEvent;
|
|
80
103
|
export declare function isAgentDiagnosticEvent(event: AgentProgressEvent): event is AgentDiagnosticEvent;
|
|
81
104
|
//# sourceMappingURL=agent-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-progress.d.ts","sourceRoot":"","sources":["../src/agent-progress.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAA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CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,GACA,oBAAoB,CAAC;AAEzB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,KAAK,IAAI,oBAAoB,CAE/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-progress.js","sourceRoot":"","sources":["../src/agent-progress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-progress.js","sourceRoot":"","sources":["../src/agent-progress.ts"],"names":[],"mappings":"AA0GA,MAAM,UAAU,sBAAsB,CAAC,KAAyB;IAC9D,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AACrC,CAAC"}
|
package/dist/hitl.d.ts
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HITL (Human-In-The-Loop) protocol types for AIMax.
|
|
3
|
+
*
|
|
4
|
+
* These types define the stable public contract shared by all packages:
|
|
5
|
+
* - @gencode/agents (produces pause requests)
|
|
6
|
+
* - @gencode/cli (emits & receives HITL events)
|
|
7
|
+
* - @gencode/web (renders HITL UI)
|
|
8
|
+
* - external systems (爱码 Max)
|
|
9
|
+
*
|
|
10
|
+
* Design principles:
|
|
11
|
+
* 1. Pause is a persisted session state, not an in-process block.
|
|
12
|
+
* 2. Resume is explicit & structured, not implicit message concatenation.
|
|
13
|
+
* 3. Every request carries an idempotency-safe requestId.
|
|
14
|
+
* 4. A single HitlRequest model covers approval / clarify / review.
|
|
15
|
+
*/
|
|
16
|
+
/** The semantic category of a HITL interaction. */
|
|
17
|
+
export type HitlKind = "approval" | "clarify" | "review";
|
|
18
|
+
/** A single selectable choice presented to the user. */
|
|
19
|
+
export type HitlChoice = {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Choice-based input (radio / checkbox / select). */
|
|
25
|
+
export type HitlChoiceInput = {
|
|
26
|
+
mode: "choice";
|
|
27
|
+
/** Allow selecting more than one choice. */
|
|
28
|
+
multiple?: boolean;
|
|
29
|
+
choices: HitlChoice[];
|
|
30
|
+
/** If true the user may also provide free-form text alongside choices. */
|
|
31
|
+
allowFreeText?: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** Free-text input (single or multi-line). */
|
|
34
|
+
export type HitlTextInput = {
|
|
35
|
+
mode: "text";
|
|
36
|
+
multiline?: boolean;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
};
|
|
39
|
+
/** Structured form input backed by a JSON-schema-like descriptor. */
|
|
40
|
+
export type HitlFormInput = {
|
|
41
|
+
mode: "form";
|
|
42
|
+
/** JSON-Schema-like descriptor understood by the rendering layer. */
|
|
43
|
+
schema: Record<string, unknown>;
|
|
44
|
+
};
|
|
45
|
+
/** Union of all supported input modes. */
|
|
46
|
+
export type HitlInputSchema = HitlChoiceInput | HitlTextInput | HitlFormInput;
|
|
47
|
+
/** Rich preview attachment that accompanies a review request. */
|
|
48
|
+
export type HitlPreview = {
|
|
49
|
+
mimeType: "text/plain" | "application/json" | "text/markdown";
|
|
50
|
+
content: string;
|
|
51
|
+
};
|
|
52
|
+
/** Timeout / default-action policy attached to a request. */
|
|
53
|
+
export type HitlPolicy = {
|
|
54
|
+
/** How long the external system should wait (ms) before timing out. */
|
|
55
|
+
timeoutMs?: number;
|
|
56
|
+
/** What to do when the request times out without a human response. */
|
|
57
|
+
defaultOnTimeout?: "deny" | "cancel" | "continue" | "use_best_effort";
|
|
58
|
+
/** Always true — this request can be resumed later. */
|
|
59
|
+
resumable: true;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* A HITL pause request produced by `@gencode/agents` and emitted through
|
|
63
|
+
* `@gencode/cli` to external systems.
|
|
64
|
+
*/
|
|
65
|
+
export type HitlRequest = {
|
|
66
|
+
/** Globally-unique request identifier (UUID). */
|
|
67
|
+
requestId: string;
|
|
68
|
+
/** The session this request belongs to. */
|
|
69
|
+
sessionId: string;
|
|
70
|
+
/** Optional correlation message id. */
|
|
71
|
+
messageId?: string;
|
|
72
|
+
/** Semantic kind of HITL interaction. */
|
|
73
|
+
kind: HitlKind;
|
|
74
|
+
/** Short human-readable title for the pause card. */
|
|
75
|
+
title: string;
|
|
76
|
+
/** Longer prompt / description explaining what the agent needs. */
|
|
77
|
+
prompt: string;
|
|
78
|
+
/** Arbitrary structured details for the rendering layer. */
|
|
79
|
+
details?: Record<string, unknown>;
|
|
80
|
+
/** Optional rich preview (e.g. draft document). */
|
|
81
|
+
preview?: HitlPreview;
|
|
82
|
+
/** Describes the expected user input shape. */
|
|
83
|
+
input: HitlInputSchema;
|
|
84
|
+
/** Timeout & default-action policy. */
|
|
85
|
+
policy: HitlPolicy;
|
|
86
|
+
/** ISO-8601 creation timestamp. */
|
|
87
|
+
createdAt: string;
|
|
88
|
+
/** ISO-8601 expiration timestamp (optional). */
|
|
89
|
+
expiresAt?: string;
|
|
90
|
+
};
|
|
91
|
+
/** The structured user response that resolves a HITL request. */
|
|
92
|
+
export type HitlResolution = {
|
|
93
|
+
/** Must match the original `HitlRequest.requestId`. */
|
|
94
|
+
requestId: string;
|
|
95
|
+
/** Must match the original session. */
|
|
96
|
+
sessionId: string;
|
|
97
|
+
/** Resolution action. */
|
|
98
|
+
action: "submit" | "cancel" | "timeout";
|
|
99
|
+
/** User-provided values (present when action === "submit"). */
|
|
100
|
+
values?: {
|
|
101
|
+
selectedChoiceIds?: string[];
|
|
102
|
+
text?: string;
|
|
103
|
+
form?: Record<string, unknown>;
|
|
104
|
+
};
|
|
105
|
+
/** Who submitted the resolution. */
|
|
106
|
+
submittedBy?: {
|
|
107
|
+
userId?: string;
|
|
108
|
+
channel?: string;
|
|
109
|
+
};
|
|
110
|
+
/** Caller-supplied idempotency key to prevent duplicate processing. */
|
|
111
|
+
idempotencyKey?: string;
|
|
112
|
+
/** ISO-8601 submission timestamp. */
|
|
113
|
+
submittedAt: string;
|
|
114
|
+
};
|
|
115
|
+
/** The checkpoint phase at which the agent was paused. */
|
|
116
|
+
export type HitlCheckpointPhase = "before_tool" | "after_tool" | "before_finalize" | "custom";
|
|
117
|
+
/** Describes the execution checkpoint so the agent can resume. */
|
|
118
|
+
export type HitlCheckpoint = {
|
|
119
|
+
/** Turn identifier for resume tracking. */
|
|
120
|
+
turnId: string;
|
|
121
|
+
/** The phase within the turn where the pause occurred. */
|
|
122
|
+
phase: HitlCheckpointPhase;
|
|
123
|
+
/** Strategy used to resume from this checkpoint. */
|
|
124
|
+
resumeStrategy: "reenter_from_checkpoint";
|
|
125
|
+
};
|
|
126
|
+
/** Tool call metadata used for precise resume of pre-tool pauses. */
|
|
127
|
+
export type HitlToolContext = {
|
|
128
|
+
toolCallId: string;
|
|
129
|
+
toolName: string;
|
|
130
|
+
toolArgs: Record<string, unknown>;
|
|
131
|
+
};
|
|
132
|
+
/** Status of a pending HITL request within a session. */
|
|
133
|
+
export type HitlStatus = "pending" | "resolved" | "expired" | "cancelled";
|
|
134
|
+
/** Persisted state written to `pending-hitl.json` in the session directory. */
|
|
135
|
+
export type PausedRunState = {
|
|
136
|
+
/** Schema version for forward-compatibility. */
|
|
137
|
+
version: 1;
|
|
138
|
+
/** Session identifier. */
|
|
139
|
+
sessionId: string;
|
|
140
|
+
/** The HITL request that caused the pause. */
|
|
141
|
+
request: HitlRequest;
|
|
142
|
+
/** Current status of the HITL request. */
|
|
143
|
+
status: HitlStatus;
|
|
144
|
+
/** Execution checkpoint for resume. */
|
|
145
|
+
checkpoint: HitlCheckpoint;
|
|
146
|
+
/** Contextual metadata. */
|
|
147
|
+
context: {
|
|
148
|
+
agentId?: string;
|
|
149
|
+
channel?: string;
|
|
150
|
+
parentSessionId?: string;
|
|
151
|
+
depth?: number;
|
|
152
|
+
};
|
|
153
|
+
/** Present when the pause happened immediately before a tool execution. */
|
|
154
|
+
toolContext?: HitlToolContext;
|
|
155
|
+
/** Present once the request has been resolved. */
|
|
156
|
+
resolution?: HitlResolution;
|
|
157
|
+
/** ISO-8601 creation timestamp. */
|
|
158
|
+
createdAt: string;
|
|
159
|
+
/** ISO-8601 last-update timestamp. */
|
|
160
|
+
updatedAt: string;
|
|
161
|
+
};
|
|
162
|
+
/** A single entry in the append-only `hitl-history.jsonl` audit log. */
|
|
163
|
+
export type HitlHistoryEntry = {
|
|
164
|
+
/** The request ID this entry relates to. */
|
|
165
|
+
requestId: string;
|
|
166
|
+
sessionId: string;
|
|
167
|
+
/** The action recorded by this entry. */
|
|
168
|
+
action: "requested" | "resolved" | "expired" | "cancelled";
|
|
169
|
+
/** Snapshot of the request (on "requested") or resolution (on "resolved"). */
|
|
170
|
+
payload: HitlRequest | HitlResolution;
|
|
171
|
+
/** ISO-8601 timestamp of this log entry. */
|
|
172
|
+
timestamp: string;
|
|
173
|
+
};
|
|
174
|
+
/** Type-guard: check whether a PausedRunState is still actionable. */
|
|
175
|
+
export declare function isHitlPending(state: PausedRunState): boolean;
|
|
176
|
+
/** Type-guard: check whether a PausedRunState has been resolved. */
|
|
177
|
+
export declare function isHitlResolved(state: PausedRunState): boolean;
|
|
178
|
+
/** Check whether a HITL request has expired based on its `expiresAt` field. */
|
|
179
|
+
export declare function isHitlExpired(request: HitlRequest, now?: Date): boolean;
|
|
180
|
+
//# sourceMappingURL=hitl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitl.d.ts","sourceRoot":"","sources":["../src/hitl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAIzD,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,4C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AAW,GAAG,cAAc,CAAC;IACtC,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAE5D;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAE7D;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO,CAGnF"}
|
package/dist/hitl.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HITL (Human-In-The-Loop) protocol types for AIMax.
|
|
3
|
+
*
|
|
4
|
+
* These types define the stable public contract shared by all packages:
|
|
5
|
+
* - @gencode/agents (produces pause requests)
|
|
6
|
+
* - @gencode/cli (emits & receives HITL events)
|
|
7
|
+
* - @gencode/web (renders HITL UI)
|
|
8
|
+
* - external systems (爱码 Max)
|
|
9
|
+
*
|
|
10
|
+
* Design principles:
|
|
11
|
+
* 1. Pause is a persisted session state, not an in-process block.
|
|
12
|
+
* 2. Resume is explicit & structured, not implicit message concatenation.
|
|
13
|
+
* 3. Every request carries an idempotency-safe requestId.
|
|
14
|
+
* 4. A single HitlRequest model covers approval / clarify / review.
|
|
15
|
+
*/
|
|
16
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
17
|
+
/** Type-guard: check whether a PausedRunState is still actionable. */
|
|
18
|
+
export function isHitlPending(state) {
|
|
19
|
+
return state.status === "pending";
|
|
20
|
+
}
|
|
21
|
+
/** Type-guard: check whether a PausedRunState has been resolved. */
|
|
22
|
+
export function isHitlResolved(state) {
|
|
23
|
+
return state.status === "resolved";
|
|
24
|
+
}
|
|
25
|
+
/** Check whether a HITL request has expired based on its `expiresAt` field. */
|
|
26
|
+
export function isHitlExpired(request, now = new Date()) {
|
|
27
|
+
if (!request.expiresAt)
|
|
28
|
+
return false;
|
|
29
|
+
return now >= new Date(request.expiresAt);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=hitl.js.map
|
package/dist/hitl.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitl.js","sourceRoot":"","sources":["../src/hitl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgMH,gFAAgF;AAEhF,sEAAsE;AACtE,MAAM,UAAU,aAAa,CAAC,KAAqB;IACjD,OAAO,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;AACpC,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,cAAc,CAAC,KAAqB;IAClD,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,aAAa,CAAC,OAAoB,EAAE,MAAY,IAAI,IAAI,EAAE;IACxE,IAAI,CAAC,OAAO,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IACrC,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* @gencode/shared - Shared utilities and types for AIMax packages.
|
|
3
3
|
*/
|
|
4
4
|
export { isAgentDiagnosticEvent } from "./agent-progress.js";
|
|
5
|
-
export type { AgentDiagnosticEvent, AgentDiagnosticLevel, AgentDiagnosticScope, AgentProgressEvent, AgentProgressEventBase, } from "./agent-progress.js";
|
|
5
|
+
export type { AgentCustomProgressEvent, AgentDiagnosticEvent, AgentDiagnosticLevel, AgentDiagnosticScope, AgentProgressEvent, AgentProgressEventBase, } from "./agent-progress.js";
|
|
6
6
|
export type { CallbackEventPayload, Channel, RunResultPayload, StreamEnvelope, StreamEventName, } from "./run-events.js";
|
|
7
7
|
export type { CollapseSpan, CompressionLayer, ContextCompactionState, ReadStateRecord, SessionMemorySnapshot, SessionContextSnapshot, SnipRecord, ToolResultReference, ToolResultBudgetRecord, } from "./context-protocol.js";
|
|
8
|
+
export { isHitlPending, isHitlResolved, isHitlExpired } from "./hitl.js";
|
|
9
|
+
export type { HitlKind, HitlChoice, HitlChoiceInput, HitlTextInput, HitlFormInput, HitlInputSchema, HitlPreview, HitlPolicy, HitlRequest, HitlResolution, HitlCheckpointPhase, HitlCheckpoint, HitlToolContext, HitlStatus, PausedRunState, HitlHistoryEntry, } from "./hitl.js";
|
|
8
10
|
//# 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;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,oBAAoB,EACpB,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,oBAAoB,EACpB,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACzE,YAAY,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
* @gencode/shared - Shared utilities and types for AIMax packages.
|
|
3
3
|
*/
|
|
4
4
|
export { isAgentDiagnosticEvent } from "./agent-progress.js";
|
|
5
|
+
// HITL protocol types
|
|
6
|
+
export { isHitlPending, isHitlResolved, isHitlExpired } from "./hitl.js";
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AA4B7D,sBAAsB;AACtB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/run-events.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { AgentProgressEvent } from "./agent-progress.js";
|
|
2
|
-
|
|
2
|
+
import type { HitlRequest } from "./hitl.js";
|
|
3
|
+
export type Channel = "H5" | "WEB" | "KLPA" | "TASK" | "CRON" | "EIP_ASSISTANT" | (string & {});
|
|
4
|
+
type EventEnvelopeBase = {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
channel: Channel;
|
|
7
|
+
messageId?: string;
|
|
8
|
+
user?: string;
|
|
9
|
+
};
|
|
3
10
|
export type RunResultPayload = {
|
|
4
11
|
text: string;
|
|
5
12
|
usage: {
|
|
@@ -14,45 +21,42 @@ export type RunResultPayload = {
|
|
|
14
21
|
toolResultsDir: string;
|
|
15
22
|
};
|
|
16
23
|
};
|
|
17
|
-
export type CallbackEventPayload = {
|
|
18
|
-
sessionId: string;
|
|
19
|
-
channel: Channel;
|
|
20
|
-
messageId?: string;
|
|
24
|
+
export type CallbackEventPayload = (EventEnvelopeBase & {
|
|
21
25
|
type: "start";
|
|
22
26
|
message: string;
|
|
23
|
-
} | {
|
|
24
|
-
sessionId: string;
|
|
25
|
-
channel: Channel;
|
|
26
|
-
messageId?: string;
|
|
27
|
+
}) | (EventEnvelopeBase & {
|
|
27
28
|
type: "progress";
|
|
28
29
|
event: AgentProgressEvent;
|
|
29
|
-
} | {
|
|
30
|
-
sessionId: string;
|
|
31
|
-
channel: Channel;
|
|
32
|
-
messageId?: string;
|
|
30
|
+
}) | (EventEnvelopeBase & {
|
|
33
31
|
type: "done";
|
|
34
32
|
result: RunResultPayload;
|
|
35
|
-
} | {
|
|
36
|
-
sessionId: string;
|
|
37
|
-
channel: Channel;
|
|
38
|
-
messageId?: string;
|
|
33
|
+
}) | (EventEnvelopeBase & {
|
|
39
34
|
type: "error";
|
|
40
35
|
message: string;
|
|
41
|
-
} | {
|
|
36
|
+
}) | {
|
|
42
37
|
sessionId: string;
|
|
43
38
|
channel: Channel;
|
|
44
39
|
messageId?: string;
|
|
40
|
+
user?: string;
|
|
45
41
|
type: "session_reset";
|
|
46
42
|
action: "new" | "reset";
|
|
47
43
|
previousSessionId?: string;
|
|
48
44
|
message: string;
|
|
45
|
+
} | {
|
|
46
|
+
sessionId: string;
|
|
47
|
+
channel: Channel;
|
|
48
|
+
messageId?: string;
|
|
49
|
+
user?: string;
|
|
50
|
+
type: "hitl";
|
|
51
|
+
request: HitlRequest;
|
|
49
52
|
};
|
|
50
|
-
export type StreamEventName = "start" | "text" | "progress" | "done" | "error";
|
|
53
|
+
export type StreamEventName = "start" | "text" | "progress" | "done" | "error" | "hitl";
|
|
51
54
|
export type StreamEnvelope = {
|
|
52
55
|
type: "start";
|
|
53
56
|
sessionId: string;
|
|
54
57
|
messageId?: string;
|
|
55
58
|
channel: Channel;
|
|
59
|
+
user?: string;
|
|
56
60
|
timestamp: string;
|
|
57
61
|
message: string;
|
|
58
62
|
} | {
|
|
@@ -60,6 +64,7 @@ export type StreamEnvelope = {
|
|
|
60
64
|
sessionId: string;
|
|
61
65
|
messageId?: string;
|
|
62
66
|
channel: Channel;
|
|
67
|
+
user?: string;
|
|
63
68
|
timestamp: string;
|
|
64
69
|
sequence: number;
|
|
65
70
|
delta: string;
|
|
@@ -68,6 +73,7 @@ export type StreamEnvelope = {
|
|
|
68
73
|
sessionId: string;
|
|
69
74
|
messageId?: string;
|
|
70
75
|
channel: Channel;
|
|
76
|
+
user?: string;
|
|
71
77
|
timestamp: string;
|
|
72
78
|
event: AgentProgressEvent;
|
|
73
79
|
} | {
|
|
@@ -75,6 +81,7 @@ export type StreamEnvelope = {
|
|
|
75
81
|
sessionId: string;
|
|
76
82
|
messageId?: string;
|
|
77
83
|
channel: Channel;
|
|
84
|
+
user?: string;
|
|
78
85
|
timestamp: string;
|
|
79
86
|
result: RunResultPayload;
|
|
80
87
|
} | {
|
|
@@ -82,7 +89,17 @@ export type StreamEnvelope = {
|
|
|
82
89
|
sessionId: string;
|
|
83
90
|
messageId?: string;
|
|
84
91
|
channel: Channel;
|
|
92
|
+
user?: string;
|
|
85
93
|
timestamp: string;
|
|
86
94
|
message: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: "hitl";
|
|
97
|
+
sessionId: string;
|
|
98
|
+
messageId?: string;
|
|
99
|
+
channel: Channel;
|
|
100
|
+
user?: string;
|
|
101
|
+
timestamp: string;
|
|
102
|
+
request: HitlRequest;
|
|
87
103
|
};
|
|
104
|
+
export {};
|
|
88
105
|
//# sourceMappingURL=run-events.d.ts.map
|
package/dist/run-events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-events.d.ts","sourceRoot":"","sources":["../src/run-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"run-events.d.ts","sourceRoot":"","sources":["../src/run-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,eAAe,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEhG,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,M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