@gajae-code/coding-agent 0.12.6 → 0.12.8

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 (150) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/dist/types/async/job-manager.d.ts +36 -1
  3. package/dist/types/commands/notify.d.ts +4 -0
  4. package/dist/types/config/file-lock.d.ts +3 -0
  5. package/dist/types/config/model-discovery-manager.d.ts +6 -1
  6. package/dist/types/config/model-registry.d.ts +2 -0
  7. package/dist/types/config/resolve-config-value.d.ts +2 -1
  8. package/dist/types/config/settings-schema.d.ts +17 -1
  9. package/dist/types/eval/backend.d.ts +2 -2
  10. package/dist/types/exec/bash-executor.d.ts +8 -10
  11. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +0 -36
  12. package/dist/types/internal-urls/registry-helpers.d.ts +0 -18
  13. package/dist/types/main.d.ts +1 -0
  14. package/dist/types/modes/components/hook-selector.d.ts +20 -0
  15. package/dist/types/modes/components/notifications-settings-editor.d.ts +53 -4
  16. package/dist/types/modes/controllers/extension-ui-controller.d.ts +1 -1
  17. package/dist/types/modes/controllers/selector-controller.d.ts +4 -2
  18. package/dist/types/sdk/broker/broker.d.ts +5 -1
  19. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +1 -0
  20. package/dist/types/sdk/bus/chat-daemon-control.d.ts +11 -3
  21. package/dist/types/sdk/bus/config.d.ts +75 -113
  22. package/dist/types/sdk/bus/discord-live-provider.d.ts +8 -2
  23. package/dist/types/sdk/bus/discord-provider.d.ts +19 -0
  24. package/dist/types/sdk/bus/index.d.ts +1 -1
  25. package/dist/types/sdk/bus/notification-orchestration.d.ts +127 -18
  26. package/dist/types/sdk/bus/notification-service.d.ts +31 -4
  27. package/dist/types/sdk/bus/session-control.d.ts +8 -3
  28. package/dist/types/sdk/bus/slack-live-provider.d.ts +9 -2
  29. package/dist/types/sdk/bus/slack-provider.d.ts +22 -0
  30. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +9 -4
  31. package/dist/types/sdk/client/discovery.d.ts +2 -1
  32. package/dist/types/sdk/host/host.d.ts +2 -23
  33. package/dist/types/sdk/host/query/handlers.d.ts +2 -0
  34. package/dist/types/sdk/host/reverse-leases.d.ts +4 -7
  35. package/dist/types/sdk/index.d.ts +1 -0
  36. package/dist/types/sdk/providers.d.ts +22 -0
  37. package/dist/types/sdk/session-directory.d.ts +1 -1
  38. package/dist/types/session/artifacts.d.ts +5 -8
  39. package/dist/types/session/client-bridge.d.ts +0 -14
  40. package/dist/types/session/internal/managed-session-scope.d.ts +17 -1
  41. package/dist/types/session/internal/managed-session-storage.d.ts +11 -4
  42. package/dist/types/session/internal/native-publish-outcome.d.ts +1 -0
  43. package/dist/types/session/internal/session-open-errors.d.ts +5 -0
  44. package/dist/types/session/messages.d.ts +1 -4
  45. package/dist/types/session/session-manager.d.ts +7 -6
  46. package/dist/types/session/session-storage.d.ts +2 -0
  47. package/dist/types/session/streaming-output.d.ts +0 -32
  48. package/dist/types/task/receipt.d.ts +1 -2
  49. package/dist/types/task/types.d.ts +43 -178
  50. package/dist/types/tools/bash.d.ts +1 -1
  51. package/dist/types/tools/fetch.d.ts +0 -3
  52. package/dist/types/tools/output-meta.d.ts +5 -37
  53. package/dist/types/tools/subagent.d.ts +15 -0
  54. package/dist/types/tools/todo-write.d.ts +3 -0
  55. package/dist/types/tools/tool-result.d.ts +0 -1
  56. package/package.json +10 -8
  57. package/scripts/build-sdk-package-smoke.ts +51 -0
  58. package/scripts/capture-notifications-settings-showcase.ts +1 -1
  59. package/src/async/job-manager.ts +430 -46
  60. package/src/cli/notify-cli.ts +204 -94
  61. package/src/commands/notify.ts +19 -8
  62. package/src/config/file-lock.ts +6 -0
  63. package/src/config/model-discovery-manager.ts +50 -8
  64. package/src/config/model-registry.ts +862 -75
  65. package/src/config/resolve-config-value.ts +10 -8
  66. package/src/config/settings-schema.ts +25 -15
  67. package/src/config/settings.ts +15 -15
  68. package/src/cursor.ts +13 -20
  69. package/src/defaults/gjc/skills/ultragoal/SKILL.md +2 -3
  70. package/src/eval/backend.ts +2 -2
  71. package/src/exec/bash-executor.ts +151 -425
  72. package/src/gjc-runtime/session-state-sidecar.ts +12 -2
  73. package/src/gjc-runtime/ultragoal-runtime.ts +3 -280
  74. package/src/gjc-runtime/workflow-manifest.generated.json +1 -40
  75. package/src/gjc-runtime/workflow-manifest.ts +0 -12
  76. package/src/internal-urls/agent-protocol.ts +38 -98
  77. package/src/internal-urls/artifact-protocol.ts +17 -28
  78. package/src/internal-urls/docs-index.generated.ts +7 -7
  79. package/src/internal-urls/registry-helpers.ts +0 -62
  80. package/src/main.ts +43 -7
  81. package/src/modes/DESIGN.md +11 -11
  82. package/src/modes/acp/acp-agent.ts +0 -24
  83. package/src/modes/acp/acp-client-bridge.ts +11 -154
  84. package/src/modes/components/hook-selector.ts +155 -44
  85. package/src/modes/components/model-selector.ts +242 -49
  86. package/src/modes/components/notifications-settings-editor.ts +631 -85
  87. package/src/modes/controllers/extension-ui-controller.ts +114 -15
  88. package/src/modes/controllers/selector-controller.ts +464 -50
  89. package/src/prompts/tools/bash.md +2 -2
  90. package/src/sdk/acp/adapter.ts +9 -200
  91. package/src/sdk/broker/broker.ts +54 -10
  92. package/src/sdk/broker/lifecycle-ledger.ts +34 -1
  93. package/src/sdk/broker/lifecycle.ts +47 -50
  94. package/src/sdk/bus/chat-daemon-cli.ts +12 -5
  95. package/src/sdk/bus/chat-daemon-control.ts +35 -8
  96. package/src/sdk/bus/chat-daemon-runtime.ts +16 -2
  97. package/src/sdk/bus/config.ts +534 -286
  98. package/src/sdk/bus/discord-live-provider.ts +57 -2
  99. package/src/sdk/bus/discord-provider.ts +21 -0
  100. package/src/sdk/bus/index.ts +105 -359
  101. package/src/sdk/bus/notification-orchestration.ts +371 -68
  102. package/src/sdk/bus/notification-service.ts +431 -130
  103. package/src/sdk/bus/session-control.ts +119 -44
  104. package/src/sdk/bus/slack-live-provider.ts +78 -2
  105. package/src/sdk/bus/slack-provider.ts +24 -0
  106. package/src/sdk/bus/telegram-daemon-cli.ts +9 -2
  107. package/src/sdk/bus/telegram-daemon-contract.ts +9 -4
  108. package/src/sdk/bus/telegram-daemon-control.ts +3 -3
  109. package/src/sdk/bus/telegram-daemon.ts +23 -15
  110. package/src/sdk/client/discovery.ts +10 -4
  111. package/src/sdk/host/host.ts +9 -187
  112. package/src/sdk/host/query/handlers.ts +20 -1
  113. package/src/sdk/host/reverse-leases.ts +42 -249
  114. package/src/sdk/index.ts +1 -0
  115. package/src/sdk/protocol/operation-inventory.generated.json +18 -0
  116. package/src/sdk/protocol/operation-registry.ts +5 -2
  117. package/src/sdk/providers.ts +51 -0
  118. package/src/sdk/session-directory.ts +1 -0
  119. package/src/sdk/session.ts +10 -7
  120. package/src/session/agent-session.ts +59 -202
  121. package/src/session/artifacts.ts +74 -211
  122. package/src/session/client-bridge.ts +0 -15
  123. package/src/session/internal/managed-session-scope.ts +981 -450
  124. package/src/session/internal/managed-session-storage.ts +362 -124
  125. package/src/session/internal/native-publish-outcome.ts +3 -1
  126. package/src/session/internal/session-open-errors.ts +11 -0
  127. package/src/session/messages.ts +7 -32
  128. package/src/session/session-manager.ts +48 -15
  129. package/src/session/session-storage.ts +72 -5
  130. package/src/session/streaming-output.ts +40 -198
  131. package/src/slash-commands/builtin-registry.ts +82 -4
  132. package/src/task/index.ts +237 -65
  133. package/src/task/receipt.ts +2 -4
  134. package/src/task/render.ts +0 -30
  135. package/src/task/types.ts +10 -34
  136. package/src/tools/ask.ts +1 -1
  137. package/src/tools/bash.ts +239 -818
  138. package/src/tools/eval.ts +4 -99
  139. package/src/tools/fetch.ts +15 -77
  140. package/src/tools/find.ts +3 -7
  141. package/src/tools/output-meta.ts +114 -696
  142. package/src/tools/search.ts +4 -9
  143. package/src/tools/subagent.ts +97 -75
  144. package/src/tools/telegram-send.ts +4 -2
  145. package/src/tools/todo-write.ts +47 -0
  146. package/src/tools/tool-result.ts +0 -1
  147. package/dist/types/gjc-runtime/ultragoal-review-source.d.ts +0 -83
  148. package/dist/types/utils/artifact-id.d.ts +0 -2
  149. package/src/gjc-runtime/ultragoal-review-source.ts +0 -378
  150. 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.8",
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.8",
57
+ "@gajae-code/agent-core": "0.12.8",
58
+ "@gajae-code/ai": "0.12.8",
59
+ "@gajae-code/bridge-client": "0.12.8",
60
+ "@gajae-code/natives": "0.12.8",
61
+ "@gajae-code/tui": "0.12.8",
62
+ "@gajae-code/utils": "0.12.8",
63
63
  "@puppeteer/browsers": "^2.13.0",
