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.
Files changed (162) hide show
  1. package/README.md +1 -0
  2. package/dist/application.d.ts +2 -2
  3. package/dist/application.js +1 -1
  4. package/dist/auth.d.ts +1 -1
  5. package/dist/auth.js +1 -1
  6. package/dist/bin.js +544 -262
  7. package/dist/cli.d.ts +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/client-runtime/authorization.d.ts +1 -1
  10. package/dist/client-runtime/authorization.js +1 -1
  11. package/dist/client-runtime/connection.d.ts +1 -1
  12. package/dist/client-runtime/connection.js +1 -1
  13. package/dist/client-runtime/environment.d.ts +5 -1
  14. package/dist/client-runtime/environment.js +1 -1
  15. package/dist/client-runtime/errors.js +1 -1
  16. package/dist/client-runtime/operations/projects.d.ts +2 -2
  17. package/dist/client-runtime/operations/projects.js +2 -2
  18. package/dist/client-runtime/operations.d.ts +2 -2
  19. package/dist/client-runtime/operations.js +2 -2
  20. package/dist/client-runtime/platform.d.ts +1 -1
  21. package/dist/client-runtime/platform.js +1 -1
  22. package/dist/client-runtime/relay.d.ts +5 -1
  23. package/dist/client-runtime/relay.js +1 -1
  24. package/dist/client-runtime/rpc.d.ts +2 -2
  25. package/dist/client-runtime/rpc.js +2 -2
  26. package/dist/client-runtime/state/assets.d.ts +17 -11
  27. package/dist/client-runtime/state/assets.js +1 -1
  28. package/dist/client-runtime/state/auth.d.ts +1 -1
  29. package/dist/client-runtime/state/auth.js +1 -1
  30. package/dist/client-runtime/state/connections.js +1 -1
  31. package/dist/client-runtime/state/entities.d.ts +1 -1
  32. package/dist/client-runtime/state/entities.js +1 -1
  33. package/dist/client-runtime/state/filesystem.d.ts +1 -1
  34. package/dist/client-runtime/state/filesystem.js +1 -1
  35. package/dist/client-runtime/state/git.d.ts +5 -5
  36. package/dist/client-runtime/state/git.js +1 -1
  37. package/dist/client-runtime/state/models.d.ts +1 -1
  38. package/dist/client-runtime/state/models.js +1 -1
  39. package/dist/client-runtime/state/orchestration.d.ts +42 -2
  40. package/dist/client-runtime/state/orchestration.js +13 -1
  41. package/dist/client-runtime/state/presentation.d.ts +9 -3
  42. package/dist/client-runtime/state/presentation.js +1 -1
  43. package/dist/client-runtime/state/preview.d.ts +55 -48
  44. package/dist/client-runtime/state/preview.js +1 -1
  45. package/dist/client-runtime/state/project-grouping.d.ts +26 -2
  46. package/dist/client-runtime/state/project-grouping.js +83 -3
  47. package/dist/client-runtime/state/projects.d.ts +24 -18
  48. package/dist/client-runtime/state/projects.js +1 -1
  49. package/dist/client-runtime/state/relay.d.ts +1 -1
  50. package/dist/client-runtime/state/relay.js +1 -1
  51. package/dist/client-runtime/state/review.d.ts +16 -1
  52. package/dist/client-runtime/state/review.js +27 -6
  53. package/dist/client-runtime/state/runtime.d.ts +2 -2
  54. package/dist/client-runtime/state/runtime.js +2 -2
  55. package/dist/client-runtime/state/server.d.ts +299 -172
  56. package/dist/client-runtime/state/server.js +192 -16
  57. package/dist/client-runtime/state/session.d.ts +65 -7
  58. package/dist/client-runtime/state/session.js +32 -3
  59. package/dist/client-runtime/state/shell.d.ts +41 -7
  60. package/dist/client-runtime/state/shell.js +1 -1
  61. package/dist/client-runtime/state/source-control.d.ts +2 -2
  62. package/dist/client-runtime/state/source-control.js +1 -1
  63. package/dist/client-runtime/state/subagentRuntime.d.ts +145 -0
  64. package/dist/client-runtime/state/subagentRuntime.js +521 -0
  65. package/dist/client-runtime/state/terminal.d.ts +17 -17
  66. package/dist/client-runtime/state/terminal.js +1 -1
  67. package/dist/client-runtime/state/thread-search.d.ts +23 -0
  68. package/dist/client-runtime/state/thread-search.js +38 -0
  69. package/dist/client-runtime/state/thread-settled.d.ts +28 -3
  70. package/dist/client-runtime/state/thread-settled.js +74 -2
  71. package/dist/client-runtime/state/thread-sort.d.ts +59 -2
  72. package/dist/client-runtime/state/thread-sort.js +128 -2
  73. package/dist/client-runtime/state/threads.d.ts +115 -3
  74. package/dist/client-runtime/state/threads.js +309 -28
  75. package/dist/client-runtime/state/vcs.d.ts +14 -14
  76. package/dist/client-runtime/state/vcs.js +1 -1
  77. package/dist/config.d.ts +1 -1
  78. package/dist/config.js +1 -1
  79. package/dist/connection.d.ts +1 -1
  80. package/dist/connection.js +1 -1
  81. package/dist/contracts.d.ts +1 -1
  82. package/dist/contracts.js +1 -1
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +1 -1
  85. package/dist/node.d.ts +1 -1
  86. package/dist/node.js +1 -1
  87. package/dist/orchestration.d.ts +144 -1
  88. package/dist/orchestration.js +1 -1
  89. package/dist/preview.d.ts +1 -1
  90. package/dist/preview.js +1 -1
  91. package/dist/rpc.d.ts +883 -351
  92. package/dist/rpc.js +1 -1
  93. package/dist/runtime.d.ts +1 -1
  94. package/dist/runtime.js +1 -1
  95. package/dist/shared/DrainableWorker.js +1 -1
  96. package/dist/shared/KeyedCoalescingWorker.js +1 -1
  97. package/dist/shared/Net.js +1 -1
  98. package/dist/shared/advertisedEndpoint.d.ts +1 -1
  99. package/dist/shared/advertisedEndpoint.js +1 -1
  100. package/dist/shared/agentAwareness.d.ts +1 -1
  101. package/dist/shared/backgroundActivitySettings.d.ts +1 -1
  102. package/dist/shared/composerInlineTokens.js +1 -1
  103. package/dist/shared/connectAuth.js +1 -1
  104. package/dist/shared/devHome.js +1 -1
  105. package/dist/shared/dpop.js +1 -1
  106. package/dist/shared/git.d.ts +1 -1
  107. package/dist/shared/httpObservability.js +1 -1
  108. package/dist/shared/httpReadiness.js +1 -1
  109. package/dist/shared/keybindings.d.ts +2 -2
  110. package/dist/shared/keybindings.js +15 -1
  111. package/dist/shared/model.d.ts +1 -1
  112. package/dist/shared/oauthScope.js +1 -1
  113. package/dist/shared/observability.d.ts +8 -1
  114. package/dist/shared/observability.js +49 -5
  115. package/dist/shared/path.js +1 -1
  116. package/dist/shared/preview.js +1 -1
  117. package/dist/shared/previewViewport.d.ts +1 -1
  118. package/dist/shared/previewViewport.js +1 -1
  119. package/dist/shared/projectFavicon.d.ts +2 -1
  120. package/dist/shared/projectFavicon.js +13 -1
  121. package/dist/shared/projectScripts.d.ts +1 -1
  122. package/dist/shared/relayAuth.js +1 -1
  123. package/dist/shared/relayClient.d.ts +1 -1
  124. package/dist/shared/relayClient.js +1 -1
  125. package/dist/shared/relayJwt.js +1 -1
  126. package/dist/shared/relayTracing.js +1 -1
  127. package/dist/shared/relayUrl.js +1 -1
  128. package/dist/shared/remote.js +1 -1
  129. package/dist/shared/schemaYaml.js +3 -3
  130. package/dist/shared/semver.js +1 -1
  131. package/dist/shared/serverSettings.d.ts +1 -1
  132. package/dist/shared/serverSettings.js +1 -1
  133. package/dist/shared/shell.d.ts +6 -1
  134. package/dist/shared/shell.js +42 -4
  135. package/dist/shared/sourceControl.d.ts +1 -1
  136. package/dist/shared/t3ProjectFile.d.ts +9 -1
  137. package/dist/shared/t3ProjectFile.js +12 -2
  138. package/dist/shared/terminalLabels.d.ts +1 -1
  139. package/dist/shared/threadEnvMode.d.ts +29 -0
  140. package/dist/shared/threadEnvMode.js +24 -0
  141. package/dist/shared/toolActivity.d.ts +1 -1
  142. package/dist/shared/usageFormat.d.ts +21 -0
  143. package/dist/shared/usageFormat.js +90 -0
  144. package/dist/shared/usageMerge.d.ts +67 -0
  145. package/dist/shared/usageMerge.js +218 -0
  146. package/dist/shared.d.ts +4472 -668
  147. package/dist/shared.js +16867 -16273
  148. package/dist/t3tools.d.ts +2 -2
  149. package/dist/t3tools.js +2 -2
  150. package/package.json +5 -5
  151. package/src/application/index.ts +1 -0
  152. package/src/application/service.ts +5 -1
  153. package/src/application/threads.ts +43 -1
  154. package/src/cli/app.ts +2 -0
  155. package/src/cli/format/thread.ts +23 -1
  156. package/src/cli/search.ts +48 -0
  157. package/src/config/persist/schema.ts +1 -1
  158. package/src/orchestration/layer.ts +6 -0
  159. package/src/orchestration/service.ts +5 -0
  160. package/src/rpc/error.ts +2 -0
  161. package/src/rpc/operation.ts +2 -0
  162. package/src/rpc/ws-group.ts +2 -0
