@gajae-code/coding-agent 0.6.5 → 0.7.1

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 (135) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/types/async/job-manager.d.ts +3 -1
  3. package/dist/types/cli/daemon-cli.d.ts +25 -0
  4. package/dist/types/cli/notify-cli.d.ts +23 -0
  5. package/dist/types/cli/setup-cli.d.ts +20 -1
  6. package/dist/types/commands/daemon.d.ts +41 -0
  7. package/dist/types/commands/notify.d.ts +41 -0
  8. package/dist/types/config/model-profile-activation.d.ts +12 -0
  9. package/dist/types/config/model-profiles.d.ts +2 -1
  10. package/dist/types/config/model-registry.d.ts +3 -3
  11. package/dist/types/config/models-config-schema.d.ts +5 -0
  12. package/dist/types/config/settings-schema.d.ts +38 -0
  13. package/dist/types/coordinator/contract.d.ts +1 -1
  14. package/dist/types/daemon/builtin.d.ts +20 -0
  15. package/dist/types/daemon/control-types.d.ts +57 -0
  16. package/dist/types/daemon/runtime.d.ts +25 -0
  17. package/dist/types/extensibility/extensions/types.d.ts +8 -0
  18. package/dist/types/gjc-runtime/launch-tmux.d.ts +1 -0
  19. package/dist/types/gjc-runtime/state-writer.d.ts +2 -0
  20. package/dist/types/gjc-runtime/tmux-common.d.ts +3 -0
  21. package/dist/types/gjc-runtime/tmux-sessions.d.ts +2 -0
  22. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +15 -0
  23. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +14 -0
  24. package/dist/types/modes/components/oauth-selector.d.ts +2 -0
  25. package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
  26. package/dist/types/modes/interactive-mode.d.ts +1 -1
  27. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +10 -0
  28. package/dist/types/modes/types.d.ts +7 -1
  29. package/dist/types/notifications/config-commands.d.ts +26 -0
  30. package/dist/types/notifications/config.d.ts +61 -0
  31. package/dist/types/notifications/helpers.d.ts +55 -0
  32. package/dist/types/notifications/html-format.d.ts +62 -0
  33. package/dist/types/notifications/index.d.ts +28 -0
  34. package/dist/types/notifications/rate-limit-pool.d.ts +93 -0
  35. package/dist/types/notifications/telegram-cli.d.ts +19 -0
  36. package/dist/types/notifications/telegram-daemon-cli.d.ts +11 -0
  37. package/dist/types/notifications/telegram-daemon-control.d.ts +56 -0
  38. package/dist/types/notifications/telegram-daemon.d.ts +276 -0
  39. package/dist/types/notifications/telegram-reference.d.ts +111 -0
  40. package/dist/types/notifications/threaded-inbound.d.ts +58 -0
  41. package/dist/types/notifications/threaded-render.d.ts +66 -0
  42. package/dist/types/notifications/topic-registry.d.ts +67 -0
  43. package/dist/types/rlm/index.d.ts +12 -0
  44. package/dist/types/session/agent-session.d.ts +39 -2
  45. package/dist/types/session/auth-storage.d.ts +1 -1
  46. package/dist/types/setup/credential-auto-import.d.ts +63 -0
  47. package/dist/types/setup/credential-import.d.ts +3 -0
  48. package/dist/types/setup/host-plugin-setup.d.ts +39 -0
  49. package/dist/types/tools/ask-answer-registry.d.ts +13 -0
  50. package/dist/types/tools/index.d.ts +18 -0
  51. package/dist/types/tools/subagent.d.ts +3 -0
  52. package/package.json +7 -7
  53. package/scripts/build-binary.ts +3 -0
  54. package/src/async/job-manager.ts +5 -1
  55. package/src/cli/daemon-cli.ts +122 -0
  56. package/src/cli/notify-cli.ts +274 -0
  57. package/src/cli/setup-cli.ts +173 -84
  58. package/src/cli.ts +3 -3
  59. package/src/commands/daemon.ts +47 -0
  60. package/src/commands/notify.ts +61 -0
  61. package/src/commands/setup.ts +11 -1
  62. package/src/config/model-profile-activation.ts +74 -5
  63. package/src/config/model-profiles.ts +7 -4
  64. package/src/config/model-registry.ts +6 -3
  65. package/src/config/models-config-schema.ts +1 -1
  66. package/src/config/settings-schema.ts +29 -0
  67. package/src/coordinator/contract.ts +3 -0
  68. package/src/coordinator-mcp/server.ts +270 -1
  69. package/src/daemon/builtin.ts +46 -0
  70. package/src/daemon/control-types.ts +65 -0
  71. package/src/daemon/runtime.ts +51 -0
  72. package/src/defaults/gjc/skills/ultragoal/SKILL.md +16 -0
  73. package/src/edit/modes/replace.ts +1 -1
  74. package/src/extensibility/extensions/runner.ts +4 -0
  75. package/src/extensibility/extensions/types.ts +8 -0
  76. package/src/gjc-runtime/deep-interview-recorder.ts +12 -4
  77. package/src/gjc-runtime/launch-tmux.ts +10 -2
  78. package/src/gjc-runtime/state-runtime.ts +18 -4
  79. package/src/gjc-runtime/state-writer.ts +8 -8
  80. package/src/gjc-runtime/tmux-common.ts +8 -0
  81. package/src/gjc-runtime/tmux-sessions.ts +8 -1
  82. package/src/gjc-runtime/ultragoal-guard.ts +57 -2
  83. package/src/gjc-runtime/ultragoal-runtime.ts +105 -19
  84. package/src/gjc-runtime/workflow-manifest.generated.json +27 -2
  85. package/src/gjc-runtime/workflow-manifest.ts +11 -1
  86. package/src/goals/tools/goal-tool.ts +11 -2
  87. package/src/hashline/hash.ts +1 -1
  88. package/src/internal-urls/docs-index.generated.ts +9 -7
  89. package/src/main.ts +30 -0
  90. package/src/modes/acp/acp-event-mapper.ts +1 -0
  91. package/src/modes/components/hook-editor.ts +7 -2
  92. package/src/modes/components/oauth-selector.ts +19 -0
  93. package/src/modes/controllers/event-controller.ts +20 -0
  94. package/src/modes/controllers/selector-controller.ts +80 -17
  95. package/src/modes/interactive-mode.ts +6 -2
  96. package/src/modes/runtime-init.ts +1 -0
  97. package/src/modes/shared/agent-wire/event-contract.ts +1 -0
  98. package/src/modes/shared/agent-wire/event-envelope.ts +1 -0
  99. package/src/modes/shared/agent-wire/event-observation.ts +16 -0
  100. package/src/modes/shared/agent-wire/unattended-session.ts +22 -0
  101. package/src/modes/types.ts +7 -1
  102. package/src/modes/utils/ui-helpers.ts +23 -0
  103. package/src/notifications/config-commands.ts +50 -0
  104. package/src/notifications/config.ts +107 -0
  105. package/src/notifications/helpers.ts +135 -0
  106. package/src/notifications/html-format.ts +389 -0
  107. package/src/notifications/index.ts +700 -0
  108. package/src/notifications/rate-limit-pool.ts +179 -0
  109. package/src/notifications/telegram-cli.ts +194 -0
  110. package/src/notifications/telegram-daemon-cli.ts +74 -0
  111. package/src/notifications/telegram-daemon-control.ts +370 -0
  112. package/src/notifications/telegram-daemon.ts +1370 -0
  113. package/src/notifications/telegram-reference.ts +335 -0
  114. package/src/notifications/threaded-inbound.ts +80 -0
  115. package/src/notifications/threaded-render.ts +155 -0
  116. package/src/notifications/topic-registry.ts +133 -0
  117. package/src/rlm/index.ts +19 -0
  118. package/src/sdk.ts +16 -0
  119. package/src/session/agent-session.ts +113 -3
  120. package/src/session/auth-storage.ts +3 -0
  121. package/src/session/session-dump-format.ts +43 -2
  122. package/src/session/session-manager.ts +39 -5
  123. package/src/setup/credential-auto-import.ts +258 -0
  124. package/src/setup/credential-import.ts +17 -0
  125. package/src/setup/hermes/templates/operator-instructions.v1.md +10 -0
  126. package/src/setup/host-plugin-setup.ts +142 -0
  127. package/src/slash-commands/builtin-registry.ts +4 -1
  128. package/src/task/executor.ts +5 -1
  129. package/src/tools/ask-answer-registry.ts +25 -0
  130. package/src/tools/ask.ts +77 -6
  131. package/src/tools/image-gen.ts +5 -8
  132. package/src/tools/index.ts +19 -0
  133. package/src/tools/inspect-image.ts +16 -11
  134. package/src/tools/subagent-render.ts +7 -0
  135. package/src/tools/subagent.ts +38 -7
