@gajae-code/coding-agent 0.12.6 → 0.12.7

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 (70) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/dist/types/async/job-manager.d.ts +36 -1
  3. package/dist/types/eval/backend.d.ts +2 -2
  4. package/dist/types/exec/bash-executor.d.ts +8 -10
  5. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +0 -36
  6. package/dist/types/internal-urls/registry-helpers.d.ts +0 -18
  7. package/dist/types/sdk/bus/chat-daemon-control.d.ts +1 -3
  8. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +2 -4
  9. package/dist/types/sdk/host/host.d.ts +2 -23
  10. package/dist/types/sdk/host/reverse-leases.d.ts +4 -7
  11. package/dist/types/session/artifacts.d.ts +5 -8
  12. package/dist/types/session/client-bridge.d.ts +0 -14
  13. package/dist/types/session/internal/managed-session-storage.d.ts +2 -5
  14. package/dist/types/session/messages.d.ts +1 -4
  15. package/dist/types/session/session-manager.d.ts +4 -5
  16. package/dist/types/session/streaming-output.d.ts +0 -32
  17. package/dist/types/task/receipt.d.ts +1 -2
  18. package/dist/types/task/types.d.ts +43 -178
  19. package/dist/types/tools/bash.d.ts +1 -1
  20. package/dist/types/tools/fetch.d.ts +0 -3
  21. package/dist/types/tools/output-meta.d.ts +5 -37
  22. package/dist/types/tools/subagent.d.ts +15 -0
  23. package/dist/types/tools/todo-write.d.ts +3 -0
  24. package/dist/types/tools/tool-result.d.ts +0 -1
  25. package/package.json +8 -8
  26. package/src/async/job-manager.ts +430 -46
  27. package/src/cursor.ts +13 -20
  28. package/src/defaults/gjc/skills/ultragoal/SKILL.md +2 -3
  29. package/src/eval/backend.ts +2 -2
  30. package/src/exec/bash-executor.ts +151 -425
  31. package/src/gjc-runtime/ultragoal-runtime.ts +3 -280
  32. package/src/gjc-runtime/workflow-manifest.generated.json +1 -40
  33. package/src/gjc-runtime/workflow-manifest.ts +0 -12
  34. package/src/internal-urls/agent-protocol.ts +38 -98
  35. package/src/internal-urls/artifact-protocol.ts +17 -28
  36. package/src/internal-urls/docs-index.generated.ts +1 -1
  37. package/src/internal-urls/registry-helpers.ts +0 -62
  38. package/src/modes/acp/acp-agent.ts +0 -24
  39. package/src/modes/acp/acp-client-bridge.ts +11 -154
  40. package/src/prompts/tools/bash.md +2 -2
  41. package/src/sdk/acp/adapter.ts +9 -200
  42. package/src/sdk/bus/chat-daemon-control.ts +3 -5
  43. package/src/sdk/bus/index.ts +8 -324
  44. package/src/sdk/bus/telegram-daemon-contract.ts +2 -4
  45. package/src/sdk/host/host.ts +9 -187
  46. package/src/sdk/host/reverse-leases.ts +42 -249
  47. package/src/session/agent-session.ts +15 -178
  48. package/src/session/artifacts.ts +74 -211
  49. package/src/session/client-bridge.ts +0 -15
  50. package/src/session/internal/managed-session-storage.ts +5 -104
  51. package/src/session/messages.ts +7 -32
  52. package/src/session/session-manager.ts +21 -12
  53. package/src/session/streaming-output.ts +40 -198
  54. package/src/task/index.ts +230 -64
  55. package/src/task/receipt.ts +2 -4
  56. package/src/task/render.ts +0 -30
  57. package/src/task/types.ts +10 -34
  58. package/src/tools/bash.ts +239 -818
  59. package/src/tools/eval.ts +4 -99
  60. package/src/tools/fetch.ts +15 -77
  61. package/src/tools/find.ts +3 -7
  62. package/src/tools/output-meta.ts +114 -696
  63. package/src/tools/search.ts +4 -9
  64. package/src/tools/subagent.ts +97 -75
  65. package/src/tools/todo-write.ts +47 -0
  66. package/src/tools/tool-result.ts +0 -1
  67. package/dist/types/gjc-runtime/ultragoal-review-source.d.ts +0 -83
  68. package/dist/types/utils/artifact-id.d.ts +0 -2
  69. package/src/gjc-runtime/ultragoal-review-source.ts +0 -378
  70. package/src/utils/artifact-id.ts +0 -6