@@ -1,2 +1,2 @@
1
- import { $n as createEnvironmentShellAtoms, Mr as ShellSnapshotLoader, Nr as fetchEnvironmentShellSnapshot, Pr as shellSnapshotLoaderLayer, Qn as createEnvironmentServerConfigsAtom, ar as scopeProject, cr as selectEnvironmentThreadShell, er as createEnvironmentShellSummaryAtom, ir as createShellEnvironmentAtoms, jr as applyShellStreamEvent, nr as shellStateChanges, or as scopeThread, rr as createEnvironmentSnapshotAtom, sr as scopeThreadShell, tr as makeEnvironmentShellState } from "../../shared.js";
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 { Ca as EnvironmentCacheStore, SC as SourceControlRepositoryError, bT as EnvironmentAuthorizationError, f as AtomCommand, ha as EnvironmentRegistry, ma as EnvironmentNotRegisteredError, on as EnvironmentRpcUnavailableError, zT as EnvironmentId } from "../../shared.js";
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: import("effect/Schema").Struct.ReadonlyMakeIn<{}>;
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 { Fs as WS_METHODS, St as vcsCommandScheduler, dr as createEnvironmentRpcCommand, fr as createEnvironmentRpcQueryAtomFamily, lr as createAtomCommandScheduler, vt as invalidateCachedVcsRefs, xt as vcsCommandConcurrency } from "../../shared.js";
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 };