64
64
  "@types/turndown": "5.0.6",
65
65
  "@xterm/headless": "^6.0.0",
@@ -132,6 +132,8 @@
132
132
  },
133
133
  "./sdk/models": null,
134
134
  "./sdk/models.js": null,
135
+ "./sdk/providers": null,
136
+ "./sdk/providers.js": null,
135
137
  "./sdk/lifecycle-session": null,
136
138
  "./sdk/lifecycle-session.js": null,
137
139
  "./sdk/startup-capability": null,
@@ -9,6 +9,7 @@ const packageName = "@gajae-code/coding-agent";
9
9
  const aiPackageDir = path.resolve(packageDir, "../ai");
10
10
  const bridgeClientPackageDir = path.resolve(packageDir, "../bridge-client");
11
11
  const tuiPackageDir = path.resolve(packageDir, "../tui");
12
+ const agentPackageDir = path.resolve(packageDir, "../agent");
12
13
  const nativesPackageDir = path.resolve(packageDir, "../natives");
13
14
  const linuxX64PackageDir = path.resolve(packageDir, "../natives-linux-x64");
14
15
  const manifestsDir = path.join(packageDir, "test/manifests");
@@ -41,6 +42,7 @@ async function runSmoke(): Promise<Surface> {
41
42
  await fs.copyFile(path.join(nativesPackageDir, "native", entry), path.join(stagedNativeDir, entry));
42
43
  }
