t3code-cli 0.14.1 → 0.14.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/README.md +1 -0
- 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 +544 -262
- 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 +5 -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 +5 -1
- package/dist/client-runtime/relay.js +1 -1
- 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 +5 -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 +9 -3
- package/dist/client-runtime/state/presentation.js +1 -1
- package/dist/client-runtime/state/preview.d.ts +55 -48
- package/dist/client-runtime/state/preview.js +1 -1
- 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/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 +299 -172
- package/dist/client-runtime/state/server.js +192 -16
- package/dist/client-runtime/state/session.d.ts +65 -7
- package/dist/client-runtime/state/session.js +32 -3
- package/dist/client-runtime/state/shell.d.ts +41 -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 +28 -3
- package/dist/client-runtime/state/thread-settled.js +74 -2
- 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 +144 -1
- package/dist/orchestration.js +1 -1
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +1 -1
- package/dist/rpc.d.ts +883 -351
- 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.js +1 -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.js +1 -1
- 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 +21 -0
- package/dist/shared/usageFormat.js +90 -0
- package/dist/shared/usageMerge.d.ts +67 -0
- package/dist/shared/usageMerge.js +218 -0
- package/dist/shared.d.ts +4472 -668
- package/dist/shared.js +16867 -16273
- package/dist/t3tools.d.ts +2 -2
- package/dist/t3tools.js +2 -2
- package/package.json +5 -5
- package/src/application/index.ts +1 -0
- package/src/application/service.ts +5 -1
- package/src/application/threads.ts +43 -1
- package/src/cli/app.ts +2 -0
- package/src/cli/format/thread.ts +23 -1
- package/src/cli/search.ts +48 -0
- package/src/config/persist/schema.ts +1 -1
- package/src/orchestration/layer.ts +6 -0
- package/src/orchestration/service.ts +5 -0
- package/src/rpc/error.ts +2 -0
- package/src/rpc/operation.ts +2 -0
- package/src/rpc/ws-group.ts +2 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ir as applyShellStreamEvent, Lr as ShellSnapshotLoader, Rr as fetchEnvironmentShellSnapshot, ar as makeEnvironmentShellState, cr as createShellEnvironmentAtoms, dr as scopeThreadShell, fr as selectEnvironmentThreadShell, ir as createEnvironmentShellSummaryAtom, lr as scopeProject, nr as createEnvironmentServerConfigsAtom, or as shellStateChanges, rr as createEnvironmentShellAtoms, sr as createEnvironmentSnapshotAtom, ur as scopeThread, zr as shellSnapshotLoaderLayer } 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 { CD as EnvironmentId, Na as EnvironmentCacheStore, Ta as EnvironmentRegistry, aT as SourceControlRepositoryError, f as AtomCommand, iD as EnvironmentAuthorizationError, mn as EnvironmentRpcUnavailableError, wa as EnvironmentNotRegisteredError } 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, Us as WS_METHODS, gr as createEnvironmentRpcQueryAtomFamily, hr as createEnvironmentRpcCommand, pr as createAtomCommandScheduler, 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 { Py 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 };
|