t3code-cli 0.14.1 → 0.15.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/README.md +37 -1
- package/dist/application.d.ts +2 -2
- package/dist/application.js +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +1 -1
- package/dist/bin.js +1305 -424
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/client-runtime/authorization.d.ts +1 -1
- package/dist/client-runtime/authorization.js +1 -1
- package/dist/client-runtime/connection.d.ts +1 -1
- package/dist/client-runtime/connection.js +1 -1
- package/dist/client-runtime/environment.d.ts +7 -1
- package/dist/client-runtime/environment.js +1 -1
- package/dist/client-runtime/errors.js +1 -1
- package/dist/client-runtime/operations/projects.d.ts +2 -2
- package/dist/client-runtime/operations/projects.js +2 -2
- package/dist/client-runtime/operations.d.ts +2 -2
- package/dist/client-runtime/operations.js +2 -2
- package/dist/client-runtime/platform.d.ts +1 -1
- package/dist/client-runtime/platform.js +1 -1
- package/dist/client-runtime/relay.d.ts +13 -2
- package/dist/client-runtime/relay.js +12 -2
- package/dist/client-runtime/rpc.d.ts +2 -2
- package/dist/client-runtime/rpc.js +2 -2
- package/dist/client-runtime/state/assets.d.ts +17 -11
- package/dist/client-runtime/state/assets.js +1 -1
- package/dist/client-runtime/state/auth.d.ts +1 -1
- package/dist/client-runtime/state/auth.js +1 -1
- package/dist/client-runtime/state/connections.js +1 -1
- package/dist/client-runtime/state/entities.d.ts +1 -1
- package/dist/client-runtime/state/entities.js +1 -1
- package/dist/client-runtime/state/filesystem.d.ts +1 -1
- package/dist/client-runtime/state/filesystem.js +1 -1
- package/dist/client-runtime/state/git.d.ts +6 -5
- package/dist/client-runtime/state/git.js +1 -1
- package/dist/client-runtime/state/models.d.ts +1 -1
- package/dist/client-runtime/state/models.js +1 -1
- package/dist/client-runtime/state/orchestration.d.ts +42 -2
- package/dist/client-runtime/state/orchestration.js +13 -1
- package/dist/client-runtime/state/presentation.d.ts +15 -3
- package/dist/client-runtime/state/presentation.js +1 -1
- package/dist/client-runtime/state/preview.d.ts +58 -48
- package/dist/client-runtime/state/preview.js +3 -2
- package/dist/client-runtime/state/project-grouping.d.ts +26 -2
- package/dist/client-runtime/state/project-grouping.js +83 -3
- package/dist/client-runtime/state/projects.d.ts +24 -18
- package/dist/client-runtime/state/projects.js +1 -1
- package/dist/client-runtime/state/pull-requests.d.ts +478 -0
- package/dist/client-runtime/state/pull-requests.js +172 -0
- package/dist/client-runtime/state/relay.d.ts +1 -1
- package/dist/client-runtime/state/relay.js +1 -1
- package/dist/client-runtime/state/review.d.ts +16 -1
- package/dist/client-runtime/state/review.js +27 -6
- package/dist/client-runtime/state/runtime.d.ts +2 -2
- package/dist/client-runtime/state/runtime.js +2 -2
- package/dist/client-runtime/state/server.d.ts +311 -172
- package/dist/client-runtime/state/server.js +192 -16
- package/dist/client-runtime/state/session.d.ts +77 -7
- package/dist/client-runtime/state/session.js +32 -3
- package/dist/client-runtime/state/shell.d.ts +47 -7
- package/dist/client-runtime/state/shell.js +1 -1
- package/dist/client-runtime/state/source-control.d.ts +2 -2
- package/dist/client-runtime/state/source-control.js +1 -1
- package/dist/client-runtime/state/subagentRuntime.d.ts +145 -0
- package/dist/client-runtime/state/subagentRuntime.js +521 -0
- package/dist/client-runtime/state/terminal.d.ts +17 -17
- package/dist/client-runtime/state/terminal.js +1 -1
- package/dist/client-runtime/state/thread-search.d.ts +23 -0
- package/dist/client-runtime/state/thread-search.js +38 -0
- package/dist/client-runtime/state/thread-settled.d.ts +32 -4
- package/dist/client-runtime/state/thread-settled.js +2 -157
- package/dist/client-runtime/state/thread-sort.d.ts +59 -2
- package/dist/client-runtime/state/thread-sort.js +128 -2
- package/dist/client-runtime/state/threads.d.ts +115 -3
- package/dist/client-runtime/state/threads.js +309 -28
- package/dist/client-runtime/state/vcs.d.ts +14 -14
- package/dist/client-runtime/state/vcs.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/connection.d.ts +1 -1
- package/dist/connection.js +1 -1
- package/dist/contracts.d.ts +1 -1
- package/dist/contracts.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/orchestration.d.ts +155 -6
- package/dist/orchestration.js +2 -2
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +1 -1
- package/dist/rpc.d.ts +887 -360
- package/dist/rpc.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/shared/DrainableWorker.js +1 -1
- package/dist/shared/KeyedCoalescingWorker.js +1 -1
- package/dist/shared/Net.d.ts +6 -0
- package/dist/shared/Net.js +2 -1
- package/dist/shared/advertisedEndpoint.d.ts +1 -1
- package/dist/shared/advertisedEndpoint.js +1 -1
- package/dist/shared/agentAwareness.d.ts +1 -1
- package/dist/shared/backgroundActivitySettings.d.ts +1 -1
- package/dist/shared/composerInlineTokens.js +1 -1
- package/dist/shared/connectAuth.d.ts +23 -4
- package/dist/shared/connectAuth.js +40 -7
- package/dist/shared/devHome.js +1 -1
- package/dist/shared/dpop.js +1 -1
- package/dist/shared/git.d.ts +1 -1
- package/dist/shared/httpObservability.js +1 -1
- package/dist/shared/httpReadiness.js +1 -1
- package/dist/shared/keybindings.d.ts +2 -2
- package/dist/shared/keybindings.js +15 -1
- package/dist/shared/model.d.ts +1 -1
- package/dist/shared/oauthScope.js +1 -1
- package/dist/shared/observability.d.ts +8 -1
- package/dist/shared/observability.js +49 -5
- package/dist/shared/path.js +1 -1
- package/dist/shared/preview.js +1 -1
- package/dist/shared/previewViewport.d.ts +1 -1
- package/dist/shared/previewViewport.js +1 -1
- package/dist/shared/projectFavicon.d.ts +2 -1
- package/dist/shared/projectFavicon.js +13 -1
- package/dist/shared/projectScripts.d.ts +1 -1
- package/dist/shared/relayAuth.js +1 -1
- package/dist/shared/relayClient.d.ts +1 -1
- package/dist/shared/relayClient.js +1 -1
- package/dist/shared/relayJwt.js +1 -1
- package/dist/shared/relayTracing.js +1 -1
- package/dist/shared/relayUrl.js +1 -1
- package/dist/shared/remote.js +1 -1
- package/dist/shared/schemaYaml.js +3 -3
- package/dist/shared/semver.js +1 -1
- package/dist/shared/serverSettings.d.ts +1 -1
- package/dist/shared/serverSettings.js +1 -1
- package/dist/shared/shell.d.ts +6 -1
- package/dist/shared/shell.js +42 -4
- package/dist/shared/sourceControl.d.ts +1 -1
- package/dist/shared/t3ProjectFile.d.ts +9 -1
- package/dist/shared/t3ProjectFile.js +12 -2
- package/dist/shared/terminalLabels.d.ts +1 -1
- package/dist/shared/threadEnvMode.d.ts +29 -0
- package/dist/shared/threadEnvMode.js +24 -0
- package/dist/shared/toolActivity.d.ts +1 -1
- package/dist/shared/usageFormat.d.ts +34 -0
- package/dist/shared/usageFormat.js +176 -0
- package/dist/shared/usageMerge.d.ts +78 -0
- package/dist/shared/usageMerge.js +241 -0
- package/dist/shared.d.ts +8268 -1372
- package/dist/shared.js +22185 -19774
- package/dist/t3tools.d.ts +2 -2
- package/dist/t3tools.js +2 -2
- package/package.json +5 -5
- package/src/application/error.ts +2 -2
- package/src/application/index.ts +2 -0
- package/src/application/service.ts +43 -5
- package/src/application/thread-commands.ts +78 -0
- package/src/application/threads.ts +156 -17
- package/src/cli/app.ts +4 -0
- package/src/cli/ask-lifecycle.ts +331 -0
- package/src/cli/ask.ts +390 -0
- package/src/cli/error.ts +70 -0
- package/src/cli/format/thread.ts +49 -7
- package/src/cli/search.ts +48 -0
- package/src/cli/thread.ts +12 -0
- package/src/cli/threads/messages.ts +33 -3
- package/src/cli/threads/pin.ts +46 -0
- package/src/cli/threads/send.ts +5 -1
- package/src/cli/threads/settle.ts +46 -0
- package/src/cli/threads/snooze.ts +117 -0
- package/src/cli/threads/start.ts +6 -1
- package/src/cli/threads/unpin.ts +48 -0
- package/src/cli/threads/unsettle.ts +48 -0
- package/src/cli/threads/unsnooze.ts +48 -0
- package/src/config/persist/schema.ts +1 -1
- package/src/connection/prepared.ts +12 -2
- package/src/orchestration/error.ts +10 -0
- package/src/orchestration/index.ts +1 -0
- package/src/orchestration/layer.ts +78 -0
- package/src/orchestration/service.ts +16 -3
- package/src/rpc/error.ts +2 -0
- package/src/rpc/operation.ts +2 -0
- package/src/rpc/ws-group.ts +3 -0
- package/src/runtime/layer.ts +9 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $O as EnvironmentAuthorizationError, Aa as EnvironmentSupervisor, B_ as ExternalLauncherUnsupportedEditorError, Da as EnvironmentNotRegisteredError, F_ as ExternalLauncherBrowserSpawnError, I_ as ExternalLauncherCommandNotFoundError, Ia as EnvironmentCacheStore, Id as KeybindingWhenNode, L_ as ExternalLauncherEditorSpawnError, Oa as EnvironmentRegistry, Su as ServerConfig, ab as OrchestrationShellSnapshot, at as EnvironmentMessage, ct as EnvironmentThreadShell, dt as scopeThreadShell, f as AtomCommand, ft as selectEnvironmentThreadShell, hn as EnvironmentRpcUnavailableError, lt as scopeProject, ms as PreparedConnection, no as RemoteEnvironmentRequestError, ob as OrchestrationShellStreamEvent, ot as EnvironmentProject, st as EnvironmentThread, u as EnvironmentCatalogState, ut as scopeThread, vk as EnvironmentId, wo as ManagedRelayDpopSigner, z_ as ExternalLauncherUnknownEditorError } from "../../shared.js";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import * as Stream from "effect/Stream";
|
|
@@ -46,6 +46,8 @@ declare const fetchEnvironmentShellSnapshot: (input: {
|
|
|
46
46
|
readonly value: string | boolean;
|
|
47
47
|
}[];
|
|
48
48
|
} | null;
|
|
49
|
+
readonly defaultThreadEnvMode?: "local" | "worktree" | null | undefined;
|
|
50
|
+
readonly faviconPath?: string | null | undefined;
|
|
49
51
|
readonly scripts: readonly {
|
|
50
52
|
readonly id: string;
|
|
51
53
|
readonly name: string;
|
|
@@ -93,6 +95,12 @@ declare const fetchEnvironmentShellSnapshot: (input: {
|
|
|
93
95
|
readonly settledAt: string | null;
|
|
94
96
|
readonly snoozedUntil?: string | null | undefined;
|
|
95
97
|
readonly snoozedAt?: string | null | undefined;
|
|
98
|
+
readonly pinnedAt?: string | null | undefined;
|
|
99
|
+
readonly pinOrderKey?: string | null | undefined;
|
|
100
|
+
readonly titleRegeneration?: {
|
|
101
|
+
readonly requestId: string & import("effect/Brand").Brand<"CommandId">;
|
|
102
|
+
readonly startedAt: string;
|
|
103
|
+
} | null | undefined;
|
|
96
104
|
readonly session: {
|
|
97
105
|
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
98
106
|
readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
|
|
@@ -107,6 +115,12 @@ declare const fetchEnvironmentShellSnapshot: (input: {
|
|
|
107
115
|
readonly hasPendingApprovals: boolean;
|
|
108
116
|
readonly hasPendingUserInput: boolean;
|
|
109
117
|
readonly hasActionableProposedPlan: boolean;
|
|
118
|
+
readonly backgroundLiveness?: "monitoring" | "working" | null | undefined;
|
|
119
|
+
readonly planProgress?: {
|
|
120
|
+
readonly step: string;
|
|
121
|
+
readonly completedSteps: number;
|
|
122
|
+
readonly totalSteps: number;
|
|
123
|
+
} | null | undefined;
|
|
110
124
|
}[];
|
|
111
125
|
readonly updatedAt: string;
|
|
112
126
|
}, RemoteEnvironmentRequestError, HttpClient.HttpClient>;
|
|
@@ -126,10 +140,10 @@ declare const shellSnapshotLoaderLayer: Layer.Layer<ShellSnapshotLoader, never,
|
|
|
126
140
|
declare function createShellEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>): {
|
|
127
141
|
openInEditor: AtomCommand<{
|
|
128
142
|
readonly environmentId: EnvironmentId;
|
|
129
|
-
readonly input:
|
|
130
|
-
readonly cwd:
|
|
131
|
-
readonly editor:
|
|
132
|
-
}
|
|
143
|
+
readonly input: {
|
|
144
|
+
readonly cwd: string;
|
|
145
|
+
readonly editor: "antigravity" | "aqua" | "clion" | "cursor" | "datagrip" | "dataspell" | "file-manager" | "goland" | "idea" | "kiro" | "phpstorm" | "pycharm" | "rider" | "rubymine" | "rustrover" | "trae" | "vscode" | "vscode-insiders" | "vscodium" | "webstorm" | "zed";
|
|
146
|
+
};
|
|
133
147
|
}, void, E | EnvironmentAuthorizationError | EnvironmentNotRegisteredError | EnvironmentRpcUnavailableError | ExternalLauncherBrowserSpawnError | ExternalLauncherCommandNotFoundError | ExternalLauncherEditorSpawnError | ExternalLauncherUnknownEditorError | ExternalLauncherUnsupportedEditorError | import("effect/unstable/rpc/RpcClientError").RpcClientError>;
|
|
134
148
|
};
|
|
135
149
|
//#endregion
|
|
@@ -172,6 +186,8 @@ declare function createEnvironmentSnapshotAtom<E>(shellStateAtom: (environmentId
|
|
|
172
186
|
readonly value: string | boolean;
|
|
173
187
|
}[];
|
|
174
188
|
} | null;
|
|
189
|
+
readonly defaultThreadEnvMode?: "local" | "worktree" | null | undefined;
|
|
190
|
+
readonly faviconPath?: string | null | undefined;
|
|
175
191
|
readonly scripts: readonly {
|
|
176
192
|
readonly id: string;
|
|
177
193
|
readonly name: string;
|
|
@@ -219,6 +235,12 @@ declare function createEnvironmentSnapshotAtom<E>(shellStateAtom: (environmentId
|
|
|
219
235
|
readonly settledAt: string | null;
|
|
220
236
|
readonly snoozedUntil?: string | null | undefined;
|
|
221
237
|
readonly snoozedAt?: string | null | undefined;
|
|
238
|
+
readonly pinnedAt?: string | null | undefined;
|
|
239
|
+
readonly pinOrderKey?: string | null | undefined;
|
|
240
|
+
readonly titleRegeneration?: {
|
|
241
|
+
readonly requestId: string & import("effect/Brand").Brand<"CommandId">;
|
|
242
|
+
readonly startedAt: string;
|
|
243
|
+
} | null | undefined;
|
|
222
244
|
readonly session: {
|
|
223
245
|
readonly threadId: string & import("effect/Brand").Brand<"ThreadId">;
|
|
224
246
|
readonly status: "error" | "idle" | "interrupted" | "ready" | "running" | "starting" | "stopped";
|
|
@@ -233,6 +255,12 @@ declare function createEnvironmentSnapshotAtom<E>(shellStateAtom: (environmentId
|
|
|
233
255
|
readonly hasPendingApprovals: boolean;
|
|
234
256
|
readonly hasPendingUserInput: boolean;
|
|
235
257
|
readonly hasActionableProposedPlan: boolean;
|
|
258
|
+
readonly backgroundLiveness?: "monitoring" | "working" | null | undefined;
|
|
259
|
+
readonly planProgress?: {
|
|
260
|
+
readonly step: string;
|
|
261
|
+
readonly completedSteps: number;
|
|
262
|
+
readonly totalSteps: number;
|
|
263
|
+
} | null | undefined;
|
|
236
264
|
}[];
|
|
237
265
|
readonly updatedAt: string;
|
|
238
266
|
} | null>;
|
|
@@ -273,9 +301,15 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
273
301
|
readonly capabilities: {
|
|
274
302
|
readonly repositoryIdentity: boolean;
|
|
275
303
|
readonly connectionProbe?: boolean;
|
|
304
|
+
readonly pullRequests?: boolean;
|
|
276
305
|
readonly threadSettlement?: boolean;
|
|
277
306
|
readonly threadSnooze?: boolean;
|
|
307
|
+
readonly threadPinning?: boolean;
|
|
308
|
+
readonly threadPinReorder?: boolean;
|
|
309
|
+
readonly threadTitleRegeneration?: boolean;
|
|
278
310
|
readonly serverSelfUpdate?: "boot-service" | "desktop-managed" | "respawn";
|
|
311
|
+
readonly serverSelfUpdateProgress?: boolean;
|
|
312
|
+
readonly agentActivityPublishing?: boolean;
|
|
279
313
|
};
|
|
280
314
|
};
|
|
281
315
|
readonly auth: {
|
|
@@ -287,7 +321,7 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
287
321
|
readonly cwd: string;
|
|
288
322
|
readonly keybindingsConfigPath: string;
|
|
289
323
|
readonly keybindings: readonly {
|
|
290
|
-
readonly command: "chat.new" | "chat.newLocal" | "commandPalette.toggle" | "composer.stash" | "diff.toggle" | "editor.openFavorite" | "modelPicker.jump.1" | "modelPicker.jump.2" | "modelPicker.jump.3" | "modelPicker.jump.4" | "modelPicker.jump.5" | "modelPicker.jump.6" | "modelPicker.jump.7" | "modelPicker.jump.8" | "modelPicker.jump.9" | "modelPicker.toggle" | "preview.focusUrl" | "preview.refresh" | "preview.resetZoom" | "preview.toggle" | "preview.zoomIn" | "preview.zoomOut" | "rightPanel.toggle" | "sidebar.toggle" | "terminal.close" | "terminal.new" | "terminal.split" | "terminal.splitVertical" | "terminal.toggle" | "thread.jump.1" | "thread.jump.2" | "thread.jump.3" | "thread.jump.4" | "thread.jump.5" | "thread.jump.6" | "thread.jump.7" | "thread.jump.8" | "thread.jump.9" | "thread.next" | "thread.previous" | `script.${string}.run`;
|
|
324
|
+
readonly command: "chat.new" | "chat.newLocal" | "commandPalette.toggle" | "composer.stash" | "diff.toggle" | "editor.openFavorite" | "filePicker.toggle" | "modelPicker.jump.1" | "modelPicker.jump.2" | "modelPicker.jump.3" | "modelPicker.jump.4" | "modelPicker.jump.5" | "modelPicker.jump.6" | "modelPicker.jump.7" | "modelPicker.jump.8" | "modelPicker.jump.9" | "modelPicker.toggle" | "preview.focusUrl" | "preview.refresh" | "preview.resetZoom" | "preview.toggle" | "preview.zoomIn" | "preview.zoomOut" | "projectSearch.toggle" | "rightPanel.toggle" | "sidebar.toggle" | "terminal.close" | "terminal.new" | "terminal.split" | "terminal.splitVertical" | "terminal.toggle" | "themeEditor.toggle" | "thread.jump.1" | "thread.jump.2" | "thread.jump.3" | "thread.jump.4" | "thread.jump.5" | "thread.jump.6" | "thread.jump.7" | "thread.jump.8" | "thread.jump.9" | "thread.next" | "thread.previous" | `script.${string}.run`;
|
|
291
325
|
readonly shortcut: {
|
|
292
326
|
readonly key: string;
|
|
293
327
|
readonly metaKey: boolean;
|
|
@@ -352,6 +386,7 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
352
386
|
readonly subProvider?: string | undefined;
|
|
353
387
|
readonly isCustom: boolean;
|
|
354
388
|
readonly isDefault?: boolean | undefined;
|
|
389
|
+
readonly isLegacy?: boolean | undefined;
|
|
355
390
|
readonly capabilities: {
|
|
356
391
|
readonly optionDescriptors?: readonly ({
|
|
357
392
|
readonly id: string;
|
|
@@ -409,6 +444,10 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
409
444
|
};
|
|
410
445
|
}[];
|
|
411
446
|
readonly availableEditors: readonly ("antigravity" | "aqua" | "clion" | "cursor" | "datagrip" | "dataspell" | "file-manager" | "goland" | "idea" | "kiro" | "phpstorm" | "pycharm" | "rider" | "rubymine" | "rustrover" | "trae" | "vscode" | "vscode-insiders" | "vscodium" | "webstorm" | "zed")[];
|
|
447
|
+
readonly remoteOpenTargets?: readonly {
|
|
448
|
+
readonly kind: "mdns" | "tailscale";
|
|
449
|
+
readonly host: string;
|
|
450
|
+
}[];
|
|
412
451
|
readonly observability: {
|
|
413
452
|
readonly logsDirectoryPath: string;
|
|
414
453
|
readonly localTracingEnabled: boolean;
|
|
@@ -418,7 +457,7 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
418
457
|
readonly otlpMetricsEnabled: boolean;
|
|
419
458
|
};
|
|
420
459
|
readonly settings: {
|
|
421
|
-
readonly
|
|
460
|
+
readonly enableLegacyTokenStreaming: boolean;
|
|
422
461
|
readonly enableProviderUpdateChecks: boolean;
|
|
423
462
|
readonly backgroundActivity: {
|
|
424
463
|
readonly schemaVersion: 1;
|
|
@@ -520,6 +559,7 @@ declare function createEnvironmentServerConfigsAtom(input: {
|
|
|
520
559
|
};
|
|
521
560
|
readonly shellResumeCompletionMarker?: boolean;
|
|
522
561
|
readonly threadResumeCompletionMarker?: boolean;
|
|
562
|
+
readonly threadSnapshotPagination?: boolean;
|
|
523
563
|
}>>;
|
|
524
564
|
declare function createEnvironmentShellAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | EnvironmentCacheStore | ShellSnapshotLoader | R, E>): {
|
|
525
565
|
stateAtom: (arg: string & import("effect/Brand").Brand<"EnvironmentId">) => Atom.Atom<AsyncResult.AsyncResult<EnvironmentShellState, E | Cause.NoSuchElementError>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Br as fetchEnvironmentShellSnapshot, Rr as applyShellStreamEvent, Vr as shellSnapshotLoaderLayer, ar as createEnvironmentShellSummaryAtom, cr as createEnvironmentSnapshotAtom, dr as scopeThread, fr as scopeThreadShell, ir as createEnvironmentShellAtoms, lr as createShellEnvironmentAtoms, or as makeEnvironmentShellState, pr as selectEnvironmentThreadShell, rr as createEnvironmentServerConfigsAtom, sr as shellStateChanges, ur as scopeProject, zr as ShellSnapshotLoader } from "../../shared.js";
|
|
2
2
|
export { ShellSnapshotLoader, applyShellStreamEvent, createEnvironmentServerConfigsAtom, createEnvironmentShellAtoms, createEnvironmentShellSummaryAtom, createEnvironmentSnapshotAtom, createShellEnvironmentAtoms, fetchEnvironmentShellSnapshot, makeEnvironmentShellState, scopeProject, scopeThread, scopeThreadShell, selectEnvironmentThreadShell, shellSnapshotLoaderLayer, shellStateChanges };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $O as EnvironmentAuthorizationError, Da as EnvironmentNotRegisteredError, Ia as EnvironmentCacheStore, Oa as EnvironmentRegistry, XD as SourceControlRepositoryError, f as AtomCommand, hn as EnvironmentRpcUnavailableError, vk as EnvironmentId } from "../../shared.js";
|
|
2
2
|
import { Atom } from "effect/unstable/reactivity";
|
|
3
3
|
//#region upstream-t3code/packages/client-runtime/src/state/sourceControl.d.ts
|
|
4
4
|
declare function createSourceControlEnvironmentAtoms<R, E>(runtime: Atom.AtomRuntime<EnvironmentRegistry | EnvironmentCacheStore | R, E>): {
|
|
5
5
|
discovery: (target: {
|
|
6
6
|
readonly environmentId: EnvironmentId;
|
|
7
|
-
readonly input:
|
|
7
|
+
readonly input: {};
|
|
8
8
|
}) => Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
9
9
|
readonly versionControlSystems: readonly {
|
|
10
10
|
readonly label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { St as vcsCommandScheduler, _r as createEnvironmentRpcCommand, lc as WS_METHODS, mr as createAtomCommandScheduler, vr as createEnvironmentRpcQueryAtomFamily, vt as invalidateCachedVcsRefs, xt as vcsCommandConcurrency } from "../../shared.js";
|
|
2
2
|
//#region upstream-t3code/packages/client-runtime/src/state/sourceControl.ts
|
|
3
3
|
function createSourceControlEnvironmentAtoms(runtime) {
|
|
4
4
|
const commandScheduler = createAtomCommandScheduler();
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { db as OrchestrationThreadActivity } from "../../shared.js";
|
|
2
|
+
//#region upstream-t3code/packages/client-runtime/src/state/subagentRuntime.d.ts
|
|
3
|
+
type RuntimeSubagentStatus = "pending" | "running" | "waiting" | "idle" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
4
|
+
interface SubagentUsage {
|
|
5
|
+
readonly totalTokens: number;
|
|
6
|
+
readonly inputTokens?: number;
|
|
7
|
+
readonly cachedInputTokens?: number;
|
|
8
|
+
readonly outputTokens?: number;
|
|
9
|
+
readonly reasoningOutputTokens?: number;
|
|
10
|
+
readonly toolUses?: number;
|
|
11
|
+
readonly durationMs?: number;
|
|
12
|
+
}
|
|
13
|
+
interface SubagentActivityEntry {
|
|
14
|
+
readonly at: string;
|
|
15
|
+
readonly summary: string;
|
|
16
|
+
}
|
|
17
|
+
interface SubagentWorkflowPhase {
|
|
18
|
+
readonly index: number;
|
|
19
|
+
readonly title: string;
|
|
20
|
+
}
|
|
21
|
+
interface SubagentRunHandles {
|
|
22
|
+
readonly runId?: string;
|
|
23
|
+
readonly scriptPath?: string;
|
|
24
|
+
readonly transcriptDir?: string;
|
|
25
|
+
readonly sessionUrl?: string;
|
|
26
|
+
}
|
|
27
|
+
interface RuntimeSubagent {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly kind: "subagent" | "workflow" | "workflow_agent";
|
|
30
|
+
readonly title: string;
|
|
31
|
+
readonly role: string | null;
|
|
32
|
+
readonly model: string | null;
|
|
33
|
+
readonly effort: string | null;
|
|
34
|
+
readonly status: RuntimeSubagentStatus;
|
|
35
|
+
readonly activationCount: number;
|
|
36
|
+
readonly usage: SubagentUsage | null;
|
|
37
|
+
readonly progress: string | null;
|
|
38
|
+
readonly lastToolName: string | null;
|
|
39
|
+
readonly result: string | null;
|
|
40
|
+
readonly error: string | null;
|
|
41
|
+
readonly outputFile: string | null;
|
|
42
|
+
readonly parentAgentId: string | null;
|
|
43
|
+
readonly agentIndex: number | null;
|
|
44
|
+
readonly phaseIndex: number | null;
|
|
45
|
+
readonly phaseTitle: string | null;
|
|
46
|
+
readonly attempt: number | null;
|
|
47
|
+
readonly workflowName: string | null;
|
|
48
|
+
readonly phases: ReadonlyArray<SubagentWorkflowPhase>;
|
|
49
|
+
readonly runHandles: SubagentRunHandles | null;
|
|
50
|
+
readonly recentActivity: ReadonlyArray<SubagentActivityEntry>;
|
|
51
|
+
/** First retained observation, used as the roster's stable display order. */
|
|
52
|
+
readonly firstSeenAt: string;
|
|
53
|
+
readonly startedAt: string | null;
|
|
54
|
+
readonly completedAt: string | null;
|
|
55
|
+
readonly updatedAt: string;
|
|
56
|
+
}
|
|
57
|
+
declare function isTerminalSubagentStatus(status: RuntimeSubagentStatus): boolean;
|
|
58
|
+
/** Active = the user may still need to care while it runs. Idle is settled-ish
|
|
59
|
+
* but resumable; waiting counts as active because it needs the user. */
|
|
60
|
+
declare function isActiveSubagentStatus(status: RuntimeSubagentStatus): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* True when this activity's payload does NOT belong on the Agents surface.
|
|
63
|
+
* Classification happens exactly once, server-side at ingestion
|
|
64
|
+
* (classifyTaskAgentKind → the persisted agentKind stamp); the client only
|
|
65
|
+
* reads it. Rows without a stamp — legacy threads, pre-stamp servers — are
|
|
66
|
+
* background by definition: they render in the ordinary work log, exactly
|
|
67
|
+
* as they did before this feature existed.
|
|
68
|
+
*/
|
|
69
|
+
declare function isBackgroundTaskActivity(payload: Record<string, unknown>): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Folds a thread's persisted activities into subagent state. Tolerant by
|
|
72
|
+
* construction: malformed rows are skipped individually; unknown kinds are
|
|
73
|
+
* ignored. Pure — memoize by activity-list identity at the atom layer.
|
|
74
|
+
*
|
|
75
|
+
* sessionLive=false derives interruption: background tasks die with their
|
|
76
|
+
* provider session, so agents whose terminal rows were lost (server
|
|
77
|
+
* restart, crash) must not read as running forever (review finding: a dead
|
|
78
|
+
* session left a panel full of "Working" agents while the sidebar showed
|
|
79
|
+
* nothing). Idle is preserved — a resumable Codex child stays resumable.
|
|
80
|
+
*/
|
|
81
|
+
declare function foldSubagentActivities(activities: ReadonlyArray<OrchestrationThreadActivity>, options?: {
|
|
82
|
+
readonly sessionLive?: boolean;
|
|
83
|
+
}): ReadonlyArray<RuntimeSubagent>;
|
|
84
|
+
interface AgentPanelWorkflowGroup {
|
|
85
|
+
readonly workflow: RuntimeSubagent;
|
|
86
|
+
readonly phases: ReadonlyArray<{
|
|
87
|
+
readonly index: number;
|
|
88
|
+
readonly title: string;
|
|
89
|
+
readonly members: ReadonlyArray<RuntimeSubagent>;
|
|
90
|
+
/** done = every member settled (success or error); running = any active. */
|
|
91
|
+
readonly state: "pending" | "running" | "done";
|
|
92
|
+
readonly activeCount: number;
|
|
93
|
+
readonly settledCount: number;
|
|
94
|
+
}>;
|
|
95
|
+
/** Members with no resolvable phase (orphans render under the workflow). */
|
|
96
|
+
readonly unphasedMembers: ReadonlyArray<RuntimeSubagent>;
|
|
97
|
+
}
|
|
98
|
+
interface AgentPanelModel {
|
|
99
|
+
readonly workflows: ReadonlyArray<AgentPanelWorkflowGroup>;
|
|
100
|
+
readonly directAgents: ReadonlyArray<RuntimeSubagent>;
|
|
101
|
+
readonly runningCount: number;
|
|
102
|
+
readonly waitingCount: number;
|
|
103
|
+
readonly idleCount: number;
|
|
104
|
+
readonly settledCount: number;
|
|
105
|
+
readonly totalTokens: number;
|
|
106
|
+
readonly hasAgents: boolean;
|
|
107
|
+
readonly liveCount: number;
|
|
108
|
+
}
|
|
109
|
+
declare function emptyAgentPanelModel(): AgentPanelModel;
|
|
110
|
+
/**
|
|
111
|
+
* Source-neutral view model. When the orchestration-v2 subagent projection
|
|
112
|
+
* exists for the thread, pass it as v2Projection and it wins outright — the
|
|
113
|
+
* two sources are never merged (duplicate-agents failure mode). Until v2
|
|
114
|
+
* lands, callers pass null and the native fold output is used.
|
|
115
|
+
*/
|
|
116
|
+
declare function deriveAgentPanelModel({ agents, v2Projection }: {
|
|
117
|
+
readonly agents: ReadonlyArray<RuntimeSubagent>;
|
|
118
|
+
readonly v2Projection?: ReadonlyArray<RuntimeSubagent> | null;
|
|
119
|
+
}): AgentPanelModel;
|
|
120
|
+
/**
|
|
121
|
+
* Members ordered by urgency for the capped inline workflow card: running and
|
|
122
|
+
* failed first, then waiting, then most recently updated.
|
|
123
|
+
*/
|
|
124
|
+
declare function workflowCardMembers(group: AgentPanelWorkflowGroup, limit: number): {
|
|
125
|
+
readonly visible: ReadonlyArray<RuntimeSubagent>;
|
|
126
|
+
readonly overflow: number;
|
|
127
|
+
};
|
|
128
|
+
/** Kinds the timeline should not render as generic rows (fold input only). */
|
|
129
|
+
declare function isSubagentActivityKind(kind: string): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Quiet-timeline guarantee: tool rows attributed to an owning agent belong in
|
|
132
|
+
* the Agents surface, not the parent chat. Unattributed rows must stay.
|
|
133
|
+
*/
|
|
134
|
+
declare function isAgentAttributedToolActivity(activity: OrchestrationThreadActivity): boolean;
|
|
135
|
+
/** Timeline-bypassing synthesized rows (Codex children, workflow members). */
|
|
136
|
+
declare function isTimelineBypassActivity(activity: OrchestrationThreadActivity): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Compact model chip text: strips vendor prefixes/date-or-context suffixes
|
|
139
|
+
* ("claude-sonnet-5[1m]" → "sonnet-5[1m]", "claude-opus-4-20250514" →
|
|
140
|
+
* "opus-4"). Unknown ids pass through untouched; effort appends as "· high".
|
|
141
|
+
*/
|
|
142
|
+
declare function formatSubagentModelLabel(model: string | null, effort: string | null): string | null;
|
|
143
|
+
declare function formatSubagentTokenCount(totalTokens: number): string;
|
|
144
|
+
//#endregion
|
|
145
|
+
export { AgentPanelModel, AgentPanelWorkflowGroup, RuntimeSubagent, RuntimeSubagentStatus, SubagentActivityEntry, SubagentRunHandles, SubagentUsage, SubagentWorkflowPhase, deriveAgentPanelModel, emptyAgentPanelModel, foldSubagentActivities, formatSubagentModelLabel, formatSubagentTokenCount, isActiveSubagentStatus, isAgentAttributedToolActivity, isBackgroundTaskActivity, isSubagentActivityKind, isTerminalSubagentStatus, isTimelineBypassActivity, workflowCardMembers };
|