@@ -237,6 +237,7 @@ export const WORKFLOW_MANIFEST: Record<CanonicalGjcWorkflowSkill, SkillManifest>
237
237
  "review",
238
238
  "record-review-blockers",
239
239
  "steer",
240
+ "classify-blocker",
240
241
  ]),
241
242
  ...plannedVerbs(PLANNED_ADMIN_VERBS),
242
243
  ],
@@ -263,11 +264,19 @@ export const WORKFLOW_MANIFEST: Record<CanonicalGjcWorkflowSkill, SkillManifest>
263
264
  name: "evidence",
264
265
  type: "string",
265
266
  required: true,
266
- appliesToVerbs: ["checkpoint", "record-review-blockers", "steer"],
267
+ appliesToVerbs: ["checkpoint", "record-review-blockers", "steer", "classify-blocker"],
267
268
  },
268
269
  { name: "gjc-goal-json", type: "string", appliesToVerbs: ["checkpoint", "record-review-blockers"] },
269
270
  { name: "quality-gate-json", type: "string", appliesToVerbs: ["checkpoint"] },
270
271
  { name: "goal-id", type: "string", appliesToVerbs: ["steer"] },
272
+ { name: "goal-id", type: "string", appliesToVerbs: ["classify-blocker"] },
273
+ {
274
+ name: "classification",
275
+ type: "enum",
276
+ enumValues: ["human_blocked", "resolvable"],
277
+ required: true,
278
+ appliesToVerbs: ["classify-blocker"],
279
+ },
271
280
  {
272
281
  name: "kind",
273
282
  type: "enum",
@@ -307,6 +316,7 @@ export const WORKFLOW_MANIFEST: Record<CanonicalGjcWorkflowSkill, SkillManifest>
307
316
  "checkpoint",
308
317
  "record-review-blockers",
309
318
  "steer",
319
+ "classify-blocker",
310
320
  ],
