@moxt-ai/mobius-sdk 0.0.123 → 0.0.125
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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol/index.d.ts +2 -1
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +2 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/session/configuration/index.d.ts +3 -0
- package/dist/protocol/session/configuration/index.d.ts.map +1 -1
- package/dist/protocol/session/configuration/index.js +6 -0
- package/dist/protocol/session/configuration/index.js.map +1 -1
- package/dist/protocol/session/files/index.d.ts +53 -8
- package/dist/protocol/session/files/index.d.ts.map +1 -1
- package/dist/protocol/session/files/index.js +98 -8
- package/dist/protocol/session/files/index.js.map +1 -1
- package/dist/protocol/session/lifecycle/index.d.ts +2 -0
- package/dist/protocol/session/lifecycle/index.d.ts.map +1 -1
- package/dist/protocol/session/lifecycle/index.js +1 -0
- package/dist/protocol/session/lifecycle/index.js.map +1 -1
- package/dist/protocol/session/native/index.d.ts +9 -12
- package/dist/protocol/session/native/index.d.ts.map +1 -1
- package/dist/protocol/session/native/index.js +2 -4
- package/dist/protocol/session/native/index.js.map +1 -1
- package/dist/protocol/session/prompt/commands.d.ts +12 -18
- package/dist/protocol/session/prompt/commands.d.ts.map +1 -1
- package/dist/protocol/session/prompt/commands.js +23 -22
- package/dist/protocol/session/prompt/commands.js.map +1 -1
- package/dist/protocol/session/recording/recorded-lifecycle-status.d.ts +8 -0
- package/dist/protocol/session/recording/recorded-lifecycle-status.d.ts.map +1 -0
- package/dist/protocol/session/recording/recorded-lifecycle-status.js +27 -0
- package/dist/protocol/session/recording/recorded-lifecycle-status.js.map +1 -0
- package/dist/protocol/session/recording/recording.d.ts +33 -4
- package/dist/protocol/session/recording/recording.d.ts.map +1 -1
- package/dist/protocol/session/recording/recording.js +14 -4
- package/dist/protocol/session/recording/recording.js.map +1 -1
- package/dist/protocol/transport/daemon-transport.d.ts +38 -16
- package/dist/protocol/transport/daemon-transport.d.ts.map +1 -1
- package/dist/protocol/transport/daemon-transport.js +5 -2
- package/dist/protocol/transport/daemon-transport.js.map +1 -1
- package/dist/resources.d.ts +2 -3
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js.map +1 -1
- package/dist/service-client.d.ts +26 -11
- package/dist/service-client.d.ts.map +1 -1
- package/dist/service-client.js +43 -1
- package/dist/service-client.js.map +1 -1
- package/dist/transport/ws-transport.d.ts.map +1 -1
- package/dist/transport/ws-transport.js +17 -2
- package/dist/transport/ws-transport.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { identifierStringSchema as identifier } from "../../shared/identifier.js
|
|
|
4
4
|
import { ProtocolMessageError } from "../../shared/message-codec.js";
|
|
5
5
|
import { sessionElicitationRequestedEventSchema, sessionPermissionRequestedEventSchema, } from "../interactions/index.js";
|
|
6
6
|
import { sessionReadyEventSchema } from "../lifecycle/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { promptAttachmentSchema } from "../prompt/commands.js";
|
|
8
8
|
import { sessionCapabilitiesSchema } from "../shared/index.js";
|
|
9
9
|
export const NATIVE_SESSION_REQUEST_KIND = "native.session.request";
|
|
10
10
|
export const NATIVE_SESSION_RESULT_KIND = "native.session.result";
|
|
@@ -103,9 +103,7 @@ const nativeSessionResultSchema = z.discriminatedUnion("action", [
|
|
|
103
103
|
.object({
|
|
104
104
|
commandId: identifier,
|
|
105
105
|
prompt: z.string().max(100_000),
|
|
106
|
-
|
|
107
|
-
// Absent from daemons that predate it; a client then cannot restore the prompt's files.
|
|
108
|
-
resources: z.array(promptResourceSchema).max(16).readonly().optional(),
|
|
106
|
+
attachments: z.array(promptAttachmentSchema).max(16).readonly(),
|
|
109
107
|
})
|
|
110
108
|
.readonly())
|
|
111
109
|
.readonly(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/protocol/session/native/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3G,OAAO,EAAE,sBAAsB,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACH,sCAAsC,EACtC,qCAAqC,GACxC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/protocol/session/native/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3G,OAAO,EAAE,sBAAsB,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACH,sCAAsC,EACtC,qCAAqC,GACxC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,CAAC,MAAM,2BAA2B,GAAG,wBAAwB,CAAC;AACpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAClE,MAAM,CAAC,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAElE,yDAAyD;AACzD,MAAM,CAAC,MAAM,+BAA+B,GAAG,OAA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C,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare const SessionHistoryPolicy: Readonly<{
|
|
|
14
14
|
readonly ExecutionOnly: "execution-only";
|
|
15
15
|
}>;
|
|
16
16
|
export type SessionHistoryPolicy = (typeof SessionHistoryPolicy)[keyof typeof SessionHistoryPolicy];
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const MAX_PROMPT_ATTACHMENT_BYTES: number;
|
|
18
18
|
export interface SessionPromptCommand {
|
|
19
19
|
readonly additionalDirectoryIds: readonly string[];
|
|
20
20
|
readonly agentId: string;
|
|
@@ -22,11 +22,10 @@ export interface SessionPromptCommand {
|
|
|
22
22
|
readonly commandId: string;
|
|
23
23
|
readonly directoryId: string;
|
|
24
24
|
readonly disposition: string;
|
|
25
|
-
readonly
|
|
25
|
+
readonly attachments: readonly PromptAttachment[];
|
|
26
26
|
readonly historyPolicy?: SessionHistoryPolicy;
|
|
27
27
|
readonly kind: typeof SESSION_PROMPT_KIND;
|
|
28
28
|
readonly prompt: string;
|
|
29
|
-
readonly resources: readonly PromptResource[];
|
|
30
29
|
readonly sessionConfigurations?: readonly SessionConfigurationSelection[];
|
|
31
30
|
readonly sessionId: string;
|
|
32
31
|
readonly targetCommandId: string;
|
|
@@ -42,25 +41,20 @@ export interface SessionPromptDispositionCommand {
|
|
|
42
41
|
readonly kind: typeof SESSION_PROMPT_DISPOSITION_KIND;
|
|
43
42
|
readonly sessionId: string;
|
|
44
43
|
}
|
|
45
|
-
export declare const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
export declare const promptAttachmentSchema: z.ZodReadonly<z.ZodObject<{
|
|
45
|
+
byteLength: z.ZodNumber;
|
|
46
|
+
contentKey: z.ZodString;
|
|
47
|
+
kind: z.ZodEnum<{
|
|
48
|
+
image: "image";
|
|
49
|
+
resource: "resource";
|
|
50
|
+
}>;
|
|
52
51
|
mimeType: z.ZodString;
|
|
53
52
|
name: z.ZodString;
|
|
54
|
-
text: z.ZodString;
|
|
55
|
-
type: z.ZodEnum<{
|
|
56
|
-
embedded: "embedded";
|
|
57
|
-
link: "link";
|
|
58
|
-
}>;
|
|
59
53
|
uri: z.ZodString;
|
|
60
54
|
}, z.core.$strip>>;
|
|
61
|
-
export type
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
55
|
+
export type PromptAttachment = z.infer<typeof promptAttachmentSchema>;
|
|
56
|
+
export declare const decodePromptAttachment: (value: unknown) => PromptAttachment;
|
|
57
|
+
export declare const decodePromptAttachmentsValue: (value: unknown) => readonly PromptAttachment[];
|
|
64
58
|
export declare function decodeSessionPromptCommand(encoded: string): SessionPromptCommand;
|
|
65
59
|
export declare function decodeSessionCancelCommand(encoded: string): SessionCancelCommand;
|
|
66
60
|
export declare function decodeSessionPromptDispositionCommand(encoded: string): SessionPromptDispositionCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/protocol/session/prompt/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAG/E,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,+BAA+B,+BAA+B,CAAC;AAC5E,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,eAAO,MAAM,wBAAwB;;;;EAInC,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,oBAAoB;oBACtB,OAAO;4BACC,gBAAgB;EACxB,CAAC;AAEZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAGpG,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/protocol/session/promp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,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,+BAA+B;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,OAAO,wBAAwB,CAAC,KAAK,CAAC;IAC5D,QAAQ,CAAC,IAAI,EAAE,OAAO,+BAA+B,CAAC;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;kBASpB,CAAC;AAEhB,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB,UAAW,OAAO,KAAG,gBACP,CAAC;AAClD,eAAO,MAAM,4BAA4B,UAAW,OAAO,KAAG,SAAS,gBAAgB,EACV,CAAC;AAgB9E,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAsDhF;AAUD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAShF;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,MAAM,GAAG,+BAA+B,CAYtG;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAUhF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAEhF;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,+BAA+B,GAAG,MAAM,CAEtG"}
|
|
@@ -16,25 +16,19 @@ export const SessionHistoryPolicy = Object.freeze({
|
|
|
16
16
|
ExecutionOnly: "execution-only",
|
|
17
17
|
});
|
|
18
18
|
const MAX_PROMPT_LENGTH = 100_000;
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
19
|
+
export const MAX_PROMPT_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
20
|
+
export const promptAttachmentSchema = z
|
|
21
21
|
.object({
|
|
22
|
-
|
|
22
|
+
byteLength: z.number().int().positive().max(MAX_PROMPT_ATTACHMENT_BYTES),
|
|
23
|
+
contentKey: z.string().regex(/^[a-f0-9]{64}$/u),
|
|
24
|
+
kind: z.enum(["image", "resource"]),
|
|
23
25
|
mimeType: z.string().min(1).max(255),
|
|
24
26
|
name: z.string().min(1).max(500),
|
|
25
|
-
})
|
|
26
|
-
.readonly();
|
|
27
|
-
export const promptResourceSchema = z
|
|
28
|
-
.object({
|
|
29
|
-
mimeType: z.string().max(255),
|
|
30
|
-
name: z.string().min(1).max(500),
|
|
31
|
-
text: z.string().max(1_000_000),
|
|
32
|
-
type: z.enum(["embedded", "link"]),
|
|
33
27
|
uri: z.string().min(1).max(4_096),
|
|
34
28
|
})
|
|
35
29
|
.readonly();
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
30
|
+
export const decodePromptAttachment = (value) => decodeZodValue(value, promptAttachmentSchema);
|
|
31
|
+
export const decodePromptAttachmentsValue = (value) => decodeZodValue(value, z.array(promptAttachmentSchema).max(16).readonly());
|
|
38
32
|
function readPromptDisposition(value) {
|
|
39
33
|
const field = value["disposition"];
|
|
40
34
|
if (field === undefined || field === SessionPromptDisposition.Reject) {
|
|
@@ -53,14 +47,14 @@ export function decodeSessionPromptCommand(encoded) {
|
|
|
53
47
|
const hasSessionConfigurations = Object.hasOwn(value, "sessionConfigurations");
|
|
54
48
|
assertKind(value, SESSION_PROMPT_KIND);
|
|
55
49
|
const prompt = readText(value, "prompt", MAX_PROMPT_LENGTH);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (
|
|
50
|
+
const attachments = !Object.hasOwn(value, "attachments") && Array.isArray(value["images"]) && Array.isArray(value["resources"])
|
|
51
|
+
? []
|
|
52
|
+
: decodePromptAttachmentsValue(value["attachments"]);
|
|
53
|
+
const attachmentBytes = attachments.reduce((total, attachment) => total + attachment.byteLength, 0);
|
|
54
|
+
if (attachmentBytes > MAX_PROMPT_ATTACHMENT_BYTES) {
|
|
61
55
|
throw new ProtocolMessageError("Prompt attachments are too large");
|
|
62
56
|
}
|
|
63
|
-
if (prompt.trim().length === 0 &&
|
|
57
|
+
if (prompt.trim().length === 0 && attachments.length === 0) {
|
|
64
58
|
throw new ProtocolMessageError("Prompt must contain content");
|
|
65
59
|
}
|
|
66
60
|
const disposition = readPromptDisposition(value);
|
|
@@ -83,7 +77,7 @@ export function decodeSessionPromptCommand(encoded) {
|
|
|
83
77
|
commandId: readIdentifier(value, "commandId"),
|
|
84
78
|
directoryId: readDirectoryIdentifier(value, "directoryId"),
|
|
85
79
|
disposition,
|
|
86
|
-
|
|
80
|
+
attachments,
|
|
87
81
|
...(value["historyPolicy"] === undefined
|
|
88
82
|
? {}
|
|
89
83
|
: {
|
|
@@ -91,7 +85,6 @@ export function decodeSessionPromptCommand(encoded) {
|
|
|
91
85
|
}),
|
|
92
86
|
kind: SESSION_PROMPT_KIND,
|
|
93
87
|
prompt,
|
|
94
|
-
resources,
|
|
95
88
|
...(hasSessionConfigurations ? { sessionConfigurations } : {}),
|
|
96
89
|
sessionId: readIdentifier(value, "sessionId"),
|
|
97
90
|
targetCommandId,
|
|
@@ -127,7 +120,15 @@ export function decodeSessionPromptDispositionCommand(encoded) {
|
|
|
127
120
|
};
|
|
128
121
|
}
|
|
129
122
|
export function encodeSessionPromptCommand(message) {
|
|
130
|
-
|
|
123
|
+
const command = decodeSessionPromptCommand(JSON.stringify(message));
|
|
124
|
+
return JSON.stringify({
|
|
125
|
+
...command,
|
|
126
|
+
// Keep text prompts compatible with the previous Runtime release while
|
|
127
|
+
// attachments move to the content-key protocol. Older Runtimes ignore
|
|
128
|
+
// `attachments` and require both legacy arrays to be present.
|
|
129
|
+
images: [],
|
|
130
|
+
resources: [],
|
|
131
|
+
});
|
|
131
132
|
}
|
|
132
133
|
export function encodeSessionCancelCommand(message) {
|
|
133
134
|
return JSON.stringify(decodeSessionCancelCommand(JSON.stringify(message)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/protocol/session/prompt/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACH,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,EACd,QAAQ,GACX,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,oCAAoC,EAAE,MAAM,2BAA2B,CAAC;AAEjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AACpD,MAAM,CAAC,MAAM,+BAA+B,GAAG,4BAA4B,CAAC;AAC5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,qFAAqF;AACrF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAIZ,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAClC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../src/protocol/session/prompt/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACH,UAAU,EACV,cAAc,EACd,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,SAAS,EAAE,EAAE;KAChB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAA6B;IACpE,OAAO,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,OAAwC;IAC1F,OAAO,IAAI,CAAC,SAAS,CAAC,qCAAqC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SessionEvent } from "../observability/event-log.ts";
|
|
2
|
+
import type { SessionRecordingStatus } from "./recording.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The last lifecycle observation in these events, for legacy summary and webhook consumers.
|
|
5
|
+
* Missing events and other commands make this unsuitable as a current Session execution status.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lastRecordedLifecycleStatus(events: readonly SessionEvent[]): SessionRecordingStatus | null;
|
|
8
|
+
//# sourceMappingURL=recorded-lifecycle-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorded-lifecycle-status.d.ts","sourceRoot":"","sources":["../../../../src/protocol/session/recording/recorded-lifecycle-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,sBAAsB,GAAG,IAAI,CAqB1G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last lifecycle observation in these events, for legacy summary and webhook consumers.
|
|
3
|
+
* Missing events and other commands make this unsuitable as a current Session execution status.
|
|
4
|
+
*/
|
|
5
|
+
export function lastRecordedLifecycleStatus(events) {
|
|
6
|
+
let status = null;
|
|
7
|
+
for (const event of events) {
|
|
8
|
+
if (event.type !== "lifecycle-metadata") {
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
switch (event.payload.kind) {
|
|
12
|
+
case "prompt.requested":
|
|
13
|
+
case "prompt.started":
|
|
14
|
+
status = "running";
|
|
15
|
+
break;
|
|
16
|
+
case "prompt.completed":
|
|
17
|
+
status = "idle";
|
|
18
|
+
break;
|
|
19
|
+
case "prompt.failed":
|
|
20
|
+
case "prompt.failed-before-start":
|
|
21
|
+
status = "failed";
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return status;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=recorded-lifecycle-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorded-lifecycle-status.js","sourceRoot":"","sources":["../../../../src/protocol/session/recording/recorded-lifecycle-status.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAA+B;IACvE,IAAI,MAAM,GAAkC,IAAI,CAAC;IACjD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;YACtC,SAAS;QACb,CAAC;QACD,QAAQ,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACzB,KAAK,kBAAkB,CAAC;YACxB,KAAK,gBAAgB;gBACjB,MAAM,GAAG,SAAS,CAAC;gBACnB,MAAM;YACV,KAAK,kBAAkB;gBACnB,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACV,KAAK,eAAe,CAAC;YACrB,KAAK,4BAA4B;gBAC7B,MAAM,GAAG,QAAQ,CAAC;gBAClB,MAAM;QACd,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -2623,6 +2623,7 @@ declare const sessionRecordingHistorySchema: z.ZodReadonly<z.ZodObject<{
|
|
|
2623
2623
|
}, z.core.$strip>>], "type">>>;
|
|
2624
2624
|
sessionId: z.ZodString;
|
|
2625
2625
|
}, z.core.$strip>>;
|
|
2626
|
+
/** Legacy lifecycle observations from recorded events; never authoritative execution state. */
|
|
2626
2627
|
export declare const sessionRecordingStatusSchema: z.ZodEnum<{
|
|
2627
2628
|
failed: "failed";
|
|
2628
2629
|
idle: "idle";
|
|
@@ -3943,19 +3944,39 @@ declare const sessionRecordingHistoryPageSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
3943
3944
|
truncated: z.ZodBoolean;
|
|
3944
3945
|
version: z.ZodLiteral<2>;
|
|
3945
3946
|
}, z.core.$strip>>;
|
|
3947
|
+
declare const sessionRecordingSummaryV2Schema: z.ZodReadonly<z.ZodObject<{
|
|
3948
|
+
additionalDirectoryIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
3949
|
+
agentId: z.ZodString;
|
|
3950
|
+
directoryId: z.ZodString;
|
|
3951
|
+
runtimeId: z.ZodString;
|
|
3952
|
+
sessionId: z.ZodString;
|
|
3953
|
+
title: z.ZodString;
|
|
3954
|
+
updatedAt: z.ZodISODateTime;
|
|
3955
|
+
}, z.core.$strip>>;
|
|
3956
|
+
declare const sessionRecordingDirectoryV2Schema: z.ZodReadonly<z.ZodObject<{
|
|
3957
|
+
sessions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
3958
|
+
additionalDirectoryIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
3959
|
+
agentId: z.ZodString;
|
|
3960
|
+
directoryId: z.ZodString;
|
|
3961
|
+
runtimeId: z.ZodString;
|
|
3962
|
+
sessionId: z.ZodString;
|
|
3963
|
+
title: z.ZodString;
|
|
3964
|
+
updatedAt: z.ZodISODateTime;
|
|
3965
|
+
}, z.core.$strip>>>>;
|
|
3966
|
+
}, z.core.$strip>>;
|
|
3946
3967
|
declare const sessionRecordingSummarySchema: z.ZodReadonly<z.ZodObject<{
|
|
3947
3968
|
additionalDirectoryIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
3948
3969
|
agentId: z.ZodString;
|
|
3949
3970
|
directoryId: z.ZodString;
|
|
3950
3971
|
runtimeId: z.ZodString;
|
|
3951
3972
|
sessionId: z.ZodString;
|
|
3973
|
+
title: z.ZodString;
|
|
3974
|
+
updatedAt: z.ZodISODateTime;
|
|
3952
3975
|
status: z.ZodEnum<{
|
|
3953
3976
|
failed: "failed";
|
|
3954
3977
|
idle: "idle";
|
|
3955
3978
|
running: "running";
|
|
3956
3979
|
}>;
|
|
3957
|
-
title: z.ZodString;
|
|
3958
|
-
updatedAt: z.ZodISODateTime;
|
|
3959
3980
|
}, z.core.$strip>>;
|
|
3960
3981
|
declare const sessionRecordingDirectorySchema: z.ZodReadonly<z.ZodObject<{
|
|
3961
3982
|
sessions: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
|
|
@@ -3964,28 +3985,36 @@ declare const sessionRecordingDirectorySchema: z.ZodReadonly<z.ZodObject<{
|
|
|
3964
3985
|
directoryId: z.ZodString;
|
|
3965
3986
|
runtimeId: z.ZodString;
|
|
3966
3987
|
sessionId: z.ZodString;
|
|
3988
|
+
title: z.ZodString;
|
|
3989
|
+
updatedAt: z.ZodISODateTime;
|
|
3967
3990
|
status: z.ZodEnum<{
|
|
3968
3991
|
failed: "failed";
|
|
3969
3992
|
idle: "idle";
|
|
3970
3993
|
running: "running";
|
|
3971
3994
|
}>;
|
|
3972
|
-
title: z.ZodString;
|
|
3973
|
-
updatedAt: z.ZodISODateTime;
|
|
3974
3995
|
}, z.core.$strip>>>>;
|
|
3975
3996
|
}, z.core.$strip>>;
|
|
3976
3997
|
export type SessionRecordingWrite = z.infer<typeof sessionRecordingWriteSchema>;
|
|
3977
3998
|
export type SessionRecordingHistory = z.infer<typeof sessionRecordingHistorySchema>;
|
|
3978
3999
|
export type SessionRecordingHistoryPage = z.infer<typeof sessionRecordingHistoryPageSchema>;
|
|
4000
|
+
/** @deprecated Use SessionRecordingSummaryV2; query the daemon for current execution state. */
|
|
3979
4001
|
export type SessionRecordingSummary = z.infer<typeof sessionRecordingSummarySchema>;
|
|
3980
4002
|
export type SessionRecordingStatus = z.infer<typeof sessionRecordingStatusSchema>;
|
|
4003
|
+
/** @deprecated Use SessionRecordingDirectoryV2 with the V2 Recording summary endpoints. */
|
|
3981
4004
|
export type SessionRecordingDirectory = z.infer<typeof sessionRecordingDirectorySchema>;
|
|
4005
|
+
export type SessionRecordingSummaryV2 = z.infer<typeof sessionRecordingSummaryV2Schema>;
|
|
4006
|
+
export type SessionRecordingDirectoryV2 = z.infer<typeof sessionRecordingDirectoryV2Schema>;
|
|
3982
4007
|
export declare const decodeSessionRecordingWrite: (encoded: string) => SessionRecordingWrite;
|
|
3983
4008
|
export declare const encodeSessionRecordingWrite: (value: SessionRecordingWrite) => string;
|
|
3984
4009
|
export declare const decodeSessionRecordingHistory: (encoded: string) => SessionRecordingHistory;
|
|
3985
4010
|
export declare const encodeSessionRecordingHistory: (value: SessionRecordingHistory) => string;
|
|
3986
4011
|
export declare const decodeSessionRecordingHistoryPage: (encoded: string) => SessionRecordingHistoryPage;
|
|
3987
4012
|
export declare const encodeSessionRecordingHistoryPage: (value: SessionRecordingHistoryPage) => string;
|
|
4013
|
+
/** @deprecated Use decodeSessionRecordingDirectoryV2 with the V2 Recording summary endpoints. */
|
|
3988
4014
|
export declare const decodeSessionRecordingDirectory: (encoded: string) => SessionRecordingDirectory;
|
|
3989
4015
|
export declare const encodeSessionRecordingDirectory: (value: SessionRecordingDirectory) => string;
|
|
4016
|
+
export declare const decodeSessionRecordingSummaryV2: (encoded: string) => SessionRecordingSummaryV2;
|
|
4017
|
+
export declare const decodeSessionRecordingDirectoryV2: (encoded: string) => SessionRecordingDirectoryV2;
|
|
4018
|
+
export declare const encodeSessionRecordingDirectoryV2: (value: SessionRecordingDirectoryV2) => string;
|
|
3990
4019
|
export {};
|
|
3991
4020
|
//# sourceMappingURL=recording.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording.d.ts","sourceRoot":"","sources":["../../../../src/protocol/session/recording/recording.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,8FAA8F;AAC9F,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMlF;AAED,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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2FAA2F;AAC3F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,2BAA2B,YAAa,MAAM,KAAG,qBACd,CAAC;AAEjD,eAAO,MAAM,2BAA2B,UAAW,qBAAqB,KAAG,MAC7B,CAAC;AAE/C,eAAO,MAAM,6BAA6B,YAAa,MAAM,KAAG,uBACd,CAAC;AAEnD,eAAO,MAAM,6BAA6B,UAAW,uBAAuB,KAAG,MAC/B,CAAC;AAEjD,eAAO,MAAM,iCAAiC,YAAa,MAAM,KAAG,2BACd,CAAC;AAEvD,eAAO,MAAM,iCAAiC,UAAW,2BAA2B,KAAG,MACnC,CAAC;AAErD,iGAAiG;AACjG,eAAO,MAAM,+BAA+B,YAAa,MAAM,KAAG,yBACd,CAAC;AAErD,eAAO,MAAM,+BAA+B,UAAW,yBAAyB,KAAG,MACjC,CAAC;AAEnD,eAAO,MAAM,+BAA+B,YAAa,MAAM,KAAG,yBACd,CAAC;AAErD,eAAO,MAAM,iCAAiC,YAAa,MAAM,KAAG,2BACd,CAAC;AAEvD,eAAO,MAAM,iCAAiC,UAAW,2BAA2B,KAAG,MACnC,CAAC"}
|
|
@@ -27,6 +27,7 @@ const sessionRecordingHistorySchema = z
|
|
|
27
27
|
sessionId: identifierStringSchema,
|
|
28
28
|
})
|
|
29
29
|
.readonly();
|
|
30
|
+
/** Legacy lifecycle observations from recorded events; never authoritative execution state. */
|
|
30
31
|
export const sessionRecordingStatusSchema = z.enum(["running", "idle", "failed"]);
|
|
31
32
|
// Recording cursors are opaque append-order tokens. The ordinal locates a recorded batch and the
|
|
32
33
|
// position locates an event inside that batch; event positions alone restart after a Session reload.
|
|
@@ -46,17 +47,22 @@ const sessionRecordingHistoryPageSchema = z
|
|
|
46
47
|
version: z.literal(2),
|
|
47
48
|
})
|
|
48
49
|
.readonly();
|
|
49
|
-
const
|
|
50
|
-
.object({
|
|
50
|
+
const sessionRecordingSummaryFields = {
|
|
51
51
|
additionalDirectoryIds: z.array(DIRECTORY_IDENTIFIER).max(16).readonly(),
|
|
52
52
|
agentId: identifierStringSchema,
|
|
53
53
|
directoryId: DIRECTORY_IDENTIFIER,
|
|
54
54
|
runtimeId: identifierStringSchema,
|
|
55
55
|
sessionId: identifierStringSchema,
|
|
56
|
-
status: sessionRecordingStatusSchema,
|
|
57
56
|
title: z.string().max(1_000),
|
|
58
57
|
updatedAt: z.iso.datetime({ offset: true }),
|
|
59
|
-
}
|
|
58
|
+
};
|
|
59
|
+
const sessionRecordingSummaryV2Schema = z.object(sessionRecordingSummaryFields).readonly();
|
|
60
|
+
const sessionRecordingDirectoryV2Schema = z
|
|
61
|
+
.object({ sessions: z.array(sessionRecordingSummaryV2Schema).max(100_000).readonly() })
|
|
62
|
+
.readonly();
|
|
63
|
+
// Preserve the V1 wire contract for existing SDKs while V2 carries metadata only.
|
|
64
|
+
const sessionRecordingSummarySchema = z
|
|
65
|
+
.object({ ...sessionRecordingSummaryFields, status: sessionRecordingStatusSchema })
|
|
60
66
|
.readonly();
|
|
61
67
|
const sessionRecordingDirectorySchema = z
|
|
62
68
|
.object({
|
|
@@ -69,6 +75,10 @@ export const decodeSessionRecordingHistory = (encoded) => decode(encoded, sessio
|
|
|
69
75
|
export const encodeSessionRecordingHistory = (value) => encode(value, sessionRecordingHistorySchema);
|
|
70
76
|
export const decodeSessionRecordingHistoryPage = (encoded) => decode(encoded, sessionRecordingHistoryPageSchema);
|
|
71
77
|
export const encodeSessionRecordingHistoryPage = (value) => encode(value, sessionRecordingHistoryPageSchema);
|
|
78
|
+
/** @deprecated Use decodeSessionRecordingDirectoryV2 with the V2 Recording summary endpoints. */
|
|
72
79
|
export const decodeSessionRecordingDirectory = (encoded) => decode(encoded, sessionRecordingDirectorySchema);
|
|
73
80
|
export const encodeSessionRecordingDirectory = (value) => encode(value, sessionRecordingDirectorySchema);
|
|
81
|
+
export const decodeSessionRecordingSummaryV2 = (encoded) => decode(encoded, sessionRecordingSummaryV2Schema);
|
|
82
|
+
export const decodeSessionRecordingDirectoryV2 = (encoded) => decode(encoded, sessionRecordingDirectoryV2Schema);
|
|
83
|
+
export const encodeSessionRecordingDirectoryV2 = (value) => encode(value, sessionRecordingDirectoryV2Schema);
|
|
74
84
|
//# sourceMappingURL=recording.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording.js","sourceRoot":"","sources":["../../../../src/protocol/session/recording/recording.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,IAAI,MAAM,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEnG,8FAA8F;AAC9F,MAAM,UAAU,qCAAqC,CAAC,KAAa;IAC/D,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,YAAY,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC;AAED,MAAM,2BAA2B,GAAG,CAAC;KAChC,MAAM,CAAC;IACJ,QAAQ,EAAE,0BAA0B;IACpC,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,sBAAsB;CACpC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,GAAG,CAAC,OAAe,EAA6B,EAAE,CAC1F,MAAM,CAAC,OAAO,EAAE,+BAA+B,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,OAAe,EAA+B,EAAE,CAC9F,MAAM,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC;AAEvD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAkC,EAAU,EAAE,CAC5F,MAAM,CAAC,KAAK,EAAE,iCAAiC,CAAC,CAAC"}
|
|
@@ -36,6 +36,21 @@ declare const serviceToDaemonSignatures: {
|
|
|
36
36
|
sessionId: string;
|
|
37
37
|
path: string;
|
|
38
38
|
}>>;
|
|
39
|
+
readonly "content.write": MessageSignature<Readonly<{
|
|
40
|
+
byteLength: number;
|
|
41
|
+
contentKey: string;
|
|
42
|
+
contentKind: "image" | "resource";
|
|
43
|
+
kind: "content.write";
|
|
44
|
+
mediaType: string;
|
|
45
|
+
name: string;
|
|
46
|
+
requestId: string;
|
|
47
|
+
sessionId: string;
|
|
48
|
+
}>>;
|
|
49
|
+
readonly "content.commit": MessageSignature<Readonly<{
|
|
50
|
+
kind: "content.commit";
|
|
51
|
+
requestId: string;
|
|
52
|
+
sessionId: string;
|
|
53
|
+
}>>;
|
|
39
54
|
readonly "session.list": MessageSignature<Readonly<{
|
|
40
55
|
kind: "session.list";
|
|
41
56
|
limit: number;
|
|
@@ -119,6 +134,7 @@ declare const serviceToDaemonSignatures: {
|
|
|
119
134
|
sessionId: string;
|
|
120
135
|
booleanValue: boolean;
|
|
121
136
|
configId: string;
|
|
137
|
+
expectedConfigurationRevision?: string | undefined;
|
|
122
138
|
kind: "session.configure";
|
|
123
139
|
requestId: string;
|
|
124
140
|
value: string;
|
|
@@ -1329,6 +1345,7 @@ declare const daemonToServiceSignatures: {
|
|
|
1329
1345
|
value: string;
|
|
1330
1346
|
}>[];
|
|
1331
1347
|
}>[];
|
|
1348
|
+
configurationRevision?: string | undefined;
|
|
1332
1349
|
kind: "session.config.updated";
|
|
1333
1350
|
requestId: string;
|
|
1334
1351
|
sessionId: string;
|
|
@@ -1350,6 +1367,7 @@ declare const daemonToServiceSignatures: {
|
|
|
1350
1367
|
value: string;
|
|
1351
1368
|
}>[];
|
|
1352
1369
|
}>[];
|
|
1370
|
+
configurationRevision?: string | undefined;
|
|
1353
1371
|
kind: "session.config.read.result";
|
|
1354
1372
|
requestId: string;
|
|
1355
1373
|
sessionId: string;
|
|
@@ -1428,13 +1446,6 @@ declare const daemonToServiceSignatures: {
|
|
|
1428
1446
|
requestId: string;
|
|
1429
1447
|
sessionId: string;
|
|
1430
1448
|
}>>;
|
|
1431
|
-
readonly "file.chunk": MessageSignature<Readonly<{
|
|
1432
|
-
data: string;
|
|
1433
|
-
kind: "file.chunk";
|
|
1434
|
-
requestId: string;
|
|
1435
|
-
sequence: number;
|
|
1436
|
-
sessionId: string;
|
|
1437
|
-
}>>;
|
|
1438
1449
|
readonly "file.end": MessageSignature<Readonly<{
|
|
1439
1450
|
kind: "file.end";
|
|
1440
1451
|
requestId: string;
|
|
@@ -1447,6 +1458,18 @@ declare const daemonToServiceSignatures: {
|
|
|
1447
1458
|
requestId: string;
|
|
1448
1459
|
sessionId: string;
|
|
1449
1460
|
}>>;
|
|
1461
|
+
readonly "content.ready": MessageSignature<Readonly<{
|
|
1462
|
+
kind: "content.ready";
|
|
1463
|
+
requestId: string;
|
|
1464
|
+
sessionId: string;
|
|
1465
|
+
}>>;
|
|
1466
|
+
readonly "content.available": MessageSignature<Readonly<{
|
|
1467
|
+
byteLength: number;
|
|
1468
|
+
contentKey: string;
|
|
1469
|
+
kind: "content.available";
|
|
1470
|
+
requestId: string;
|
|
1471
|
+
sessionId: string;
|
|
1472
|
+
}>>;
|
|
1450
1473
|
readonly "session.listed": MessageSignature<Readonly<{
|
|
1451
1474
|
entries: readonly Readonly<{
|
|
1452
1475
|
additionalDirectories: readonly Readonly<{
|
|
@@ -1558,6 +1581,7 @@ declare const daemonToServiceSignatures: {
|
|
|
1558
1581
|
value: string;
|
|
1559
1582
|
}>[];
|
|
1560
1583
|
}>[];
|
|
1584
|
+
configurationRevision?: string | undefined;
|
|
1561
1585
|
directoryId: string;
|
|
1562
1586
|
directoryLabel: string;
|
|
1563
1587
|
kind: "session.ready";
|
|
@@ -1597,18 +1621,14 @@ declare const daemonToServiceSignatures: {
|
|
|
1597
1621
|
queued: readonly Readonly<{
|
|
1598
1622
|
commandId: string;
|
|
1599
1623
|
prompt: string;
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
}>[];
|
|
1605
|
-
resources?: readonly Readonly<{
|
|
1624
|
+
attachments: readonly Readonly<{
|
|
1625
|
+
byteLength: number;
|
|
1626
|
+
contentKey: string;
|
|
1627
|
+
kind: "image" | "resource";
|
|
1606
1628
|
mimeType: string;
|
|
1607
1629
|
name: string;
|
|
1608
|
-
text: string;
|
|
1609
|
-
type: "embedded" | "link";
|
|
1610
1630
|
uri: string;
|
|
1611
|
-
}>[]
|
|
1631
|
+
}>[];
|
|
1612
1632
|
}>[];
|
|
1613
1633
|
turn: Readonly<{
|
|
1614
1634
|
commandId: string;
|
|
@@ -1773,6 +1793,7 @@ declare const daemonToServiceSignatures: {
|
|
|
1773
1793
|
value: string;
|
|
1774
1794
|
}>[];
|
|
1775
1795
|
}>[];
|
|
1796
|
+
configurationRevision?: string | undefined;
|
|
1776
1797
|
directoryId: string;
|
|
1777
1798
|
directoryLabel: string;
|
|
1778
1799
|
kind: "session.ready";
|
|
@@ -3998,6 +4019,7 @@ declare const daemonToServiceSignatures: {
|
|
|
3998
4019
|
value: string;
|
|
3999
4020
|
}>[];
|
|
4000
4021
|
}>[];
|
|
4022
|
+
configurationRevision?: string | undefined;
|
|
4001
4023
|
directoryId: string;
|
|
4002
4024
|
directoryLabel: string;
|
|
4003
4025
|
kind: "session.ready";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-transport.d.ts","sourceRoot":"","sources":["../../../src/protocol/transport/daemon-transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daemon-transport.d.ts","sourceRoot":"","sources":["../../../src/protocol/transport/daemon-transport.ts"],"names":[],"mappings":"AAqMA,UAAU,gBAAgB,CAAC,QAAQ,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;IACjE,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,QAAQ,CAAC;CACnD;AAgBD,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HrB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC3C,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC,SAAS,CAAC,CACxF,CAAC;AAKF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAOpF;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAEpF;AAED,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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