@gajae-code/coding-agent 0.12.4 → 0.12.6

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 (139) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +4 -1
  3. package/dist/types/async/job-manager.d.ts +9 -1
  4. package/dist/types/eval/backend.d.ts +2 -2
  5. package/dist/types/exec/bash-executor.d.ts +10 -8
  6. package/dist/types/extensibility/extensions/runner.d.ts +9 -7
  7. package/dist/types/gjc-runtime/launch-tmux.d.ts +22 -3
  8. package/dist/types/gjc-runtime/psmux-detect.d.ts +3 -0
  9. package/dist/types/gjc-runtime/team-launch.d.ts +3 -1
  10. package/dist/types/gjc-runtime/team-runtime.d.ts +14 -2
  11. package/dist/types/gjc-runtime/team-store.d.ts +0 -4
  12. package/dist/types/gjc-runtime/team-workers.d.ts +5 -0
  13. package/dist/types/gjc-runtime/tmux-common.d.ts +1 -0
  14. package/dist/types/gjc-runtime/tmux-provider-context.d.ts +57 -0
  15. package/dist/types/gjc-runtime/tmux-sessions.d.ts +8 -1
  16. package/dist/types/gjc-runtime/ultragoal-change-set.d.ts +3 -0
  17. package/dist/types/gjc-runtime/ultragoal-review-source.d.ts +83 -0
  18. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +57 -4
  19. package/dist/types/internal-urls/registry-helpers.d.ts +18 -0
  20. package/dist/types/modes/components/gjc-bundle-settings.d.ts +1 -0
  21. package/dist/types/modes/components/plugin-settings.d.ts +2 -0
  22. package/dist/types/modes/components/settings-selector.d.ts +2 -0
  23. package/dist/types/sdk/broker/broker.d.ts +18 -0
  24. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +13 -0
  25. package/dist/types/sdk/broker/lifecycle.d.ts +1 -0
  26. package/dist/types/sdk/bus/chat-daemon-control.d.ts +5 -2
  27. package/dist/types/sdk/bus/index.d.ts +4 -0
  28. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +7 -3
  29. package/dist/types/sdk/bus/telegram-daemon.d.ts +25 -3
  30. package/dist/types/sdk/bus/topic-registry.d.ts +63 -3
  31. package/dist/types/sdk/host/host.d.ts +23 -2
  32. package/dist/types/sdk/host/reverse-leases.d.ts +7 -4
  33. package/dist/types/session/agent-session.d.ts +5 -4
  34. package/dist/types/session/artifacts.d.ts +8 -5
  35. package/dist/types/session/attempt-record-store.d.ts +19 -0
  36. package/dist/types/session/client-bridge.d.ts +14 -0
  37. package/dist/types/session/internal/managed-session-storage.d.ts +7 -23
  38. package/dist/types/session/messages.d.ts +4 -1
  39. package/dist/types/session/session-manager.d.ts +7 -5
  40. package/dist/types/session/session-storage.d.ts +8 -0
  41. package/dist/types/session/streaming-output.d.ts +32 -0
  42. package/dist/types/task/executor.d.ts +1 -1
  43. package/dist/types/task/index.d.ts +2 -1
  44. package/dist/types/task/receipt.d.ts +3 -0
  45. package/dist/types/task/types.d.ts +194 -0
  46. package/dist/types/task/worktree.d.ts +13 -6
  47. package/dist/types/tools/bash.d.ts +1 -1
  48. package/dist/types/tools/fetch.d.ts +3 -0
  49. package/dist/types/tools/output-meta.d.ts +37 -5
  50. package/dist/types/tools/subagent.d.ts +2 -0
  51. package/dist/types/tools/tool-result.d.ts +1 -0
  52. package/dist/types/utils/artifact-id.d.ts +2 -0
  53. package/dist/types/utils/git.d.ts +1 -0
  54. package/package.json +8 -8
  55. package/scripts/capture-sticky-viewport-showcase.ts +131 -5
  56. package/scripts/verify-gjc-sdk-canonicalization.ts +128 -183
  57. package/scripts/verify-sticky-viewport-showcase.ts +620 -93
  58. package/src/async/job-manager.ts +13 -5
  59. package/src/config/model-profiles.ts +8 -0
  60. package/src/config/settings-schema.ts +17 -3
  61. package/src/cursor.ts +20 -13
  62. package/src/defaults/gjc/skills/ultragoal/SKILL.md +5 -2
  63. package/src/eval/backend.ts +2 -2
  64. package/src/exec/bash-executor.ts +425 -151
  65. package/src/extensibility/extensions/runner.ts +80 -6
  66. package/src/extensibility/extensions/wrapper.ts +22 -15
  67. package/src/extensibility/runtime-skill-discovery.ts +4 -6
  68. package/src/gjc-runtime/launch-tmux.ts +309 -293
  69. package/src/gjc-runtime/managed-owner-supervisor.ts +6 -2
  70. package/src/gjc-runtime/psmux-detect.ts +52 -6
  71. package/src/gjc-runtime/team-launch.ts +50 -2
  72. package/src/gjc-runtime/team-runtime.ts +716 -251
  73. package/src/gjc-runtime/team-store.ts +25 -7
  74. package/src/gjc-runtime/team-workers.ts +161 -1
  75. package/src/gjc-runtime/tmux-common.ts +16 -4
  76. package/src/gjc-runtime/tmux-gc.ts +37 -5
  77. package/src/gjc-runtime/tmux-owner-isolation.ts +2 -0
  78. package/src/gjc-runtime/tmux-provider-context.ts +451 -0
  79. package/src/gjc-runtime/tmux-sessions.ts +409 -156
  80. package/src/gjc-runtime/ultragoal-change-set.ts +90 -44
  81. package/src/gjc-runtime/ultragoal-receipt-freshness.ts +7 -0
  82. package/src/gjc-runtime/ultragoal-review-source.ts +378 -0
  83. package/src/gjc-runtime/ultragoal-runtime.ts +640 -159
  84. package/src/gjc-runtime/workflow-manifest.generated.json +40 -1
  85. package/src/gjc-runtime/workflow-manifest.ts +12 -0
  86. package/src/internal-urls/agent-protocol.ts +98 -38
  87. package/src/internal-urls/artifact-protocol.ts +28 -17
  88. package/src/internal-urls/docs-index.generated.ts +6 -6
  89. package/src/internal-urls/local-protocol.ts +39 -18
  90. package/src/internal-urls/registry-helpers.ts +62 -0
  91. package/src/modes/acp/acp-agent.ts +51 -13
  92. package/src/modes/acp/acp-client-bridge.ts +154 -11
  93. package/src/modes/components/gjc-bundle-settings.ts +2 -0
  94. package/src/modes/components/plugin-settings.ts +5 -0
  95. package/src/modes/components/settings-selector.ts +4 -0
  96. package/src/modes/controllers/selector-controller.ts +1 -0
  97. package/src/prompts/tools/bash.md +2 -2
  98. package/src/prompts/tools/monitor.md +4 -4
  99. package/src/sdk/acp/adapter.ts +200 -9
  100. package/src/sdk/broker/broker.ts +93 -10
  101. package/src/sdk/broker/lifecycle-ledger.ts +227 -11
  102. package/src/sdk/broker/lifecycle.ts +692 -98
  103. package/src/sdk/bus/chat-daemon-control.ts +33 -5
  104. package/src/sdk/bus/index.ts +347 -14
  105. package/src/sdk/bus/telegram-daemon-contract.ts +7 -3
  106. package/src/sdk/bus/telegram-daemon.ts +283 -44
  107. package/src/sdk/bus/topic-registry.ts +133 -10
  108. package/src/sdk/host/host.ts +187 -9
  109. package/src/sdk/host/reverse-leases.ts +249 -42
  110. package/src/sdk/session.ts +8 -6
  111. package/src/session/agent-session.ts +930 -354
  112. package/src/session/artifacts.ts +211 -74
  113. package/src/session/attempt-record-store.ts +106 -0
  114. package/src/session/client-bridge.ts +15 -0
  115. package/src/session/internal/managed-session-scope.ts +332 -198
  116. package/src/session/internal/managed-session-storage.ts +162 -450
  117. package/src/session/messages.ts +32 -7
  118. package/src/session/session-manager.ts +31 -28
  119. package/src/session/session-storage.ts +190 -53
  120. package/src/session/streaming-output.ts +198 -40
  121. package/src/task/executor.ts +5 -2
  122. package/src/task/index.ts +277 -64
  123. package/src/task/provider-retry-status.ts +4 -1
  124. package/src/task/receipt.ts +26 -2
  125. package/src/task/render.ts +42 -1
  126. package/src/task/types.ts +52 -0
  127. package/src/task/worktree.ts +122 -43
  128. package/src/tools/bash.ts +818 -239
  129. package/src/tools/eval.ts +99 -4
  130. package/src/tools/fetch.ts +77 -15
  131. package/src/tools/find.ts +7 -3
  132. package/src/tools/monitor.ts +7 -1
  133. package/src/tools/output-meta.ts +706 -116
  134. package/src/tools/search.ts +9 -4
  135. package/src/tools/subagent-render.ts +5 -2
  136. package/src/tools/subagent.ts +8 -0
  137. package/src/tools/tool-result.ts +1 -0
  138. package/src/utils/artifact-id.ts +6 -0
  139. package/src/utils/git.ts +2 -0
