stitchkit 0.115.0 → 0.116.0
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/CHANGELOG.md +25 -0
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
- package/dist/entrypoints/agent-runtime/harness.js +2 -2
- package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +6 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +6 -6
- package/dist/entrypoints/agent-runtime/testing.js +6 -6
- package/dist/entrypoints/agent-runtime.js +6 -6
- package/dist/entrypoints/cli.js +3 -3
- package/dist/entrypoints/telegram/grammy.js +2 -2
- package/dist/entrypoints/telegram.d.ts +1 -1
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +22 -9
- package/dist/entrypoints/tools.js +3 -3
- package/dist/{index-dx5cm9pc.js → index-4g6qmgdx.js} +1 -1
- package/dist/{index-nregbbsc.js → index-6f49krb5.js} +1 -1
- package/dist/{index-x0ddbj85.js → index-arjmb6de.js} +36 -1
- package/dist/{index-crmswbrt.js → index-fa435yq2.js} +1 -1
- package/dist/{index-944x38nv.js → index-jq2ky8fw.js} +1 -1
- package/dist/{index-7yx8j6ay.js → index-n5sv4z0w.js} +12 -3
- package/dist/{index-j8kf56wx.js → index-q968hy6y.js} +1 -1
- package/dist/{index-3qqdqwxe.js → index-w7jq3fz9.js} +25 -5
- package/dist/internal/contained-files.d.ts +10 -0
- package/dist/internal/contained-files.d.ts.map +1 -1
- package/dist/telegram/budget-transformer.d.ts +5 -2
- package/dist/telegram/budget-transformer.d.ts.map +1 -1
- package/dist/telegram/outbound-budget.d.ts +26 -11
- package/dist/telegram/outbound-budget.d.ts.map +1 -1
- package/dist/tools/cli/view.d.ts +7 -1
- package/dist/tools/cli/view.d.ts.map +1 -1
- package/llms/agent-runtime.txt +2 -2
- package/llms/cli.txt +3 -1
- package/llms/stitchkit.txt +3 -3
- package/llms/telegram.txt +10 -3
- package/llms/{upgrading-0.104.0-0.115.0.txt → upgrading-0.105.0-0.116.0.txt} +26 -124
- package/llms/{upgrading-0.44.0-0.61.0.txt → upgrading-0.44.0-0.62.0.txt} +120 -3
- package/llms/{upgrading-0.62.0-0.78.0.txt → upgrading-0.63.0-0.83.0.txt} +181 -120
- package/llms/{upgrading-0.79.0-0.103.13.txt → upgrading-0.84.0-0.104.0.txt} +124 -181
- package/llms/upgrading.txt +4 -4
- package/llms-full.txt +41 -9
- package/llms.txt +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,31 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.116.0] - 2026-11-02
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
**Who must act:** code that relied on a 429 from an edit or a read to stop a token's sends. See the [migration](docs/guide/upgrading.md).
|
|
23
|
+
|
|
24
|
+
- `stitchkit/telegram` — **a 429 pauses the token only on a method that spends the budget.** A limit on editing one message said nothing about sending the next one, and one progress card stopped a whole campaign. An edit or a read that sees a 429 returns it unchanged and pauses nothing. `// before: budget.run('editMessageText', …) paused the token` → `// after: call budget.pauseAfter(error) where you want that` → [ADR 0277](docs/decisions/0277-a-telegram-budget-serves-replies-first.md)
|
|
25
|
+
**Affects:** `stitchkit/telegram` TelegramOutboundBudget(run)
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- `stitchkit/telegram` — the outbound budget has `interactive` and `bulk` lanes over one rate: `run(…, { lane })`, `acquire(cost, signal, { lane })`, and `stats().queuedBulk`. A waiting interactive call is granted first, so a reply does not queue behind a campaign.
|
|
30
|
+
**Affects:** `stitchkit/telegram` TelegramOutboundBudget, TelegramOutboundLane
|
|
31
|
+
|
|
32
|
+
- `stitchkit/telegram/grammy` — `telegramBudgetTransformer(budget, { lane })` runs a client's calls in one lane.
|
|
33
|
+
**Affects:** `stitchkit/telegram/grammy` telegramBudgetTransformer
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- `stitchkit/agent-runtime/coding-tools` — a path spelled differently from the name stored on disk refuses before any policy reads it, so a rule on `credentials` cannot be passed by asking for `CREDENTIALS` on a case-insensitive volume.
|
|
38
|
+
**Affects:** `stitchkit/agent-runtime/coding-tools` createAgentCodingTools
|
|
39
|
+
|
|
40
|
+
- `stitchkit/cli` — grouped views print largest first even when a key looks like a number, and a string equal to `null` or `(absent)` is quoted instead of merging with the missing value. `renderCliView` returns the order as `order`.
|
|
41
|
+
**Affects:** `stitchkit/cli` createCli, renderCliView
|
|
42
|
+
|
|
18
43
|
## [0.115.0] - 2026-11-02
|
|
19
44
|
|
|
20
45
|
### ⚠️ Breaking changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding-tool-paths.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coding-tool-paths.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-paths.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,4BAA4B,EAEjC,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAwChC,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,MAAM,CA6CR;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAKrB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAarB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM;;;GAQrB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAWf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAoBf;AAID,2FAA2F;AAC3F,wBAAsB,kBAAkB,CAAC,CAAC,EACxC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,CAAC,CAAC,CAeZ;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAUtE"}
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
AgentCodingToolAuthorizationSchema2,
|
|
7
7
|
AgentCodingToolPathAuthorizationSchema2,
|
|
8
8
|
createAgentCodingTools2
|
|
9
|
-
} from "../../index-
|
|
9
|
+
} from "../../index-n5sv4z0w.js";
|
|
10
10
|
import"../../index-2kbysk9s.js";
|
|
11
11
|
import"../../index-f6m4c545.js";
|
|
12
12
|
import"../../index-dr3t5n1v.js";
|
|
13
|
-
import"../../index-
|
|
14
|
-
import"../../index-
|
|
15
|
-
import"../../index-
|
|
13
|
+
import"../../index-6f49krb5.js";
|
|
14
|
+
import"../../index-q968hy6y.js";
|
|
15
|
+
import"../../index-arjmb6de.js";
|
|
16
16
|
import"../../index-ega3yz4c.js";
|
|
17
17
|
export {
|
|
18
18
|
AgentCodingToolAuthorizationSchema2 as AgentCodingToolAuthorizationSchema,
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
import"../../index-4qnzda76.js";
|
|
27
27
|
import {
|
|
28
28
|
walkContainedFiles
|
|
29
|
-
} from "../../index-
|
|
30
|
-
import"../../index-
|
|
29
|
+
} from "../../index-6f49krb5.js";
|
|
30
|
+
import"../../index-arjmb6de.js";
|
|
31
31
|
import {
|
|
32
32
|
defineRuntimeTool2
|
|
33
33
|
} from "../../index-ega3yz4c.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
missingSandboxRestrictions2,
|
|
4
4
|
codingRefusal,
|
|
5
5
|
createAgentCodingTools2
|
|
6
|
-
} from "../../index-
|
|
6
|
+
} from "../../index-n5sv4z0w.js";
|
|
7
7
|
import"../../index-2kbysk9s.js";
|
|
8
8
|
import"../../index-ct75c3at.js";
|
|
9
9
|
import"../../index-rhzkndr5.js";
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
terminateOwnedGroup,
|
|
19
19
|
startNativeCommand
|
|
20
20
|
} from "../../index-dr3t5n1v.js";
|
|
21
|
-
import"../../index-
|
|
22
|
-
import"../../index-
|
|
23
|
-
import"../../index-
|
|
21
|
+
import"../../index-6f49krb5.js";
|
|
22
|
+
import"../../index-q968hy6y.js";
|
|
23
|
+
import"../../index-arjmb6de.js";
|
|
24
24
|
import"../../index-ega3yz4c.js";
|
|
25
25
|
import {
|
|
26
26
|
errnoOf
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import"../../../index-fggxgbrk.js";
|
|
2
|
-
import"../../../index-
|
|
2
|
+
import"../../../index-jq2ky8fw.js";
|
|
3
3
|
import"../../../index-8kzct1d6.js";
|
|
4
4
|
import {
|
|
5
5
|
initializeAgentRuntimeSqlite2,
|
|
6
6
|
createSqliteAgentRuntimeStore2
|
|
7
|
-
} from "../../../index-
|
|
7
|
+
} from "../../../index-fa435yq2.js";
|
|
8
8
|
import"../../../index-kqnd6a85.js";
|
|
9
9
|
import"../../../index-5w6t91ze.js";
|
|
10
|
-
import"../../../index-
|
|
10
|
+
import"../../../index-n5sv4z0w.js";
|
|
11
11
|
import"../../../index-ct75c3at.js";
|
|
12
12
|
import"../../../index-rhzkndr5.js";
|
|
13
13
|
import"../../../index-k42ckyzx.js";
|
|
@@ -15,9 +15,9 @@ import"../../../index-2kbysk9s.js";
|
|
|
15
15
|
import"../../../index-f6m4c545.js";
|
|
16
16
|
import"../../../index-dr3t5n1v.js";
|
|
17
17
|
import"../../../index-snef22zr.js";
|
|
18
|
-
import"../../../index-
|
|
19
|
-
import"../../../index-
|
|
20
|
-
import"../../../index-
|
|
18
|
+
import"../../../index-6f49krb5.js";
|
|
19
|
+
import"../../../index-q968hy6y.js";
|
|
20
|
+
import"../../../index-arjmb6de.js";
|
|
21
21
|
import"../../../index-ega3yz4c.js";
|
|
22
22
|
|
|
23
23
|
// src/agent-runtime/sqlite-bun.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import"../../../index-fggxgbrk.js";
|
|
2
|
-
import"../../../index-
|
|
2
|
+
import"../../../index-jq2ky8fw.js";
|
|
3
3
|
import"../../../index-8kzct1d6.js";
|
|
4
4
|
import {
|
|
5
5
|
initializeAgentRuntimeSqlite2,
|
|
6
6
|
createSqliteAgentRuntimeStore2
|
|
7
|
-
} from "../../../index-
|
|
7
|
+
} from "../../../index-fa435yq2.js";
|
|
8
8
|
import"../../../index-kqnd6a85.js";
|
|
9
9
|
import"../../../index-5w6t91ze.js";
|
|
10
|
-
import"../../../index-
|
|
10
|
+
import"../../../index-n5sv4z0w.js";
|
|
11
11
|
import"../../../index-ct75c3at.js";
|
|
12
12
|
import"../../../index-rhzkndr5.js";
|
|
13
13
|
import"../../../index-k42ckyzx.js";
|
|
@@ -15,9 +15,9 @@ import"../../../index-2kbysk9s.js";
|
|
|
15
15
|
import"../../../index-f6m4c545.js";
|
|
16
16
|
import"../../../index-dr3t5n1v.js";
|
|
17
17
|
import"../../../index-snef22zr.js";
|
|
18
|
-
import"../../../index-
|
|
19
|
-
import"../../../index-
|
|
20
|
-
import"../../../index-
|
|
18
|
+
import"../../../index-6f49krb5.js";
|
|
19
|
+
import"../../../index-q968hy6y.js";
|
|
20
|
+
import"../../../index-arjmb6de.js";
|
|
21
21
|
import"../../../index-ega3yz4c.js";
|
|
22
22
|
|
|
23
23
|
// src/agent-runtime/sqlite-node.ts
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
advanceToolChronology
|
|
11
11
|
} from "../../index-fggxgbrk.js";
|
|
12
12
|
import"../../index-5w6t91ze.js";
|
|
13
|
-
import"../../index-
|
|
14
|
-
import"../../index-
|
|
13
|
+
import"../../index-n5sv4z0w.js";
|
|
14
|
+
import"../../index-jq2ky8fw.js";
|
|
15
15
|
import"../../index-ct75c3at.js";
|
|
16
16
|
import"../../index-rhzkndr5.js";
|
|
17
17
|
import"../../index-k42ckyzx.js";
|
|
@@ -21,10 +21,10 @@ import"../../index-dr3t5n1v.js";
|
|
|
21
21
|
import"../../index-snef22zr.js";
|
|
22
22
|
import {
|
|
23
23
|
createMemoryAgentRuntimeStore2
|
|
24
|
-
} from "../../index-
|
|
25
|
-
import"../../index-
|
|
26
|
-
import"../../index-
|
|
27
|
-
import"../../index-
|
|
24
|
+
} from "../../index-4g6qmgdx.js";
|
|
25
|
+
import"../../index-6f49krb5.js";
|
|
26
|
+
import"../../index-q968hy6y.js";
|
|
27
|
+
import"../../index-arjmb6de.js";
|
|
28
28
|
import"../../index-ega3yz4c.js";
|
|
29
29
|
import {
|
|
30
30
|
assertPositiveSafeInteger
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
missingSandboxRestrictions2,
|
|
6
6
|
recordAgentSandboxProbe2,
|
|
7
7
|
refuseUnknownSpillReference
|
|
8
|
-
} from "../index-
|
|
8
|
+
} from "../index-n5sv4z0w.js";
|
|
9
9
|
import {
|
|
10
10
|
AgentRecordIdSchema2,
|
|
11
11
|
AgentRecordVersionSchema2,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
AgentHistoryMutationSchema2,
|
|
59
59
|
ACTIVE_AGENT_RUN_STATES2,
|
|
60
60
|
createAgentRuntimeStore2
|
|
61
|
-
} from "../index-
|
|
61
|
+
} from "../index-jq2ky8fw.js";
|
|
62
62
|
import {
|
|
63
63
|
AgentStoreEventKindSchema2,
|
|
64
64
|
AgentStoreEventEnvelopeSchema2,
|
|
@@ -191,13 +191,13 @@ import"../index-f6m4c545.js";
|
|
|
191
191
|
import"../index-dr3t5n1v.js";
|
|
192
192
|
import {
|
|
193
193
|
createMemoryAgentRuntimeStore2
|
|
194
|
-
} from "../index-
|
|
194
|
+
} from "../index-4g6qmgdx.js";
|
|
195
195
|
import {
|
|
196
196
|
createAgentRuntimeEventSink2
|
|
197
197
|
} from "../index-4qnzda76.js";
|
|
198
|
-
import"../index-
|
|
199
|
-
import"../index-
|
|
200
|
-
import"../index-
|
|
198
|
+
import"../index-6f49krb5.js";
|
|
199
|
+
import"../index-q968hy6y.js";
|
|
200
|
+
import"../index-arjmb6de.js";
|
|
201
201
|
import"../index-86nbfysb.js";
|
|
202
202
|
import {
|
|
203
203
|
defineRuntimeTool2,
|
package/dist/entrypoints/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
renderCliView2,
|
|
17
17
|
pollUntilDone2,
|
|
18
18
|
createCli2
|
|
19
|
-
} from "../index-
|
|
19
|
+
} from "../index-w7jq3fz9.js";
|
|
20
20
|
import"../index-k42ckyzx.js";
|
|
21
21
|
import"../index-ct75c3at.js";
|
|
22
22
|
import"../index-rhzkndr5.js";
|
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
applyCliUpdate2,
|
|
43
43
|
rollbackCliUpdate2
|
|
44
44
|
} from "../index-90p34rts.js";
|
|
45
|
-
import"../index-
|
|
46
|
-
import"../index-
|
|
45
|
+
import"../index-q968hy6y.js";
|
|
46
|
+
import"../index-arjmb6de.js";
|
|
47
47
|
import"../index-86nbfysb.js";
|
|
48
48
|
import"../index-ega3yz4c.js";
|
|
49
49
|
import {
|
|
@@ -26,7 +26,7 @@ function platformSignal(signal) {
|
|
|
26
26
|
release: () => signal.removeEventListener("abort", abort)
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function telegramBudgetTransformer(budget) {
|
|
29
|
+
function telegramBudgetTransformer(budget, options) {
|
|
30
30
|
return async (previous, method, payload, signal) => {
|
|
31
31
|
const gate = platformSignal(signal);
|
|
32
32
|
let handedOn = false;
|
|
@@ -34,7 +34,7 @@ function telegramBudgetTransformer(budget) {
|
|
|
34
34
|
return await budget.run(method, payload, gate.signal, () => {
|
|
35
35
|
handedOn = true;
|
|
36
36
|
return previous(method, payload, signal);
|
|
37
|
-
});
|
|
37
|
+
}, options);
|
|
38
38
|
} catch (error) {
|
|
39
39
|
if (!handedOn && gate.signal?.aborted && error === gate.signal.reason) {
|
|
40
40
|
throw new TelegramNotDispatchedError2("request", "the Telegram request was cancelled before it was sent", { cause: error });
|
|
@@ -6,7 +6,7 @@ export { createTelegramLocalFiles, TelegramLocalFileError, type TelegramLocalFil
|
|
|
6
6
|
export { TelegramNotDispatchedError, type TelegramNotDispatchedStage, } from '../telegram/not-dispatched.js';
|
|
7
7
|
export { createTelegramOperatorChannel, type TelegramChatId, type TelegramOperatorChannel, type TelegramOperatorChannelConfig, type TelegramOperatorDrop, type TelegramOperatorMessage, type TelegramOperatorSenderConfig, telegramOperatorSender, } from '../telegram/operator-channel.js';
|
|
8
8
|
export { createTelegramOperatorDedupe, type TelegramOperatorDedupe, type TelegramOperatorDedupeVerdict, } from '../telegram/operator-dedupe.js';
|
|
9
|
-
export { type TelegramOutboundBudget, type TelegramOutboundBudgetConfig, type TelegramOutboundBudgetStats, telegramOutboundBudget, } from '../telegram/outbound-budget.js';
|
|
9
|
+
export { type TelegramOutboundBudget, type TelegramOutboundBudgetConfig, type TelegramOutboundBudgetStats, type TelegramOutboundCallOptions, type TelegramOutboundLane, telegramOutboundBudget, } from '../telegram/outbound-budget.js';
|
|
10
10
|
export { classifyTelegramSendFailure, TELEGRAM_SEND_FAILURE_REASONS, type TelegramSendFailure, type TelegramSendFailureReason, } from '../telegram/send-failure.js';
|
|
11
11
|
export { createTelegramBotTransport, type TelegramBotTransportOpen, type TelegramBotTransportOptions, type TelegramBotTransportResolve, type TelegramBotTransportSocket, type TelegramFetch, } from '../telegram/transport.js';
|
|
12
12
|
export { createTelegramUpdateIntake, type TelegramUpdateAttemptContext, type TelegramUpdateAttemptIntakeConfig, type TelegramUpdateEnvelope, type TelegramUpdateExhaustion, type TelegramUpdateExhaustionFailure, type TelegramUpdateFailure, type TelegramUpdateIntake, type TelegramUpdateIntakeConfig, type TelegramUpdateIntakeOptions, TelegramUpdateOwnershipLostError, type TelegramUpdateStoreStep, } from '../telegram/update-intake.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telegram.d.ts","sourceRoot":"","sources":["../../src/entrypoints/telegram.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,kBAAkB,EACvB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,wBAAwB,EAC7B,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,4B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|
|
983
983
|
wake = undefined;
|
|
984
984
|
current?.abort();
|
|
985
985
|
};
|
|
986
|
+
const nextWaiter = () => queue.find((waiter) => waiter.lane === "interactive") ?? queue[0];
|
|
986
987
|
const remove = (waiter) => {
|
|
987
988
|
const index = queue.indexOf(waiter);
|
|
988
989
|
if (index === -1)
|
|
989
990
|
return;
|
|
991
|
+
const next = nextWaiter() === waiter;
|
|
990
992
|
queue.splice(index, 1);
|
|
991
|
-
if (
|
|
993
|
+
if (next)
|
|
992
994
|
wakeWaiting();
|
|
993
995
|
};
|
|
994
996
|
const drain = async () => {
|
|
@@ -997,7 +999,7 @@ function createBudget(rate, fallback, now, sleepFor) {
|
|
|
997
999
|
draining = true;
|
|
998
1000
|
try {
|
|
999
1001
|
while (queue.length > 0) {
|
|
1000
|
-
const head =
|
|
1002
|
+
const head = nextWaiter();
|
|
1001
1003
|
if (head === undefined)
|
|
1002
1004
|
break;
|
|
1003
1005
|
if (head.signal?.aborted) {
|
|
@@ -1026,7 +1028,7 @@ function createBudget(rate, fallback, now, sleepFor) {
|
|
|
1026
1028
|
}
|
|
1027
1029
|
continue;
|
|
1028
1030
|
}
|
|
1029
|
-
queue.
|
|
1031
|
+
queue.splice(queue.indexOf(head), 1);
|
|
1030
1032
|
if (head.onAbort)
|
|
1031
1033
|
head.signal?.removeEventListener("abort", head.onAbort);
|
|
1032
1034
|
nextGrantAt = at + head.cost * interval;
|
|
@@ -1040,14 +1042,20 @@ function createBudget(rate, fallback, now, sleepFor) {
|
|
|
1040
1042
|
drain();
|
|
1041
1043
|
}
|
|
1042
1044
|
};
|
|
1043
|
-
const acquire = (cost, signal) => {
|
|
1045
|
+
const acquire = (cost, signal, options) => {
|
|
1044
1046
|
if (!Number.isSafeInteger(cost) || cost < 1) {
|
|
1045
1047
|
return Promise.reject(new RangeError("cost must be an integer of at least one message"));
|
|
1046
1048
|
}
|
|
1047
1049
|
if (signal?.aborted)
|
|
1048
1050
|
return Promise.reject(signal.reason);
|
|
1049
1051
|
return new Promise((resolve, reject) => {
|
|
1050
|
-
const waiter = {
|
|
1052
|
+
const waiter = {
|
|
1053
|
+
cost,
|
|
1054
|
+
lane: options?.lane ?? "interactive",
|
|
1055
|
+
resolve,
|
|
1056
|
+
reject,
|
|
1057
|
+
...signal && { signal }
|
|
1058
|
+
};
|
|
1051
1059
|
if (signal) {
|
|
1052
1060
|
const onAbort = () => {
|
|
1053
1061
|
remove(waiter);
|
|
@@ -1084,23 +1092,27 @@ function createBudget(rate, fallback, now, sleepFor) {
|
|
|
1084
1092
|
await wait(Math.min(remaining, MAX_TIMER_MS), signal);
|
|
1085
1093
|
}
|
|
1086
1094
|
};
|
|
1087
|
-
const run = async (method, payload, signal, send) => {
|
|
1095
|
+
const run = async (method, payload, signal, send, options) => {
|
|
1088
1096
|
if (signal?.aborted)
|
|
1089
1097
|
throw signal.reason;
|
|
1090
1098
|
const cost = sendCost(method, payload);
|
|
1091
1099
|
if (cost > 0)
|
|
1092
|
-
await acquire(cost, signal);
|
|
1100
|
+
await acquire(cost, signal, options);
|
|
1093
1101
|
if (signal?.aborted)
|
|
1094
1102
|
throw signal.reason;
|
|
1103
|
+
const pauseOnRefusal = (refusal) => {
|
|
1104
|
+
if (cost > 0)
|
|
1105
|
+
pauseAfter(refusal);
|
|
1106
|
+
};
|
|
1095
1107
|
let result;
|
|
1096
1108
|
try {
|
|
1097
1109
|
result = await send();
|
|
1098
1110
|
} catch (error) {
|
|
1099
|
-
|
|
1111
|
+
pauseOnRefusal(error);
|
|
1100
1112
|
throw error;
|
|
1101
1113
|
}
|
|
1102
1114
|
if (isRecord(result) && result.ok === false)
|
|
1103
|
-
|
|
1115
|
+
pauseOnRefusal(result);
|
|
1104
1116
|
return result;
|
|
1105
1117
|
};
|
|
1106
1118
|
const budget = {
|
|
@@ -1113,6 +1125,7 @@ function createBudget(rate, fallback, now, sleepFor) {
|
|
|
1113
1125
|
granted,
|
|
1114
1126
|
messages,
|
|
1115
1127
|
queued: queue.length,
|
|
1128
|
+
queuedBulk: queue.filter((waiter) => waiter.lane === "bulk").length,
|
|
1116
1129
|
messagesPerSecond: rate,
|
|
1117
1130
|
pausedForMs: Math.max(0, pausedUntil - now())
|
|
1118
1131
|
})
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
WaitTimeoutError,
|
|
75
75
|
runWaitOperation,
|
|
76
76
|
createCli2
|
|
77
|
-
} from "../index-
|
|
77
|
+
} from "../index-w7jq3fz9.js";
|
|
78
78
|
import"../index-2kbysk9s.js";
|
|
79
79
|
import {
|
|
80
80
|
ManagedFilePathSchema2,
|
|
@@ -94,8 +94,8 @@ import {
|
|
|
94
94
|
import {
|
|
95
95
|
createToolInvoker2
|
|
96
96
|
} from "../index-vwhrnp67.js";
|
|
97
|
-
import"../index-
|
|
98
|
-
import"../index-
|
|
97
|
+
import"../index-q968hy6y.js";
|
|
98
|
+
import"../index-arjmb6de.js";
|
|
99
99
|
import {
|
|
100
100
|
collectToolSurface
|
|
101
101
|
} from "../index-86nbfysb.js";
|
|
@@ -261,6 +261,41 @@ async function missingContainedDirectories(root, relative) {
|
|
|
261
261
|
await current.close();
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
function alternateSpellings(name) {
|
|
265
|
+
const swapped = [...name].map((letter) => letter === letter.toLowerCase() ? letter.toUpperCase() : letter.toLowerCase()).join("");
|
|
266
|
+
return [...new Set([swapped, name.normalize("NFC"), name.normalize("NFD")])].filter((spelling) => spelling !== name);
|
|
267
|
+
}
|
|
268
|
+
async function misspelledContainedSegment(root, relative) {
|
|
269
|
+
const segments = safeSegments(relative);
|
|
270
|
+
let current = await openPinnedDirectory(root);
|
|
271
|
+
try {
|
|
272
|
+
for (const [index, segment] of segments.entries()) {
|
|
273
|
+
const exists = async (name) => await statAt(current, name).catch(() => null) !== null;
|
|
274
|
+
let folded = false;
|
|
275
|
+
for (const spelling of alternateSpellings(segment)) {
|
|
276
|
+
folded ||= await exists(spelling);
|
|
277
|
+
}
|
|
278
|
+
if (folded && await exists(segment)) {
|
|
279
|
+
const stored = (await listAt(current)).some(({ name }) => name === segment);
|
|
280
|
+
if (!stored)
|
|
281
|
+
return segment;
|
|
282
|
+
}
|
|
283
|
+
if (index === segments.length - 1)
|
|
284
|
+
return;
|
|
285
|
+
const next = await openDirectoryAt(current, segment).catch((error) => {
|
|
286
|
+
if (["ENOENT", "ENOTDIR", "ELOOP"].includes(errnoOf(error) ?? ""))
|
|
287
|
+
return null;
|
|
288
|
+
throw error;
|
|
289
|
+
});
|
|
290
|
+
if (!next)
|
|
291
|
+
return;
|
|
292
|
+
current = await descend(current, next);
|
|
293
|
+
}
|
|
294
|
+
return;
|
|
295
|
+
} finally {
|
|
296
|
+
await current.close();
|
|
297
|
+
}
|
|
298
|
+
}
|
|
264
299
|
|
|
265
300
|
class UnapprovedContainedDirectoryError extends Error {
|
|
266
301
|
relative;
|
|
@@ -383,4 +418,4 @@ async function readContainedUtf8Handle(handle, maxBytes) {
|
|
|
383
418
|
};
|
|
384
419
|
}
|
|
385
420
|
|
|
386
|
-
export { descriptorPath, NumericFileHandle, openDirectoryAt, openPinnedDirectory, isSafeEntryName, openFileAt, listAt, listContainedDirectory, missingContainedDirectories, UnapprovedContainedDirectoryError, openContainedParent, openContainedFile, ContainedPathChangedError, assertContainedFileCurrent, assertContainedParentCurrent, containedEntryMetadata, openContainedParentFile, readContainedUtf8Handle };
|
|
421
|
+
export { descriptorPath, NumericFileHandle, openDirectoryAt, openPinnedDirectory, isSafeEntryName, openFileAt, listAt, listContainedDirectory, missingContainedDirectories, misspelledContainedSegment, UnapprovedContainedDirectoryError, openContainedParent, openContainedFile, ContainedPathChangedError, assertContainedFileCurrent, assertContainedParentCurrent, containedEntryMetadata, openContainedParentFile, readContainedUtf8Handle };
|
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
} from "./index-dr3t5n1v.js";
|
|
8
8
|
import {
|
|
9
9
|
scanContainedFiles
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-6f49krb5.js";
|
|
11
11
|
import {
|
|
12
12
|
writeContainedFile
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-q968hy6y.js";
|
|
14
14
|
import {
|
|
15
15
|
listContainedDirectory,
|
|
16
16
|
missingContainedDirectories,
|
|
17
|
+
misspelledContainedSegment,
|
|
17
18
|
UnapprovedContainedDirectoryError,
|
|
18
19
|
openContainedParent,
|
|
19
20
|
openContainedFile,
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
containedEntryMetadata,
|
|
24
25
|
openContainedParentFile,
|
|
25
26
|
readContainedUtf8Handle
|
|
26
|
-
} from "./index-
|
|
27
|
+
} from "./index-arjmb6de.js";
|
|
27
28
|
import {
|
|
28
29
|
defineRuntimeTool2
|
|
29
30
|
} from "./index-ega3yz4c.js";
|
|
@@ -438,6 +439,14 @@ async function authorizeCodingPath(config, path2) {
|
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
441
|
async function authorizeCodingPathChain(config, relative) {
|
|
442
|
+
if (relative !== ".") {
|
|
443
|
+
const misspelled = await misspelledContainedSegment(await realpath(config.root), relative);
|
|
444
|
+
if (misspelled !== undefined) {
|
|
445
|
+
codingPathRefusal("BAD_REQUEST", "This path differs from the name stored on disk", relative, {
|
|
446
|
+
hint: "Use list_directory to see the stored spelling."
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
}
|
|
441
450
|
if (!config.authorizePath)
|
|
442
451
|
return;
|
|
443
452
|
const segments = relative === "." ? ["."] : relative.split("/");
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
} from "./index-htxh46ej.js";
|
|
26
26
|
import {
|
|
27
27
|
writeContainedFile
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-q968hy6y.js";
|
|
29
29
|
import {
|
|
30
30
|
openPinnedDirectory,
|
|
31
31
|
isSafeEntryName,
|
|
32
32
|
containedEntryMetadata
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-arjmb6de.js";
|
|
34
34
|
import {
|
|
35
35
|
collectToolSurface
|
|
36
36
|
} from "./index-86nbfysb.js";
|
|
@@ -1348,6 +1348,8 @@ function groupKey(value) {
|
|
|
1348
1348
|
return ABSENT;
|
|
1349
1349
|
if (value === null)
|
|
1350
1350
|
return "null";
|
|
1351
|
+
if (value === "null" || value === ABSENT)
|
|
1352
|
+
return JSON.stringify(value);
|
|
1351
1353
|
if (typeof value === "object")
|
|
1352
1354
|
return JSON.stringify(value);
|
|
1353
1355
|
return String(value);
|
|
@@ -1355,7 +1357,20 @@ function groupKey(value) {
|
|
|
1355
1357
|
function ordered(totals, top) {
|
|
1356
1358
|
const entries = [...totals].sort(([leftKey, left], [rightKey, right]) => right === left ? leftKey.localeCompare(rightKey) : right - left);
|
|
1357
1359
|
const sliced = top === undefined ? entries : entries.slice(0, top);
|
|
1358
|
-
return
|
|
1360
|
+
return {
|
|
1361
|
+
kind: "json",
|
|
1362
|
+
data: Object.fromEntries(sliced),
|
|
1363
|
+
order: sliced.map(([key]) => key)
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1366
|
+
function stringifyGroups(data, order, compact) {
|
|
1367
|
+
if (!isRecord(data) || order.length === 0)
|
|
1368
|
+
return JSON.stringify(data);
|
|
1369
|
+
const lines = order.map((key) => `${JSON.stringify(key)}:${compact ? "" : " "}${JSON.stringify(data[key])}`);
|
|
1370
|
+
return compact ? `{${lines.join(",")}}` : `{
|
|
1371
|
+
${lines.join(`,
|
|
1372
|
+
`)}
|
|
1373
|
+
}`;
|
|
1359
1374
|
}
|
|
1360
1375
|
function numericValue(value, field) {
|
|
1361
1376
|
if (isAbsent(value))
|
|
@@ -1440,7 +1455,7 @@ function renderCliView2(data, view) {
|
|
|
1440
1455
|
const key = groupKey(readField(record, path));
|
|
1441
1456
|
totals.set(key, (totals.get(key) ?? 0) + 1);
|
|
1442
1457
|
}
|
|
1443
|
-
return
|
|
1458
|
+
return ordered(totals, view.top);
|
|
1444
1459
|
}
|
|
1445
1460
|
const path = assertFieldPresent(records, view.field);
|
|
1446
1461
|
if (view.by === undefined) {
|
|
@@ -1455,7 +1470,7 @@ function renderCliView2(data, view) {
|
|
|
1455
1470
|
const key = groupKey(readField(record, byPath));
|
|
1456
1471
|
totals.set(key, (totals.get(key) ?? 0) + (numericValue(readField(record, path), view.field) ?? 0));
|
|
1457
1472
|
}
|
|
1458
|
-
return
|
|
1473
|
+
return ordered(totals, view.top);
|
|
1459
1474
|
}
|
|
1460
1475
|
|
|
1461
1476
|
// src/tools/operations/wait-core.ts
|
|
@@ -2350,6 +2365,11 @@ async function emitManagedResult(session, command, initial, options) {
|
|
|
2350
2365
|
stdout(viewed.text);
|
|
2351
2366
|
return exit(downloadsOk ? 0 : 1);
|
|
2352
2367
|
}
|
|
2368
|
+
if (viewed.order) {
|
|
2369
|
+
stdout(`${stringifyGroups(viewed.data, viewed.order, options.json === true)}
|
|
2370
|
+
`);
|
|
2371
|
+
return exit(downloadsOk ? 0 : 1);
|
|
2372
|
+
}
|
|
2353
2373
|
result = { ...result, data: viewed.data };
|
|
2354
2374
|
}
|
|
2355
2375
|
const exitCode = emitResult2(result, { stdout, stderr }, emitOptionsFor(config, options.json, command));
|
|
@@ -71,6 +71,16 @@ export interface ContainedParent {
|
|
|
71
71
|
* happens, and cannot do that without knowing what would be created.
|
|
72
72
|
*/
|
|
73
73
|
export declare function missingContainedDirectories(root: string, relative: string): Promise<string[]>;
|
|
74
|
+
/**
|
|
75
|
+
* The first segment of `relative` that opens an entry stored under another spelling.
|
|
76
|
+
*
|
|
77
|
+
* A policy compares strings, and a volume that folds case or normalization opens
|
|
78
|
+
* `CREDENTIALS` for a rule written against `credentials`. An entry that answers to
|
|
79
|
+
* another spelling is the only cost here: a listing runs only then, and it decides,
|
|
80
|
+
* because two distinct entries may exist on a volume that does not fold. A missing
|
|
81
|
+
* segment is not misspelled; the caller reports it.
|
|
82
|
+
*/
|
|
83
|
+
export declare function misspelledContainedSegment(root: string, relative: string): Promise<string | undefined>;
|
|
74
84
|
/** A directory vanished after the host approved a different creation plan. */
|
|
75
85
|
export declare class UnapprovedContainedDirectoryError extends Error {
|
|
76
86
|
readonly relative: string;
|