@gajae-code/coding-agent 0.15.2 → 0.15.4

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 (107) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/dist/types/config/autorouting-tier-map.d.ts +0 -9
  3. package/dist/types/config/file-lock.d.ts +7 -1
  4. package/dist/types/config/keybindings.d.ts +13 -3
  5. package/dist/types/config/model-registry.d.ts +5 -0
  6. package/dist/types/config/model-resolver.d.ts +1 -0
  7. package/dist/types/config/settings-schema.d.ts +65 -1
  8. package/dist/types/coordinator/contract.d.ts +1 -1
  9. package/dist/types/coordinator-mcp/question-state.d.ts +42 -2
  10. package/dist/types/extensibility/extensions/types.d.ts +2 -0
  11. package/dist/types/gjc-runtime/deep-interview-state.d.ts +12 -0
  12. package/dist/types/gjc-runtime/workflow-placeholder.d.ts +6 -0
  13. package/dist/types/main.d.ts +1 -1
  14. package/dist/types/modes/action-registry.d.ts +1 -0
  15. package/dist/types/modes/components/hook-selector.d.ts +1 -0
  16. package/dist/types/modes/components/runtime-mcp-add-wizard.d.ts +1 -1
  17. package/dist/types/modes/components/welcome.d.ts +2 -0
  18. package/dist/types/modes/controllers/input-controller.d.ts +16 -1
  19. package/dist/types/modes/controllers/runtime-mcp-command-controller.d.ts +42 -0
  20. package/dist/types/modes/interactive-mode.d.ts +7 -0
  21. package/dist/types/modes/shared/oauth-url-copy.d.ts +9 -0
  22. package/dist/types/modes/types.d.ts +3 -0
  23. package/dist/types/modes/ui-language.d.ts +2 -1
  24. package/dist/types/sdk/broker/lifecycle-ledger.d.ts +1 -0
  25. package/dist/types/sdk/broker/session-index.d.ts +18 -0
  26. package/dist/types/sdk/bus/index.d.ts +4 -1
  27. package/dist/types/sdk/bus/telegram-daemon-contract.d.ts +4 -1
  28. package/dist/types/sdk/bus/telegram-daemon.d.ts +2 -0
  29. package/dist/types/sdk/cli/session-cli.d.ts +1 -1
  30. package/dist/types/sdk/lifecycle/service.d.ts +32 -5
  31. package/dist/types/sdk/session.d.ts +5 -0
  32. package/dist/types/session/agent-session.d.ts +4 -0
  33. package/dist/types/session/fallback-chain-controller.d.ts +8 -0
  34. package/dist/types/slash-commands/helpers/aside.d.ts +54 -0
  35. package/dist/types/tools/ask.d.ts +9 -0
  36. package/dist/types/utils/clipboard.d.ts +9 -1
  37. package/package.json +7 -7
  38. package/scripts/generate-sdk-adapter-parity-manifest.ts +5 -2
  39. package/scripts/generate-sdk-operation-inventory.ts +3 -0
  40. package/src/commands/sdk.ts +2 -2
  41. package/src/config/autorouting-tier-map.ts +0 -9
  42. package/src/config/file-lock.ts +15 -1
  43. package/src/config/keybindings.ts +13 -3
  44. package/src/config/model-registry.ts +132 -21
  45. package/src/config/model-resolver.ts +2 -1
  46. package/src/config/models-config-schema.ts +2 -2
  47. package/src/config/settings-schema.ts +66 -1
  48. package/src/config/settings.ts +1 -1
  49. package/src/coordinator/contract.ts +1 -0
  50. package/src/coordinator-mcp/question-state.ts +235 -4
  51. package/src/coordinator-mcp/server.ts +402 -2
  52. package/src/dap/client.ts +19 -8
  53. package/src/deep-interview/render-middleware.ts +6 -2
  54. package/src/extensibility/extensions/types.ts +2 -0
  55. package/src/gjc-runtime/deep-interview-stage.ts +20 -1
  56. package/src/gjc-runtime/deep-interview-state.ts +3 -1
  57. package/src/gjc-runtime/ralplan-runtime.ts +6 -1
  58. package/src/gjc-runtime/session-state-lock.ts +11 -2
  59. package/src/gjc-runtime/ultragoal-runtime.ts +5 -0
  60. package/src/gjc-runtime/workflow-placeholder.ts +33 -0
  61. package/src/internal-urls/docs-index.generated.ts +11 -9
  62. package/src/lsp/client.ts +39 -4
  63. package/src/main.ts +42 -11
  64. package/src/modes/action-registry.ts +7 -0
  65. package/src/modes/components/hook-selector.ts +2 -1
  66. package/src/modes/components/iterm-pet-transport.ts +4 -2
  67. package/src/modes/components/runtime-mcp-add-wizard.ts +38 -1
  68. package/src/modes/components/settings-selector.ts +1 -0
  69. package/src/modes/components/tool-status-header.ts +149 -41
  70. package/src/modes/components/welcome.ts +8 -0
  71. package/src/modes/controllers/extension-ui-controller.ts +1 -0
  72. package/src/modes/controllers/goal-mode-controller.ts +7 -2
  73. package/src/modes/controllers/input-controller.ts +141 -7
  74. package/src/modes/controllers/plan-mode-controller.ts +12 -4
  75. package/src/modes/controllers/runtime-mcp-command-controller.ts +164 -20
  76. package/src/modes/controllers/selector-controller.ts +11 -2
  77. package/src/modes/interactive-mode.ts +88 -1
  78. package/src/modes/shared/oauth-url-copy.ts +33 -0
  79. package/src/modes/types.ts +3 -0
  80. package/src/modes/ui-language.ts +44 -3
  81. package/src/runtime-mcp/oauth-flow.ts +19 -8
  82. package/src/runtime-mcp/transports/stdio.ts +27 -13
  83. package/src/sdk/acp/adapter.ts +29 -2
  84. package/src/sdk/broker/broker.ts +26 -6
  85. package/src/sdk/broker/lifecycle-ledger.ts +28 -1
  86. package/src/sdk/broker/lifecycle.ts +664 -5
  87. package/src/sdk/broker/session-index.ts +246 -0
  88. package/src/sdk/broker/transport.ts +1 -0
  89. package/src/sdk/bus/index.ts +135 -38
  90. package/src/sdk/bus/natives-augment.d.ts +20 -1
  91. package/src/sdk/bus/telegram-daemon-contract.ts +4 -1
  92. package/src/sdk/bus/telegram-daemon.ts +3 -0
  93. package/src/sdk/cli/session-cli.ts +34 -7
  94. package/src/sdk/lifecycle/service.ts +166 -11
  95. package/src/sdk/mcp/server.ts +2 -1
  96. package/src/sdk/protocol/operation-inventory.generated.json +40 -0
  97. package/src/sdk/protocol/operation-registry.ts +2 -1
  98. package/src/sdk/session.ts +91 -7
  99. package/src/session/agent-session.ts +473 -66
  100. package/src/session/fallback-chain-controller.ts +17 -0
  101. package/src/setup/frictionless-onboarding.ts +4 -4
  102. package/src/slash-commands/aside-command.test.ts +366 -0
  103. package/src/slash-commands/builtin-registry.ts +19 -0
  104. package/src/slash-commands/helpers/aside.ts +299 -0
  105. package/src/tools/ask-contract.ts +54 -3
  106. package/src/tools/ask.ts +54 -6
  107. package/src/utils/clipboard.ts +37 -28