43
44
  }
45
+ const agentTarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], agentPackageDir);
44
46
  const aiTarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], aiPackageDir);
45
47
  const bridgeClientTarball = run(
46
48
  ["bun", "pm", "pack", "--destination", tempDir, "--quiet"],
@@ -49,6 +51,7 @@ async function runSmoke(): Promise<Surface> {
49
51
  const tuiTarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], tuiPackageDir);
50
52
  const nativesTarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], nativesPackageDir);
51
53
  const linuxX64Tarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], stagedLinuxX64Dir);
54
+ const agentTarballPath = path.isAbsolute(agentTarball) ? agentTarball : path.join(agentPackageDir, agentTarball);
52
55
  const codingAgentTarball = run(["bun", "pm", "pack", "--destination", tempDir, "--quiet"], packageDir);
53
56
  const aiTarballPath = path.isAbsolute(aiTarball) ? aiTarball : path.join(aiPackageDir, aiTarball);
54
57
  const bridgeClientTarballPath = path.isAbsolute(bridgeClientTarball)
@@ -71,6 +74,7 @@ async function runSmoke(): Promise<Surface> {
71
74
  name: "sdk-smoke",
72
75
  private: true,
73
76
  dependencies: {
77
+ "@gajae-code/agent-core": `file:${agentTarballPath}`,
74
78
  "@gajae-code/ai": `file:${aiTarballPath}`,
75
79
  "@gajae-code/bridge-client": `file:${bridgeClientTarballPath}`,
76
80
  [packageName]: `file:${codingAgentTarballPath}`,
@@ -79,6 +83,7 @@ async function runSmoke(): Promise<Surface> {
79
83
  "@gajae-code/natives-linux-x64": `file:${linuxX64TarballPath}`,
80
84
  },
81
85
  overrides: {
86
+ "@gajae-code/agent-core": `file:${agentTarballPath}`,
82
87
  "@gajae-code/ai": `file:${aiTarballPath}`,
83
88
  "@gajae-code/bridge-client": `file:${bridgeClientTarballPath}`,
84
89
  "@gajae-code/tui": `file:${tuiTarballPath}`,
@@ -96,6 +101,52 @@ async function runSmoke(): Promise<Surface> {
96
101
  const installedPackage = JSON.parse(
97
102
  await fs.readFile(path.join(tempDir, "node_modules", packageName, "package.json"), "utf8"),
98
103
  ) as { exports?: Record<string, unknown> };
104
+ const installedAgentPackagePath = path.join(tempDir, "node_modules", "@gajae-code", "agent-core");
105
+ const installedAgentPackageJsonPath = path.join(installedAgentPackagePath, "package.json");
106
+ const installedAgentPackage = JSON.parse(await fs.readFile(installedAgentPackageJsonPath, "utf8")) as {
107
+ name?: string;
108
+ version?: string;
109
+ };
110
+ const expectedAgentPackage = JSON.parse(
111
+ await fs.readFile(path.join(agentPackageDir, "package.json"), "utf8"),
112
+ ) as {
113
+ name?: string;
114
+ version?: string;
115
+ };
116
+ const installedAgentRealpath = await fs.realpath(installedAgentPackagePath);
117
+ const tempRealpath = await fs.realpath(tempDir);
118
+ const sourceAgentRealpath = await fs.realpath(agentPackageDir);
119
+ if (
120
+ !installedAgentRealpath.startsWith(`${tempRealpath}${path.sep}`) ||
121
+ installedAgentRealpath.startsWith(`${sourceAgentRealpath}${path.sep}`)
122
+ ) {
123
+ throw new Error("packed smoke resolved agent-core outside the temporary packed installation");
124
+ }
125
+ const packedAgentInspectDir = path.join(tempDir, "packed-agent-inspect");
126
+ await fs.mkdir(packedAgentInspectDir);
127
+ const extract = Bun.spawnSync(["tar", "xzf", agentTarballPath, "-C", packedAgentInspectDir], {
128
+ stdout: "pipe",
129
+ stderr: "pipe",
130
+ });
131
+ if (extract.exitCode !== 0)
132
+ throw new Error(`could not inspect packed agent-core tarball: ${extract.stderr.toString()}`);
133
+ const packedAgentPackageJson = await fs.readFile(
134
+ path.join(packedAgentInspectDir, "package", "package.json"),
135
+ "utf8",
136
+ );
137
+ const installedAgentPackageJson = await fs.readFile(installedAgentPackageJsonPath, "utf8");
138
+ if (installedAgentPackageJson !== packedAgentPackageJson) {
139
+ throw new Error("packed smoke installed agent-core content different from the packed tarball");
140
+ }
141
+ if (
142
+ installedAgentPackage.name !== expectedAgentPackage.name ||
143
+ installedAgentPackage.version !== expectedAgentPackage.version
144
+ ) {
145
+ throw new Error("packed smoke installed a mismatched agent-core package");
146
+ }
147
+ if (installedAgentPackage.name !== "@gajae-code/agent-core") {
148
+ throw new Error("packed smoke agent-core package identity is invalid");
149
+ }
99
150
  if (installedPackage.exports?.["./session/internal/*"] !== null) {
100
151
  throw new Error("packed package must explicitly block ./session/internal/*");
101
152
  }
@@ -11,7 +11,7 @@ import {
11
11
  } from "../test/fixtures/tui/notifications-settings-showcase";
12
12
 
13
13
  const CANONICAL_COMMAND =
14
- "bun packages/coding-agent/scripts/capture-notifications-settings-showcase.ts --output .gjc/qa/issue-2050-notifications";
14
+ "bun packages/coding-agent/scripts/capture-notifications-settings-showcase.ts --output .gjc/qa/issue-3570-notifications";
15
15
  const DETERMINISTIC_CAPTURE_TIMESTAMP = "1970-01-01T00:00:00.000Z";
16
16
  const CAPTURE_TOOL_VERSION = "notifications-settings-showcase-live-settings-selector-v3";
17
17