@@ -1,7 +1,6 @@
1
1
  import type { ThinkingLevel } from "@gajae-code/agent-core";
2
2
  import type { Usage } from "@gajae-code/ai";
3
3
  import * as z from "zod/v4";
4
- import type { ReviewDeliveryDisposition, ReviewSourceLane } from "../gjc-runtime/ultragoal-review-source";
5
4
  import type { TaskResultReceipt } from "./receipt";
6
5
  import type { SpawnRoiReconciliation } from "./roi-reconciliation";
7
6
  import { type TaskSimpleMode } from "./simple-mode";
@@ -66,24 +65,10 @@ export declare const taskItemSchema: z.ZodObject<{
66
65
  head: z.ZodOptional<z.ZodString>;
67
66
  branch: z.ZodOptional<z.ZodString>;
68
67
  }, z.core.$strict>>;
69
- reviewSource: z.ZodOptional<z.ZodObject<{
70
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
71
- cohortId: z.ZodString;
72
- generation: z.ZodNumber;
73
- lane: z.ZodEnum<{
74
- architect: "architect";
75
- cleaner: "cleaner";
76
- critic: "critic";
77
- qa: "qa";
78
- }>;
79
- snapshotId: z.ZodString;
80
- repositoryBindingDigest: z.ZodString;
81
- stateRevision: z.ZodNumber;
82
- dispatchId: z.ZodString;
83
- rerunCommand: z.ZodString;
84
- taskId: z.ZodString;
85
- createdAt: z.ZodString;
86
- }, z.core.$strict>>;
68
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
69
+ supersede: "supersede";
70
+ warn: "warn";
71
+ }>>;
87
72
  }, z.core.$strip>;
88
73
  export type TaskItem = z.infer<typeof taskItemSchema>;
89
74
  export declare const taskSchema: z.ZodObject<{
@@ -112,24 +97,10 @@ export declare const taskSchema: z.ZodObject<{
112
97
  head: z.ZodOptional<z.ZodString>;
113
98
  branch: z.ZodOptional<z.ZodString>;
114
99
  }, z.core.$strict>>;
115
- reviewSource: z.ZodOptional<z.ZodObject<{
116
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
117
- cohortId: z.ZodString;
118
- generation: z.ZodNumber;
119
- lane: z.ZodEnum<{
120
- architect: "architect";
121
- cleaner: "cleaner";
122
- critic: "critic";
123
- qa: "qa";
124
- }>;
125
- snapshotId: z.ZodString;
126
- repositoryBindingDigest: z.ZodString;
127
- stateRevision: z.ZodNumber;
128
- dispatchId: z.ZodString;
129
- rerunCommand: z.ZodString;
130
- taskId: z.ZodString;
131
- createdAt: z.ZodString;
132
- }, z.core.$strict>>;
100
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
101
+ supersede: "supersede";
102
+ warn: "warn";
103
+ }>>;
133
104
  }, z.core.$strip>>;
