@saturn-universe/protocol 0.1.2-dev.6 → 0.1.2-dev.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/host-results.d.ts +10 -0
- package/dist/host-results.js +6 -1
- package/dist/host-status.d.ts +6 -1
- package/dist/host-status.js +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +7 -0
- package/dist/session-results.d.ts +2 -1
- package/dist/session-results.js +1 -0
- package/package.json +2 -2
package/dist/host-results.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface HostCommandResults {
|
|
|
23
23
|
readonly 'team.query': TeamQueryResult;
|
|
24
24
|
readonly 'team.inbox': TeamInboxResult;
|
|
25
25
|
readonly 'session.query': SessionSummary;
|
|
26
|
+
readonly 'session.mode.select': Readonly<z.output<typeof sessionModeSelection>>;
|
|
26
27
|
readonly 'session.btw': Readonly<z.output<typeof sideQuestion>>;
|
|
27
28
|
readonly 'session.usage': SessionUsageResult;
|
|
28
29
|
readonly 'session.history': SessionHistoryPage;
|
|
@@ -56,6 +57,15 @@ declare const sessionCreation: z.ZodObject<{
|
|
|
56
57
|
sessionId: z.ZodCustom<import("@saturn-universe/core").SessionId, import("@saturn-universe/core").SessionId>;
|
|
57
58
|
cursor: z.ZodOptional<z.ZodPipe<z.ZodCustom<string, string>, z.ZodTransform<EventPosition, string>>>;
|
|
58
59
|
}, z.core.$strip>;
|
|
60
|
+
declare const sessionModeSelection: z.ZodObject<{
|
|
61
|
+
sessionId: z.ZodCustom<import("@saturn-universe/core").SessionId, import("@saturn-universe/core").SessionId>;
|
|
62
|
+
mode: z.ZodObject<{
|
|
63
|
+
ref: z.ZodString;
|
|
64
|
+
displayName: z.ZodString;
|
|
65
|
+
description: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
cursor: z.ZodPipe<z.ZodCustom<string, string>, z.ZodTransform<EventPosition, string>>;
|
|
68
|
+
}, z.core.$strip>;
|
|
59
69
|
declare const runSubmission: z.ZodObject<{
|
|
60
70
|
runId: z.ZodCustom<RunId, RunId>;
|
|
61
71
|
turnId: z.ZodCustom<TurnId, TurnId>;
|
package/dist/host-results.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_SESSION_LIST_LIMIT } from '@saturn-universe/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { validContextQueryResult, validSurfaceQueryResult } from './diagnostic-results.js';
|
|
4
|
-
import { parseHostStatusResult } from './host-status.js';
|
|
4
|
+
import { modeSummary, parseHostStatusResult } from './host-status.js';
|
|
5
5
|
import { parseRunProgressResult, validRunTimelineResult } from './run-event-results.js';
|
|
6
6
|
import { validRunQueryResult } from './run-query-result.js';
|
|
7
7
|
import { parseSessionExportResult, parseSessionListResult, parseSessionSummaryResult, parseSessionUsageResult, validSessionHistoryResult, } from './session-results.js';
|
|
@@ -14,6 +14,7 @@ const workspaceList = z.array(z.object({ id: workspaceId }));
|
|
|
14
14
|
const cursor = eventPosition.optional();
|
|
15
15
|
const workspaceCreation = z.object({ workspaceId, cursor });
|
|
16
16
|
const sessionCreation = z.object({ sessionId: z.custom(hasIdentifier), cursor });
|
|
17
|
+
const sessionModeSelection = sessionCreation.extend({ mode: modeSummary, cursor: eventPosition });
|
|
17
18
|
const runId = z.custom(hasIdentifier);
|
|
18
19
|
const runSubmission = z.object({ runId, turnId: z.custom(hasIdentifier), cursor });
|
|
19
20
|
const runResume = z.object({ runId, cursor: eventPosition });
|
|
@@ -67,6 +68,10 @@ export function validHostCommandResult(command, result) {
|
|
|
67
68
|
return validTeamInboxResult(command, result);
|
|
68
69
|
case 'session.query':
|
|
69
70
|
return parseSessionSummaryResult(result, command.sessionId) !== undefined;
|
|
71
|
+
case 'session.mode.select': {
|
|
72
|
+
const receipt = sessionModeSelection.safeParse(result);
|
|
73
|
+
return receipt.success && receipt.data.sessionId === command.sessionId;
|
|
74
|
+
}
|
|
70
75
|
case 'session.btw':
|
|
71
76
|
return sideQuestion.safeParse(result).success;
|
|
72
77
|
case 'session.usage':
|
package/dist/host-status.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface HostMcpServerSummary {
|
|
|
25
25
|
readonly toolCount: number;
|
|
26
26
|
readonly error?: string;
|
|
27
27
|
}
|
|
28
|
-
interface HostStatusFields extends HostModelDisplay {
|
|
28
|
+
export interface HostStatusFields extends HostModelDisplay {
|
|
29
29
|
readonly epoch: number;
|
|
30
30
|
readonly cursor: string;
|
|
31
31
|
readonly configSource?: string;
|
|
@@ -51,6 +51,11 @@ interface HostStatusFields extends HostModelDisplay {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
export type HostStatusSnapshot = HostStatusFields & Readonly<Record<string, unknown>>;
|
|
54
|
+
export declare const modeSummary: z.ZodObject<{
|
|
55
|
+
ref: z.ZodString;
|
|
56
|
+
displayName: z.ZodString;
|
|
57
|
+
description: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
54
59
|
declare const hostStatus: z.ZodObject<{
|
|
55
60
|
profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
61
|
defaultReasoningEffort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/host-status.js
CHANGED
|
@@ -8,7 +8,7 @@ const modelDisplay = {
|
|
|
8
8
|
reasoningEfforts: strings.optional(),
|
|
9
9
|
contextWindow: z.number().optional(),
|
|
10
10
|
};
|
|
11
|
-
const modeSummary = z.object({
|
|
11
|
+
export const modeSummary = z.object({
|
|
12
12
|
ref: z.string().regex(contextExtensionRefPattern),
|
|
13
13
|
displayName: z.string(),
|
|
14
14
|
description: z.string(),
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { RunQueryResult } from './run-query-result.js';
|
|
|
9
9
|
export { parseHostStatusResult } from './host-status.js';
|
|
10
10
|
export { validHostCommandResult, type HostCommandResults } from './host-results.js';
|
|
11
11
|
export type { TeamInboxResult, TeamQueryResult } from './team-results.js';
|
|
12
|
-
export type { HostMcpServerSummary, HostProfileSummary, HostStatusSnapshot } from './host-status.js';
|
|
12
|
+
export type { HostMcpServerSummary, HostProfileSummary, HostStatusFields, HostStatusSnapshot, } from './host-status.js';
|
|
13
13
|
export type { ModelDisplay } from './wire-shapes.js';
|
|
14
14
|
export * from './endpoint.js';
|
|
15
15
|
export type { AgentContextMetrics, BranchWorkspaceHandleLike, HostSandboxStatus, LiveAgentTelemetry, ModeSummary, PermissionMode, PlannerConfig, ProtocolReply, ProtocolRequest, RunCompletionContext, RunCompletionDecision, RunCompletionDecisionKind, RunContinuationConfig, RunProgressApproval, RunProgressLiveAgent, RunProgressPage, RunTimelinePage, RuntimeCommand, SandboxBackendKind, SandboxConfig, SandboxFallbackPolicy, SandboxNetworkMode, SandboxReadonlyMount, SandboxResourceLimits, SandboxRetentionMode, SandboxRetentionPolicy, SandboxScopeKind, SearchBranchState, SearchHypothesisSeed, SearchTreeState, SearchWorkspaceKind, SessionDetails, SessionExportPage, SessionExportRecord, SessionHistoryMessage, SessionHistoryPage, SessionListItem, SessionUsageBucket, SessionUsageCounts, TeamHintConfig, TeamPlanState, TeamState, TerminalRunStatus, TodoItem, TodoStatus, TreeSearchConfig, TreeSearchTrigger, WorkerSandboxProfile, WorkspaceSnapshotPort, } from '@saturn-universe/core';
|
|
@@ -89,6 +89,10 @@ declare const commandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
89
89
|
}, z.core.$strict>, z.ZodObject<{
|
|
90
90
|
type: z.ZodLiteral<"session.query">;
|
|
91
91
|
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
92
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"session.mode.select">;
|
|
94
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
95
|
+
modeRef: z.ZodString;
|
|
92
96
|
}, z.core.$strict>, z.ZodObject<{
|
|
93
97
|
type: z.ZodLiteral<"session.btw">;
|
|
94
98
|
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
@@ -217,6 +221,7 @@ declare const commandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
217
221
|
build: "build";
|
|
218
222
|
}>>;
|
|
219
223
|
workSubpath: z.ZodOptional<z.ZodString>;
|
|
224
|
+
modeRef: z.ZodOptional<z.ZodString>;
|
|
220
225
|
}, z.core.$strict>>;
|
|
221
226
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
222
227
|
}, z.core.$strict>>>;
|
|
@@ -226,6 +231,7 @@ declare const commandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
226
231
|
coordinatorPollIntervalMs: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
227
232
|
workerSoftCheckpointMs: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
228
233
|
teamMaxActiveDepth1: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
234
|
+
teamDefaultConcurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
229
235
|
teamMaxConcurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
230
236
|
teamHint: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
231
237
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -469,6 +475,10 @@ declare const requestSchema: z.ZodObject<{
|
|
|
469
475
|
}, z.core.$strict>, z.ZodObject<{
|
|
470
476
|
type: z.ZodLiteral<"session.query">;
|
|
471
477
|
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
478
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
479
|
+
type: z.ZodLiteral<"session.mode.select">;
|
|
480
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
481
|
+
modeRef: z.ZodString;
|
|
472
482
|
}, z.core.$strict>, z.ZodObject<{
|
|
473
483
|
type: z.ZodLiteral<"session.btw">;
|
|
474
484
|
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<Id<"session">, string>>;
|
|
@@ -597,6 +607,7 @@ declare const requestSchema: z.ZodObject<{
|
|
|
597
607
|
build: "build";
|
|
598
608
|
}>>;
|
|
599
609
|
workSubpath: z.ZodOptional<z.ZodString>;
|
|
610
|
+
modeRef: z.ZodOptional<z.ZodString>;
|
|
600
611
|
}, z.core.$strict>>;
|
|
601
612
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
602
613
|
}, z.core.$strict>>>;
|
|
@@ -606,6 +617,7 @@ declare const requestSchema: z.ZodObject<{
|
|
|
606
617
|
coordinatorPollIntervalMs: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
607
618
|
workerSoftCheckpointMs: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
608
619
|
teamMaxActiveDepth1: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
620
|
+
teamDefaultConcurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
609
621
|
teamMaxConcurrency: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
610
622
|
teamHint: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
611
623
|
force: z.ZodOptional<z.ZodBoolean>;
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ const team = z.strictObject({
|
|
|
36
36
|
task: z.string(),
|
|
37
37
|
sandboxProfile: z.enum(['default', 'readonly', 'build']).optional(),
|
|
38
38
|
workSubpath: z.string().optional(),
|
|
39
|
+
modeRef: id.optional(),
|
|
39
40
|
})),
|
|
40
41
|
concurrency: positive.optional(),
|
|
41
42
|
});
|
|
@@ -104,6 +105,7 @@ const config = z.strictObject({
|
|
|
104
105
|
coordinatorPollIntervalMs: nonnegative.optional(),
|
|
105
106
|
workerSoftCheckpointMs: nonnegative.optional(),
|
|
106
107
|
teamMaxActiveDepth1: positive.optional(),
|
|
108
|
+
teamDefaultConcurrency: positive.optional(),
|
|
107
109
|
teamMaxConcurrency: positive.optional(),
|
|
108
110
|
teamHint: teamHint.optional(),
|
|
109
111
|
planner: planner.optional(),
|
|
@@ -181,6 +183,11 @@ const commandSchema = z.discriminatedUnion('type', [
|
|
|
181
183
|
}),
|
|
182
184
|
z.strictObject({ type: z.literal('workspace.query') }),
|
|
183
185
|
z.strictObject({ type: z.literal('session.query'), sessionId: brandedId() }),
|
|
186
|
+
z.strictObject({
|
|
187
|
+
type: z.literal('session.mode.select'),
|
|
188
|
+
sessionId: brandedId(),
|
|
189
|
+
modeRef: z.string().trim().min(1).max(129),
|
|
190
|
+
}),
|
|
184
191
|
z.strictObject({
|
|
185
192
|
type: z.literal('session.btw'),
|
|
186
193
|
sessionId: brandedId(),
|
|
@@ -8,7 +8,7 @@ export type SessionSummary = {
|
|
|
8
8
|
readonly ordinal: number;
|
|
9
9
|
readonly status: string;
|
|
10
10
|
};
|
|
11
|
-
} & Partial<Pick<SessionDetails, 'member' | 'runCount' | 'turnCount' | 'stepCount' | 'cursor' | 'latestRun' | 'todos'>>;
|
|
11
|
+
} & Partial<Pick<SessionDetails, 'member' | 'runCount' | 'turnCount' | 'stepCount' | 'cursor' | 'latestRun' | 'todos' | 'modeRef'>>;
|
|
12
12
|
export interface SessionUsageReport extends SessionUsageSummary {
|
|
13
13
|
readonly modelId?: string;
|
|
14
14
|
readonly contextWindow?: number;
|
|
@@ -73,6 +73,7 @@ export declare function parseSessionUsageResult(value: unknown): SessionUsageRes
|
|
|
73
73
|
declare const sessionSummary: z.ZodObject<{
|
|
74
74
|
id: z.ZodString;
|
|
75
75
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
modeRef: z.ZodOptional<z.ZodString>;
|
|
76
77
|
member: z.ZodOptional<z.ZodObject<{
|
|
77
78
|
id: z.ZodString;
|
|
78
79
|
agentSessionId: z.ZodString;
|
package/dist/session-results.js
CHANGED
|
@@ -33,6 +33,7 @@ export function parseSessionUsageResult(value) {
|
|
|
33
33
|
const sessionSummary = z.object({
|
|
34
34
|
id,
|
|
35
35
|
workspaceId: id.optional(),
|
|
36
|
+
modeRef: id.optional(),
|
|
36
37
|
member: z.object({ id, agentSessionId: id, parentSessionId: id }).optional(),
|
|
37
38
|
runCount: count.optional(),
|
|
38
39
|
turnCount: count.optional(),
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saturn-universe/protocol",
|
|
3
|
-
"version": "0.1.2-dev.
|
|
3
|
+
"version": "0.1.2-dev.8",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@saturn-universe/core": "0.1.2-dev.
|
|
10
|
+
"@saturn-universe/core": "0.1.2-dev.8",
|
|
11
11
|
"smol-toml": "1.9.1",
|
|
12
12
|
"zod": "4.6.0"
|
|
13
13
|
},
|