stitchkit 0.136.4 → 0.136.6
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 +14 -0
- package/dist/agent-runtime/providers/openrouter-spend.d.ts +4 -2
- package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +5 -5
- package/dist/entrypoints/agent-executor/claude-sdk.js +7 -7
- package/dist/entrypoints/agent-executor/claude.js +7 -7
- package/dist/entrypoints/agent-executor/codex.js +9 -9
- package/dist/entrypoints/agent-executor/testing.js +9 -9
- package/dist/entrypoints/agent-executor.js +5 -5
- package/dist/entrypoints/agent-runtime/coding-tools.js +2 -2
- package/dist/entrypoints/agent-runtime/postgres.js +4 -4
- package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +5 -5
- package/dist/entrypoints/agent-runtime/sqlite/node.js +5 -5
- package/dist/entrypoints/agent-runtime/testing.js +4 -4
- package/dist/entrypoints/agent-runtime.js +4 -4
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +7 -7
- package/dist/entrypoints/cli/publish.d.ts +14 -6
- package/dist/entrypoints/cli/publish.d.ts.map +1 -1
- package/dist/entrypoints/cli/publish.js +685 -30
- package/dist/entrypoints/cli.js +7 -124
- package/dist/entrypoints/files/packaging.js +2 -2
- package/dist/entrypoints/files.d.ts +1 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +9 -9
- package/dist/entrypoints/node.js +3 -3
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/server.js +6 -6
- package/dist/entrypoints/service-host/macos.js +7 -7
- package/dist/entrypoints/service-host/work.js +6 -6
- package/dist/entrypoints/service-host.js +9 -9
- package/dist/entrypoints/spend.js +85 -15
- package/dist/entrypoints/telegram.js +3 -3
- package/dist/entrypoints/tools.js +1 -1
- package/dist/{index-05b65gj4.js → index-0s75mjh7.js} +1 -1
- package/dist/{index-s2e3h616.js → index-150b1qyw.js} +10 -1
- package/dist/{index-tcv71frn.js → index-1fhbe4e4.js} +1 -1
- package/dist/{index-8cek82ar.js → index-1h0dtfz3.js} +1 -1
- package/dist/{index-jwtmw39p.js → index-2qnqvq11.js} +1 -1
- package/dist/index-2rs7ze0q.js +376 -0
- package/dist/{index-2wm9b9vs.js → index-3cwq5byx.js} +2 -2
- package/dist/{index-mtpcax6d.js → index-5md04mwc.js} +3 -3
- package/dist/{index-b0mh2t9x.js → index-67mzzkdv.js} +3 -3
- package/dist/{index-d5mhgx72.js → index-8tn10tp6.js} +1 -1
- package/dist/{index-0sxj3y45.js → index-afaq0nc4.js} +1 -1
- package/dist/{index-nfm15ej7.js → index-bbpygynk.js} +1 -1
- package/dist/{index-g04hszcm.js → index-chapre0y.js} +1 -1
- package/dist/{index-vh4291qh.js → index-ctaxjpa4.js} +1 -1
- package/dist/{index-x1r7kxzd.js → index-e4zt2x70.js} +3 -3
- package/dist/{index-s0n0nnz5.js → index-f103md2v.js} +122 -3
- package/dist/{index-2c5w2d1d.js → index-gyfsh29t.js} +1 -1
- package/dist/{index-kgkevngs.js → index-kadgaw1s.js} +4 -4
- package/dist/{index-ca1v40d3.js → index-kd48gk7d.js} +1 -1
- package/dist/{index-ke6jtxkd.js → index-mr3njw67.js} +1 -1
- package/dist/{index-cmqvf0dz.js → index-ppy23bd2.js} +1 -1
- package/dist/{index-43k180c2.js → index-rnhp7je8.js} +2 -2
- package/dist/{index-2tgmggcm.js → index-smvmnz5y.js} +1 -1
- package/dist/{index-9m1m92rg.js → index-tjhhsnjv.js} +1 -1
- package/dist/{index-64t6pheq.js → index-w161azza.js} +1 -1
- package/dist/{index-mttkdm5a.js → index-xqppqn97.js} +1 -1
- package/dist/{index-sjq4akrx.js → index-xsrma0jd.js} +2 -2
- package/dist/{index-zqc64g69.js → index-ypm85xwe.js} +1 -1
- package/dist/{index-zagc12j1.js → index-zcq3dby3.js} +1 -1
- package/dist/{index-29v1p1f4.js → index-zhngww7q.js} +1 -1
- package/dist/internal/atomic-file-owner.d.ts +91 -0
- package/dist/internal/atomic-file-owner.d.ts.map +1 -0
- package/dist/internal/atomic-file.d.ts +29 -7
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/bounded-file-read.d.ts +6 -2
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/spend/receipt-merge.d.ts +8 -4
- package/dist/spend/receipt-merge.d.ts.map +1 -1
- package/dist/spend/reconcile.d.ts +15 -2
- package/dist/spend/reconcile.d.ts.map +1 -1
- package/dist/spend/schemas.d.ts +1 -0
- package/dist/spend/schemas.d.ts.map +1 -1
- package/dist/tools/cli/distribution-config.d.ts +56 -0
- package/dist/tools/cli/distribution-config.d.ts.map +1 -0
- package/dist/tools/cli/distribution-routes.d.ts +20 -0
- package/dist/tools/cli/distribution-routes.d.ts.map +1 -0
- package/dist/tools/cli/publication-source.d.ts +77 -0
- package/dist/tools/cli/publication-source.d.ts.map +1 -0
- package/llms/agent-runtime-openrouter.txt +1 -1
- package/llms/cli-publish.txt +15 -3
- package/llms/cli.2.txt +84 -63
- package/llms/cli.3.txt +67 -1
- package/llms/cli.txt +1 -1
- package/llms/files.txt +1 -1
- package/llms/process.txt +24 -4
- package/llms/spend.txt +11 -5
- package/llms/stitchkit.txt +1 -1
- package/llms-full.txt +136 -15
- package/llms.txt +7 -7
- package/package.json +1 -1
- package/dist/index-pp97q86a.js +0 -221
- package/dist/{index-5c4m8zdf.js → index-tjakdpf2.js} +45 -45
package/dist/entrypoints/cli.js
CHANGED
|
@@ -33,6 +33,7 @@ import"../index-6kec3b14.js";
|
|
|
33
33
|
import"../index-gy9x38a2.js";
|
|
34
34
|
import"../index-yrhw10ef.js";
|
|
35
35
|
import {
|
|
36
|
+
renderCliInstaller2,
|
|
36
37
|
CliBuildSignatureSchema2,
|
|
37
38
|
cliManifestSigningPayload2,
|
|
38
39
|
signCliManifest2,
|
|
@@ -50,14 +51,14 @@ import {
|
|
|
50
51
|
checkCliUpdate2,
|
|
51
52
|
applyCliUpdate2,
|
|
52
53
|
rollbackCliUpdate2
|
|
53
|
-
} from "../index-
|
|
54
|
+
} from "../index-f103md2v.js";
|
|
54
55
|
import"../index-673drwkn.js";
|
|
55
|
-
import"../index-
|
|
56
|
-
import"../index-
|
|
57
|
-
import"../index-
|
|
56
|
+
import"../index-2qnqvq11.js";
|
|
57
|
+
import"../index-zhngww7q.js";
|
|
58
|
+
import"../index-rnhp7je8.js";
|
|
58
59
|
import {
|
|
59
60
|
writeFileAtomicSync2
|
|
60
|
-
} from "../index-
|
|
61
|
+
} from "../index-2rs7ze0q.js";
|
|
61
62
|
import"../index-rjs94dny.js";
|
|
62
63
|
import"../index-xrgn784x.js";
|
|
63
64
|
import {
|
|
@@ -167,124 +168,6 @@ function writeCliCheckpoint(path, checkpoint) {
|
|
|
167
168
|
mode: 384
|
|
168
169
|
});
|
|
169
170
|
}
|
|
170
|
-
// src/tools/cli/installer.ts
|
|
171
|
-
function shellQuote(value) {
|
|
172
|
-
return `'${value.replaceAll("'", `'"'"'`)}'`;
|
|
173
|
-
}
|
|
174
|
-
function renderCliInstaller(config) {
|
|
175
|
-
const binary = config.binaryName ?? config.manifest.name;
|
|
176
|
-
const installDir = config.installDir ?? "$HOME/.local/bin";
|
|
177
|
-
const assets = config.asset ? [config.asset] : config.manifest.assets;
|
|
178
|
-
if (assets.length === 0) {
|
|
179
|
-
throw new Error("[stitchkit] a build manifest with no assets installs nothing");
|
|
180
|
-
}
|
|
181
|
-
const selection = assets.length === 1 && assets[0] !== undefined ? singleTarget(assets[0]) : unameDispatch(assets);
|
|
182
|
-
return `#!/bin/sh
|
|
183
|
-
# ${binary} ${config.manifest.version} (${config.manifest.commit})
|
|
184
|
-
# Generated from the build manifest — it parses no JSON and needs no jq.
|
|
185
|
-
set -eu
|
|
186
|
-
|
|
187
|
-
binary=${shellQuote(binary)}
|
|
188
|
-
dir="\${INSTALL_DIR:-${installDir}}"
|
|
189
|
-
|
|
190
|
-
${selection}
|
|
191
|
-
|
|
192
|
-
fetch() {
|
|
193
|
-
if command -v curl >/dev/null 2>&1; then
|
|
194
|
-
curl -fsSL "$1" -o "$2"
|
|
195
|
-
elif command -v wget >/dev/null 2>&1; then
|
|
196
|
-
wget -q "$1" -O "$2"
|
|
197
|
-
else
|
|
198
|
-
echo "need curl or wget" >&2
|
|
199
|
-
exit 1
|
|
200
|
-
fi
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
digest() {
|
|
204
|
-
if command -v sha256sum >/dev/null 2>&1; then
|
|
205
|
-
sha256sum "$1" | cut -d' ' -f1
|
|
206
|
-
elif command -v shasum >/dev/null 2>&1; then
|
|
207
|
-
shasum -a 256 "$1" | cut -d' ' -f1
|
|
208
|
-
elif command -v openssl >/dev/null 2>&1; then
|
|
209
|
-
openssl dgst -sha256 "$1" | awk '{print $NF}'
|
|
210
|
-
else
|
|
211
|
-
echo "need sha256sum, shasum or openssl" >&2
|
|
212
|
-
exit 1
|
|
213
|
-
fi
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
tmp="$(mktemp -d)"
|
|
217
|
-
trap 'rm -rf "$tmp"' EXIT
|
|
218
|
-
|
|
219
|
-
fetch "$url" "$tmp/download"
|
|
220
|
-
if [ "$compression" = "gzip" ]; then
|
|
221
|
-
gzip -dc "$tmp/download" > "$tmp/binary"
|
|
222
|
-
else
|
|
223
|
-
mv "$tmp/download" "$tmp/binary"
|
|
224
|
-
fi
|
|
225
|
-
|
|
226
|
-
actual="$(digest "$tmp/binary")"
|
|
227
|
-
if [ "$actual" != "$sha256" ]; then
|
|
228
|
-
echo "checksum mismatch: expected $sha256, got $actual" >&2
|
|
229
|
-
exit 1
|
|
230
|
-
fi
|
|
231
|
-
|
|
232
|
-
actual_size="$(wc -c < "$tmp/binary" | tr -d ' ')"
|
|
233
|
-
if [ "$actual_size" != "$size" ]; then
|
|
234
|
-
echo "size mismatch: expected $size bytes, got $actual_size" >&2
|
|
235
|
-
exit 1
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
mkdir -p "$dir"
|
|
239
|
-
chmod 755 "$tmp/binary"
|
|
240
|
-
# A rename, never a write over the file in place: anything else can leave a
|
|
241
|
-
# half-written executable where a working one used to be.
|
|
242
|
-
mv "$tmp/binary" "$dir/$binary"
|
|
243
|
-
|
|
244
|
-
echo "installed $binary ${config.manifest.version} to $dir/$binary"
|
|
245
|
-
case ":$PATH:" in
|
|
246
|
-
*":$dir:"*) ;;
|
|
247
|
-
*) echo "note: $dir is not on your PATH" >&2 ;;
|
|
248
|
-
esac
|
|
249
|
-
`;
|
|
250
|
-
}
|
|
251
|
-
function singleTarget(asset) {
|
|
252
|
-
return [
|
|
253
|
-
`url=${shellQuote(asset.url)}`,
|
|
254
|
-
`sha256=${shellQuote(asset.sha256)}`,
|
|
255
|
-
`size=${shellQuote(String(asset.size))}`,
|
|
256
|
-
`compression=${shellQuote(asset.compression)}`
|
|
257
|
-
].join(`
|
|
258
|
-
`);
|
|
259
|
-
}
|
|
260
|
-
function unameDispatch(assets) {
|
|
261
|
-
const cases = assets.map((asset) => ` ${asset.platform}/${asset.arch})
|
|
262
|
-
url=${shellQuote(asset.url)}
|
|
263
|
-
sha256=${shellQuote(asset.sha256)}
|
|
264
|
-
size=${shellQuote(String(asset.size))}
|
|
265
|
-
compression=${shellQuote(asset.compression)}
|
|
266
|
-
;;`).join(`
|
|
267
|
-
`);
|
|
268
|
-
const published = assets.map((asset) => `${asset.platform}/${asset.arch}`).join(", ");
|
|
269
|
-
return `case "$(uname -s)" in
|
|
270
|
-
Darwin) platform=darwin ;;
|
|
271
|
-
Linux) platform=linux ;;
|
|
272
|
-
*) platform="$(uname -s)" ;;
|
|
273
|
-
esac
|
|
274
|
-
case "$(uname -m)" in
|
|
275
|
-
x86_64|amd64) arch=x64 ;;
|
|
276
|
-
aarch64|arm64) arch=arm64 ;;
|
|
277
|
-
*) arch="$(uname -m)" ;;
|
|
278
|
-
esac
|
|
279
|
-
|
|
280
|
-
case "$platform/$arch" in
|
|
281
|
-
${cases}
|
|
282
|
-
*)
|
|
283
|
-
echo "no published build for $platform/$arch — published: ${published}" >&2
|
|
284
|
-
exit 1
|
|
285
|
-
;;
|
|
286
|
-
esac`;
|
|
287
|
-
}
|
|
288
171
|
// src/tools/cli/profile.ts
|
|
289
172
|
import {
|
|
290
173
|
chmodSync,
|
|
@@ -563,7 +446,7 @@ export {
|
|
|
563
446
|
parseCliArgs2 as parseCliArgs,
|
|
564
447
|
pollUntilDone2 as pollUntilDone,
|
|
565
448
|
readCliCheckpoint,
|
|
566
|
-
renderCliInstaller,
|
|
449
|
+
renderCliInstaller2 as renderCliInstaller,
|
|
567
450
|
renderCliView2 as renderCliView,
|
|
568
451
|
rollbackCliUpdate2 as rollbackCliUpdate,
|
|
569
452
|
routeCliArgv,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import"../../index-tgehj4bp.js";
|
|
2
|
-
import"../../index-
|
|
2
|
+
import"../../index-tjakdpf2.js";
|
|
3
3
|
import {
|
|
4
4
|
NATIVE_NOT_PACKAGED
|
|
5
5
|
} from "../../index-6kec3b14.js";
|
|
6
6
|
import {
|
|
7
7
|
runNativeCommand2
|
|
8
|
-
} from "../../index-
|
|
8
|
+
} from "../../index-afaq0nc4.js";
|
|
9
9
|
import {
|
|
10
10
|
safeJsonParse
|
|
11
11
|
} from "../../index-zsarb5xp.js";
|
|
@@ -7,6 +7,7 @@ export { type JsonFileReading, readJsonOnce } from '../files/json-file-reading.j
|
|
|
7
7
|
export { MAX_POLLED_JSON_CACHE_BYTES, MAX_POLLED_JSON_PATHS, type PolledJsonChange, type PolledJsonEntry, PolledJsonFile, PolledJsonFiles, type PolledJsonOptions, } from '../files/polled-json.js';
|
|
8
8
|
export { DEFAULT_JSON_FILE_BYTES, fileIdentity, type JsonValueRefusal, type JsonValueSchema, parseJsonBytes, type RegularFileAccept, type RegularFileAsyncReadOptions, RegularFileError, type RegularFileReadOptions, type RegularFileRefusal, readJsonFileSync, readRegularFile, readRegularFileSync, } from '../files/regular-file.js';
|
|
9
9
|
export { type WriteFileAtomicOptions, writeFileAtomic, writeFileAtomicSync, } from '../internal/atomic-file.js';
|
|
10
|
+
export type { WriteFileAtomicOwner } from '../internal/atomic-file-owner.js';
|
|
10
11
|
export { AtomicFilePublicationError } from '../internal/atomic-publication.js';
|
|
11
12
|
export { isAtomicStagingName, type SweepAtomicStagingOptions, sweepAtomicStaging, } from '../internal/atomic-staging.js';
|
|
12
13
|
export type { FileIdentityStats, FileStatsView } from '../internal/file-observation.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/entrypoints/files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,cAAc,EACnB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,cAAc,EACd,eAAe,EACf,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,sBAAsB,EAC3B,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EACL,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/entrypoints/files.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,qBAAqB,EACrB,KAAK,cAAc,EACnB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,EACvB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,cAAc,EACd,eAAe,EACf,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,sBAAsB,EAC3B,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EACL,KAAK,aAAa,EAClB,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC"}
|
|
@@ -10,36 +10,36 @@ import {
|
|
|
10
10
|
readRegularFile2,
|
|
11
11
|
parseJsonBytes2,
|
|
12
12
|
readJsonFileSync2
|
|
13
|
-
} from "../index-
|
|
13
|
+
} from "../index-ctaxjpa4.js";
|
|
14
14
|
import"../index-6kec3b14.js";
|
|
15
15
|
import"../index-673drwkn.js";
|
|
16
|
-
import"../index-
|
|
16
|
+
import"../index-2qnqvq11.js";
|
|
17
17
|
import {
|
|
18
18
|
readJsonOnce2,
|
|
19
19
|
MAX_POLLED_JSON_CACHE_BYTES2,
|
|
20
20
|
MAX_POLLED_JSON_PATHS2,
|
|
21
21
|
PolledJsonFiles2,
|
|
22
22
|
PolledJsonFile2
|
|
23
|
-
} from "../index-
|
|
23
|
+
} from "../index-bbpygynk.js";
|
|
24
24
|
import {
|
|
25
25
|
bindUnixSocket2
|
|
26
|
-
} from "../index-
|
|
26
|
+
} from "../index-kd48gk7d.js";
|
|
27
27
|
import {
|
|
28
28
|
ManagedFileError2,
|
|
29
29
|
createManagedFileBoundary2
|
|
30
|
-
} from "../index-
|
|
30
|
+
} from "../index-e4zt2x70.js";
|
|
31
31
|
import {
|
|
32
32
|
ExclusiveLockError2,
|
|
33
33
|
withExclusiveLock2
|
|
34
|
-
} from "../index-
|
|
35
|
-
import"../index-
|
|
34
|
+
} from "../index-zhngww7q.js";
|
|
35
|
+
import"../index-rnhp7je8.js";
|
|
36
36
|
import {
|
|
37
37
|
writeFileAtomic2,
|
|
38
38
|
writeFileAtomicSync2
|
|
39
|
-
} from "../index-
|
|
39
|
+
} from "../index-2rs7ze0q.js";
|
|
40
40
|
import {
|
|
41
41
|
AtomicFilePublicationError2
|
|
42
|
-
} from "../index-
|
|
42
|
+
} from "../index-gyfsh29t.js";
|
|
43
43
|
import {
|
|
44
44
|
isAtomicStagingName2,
|
|
45
45
|
sweepAtomicStaging2
|
package/dist/entrypoints/node.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
defineRequestIngress2,
|
|
12
12
|
createSocketIOServer2,
|
|
13
13
|
createUnixClientTransport2
|
|
14
|
-
} from "../index-
|
|
14
|
+
} from "../index-ppy23bd2.js";
|
|
15
15
|
import {
|
|
16
16
|
ShutdownStateSchema2,
|
|
17
17
|
ShutdownOptionsSchema2,
|
|
@@ -23,13 +23,13 @@ import"../index-0k1ba0ss.js";
|
|
|
23
23
|
import"../index-4s0fep5q.js";
|
|
24
24
|
import"../index-6kec3b14.js";
|
|
25
25
|
import"../index-673drwkn.js";
|
|
26
|
-
import"../index-
|
|
26
|
+
import"../index-2qnqvq11.js";
|
|
27
27
|
import"../index-werjqesf.js";
|
|
28
28
|
import"../index-dmrx8xma.js";
|
|
29
29
|
import"../index-w7e402wx.js";
|
|
30
30
|
import"../index-xqhede6x.js";
|
|
31
31
|
import"../index-gvgtmt7a.js";
|
|
32
|
-
import"../index-
|
|
32
|
+
import"../index-kd48gk7d.js";
|
|
33
33
|
import {
|
|
34
34
|
bindRealtimeServer2
|
|
35
35
|
} from "../index-y68gavb5.js";
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
NativeCommandError2
|
|
9
9
|
} from "../index-tgehj4bp.js";
|
|
10
|
-
import"../index-
|
|
10
|
+
import"../index-tjakdpf2.js";
|
|
11
11
|
import {
|
|
12
12
|
ContractStreamErrorSchema
|
|
13
13
|
} from "../index-yrhw10ef.js";
|
|
14
14
|
import {
|
|
15
15
|
streamNativeCommand2
|
|
16
|
-
} from "../index-
|
|
16
|
+
} from "../index-1h0dtfz3.js";
|
|
17
17
|
import {
|
|
18
18
|
runNativeCommand2
|
|
19
|
-
} from "../index-
|
|
19
|
+
} from "../index-afaq0nc4.js";
|
|
20
20
|
import {
|
|
21
21
|
normalizeError2
|
|
22
22
|
} from "../index-dwq6a6sq.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import"../index-6kec3b14.js";
|
|
2
2
|
import"../index-673drwkn.js";
|
|
3
|
-
import"../index-
|
|
3
|
+
import"../index-2qnqvq11.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_CONTRACT_STREAM_FRAME_BYTES2
|
|
6
6
|
} from "../index-yrhw10ef.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
createSocketIOServer2,
|
|
50
50
|
socketIoLane2,
|
|
51
51
|
createUnixClientTransport2
|
|
52
|
-
} from "../index-
|
|
52
|
+
} from "../index-ppy23bd2.js";
|
|
53
53
|
import"../index-ha1tv70k.js";
|
|
54
54
|
import {
|
|
55
55
|
toJsonSchema,
|
|
@@ -59,7 +59,7 @@ import"../index-w7e402wx.js";
|
|
|
59
59
|
import"../index-xqhede6x.js";
|
|
60
60
|
import {
|
|
61
61
|
createFileStateStore2
|
|
62
|
-
} from "../index-
|
|
62
|
+
} from "../index-kadgaw1s.js";
|
|
63
63
|
import {
|
|
64
64
|
withUnixSocketLockSync,
|
|
65
65
|
assertUnixSocketMode,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
assertPrivateUnixSocketDirectory,
|
|
70
70
|
publishStagedUnixSocket,
|
|
71
71
|
bindUnixSocket2
|
|
72
|
-
} from "../index-
|
|
72
|
+
} from "../index-kd48gk7d.js";
|
|
73
73
|
import {
|
|
74
74
|
bindRealtimeServer2
|
|
75
75
|
} from "../index-y68gavb5.js";
|
|
@@ -113,8 +113,8 @@ import"../index-4gbybjg6.js";
|
|
|
113
113
|
import {
|
|
114
114
|
jsonResponse
|
|
115
115
|
} from "../index-kyejf658.js";
|
|
116
|
-
import"../index-
|
|
117
|
-
import"../index-
|
|
116
|
+
import"../index-zhngww7q.js";
|
|
117
|
+
import"../index-rnhp7je8.js";
|
|
118
118
|
import {
|
|
119
119
|
generateTraceId2,
|
|
120
120
|
resolveTraceId2,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readRegularFile2
|
|
3
|
-
} from "../../index-
|
|
3
|
+
} from "../../index-ctaxjpa4.js";
|
|
4
4
|
import {
|
|
5
5
|
requireDarwinServiceHostMethod,
|
|
6
6
|
loadDarwinBinding
|
|
7
7
|
} from "../../index-6kec3b14.js";
|
|
8
8
|
import {
|
|
9
9
|
computeSha256Hex
|
|
10
|
-
} from "../../index-
|
|
10
|
+
} from "../../index-67mzzkdv.js";
|
|
11
11
|
import {
|
|
12
12
|
NativeCommandError2
|
|
13
13
|
} from "../../index-tgehj4bp.js";
|
|
14
|
-
import"../../index-
|
|
14
|
+
import"../../index-tjakdpf2.js";
|
|
15
15
|
import {
|
|
16
16
|
isProcessGoneError,
|
|
17
17
|
renderPlistStringElement,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
createDefaultLaunchdHostAdapter2,
|
|
22
22
|
lintLaunchdPlist2,
|
|
23
23
|
readLaunchdPlist2
|
|
24
|
-
} from "../../index-
|
|
24
|
+
} from "../../index-mr3njw67.js";
|
|
25
25
|
import {
|
|
26
26
|
sameProcessInstance,
|
|
27
27
|
observeProcessInstance2
|
|
@@ -41,11 +41,11 @@ import {
|
|
|
41
41
|
isPathWithinDirectory2,
|
|
42
42
|
isProtectedMacosSystemPath,
|
|
43
43
|
isMacosForbiddenBuildRoot
|
|
44
|
-
} from "../../index-
|
|
45
|
-
import"../../index-
|
|
44
|
+
} from "../../index-chapre0y.js";
|
|
45
|
+
import"../../index-afaq0nc4.js";
|
|
46
46
|
import {
|
|
47
47
|
writeFileAtomic2
|
|
48
|
-
} from "../../index-
|
|
48
|
+
} from "../../index-2rs7ze0q.js";
|
|
49
49
|
import {
|
|
50
50
|
messageOf
|
|
51
51
|
} from "../../index-r9kq5ark.js";
|
|
@@ -12,23 +12,23 @@ import {
|
|
|
12
12
|
import"../../index-tgehj4bp.js";
|
|
13
13
|
import {
|
|
14
14
|
startNativeCommand
|
|
15
|
-
} from "../../index-
|
|
16
|
-
import"../../index-
|
|
15
|
+
} from "../../index-tjakdpf2.js";
|
|
16
|
+
import"../../index-ctaxjpa4.js";
|
|
17
17
|
import {
|
|
18
18
|
SystemdScopeSchema2,
|
|
19
19
|
SYSTEMCTL_PATH,
|
|
20
20
|
systemdScopeArgs
|
|
21
|
-
} from "../../index-
|
|
21
|
+
} from "../../index-0s75mjh7.js";
|
|
22
22
|
import {
|
|
23
23
|
hostCommandEnv
|
|
24
|
-
} from "../../index-
|
|
24
|
+
} from "../../index-67mzzkdv.js";
|
|
25
25
|
import {
|
|
26
26
|
PS_PATH2,
|
|
27
27
|
createDefaultMacosCommandRunner2
|
|
28
|
-
} from "../../index-
|
|
28
|
+
} from "../../index-chapre0y.js";
|
|
29
29
|
import {
|
|
30
30
|
runNativeCommand2
|
|
31
|
-
} from "../../index-
|
|
31
|
+
} from "../../index-afaq0nc4.js";
|
|
32
32
|
import {
|
|
33
33
|
errnoOf
|
|
34
34
|
} from "../../index-jj9228tt.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
fileIdentity2,
|
|
5
5
|
readRegularFileSync2,
|
|
6
6
|
parseJsonBytes2
|
|
7
|
-
} from "../index-
|
|
7
|
+
} from "../index-ctaxjpa4.js";
|
|
8
8
|
import {
|
|
9
9
|
ARTIFACT_MANIFEST_FILENAME2,
|
|
10
10
|
DEFAULT_ARTIFACT_MAX_FILE_BYTES2,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
computeSha256Hex,
|
|
18
18
|
computeArtifactManifestDigest2,
|
|
19
19
|
sameHostPath
|
|
20
|
-
} from "../index-
|
|
20
|
+
} from "../index-67mzzkdv.js";
|
|
21
21
|
import"../index-6kec3b14.js";
|
|
22
22
|
import {
|
|
23
23
|
probeLiveness,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
probeProcessOwnerWith
|
|
30
30
|
} from "../index-673drwkn.js";
|
|
31
31
|
import"../index-tgehj4bp.js";
|
|
32
|
-
import"../index-
|
|
32
|
+
import"../index-tjakdpf2.js";
|
|
33
33
|
import {
|
|
34
34
|
isProcessGoneError,
|
|
35
35
|
classifyOwnerEvidence,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
assertAbsolutePlistPath,
|
|
47
47
|
lintLaunchdPlist2,
|
|
48
48
|
readLaunchdPlist2
|
|
49
|
-
} from "../index-
|
|
49
|
+
} from "../index-mr3njw67.js";
|
|
50
50
|
import {
|
|
51
51
|
SystemdScopeSchema2,
|
|
52
52
|
SystemdUnitError2,
|
|
@@ -77,23 +77,23 @@ import {
|
|
|
77
77
|
checkSystemdUnit2,
|
|
78
78
|
systemdUnitActive2,
|
|
79
79
|
systemdMainPid2
|
|
80
|
-
} from "../index-
|
|
80
|
+
} from "../index-0s75mjh7.js";
|
|
81
81
|
import {
|
|
82
82
|
PolledJsonFile2
|
|
83
|
-
} from "../index-
|
|
83
|
+
} from "../index-bbpygynk.js";
|
|
84
84
|
import {
|
|
85
85
|
runNativeCommand2
|
|
86
|
-
} from "../index-
|
|
86
|
+
} from "../index-afaq0nc4.js";
|
|
87
87
|
import {
|
|
88
88
|
isWithinDir2,
|
|
89
89
|
realPathWithinDir
|
|
90
90
|
} from "../index-5cc6r990.js";
|
|
91
91
|
import {
|
|
92
92
|
syncDirectory
|
|
93
|
-
} from "../index-
|
|
93
|
+
} from "../index-gyfsh29t.js";
|
|
94
94
|
import {
|
|
95
95
|
closeAfterSync
|
|
96
|
-
} from "../index-
|
|
96
|
+
} from "../index-150b1qyw.js";
|
|
97
97
|
import {
|
|
98
98
|
stagingName
|
|
99
99
|
} from "../index-psye60qn.js";
|
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SpoolUnspooledError,
|
|
6
6
|
createSpoolCore
|
|
7
|
-
} from "../index-
|
|
7
|
+
} from "../index-xqppqn97.js";
|
|
8
|
+
import {
|
|
9
|
+
assertPositiveSafeInteger
|
|
10
|
+
} from "../index-gr0kxymw.js";
|
|
8
11
|
import {
|
|
9
12
|
isRecord,
|
|
10
13
|
withoutUndefined
|
|
@@ -18,7 +21,7 @@ import { z } from "zod";
|
|
|
18
21
|
var Id = z.string().min(1).max(256);
|
|
19
22
|
var Label = z.string().min(1).max(512);
|
|
20
23
|
var Count = z.int().nonnegative();
|
|
21
|
-
var
|
|
24
|
+
var SpendTimestampSchema = z.iso.datetime({ offset: true });
|
|
22
25
|
var SpendAttributionSchema = z.strictObject({
|
|
23
26
|
scope: Label.optional(),
|
|
24
27
|
purpose: Label,
|
|
@@ -71,7 +74,7 @@ var SpendFactsSchema = z.strictObject({
|
|
|
71
74
|
var SpendAttemptSchema = z.strictObject({
|
|
72
75
|
attemptId: Id,
|
|
73
76
|
gateway: Label,
|
|
74
|
-
startedAt:
|
|
77
|
+
startedAt: SpendTimestampSchema,
|
|
75
78
|
attribution: SpendAttributionSchema,
|
|
76
79
|
request: z.strictObject({
|
|
77
80
|
method: z.string().min(1).max(16),
|
|
@@ -83,7 +86,7 @@ var SpendReceiptRankSchema = z.union([z.literal(1), z.literal(2), z.literal(3)])
|
|
|
83
86
|
var SpendReceiptSchema = z.strictObject({
|
|
84
87
|
attemptId: Id,
|
|
85
88
|
rank: SpendReceiptRankSchema,
|
|
86
|
-
at:
|
|
89
|
+
at: SpendTimestampSchema,
|
|
87
90
|
outcome: SpendOutcomeSchema,
|
|
88
91
|
facts: SpendFactsSchema
|
|
89
92
|
});
|
|
@@ -431,6 +434,10 @@ function createSpendGateway(config) {
|
|
|
431
434
|
}
|
|
432
435
|
// src/spend/receipt-merge.ts
|
|
433
436
|
var isFactual = (status) => status === "reported" || status === "free";
|
|
437
|
+
var RECONCILER_FAILURE_FIELDS = new Set(["failureCode", "failureMessage"]);
|
|
438
|
+
function pickFacts(facts, options) {
|
|
439
|
+
return Object.fromEntries(Object.entries(facts).filter(([key, value]) => value !== undefined && (!options.dropReconcilerFailure || !RECONCILER_FAILURE_FIELDS.has(key))));
|
|
440
|
+
}
|
|
434
441
|
function costOf(facts) {
|
|
435
442
|
return {
|
|
436
443
|
costStatus: facts.costStatus,
|
|
@@ -453,10 +460,23 @@ function mergeSpendReceipt(previous, next) {
|
|
|
453
460
|
return known;
|
|
454
461
|
if (known.outcome === "orphaned")
|
|
455
462
|
return incoming;
|
|
456
|
-
const
|
|
463
|
+
const incomingAt = Date.parse(incoming.at);
|
|
464
|
+
const knownAt = Date.parse(known.at);
|
|
465
|
+
const newerWins = incoming.rank > known.rank || incoming.rank === known.rank && (incomingAt > knownAt || incomingAt === knownAt && (!isFactual(known.facts.costStatus) || isFactual(incoming.facts.costStatus)));
|
|
457
466
|
const [older, newer] = newerWins ? [known, incoming] : [incoming, known];
|
|
458
|
-
const
|
|
459
|
-
const
|
|
467
|
+
const olderFactual = isFactual(older.facts.costStatus);
|
|
468
|
+
const newerFactual = isFactual(newer.facts.costStatus);
|
|
469
|
+
const baseFacts = pickFacts(older.facts, {
|
|
470
|
+
dropReconcilerFailure: older.rank === 3 && !olderFactual && newerFactual
|
|
471
|
+
});
|
|
472
|
+
const newerFacts = pickFacts(newer.facts, {
|
|
473
|
+
dropReconcilerFailure: newer.rank === 3 && olderFactual && !newerFactual
|
|
474
|
+
});
|
|
475
|
+
const facts = {
|
|
476
|
+
...baseFacts,
|
|
477
|
+
...newerFacts,
|
|
478
|
+
costStatus: newer.facts.costStatus
|
|
479
|
+
};
|
|
460
480
|
const outcome = newer.outcome === "pending" && older.outcome !== "pending" ? older.outcome : newer.outcome;
|
|
461
481
|
const cost = mergedCost(older.facts, newer.facts);
|
|
462
482
|
const { costUsd: _dropped, ...withoutCost } = facts;
|
|
@@ -509,10 +529,47 @@ function createSpooledSpendStore(config) {
|
|
|
509
529
|
};
|
|
510
530
|
}
|
|
511
531
|
// src/spend/reconcile.ts
|
|
532
|
+
function readCheckedAt(now) {
|
|
533
|
+
const value = now();
|
|
534
|
+
if (!isRecord(value)) {
|
|
535
|
+
throw new TypeError(`reconcilePendingSpend now() must return a Date, received ${String(value)}`);
|
|
536
|
+
}
|
|
537
|
+
const getTime = Reflect.get(value, "getTime");
|
|
538
|
+
const toISOString = Reflect.get(value, "toISOString");
|
|
539
|
+
if (typeof getTime !== "function" || typeof toISOString !== "function") {
|
|
540
|
+
throw new TypeError(`reconcilePendingSpend now() must return a Date, received ${String(value)}`);
|
|
541
|
+
}
|
|
542
|
+
const epoch = Reflect.apply(getTime, value, []);
|
|
543
|
+
if (typeof epoch !== "number" || !Number.isFinite(epoch)) {
|
|
544
|
+
throw new RangeError("reconcilePendingSpend now() returned an invalid Date");
|
|
545
|
+
}
|
|
546
|
+
const iso = Reflect.apply(toISOString, value, []);
|
|
547
|
+
if (typeof iso !== "string") {
|
|
548
|
+
throw new TypeError("reconcilePendingSpend now() must return a Date");
|
|
549
|
+
}
|
|
550
|
+
const parsedIso = SpendTimestampSchema.safeParse(iso);
|
|
551
|
+
if (!parsedIso.success || Date.parse(parsedIso.data) !== epoch) {
|
|
552
|
+
throw new RangeError("reconcilePendingSpend now() returned an invalid Date");
|
|
553
|
+
}
|
|
554
|
+
return { epoch, iso: parsedIso.data };
|
|
555
|
+
}
|
|
556
|
+
function parsePendingSinceEpoch(record) {
|
|
557
|
+
const since = record.receipt?.at ?? record.attempt.startedAt;
|
|
558
|
+
const parsed = SpendTimestampSchema.safeParse(since);
|
|
559
|
+
if (!parsed.success) {
|
|
560
|
+
throw new TypeError(`Spend record "${record.attempt.attemptId}" has an invalid timestamp: ${String(since)}`);
|
|
561
|
+
}
|
|
562
|
+
const sinceEpoch = Date.parse(parsed.data);
|
|
563
|
+
if (!Number.isFinite(sinceEpoch)) {
|
|
564
|
+
throw new TypeError(`Spend record "${record.attempt.attemptId}" has an unparseable timestamp: ${parsed.data}`);
|
|
565
|
+
}
|
|
566
|
+
return sinceEpoch;
|
|
567
|
+
}
|
|
512
568
|
async function reconcilePendingSpend(options) {
|
|
513
|
-
const { store } = options;
|
|
569
|
+
const { store, maxPendingAgeMs } = options;
|
|
514
570
|
if (!store.pendingCosts)
|
|
515
571
|
throw new TypeError("reconcilePendingSpend needs a store with pendingCosts");
|
|
572
|
+
assertPositiveSafeInteger("maxPendingAgeMs", maxPendingAgeMs);
|
|
516
573
|
const now = options.now ?? (() => new Date);
|
|
517
574
|
const result = {
|
|
518
575
|
checked: 0,
|
|
@@ -527,22 +584,35 @@ async function reconcilePendingSpend(options) {
|
|
|
527
584
|
result.stillPending += 1;
|
|
528
585
|
continue;
|
|
529
586
|
}
|
|
587
|
+
let learned;
|
|
588
|
+
try {
|
|
589
|
+
learned = await reconcile(record);
|
|
590
|
+
if (learned !== undefined && !isRecord(learned)) {
|
|
591
|
+
throw new TypeError("Spend reconciler must return a facts object or undefined");
|
|
592
|
+
}
|
|
593
|
+
} catch (error) {
|
|
594
|
+
result.failed += 1;
|
|
595
|
+
options.onError?.({ record, error });
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
if (learned === undefined && maxPendingAgeMs === undefined) {
|
|
599
|
+
result.stillPending += 1;
|
|
600
|
+
continue;
|
|
601
|
+
}
|
|
602
|
+
const checkedAt = readCheckedAt(now);
|
|
530
603
|
let receipt;
|
|
531
604
|
try {
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
605
|
+
const facts = learned ?? (maxPendingAgeMs !== undefined && checkedAt.epoch - parsePendingSinceEpoch(record) >= maxPendingAgeMs ? { costStatus: "unknown", failureCode: "price-never-reported" } : undefined);
|
|
606
|
+
if (facts === undefined) {
|
|
534
607
|
result.stillPending += 1;
|
|
535
608
|
continue;
|
|
536
609
|
}
|
|
537
|
-
if (!isRecord(learned)) {
|
|
538
|
-
throw new TypeError("Spend reconciler must return a facts object or undefined");
|
|
539
|
-
}
|
|
540
610
|
receipt = mergeSpendReceipt(record.receipt, {
|
|
541
611
|
attemptId: record.attempt.attemptId,
|
|
542
612
|
rank: 3,
|
|
543
|
-
at:
|
|
613
|
+
at: checkedAt.iso,
|
|
544
614
|
outcome: record.receipt?.outcome ?? "pending",
|
|
545
|
-
facts: SpendFactsSchema.parse({ costStatus: "unknown", ...withoutUndefined(
|
|
615
|
+
facts: SpendFactsSchema.parse({ costStatus: "unknown", ...withoutUndefined(facts) })
|
|
546
616
|
});
|
|
547
617
|
} catch (error) {
|
|
548
618
|
result.failed += 1;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../index-q46b16xz.js";
|
|
4
4
|
import"../index-6kec3b14.js";
|
|
5
5
|
import"../index-673drwkn.js";
|
|
6
|
-
import"../index-
|
|
6
|
+
import"../index-2qnqvq11.js";
|
|
7
7
|
import {
|
|
8
8
|
TELEGRAM_WIDGET_LIMITS2,
|
|
9
9
|
TelegramWidgetHtmlSchema2,
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
} from "../index-apv5xfef.js";
|
|
35
35
|
import {
|
|
36
36
|
attemptExclusiveLock
|
|
37
|
-
} from "../index-
|
|
37
|
+
} from "../index-rnhp7je8.js";
|
|
38
38
|
import {
|
|
39
39
|
writeFileAtomic2
|
|
40
|
-
} from "../index-
|
|
40
|
+
} from "../index-2rs7ze0q.js";
|
|
41
41
|
import {
|
|
42
42
|
BOT_TOKEN_SECRET
|
|
43
43
|
} from "../index-xrbrvn15.js";
|