134
105
  spawnPlan: z.ZodOptional<z.ZodObject<{
135
106
  whyParallel: z.ZodString;
@@ -165,24 +136,10 @@ export declare const taskSchemaNoIsolation: z.ZodObject<{
165
136
  head: z.ZodOptional<z.ZodString>;
166
137
  branch: z.ZodOptional<z.ZodString>;
167
138
  }, z.core.$strict>>;
168
- reviewSource: z.ZodOptional<z.ZodObject<{
169
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
170
- cohortId: z.ZodString;
171
- generation: z.ZodNumber;
172
- lane: z.ZodEnum<{
173
- architect: "architect";
174
- cleaner: "cleaner";
175
- critic: "critic";
176
- qa: "qa";
177
- }>;
178
- snapshotId: z.ZodString;
179
- repositoryBindingDigest: z.ZodString;
180
- stateRevision: z.ZodNumber;
181
- dispatchId: z.ZodString;
182
- rerunCommand: z.ZodString;
183
- taskId: z.ZodString;
184
- createdAt: z.ZodString;
185
- }, z.core.$strict>>;
139
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
140
+ supersede: "supersede";
141
+ warn: "warn";
142
+ }>>;
186
143
  }, z.core.$strip>>;
187
144
  spawnPlan: z.ZodOptional<z.ZodObject<{
188
145
  whyParallel: z.ZodString;
@@ -218,24 +175,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
218
175
  head: z.ZodOptional<z.ZodString>;
219
176
  branch: z.ZodOptional<z.ZodString>;
220
177
  }, z.core.$strict>>;
221
- reviewSource: z.ZodOptional<z.ZodObject<{
222
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
223
- cohortId: z.ZodString;
224
- generation: z.ZodNumber;
225
- lane: z.ZodEnum<{
226
- architect: "architect";
227
- cleaner: "cleaner";
228
- critic: "critic";
229
- qa: "qa";
230
- }>;
231
- snapshotId: z.ZodString;
232
- repositoryBindingDigest: z.ZodString;
233
- stateRevision: z.ZodNumber;
234
- dispatchId: z.ZodString;
235
- rerunCommand: z.ZodString;
236
- taskId: z.ZodString;
237
- createdAt: z.ZodString;
238
- }, z.core.$strict>>;
178
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
179
+ supersede: "supersede";
180
+ warn: "warn";
181
+ }>>;
239
182
  }, z.core.$strip>>;
240
183
  spawnPlan: z.ZodOptional<z.ZodObject<{
241
184
  whyParallel: z.ZodString;
@@ -270,24 +213,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
270
213
  head: z.ZodOptional<z.ZodString>;
271
214
  branch: z.ZodOptional<z.ZodString>;
272
215
  }, z.core.$strict>>;
273
- reviewSource: z.ZodOptional<z.ZodObject<{
274
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
275
- cohortId: z.ZodString;
276
- generation: z.ZodNumber;
277
- lane: z.ZodEnum<{
278
- architect: "architect";
279
- cleaner: "cleaner";
280
- critic: "critic";
281
- qa: "qa";
282
- }>;
283
- snapshotId: z.ZodString;
284
- repositoryBindingDigest: z.ZodString;
285
- stateRevision: z.ZodNumber;
286
- dispatchId: z.ZodString;
287
- rerunCommand: z.ZodString;
288
- taskId: z.ZodString;
289
- createdAt: z.ZodString;
290
- }, z.core.$strict>>;
216
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
217
+ supersede: "supersede";
218
+ warn: "warn";
219
+ }>>;
291
220
  }, z.core.$strip>>;
292
221
  spawnPlan: z.ZodOptional<z.ZodObject<{
293
222
  whyParallel: z.ZodString;
@@ -322,24 +251,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
322
251
  head: z.ZodOptional<z.ZodString>;
323
252
  branch: z.ZodOptional<z.ZodString>;
324
253
  }, z.core.$strict>>;