@@ -24,7 +24,7 @@ import {
24
24
  import { createFileRecorder, formatResultPath } from "./file-recorder";
25
25
  import { formatGroupedFiles } from "./grouped-file-output";
26
26
  import { formatMatchLine } from "./match-line-format";
27
- import { formatFullOutputReference, type OutputMeta } from "./output-meta";
27
+ import { formatArtifactEvidenceNotice, type OutputMeta } from "./output-meta";
28
28
  import { resolveReadPath, resolveToolSearchScope } from "./path-utils";
29
29
  import {
30
30
  createCachedComponent,
@@ -687,8 +687,9 @@ export const searchToolRenderer = {
687
687
  const matchCount = details?.matchCount ?? 0;
688
688
  const fileCount = details?.fileCount ?? 0;
689
689
  const truncation = details?.meta?.truncation;
690
+ const directTruncation = details?.truncation;
690
691
  const limits = details?.meta?.limits;
691
- const truncated = Boolean(details?.truncated || truncation || limits?.columnTruncated);
692
+ const truncated = Boolean(details?.truncated || truncation || directTruncation || limits?.columnTruncated);
692
693
 
693
694
  const missingPathsList = details?.missingPaths ?? [];
694
695
  const missingNote =
@@ -724,9 +725,13 @@ export const searchToolRenderer = {
724
725
  const truncationReasons: string[] = [];
725
726
  if (renderedFileLimit) truncationReasons.push(`first ${renderedFileLimit} files (skip to paginate)`);
726
727
  if (renderedPerFileLimit) truncationReasons.push(`first ${renderedPerFileLimit} matches per file`);
727
- if (truncation) truncationReasons.push(truncation.truncatedBy === "lines" ? "line limit" : "size limit");
728
+ const displayedTruncation = truncation ?? directTruncation;
729
+ if (displayedTruncation) {
730
+ truncationReasons.push(displayedTruncation.truncatedBy === "lines" ? "line limit" : "size limit");
731
+ }
728
732
  if (limits?.columnTruncated) truncationReasons.push(`line length ${limits.columnTruncated.maxColumn}`);
729
- if (truncation?.artifactId) truncationReasons.push(formatFullOutputReference(truncation.artifactId));
733
+ const artifactEvidence = truncation ? formatArtifactEvidenceNotice(truncation) : undefined;
734
+ if (artifactEvidence) truncationReasons.push(artifactEvidence);
730
735
 
731
736
  const extraLines: string[] = [];
732
737
  if (truncationReasons.length > 0) {
@@ -182,12 +182,15 @@ function renderSubagentSnapshotBody(
182
182
  lines.push(` ${theme.fg("dim", `Agent: ${snapshot.agent} (${snapshot.agentSource})`)}`);
183
183
  }
184
184
  if (snapshot.effectiveModel) {
185
+ // Fast mode is a property of the tier this model runs under, so the ⚡ glyph
186
+ // belongs on the model line rather than the id.
187
+ const fastSuffix = snapshot.fastMode && theme.icon.fast ? ` ${theme.icon.fast}` : "";
185
188
  if (snapshot.modelFellBack && snapshot.requestedModel) {
186
189
  lines.push(
187
- ` ${theme.fg("warning", `Model: ${snapshot.effectiveModel} (requested ${snapshot.requestedModel}, fell back — no credentials)`)}`,
190
+ ` ${theme.fg("warning", `Model: ${snapshot.effectiveModel} (requested ${snapshot.requestedModel}, fell back — no credentials)`)}${fastSuffix}`,
188
191
  );
189
192
  } else {
190
- lines.push(` ${theme.fg("dim", `Model: ${snapshot.effectiveModel}`)}`);
193
+ lines.push(` ${theme.fg("dim", `Model: ${snapshot.effectiveModel}`)}${fastSuffix}`);
191
194
  }
192
195
  }
193
196
  if (snapshot.description) lines.push(` ${theme.fg("dim", `Description: ${snapshot.description}`)}`);
@@ -84,6 +84,8 @@ export interface SubagentSnapshot {
84
84
  requestedModel?: string;
85
85
  /** True when the requested model lacked credentials and fell back to the parent model. */
86
86
  modelFellBack?: boolean;
87
+ /** True when the effective subagent provider is in fast mode. */
88
+ fastMode?: boolean;
87
89
  }
88
90
 
89
91
  export type SubagentAwaitOutcome = "completed" | "timed_out" | "interrupted";
@@ -698,6 +700,7 @@ export class SubagentTool implements AgentTool<typeof subagentSchema, SubagentTo
698
700
  if (record.effectiveModel) fields.effectiveModel = record.effectiveModel;
699
701
  if (record.requestedModel) fields.requestedModel = record.requestedModel;
700
702
  if (record.modelFellBack) fields.modelFellBack = true;
703
+ if (record.fastMode) fields.fastMode = true;
701
704
  return fields;
702
705
  }
703
706
 
@@ -906,6 +909,7 @@ function canonicalizeSnapshotForSignature(snapshot: SubagentSnapshot): unknown {
906
909
  effectiveModel: snapshot.effectiveModel ?? null,
907
910
  requestedModel: snapshot.requestedModel ?? null,
908
911
  modelFellBack: snapshot.modelFellBack ?? false,
912
+ fastMode: snapshot.fastMode ?? false,
909
913
  // durationMs intentionally excluded (time-derived; would defeat idle gating).
910
914
  progress: snapshot.progress ? canonicalizeProgressForSignature(snapshot.progress) : null,
911
915
  };
@@ -933,6 +937,10 @@ function canonicalizeProgressForSignature(progress: AgentProgress): unknown {
933
937
  cost: progress.cost,
934
938
  modelOverride: progress.modelOverride ?? null,
935
939
  modelSubstitutionWarning: progress.modelSubstitutionWarning ?? null,
940
+ // The nested task panel renders this, so it must reach the signature or a
941
+ // fast-mode-only change would render differently while comparing byte-identical,
942
+ // suppressing the very update that introduces the glyph.
943
+ fastMode: progress.fastMode ?? false,
936
944
  // durationMs intentionally excluded (time-derived).
937
945
  extractedToolData: progress.extractedToolData
938
946
  ? canonicalizeExtractedToolDataForSignature(progress.extractedToolData)
@@ -36,6 +36,7 @@ export class ToolResultBuilder<TDetails extends DetailsWithMeta> {
36
36
  windows: ReadWindow,
37
37
  options?: {
38
38
  artifactId?: string;
39
+ artifactVerified?: boolean;
39
40
  noticeOwner?: "body";
40
41
  maxBytes?: number;
41
42
  rangeBase?: "file" | "window";
@@ -0,0 +1,6 @@
1
+ /** Artifact protocol IDs are decimal numbers allocated by the session artifact store. */
2
+ export function isValidArtifactId(value: unknown): value is string {
3
+ if (typeof value !== "string" || !/^(?:0|[1-9]\d*)$/u.test(value)) return false;
4
+ const numeric = Number(value);
5
+ return Number.isSafeInteger(numeric) && numeric >= 0;
6
+ }
package/src/utils/git.ts CHANGED
@@ -85,6 +85,7 @@ export interface PushOptions {
85
85
  export interface PatchOptions {
86
86
  readonly cached?: boolean;
87
87
  readonly check?: boolean;
88
+ readonly reverse?: boolean;
88
89
  readonly env?: Record<string, string | undefined>;
89
90
  readonly signal?: AbortSignal;
90
91
  }
@@ -358,6 +359,7 @@ function buildApplyArgs(patchPath: string, options: PatchOptions): string[] {
358
359
  const args = ["apply"];
359
360
  if (options.check) args.push("--check");
360
361
  if (options.cached) args.push("--cached");
362
+ if (options.reverse) args.push("--reverse");
361
363
  args.push("--binary", patchPath);
362
364
  return args;
363
365
  }