@@ -662,12 +662,20 @@ async function openOwnerIdentity(handle: fs.FileHandle): Promise<OpenOwnerIdenti
662
662
  * the compare-and-delete cannot object — the capture and the authorization would be the
663
663
  * same foreign object.
664
664
  *
665
- * So the created descriptor is still open here, and it stays open: it is what makes the
666
- * comparison sound instead of merely likely, because the created inode cannot be recycled
665
+ * So on POSIX the created descriptor is still open here, and it stays open: it is what makes
666
+ * the comparison sound instead of merely likely, because the created inode cannot be recycled
667
667
  * underneath a successor while this process holds it. Only when a fresh no-follow capture
668
668
  * of the pathname proves to be that same still-open object is the existing exact unlink
669
669
  * allowed to run — and it then closes the remaining capture-to-unlink race on the bytes.
670
670
  *
671
+ * Windows inverts that order. Opening the object for DELETE while this descriptor pins it
672
+ * fails (the create descriptor grants no share-delete), so the descriptor cannot outlive the
673
+ * proof there. It has already vouched for the object identity before it closes; afterwards
674
+ * the compare-and-delete itself re-proves the FULL recorded identity — dev/ino, link count,
675
+ * size, mtime, and payload hash — against whatever the pathname names at delete time. A
676
+ * successor that takes the pathname in the close-to-delete window fails that compare and is
677
+ * left alone, which keeps the retraction fail-closed without the descriptor.
678
+ *
671
679
  * Anything short of that proof — a descriptor that no longer answers, a capture that
