stitchkit 0.114.2 → 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 +54 -0
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts +6 -0
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/contained-scan.d.ts +1 -1
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-broker.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -1
- package/dist/application/directory-inbox-files.d.ts.map +1 -1
- package/dist/application/file-state-store.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +6 -4
- package/dist/entrypoints/agent-runtime/harness.js +2 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +13 -8
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +8 -6
- package/dist/entrypoints/agent-runtime/sqlite/node.js +8 -6
- package/dist/entrypoints/agent-runtime/testing.js +8 -6
- package/dist/entrypoints/agent-runtime.js +8 -6
- package/dist/entrypoints/application/diagnostic-journal.js +2 -2
- package/dist/entrypoints/application/directory-inbox.js +10 -7
- package/dist/entrypoints/cli/publish.js +11 -8
- package/dist/entrypoints/cli.js +6 -3
- package/dist/entrypoints/files.js +10 -7
- package/dist/entrypoints/process/owner-loss.js +1 -1
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/react/keyboard/testing.js +1 -1
- package/dist/entrypoints/react/keyboard.js +11 -11
- package/dist/entrypoints/server.js +4 -4
- 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 +30 -14
- package/dist/entrypoints/tools.js +5 -2
- package/dist/files/chunk-spool.d.ts.map +1 -1
- package/dist/{index-2f9r0jgr.js → index-364k2zwa.js} +4 -4
- package/dist/{index-dc9ere5p.js → index-4g6qmgdx.js} +1 -1
- package/dist/index-6f49krb5.js +107 -0
- package/dist/{index-912sza5h.js → index-90p34rts.js} +1 -1
- package/dist/{index-07dcf2yn.js → index-ac6vvm30.js} +5 -2
- package/dist/{index-zrtrjkbf.js → index-arjmb6de.js} +183 -172
- package/dist/{index-7r4knwf8.js → index-dr3t5n1v.js} +14 -4
- package/dist/{index-84bf5spd.js → index-f6m4c545.js} +5 -2
- package/dist/{index-qj1sy4ep.js → index-fa435yq2.js} +1 -1
- package/dist/{index-hy802jnr.js → index-fdk4r4r6.js} +6 -3
- package/dist/index-jj9228tt.js +6 -0
- package/dist/{index-a3462dqf.js → index-jq2ky8fw.js} +1 -1
- package/dist/{index-s47ac8zt.js → index-n5sv4z0w.js} +142 -156
- package/dist/{index-bh2ht9y5.js → index-n8z3rvzw.js} +4 -1
- package/dist/index-q968hy6y.js +100 -0
- package/dist/{index-j4zh647a.js → index-tt30h7mr.js} +4 -1
- package/dist/{index-tnxsq7cw.js → index-w7jq3fz9.js} +113 -38
- package/dist/{index-p02zgk8x.js → index-y4rxnvgp.js} +6 -0
- package/dist/{index-5v5a9k2n.js → index-z3d6smer.js} +1 -1
- package/dist/{index-6b3pcq5z.js → index-zqkz4af9.js} +1 -1
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/atomic-staging.d.ts.map +1 -1
- package/dist/internal/contained-directory.d.ts +20 -0
- package/dist/internal/contained-directory.d.ts.map +1 -0
- package/dist/{agent-runtime → internal}/contained-files.d.ts +24 -13
- package/dist/internal/contained-files.d.ts.map +1 -0
- package/dist/internal/contained-handle.d.ts +30 -0
- package/dist/internal/contained-handle.d.ts.map +1 -0
- package/dist/internal/contained-write.d.ts +12 -0
- package/dist/internal/contained-write.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts +1 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/internal/errno.d.ts +3 -0
- package/dist/internal/errno.d.ts.map +1 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/write-download.d.ts +5 -14
- package/dist/internal/write-download.d.ts.map +1 -1
- package/dist/process/group-diagnostics.d.ts +1 -0
- package/dist/process/group-diagnostics.d.ts.map +1 -1
- package/dist/process/group-settlement.d.ts +2 -0
- package/dist/process/group-settlement.d.ts.map +1 -1
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/owner-loss-control.d.ts.map +1 -1
- package/dist/react/keyboard/hooks.d.ts +2 -2
- package/dist/react/keyboard/hooks.d.ts.map +1 -1
- package/dist/react/keyboard/layers.d.ts +2 -0
- package/dist/react/keyboard/layers.d.ts.map +1 -1
- package/dist/telegram/broadcast-state.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/download.d.ts.map +1 -1
- package/dist/tools/cli/publication-storage.d.ts.map +1 -1
- package/dist/tools/cli/publication.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 +16 -6
- package/llms/cli.txt +37 -3
- package/llms/process.txt +2 -2
- package/llms/react-keyboard.txt +18 -2
- package/llms/stitchkit.txt +3 -3
- package/llms/telegram.txt +10 -3
- package/llms/{upgrading-0.104.0-0.114.0.txt → upgrading-0.105.0-0.116.0.txt} +85 -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 +168 -19
- package/llms.txt +9 -9
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +1 -1
- package/dist/agent-runtime/contained-darwin.d.ts +0 -21
- package/dist/agent-runtime/contained-darwin.d.ts.map +0 -1
- package/dist/agent-runtime/contained-files.d.ts.map +0 -1
- package/dist/agent-runtime/contained-write.d.ts +0 -9
- package/dist/agent-runtime/contained-write.d.ts.map +0 -1
|
@@ -94,6 +94,8 @@ export interface KeyLayerState<E extends LayerKeyEvent, S extends LayerScope<S>>
|
|
|
94
94
|
export interface KeyLayerHandle<E extends LayerKeyEvent, S extends LayerScope<S>> {
|
|
95
95
|
update(state: KeyLayerState<E, S>): void;
|
|
96
96
|
remove(): void;
|
|
97
|
+
/** Put a removed layer back in the place it held, without counting as an activation. */
|
|
98
|
+
restore(): void;
|
|
97
99
|
}
|
|
98
100
|
/** Where the stack listens. A `Window` is one. */
|
|
99
101
|
export interface KeyListenerTarget<E> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/react/keyboard/layers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE7E,wFAAwF;AACxF,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAUjD,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,gBAAgB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AE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC;IAC7E,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;CACpD;AAwDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,aAAa,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,EAClF,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC3B,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAoFrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast-state.d.ts","sourceRoot":"","sources":["../../src/telegram/broadcast-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"broadcast-state.d.ts","sourceRoot":"","sources":["../../src/telegram/broadcast-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE1F,eAAO,MAAM,8BAA8B;;;;;EAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,QAAA,MAAM,YAAY,iDAAyD,CAAC;AAC5E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAItE,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;oBASrB,CAAC;AACH,KAAK,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,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
17
|
*/
|
|
18
18
|
import type { Transformer } from 'grammy';
|
|
19
|
-
import type { TelegramOutboundBudget } from './outbound-budget.js';
|
|
19
|
+
import type { TelegramOutboundBudget, TelegramOutboundCallOptions } from './outbound-budget.js';
|
|
20
20
|
/**
|
|
21
21
|
* A grammY client transformer that runs every Bot API call under `budget`.
|
|
22
22
|
*
|
|
@@ -30,6 +30,9 @@ import type { TelegramOutboundBudget } from './outbound-budget.js';
|
|
|
30
30
|
* `TelegramNotDispatchedError`: nothing was sent. A cancellation after the
|
|
31
31
|
* request was handed on is the client's ordinary error and the outcome is
|
|
32
32
|
* unknown, not a definite failure.
|
|
33
|
+
*
|
|
34
|
+
* `options.lane` applies to every call through this client: a campaign installs
|
|
35
|
+
* `{ lane: 'bulk' }` on its own `Api`, and replies stay ahead of it.
|
|
33
36
|
*/
|
|
34
|
-
export declare function telegramBudgetTransformer(budget: TelegramOutboundBudget): Transformer;
|
|
37
|
+
export declare function telegramBudgetTransformer(budget: TelegramOutboundBudget, options?: TelegramOutboundCallOptions): Transformer;
|
|
35
38
|
//# sourceMappingURL=budget-transformer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget-transformer.d.ts","sourceRoot":"","sources":["../../src/telegram/budget-transformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"budget-transformer.d.ts","sourceRoot":"","sources":["../../src/telegram/budget-transformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AA4B7F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,2BAA2B,GACpC,WAAW,CA4Bb"}
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
* `forwardMessages` cost their message ids, and the follow-up call to action
|
|
14
14
|
* after an album is one more message.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* Two lanes share that one rate. An `interactive` call is granted before any
|
|
17
|
+
* `bulk` call that is waiting, so a person's reply never queues behind a
|
|
18
|
+
* campaign; a campaign runs at whatever rate replies leave it.
|
|
19
|
+
*
|
|
20
|
+
* **It paces; it does not retry.** A 429 on a method that spends the budget
|
|
21
|
+
* pauses every sender of the token for the wait Telegram stated (or a declared
|
|
22
|
+
* fallback when it stated none). A 429 on an edit or a read concerns that call
|
|
23
|
+
* and pauses nothing. A network failure or a 5xx is returned to the caller
|
|
24
|
+
* unchanged: repeating a
|
|
19
25
|
* send whose external outcome is unknown is the caller's decision, and a
|
|
20
26
|
* primitive that retried it would turn one unknown message into two.
|
|
21
27
|
*
|
|
@@ -25,6 +31,8 @@
|
|
|
25
31
|
* saved burst at start and again after a 429 pause, which is exactly the
|
|
26
32
|
* stampede a shared budget exists to prevent.
|
|
27
33
|
*/
|
|
34
|
+
/** Whose turn comes first. `interactive` answers a person; `bulk` is a campaign. */
|
|
35
|
+
export type TelegramOutboundLane = 'interactive' | 'bulk';
|
|
28
36
|
export interface TelegramOutboundBudgetConfig {
|
|
29
37
|
/** The bot token whose sends share this budget. It is never returned or logged. */
|
|
30
38
|
readonly token: string;
|
|
@@ -52,31 +60,38 @@ export interface TelegramOutboundBudgetStats {
|
|
|
52
60
|
readonly granted: number;
|
|
53
61
|
/** Weighted messages admitted: an album of three counts as three. */
|
|
54
62
|
readonly messages: number;
|
|
55
|
-
/** Calls waiting for their turn. */
|
|
63
|
+
/** Calls waiting for their turn, in both lanes. */
|
|
56
64
|
readonly queued: number;
|
|
65
|
+
/** How many of them are in the `bulk` lane. */
|
|
66
|
+
readonly queuedBulk: number;
|
|
57
67
|
readonly messagesPerSecond: number;
|
|
58
68
|
/** How much of the current 429 pause is still ahead, in milliseconds. */
|
|
59
69
|
readonly pausedForMs: number;
|
|
60
70
|
}
|
|
71
|
+
export interface TelegramOutboundCallOptions {
|
|
72
|
+
/** Default `interactive`. */
|
|
73
|
+
readonly lane?: TelegramOutboundLane;
|
|
74
|
+
}
|
|
61
75
|
/**
|
|
62
76
|
* A token's outbound budget. `run` is the narrow adapter a client transformer
|
|
63
77
|
* calls around its own send; it gates, pauses on 429 and never retries.
|
|
64
78
|
*/
|
|
65
79
|
export interface TelegramOutboundBudget {
|
|
66
80
|
/**
|
|
67
|
-
* Run one Bot API call under the budget
|
|
68
|
-
* without spending a message. A 429
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
81
|
+
* Run one Bot API call under the budget, in the `interactive` lane by default.
|
|
82
|
+
* A non-send method passes through without spending a message. A 429 on a send
|
|
83
|
+
* pauses every sender of the token, whether `send` throws it or resolves with
|
|
84
|
+
* the Bot API's `{ ok: false, … }` body, as a client transformer's `send` does;
|
|
85
|
+
* a 429 on a non-send method pauses nothing. The error is rethrown, or the
|
|
86
|
+
* response returned, unchanged and the call is not repeated.
|
|
72
87
|
*/
|
|
73
|
-
run<T>(method: string, payload: unknown, signal: AbortSignal | undefined, send: () => Promise<T
|
|
88
|
+
run<T>(method: string, payload: unknown, signal: AbortSignal | undefined, send: () => Promise<T>, options?: TelegramOutboundCallOptions): Promise<T>;
|
|
74
89
|
/**
|
|
75
90
|
* Wait until `cost` messages fit. The wait rejects with `signal.reason`
|
|
76
91
|
* without spending a token; a granted call owns its slots even if its later
|
|
77
92
|
* send is aborted, which the caller must not repeat as a definite failure.
|
|
78
93
|
*/
|
|
79
|
-
acquire(cost: number, signal?: AbortSignal): Promise<void>;
|
|
94
|
+
acquire(cost: number, signal?: AbortSignal, options?: TelegramOutboundCallOptions): Promise<void>;
|
|
80
95
|
/** Pause every sender of this token for at least `milliseconds`. Never shortens an existing pause. */
|
|
81
96
|
pause(milliseconds: number): void;
|
|
82
97
|
/** Pause the token after a rate-limited refusal; another failure does nothing. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-budget.d.ts","sourceRoot":"","sources":["../../src/telegram/outbound-budget.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"outbound-budget.d.ts","sourceRoot":"","sources":["../../src/telegram/outbound-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAwEH,oFAAoF;AACpF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,4BAA4B;IAC3C,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF;AAED,kEAAkE;AAClE,MAAM,WAAW,2BAA2B;IAC1C,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA2B;IAC1C,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EACH,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,CAAC,CAAC,CAAC;IACd;;;;OAIG;IACH,OAAO,CACL,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,sGAAsG;IACtG,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kFAAkF;IAClF,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,gBAAgB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,sDAAsD;IACtD,KAAK,IAAI,2BAA2B,CAAC;CACtC;AA6ND;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,4BAA4B,GACnC,sBAAsB,CAsCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/download.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/download.ts"],"names":[],"mappings":"AAOA,mFAAmF;AACnF,eAAO,MAAM,0BAA0B,QAAoB,CAAC;AAE5D,oFAAoF;AACpF,wBAAsB,eAAe,CACnC,KAAK,EAAE,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAC3C,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC9B,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,OAAO,CAAC,OAAO,CAAC,CA8ClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publication-storage.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/publication-storage.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"publication-storage.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/publication-storage.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,YAAY,CAAC;AAE3E,OAAO,EAGL,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,UAAU,CAAC;CACnB;AACD,MAAM,WAAW,YAAa,SAAQ,mBAAmB;IACvD,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;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OAAO,CAAC,IAAI,CAAC,CAaf;AAKD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,CAAC,CAkBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/publication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/publication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,OAAO,EAGL,KAAK,qBAAqB,EAI3B,MAAM,wBAAwB,CAAC;AAoBhC,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGhB,CAAC;AACH;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAoThE;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,CAU/B"}
|
package/dist/tools/cli/view.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { CliResultView } from './args-view.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* What a view produces: a JSON value, or the one human-facing shape. `order` is the order of
|
|
4
|
+
* a grouped object's keys, which an object cannot hold once a key looks like an integer.
|
|
5
|
+
*/
|
|
3
6
|
export type CliViewOutput = {
|
|
4
7
|
kind: 'json';
|
|
5
8
|
data: unknown;
|
|
9
|
+
order?: readonly string[];
|
|
6
10
|
} | {
|
|
7
11
|
kind: 'text';
|
|
8
12
|
text: string;
|
|
9
13
|
};
|
|
14
|
+
/** One grouped view in its own order, spaced as the CLI spaces any JSON it prints. */
|
|
15
|
+
export declare function stringifyGroups(data: unknown, order: readonly string[], compact: boolean): string;
|
|
10
16
|
/** Compute the requested view, or refuse it with a message naming the field. */
|
|
11
17
|
export declare function renderCliView(data: unknown, view: CliResultView): CliViewOutput;
|
|
12
18
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/view.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/view.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAuGnC,sFAAsF;AACtF,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,EAAE,OAAO,GACf,MAAM,CAMR;AA6GD,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,GAAG,aAAa,CAgC/E"}
|
package/llms/agent-runtime.txt
CHANGED
|
@@ -301,17 +301,27 @@ approval input fails the run with a private diagnostic rather than starting a fr
|
|
|
301
301
|
`read_output`. Every call passes a required host authorization callback. An optional async/sync
|
|
302
302
|
`authorizePath({ path })` is the one operation-independent policy for direct file access and
|
|
303
303
|
discovery: direct read/write/edit refuses a denied path, while listing, glob and search omit it.
|
|
304
|
-
Denial is recursive on every surface — direct access
|
|
305
|
-
|
|
304
|
+
Denial is recursive on every surface — direct access asks about each named ancestor and the file,
|
|
305
|
+
outermost first, stopping at the first refusal; discovery rooted at `.` also asks about `.`.
|
|
306
|
+
Thus denying `credentials` denies everything
|
|
306
307
|
under it. The comparison is segment-wise, so it does not deny `credentials-backup`, and a path of
|
|
307
|
-
depth N costs N
|
|
308
|
+
depth N costs N questions for direct access. Directory decisions happen before descent; file decisions and
|
|
308
309
|
`search_files.include` happen before opening content. Requested paths use `/`: a backslash is
|
|
309
310
|
refused rather than normalised, because the workspace walk reads it as a separator and every
|
|
310
311
|
authorization callback would otherwise be asked about a different decomposition than the one opened. File paths are relative, bounded and contained after
|
|
311
|
-
descriptor-relative resolution: each ancestor is opened without following symlinks and
|
|
312
|
-
pinned through authorization
|
|
312
|
+
descriptor-relative resolution: each ancestor is opened without following symlinks. Reads and edits
|
|
313
|
+
stay pinned through authorization; `write_file` plans before it and opens the parent after, because
|
|
314
|
+
the parent it creates does not exist yet. Reads revalidate the pinned file identity;
|
|
313
315
|
writes and patches revalidate the pinned parent identity; search and resource discovery descend
|
|
314
|
-
only through opened directories.
|
|
316
|
+
only through opened directories. A path that changed during authorization refuses with `CONFLICT`.
|
|
317
|
+
A path spelled differently from the name stored on disk refuses before any policy reads it, so on a
|
|
318
|
+
case-insensitive volume a rule on `credentials` cannot be passed by asking for `CREDENTIALS`.
|
|
319
|
+
NUL bytes are refused before either host policy sees a path.
|
|
320
|
+
Reads and edits open file candidates without blocking on special files, then require a regular
|
|
321
|
+
file. A writerless FIFO therefore refuses instead of occupying a filesystem worker. `write_file`
|
|
322
|
+
supplies the exact missing-directory plan as `createsDirectories` to host authorization; the
|
|
323
|
+
descriptor walk may create only those entries. An ancestor that disappears after approval refuses
|
|
324
|
+
with `CONFLICT`, without expanding that plan. Linux traverses `/proc/self/fd`; macOS uses the package's
|
|
315
325
|
architecture-specific Node-API `openat` backend. Unsupported platforms, including FreeBSD until a
|
|
316
326
|
real backend is qualified, fail closed. The package needs no install-time compiler or script.
|
|
317
327
|
Other platforms fail these filesystem operations closed because Node exposes no equivalent
|
package/llms/cli.txt
CHANGED
|
@@ -612,6 +612,29 @@ myapp generate "a fox" --wait --output-dir ./out
|
|
|
612
612
|
myapp generate "a fox" --wait --json > result.json &
|
|
613
613
|
```
|
|
614
614
|
|
|
615
|
+
### Download filesystem boundary
|
|
616
|
+
|
|
617
|
+
`--output-dir` resolves the explicitly configured root once before fetching and pins that
|
|
618
|
+
one directory for the whole batch. An initial root alias (including a symbolic link) selects
|
|
619
|
+
its canonical directory; missing components are created through pinned parents. The root
|
|
620
|
+
capability continues to name the same directory if another actor renames it or replaces its
|
|
621
|
+
pathname. The original spelling printed in `saved` is a display path, not a re-open of the root.
|
|
622
|
+
|
|
623
|
+
Each media name becomes a direct child. Downloads atomically replace an existing file,
|
|
624
|
+
symbolic link (including a dangling link), or hard link without changing the inode a link
|
|
625
|
+
points to. An existing directory refuses replacement. Ordinary files retain their permission
|
|
626
|
+
bits; new files use `0666 & ~umask`. Replacing writes a new file beside the old one, so it needs
|
|
627
|
+
write permission on the directory, gives the file to the process user, replaces a read-only
|
|
628
|
+
file, and refuses a bind-mounted one. Symlinks inside a contained parent path are never followed.
|
|
629
|
+
The successful operation's JSON remains on stdout when a download fails; per-file diagnostics
|
|
630
|
+
go to stderr and any failed file makes the exit non-zero. Already saved files remain saved.
|
|
631
|
+
|
|
632
|
+
This filesystem protection supports Linux and macOS. On Linux it uses directory descriptors;
|
|
633
|
+
on macOS it uses the packaged native backend. A bundled or compiled macOS CLI must use
|
|
634
|
+
[`createNativePackaging`](./native-io.md) from `stitchkit/files/packaging` at build
|
|
635
|
+
time. Missing native support and unsupported platforms, including Windows, refuse the download;
|
|
636
|
+
CLI commands without downloads continue to work. There is no weaker path-based fallback.
|
|
637
|
+
|
|
615
638
|
## Aggregate views
|
|
616
639
|
|
|
617
640
|
The CLI's audience is agents, scripts and `jq`, so output is JSON. That settles
|
|
@@ -647,16 +670,27 @@ myapp item_list --sort messages --top 5 --json # the same five, a
|
|
|
647
670
|
myapp item_list --sort name --ascending # ordered the other way
|
|
648
671
|
```
|
|
649
672
|
|
|
650
|
-
Groups come back largest first for the same reason
|
|
673
|
+
Groups come back largest first for the same reason, in the printed bytes even when a key looks
|
|
674
|
+
like a number; a reader that parses them into a JavaScript object reorders such keys itself.
|
|
675
|
+
A string equal to `null` or `(absent)` is quoted, so it stays apart from the missing value. A record that carries no
|
|
651
676
|
value for the sort field sorts **last in both directions**: it is not the
|
|
652
677
|
smallest, it is not on the scale at all, and letting it lead an ascending list
|
|
653
678
|
would answer a question nobody asked.
|
|
654
679
|
|
|
655
|
-
|
|
680
|
+
Rules worth knowing before you rely on them:
|
|
656
681
|
|
|
657
|
-
- **A field
|
|
682
|
+
- **A field no record carries in a nonempty collection is a presentation error.** A group of zero
|
|
658
683
|
over a misspelled field is indistinguishable from a true empty answer, and the
|
|
659
684
|
caller reads it as data. The message names the fields that *are* there.
|
|
685
|
+
Plain and dotted field paths read own properties only at every segment; inherited
|
|
686
|
+
properties are not record data. Own keys named `constructor`, `prototype` or `toString`
|
|
687
|
+
are ordinary fields.
|
|
688
|
+
- **An empty collection is a successful answer.** Count and grouped sums return `{}`,
|
|
689
|
+
an ungrouped sum returns `0`, and sorted records return `[]`. Tables keep their header
|
|
690
|
+
and separator without data rows. This applies both to a direct `[]` and to the single
|
|
691
|
+
array field of an envelope such as `{ items: [], total: 0 }`. With no records, field
|
|
692
|
+
presence cannot be checked, so a misspelled field answers empty too; malformed paths, unsafe
|
|
693
|
+
`__proto__` segments and a field of the envelope itself (`--sum total` here) still refuse.
|
|
660
694
|
- **An aggregate needs a collection** — the result itself when it is an array,
|
|
661
695
|
or the single array field of a result object. An aggregate over a scalar, or
|
|
662
696
|
over an object with two array fields, is refused rather than guessed.
|
package/llms/process.txt
CHANGED
|
@@ -522,8 +522,8 @@ a static loader enters a bundle.
|
|
|
522
522
|
|
|
523
523
|
Only these calls load the addon, and only on macOS: process identity (`observeProcessInstance`
|
|
524
524
|
and `probeProcessOwner`), every exclusive lock (`withExclusiveLock` and what is built on it, such
|
|
525
|
-
as the file state store and the diagnostic journal)
|
|
526
|
-
coding tools
|
|
525
|
+
as the file state store and the diagnostic journal), the contained file operations of the Agent
|
|
526
|
+
coding tools and `--output-dir` downloads of `stitchkit/cli`. Without the addon a download refuses, and a lock still works, but it cannot record or check its owner's
|
|
527
527
|
identity, so a lock held by a crashed owner is not reclaimed. The managed file boundary
|
|
528
528
|
(`createManagedFileBoundary` and the transfer tools built on it), atomic writes and the chunk
|
|
529
529
|
spool never load it, on any operating system. The package is free of import side effects
|
package/llms/react-keyboard.txt
CHANGED
|
@@ -89,6 +89,17 @@ together, only `scope` tells the stack which one is inside.
|
|
|
89
89
|
**`active`** (default `true`) switches a layer off without unmounting it;
|
|
90
90
|
becoming active again puts it on top of its kind.
|
|
91
91
|
|
|
92
|
+
Layers register, adopt options and clean up in the browser's layout-effect phase.
|
|
93
|
+
Call the hook before a layout effect that dispatches a key: that effect sees the
|
|
94
|
+
committed `active`, handler and scope immediately, without waiting for passive
|
|
95
|
+
effects. Rendering alone never changes the stack; an abandoned render leaves the
|
|
96
|
+
last committed layer intact. A Suspense boundary that hides committed content
|
|
97
|
+
disconnects its layout effects, so a layer behind the fallback goes quiet and
|
|
98
|
+
returns to its place on reveal. The same lifecycle backs `useEscapeLayer` and a
|
|
99
|
+
zone's outside-key layer. Server rendering installs no listener and does not
|
|
100
|
+
access `window`. The browser phase is chosen when the module loads, so a test
|
|
101
|
+
that installs a DOM does so before it imports these hooks.
|
|
102
|
+
|
|
92
103
|
**Fields keep their keys.** Keys pressed in an input, a text area, a select, an
|
|
93
104
|
editable region, a combobox, a slider or any area marked `data-local-keys` do not
|
|
94
105
|
reach layers — except Escape, which a field that wants it keeps with
|
|
@@ -140,6 +151,11 @@ function ChatList({ chats, openId, open }) {
|
|
|
140
151
|
| `ignore(event)` | — | a key that is the application's own right now — return `true` and the zone leaves it whole; see [dragging](#a-zone-inside-a-drag-and-drop-list) |
|
|
141
152
|
| `onReveal(id)` | — | focus went to an item with no element yet — a row of a virtualized list outside the rendered range; scroll it in, and focus lands on it when it mounts |
|
|
142
153
|
|
|
154
|
+
`role: 'none'` adds neither a container/item role nor `aria-orientation` or
|
|
155
|
+
`aria-selected`; native links and buttons keep their semantics. The orientation
|
|
156
|
+
still controls which arrows move focus. Only listbox and tablist zones emit
|
|
157
|
+
`aria-orientation` (vertical by default).
|
|
158
|
+
|
|
143
159
|
The callbacks return `false` to leave the key to the page, anything else takes
|
|
144
160
|
it. A key the zone does not take bubbles on to the layers — in a vertical list
|
|
145
161
|
← and → are not the list's keys, so the section switch above hears them.
|
|
@@ -420,9 +436,9 @@ no component, no styles, no router — see the [keyboard guide](../guide/keyboar
|
|
|
420
436
|
|
|
421
437
|
| Export | Kind | Summary |
|
|
422
438
|
|--------|------|---------|
|
|
423
|
-
| `useKeyLayer` | hook | put a layer on the window's one key stack
|
|
439
|
+
| `useKeyLayer` | hook | put a layer on the window's one key stack; registration, options and cleanup follow the browser layout-effect phase, before later layout effects in the caller; asked `overlay` → `local` → `route` → `zone` → `global`, innermost first within a kind |
|
|
424
440
|
| `useEscapeLayer` | hook | an `overlay`, `local` or `route` layer for Escape: one press closes one level |
|
|
425
|
-
| `useNavZone` | hook | a list zone — roving tab stop, arrows move DOM focus, select, highlight or focus mode, cross-axis enter/exit, boundaries, `ignore` for a key the application is using; props carry no key without a value |
|
|
441
|
+
| `useNavZone` | hook | a list zone — roving tab stop, arrows move DOM focus, select, highlight or focus mode, cross-axis enter/exit, boundaries, `ignore` for a key the application is using; props carry no key without a value; `role: 'none'` omits roles, `aria-orientation` and `aria-selected`, preserving native link/button semantics |
|
|
426
442
|
| `nextZoneIndex` | function | where a move lands in a list of a given length: an index, `'before-start'` or `'after-end'` |
|
|
427
443
|
| `isKeyFieldTarget` | function | whether a key was pressed in a field or a `data-local-keys` area, the test layers use |
|
|
428
444
|
| `KeyLayerOptions` | _type_ | `kind`, `onKey`, `active`, `scope`, `fields`, `phase` — `'capture'` is for a `local` layer only: it hears a key before the element that has focus does, as a menu over a text field must, and a key it takes goes no further |
|
package/llms/stitchkit.txt
CHANGED
|
@@ -86,13 +86,13 @@ own, recorded as an ADR.
|
|
|
86
86
|
| `stitchkit/geo` | server (Bun or Node) | evolving | managed GeoIP reader generations, last-known-good reload and the optional MaxMind adapter |
|
|
87
87
|
| `stitchkit/oauth` | browser **and** server | evolving | provider-neutral Authorization Code + PKCE request and one-shot callback transaction mechanics |
|
|
88
88
|
| `stitchkit/google` | server (Bun or Node) | evolving | optional Google code exchange and verified OIDC identity adapter |
|
|
89
|
-
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the
|
|
89
|
+
| `stitchkit/observability` | server | stable<br>_redefined in 2 of the 61 minors since 0.56.2, most recently 0.92.0_ | request/tool event projections — `createObservability`, trace context, sanitisation |
|
|
90
90
|
| `stitchkit/testing` | tests on Bun or Node | stable | in-process generated clients over a real Fetch handler, the managed-resource conformance kit and manual time for schedules and retries |
|
|
91
91
|
| `stitchkit/declaration` | browser + build and deployment tooling (Bun or Node) | evolving | `ProjectDeclarationSchema` — the one machine-readable statement a repository makes about itself |
|
|
92
92
|
| `stitchkit/react` | browser + server rendering | stable | `createCursorQuery`, `createCacheBridge`, QueryClient and `ApiError` retry policy |
|
|
93
93
|
| `stitchkit/react/keyboard` | browser | evolving | which part of a screen gets a key — ordered layers, one Escape per level, list zones with real focus; see [keyboard guide](keyboard.md) |
|
|
94
94
|
| `stitchkit/react/keyboard/testing` | server (Bun or Node) | evolving | the keyboard layers and zones without a DOM — fakes for the window, elements and key events beside the two engines, to test the order of layers, `scope`/`inert` and the edges of a zone in milliseconds |
|
|
95
|
-
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in
|
|
95
|
+
| `stitchkit/agent-runtime` | server | evolving<br>_redefined in 25 of the 61 minors since 0.56.2, most recently 0.115.0_ | optional durable conversation/run loop, history, models, prompts, fencing and events |
|
|
96
96
|
| `stitchkit/agent-runtime/sandbox` | server | evolving | optional Linux Bubblewrap sessions, durable workspaces and a host HTTP credential gateway; see [sandbox guide](sandbox.md) |
|
|
97
97
|
| `stitchkit/agent-runtime/testing` | tests on Bun or Node | evolving | credential-free replay, scripted provider faults, deterministic race controls and the agent-store conformance kit |
|
|
98
98
|
| `stitchkit/agent-runtime/harness` | server | evolving | resource-aware process-local facade over the canonical Agent runtime; supervision stays outside |
|
|
@@ -104,7 +104,7 @@ own, recorded as an ADR.
|
|
|
104
104
|
| `stitchkit/agent-runtime/sqlite/bun` | server (Bun) | evolving | durable built-in SQLite store for the agent runtime |
|
|
105
105
|
| `stitchkit/agent-runtime/sqlite/node` | server (Node ≥ 22.5) | evolving | durable built-in SQLite store for the agent runtime |
|
|
106
106
|
| `stitchkit-tui` | terminal (Bun) | evolving | optional official OpenTUI host over a caller-composed headless runtime |
|
|
107
|
-
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the
|
|
107
|
+
| `stitchkit/application` | browser + server | evolving<br>_redefined in 14 of the 61 minors since 0.56.2, most recently 0.110.0_ | managed resource graph, readiness, admission, schedules, subtree restart and bounded shutdown |
|
|
108
108
|
| `stitchkit/application/grammy` | server | evolving | a grammY bot as application resources — configuration, then polling with updates admitted by batch — and the webhook adapter |
|
|
109
109
|
| `stitchkit/application/opentelemetry` | server | evolving | maps application snapshots onto an injected OpenTelemetry `Meter` |
|
|
110
110
|
| `stitchkit/application/schemas` | browser + server | evolving | the application's snapshot, health and shutdown schemas alone, without the kernel |
|
package/llms/telegram.txt
CHANGED
|
@@ -122,6 +122,13 @@ cast, and a send cancelled in the queue then waits for its slot and fails as
|
|
|
122
122
|
a follow-up call to action after an album costs one more. Reads and edits
|
|
123
123
|
(`getMe`, `getFile`, `editMessage*`, `deleteMessage`, `sendChatAction`) do not
|
|
124
124
|
spend the budget.
|
|
125
|
+
- **Two lanes share one rate.** A call is `interactive` by default; a campaign passes
|
|
126
|
+
`{ lane: 'bulk' }` to `run` or `acquire`, or installs
|
|
127
|
+
`telegramBudgetTransformer(budget, { lane: 'bulk' })` on its own `Api`. A waiting
|
|
128
|
+
interactive call is granted first, so a reply never queues behind recipients;
|
|
129
|
+
the wait it can still see is the interval of the grant before it, up to one
|
|
130
|
+
album. Bulk runs at whatever rate replies leave, and the sum never exceeds
|
|
131
|
+
`messagesPerSecond`.
|
|
125
132
|
- **The first send after idle is immediate; the rest are spaced.** This is a
|
|
126
133
|
strict budget, not a bucket that saves a burst: at 24/s the next send is due
|
|
127
134
|
one interval later. A 429 pauses the whole token; when it resumes, one send
|
|
@@ -133,8 +140,8 @@ cast, and a send cancelled in the queue then waits for its slot and fails as
|
|
|
133
140
|
The refusal may be thrown or returned: a client transformer sits below the
|
|
134
141
|
place where grammY turns Telegram's `{ ok: false, error_code: 429, … }` body into
|
|
135
142
|
a `GrammyError`, so `run` reads that body too and hands it back unchanged.
|
|
136
|
-
A 429 from an edit or a read
|
|
137
|
-
|
|
143
|
+
A 429 from an edit or a read concerns that call and pauses nothing; `budget.pauseAfter`
|
|
144
|
+
remains for a caller who decides otherwise. A network failure is rethrown unchanged and stays `unknown`; a 5xx
|
|
138
145
|
is rethrown unchanged and stays `server-error`. Neither is retried by the
|
|
139
146
|
budget or pauses the token — repeating a send whose outcome is unknown is a
|
|
140
147
|
decision, not a primitive's silent guess.
|
|
@@ -608,7 +615,7 @@ injected grammY bot. → ADR 0143, ADR 0201, ADR 0274 — [guide](../guide/teleg
|
|
|
608
615
|
| `TelegramFetch` / `TelegramBotTransportOpen` / `TelegramBotTransportResolve` / `TelegramBotTransportSocket` | _types_ | the `(url, init) => Promise<Response>` the senders take; the transport's socket factory, resolver and the structural socket it needs (a Node `net.Socket` or `tls.TLSSocket` fits) |
|
|
609
616
|
| `TelegramNotDispatchedError` / `TelegramNotDispatchedStage` | class / _type_ | a request that provably never left (`lookup`, `connect` or `request`), so repeating it cannot duplicate a message |
|
|
610
617
|
| `TelegramSendFailureReason` / `TELEGRAM_SEND_FAILURE_REASONS` | _type_ / constant | `blocked-by-user` / `user-deactivated` / `chat-not-found` / `not-started` / `bot-to-bot-disabled` / `rate-limited` / `message-invalid` / `server-error` / `not-dispatched` / `unknown`, and the same as a list; a `Record<TelegramSendFailureReason, …>` over them fails to compile when a reason is added |
|
|
611
|
-
| `telegramOutboundBudget` / `TelegramOutboundBudget` / `TelegramOutboundBudgetConfig` / `TelegramOutboundBudgetStats` | function / _type_ | one token-wide outbound budget: one object per token in the process, strict 24 messages/s by default, weighted albums and multi-message copies, `run(method, payload, signal, send)` as the transformer adapter (a 429 pauses the token whether `send` throws it or resolves with the Bot API's `{ ok: false, … }` body), `pause`/`pauseAfter` for 429, `waitUntilResumed` for non-send retries and `stats`; it paces and never retries, and no public value carries the token |
|
|
618
|
+
| `telegramOutboundBudget` / `TelegramOutboundBudget` / `TelegramOutboundBudgetConfig` / `TelegramOutboundBudgetStats` / `TelegramOutboundCallOptions` / `TelegramOutboundLane` | function / _type_ | one token-wide outbound budget: one object per token in the process, strict 24 messages/s by default, weighted albums and multi-message copies, an `interactive` lane granted before `bulk`, `run(method, payload, signal, send, { lane })` as the transformer adapter (a 429 on a send pauses the token whether `send` throws it or resolves with the Bot API's `{ ok: false, … }` body), `pause`/`pauseAfter` for 429, `waitUntilResumed` for non-send retries and `stats`; it paces and never retries, and no public value carries the token |
|
|
612
619
|
| `runTelegramBroadcast` | function | a resumable broadcast by `name` under a state `directory`: audience and journal durably recorded, pacing at `ratePerSecond` (25), exact retry delays within the finite declared budget, injected classifier, uncertain send outcomes never replayed, `dryRun`, one fenced runner per name |
|
|
613
620
|
| `TelegramBroadcastConfig` / `TelegramBroadcastSend` / `TelegramBroadcastReport` / `TelegramBroadcastRunOutcome` / `TelegramBroadcastOutcome` / `TelegramBroadcastRecipient` | _type_ | `name`, `directory`, `recipients()`, `send({ recipient, attempt })`, `maxAttempts`, `signal`, `onProgress`; counts `delivered` / `unreachable` / `failed` / `uncertain` / `pending` and `finished` / `stopped` / `halted` / `dry-run` |
|
|
614
621
|
| `TelegramBroadcastFailureSchema` / `TelegramBroadcastFailure` | schema / _type_ | injected `classify` answers retry-after/transient/permanent/ambiguous; exact provider delay is bounded by `maxRetryDelayMs` without shortening, unknown outcome remains uncertain and is never replayed |
|