@chatcode/chatcode-cli 3.0.4-rc.1 → 3.0.4-rc.2
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/lib/{command-errors-BkCHTQHj.js → command-errors-CScdshCl.js} +12 -12
- package/lib/{command-trees-5HFyC5sI.js → command-trees-Dc17MYfV.js} +2 -2
- package/lib/{component-identity-De91VHwW.js → component-identity-DFJD_d-P.js} +3 -3
- package/lib/{dist-CsDWUvQ4.js → dist-w_sIm4VD.js} +231 -231
- package/lib/{extension-events-CdYCRP0o.js → extension-events-qXmhzmHo.js} +26 -26
- package/lib/{frames-DOX-Jgk8.js → frames-B89znn_0.js} +4 -4
- package/lib/{host-access-Bk4xps5E.js → host-access-B0CRAwsX.js} +1 -1
- package/lib/{keymap-CJ1kvLR2.js → keymap-CIoVICBI.js} +2 -2
- package/lib/{plugin-XR7ncbnW.js → plugin-BKQsL2xn.js} +1638 -1363
- package/lib/{scenes-CAmWncZD.js → scenes-BRf-zMpF.js} +3 -3
- package/lib/{settings-sections-CakcvBv9.js → settings-sections-4gMhveN_.js} +3 -3
- package/lib/{statusBarSettings-BPPS_Usm.js → statusBarSettings-CnmdSHkO.js} +3 -3
- package/lib/{supports-color-DyChQwlI.js → supports-color-CcW-FGjr.js} +2 -2
- package/lib/{themes-OjcUpZzw.js → themes-Ce97Zsri.js} +12 -12
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +4 -4
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +5 -5
- package/lib/{workspaces-XY7UdfXp.js → workspaces-1xrm-e3V.js} +2 -2
- package/package.json +29 -28
- package/runtime/manifest.json +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +118 -22
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +20 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +113 -39
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.d.ts +3 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +173 -34
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +48 -28
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +24 -19
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +9 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +36 -6
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +4 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +24 -8
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +31 -14
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +89 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/remote-events.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +18 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +30 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +83 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +104 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.d.ts +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +78 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.d.ts +14 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +44 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/types.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +931 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +57 -19
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/client/index.d.ts +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/config.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/events.d.ts +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/index.d.ts +3 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/package.json +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +8 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1917 -206
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/contract/slots.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/recent.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/RecentList.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/Rows.d.ts +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/stores.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/tree.d.ts +15 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/index.js +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.remote-client.js +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/index.js +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/types.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/types/index.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +95 -2
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/types/index.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +25 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/types/observation.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/lib/index.js +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +106 -56
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +4 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +103 -12
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +215 -4
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +219 -2
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +4 -0
package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.d.ts
CHANGED
|
@@ -85,6 +85,19 @@ export interface IWorkspaces {
|
|
|
85
85
|
* @param sessionId - Session to unarchive.
|
|
86
86
|
*/
|
|
87
87
|
unarchiveSession(sessionId: SessionId): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Preview the archived root and owned subagent identities before confirmation.
|
|
90
|
+
* @param sessionId - archived root identity.
|
|
91
|
+
* @returns the identities covered by confirmation.
|
|
92
|
+
*/
|
|
93
|
+
sessionDeletionScope(sessionId: SessionId): Promise<readonly SessionId[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Permanently delete exactly the confirmed scope; live or changed scopes reject.
|
|
96
|
+
* @param sessionId - archived root identity.
|
|
97
|
+
* @param expectedSessionIds - identities confirmed by the user.
|
|
98
|
+
* @returns the identities removed after durable cleanup.
|
|
99
|
+
*/
|
|
100
|
+
deleteSession(sessionId: SessionId, expectedSessionIds: readonly SessionId[]): Promise<readonly SessionId[]>;
|
|
88
101
|
/**
|
|
89
102
|
* Pin a Session ahead of unpinned Sessions on Workspace grouping surfaces.
|
|
90
103
|
* @param sessionId - Session to pin.
|
|
@@ -124,6 +137,8 @@ export declare class WorkspaceController extends Service implements IWorkspaces
|
|
|
124
137
|
readonly stopActivity?: boolean;
|
|
125
138
|
}): Promise<void>;
|
|
126
139
|
unarchiveSession(sessionId: SessionId): Promise<void>;
|
|
140
|
+
sessionDeletionScope(sessionId: SessionId): Promise<readonly SessionId[]>;
|
|
141
|
+
deleteSession(sessionId: SessionId, expectedSessionIds: readonly SessionId[]): Promise<readonly SessionId[]>;
|
|
127
142
|
pinSession(sessionId: SessionId): Promise<void>;
|
|
128
143
|
unpinSession(sessionId: SessionId): Promise<void>;
|
|
129
144
|
insertSessionBefore(workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId): Promise<WorkspaceView>;
|
package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js
CHANGED
|
@@ -75,6 +75,18 @@ export class WorkspaceController extends Service {
|
|
|
75
75
|
if (!result.ok)
|
|
76
76
|
throw commandError('session unarchive', result.error);
|
|
77
77
|
}
|
|
78
|
+
async sessionDeletionScope(sessionId) {
|
|
79
|
+
const result = await this.model.sessionDeletionScope(sessionId);
|
|
80
|
+
if (!result.ok)
|
|
81
|
+
throw new WorkspaceArchiveError(result.error);
|
|
82
|
+
return result.value.sessionIds;
|
|
83
|
+
}
|
|
84
|
+
async deleteSession(sessionId, expectedSessionIds) {
|
|
85
|
+
const result = await this.model.deleteSession(sessionId, expectedSessionIds);
|
|
86
|
+
if (!result.ok)
|
|
87
|
+
throw new WorkspaceArchiveError(result.error);
|
|
88
|
+
return result.value.sessionIds;
|
|
89
|
+
}
|
|
78
90
|
async pinSession(sessionId) {
|
|
79
91
|
const result = await this.model.pinSession(sessionId);
|
|
80
92
|
if (!result.ok)
|
package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Workspace command implementation and stable Remote failure mapping. */
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue } from './types.ts';
|
|
3
|
+
import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue, WorkspaceSessionDeletionPreviewRequest, WorkspaceSessionDeletionRequest, WorkspaceSessionDeletionValue } from './types.ts';
|
|
4
4
|
/** Implements Workspace mutations against the authoritative registry. */
|
|
5
5
|
export declare class WorkspaceCommands {
|
|
6
6
|
private readonly ctx;
|
|
@@ -54,6 +54,18 @@ export declare class WorkspaceCommands {
|
|
|
54
54
|
* @returns the complete resulting archive set.
|
|
55
55
|
*/
|
|
56
56
|
unarchiveSession(request: WorkspaceUnarchiveSessionRequest): Promise<WorkspaceArchiveValue>;
|
|
57
|
+
/**
|
|
58
|
+
* Preview the Session identities that would be permanently deleted.
|
|
59
|
+
* @param request - archived root to preview.
|
|
60
|
+
* @returns the complete deletion scope for confirmation.
|
|
61
|
+
*/
|
|
62
|
+
sessionDeletionScope(request: WorkspaceSessionDeletionPreviewRequest): Promise<WorkspaceSessionDeletionValue>;
|
|
63
|
+
/**
|
|
64
|
+
* Delete an archived root and exactly its confirmed owned subagent scope.
|
|
65
|
+
* @param request - root and user-confirmed deletion scope.
|
|
66
|
+
* @returns identities removed after persistence and owner cleanup complete.
|
|
67
|
+
*/
|
|
68
|
+
deleteSession(request: WorkspaceSessionDeletionRequest): Promise<WorkspaceSessionDeletionValue>;
|
|
57
69
|
/**
|
|
58
70
|
* Add one known unarchived Session to the registry-global pin set.
|
|
59
71
|
* @param request - Session identity to pin.
|
package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Workspace command implementation and stable Remote failure mapping. */
|
|
2
|
-
import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceUnknownSessionError, } from '@deepseek-ai/dsh-workspace';
|
|
2
|
+
import { WorkspaceActiveSessionError, WorkspaceArchivedSessionPinError, WorkspaceId, WorkspaceMoveInvalidError, WorkspaceOrderInvalidError, WorkspaceUnknownSessionError, WorkspaceSessionDeletionError, } from '@deepseek-ai/dsh-workspace';
|
|
3
3
|
import { RemoteError, remoteErrorOf } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
4
|
import { workspaceView } from "./feed.js";
|
|
5
5
|
/** Implements Workspace mutations against the authoritative registry. */
|
|
@@ -138,9 +138,40 @@ export class WorkspaceCommands {
|
|
|
138
138
|
* @returns the complete resulting archive set.
|
|
139
139
|
*/
|
|
140
140
|
async unarchiveSession(request) {
|
|
141
|
-
|
|
141
|
+
try {
|
|
142
|
+
await this.ctx.workspaceRegistry.unarchiveSession(request.sessionId);
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
throw deletionError(error, request.sessionId);
|
|
146
|
+
}
|
|
142
147
|
return { archivedSessionIds: [...this.ctx.workspaceRegistry.archivedSessionIds] };
|
|
143
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Preview the Session identities that would be permanently deleted.
|
|
151
|
+
* @param request - archived root to preview.
|
|
152
|
+
* @returns the complete deletion scope for confirmation.
|
|
153
|
+
*/
|
|
154
|
+
async sessionDeletionScope(request) {
|
|
155
|
+
try {
|
|
156
|
+
return { sessionIds: await this.ctx.workspaceRegistry.sessionDeletionScope(request.sessionId) };
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
throw deletionError(error, request.sessionId);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Delete an archived root and exactly its confirmed owned subagent scope.
|
|
164
|
+
* @param request - root and user-confirmed deletion scope.
|
|
165
|
+
* @returns identities removed after persistence and owner cleanup complete.
|
|
166
|
+
*/
|
|
167
|
+
async deleteSession(request) {
|
|
168
|
+
try {
|
|
169
|
+
return { sessionIds: await this.ctx.workspaceRegistry.deleteSession(request.sessionId, request.expectedSessionIds) };
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
throw deletionError(error, request.sessionId);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
144
175
|
/**
|
|
145
176
|
* Add one known unarchived Session to the registry-global pin set.
|
|
146
177
|
* @param request - Session identity to pin.
|
|
@@ -187,6 +218,17 @@ export class WorkspaceCommands {
|
|
|
187
218
|
function workspaceNotFound(workspaceId) {
|
|
188
219
|
return new RemoteError('workspace/not-found', `Workspace "${workspaceId}" not found`, { workspaceId });
|
|
189
220
|
}
|
|
221
|
+
function deletionError(error, sessionId) {
|
|
222
|
+
if (error instanceof WorkspaceSessionDeletionError) {
|
|
223
|
+
return new RemoteError('workspace/session-delete-refused', 'Session deletion refused', {
|
|
224
|
+
sessionId, reason: error.reason,
|
|
225
|
+
}, { cause: error });
|
|
226
|
+
}
|
|
227
|
+
if (error instanceof WorkspaceActiveSessionError) {
|
|
228
|
+
return new RemoteError('workspace/session-active', error.message, { sessionId, activity: error.activity }, { cause: error });
|
|
229
|
+
}
|
|
230
|
+
return error;
|
|
231
|
+
}
|
|
190
232
|
function errorMessage(error) {
|
|
191
233
|
return error instanceof Error ? error.message : String(error);
|
|
192
234
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Context } from '@deepseek-ai/cordis';
|
|
3
3
|
import z from '@deepseek-ai/schemastery';
|
|
4
4
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
5
|
-
import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceFollowFrame, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceUnpinSessionRequest, WorkspaceValue } from './types.ts';
|
|
5
|
+
import type { WorkspaceArchiveSessionRequest, WorkspaceArchiveValue, WorkspaceCreateRequest, WorkspaceCreateValue, WorkspaceDeleteRequest, WorkspaceDeleteValue, WorkspaceFollowFrame, WorkspaceInsertBeforeRequest, WorkspaceInsertSessionBeforeRequest, WorkspaceOrderValue, WorkspacePinSessionRequest, WorkspacePinValue, WorkspaceRenameRequest, WorkspaceUnarchiveSessionRequest, WorkspaceSessionDeletionPreviewRequest, WorkspaceSessionDeletionRequest, WorkspaceSessionDeletionValue, WorkspaceUnpinSessionRequest, WorkspaceValue } from './types.ts';
|
|
6
6
|
export type * from './types.ts';
|
|
7
7
|
export { DirectoryPickerController } from './directory-picker.ts';
|
|
8
8
|
/** First-use directory policy for the Host account. */
|
|
@@ -85,6 +85,18 @@ export declare class WorkspaceController extends TypertRemoteService {
|
|
|
85
85
|
* @returns the complete resulting archive set.
|
|
86
86
|
*/
|
|
87
87
|
unarchiveSession(request: WorkspaceUnarchiveSessionRequest): Promise<WorkspaceArchiveValue>;
|
|
88
|
+
/**
|
|
89
|
+
* Preview the archived root and owned subagent Sessions covered by deletion.
|
|
90
|
+
* @param request - archived root to preview.
|
|
91
|
+
* @returns complete deletion scope for confirmation.
|
|
92
|
+
*/
|
|
93
|
+
sessionDeletionScope(request: WorkspaceSessionDeletionPreviewRequest): Promise<WorkspaceSessionDeletionValue>;
|
|
94
|
+
/**
|
|
95
|
+
* Permanently remove an archived Session and its confirmed owned subagents.
|
|
96
|
+
* @param request - archived root and confirmed scope.
|
|
97
|
+
* @returns identities permanently removed.
|
|
98
|
+
*/
|
|
99
|
+
deleteSession(request: WorkspaceSessionDeletionRequest): Promise<WorkspaceSessionDeletionValue>;
|
|
88
100
|
/**
|
|
89
101
|
* Surface one known unarchived Session ahead of unpinned Sessions.
|
|
90
102
|
* @param request - Session identity to pin.
|
|
@@ -52,6 +52,8 @@ let WorkspaceController = (() => {
|
|
|
52
52
|
let _insertSessionBefore_decorators;
|
|
53
53
|
let _archiveSession_decorators;
|
|
54
54
|
let _unarchiveSession_decorators;
|
|
55
|
+
let _sessionDeletionScope_decorators;
|
|
56
|
+
let _deleteSession_decorators;
|
|
55
57
|
let _pinSession_decorators;
|
|
56
58
|
let _unpinSession_decorators;
|
|
57
59
|
let _follow_decorators;
|
|
@@ -66,6 +68,8 @@ let WorkspaceController = (() => {
|
|
|
66
68
|
_insertSessionBefore_decorators = [Remote('insertSessionBefore')];
|
|
67
69
|
_archiveSession_decorators = [Remote('archiveSession')];
|
|
68
70
|
_unarchiveSession_decorators = [Remote('unarchiveSession')];
|
|
71
|
+
_sessionDeletionScope_decorators = [Remote('sessionDeletionScope')];
|
|
72
|
+
_deleteSession_decorators = [Remote('deleteSession')];
|
|
69
73
|
_pinSession_decorators = [Remote('pinSession')];
|
|
70
74
|
_unpinSession_decorators = [Remote('unpinSession')];
|
|
71
75
|
_follow_decorators = [Remote({ mode: 'stream' })];
|
|
@@ -77,6 +81,8 @@ let WorkspaceController = (() => {
|
|
|
77
81
|
__esDecorate(this, null, _insertSessionBefore_decorators, { kind: "method", name: "insertSessionBefore", static: false, private: false, access: { has: obj => "insertSessionBefore" in obj, get: obj => obj.insertSessionBefore }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
78
82
|
__esDecorate(this, null, _archiveSession_decorators, { kind: "method", name: "archiveSession", static: false, private: false, access: { has: obj => "archiveSession" in obj, get: obj => obj.archiveSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
79
83
|
__esDecorate(this, null, _unarchiveSession_decorators, { kind: "method", name: "unarchiveSession", static: false, private: false, access: { has: obj => "unarchiveSession" in obj, get: obj => obj.unarchiveSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
84
|
+
__esDecorate(this, null, _sessionDeletionScope_decorators, { kind: "method", name: "sessionDeletionScope", static: false, private: false, access: { has: obj => "sessionDeletionScope" in obj, get: obj => obj.sessionDeletionScope }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
85
|
+
__esDecorate(this, null, _deleteSession_decorators, { kind: "method", name: "deleteSession", static: false, private: false, access: { has: obj => "deleteSession" in obj, get: obj => obj.deleteSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
80
86
|
__esDecorate(this, null, _pinSession_decorators, { kind: "method", name: "pinSession", static: false, private: false, access: { has: obj => "pinSession" in obj, get: obj => obj.pinSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
81
87
|
__esDecorate(this, null, _unpinSession_decorators, { kind: "method", name: "unpinSession", static: false, private: false, access: { has: obj => "unpinSession" in obj, get: obj => obj.unpinSession }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
82
88
|
__esDecorate(this, null, _follow_decorators, { kind: "method", name: "follow", static: false, private: false, access: { has: obj => "follow" in obj, get: obj => obj.follow }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
@@ -178,6 +184,22 @@ let WorkspaceController = (() => {
|
|
|
178
184
|
unarchiveSession(request) {
|
|
179
185
|
return this.commands.unarchiveSession(request);
|
|
180
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Preview the archived root and owned subagent Sessions covered by deletion.
|
|
189
|
+
* @param request - archived root to preview.
|
|
190
|
+
* @returns complete deletion scope for confirmation.
|
|
191
|
+
*/
|
|
192
|
+
sessionDeletionScope(request) {
|
|
193
|
+
return this.commands.sessionDeletionScope(request);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Permanently remove an archived Session and its confirmed owned subagents.
|
|
197
|
+
* @param request - archived root and confirmed scope.
|
|
198
|
+
* @returns identities permanently removed.
|
|
199
|
+
*/
|
|
200
|
+
deleteSession(request) {
|
|
201
|
+
return this.commands.deleteSession(request);
|
|
202
|
+
}
|
|
181
203
|
/**
|
|
182
204
|
* Surface one known unarchived Session ahead of unpinned Sessions.
|
|
183
205
|
* @param request - Session identity to pin.
|
|
@@ -42,6 +42,11 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
42
42
|
readonly sessionId: SessionId;
|
|
43
43
|
readonly activity: readonly SessionActivity[];
|
|
44
44
|
};
|
|
45
|
+
/** Permanent deletion was refused before storage mutation. */
|
|
46
|
+
'workspace/session-delete-refused': {
|
|
47
|
+
readonly sessionId: SessionId;
|
|
48
|
+
readonly reason: 'not-archived' | 'in-use' | 'deleted' | 'scope-changed';
|
|
49
|
+
};
|
|
45
50
|
/** The Session or its anchor is not in the Workspace's manual order. */
|
|
46
51
|
'workspace/move-invalid': {
|
|
47
52
|
readonly workspaceId: WorkspaceId;
|
|
@@ -123,6 +128,18 @@ export interface WorkspaceArchiveSessionRequest {
|
|
|
123
128
|
export interface WorkspaceUnarchiveSessionRequest {
|
|
124
129
|
readonly sessionId: SessionId;
|
|
125
130
|
}
|
|
131
|
+
/** Archived root whose deletion scope is requested. */
|
|
132
|
+
export interface WorkspaceSessionDeletionPreviewRequest {
|
|
133
|
+
readonly sessionId: SessionId;
|
|
134
|
+
}
|
|
135
|
+
/** Archived root and the exact scope confirmed by the user. */
|
|
136
|
+
export interface WorkspaceSessionDeletionRequest extends WorkspaceSessionDeletionPreviewRequest {
|
|
137
|
+
readonly expectedSessionIds: readonly SessionId[];
|
|
138
|
+
}
|
|
139
|
+
/** Root and owned subagent identities; independent forks are excluded. */
|
|
140
|
+
export interface WorkspaceSessionDeletionValue {
|
|
141
|
+
readonly sessionIds: readonly SessionId[];
|
|
142
|
+
}
|
|
126
143
|
/** Complete archived Session set after a mutation. */
|
|
127
144
|
export interface WorkspaceArchiveValue {
|
|
128
145
|
readonly archivedSessionIds: readonly SessionId[];
|