672
680
  * refuses or reports a type swap, a different object at the path — leaves the pathname
673
681
  * exactly as it is for the normal stale protocol.
@@ -680,6 +688,7 @@ async function retractFailedOwnerRecord(
680
688
  if (!created) return;
681
689
  const stillOpen = await openOwnerIdentity(handle);
682
690
  if (!stillOpen || stillOpen.dev !== created.dev || stillOpen.ino !== created.ino) return;
691
+ if (ownerAccessStrategy() === "windows-validated") await handle.close().catch(() => undefined);
683
692
  const current = await captureRegularLockOwner(file).catch(() => null);
684
693
  if (!current || current.dev !== created.dev || current.ino !== created.ino) return;
685
694
  exactUnlinkOwnerRecord(file, current);
@@ -86,6 +86,7 @@ import {
86
86
  type UltragoalValidationLaneSelection,
87
87
  validationLaneSelectionFor,
88
88
  } from "./ultragoal-validation-policy";
89
+ import { isWorkflowPlaceholderText, WORKFLOW_PLACEHOLDER_CORRECTION } from "./workflow-placeholder";
89
90
  import { resolveWorkflowSetting } from "./workflow-settings";
90
91
 
91
92
  export {
@@ -1166,6 +1167,9 @@ function parseGoalsFromBrief(brief: string): ParsedGoal[] {
1166
1167
  if (!title && !body) {
1167
1168
  throw new Error(`ultragoal @goal block ${index + 1} has no title or objective`);
1168
1169
  }
1170
+ if (isWorkflowPlaceholderText(body || title)) {
1171
+ throw new Error(`ultragoal @goal block ${index + 1} requires ${WORKFLOW_PLACEHOLDER_CORRECTION}`);
1172
+ }
1169
1173
  return { title: clampTitle(title), objective: body || title };
1170
1174
  });
1171
1175
  }
@@ -1180,6 +1184,7 @@ export async function createUltragoalPlan(input: {
1180
1184
  }): Promise<UltragoalPlan> {
1181
1185
  const brief = input.brief.trim();
1182
1186
  if (!brief) throw new Error("ultragoal brief is required");
1187
+ if (isWorkflowPlaceholderText(brief)) throw new Error(`ultragoal brief requires ${WORKFLOW_PLACEHOLDER_CORRECTION}`);
1183
1188
  const now = new Date().toISOString();
1184
1189
  // Parse the untrimmed brief so the raw-line delimiter contract holds: a
1185
1190
  // leading-indented `@goal` on the first line must stay objective text rather
@@ -0,0 +1,33 @@
1
+ /** Shared placeholder semantics for model-authored workflow content. */
2
+
3
+ const WORKFLOW_PLACEHOLDER_TOKENS = new Set([
4
+ "empty",
5
+ "n/a",
6
+ "n-a",
7
+ "na",
8
+ "none",
9
+ "placeholder",
10
+ "stub",
11
+ "tbd",
12
+ "todo",
13
+ "unused",
14
+ ]);
15
+
16
+ export const WORKFLOW_PLACEHOLDER_CORRECTION =
17
+ "provide a specific, non-placeholder question or objective instead of empty, whitespace, unused, TODO, TBD, N/A, N-A, NA, none, placeholder, or stub";
18
+
19
+ /** Exact, case-insensitive placeholder detection; meaningful sentences remain valid. */
20
+ export function isWorkflowPlaceholderText(value: unknown): boolean {
21
+ if (typeof value !== "string") return false;
22
+ const normalized = value.trim().toLowerCase();
23
+ return normalized.length === 0 || WORKFLOW_PLACEHOLDER_TOKENS.has(normalized);
24
+ }
25
+
26
+ /** Detect a legacy formatted deep-interview ask whose visible body is a placeholder. */
27
+ export function isLegacyDeepInterviewPlaceholder(value: unknown): boolean {
28
+ if (typeof value !== "string") return false;
29
+ const lines = value.trim().split(/\r?\n/);
30
+ const headerIndex = lines.findIndex(line => /^Round\s+\d+\s+\|.*\bAmbiguity\b/i.test(line.trim()));
31
+ if (headerIndex < 0) return false;
32
+ return isWorkflowPlaceholderText(lines.slice(headerIndex + 1).join("\n"));
33
+ }