311
321
  },
312
322
  { name: "directive-json", type: "string", appliesToVerbs: ["steer"], planned: true },
@@ -4,7 +4,7 @@ import { Text } from "@gajae-code/tui";
4
4
  import { formatNumber, prompt } from "@gajae-code/utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
7
- import { assertCanCompleteCurrentGoal } from "../../gjc-runtime/ultragoal-guard";
7
+ import { assertCanCompleteCurrentGoal, assertUltragoalPauseAllowed } from "../../gjc-runtime/ultragoal-guard";
8
8
  import type { Theme, ThemeColor } from "../../modes/theme/theme";
9
9
  import goalDescription from "../../prompts/tools/goal.md" with { type: "text" };
10
10
  import { formatDuration } from "../../slash-commands/helpers/format";
@@ -94,6 +94,11 @@ async function executeGoalOperation(session: ToolSession, params: GoalToolInput)
94
94
  return buildGoalToolResponse(resumed.goal);
95
95
  }
96
96
  if (params.op === "pause") {
97
+ try {
98
+ await assertUltragoalPauseAllowed(session.cwd);
99
+ } catch (error) {
100
+ throw new ToolError(error instanceof Error ? error.message : String(error));
101
+ }
97
102
  const paused = await runtime.pauseGoal();
98
103
  return buildGoalToolResponse(paused?.goal ?? null);
99
104
  }
@@ -102,7 +107,11 @@ async function executeGoalOperation(session: ToolSession, params: GoalToolInput)
102
107
  return buildGoalToolResponse(dropped ?? null);
103
108
  }
104
109
  try {
105
- await assertCanCompleteCurrentGoal({ cwd: session.cwd, currentGoal: session.getGoalModeState?.()?.goal ?? null });
110
+ await assertCanCompleteCurrentGoal({
111
+ cwd: session.cwd,
112
+ currentGoal: session.getGoalModeState?.()?.goal ?? null,
113
+ sessionId: session.getSessionId?.(),
114
+ });
106
115
  } catch (error) {
107
116
  throw new ToolError(error instanceof Error ? error.message : String(error));
108
117
  }
@@ -9,7 +9,7 @@ import bigrams from "./bigrams.json" with { type: "json" };
9
9
  // module evaluation so this core module (and its re-exported helpers) stays
10
10
  // usable and falls back to the TS loop if the native addon is unavailable.
11
11
  let formatHashLinesNative: ((text: string, startLine?: number) => string) | undefined;
12
- void import("../../../natives/native/index.js")
12
+ void import("@gajae-code/natives")
13
13
  .then(mod => {
14
14
  if (typeof mod.h06FormatHashLines === "function") {
15
15
  formatHashLinesNative = mod.h06FormatHashLines;