325
- reviewSource: z.ZodOptional<z.ZodObject<{
326
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
327
- cohortId: z.ZodString;
328
- generation: z.ZodNumber;
329
- lane: z.ZodEnum<{
330
- architect: "architect";
331
- cleaner: "cleaner";
332
- critic: "critic";
333
- qa: "qa";
334
- }>;
335
- snapshotId: z.ZodString;
336
- repositoryBindingDigest: z.ZodString;
337
- stateRevision: z.ZodNumber;
338
- dispatchId: z.ZodString;
339
- rerunCommand: z.ZodString;
340
- taskId: z.ZodString;
341
- createdAt: z.ZodString;
342
- }, z.core.$strict>>;
254
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
255
+ supersede: "supersede";
256
+ warn: "warn";
257
+ }>>;
343
258
  }, z.core.$strip>>;
344
259
  spawnPlan: z.ZodOptional<z.ZodObject<{
345
260
  whyParallel: z.ZodString;
@@ -374,24 +289,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
374
289
  head: z.ZodOptional<z.ZodString>;
375
290
  branch: z.ZodOptional<z.ZodString>;
376
291
  }, z.core.$strict>>;
377
- reviewSource: z.ZodOptional<z.ZodObject<{
378
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
379
- cohortId: z.ZodString;
380
- generation: z.ZodNumber;
381
- lane: z.ZodEnum<{
382
- architect: "architect";
383
- cleaner: "cleaner";
384
- critic: "critic";
385
- qa: "qa";
386
- }>;
387
- snapshotId: z.ZodString;
388
- repositoryBindingDigest: z.ZodString;
389
- stateRevision: z.ZodNumber;
390
- dispatchId: z.ZodString;
391
- rerunCommand: z.ZodString;
392
- taskId: z.ZodString;
393
- createdAt: z.ZodString;
394
- }, z.core.$strict>>;
292
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
293
+ supersede: "supersede";
294
+ warn: "warn";
295
+ }>>;
395
296
  }, z.core.$strip>>;
396
297
  spawnPlan: z.ZodOptional<z.ZodObject<{
397
298
  whyParallel: z.ZodString;
@@ -426,24 +327,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
426
327
  head: z.ZodOptional<z.ZodString>;
427
328
  branch: z.ZodOptional<z.ZodString>;
428
329
  }, z.core.$strict>>;
429
- reviewSource: z.ZodOptional<z.ZodObject<{
430
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
431
- cohortId: z.ZodString;
432
- generation: z.ZodNumber;
433
- lane: z.ZodEnum<{
434
- architect: "architect";
435
- cleaner: "cleaner";
436
- critic: "critic";
437
- qa: "qa";
438
- }>;
439
- snapshotId: z.ZodString;
440
- repositoryBindingDigest: z.ZodString;
441
- stateRevision: z.ZodNumber;
442
- dispatchId: z.ZodString;
443
- rerunCommand: z.ZodString;
444
- taskId: z.ZodString;
445
- createdAt: z.ZodString;
446
- }, z.core.$strict>>;
330
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
331
+ supersede: "supersede";
332
+ warn: "warn";
333
+ }>>;
447
334
  }, z.core.$strip>>;
