@bastani/atomic 0.5.26 → 0.5.27
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.
package/.claude/settings.json
CHANGED
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
"permissions": {
|
|
10
10
|
"defaultMode": "bypassPermissions"
|
|
11
11
|
},
|
|
12
|
-
"disabledMcpjsonServers": [
|
|
12
|
+
"disabledMcpjsonServers": [
|
|
13
|
+
"github",
|
|
14
|
+
"azure-devops"
|
|
15
|
+
],
|
|
13
16
|
"enabledPlugins": {
|
|
14
17
|
"pyright-lsp@claude-plugins-official": true,
|
|
15
18
|
"typescript-lsp@claude-plugins-official": true,
|
package/.mcp.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,OAAO,IAAI,UAAU,EAC3B,MAAM,gCAAgC,CAAC;AAgCxC;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWtE;
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,OAAO,IAAI,UAAU,EAC3B,MAAM,gCAAgC,CAAC;AAgCxC;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWtE;AAqID,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,sIAAsI;IACtI,SAAS,CAAC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AAK,CACT,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAC7B,OAAO,CAAC,cAAc,EAAE,CAAC;IAQ5B,gEAAgE;IAC1D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAClC;AAMD;;;GAGG;AACH,qBAAa,2BAA2B;IACtC;;;;;OAKG;IACG,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAGxB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;GAUG;AACH,qBAAa,4BAA4B;IACvC,QAAQ,CAAC,MAAM,MAAM;IACrB;;;;;OAKG;IACH,OAAO,CAAC,cAAc,CAAc;IAEpC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAEK,KAAK,CACT,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC,cAAc,CAAC,EAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAC5B,OAAO,CAAC,cAAc,EAAE,CAAC;IAqCtB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAClC;AAQD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+DAejC,CAAC"}
|
package/package.json
CHANGED
|
@@ -109,6 +109,25 @@ function buildWorkflowHookCommand(subcommand: string, extraArgs: readonly string
|
|
|
109
109
|
].join(" ");
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Effectively-unbounded timeout (in seconds) for the Stop hook command.
|
|
114
|
+
*
|
|
115
|
+
* Claude Code's Stop hook process runs three phases sequentially — the
|
|
116
|
+
* initial Stop hooks, then TaskCompleted hooks (per in-progress task owned
|
|
117
|
+
* by the teammate), then TeammateIdle hooks — and the per-hook `timeout`
|
|
118
|
+
* applies to the entire lifecycle. Under Claude Code's default (10 min),
|
|
119
|
+
* a turn that leaves tasks in-progress (e.g. via the TaskList/TodoWrite
|
|
120
|
+
* tool) can blow the budget and get killed, which also severs our
|
|
121
|
+
* `_claude-stop-hook`'s queue/release poll and strands the workflow.
|
|
122
|
+
*
|
|
123
|
+
* ~24 days — the max safe `setTimeout` value (2^31 - 1 ms) expressed in
|
|
124
|
+
* seconds — removes the timeout in practical terms. `waitForIdle`'s
|
|
125
|
+
* marker-file watch still fires as soon as our initial hook writes the
|
|
126
|
+
* marker, so the workflow proceeds on real hook completion, not on timer
|
|
127
|
+
* expiry.
|
|
128
|
+
*/
|
|
129
|
+
const STOP_HOOK_TIMEOUT_SECONDS = 2_147_483;
|
|
130
|
+
|
|
112
131
|
/**
|
|
113
132
|
* Inline settings injected via `claude --settings <json>` on every workflow
|
|
114
133
|
* spawn. Registers the workflow-owned hooks without relying on
|
|
@@ -117,7 +136,9 @@ function buildWorkflowHookCommand(subcommand: string, extraArgs: readonly string
|
|
|
117
136
|
*
|
|
118
137
|
* Registered hooks:
|
|
119
138
|
* - `Stop`: deliver queued follow-up prompts via `{decision:"block"}` and
|
|
120
|
-
* write an idle-marker file that `waitForIdle` watches.
|
|
139
|
+
* write an idle-marker file that `waitForIdle` watches. `timeout` is
|
|
140
|
+
* set to {@link STOP_HOOK_TIMEOUT_SECONDS} so the hook survives long
|
|
141
|
+
* TaskCompleted/TeammateIdle phases — see the constant's docstring.
|
|
121
142
|
* - `PreToolUse` matched on `AskUserQuestion`: write
|
|
122
143
|
* `~/.atomic/claude-hil/<session_id>` so `watchHILMarker` can fire
|
|
123
144
|
* `onHIL(true)` — the node card flips to the blue "awaiting_input" pulse.
|
|
@@ -140,6 +161,7 @@ const WORKFLOW_HOOK_SETTINGS = JSON.stringify({
|
|
|
140
161
|
{
|
|
141
162
|
type: "command",
|
|
142
163
|
command: buildWorkflowHookCommand("_claude-stop-hook"),
|
|
164
|
+
timeout: STOP_HOOK_TIMEOUT_SECONDS,
|
|
143
165
|
},
|
|
144
166
|
],
|
|
145
167
|
},
|
|
@@ -1074,7 +1096,7 @@ export class HeadlessClaudeSessionWrapper {
|
|
|
1074
1096
|
|
|
1075
1097
|
let sdkSessionId = "";
|
|
1076
1098
|
try {
|
|
1077
|
-
for await (const msg of sdkQuery({ prompt, options:
|
|
1099
|
+
for await (const msg of sdkQuery({ prompt, options: headlessSdkOpts })) {
|
|
1078
1100
|
if (msg.type === "result") {
|
|
1079
1101
|
sdkSessionId = String(
|
|
1080
1102
|
(msg as Record<string, unknown>).session_id ?? "",
|