@nuvin/session 0.2.0-rc.8 → 0.2.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-2OTEZX2E.js → chunk-B6S3CWQX.js} +134 -10
- package/dist/{chunk-MPBST5DM.js → chunk-FAYWOY6R.js} +1 -1
- package/dist/client/daemon-client.d.ts.map +1 -1
- package/dist/client/data-client.d.ts +29 -7
- 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 +181 -77
- package/dist/client/session-client.d.ts +41 -9
- package/dist/client/session-client.d.ts.map +1 -1
- package/dist/controller/index.js +32 -7
- package/dist/controller/session-controller.d.ts +13 -3
- package/dist/controller/session-controller.d.ts.map +1 -1
- package/dist/grant/index.js +2 -2
- package/dist/protocol/data-rpc.d.ts +53 -7
- package/dist/protocol/data-rpc.d.ts.map +1 -1
- package/dist/protocol/index.js +4 -2
- package/dist/protocol/types.d.ts +282 -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 +7 -3
- package/dist/state/messages.d.ts +28 -0
- package/dist/state/messages.d.ts.map +1 -1
- package/dist/state/session.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 +215 -86
- package/dist/test-utils/index.js +3 -3
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSessionViewState,
|
|
3
3
|
reduceSessionEvent
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-B6S3CWQX.js";
|
|
5
5
|
import {
|
|
6
6
|
PROTOCOL_VERSION
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-FAYWOY6R.js";
|
|
8
8
|
|
|
9
9
|
// src/client/endpoint.ts
|
|
10
10
|
var TerminalEndpointError = class extends Error {
|
|
@@ -203,7 +203,8 @@ function createHttpDataClient(options = {}) {
|
|
|
203
203
|
profile: opts?.profile,
|
|
204
204
|
cwd: opts?.cwd,
|
|
205
205
|
limit: opts?.limit,
|
|
206
|
-
cursor: opts?.cursor
|
|
206
|
+
cursor: opts?.cursor,
|
|
207
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
207
208
|
})}`;
|
|
208
209
|
const response = await daemonFetch(daemonId, suffix);
|
|
209
210
|
if (!response.ok)
|
|
@@ -216,7 +217,8 @@ function createHttpDataClient(options = {}) {
|
|
|
216
217
|
const suffix = `/history/workspaces${queryString({
|
|
217
218
|
profile: opts?.profile,
|
|
218
219
|
currentCwd: opts?.currentCwd,
|
|
219
|
-
query: opts?.query
|
|
220
|
+
query: opts?.query,
|
|
221
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
220
222
|
})}`;
|
|
221
223
|
const response = await daemonFetch(daemonId, suffix, { signal: opts?.signal });
|
|
222
224
|
if (!response.ok)
|
|
@@ -232,7 +234,8 @@ function createHttpDataClient(options = {}) {
|
|
|
232
234
|
cwd: opts?.cwd,
|
|
233
235
|
query: opts?.query,
|
|
234
236
|
limit: opts?.limit,
|
|
235
|
-
cursor: opts?.cursor
|
|
237
|
+
cursor: opts?.cursor,
|
|
238
|
+
includeExtraction: opts?.includeExtraction === true ? "true" : void 0
|
|
236
239
|
})}`;
|
|
237
240
|
const response = await daemonFetch(daemonId, suffix, { signal: opts?.signal });
|
|
238
241
|
if (!response.ok)
|
|
@@ -360,6 +363,80 @@ function createHttpDataClient(options = {}) {
|
|
|
360
363
|
});
|
|
361
364
|
if (!response.ok) await throwFromResponse(response, "Failed to update workspace");
|
|
362
365
|
return await response.json();
|
|
366
|
+
},
|
|
367
|
+
async listAgentModelSets(daemonId, input) {
|
|
368
|
+
const suffix = `/agent-model-sets${queryString({
|
|
369
|
+
profile: input.profile,
|
|
370
|
+
workspace: input.workspace
|
|
371
|
+
})}`;
|
|
372
|
+
const response = await daemonFetch(daemonId, suffix);
|
|
373
|
+
if (!response.ok) {
|
|
374
|
+
await throwFromResponse(response, "Failed to load agent model sets", {
|
|
375
|
+
404: { reason: "daemon-revoked", message: "This daemon is no longer registered." }
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
return await response.json();
|
|
379
|
+
},
|
|
380
|
+
async createAgentModelSet(daemonId, input) {
|
|
381
|
+
const response = await daemonFetch(daemonId, "/agent-model-sets", {
|
|
382
|
+
method: "POST",
|
|
383
|
+
headers: { "Content-Type": "application/json" },
|
|
384
|
+
body: JSON.stringify(input)
|
|
385
|
+
});
|
|
386
|
+
if (!response.ok) await throwFromResponse(response, "Failed to create agent model set");
|
|
387
|
+
return await response.json();
|
|
388
|
+
},
|
|
389
|
+
async replaceAgentModelSet(daemonId, input) {
|
|
390
|
+
const response = await daemonFetch(
|
|
391
|
+
daemonId,
|
|
392
|
+
`/agent-model-sets/${encodeURIComponent(input.name)}`,
|
|
393
|
+
{
|
|
394
|
+
method: "PUT",
|
|
395
|
+
headers: { "Content-Type": "application/json" },
|
|
396
|
+
body: JSON.stringify(input)
|
|
397
|
+
}
|
|
398
|
+
);
|
|
399
|
+
if (!response.ok) await throwFromResponse(response, "Failed to replace agent model set");
|
|
400
|
+
return await response.json();
|
|
401
|
+
},
|
|
402
|
+
async deleteAgentModelSet(daemonId, input) {
|
|
403
|
+
const response = await daemonFetch(
|
|
404
|
+
daemonId,
|
|
405
|
+
`/agent-model-sets/${encodeURIComponent(input.name)}`,
|
|
406
|
+
{
|
|
407
|
+
method: "DELETE",
|
|
408
|
+
headers: { "Content-Type": "application/json" },
|
|
409
|
+
body: JSON.stringify(input)
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
if (!response.ok) await throwFromResponse(response, "Failed to delete agent model set");
|
|
413
|
+
return await response.json();
|
|
414
|
+
},
|
|
415
|
+
async setDefaultAgentModelSet(daemonId, input) {
|
|
416
|
+
const response = await daemonFetch(daemonId, "/agent-model-set-default", {
|
|
417
|
+
method: "PUT",
|
|
418
|
+
headers: { "Content-Type": "application/json" },
|
|
419
|
+
body: JSON.stringify(input)
|
|
420
|
+
});
|
|
421
|
+
if (!response.ok) {
|
|
422
|
+
await throwFromResponse(response, "Failed to set default agent model set");
|
|
423
|
+
}
|
|
424
|
+
return await response.json();
|
|
425
|
+
},
|
|
426
|
+
async setWorkspaceAgentModelSet(daemonId, input) {
|
|
427
|
+
const response = await daemonFetch(
|
|
428
|
+
daemonId,
|
|
429
|
+
`/workspace-agent-model-set/${encodeURIComponent(input.workspace)}`,
|
|
430
|
+
{
|
|
431
|
+
method: "PUT",
|
|
432
|
+
headers: { "Content-Type": "application/json" },
|
|
433
|
+
body: JSON.stringify(input)
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
if (!response.ok) {
|
|
437
|
+
await throwFromResponse(response, "Failed to set workspace agent model set");
|
|
438
|
+
}
|
|
439
|
+
return await response.json();
|
|
363
440
|
}
|
|
364
441
|
};
|
|
365
442
|
}
|
|
@@ -372,76 +449,33 @@ var SessionCommandError = class extends Error {
|
|
|
372
449
|
this.name = "SessionCommandError";
|
|
373
450
|
}
|
|
374
451
|
};
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
recentModels: []
|
|
379
|
-
};
|
|
380
|
-
var EMPTY_THINKING_COMPLETION = {
|
|
381
|
-
modelIdentity: "",
|
|
382
|
-
canDisable: false,
|
|
383
|
-
options: []
|
|
384
|
-
};
|
|
385
|
-
function toModelCompletion(result) {
|
|
386
|
-
if (typeof result !== "object" || result === null || Array.isArray(result)) {
|
|
387
|
-
return EMPTY_MODEL_COMPLETION;
|
|
388
|
-
}
|
|
452
|
+
function toSlashCommandCompletion(result, requestedName, requestedArgumentsText) {
|
|
453
|
+
const empty = { name: requestedName, argumentsText: requestedArgumentsText, items: [] };
|
|
454
|
+
if (typeof result !== "object" || result === null || Array.isArray(result)) return empty;
|
|
389
455
|
const record = result;
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
if (typeof record.perProvider === "object" && record.perProvider !== null) {
|
|
393
|
-
for (const [provider, models] of Object.entries(
|
|
394
|
-
record.perProvider
|
|
395
|
-
)) {
|
|
396
|
-
if (!Array.isArray(models)) continue;
|
|
397
|
-
perProvider[provider] = models.flatMap((entry) => {
|
|
398
|
-
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return [];
|
|
399
|
-
const id = entry.id;
|
|
400
|
-
if (typeof id !== "string") return [];
|
|
401
|
-
const name = entry.name;
|
|
402
|
-
return [typeof name === "string" ? { id, name } : { id }];
|
|
403
|
-
});
|
|
404
|
-
}
|
|
456
|
+
if (record.name !== requestedName || record.argumentsText !== requestedArgumentsText || !Array.isArray(record.items)) {
|
|
457
|
+
return empty;
|
|
405
458
|
}
|
|
406
|
-
const
|
|
459
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
460
|
+
const items = record.items.flatMap((entry) => {
|
|
407
461
|
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return [];
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
function optionalString(record, key) {
|
|
415
|
-
const value = record[key];
|
|
416
|
-
return typeof value === "string" ? value : void 0;
|
|
417
|
-
}
|
|
418
|
-
function toThinkingCompletion(result) {
|
|
419
|
-
if (typeof result !== "object" || result === null || Array.isArray(result)) {
|
|
420
|
-
return EMPTY_THINKING_COMPLETION;
|
|
421
|
-
}
|
|
422
|
-
const record = result;
|
|
423
|
-
if (typeof record.modelIdentity !== "string" || typeof record.canDisable !== "boolean" || !Array.isArray(record.options)) {
|
|
424
|
-
return EMPTY_THINKING_COMPLETION;
|
|
425
|
-
}
|
|
426
|
-
const options = record.options.flatMap((entry) => {
|
|
427
|
-
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return [];
|
|
428
|
-
const option = entry;
|
|
429
|
-
if (typeof option.id !== "string" || option.id.length === 0) return [];
|
|
462
|
+
const item = entry;
|
|
463
|
+
if (typeof item.id !== "string" || item.id.length === 0 || seenIds.has(item.id) || typeof item.label !== "string" || item.label.length === 0 || item.action !== "continue" && item.action !== "submit") {
|
|
464
|
+
return [];
|
|
465
|
+
}
|
|
466
|
+
seenIds.add(item.id);
|
|
430
467
|
return [
|
|
431
|
-
|
|
468
|
+
{
|
|
469
|
+
id: item.id,
|
|
470
|
+
label: item.label,
|
|
471
|
+
action: item.action,
|
|
472
|
+
...typeof item.submitValue === "string" ? { submitValue: item.submitValue } : {},
|
|
473
|
+
...typeof item.description === "string" ? { description: item.description } : {},
|
|
474
|
+
...typeof item.group === "string" && item.group.length > 0 ? { group: item.group } : {}
|
|
475
|
+
}
|
|
432
476
|
];
|
|
433
477
|
});
|
|
434
|
-
|
|
435
|
-
const defaultOption = optionalString(record, "defaultOption");
|
|
436
|
-
const selectedOption = optionalString(record, "selectedOption");
|
|
437
|
-
return {
|
|
438
|
-
modelIdentity: record.modelIdentity,
|
|
439
|
-
...effectiveOption !== void 0 ? { effectiveOption } : {},
|
|
440
|
-
...defaultOption !== void 0 ? { defaultOption } : {},
|
|
441
|
-
...selectedOption !== void 0 ? { selectedOption } : {},
|
|
442
|
-
canDisable: record.canDisable,
|
|
443
|
-
options
|
|
444
|
-
};
|
|
478
|
+
return { name: requestedName, argumentsText: requestedArgumentsText, items };
|
|
445
479
|
}
|
|
446
480
|
function toPersistBashPermissionResult(result) {
|
|
447
481
|
if (typeof result !== "object" || result === null || Array.isArray(result)) {
|
|
@@ -470,6 +504,16 @@ function toPersistBashPermissionResult(result) {
|
|
|
470
504
|
fieldErrors
|
|
471
505
|
};
|
|
472
506
|
}
|
|
507
|
+
function toMemoryRemovalResult(result) {
|
|
508
|
+
if (typeof result !== "object" || result === null || Array.isArray(result)) {
|
|
509
|
+
throw new SessionCommandError("invalid-result", "Invalid memory removal response.");
|
|
510
|
+
}
|
|
511
|
+
const record = result;
|
|
512
|
+
if (typeof record.removed !== "boolean" || typeof record.slug !== "string") {
|
|
513
|
+
throw new SessionCommandError("invalid-result", "Invalid memory removal response.");
|
|
514
|
+
}
|
|
515
|
+
return { removed: record.removed, slug: record.slug };
|
|
516
|
+
}
|
|
473
517
|
function createSessionClient(transport) {
|
|
474
518
|
let state = createSessionViewState();
|
|
475
519
|
let seq = 0;
|
|
@@ -639,11 +683,13 @@ function createSessionClient(transport) {
|
|
|
639
683
|
(result) => Array.isArray(result) ? result.filter((entry) => typeof entry === "string") : []
|
|
640
684
|
);
|
|
641
685
|
},
|
|
642
|
-
|
|
643
|
-
return sendCommand((id) => ({
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
686
|
+
completeSlashCommand(name, argumentsText) {
|
|
687
|
+
return sendCommand((id) => ({
|
|
688
|
+
id,
|
|
689
|
+
type: "complete-slash-command",
|
|
690
|
+
name,
|
|
691
|
+
argumentsText
|
|
692
|
+
})).then((result) => toSlashCommandCompletion(result, name, argumentsText));
|
|
647
693
|
},
|
|
648
694
|
setConfig(patches) {
|
|
649
695
|
return sendCommand((id) => ({ id, type: "set-config", patches })).then(
|
|
@@ -680,15 +726,67 @@ function createSessionClient(transport) {
|
|
|
680
726
|
(result) => Array.isArray(result) ? result : []
|
|
681
727
|
);
|
|
682
728
|
},
|
|
729
|
+
listWorkspaceMemories() {
|
|
730
|
+
return sendCommand((id) => ({ id, type: "list-workspace-memories" })).then(
|
|
731
|
+
(result) => Array.isArray(result) ? result : []
|
|
732
|
+
);
|
|
733
|
+
},
|
|
734
|
+
getWorkspaceMemory(slug) {
|
|
735
|
+
return sendCommand((id) => ({ id, type: "get-workspace-memory", memorySlug: slug })).then(
|
|
736
|
+
(result) => result
|
|
737
|
+
);
|
|
738
|
+
},
|
|
739
|
+
removeWorkspaceMemory(slug) {
|
|
740
|
+
return sendCommand((id) => ({ id, type: "remove-workspace-memory", memorySlug: slug })).then(
|
|
741
|
+
toMemoryRemovalResult
|
|
742
|
+
);
|
|
743
|
+
},
|
|
744
|
+
listConsolidateProposals() {
|
|
745
|
+
return sendCommand((id) => ({ id, type: "list-consolidate-proposals" })).then(
|
|
746
|
+
(result) => Array.isArray(result) ? result : []
|
|
747
|
+
);
|
|
748
|
+
},
|
|
749
|
+
decideConsolidateProposal(proposalId, decision, selectedOperationIds) {
|
|
750
|
+
return sendCommand((id) => ({
|
|
751
|
+
id,
|
|
752
|
+
type: "decide-consolidate-proposal",
|
|
753
|
+
proposalId,
|
|
754
|
+
decision,
|
|
755
|
+
...decision === "approve" && selectedOperationIds !== void 0 ? { selectedOperationIds: [...selectedOperationIds] } : {}
|
|
756
|
+
})).then((result) => result);
|
|
757
|
+
},
|
|
758
|
+
getConsolidateProposal(proposalId) {
|
|
759
|
+
return sendCommand((id) => ({
|
|
760
|
+
id,
|
|
761
|
+
type: "get-consolidate-proposal",
|
|
762
|
+
proposalId
|
|
763
|
+
})).then((result) => result);
|
|
764
|
+
},
|
|
765
|
+
listExtracts() {
|
|
766
|
+
return sendCommand((id) => ({ id, type: "list-extracts" })).then(
|
|
767
|
+
(result) => Array.isArray(result) ? result : []
|
|
768
|
+
);
|
|
769
|
+
},
|
|
770
|
+
runConsolidate() {
|
|
771
|
+
return sendCommand((id) => ({ id, type: "run-consolidate" })).then(
|
|
772
|
+
(result) => result
|
|
773
|
+
);
|
|
774
|
+
},
|
|
775
|
+
runConsolidateInteractive() {
|
|
776
|
+
return sendCommand((id) => ({ id, type: "run-consolidate-interactive" })).then(
|
|
777
|
+
(result) => result
|
|
778
|
+
);
|
|
779
|
+
},
|
|
683
780
|
capabilities() {
|
|
684
781
|
return transport.capabilities?.() ?? [];
|
|
685
782
|
},
|
|
686
|
-
completeProviderAuth(credential) {
|
|
783
|
+
completeProviderAuth(credential, name) {
|
|
687
784
|
return sendCommand((id) => ({
|
|
688
785
|
id,
|
|
689
786
|
type: "complete-provider-auth",
|
|
690
787
|
providerId: "openai-codex",
|
|
691
|
-
credential
|
|
788
|
+
credential,
|
|
789
|
+
...name !== void 0 ? { name } : {}
|
|
692
790
|
})).then(() => {
|
|
693
791
|
});
|
|
694
792
|
},
|
|
@@ -1049,7 +1147,13 @@ function bindDaemonDataClient(client, daemonId) {
|
|
|
1049
1147
|
setDefaultProvider: (providerId, opts) => client.setDefaultProvider(daemonId, providerId, opts),
|
|
1050
1148
|
setProviderAuth: (providerId, credential, opts) => client.setProviderAuth(daemonId, providerId, credential, opts),
|
|
1051
1149
|
clearProviderAuth: (providerId, opts) => client.clearProviderAuth(daemonId, providerId, opts),
|
|
1052
|
-
updateWorkspace: (name, patch) => client.updateWorkspace(daemonId, name, patch)
|
|
1150
|
+
updateWorkspace: (name, patch) => client.updateWorkspace(daemonId, name, patch),
|
|
1151
|
+
listAgentModelSets: (input) => client.listAgentModelSets(daemonId, input),
|
|
1152
|
+
createAgentModelSet: (input) => client.createAgentModelSet(daemonId, input),
|
|
1153
|
+
replaceAgentModelSet: (input) => client.replaceAgentModelSet(daemonId, input),
|
|
1154
|
+
deleteAgentModelSet: (input) => client.deleteAgentModelSet(daemonId, input),
|
|
1155
|
+
setDefaultAgentModelSet: (input) => client.setDefaultAgentModelSet(daemonId, input),
|
|
1156
|
+
setWorkspaceAgentModelSet: (input) => client.setWorkspaceAgentModelSet(daemonId, input)
|
|
1053
1157
|
};
|
|
1054
1158
|
}
|
|
1055
1159
|
function createDaemonClient(target, deps = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentInput, AskUserAnswers } from "@nuvin/agent-core/shared";
|
|
2
|
-
import type { AgentCatalogEntry, AgentDetail, ChatGptCredentialInput, CommandDetail, ConfigPatch, CustomProviderInput, GrantCapability, McpAction, McpActionResult, McpServerInfo,
|
|
2
|
+
import type { AgentCatalogEntry, AgentDetail, ChatGptCredentialInput, CommandDetail, ConfigPatch, ConsolidateProposalDetail, ConsolidateProposalSummary, ConsolidateRunOutcome, CustomProviderInput, GrantCapability, McpAction, McpActionResult, McpServerInfo, MemoryExtractSummary, PersistBashPermissionRequest, PersistBashPermissionResult, ServerEvent, SessionViewState, SetConfigResult, SkillCatalogEntry, SkillDetail, SlashCommandCompletion, SlashCommandDescriptor, WorkspaceMemoryDetail, WorkspaceMemorySummary } from "../protocol/types.ts";
|
|
3
3
|
import type { ClientTransport } from "./transport.ts";
|
|
4
4
|
export type ClientSubmitOptions = {
|
|
5
5
|
displayText: string;
|
|
@@ -48,13 +48,12 @@ export interface SessionClient {
|
|
|
48
48
|
*/
|
|
49
49
|
completePath(prefix: string): Promise<string[]>;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
52
|
-
* through the host's `complete-
|
|
53
|
-
* completion when no host is attached / the daemon is
|
|
51
|
+
* Request argument candidates for one built-in slash command. Round-trips
|
|
52
|
+
* through the host's `complete-slash-command` handler; resolves with a
|
|
53
|
+
* correlated empty completion when no host is attached / the daemon is
|
|
54
|
+
* unsupported. The runtime keeps items read-only — selection happens here.
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
-
/** Fetch model-specific `/thinking` options from the attached runtime. */
|
|
57
|
-
completeThinking(): Promise<ThinkingCompletion>;
|
|
56
|
+
completeSlashCommand(name: string, argumentsText: string): Promise<SlashCommandCompletion>;
|
|
58
57
|
/**
|
|
59
58
|
* Restricted config write (spec: Ctrl+P config panel §Writes). Sends the batch
|
|
60
59
|
* to the attached host, which allowlists/validates/writes each patch and
|
|
@@ -76,6 +75,38 @@ export interface SessionClient {
|
|
|
76
75
|
getCommand(name: string): Promise<CommandDetail>;
|
|
77
76
|
/** MCP servers with live status + per-server tools for the MCP tab. */
|
|
78
77
|
listMcpServers(): Promise<McpServerInfo[]>;
|
|
78
|
+
/** Committed workspace memories for the Memory tab. */
|
|
79
|
+
listWorkspaceMemories(): Promise<WorkspaceMemorySummary[]>;
|
|
80
|
+
/** Lazy-load one committed memory's full content for the Memory tab. */
|
|
81
|
+
getWorkspaceMemory(slug: string): Promise<WorkspaceMemoryDetail>;
|
|
82
|
+
/** Delete one committed workspace memory. */
|
|
83
|
+
removeWorkspaceMemory(slug: string): Promise<{
|
|
84
|
+
removed: boolean;
|
|
85
|
+
slug: string;
|
|
86
|
+
}>;
|
|
87
|
+
/** Consolidate proposals awaiting review for this session workspace. */
|
|
88
|
+
listConsolidateProposals(): Promise<ConsolidateProposalSummary[]>;
|
|
89
|
+
/** Approve or reject one consolidate proposal. */
|
|
90
|
+
decideConsolidateProposal(proposalId: string, decision: "approve" | "reject", selectedOperationIds?: readonly string[]): Promise<{
|
|
91
|
+
status: string;
|
|
92
|
+
id?: string;
|
|
93
|
+
error?: string;
|
|
94
|
+
}>;
|
|
95
|
+
/** One consolidate proposal's ops for the Memory-tab detail pane. */
|
|
96
|
+
getConsolidateProposal(proposalId: string): Promise<ConsolidateProposalDetail>;
|
|
97
|
+
/** Extract records (read-only) for the Memory-tab Extracts browser. */
|
|
98
|
+
listExtracts(): Promise<MemoryExtractSummary[]>;
|
|
99
|
+
/**
|
|
100
|
+
* Run consolidation for this session workspace. The daemon enqueues a
|
|
101
|
+
* coordinator-owned run and acks once the job leaves queued/running; resolves
|
|
102
|
+
* with the {@link ConsolidateRunOutcome}.
|
|
103
|
+
*/
|
|
104
|
+
runConsolidate(): Promise<ConsolidateRunOutcome>;
|
|
105
|
+
/**
|
|
106
|
+
* Run consolidation as an attached foreground turn of this session. The ack
|
|
107
|
+
* carries the same {@link ConsolidateRunOutcome} shape as `runConsolidate`.
|
|
108
|
+
*/
|
|
109
|
+
runConsolidateInteractive(): Promise<ConsolidateRunOutcome>;
|
|
79
110
|
/**
|
|
80
111
|
* Effective grant capabilities from the transport's latest welcome (UI hint).
|
|
81
112
|
* Empty when the transport does not expose capabilities.
|
|
@@ -83,9 +114,10 @@ export interface SessionClient {
|
|
|
83
114
|
capabilities(): readonly GrantCapability[];
|
|
84
115
|
/**
|
|
85
116
|
* Complete ChatGPT/Codex device-code login. Provider id is locked to
|
|
86
|
-
* `openai-codex`; callers cannot select another.
|
|
117
|
+
* `openai-codex`; callers cannot select another. `name` is an optional alias
|
|
118
|
+
* entry name (defaults to the canonical provider id). Resolves on the ack.
|
|
87
119
|
*/
|
|
88
|
-
completeProviderAuth(credential: ChatGptCredentialInput): Promise<void>;
|
|
120
|
+
completeProviderAuth(credential: ChatGptCredentialInput, name?: string): Promise<void>;
|
|
89
121
|
/**
|
|
90
122
|
* Register a custom provider (base URL + API key + surface) on the attached
|
|
91
123
|
* host. Sends `add-custom-provider` and resolves on the ack.
|
|
@@ -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,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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";
|
|
@@ -364,7 +364,9 @@ function createSessionController(deps) {
|
|
|
364
364
|
}
|
|
365
365
|
void startTrackedTurn(next.input, {
|
|
366
366
|
turnId: next.opts.turnId,
|
|
367
|
-
allowSteering: next.opts.turnId === void 0
|
|
367
|
+
allowSteering: next.opts.turnId === void 0,
|
|
368
|
+
submission: next.opts.submission ?? { origin: "user" },
|
|
369
|
+
...next.opts.signal === void 0 ? {} : { signal: next.opts.signal }
|
|
368
370
|
});
|
|
369
371
|
}
|
|
370
372
|
function finalizeTurn(controller, reason) {
|
|
@@ -376,6 +378,11 @@ function createSessionController(deps) {
|
|
|
376
378
|
}
|
|
377
379
|
async function runTurn(input, opts) {
|
|
378
380
|
const controller = new AbortController();
|
|
381
|
+
const abortFromCaller = () => controller.abort(opts.signal?.reason);
|
|
382
|
+
if (opts.signal !== void 0) {
|
|
383
|
+
if (opts.signal.aborted) abortFromCaller();
|
|
384
|
+
else opts.signal.addEventListener("abort", abortFromCaller, { once: true });
|
|
385
|
+
}
|
|
379
386
|
const drainSteering = async () => {
|
|
380
387
|
if (abortController !== controller || controller.signal.aborted) return [];
|
|
381
388
|
const barrierIndex = queue.findIndex((entry) => entry.delivery === "next-turn");
|
|
@@ -433,7 +440,12 @@ function createSessionController(deps) {
|
|
|
433
440
|
}
|
|
434
441
|
finalInput = guarded.prompt;
|
|
435
442
|
}
|
|
436
|
-
const compactionSend = (text) => runTurn(text, {
|
|
443
|
+
const compactionSend = (text) => runTurn(text, {
|
|
444
|
+
systemInitiated: true,
|
|
445
|
+
allowSteering: opts.allowSteering,
|
|
446
|
+
submission: opts.submission,
|
|
447
|
+
...opts.signal === void 0 ? {} : { signal: opts.signal }
|
|
448
|
+
});
|
|
437
449
|
const compactionIo = {
|
|
438
450
|
signal: controller.signal,
|
|
439
451
|
send: compactionSend,
|
|
@@ -457,6 +469,7 @@ function createSessionController(deps) {
|
|
|
457
469
|
const result = await deps.agent.send(finalInput, {
|
|
458
470
|
streaming: true,
|
|
459
471
|
signal: controller.signal,
|
|
472
|
+
submission: opts.submission,
|
|
460
473
|
...opts.allowSteering ? { drainSteering } : {}
|
|
461
474
|
});
|
|
462
475
|
if (typeof result === "object" && result !== null && "status" in result && result.status === "aborted") {
|
|
@@ -488,6 +501,7 @@ function createSessionController(deps) {
|
|
|
488
501
|
}
|
|
489
502
|
}
|
|
490
503
|
} finally {
|
|
504
|
+
opts.signal?.removeEventListener("abort", abortFromCaller);
|
|
491
505
|
const ownedTurn = finalizeTurn(
|
|
492
506
|
controller,
|
|
493
507
|
"Turn ended before pending interactions could be resolved."
|
|
@@ -703,6 +717,9 @@ function createSessionController(deps) {
|
|
|
703
717
|
isHostBusy() {
|
|
704
718
|
return hostBusyCount > 0;
|
|
705
719
|
},
|
|
720
|
+
isTurnActive() {
|
|
721
|
+
return abortController !== null;
|
|
722
|
+
},
|
|
706
723
|
onEvent(listener) {
|
|
707
724
|
listeners.add(listener);
|
|
708
725
|
return () => listeners.delete(listener);
|
|
@@ -725,19 +742,24 @@ function createSessionController(deps) {
|
|
|
725
742
|
publishWorkflowProgress(runId, delta) {
|
|
726
743
|
emit({ type: "workflow-progress", runId, delta });
|
|
727
744
|
},
|
|
728
|
-
reset() {
|
|
745
|
+
reset(options = {}) {
|
|
729
746
|
if (persistenceInFlight.size > 0) {
|
|
730
747
|
return;
|
|
731
748
|
}
|
|
732
749
|
queue.length = 0;
|
|
733
|
-
hostBusyCount = 0;
|
|
750
|
+
if (options.preserveHostBusy !== true) hostBusyCount = 0;
|
|
734
751
|
abortController?.abort(new Error("Session reset."));
|
|
735
752
|
rejectAllPending("Session reset; pending interactions were cancelled.");
|
|
736
753
|
alwaysApproved.clear();
|
|
737
754
|
approvalMode = "readOnly";
|
|
738
755
|
emit({
|
|
739
756
|
type: "state-reset",
|
|
740
|
-
state: {
|
|
757
|
+
state: {
|
|
758
|
+
...createSessionViewState(),
|
|
759
|
+
busy: hostBusyCount > 0,
|
|
760
|
+
meta: state.meta,
|
|
761
|
+
mcp: state.mcp
|
|
762
|
+
}
|
|
741
763
|
});
|
|
742
764
|
},
|
|
743
765
|
setApprovalMode(mode) {
|
|
@@ -754,6 +776,7 @@ function createSessionController(deps) {
|
|
|
754
776
|
},
|
|
755
777
|
async submit(input, opts) {
|
|
756
778
|
if (closing) throw new Error("Session is closing.");
|
|
779
|
+
opts.signal?.throwIfAborted();
|
|
757
780
|
if (abortController || hostBusyCount > 0) {
|
|
758
781
|
queue.push({
|
|
759
782
|
id: `q-${++queueCounter}`,
|
|
@@ -776,7 +799,9 @@ function createSessionController(deps) {
|
|
|
776
799
|
}
|
|
777
800
|
await startTrackedTurn(input, {
|
|
778
801
|
turnId: opts.turnId,
|
|
779
|
-
allowSteering: opts.turnId === void 0
|
|
802
|
+
allowSteering: opts.turnId === void 0,
|
|
803
|
+
submission: opts.submission ?? { origin: "user" },
|
|
804
|
+
...opts.signal === void 0 ? {} : { signal: opts.signal }
|
|
780
805
|
});
|
|
781
806
|
}
|
|
782
807
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentMetricsSnapshot } from "@nuvin/agent-core/agent";
|
|
2
|
-
import { type AgentInput, type AskUserAnswers, type Message, type SteeringInputDrain } from "@nuvin/agent-core/shared";
|
|
2
|
+
import { type AgentInput, type AgentSubmission, type AskUserAnswers, type Message, type SteeringInputDrain } from "@nuvin/agent-core/shared";
|
|
3
3
|
import type { BashPolicyApprovalDiagnostics, McpAuthFlowState, McpViewState, PersistBashPermissionRequest, PersistBashPermissionResult, ServerEvent, SessionMeta, SessionSnapshot, SlashCommandDescriptor, WorkflowProgressDelta } from "../protocol/types.ts";
|
|
4
4
|
import { type SessionApprovalMode } from "../state/approvals.ts";
|
|
5
5
|
import type { AgentChannel } from "./agent-channel.ts";
|
|
@@ -11,6 +11,7 @@ export type AgentLike = {
|
|
|
11
11
|
streaming: boolean;
|
|
12
12
|
signal: AbortSignal;
|
|
13
13
|
drainSteering?: SteeringInputDrain;
|
|
14
|
+
submission: AgentSubmission;
|
|
14
15
|
}): Promise<unknown>;
|
|
15
16
|
};
|
|
16
17
|
export type GuardResult = {
|
|
@@ -62,6 +63,10 @@ export interface SessionControllerDeps {
|
|
|
62
63
|
export type SubmitOptions = {
|
|
63
64
|
displayText: string;
|
|
64
65
|
attachmentLabels?: string[];
|
|
66
|
+
/** Immutable ownership metadata forwarded with this exact agent send. */
|
|
67
|
+
submission?: AgentSubmission;
|
|
68
|
+
/** Optional caller cancellation that remains linked for the full turn. */
|
|
69
|
+
signal?: AbortSignal;
|
|
65
70
|
/**
|
|
66
71
|
* When true, submit emits no `user-message` event (slash-initiated turns
|
|
67
72
|
* already echoed their text). `displayText` may be `""` in that case.
|
|
@@ -109,6 +114,8 @@ export interface SessionController {
|
|
|
109
114
|
getSnapshot(): SessionSnapshot;
|
|
110
115
|
/** Return whether a host-controlled server operation currently owns busy state. */
|
|
111
116
|
isHostBusy(): boolean;
|
|
117
|
+
/** Return whether an agent turn is currently active, independent of host busy state. */
|
|
118
|
+
isTurnActive(): boolean;
|
|
112
119
|
onEvent(listener: (event: ServerEvent) => void): () => void;
|
|
113
120
|
/**
|
|
114
121
|
* Replace the server-executed slash-command descriptors surfaced in the attach
|
|
@@ -145,9 +152,12 @@ export interface SessionController {
|
|
|
145
152
|
* a state-reset with a fresh view state CARRYING OVER the last published
|
|
146
153
|
* meta and authoritative MCP state. Runtime-side resets
|
|
147
154
|
* (sessionStore.startNewSession, agent system prompt, metrics) are the HOST's
|
|
148
|
-
* 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.
|
|
149
157
|
*/
|
|
150
|
-
reset(
|
|
158
|
+
reset(options?: Readonly<{
|
|
159
|
+
preserveHostBusy?: boolean;
|
|
160
|
+
}>): void;
|
|
151
161
|
setApprovalMode(mode: SessionApprovalMode): void;
|
|
152
162
|
setBusy(busy: boolean): void;
|
|
153
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,cAAc,EAEnB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EAGxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAEV,6BAA6B,EAC7B,gBAAgB,EAChB,YAAY,EAEZ,4BAA4B,EAC5B,2BAA2B,EAC3B,WAAW,EAEX,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,6BAA6B,GAAG,MAAM,CAazF;AAED,gGAAgG;AAChG,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CACF,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE;QACJ,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,WAAW,CAAC;QACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;
|
|
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,KAAK,OAAO,EACZ,KAAK,kBAAkB,EAGxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAEV,6BAA6B,EAC7B,gBAAgB,EAChB,YAAY,EAEZ,4BAA4B,EAC5B,2BAA2B,EAC3B,WAAW,EAEX,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,6BAA6B,GAAG,MAAM,CAazF;AAED,gGAAgG;AAChG,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,IAAI,CACF,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE;QACJ,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,WAAW,CAAC;QACpB,aAAa,CAAC,EAAE,kBAAkB,CAAC;QACnC,UAAU,EAAE,eAAe,CAAC;KAC7B,GACA,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC;AAInF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,+EAA+E;IAC/E,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IA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