@nuvin/session 0.2.0-rc.9 → 0.2.1-rc.0
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/{chunk-HJLRL64D.js → chunk-4UBSHJWS.js} +3 -1
- package/dist/{chunk-TUNCGICQ.js → chunk-5XT7AOI2.js} +1 -1
- package/dist/{chunk-KQHHBUVY.js → chunk-B6S3CWQX.js} +109 -6
- package/dist/{chunk-O3UBTUIO.js → chunk-FAYWOY6R.js} +1 -1
- package/dist/client/daemon-client.d.ts.map +1 -1
- package/dist/client/data-client.d.ts +28 -1
- package/dist/client/data-client.d.ts.map +1 -1
- package/dist/client/http-data-client.d.ts.map +1 -1
- package/dist/client/index.js +175 -74
- package/dist/client/session-client.d.ts +41 -9
- package/dist/client/session-client.d.ts.map +1 -1
- package/dist/controller/index.js +9 -4
- package/dist/controller/session-controller.d.ts +5 -2
- package/dist/controller/session-controller.d.ts.map +1 -1
- package/dist/grant/index.js +2 -2
- package/dist/protocol/data-rpc.d.ts +52 -1
- package/dist/protocol/data-rpc.d.ts.map +1 -1
- package/dist/protocol/index.js +4 -2
- package/dist/protocol/types.d.ts +250 -52
- package/dist/protocol/types.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +1 -1
- package/dist/state/file-edit-preview.d.ts +47 -0
- package/dist/state/file-edit-preview.d.ts.map +1 -0
- package/dist/state/index.js +3 -1
- package/dist/state/messages.d.ts +20 -0
- package/dist/state/messages.d.ts.map +1 -1
- package/dist/state/tool-preview.d.ts +3 -0
- package/dist/state/tool-preview.d.ts.map +1 -1
- package/dist/state/tool-preview.js +192 -63
- package/dist/test-utils/index.js +3 -3
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-client.d.ts","sourceRoot":"","sources":["../../src/client/session-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAEtF,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EAEtB,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,eAAe,EACf,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"session-client.d.ts","sourceRoot":"","sources":["../../src/client/session-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAEtF,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EAEtB,aAAa,EACb,WAAW,EACX,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EAEtB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,IAAI,gBAAgB,CAAC;IAC7B,MAAM,IAAI,MAAM,CAAC;IACjB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5C,6EAA6E;IAC7E,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC5D,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAA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qEAAqE;IACrE,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC/E,uEAAuE;IACvE,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAChD;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACjD;;;OAGG;IACH,yBAAyB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;OAGG;IACH,YAAY,IAAI,SAAS,eAAe,EAAE,CAAC;IAC3C;;;;OAIG;IACH,oBAAoB,CAAC,UAAU,EAAE,sBAAsB,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvF;;;OAGG;IACH,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAE1C,QAAQ,CAAC,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;CAKlB;AAkGD,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,CA2V7E"}
|
package/dist/controller/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isToolAutoApprovedForMode,
|
|
9
9
|
reduceSessionEvent,
|
|
10
10
|
scopedToolKey
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-B6S3CWQX.js";
|
|
12
12
|
|
|
13
13
|
// src/controller/agent-channel.ts
|
|
14
14
|
import { EventEmitter } from "events";
|
|
@@ -742,19 +742,24 @@ function createSessionController(deps) {
|
|
|
742
742
|
publishWorkflowProgress(runId, delta) {
|
|
743
743
|
emit({ type: "workflow-progress", runId, delta });
|
|
744
744
|
},
|
|
745
|
-
reset() {
|
|
745
|
+
reset(options = {}) {
|
|
746
746
|
if (persistenceInFlight.size > 0) {
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
749
|
queue.length = 0;
|
|
750
|
-
hostBusyCount = 0;
|
|
750
|
+
if (options.preserveHostBusy !== true) hostBusyCount = 0;
|
|
751
751
|
abortController?.abort(new Error("Session reset."));
|
|
752
752
|
rejectAllPending("Session reset; pending interactions were cancelled.");
|
|
753
753
|
alwaysApproved.clear();
|
|
754
754
|
approvalMode = "readOnly";
|
|
755
755
|
emit({
|
|
756
756
|
type: "state-reset",
|
|
757
|
-
state: {
|
|
757
|
+
state: {
|
|
758
|
+
...createSessionViewState(),
|
|
759
|
+
busy: hostBusyCount > 0,
|
|
760
|
+
meta: state.meta,
|
|
761
|
+
mcp: state.mcp
|
|
762
|
+
}
|
|
758
763
|
});
|
|
759
764
|
},
|
|
760
765
|
setApprovalMode(mode) {
|
|
@@ -152,9 +152,12 @@ export interface SessionController {
|
|
|
152
152
|
* a state-reset with a fresh view state CARRYING OVER the last published
|
|
153
153
|
* meta and authoritative MCP state. Runtime-side resets
|
|
154
154
|
* (sessionStore.startNewSession, agent system prompt, metrics) are the HOST's
|
|
155
|
-
* job — it calls those, then this.
|
|
155
|
+
* job — it calls those, then this. A host that already owns busy state may
|
|
156
|
+
* preserve that gate until its reset boundary has fully settled.
|
|
156
157
|
*/
|
|
157
|
-
reset(
|
|
158
|
+
reset(options?: Readonly<{
|
|
159
|
+
preserveHostBusy?: boolean;
|
|
160
|
+
}>): void;
|
|
158
161
|
setApprovalMode(mode: SessionApprovalMode): void;
|
|
159
162
|
setBusy(busy: boolean): void;
|
|
160
163
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-controller.d.ts","sourceRoot":"","sources":["../../src/controller/session-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EAEnB,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O,GAAG,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAiBD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,GAAG,iBAAiB,CAk6BtF"}
|
package/dist/grant/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigMutationResult, HistoryPage, ListHistoryParams, ListHistoryWorkspacesParams, ListHistoryWorkspacesResult, ListWorkspaceHistoryParams, PersistenceIdentity, ProfileSummary, ProviderConfigSummary, ProviderCredentialInput, ProviderSurfaceId, SessionSnapshot, WorkspaceConfigSummary, WorkspaceHistoryPage } from "./types.ts";
|
|
1
|
+
import type { AgentModelSetsView, AgentModelTierMappings, ConfigMutationResult, HistoryPage, ListHistoryParams, ListHistoryWorkspacesParams, ListHistoryWorkspacesResult, ListWorkspaceHistoryParams, PersistenceIdentity, ProfileSummary, ProviderConfigSummary, ProviderCredentialInput, ProviderSurfaceId, SessionSnapshot, WorkspaceConfigSummary, WorkspaceHistoryPage } from "./types.ts";
|
|
2
2
|
export type DataRpcErrorCode = "invalid-input" | "not-found" | "conflict" | "unsupported" | "unauthorized" | "daemon-offline" | "transcript-unavailable" | "transcript-corrupt" | "history-state-conflict" | "ambiguous-session-identity" | "invalid-history-cursor" | "internal";
|
|
3
3
|
export type DataRpcError = {
|
|
4
4
|
code: DataRpcErrorCode;
|
|
@@ -9,6 +9,8 @@ export type ProfileScope = {
|
|
|
9
9
|
};
|
|
10
10
|
export type AddProviderInput = ProfileScope & {
|
|
11
11
|
name: string;
|
|
12
|
+
/** Canonical built-in provider this entry instances (alias support). */
|
|
13
|
+
providerId?: string;
|
|
12
14
|
surface: ProviderSurfaceId;
|
|
13
15
|
baseUrl?: string;
|
|
14
16
|
defaultModel?: string;
|
|
@@ -81,6 +83,7 @@ export type DataRpcSchema = {
|
|
|
81
83
|
result: ConfigMutationResult<ProviderConfigSummary>;
|
|
82
84
|
};
|
|
83
85
|
"remove-provider": {
|
|
86
|
+
/** `providerId` names the configured provider ENTRY (alias), not the canonical built-in id. */
|
|
84
87
|
params: {
|
|
85
88
|
providerId: string;
|
|
86
89
|
profile?: string;
|
|
@@ -88,6 +91,7 @@ export type DataRpcSchema = {
|
|
|
88
91
|
result: ConfigMutationResult<null>;
|
|
89
92
|
};
|
|
90
93
|
"set-default-provider": {
|
|
94
|
+
/** `providerId` names the configured provider ENTRY (alias), not the canonical built-in id. */
|
|
91
95
|
params: {
|
|
92
96
|
providerId: string;
|
|
93
97
|
profile?: string;
|
|
@@ -95,6 +99,7 @@ export type DataRpcSchema = {
|
|
|
95
99
|
result: ConfigMutationResult<null>;
|
|
96
100
|
};
|
|
97
101
|
"set-provider-auth": {
|
|
102
|
+
/** `providerId` names the configured provider ENTRY (alias), not the canonical built-in id. */
|
|
98
103
|
params: {
|
|
99
104
|
providerId: string;
|
|
100
105
|
credential: ProviderCredentialInput;
|
|
@@ -103,6 +108,7 @@ export type DataRpcSchema = {
|
|
|
103
108
|
result: ConfigMutationResult<null>;
|
|
104
109
|
};
|
|
105
110
|
"clear-provider-auth": {
|
|
111
|
+
/** `providerId` names the configured provider ENTRY (alias), not the canonical built-in id. */
|
|
106
112
|
params: {
|
|
107
113
|
providerId: string;
|
|
108
114
|
profile?: string;
|
|
@@ -115,6 +121,51 @@ export type DataRpcSchema = {
|
|
|
115
121
|
};
|
|
116
122
|
result: ConfigMutationResult<WorkspaceConfigSummary>;
|
|
117
123
|
};
|
|
124
|
+
"list-agent-model-sets": {
|
|
125
|
+
params: {
|
|
126
|
+
profile: string;
|
|
127
|
+
workspace?: string;
|
|
128
|
+
};
|
|
129
|
+
result: AgentModelSetsView;
|
|
130
|
+
};
|
|
131
|
+
"create-agent-model-set": {
|
|
132
|
+
params: {
|
|
133
|
+
profile: string;
|
|
134
|
+
name: string;
|
|
135
|
+
mappings: AgentModelTierMappings;
|
|
136
|
+
};
|
|
137
|
+
result: ConfigMutationResult<null>;
|
|
138
|
+
};
|
|
139
|
+
"replace-agent-model-set": {
|
|
140
|
+
params: {
|
|
141
|
+
profile: string;
|
|
142
|
+
name: string;
|
|
143
|
+
mappings: AgentModelTierMappings;
|
|
144
|
+
};
|
|
145
|
+
result: ConfigMutationResult<null>;
|
|
146
|
+
};
|
|
147
|
+
"delete-agent-model-set": {
|
|
148
|
+
params: {
|
|
149
|
+
profile: string;
|
|
150
|
+
name: string;
|
|
151
|
+
};
|
|
152
|
+
result: ConfigMutationResult<null>;
|
|
153
|
+
};
|
|
154
|
+
"set-default-agent-model-set": {
|
|
155
|
+
params: {
|
|
156
|
+
profile: string;
|
|
157
|
+
name?: string;
|
|
158
|
+
};
|
|
159
|
+
result: ConfigMutationResult<null>;
|
|
160
|
+
};
|
|
161
|
+
"set-workspace-agent-model-set": {
|
|
162
|
+
params: {
|
|
163
|
+
profile: string;
|
|
164
|
+
workspace: string;
|
|
165
|
+
name?: string;
|
|
166
|
+
};
|
|
167
|
+
result: ConfigMutationResult<null>;
|
|
168
|
+
};
|
|
118
169
|
};
|
|
119
170
|
export type DataRpcMethod = keyof DataRpcSchema;
|
|
120
171
|
export type DataRpcParams<M extends DataRpcMethod> = DataRpcSchema[M]["params"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-rpc.d.ts","sourceRoot":"","sources":["../../src/protocol/data-rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,WAAW,GACX,UAAU,GACV,aAAa,GACb,cAAc,GACd,g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C7B,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,MAAM,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;KACpC,CAAC;IACF,+BAA+B,EAAE;QAC/B,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC9D,MAAM,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;KACpC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,aAAa,CAAC;AAChD,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAChF,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/protocol/index.js
CHANGED
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
} from "../chunk-7LEIACBZ.js";
|
|
8
8
|
import {
|
|
9
9
|
PROTOCOL_VERSION
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-FAYWOY6R.js";
|
|
11
11
|
import {
|
|
12
|
+
AGENT_MODEL_TIERS,
|
|
12
13
|
GRANT_CAPABILITIES,
|
|
13
14
|
PROVIDER_SURFACE_IDS
|
|
14
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-4UBSHJWS.js";
|
|
15
16
|
export {
|
|
17
|
+
AGENT_MODEL_TIERS,
|
|
16
18
|
GRANT_CAPABILITIES,
|
|
17
19
|
PROTOCOL_VERSION,
|
|
18
20
|
PROVIDER_SURFACE_IDS,
|
package/dist/protocol/types.d.ts
CHANGED
|
@@ -152,6 +152,13 @@ export type SessionMeta = {
|
|
|
152
152
|
* requests must read the installed `EngineChatModel.model` instead.
|
|
153
153
|
*/
|
|
154
154
|
modelIdentity: string;
|
|
155
|
+
/**
|
|
156
|
+
* Active provider ENTRY name (alias) when it differs from the identity's
|
|
157
|
+
* canonical provider — display-only, rendered as an `@alias` badge so multi-
|
|
158
|
+
* account setups can tell which config is active. Omitted for canonical
|
|
159
|
+
* entries so the common case carries nothing on the wire.
|
|
160
|
+
*/
|
|
161
|
+
modelProviderEntry?: string;
|
|
155
162
|
/** Active main-agent persona id (spec §4.3); `"default"` for the built-in coordinator. */
|
|
156
163
|
persona: string;
|
|
157
164
|
/**
|
|
@@ -188,6 +195,13 @@ export type SlashCommandDescriptor = {
|
|
|
188
195
|
name: string;
|
|
189
196
|
description: string;
|
|
190
197
|
argumentHint?: string;
|
|
198
|
+
/**
|
|
199
|
+
* True when the server runtime owns argument autocomplete for this command.
|
|
200
|
+
* The TUI only requests candidates through the generic `complete-slash-command`
|
|
201
|
+
* path when this flag is true. Custom (markdown-defined) commands never set
|
|
202
|
+
* it — their arguments are free-form.
|
|
203
|
+
*/
|
|
204
|
+
hasArgumentCompletion?: boolean;
|
|
191
205
|
/**
|
|
192
206
|
* True for custom (markdown-defined) commands. These are the ONLY server
|
|
193
207
|
* commands the `commandsEnabled.<name>` toggle affects — the runtime's
|
|
@@ -197,37 +211,38 @@ export type SlashCommandDescriptor = {
|
|
|
197
211
|
custom?: boolean;
|
|
198
212
|
};
|
|
199
213
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* selections); the client builds the grouped ComboBox items. JSON-safe by rule
|
|
204
|
-
* — the round-trip test guards it.
|
|
214
|
+
* Whether completing a slash-command item should submit the command (`submit`)
|
|
215
|
+
* or keep editing with a trailing space so the next argument level is
|
|
216
|
+
* requested (`continue`).
|
|
205
217
|
*/
|
|
206
|
-
export type
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
218
|
+
export type SlashCommandCompletionAction = "continue" | "submit";
|
|
219
|
+
/**
|
|
220
|
+
* One candidate for a slash-command argument, produced by the attached runtime
|
|
221
|
+
* and returned through the generic `complete-slash-command` wire path. The
|
|
222
|
+
* runtime guarantees unique `id`s; the client defensively drops duplicates.
|
|
223
|
+
*/
|
|
224
|
+
export type SlashCommandCompletionItem = {
|
|
225
|
+
/** Stable, unique key the TUI uses for selection tracking. */
|
|
226
|
+
id: string;
|
|
227
|
+
/** Display label; when `submitValue` is absent, also the submitted value. */
|
|
228
|
+
label: string;
|
|
229
|
+
/** Complete argument string replacing the current `argumentsText`. */
|
|
230
|
+
submitValue?: string;
|
|
231
|
+
/** Optional one-line description shown beside the label. */
|
|
232
|
+
description?: string;
|
|
233
|
+
/** Optional group heading the TUI projects into a disclosure row. */
|
|
234
|
+
group?: string;
|
|
235
|
+
action: SlashCommandCompletionAction;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Result of a `complete-slash-command` request. The echoed `name`/`argumentsText`
|
|
239
|
+
* let the client correlate results and defensively drop stale/mismatched ones.
|
|
240
|
+
* JSON-safe by rule — the round-trip test guards it.
|
|
241
|
+
*/
|
|
242
|
+
export type SlashCommandCompletion = {
|
|
243
|
+
name: string;
|
|
244
|
+
argumentsText: string;
|
|
245
|
+
items: SlashCommandCompletionItem[];
|
|
231
246
|
};
|
|
232
247
|
/**
|
|
233
248
|
* The replicated session state. Everything here survives JSON round-trip.
|
|
@@ -630,6 +645,74 @@ export type McpServerInfo = {
|
|
|
630
645
|
message?: string;
|
|
631
646
|
tools: McpToolInfo[];
|
|
632
647
|
};
|
|
648
|
+
/** One committed workspace memory (Memory tab list row). */
|
|
649
|
+
export type WorkspaceMemorySummary = {
|
|
650
|
+
slug: string;
|
|
651
|
+
title: string;
|
|
652
|
+
durable: boolean;
|
|
653
|
+
tags: string[];
|
|
654
|
+
source: "user" | "agent";
|
|
655
|
+
createdAt: string;
|
|
656
|
+
updatedAt: string;
|
|
657
|
+
};
|
|
658
|
+
/** Committed workspace memory detail (summary + full content). */
|
|
659
|
+
export type WorkspaceMemoryDetail = WorkspaceMemorySummary & {
|
|
660
|
+
content: string;
|
|
661
|
+
};
|
|
662
|
+
/** One extract record (read-only Extracts browser row). */
|
|
663
|
+
export type MemoryExtractSummary = {
|
|
664
|
+
/** Extract record id. */
|
|
665
|
+
id: string;
|
|
666
|
+
/** The source session the extract was derived from. */
|
|
667
|
+
sourceSessionId: string;
|
|
668
|
+
/** Optional human-meaningful source slug derived from the session. */
|
|
669
|
+
sourceSlug?: string;
|
|
670
|
+
/** Epoch ms when the extract was generated. */
|
|
671
|
+
generatedAt: number;
|
|
672
|
+
/** Extract status (active/empty/failed). */
|
|
673
|
+
status: string;
|
|
674
|
+
/** Truncated memory draft preview for list rows. */
|
|
675
|
+
memoryDraftPreview: string;
|
|
676
|
+
/** Number of proposed skill drafts in this extract. */
|
|
677
|
+
skillDraftCount: number;
|
|
678
|
+
};
|
|
679
|
+
/** One consolidate proposal (Memory tab list row). */
|
|
680
|
+
export type ConsolidateProposalSummary = {
|
|
681
|
+
id: string;
|
|
682
|
+
status: string;
|
|
683
|
+
createdAt: number;
|
|
684
|
+
notes: string;
|
|
685
|
+
memoryOpCount: number;
|
|
686
|
+
skillOpCount: number;
|
|
687
|
+
};
|
|
688
|
+
export type ConsolidateProposalOperation = Readonly<Record<string, unknown> & {
|
|
689
|
+
id: string;
|
|
690
|
+
}>;
|
|
691
|
+
/** Consolidate proposal detail (Memory tab detail pane, diff rendering). */
|
|
692
|
+
export type ConsolidateProposalDetail = ConsolidateProposalSummary & {
|
|
693
|
+
/** Parsed memory piece ops (create/edit/remove). */
|
|
694
|
+
memoryOps: ReadonlyArray<ConsolidateProposalOperation>;
|
|
695
|
+
/** Parsed skill ops (create_skill/update_skill/write_file). */
|
|
696
|
+
skillOps: ReadonlyArray<ConsolidateProposalOperation>;
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* Result of a `run-consolidate` / `run-consolidate-interactive` command. The
|
|
700
|
+
* daemon acks it once the coordinator-owned job leaves queued/running. JSON-safe
|
|
701
|
+
* by rule (guarded by the round-trip test).
|
|
702
|
+
*/
|
|
703
|
+
export type ConsolidateRunOutcome = {
|
|
704
|
+
outcome: "skipped";
|
|
705
|
+
reason: "no_new_extracts" | "disabled";
|
|
706
|
+
} | {
|
|
707
|
+
outcome: "proposal";
|
|
708
|
+
proposalId: string;
|
|
709
|
+
memoryOpCount: number;
|
|
710
|
+
} | {
|
|
711
|
+
outcome: "noop";
|
|
712
|
+
} | {
|
|
713
|
+
outcome: "failed";
|
|
714
|
+
reason: string;
|
|
715
|
+
};
|
|
633
716
|
export type ClientCommand = {
|
|
634
717
|
id: string;
|
|
635
718
|
type: "submit";
|
|
@@ -674,17 +757,16 @@ export type ClientCommand = {
|
|
|
674
757
|
prefix: string;
|
|
675
758
|
}
|
|
676
759
|
/**
|
|
677
|
-
*
|
|
678
|
-
*
|
|
679
|
-
*
|
|
680
|
-
*
|
|
760
|
+
* Generic slash-command argument autocomplete (spec §6). The attached runtime
|
|
761
|
+
* answers with a {@link SlashCommandCompletion} — items are read-only
|
|
762
|
+
* candidates; the client renders and selects them locally. An empty
|
|
763
|
+
* completion is returned when no host is attached.
|
|
681
764
|
*/
|
|
682
765
|
| {
|
|
683
766
|
id: string;
|
|
684
|
-
type: "complete-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
type: "complete-thinking";
|
|
767
|
+
type: "complete-slash-command";
|
|
768
|
+
name: string;
|
|
769
|
+
argumentsText: string;
|
|
688
770
|
} | {
|
|
689
771
|
id: string;
|
|
690
772
|
type: "load-history";
|
|
@@ -785,6 +867,85 @@ export type ClientCommand = {
|
|
|
785
867
|
id: string;
|
|
786
868
|
type: "list-mcp-servers";
|
|
787
869
|
}
|
|
870
|
+
/**
|
|
871
|
+
* List committed workspace memories for the Memory tab. The ack `result`
|
|
872
|
+
* is a {@link WorkspaceMemorySummary}[]. Session-scoped.
|
|
873
|
+
*/
|
|
874
|
+
| {
|
|
875
|
+
id: string;
|
|
876
|
+
type: "list-workspace-memories";
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Lazy-load one committed memory's full content. The ack `result` is a
|
|
880
|
+
* {@link WorkspaceMemoryDetail}. Session-scoped.
|
|
881
|
+
*/
|
|
882
|
+
| {
|
|
883
|
+
id: string;
|
|
884
|
+
type: "get-workspace-memory";
|
|
885
|
+
memorySlug: string;
|
|
886
|
+
}
|
|
887
|
+
/** Delete one committed workspace memory. The ack `result` is `{ removed: boolean; slug: string }`. */
|
|
888
|
+
| {
|
|
889
|
+
id: string;
|
|
890
|
+
type: "remove-workspace-memory";
|
|
891
|
+
memorySlug: string;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* List consolidate proposals awaiting review. The ack `result` is an array of
|
|
895
|
+
* proposal summaries. Session-scoped.
|
|
896
|
+
*/
|
|
897
|
+
| {
|
|
898
|
+
id: string;
|
|
899
|
+
type: "list-consolidate-proposals";
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Approve or reject one consolidate proposal. An omitted approve selection
|
|
903
|
+
* means approve all operations; rejection is always proposal-wide. The ack
|
|
904
|
+
* `result` is `{ status, id?, error? }`. Session-scoped.
|
|
905
|
+
*/
|
|
906
|
+
| {
|
|
907
|
+
id: string;
|
|
908
|
+
type: "decide-consolidate-proposal";
|
|
909
|
+
proposalId: string;
|
|
910
|
+
decision: "approve" | "reject";
|
|
911
|
+
selectedOperationIds?: string[];
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* List extract records (read-only browser). The ack `result` is a
|
|
915
|
+
* {@link MemoryExtractSummary}[]. Session-scoped.
|
|
916
|
+
*/
|
|
917
|
+
| {
|
|
918
|
+
id: string;
|
|
919
|
+
type: "list-extracts";
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Load one consolidate proposal's ops for diff rendering. The ack `result`
|
|
923
|
+
* is a {@link ConsolidateProposalDetail}. Session-scoped.
|
|
924
|
+
*/
|
|
925
|
+
| {
|
|
926
|
+
id: string;
|
|
927
|
+
type: "get-consolidate-proposal";
|
|
928
|
+
proposalId: string;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Run consolidation for this session workspace. The daemon enqueues a
|
|
932
|
+
* coordinator-owned run and acks once the job leaves queued/running. The ack
|
|
933
|
+
* `result` is a `ConsolidateRunOutcome`-shaped
|
|
934
|
+
* `{ outcome: "proposal" | "noop" | "skipped" | "failed", ... }`. Session-scoped.
|
|
935
|
+
*/
|
|
936
|
+
| {
|
|
937
|
+
id: string;
|
|
938
|
+
type: "run-consolidate";
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Run consolidation as an attached foreground turn of this session (the
|
|
942
|
+
* interactive marker path). The ack `result` carries the same outcome shape
|
|
943
|
+
* as `run-consolidate`. Session-scoped.
|
|
944
|
+
*/
|
|
945
|
+
| {
|
|
946
|
+
id: string;
|
|
947
|
+
type: "run-consolidate-interactive";
|
|
948
|
+
}
|
|
788
949
|
/**
|
|
789
950
|
* Complete ChatGPT/Codex device-code login (TUI-only). The daemon persists
|
|
790
951
|
* the credential under the attached session's profile. Provider id is locked
|
|
@@ -794,6 +955,11 @@ export type ClientCommand = {
|
|
|
794
955
|
id: string;
|
|
795
956
|
type: "complete-provider-auth";
|
|
796
957
|
providerId: "openai-codex";
|
|
958
|
+
/**
|
|
959
|
+
* Entry name for alias accounts; defaults to the canonical providerId
|
|
960
|
+
* (`openai-codex`) when omitted.
|
|
961
|
+
*/
|
|
962
|
+
name?: string;
|
|
797
963
|
credential: ChatGptCredentialInput;
|
|
798
964
|
} | {
|
|
799
965
|
id: string;
|
|
@@ -822,8 +988,8 @@ export type ServerFrame = ServerEvent | CommandAck | {
|
|
|
822
988
|
};
|
|
823
989
|
/** Session lifecycle state surfaced by list-sessions (spec §4.2). */
|
|
824
990
|
export type SessionStatus = "awaiting-approval" | "busy" | "idle";
|
|
825
|
-
/** Durable catalog classification for a user or managed
|
|
826
|
-
export type SessionKind = "user" | "memory-extraction";
|
|
991
|
+
/** Durable catalog classification for a user, managed extraction, or managed consolidation session. */
|
|
992
|
+
export type SessionKind = "user" | "memory-extraction" | "memory-consolidation";
|
|
827
993
|
/** Event that requested a managed memory extraction session. */
|
|
828
994
|
export type ExtractionTrigger = "manual" | "idle";
|
|
829
995
|
/** Durable lifecycle state of a managed memory extraction session. */
|
|
@@ -837,13 +1003,32 @@ export type ExtractionSessionMetadata = Readonly<{
|
|
|
837
1003
|
status: ExtractionStatus;
|
|
838
1004
|
modelIdentity?: string;
|
|
839
1005
|
}>;
|
|
1006
|
+
/** Event that requested a managed memory consolidation run. */
|
|
1007
|
+
export type ConsolidationTrigger = "manual" | "idle";
|
|
1008
|
+
/** Durable lifecycle state of a managed memory consolidation session. */
|
|
1009
|
+
export type ConsolidationStatus = "queued" | "running" | "completed" | "failed" | "skipped";
|
|
1010
|
+
/** Catalog metadata carried only by managed memory consolidation sessions.
|
|
1011
|
+
* `workspace` is the workspace name; consolidation lineage is the extract set. */
|
|
1012
|
+
export type ConsolidationSessionMetadata = Readonly<{
|
|
1013
|
+
jobId: string;
|
|
1014
|
+
workspace: string;
|
|
1015
|
+
trigger: ConsolidationTrigger;
|
|
1016
|
+
status: ConsolidationStatus;
|
|
1017
|
+
modelIdentity?: string;
|
|
1018
|
+
}>;
|
|
840
1019
|
/** Coherent catalog classification shared by every session projection. */
|
|
841
1020
|
export type SessionClassification = Readonly<{
|
|
842
1021
|
kind: "user";
|
|
843
1022
|
extraction?: never;
|
|
1023
|
+
consolidation?: never;
|
|
844
1024
|
}> | Readonly<{
|
|
845
1025
|
kind: "memory-extraction";
|
|
846
1026
|
extraction: ExtractionSessionMetadata;
|
|
1027
|
+
consolidation?: never;
|
|
1028
|
+
}> | Readonly<{
|
|
1029
|
+
kind: "memory-consolidation";
|
|
1030
|
+
consolidation: ConsolidationSessionMetadata;
|
|
1031
|
+
extraction?: never;
|
|
847
1032
|
}>;
|
|
848
1033
|
/** Session metadata returned by list-sessions / create-session (spec §4.2). */
|
|
849
1034
|
export type SessionDescriptor = SessionClassification & {
|
|
@@ -1040,6 +1225,8 @@ export type ChatGptCredentialInput = {
|
|
|
1040
1225
|
};
|
|
1041
1226
|
export type ProviderConfigSummary = {
|
|
1042
1227
|
id: string;
|
|
1228
|
+
/** Canonical built-in provider (present for alias entries). */
|
|
1229
|
+
providerId?: string;
|
|
1043
1230
|
label: string;
|
|
1044
1231
|
surface: ProviderSurfaceId;
|
|
1045
1232
|
baseUrl?: string;
|
|
@@ -1047,6 +1234,27 @@ export type ProviderConfigSummary = {
|
|
|
1047
1234
|
hasAuth: boolean;
|
|
1048
1235
|
isDefault: boolean;
|
|
1049
1236
|
};
|
|
1237
|
+
export declare const AGENT_MODEL_TIERS: readonly ["fast", "balanced", "powerful"];
|
|
1238
|
+
export type AgentModelTier = (typeof AGENT_MODEL_TIERS)[number];
|
|
1239
|
+
export type AgentModelTierMappings = Partial<Record<AgentModelTier, string>>;
|
|
1240
|
+
export type AgentModelSetSummary = {
|
|
1241
|
+
name: string;
|
|
1242
|
+
mappings: AgentModelTierMappings;
|
|
1243
|
+
valid: boolean;
|
|
1244
|
+
issues: string[];
|
|
1245
|
+
};
|
|
1246
|
+
export type AgentModelSetReferenceSummary = {
|
|
1247
|
+
name: string;
|
|
1248
|
+
valid: boolean;
|
|
1249
|
+
};
|
|
1250
|
+
export type AgentModelSetsView = {
|
|
1251
|
+
sets: AgentModelSetSummary[];
|
|
1252
|
+
profileDefault?: AgentModelSetReferenceSummary;
|
|
1253
|
+
workspaceSelection?: AgentModelSetReferenceSummary;
|
|
1254
|
+
effectiveSelection?: AgentModelSetReferenceSummary & {
|
|
1255
|
+
source: "profile" | "workspace";
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1050
1258
|
/**
|
|
1051
1259
|
* A workspace as advertised to directory clients (spec §7). Carried as a
|
|
1052
1260
|
* JSON-safe array in the `list-workspaces` / `create-workspace` REST (DataRpc)
|
|
@@ -1073,20 +1281,10 @@ export type ConfigMutationResult<T> = {
|
|
|
1073
1281
|
}>;
|
|
1074
1282
|
};
|
|
1075
1283
|
/** Exceptional pre-attach operator commands (spec §4.2). */
|
|
1284
|
+
/** Exceptional pre-attach operator commands (spec §4.2). */
|
|
1076
1285
|
export type DaemonAdminCommand =
|
|
1077
|
-
/** Start the daemon-hosted web UI on `port` (default 3000). */
|
|
1078
|
-
{
|
|
1079
|
-
id: string;
|
|
1080
|
-
type: "web-start";
|
|
1081
|
-
port?: number;
|
|
1082
|
-
}
|
|
1083
|
-
/** Stop the daemon-hosted web UI. */
|
|
1084
|
-
| {
|
|
1085
|
-
id: string;
|
|
1086
|
-
type: "web-stop";
|
|
1087
|
-
}
|
|
1088
1286
|
/** Re-read daemon config and reload running sessions. */
|
|
1089
|
-
|
|
1287
|
+
{
|
|
1090
1288
|
id: string;
|
|
1091
1289
|
type: "reload-config";
|
|
1092
1290
|
};
|