448
335
  spawnPlan: z.ZodOptional<z.ZodObject<{
449
336
  whyParallel: z.ZodString;
@@ -478,24 +365,10 @@ declare const ALL_TASK_SCHEMAS: readonly [z.ZodObject<{
478
365
  head: z.ZodOptional<z.ZodString>;
479
366
  branch: z.ZodOptional<z.ZodString>;
480
367
  }, z.core.$strict>>;
481
- reviewSource: z.ZodOptional<z.ZodObject<{
482
- schema: z.ZodLiteral<"gjc.review_source_dispatch.v1">;
483
- cohortId: z.ZodString;
484
- generation: z.ZodNumber;
485
- lane: z.ZodEnum<{
486
- architect: "architect";
487
- cleaner: "cleaner";
488
- critic: "critic";
489
- qa: "qa";
490
- }>;
491
- snapshotId: z.ZodString;
492
- repositoryBindingDigest: z.ZodString;
493
- stateRevision: z.ZodNumber;
494
- dispatchId: z.ZodString;
495
- rerunCommand: z.ZodString;
496
- taskId: z.ZodString;
497
- createdAt: z.ZodString;
498
- }, z.core.$strict>>;
368
+ duplicate_policy: z.ZodOptional<z.ZodEnum<{
369
+ supersede: "supersede";
370
+ warn: "warn";
371
+ }>>;
499
372
  }, z.core.$strip>>;
500
373
  spawnPlan: z.ZodOptional<z.ZodObject<{
501
374
  whyParallel: z.ZodString;
@@ -520,6 +393,7 @@ export interface TaskParams {
520
393
  spawnPlan?: SpawnPlanReceipt;
521
394
  tasks: TaskItem[];
522
395
  isolated?: boolean;
396
+ duplicate_policy?: "warn" | "supersede";
523
397
  }
524
398
  /** A code review finding reported by the reviewer agent */
525
399
  export interface ReviewFinding {
@@ -665,6 +539,11 @@ export interface TaskRecoveryArtifactRef {
665
539
  /** Recovery artifacts remain readable for the parent session lifetime. */
666
540
  durability: "session";
667
541
  }
542
+ /** Bounded duplicate-launch disposition carried into task receipts. */
543
+ export interface DuplicateDisposition {
544
+ action: "warned" | "superseded";
545
+ predecessorIds: string[];
546
+ }
668
547
  export interface TaskPersistenceResult {
669
548
  outcome: "applied" | "no_changes" | "recovery_available";
670
549
  ownerWorktreeApplied: boolean;
@@ -700,6 +579,7 @@ export interface SingleResult {
700
579
  setupFailure?: SetupFailureSummary;
701
580
  aborted?: boolean;
702
581
  abortReason?: string;
582
+ duplicateDisposition?: DuplicateDisposition;
703
583
  paused?: boolean;
704
584
  /** Aggregated usage from the subprocess, accumulated incrementally from message_end events. */
705
585
  usage?: Usage;
@@ -766,21 +646,6 @@ export interface SingleResult {
766
646
  head?: string;
767
647
  branch?: string;
768
648
  };
769
- /** Leader-issued immutable source identity for source-aware review lanes (#3469). */
770
- reviewSource?: {
771
- schema: "gjc.review_source_dispatch.v1";
772
- cohortId: string;
773
- generation: number;
774
- lane: ReviewSourceLane;
775
- snapshotId: string;
776
- repositoryBindingDigest: string;
777
- stateRevision: number;
778
- dispatchId: string;
779
- rerunCommand: string;
780
- disposition: ReviewDeliveryDisposition;
781
- currentSnapshotId?: string;
782
- deliveryId?: string;
783
- };
784
649
  }
785
650
  /** True only for complete, factual five-bucket cost accounting. */
786
651
  export declare function hasCompleteUsageCostBreakdown(usage: unknown): boolean;
@@ -91,7 +91,7 @@ export declare class BashTool implements AgentTool<BashToolSchema, BashToolDetai
91
91
  label: string;
92
92
  commandCwd: string;
93
93
  }>;
94
- execute(toolCallId: string, { command: rawCommand, env: rawEnv, timeout: rawTimeout, cwd, async: asyncRequested, pty, }: BashToolInput, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<BashToolDetails>, ctx?: AgentToolContext): Promise<AgentToolResult<BashToolDetails>>;
94
+ execute(_toolCallId: string, { command: rawCommand, env: rawEnv, timeout: rawTimeout, cwd, async: asyncRequested, pty, }: BashToolInput, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<BashToolDetails>, ctx?: AgentToolContext): Promise<AgentToolResult<BashToolDetails>>;
95
95
  }
96
96
  export interface BashRenderArgs {
97
97
  command?: string;
@@ -49,9 +49,6 @@ export interface ReadUrlToolDetails {
49
49
  }
50
50
  interface ReadUrlCacheEntry {
51
51
  artifactId?: string;
52
- artifactVerified?: boolean;
53
- artifactFailureDiagnostic?: string;
54
- artifactStorageIncomplete?: boolean;
55
52
  details: ReadUrlToolDetails;
56
53
  image?: FetchImagePayload;
57
54
  /** Complete URL output, including its preamble and body. */
@@ -4,11 +4,10 @@
4
4
  * Tools populate details.meta using the fluent OutputMetaBuilder.
5
5
  * The tool wrapper automatically formats and appends notices at message boundary.
6
6
  */
7
- import type { AgentTool, AgentToolContext, AgentToolResult } from "@gajae-code/agent-core";
7
+ import type { AgentTool } from "@gajae-code/agent-core";
8
8
  import { type Settings } from "../config/settings";
9
9
  import type { Theme } from "../modes/theme/theme";
10
10
  import { type OutputSummary, type ReadWindow, type TruncationResult } from "../session/streaming-output";
11
- export { isValidArtifactId } from "../utils/artifact-id";
12
11
  /**
13
12
  * Truncation metadata for the output notice.
14
13
  */
@@ -49,16 +48,8 @@ export interface TruncationMeta {
49
48
  elidedLines?: number;
50
49
  /** Artifact ID when output was persisted; completeness is tracked separately below. */
51
50
  artifactId?: string;
52
- /** Artifact existence was proven by a successful save or publisher receipt. */
53
- artifactVerified?: boolean;
54
51
  /** Bytes omitted from an artifact after its hard storage cap was reached. */
55
52
  artifactTruncatedBytes?: number;
56
- /** Bytes dropped before Bash received the native output stream. */
57
- sourceTruncatedBytes?: number;
58
- /** Exact source capture completeness could not be proven. */
59
- sourceCaptureIncomplete?: boolean;
60
- /** Bytes omitted from the visible output by per-line column capping. */
61
- columnDroppedBytes?: number;
62
53
  /** Bounded diagnostic when artifact writer creation, write, or finalization failed. */
63
54
  artifactFailureDiagnostic?: string;
64
55
  /** Next offset for pagination (head truncation only) */
@@ -112,17 +103,12 @@ export interface OutputMeta {
112
103
  source?: SourceMeta;
113
104
  diagnostics?: DiagnosticMeta;
114
105
  limits?: LimitsMeta;
115
- /** Diagnostics were omitted to preserve the configured inline byte cap. */
116
- diagnosticsOmitted?: boolean;
117
106
  }
118
107
  export interface TruncationOptions {
119
108
  direction: "head" | "tail" | "middle";
120
109
  startLine?: number;
121
110
  totalFileLines?: number;
122
111
  artifactId?: string;
123
- artifactVerified?: boolean;
124
- artifactFailureDiagnostic?: string;
125
- sourceCaptureIncomplete?: boolean;
126
112
  maxBytes?: number;
127
113
  noticeOwner?: "body";
128
114
  }
@@ -138,8 +124,6 @@ export interface TruncationTextOptions {
138
124
  totalBytes?: number;
139
125
  maxBytes?: number;
140
126
  artifactId?: string;
141
- artifactVerified?: boolean;
142
- sourceCaptureIncomplete?: boolean;
143
127
  noticeOwner?: "body";
144
128
  }
145
129
  /**
@@ -161,7 +145,6 @@ export declare class OutputMetaBuilder {
161
145
  /** Add metadata from the actual head/tail windows retained by middle truncation. */
162
146
  truncationWindows(windows: ReadWindow, options?: {
163
147
  artifactId?: string;
164
- artifactVerified?: boolean;
165
148
  noticeOwner?: "body";
166
149
  maxBytes?: number;
167
150
  rangeBase?: "file" | "window";
@@ -199,24 +182,10 @@ export declare class OutputMetaBuilder {
199
182
  /** Create a new OutputMetaBuilder. */
200
183
  export declare function outputMeta(): OutputMetaBuilder;
201
184
  export declare function formatFullOutputReference(artifactId: string): string;
202
- export interface ArtifactFailurePreview {
203
- text: string;
204
- omittedBytes: number;
205
- }
206
- /** Build a bounded, UTF-8-safe preview when artifact storage cannot retain the full payload. */
207
- export declare function createArtifactFailurePreview(fullText: string, maxInlineBytes: number | undefined, diagnostic: string): ArtifactFailurePreview;
208
- /** Format an artifact reference without claiming completeness when capture or storage omitted bytes. */
209
- export declare function formatArtifactReference(artifactId: string, artifactTruncatedBytes?: number, sourceTruncatedBytes?: number, sourceCaptureIncomplete?: boolean): string;
210
- export interface ArtifactEvidence {
211
- artifactId?: string;
212
- artifactVerified?: boolean;
213
- artifactTruncatedBytes?: number;
214
- sourceTruncatedBytes?: number;
215
- sourceCaptureIncomplete?: boolean;
216
- artifactFailureDiagnostic?: string;
217
- columnDroppedBytes?: number;
218
- }
219
- export declare function formatArtifactEvidenceNotice(evidence: ArtifactEvidence): string | undefined;
185
+ /**
186
+ * Format an artifact reference without claiming completeness when storage was hard-capped.
187
+ */
188
+ export declare function formatArtifactReference(artifactId: string, artifactTruncatedBytes?: number): string;
220
189
  export declare function formatTruncationMetaNotice(truncation: TruncationMeta): string;
221
190
  /**
222
191
  * Format styled artifact reference with warning color and brackets.
@@ -269,7 +238,6 @@ export declare function resolveBashOutputSinkHeadBytes(s: Settings): number;
269
238
  * line-buffer post-processing, so one setting controls both surfaces.
270
239
  */
271
240
  export declare function resolveOutputMaxColumns(s: Settings | undefined): number;
272
- export declare function finalizeToolResultForDelivery(result: AgentToolResult, toolName: string, context: AgentToolContext | undefined): Promise<AgentToolResult>;
273
241
  /**
274
242
  * Wrap a tool to:
275
243
  * 1. Automatically append output notices based on details.meta
@@ -16,6 +16,11 @@ declare const subagentSchema: z.ZodObject<{
16
16
  id: z.ZodOptional<z.ZodString>;
17
17
  message: z.ZodOptional<z.ZodString>;
18
18
  pause: z.ZodOptional<z.ZodBoolean>;
19
+ condition: z.ZodOptional<z.ZodEnum<{
20
+ all_terminal: "all_terminal";
21
+ any_terminal: "any_terminal";
22
+ }>>;
23
+ heartbeat_ms: z.ZodOptional<z.ZodNumber>;
19
24
  timeout_ms: z.ZodOptional<z.ZodNumber>;
20
25
  limit: z.ZodOptional<z.ZodNumber>;
21
26
  verbosity: z.ZodOptional<z.ZodEnum<{
@@ -65,6 +70,11 @@ export interface SubagentToolDetails {
65
70
  subagents: SubagentSnapshot[];
66
71
  /** Await outcome for a live await receipt; omitted when no wait was started. */
67
72
  awaitOutcome?: SubagentAwaitOutcome;
73
+ waitOutcome?: "completed" | "timed_out_wait" | "interrupted";
74
+ condition?: "all_terminal" | "any_terminal";
75
+ heartbeatMs?: number;
76
+ terminalIds?: string[];
77
+ acknowledgedTerminalIds?: string[];
68
78
  /** True only when the parent await was interrupted; the child was not cancelled. */
69
79
  interrupted?: true;
70
80
  }
@@ -89,6 +99,11 @@ export declare class SubagentTool implements AgentTool<typeof subagentSchema, Su
89
99
  id: z.ZodOptional<z.ZodString>;
90
100
  message: z.ZodOptional<z.ZodString>;
91
101
  pause: z.ZodOptional<z.ZodBoolean>;
102
+ condition: z.ZodOptional<z.ZodEnum<{
103
+ all_terminal: "all_terminal";
104
+ any_terminal: "any_terminal";
105
+ }>>;
106
+ heartbeat_ms: z.ZodOptional<z.ZodNumber>;
92
107
  timeout_ms: z.ZodOptional<z.ZodNumber>;
93
108
  limit: z.ZodOptional<z.ZodNumber>;
94
109
  verbosity: z.ZodOptional<z.ZodEnum<{
@@ -1,4 +1,5 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@gajae-code/agent-core";
2
+ import type { RawArgumentValidationResult } from "@gajae-code/ai/types";
2
3
  import type { Component } from "@gajae-code/tui";
3
4
  import * as z from "zod/v4";
4
5
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -25,6 +26,7 @@ export interface TodoWriteToolDetails {
25
26
  phases: TodoPhase[];
26
27
  storage: "session" | "memory";
27
28
  }
29
+ declare function validateRawTodoArguments(arguments_: Record<string, unknown>): RawArgumentValidationResult;
28
30
  declare const todoWriteSchema: z.ZodObject<{
29
31
  ops: z.ZodArray<z.ZodObject<{
30
32
  op: z.ZodEnum<{
@@ -88,6 +90,7 @@ export declare class TodoWriteTool implements AgentTool<typeof todoWriteSchema,
88
90
  text: z.ZodOptional<z.ZodString>;
89
91
  }, z.core.$strip>>;
90
92
  }, z.core.$strip>;
93
+ readonly rawArgumentValidation: typeof validateRawTodoArguments;
91
94
  readonly concurrency = "exclusive";
92
95
  readonly strict = true;
93
96
  readonly loadMode = "discoverable";
@@ -14,7 +14,6 @@ export declare class ToolResultBuilder<TDetails extends DetailsWithMeta> {
14
14
  truncation(result: TruncationResult, options: TruncationOptions): this;
15
15
  truncationWindows(windows: ReadWindow, options?: {
16
16
  artifactId?: string;
17
- artifactVerified?: boolean;
18
17
  noticeOwner?: "body";
19
18
  maxBytes?: number;
20
19
  rangeBase?: "file" | "window";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/coding-agent",
4
- "version": "0.12.6",
4
+ "version": "0.12.7",
5
5
  "description": "Gajae Code CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://gajae-code.com",
7
7
  "author": "Yeachan-Heo and Gajae Code Contributors",
@@ -53,13 +53,13 @@
53
53
  "@agentclientprotocol/sdk": "1.3.0",
54
54
  "@babel/parser": "^7.29.3",
55
55
  "@mozilla/readability": "^0.6.0",
56
- "@gajae-code/stats": "0.12.6",
57
- "@gajae-code/agent-core": "0.12.6",
58
- "@gajae-code/ai": "0.12.6",
59
- "@gajae-code/bridge-client": "0.12.6",
60
- "@gajae-code/natives": "0.12.6",
61
- "@gajae-code/tui": "0.12.6",
62
- "@gajae-code/utils": "0.12.6",
56
+ "@gajae-code/stats": "0.12.7",
57
+ "@gajae-code/agent-core": "0.12.7",
58
+ "@gajae-code/ai": "0.12.7",
59
+ "@gajae-code/bridge-client": "0.12.7",
60
+ "@gajae-code/natives": "0.12.7",
61
+ "@gajae-code/tui": "0.12.7",
62
+ "@gajae-code/utils": "0.12.7",
63
63
  "@puppeteer/browsers": "^2.13.0",
64
64
  "@types/turndown": "5.0.6",
65
65
  "@xterm/headless": "^6.0.0",