@cortexkit/opencode-antigravity-auth 3.0.12 → 3.0.13
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/dist/cli.js +2846 -1007
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +435 -127
- package/dist/index.js +3312 -1268
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +472 -160
- package/dist/server.js +12703 -10471
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/cli.d.ts +15 -0
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +27 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
- package/dist/src/common-auth-embedded/claustrum/consumer.js +320 -35
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/dist/src/common-auth-embedded/claustrum/custody.js +95 -11
- package/dist/src/common-auth-embedded/claustrum/enrollment.js +37 -12
- package/dist/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/dist/src/common-auth-embedded/claustrum/hub.js +988 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/dist/src/common-auth-embedded/claustrum/index.js +37 -4
- package/dist/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/dist/src/common-auth-embedded/claustrum/quota-writer.js +34 -12
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
- package/dist/src/common-auth-embedded/claustrum/roster.js +187 -12
- package/dist/src/common-auth-embedded/claustrum/shutdown.js +42 -0
- package/dist/src/common-auth-embedded/fs/file-read-cache.js +57 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/dist/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/dist/src/common-auth-embedded/opencode2/index.js +1 -1
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +7 -5
- package/dist/src/common-auth-embedded/opencode2/install.js +139 -13
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +42 -10
- package/dist/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/dist/src/common-auth-embedded/quota/commit-interval.js +18 -0
- package/dist/src/common-auth-embedded/rpc/rpc-server.js +29 -19
- package/dist/src/common-auth-embedded/setup/command.js +52 -14
- package/dist/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/dist/src/common-auth-embedded/setup/register.js +90 -11
- package/dist/src/common-auth-embedded/source-output.json +145 -97
- package/dist/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/dist/src/common-auth-embedded/store/mutate.js +4 -0
- package/dist/src/common-auth-embedded/store/pool.d.ts +6 -1
- package/dist/src/common-auth-embedded/store/pool.js +1 -1
- package/dist/src/common-auth-embedded/store/quota-writer.js +27 -13
- package/dist/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/dist/src/common-auth-embedded/store/settings.js +16 -6
- package/dist/src/ga/rpc/protocol.d.ts +2 -0
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/src/ga/rpc/protocol.js +2 -2
- package/dist/src/ga/rpc/protocol.js.map +1 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +11 -0
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +2 -1
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.d.ts +10 -0
- package/dist/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.js +33 -5
- package/dist/src/plugin/background-vault-quota-refresh.js.map +1 -1
- package/dist/src/plugin/command-data.d.ts +2 -2
- package/dist/src/plugin/command-data.d.ts.map +1 -1
- package/dist/src/plugin/command-data.js +2 -0
- package/dist/src/plugin/command-data.js.map +1 -1
- package/dist/src/plugin/config/operator-settings-schema.d.ts +1 -1
- package/dist/src/plugin/config/schema.d.ts +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +28 -2
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +80 -16
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/ga-shared-vault-custody.d.ts +64 -0
- package/dist/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
- package/dist/src/plugin/ga-shared-vault-custody.js +169 -0
- package/dist/src/plugin/ga-shared-vault-custody.js.map +1 -0
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +11 -1
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/src/plugin/killswitch.js +13 -7
- package/dist/src/plugin/killswitch.js.map +1 -1
- package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/src/plugin/oauth-methods.js +3 -0
- package/dist/src/plugin/oauth-methods.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +2 -3
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +8 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.js +38 -5
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
- package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/src/plugin/ui/auth-menu.js +3 -0
- package/dist/src/plugin/ui/auth-menu.js.map +1 -1
- package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/src/plugin/ui/quota-status.js +4 -2
- package/dist/src/plugin/ui/quota-status.js.map +1 -1
- package/dist/src/plugin/vault-custody.d.ts +28 -7
- package/dist/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/vault-custody.js +198 -35
- package/dist/src/plugin/vault-custody.js.map +1 -1
- package/dist/src/plugin/vault-insula-quota.d.ts.map +1 -1
- package/dist/src/plugin/vault-insula-quota.js +4 -0
- package/dist/src/plugin/vault-insula-quota.js.map +1 -1
- package/dist/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/src/process-heartbeat.d.ts +76 -0
- package/dist/src/process-heartbeat.d.ts.map +1 -0
- package/dist/src/process-heartbeat.js +248 -0
- package/dist/src/process-heartbeat.js.map +1 -0
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +3 -0
- package/dist/src/setup.js.map +1 -1
- package/dist/src/sidebar-projection.d.ts +3 -1
- package/dist/src/sidebar-projection.d.ts.map +1 -1
- package/dist/src/sidebar-projection.js +10 -1
- package/dist/src/sidebar-projection.js.map +1 -1
- package/dist/src/sidebar-state.d.ts +10 -1
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +12 -2
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui/quota-layout.d.ts +3 -1
- package/dist/src/tui/quota-layout.d.ts.map +1 -1
- package/dist/src/tui/quota-layout.js +6 -1
- package/dist/src/tui/quota-layout.js.map +1 -1
- package/dist/tui-build-map.json +9 -9
- package/dist/tui-ga-build-map.json +13 -13
- package/dist/types/src/cli.d.ts +15 -0
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/dist/types/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/dist/types/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/dist/types/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +7 -5
- package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +42 -10
- package/dist/types/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/dist/types/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/dist/types/src/common-auth-embedded/store/pool.d.ts +6 -1
- package/dist/types/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/dist/types/src/ga/rpc/protocol.d.ts +2 -0
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts +10 -0
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/types/src/plugin/command-data.d.ts +2 -2
- package/dist/types/src/plugin/command-data.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts +28 -2
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-shared-vault-custody.d.ts +64 -0
- package/dist/types/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/killswitch.d.ts.map +1 -1
- package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +8 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -1
- package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-custody.d.ts +28 -7
- package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-insula-quota.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/types/src/process-heartbeat.d.ts +76 -0
- package/dist/types/src/process-heartbeat.d.ts.map +1 -0
- package/dist/types/src/setup.d.ts.map +1 -1
- package/dist/types/src/sidebar-state.d.ts +10 -1
- package/dist/types/src/sidebar-state.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
- package/src/common-auth-embedded/claustrum/consumer.js +320 -35
- package/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
- package/src/common-auth-embedded/claustrum/custody.js +95 -11
- package/src/common-auth-embedded/claustrum/enrollment.js +37 -12
- package/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
- package/src/common-auth-embedded/claustrum/hub.js +988 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +13 -3
- package/src/common-auth-embedded/claustrum/index.js +37 -4
- package/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
- package/src/common-auth-embedded/claustrum/quota-writer.js +34 -12
- package/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
- package/src/common-auth-embedded/claustrum/roster.js +187 -12
- package/src/common-auth-embedded/claustrum/shutdown.js +42 -0
- package/src/common-auth-embedded/fs/file-read-cache.js +57 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
- package/src/common-auth-embedded/fs/refresh-file-lock.js +20 -11
- package/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
- package/src/common-auth-embedded/opencode2/index.d.ts +2 -2
- package/src/common-auth-embedded/opencode2/index.js +1 -1
- package/src/common-auth-embedded/opencode2/install.d.ts +7 -5
- package/src/common-auth-embedded/opencode2/install.js +139 -13
- package/src/common-auth-embedded/opencode2/types.d.ts +42 -10
- package/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
- package/src/common-auth-embedded/quota/commit-interval.js +18 -0
- package/src/common-auth-embedded/rpc/rpc-server.js +29 -19
- package/src/common-auth-embedded/setup/command.js +52 -14
- package/src/common-auth-embedded/setup/register.d.ts +2 -0
- package/src/common-auth-embedded/setup/register.js +90 -11
- package/src/common-auth-embedded/source-output.json +145 -97
- package/src/common-auth-embedded/store/mutate.d.ts +2 -0
- package/src/common-auth-embedded/store/mutate.js +4 -0
- package/src/common-auth-embedded/store/pool.d.ts +6 -1
- package/src/common-auth-embedded/store/pool.js +1 -1
- package/src/common-auth-embedded/store/quota-writer.js +27 -13
- package/src/common-auth-embedded/store/settings.d.ts +1 -1
- package/src/common-auth-embedded/store/settings.js +16 -6
- package/src/plugin/command-data.ts +4 -2
- package/src/sidebar-state.ts +23 -3
- package/src/tui-compiled/sidebar-state.js +4 -3
- package/src/tui-compiled/tui/quota-layout.js +3 -2
- package/src/tui-ga-compiled/host-ga.js +2 -1
- package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
- package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +3 -2
- package/src/tui-ga-raw/host-ga.tsx +12 -1
- package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
- package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +9 -2
- package/src/tui-raw/sidebar-state.js +4 -3
- package/src/tui-raw/tui/quota-layout.tsx +9 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"package": "@cortexkit/common-auth",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.1",
|
|
5
5
|
"artifactStatus": "published",
|
|
6
6
|
"publicRoots": {
|
|
7
7
|
"./rpc": {
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"import": "./dist/opencode2/index.js"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.
|
|
65
|
-
"tarballSha256": "
|
|
66
|
-
"sri": "sha512-
|
|
67
|
-
"canonicalFiles":
|
|
68
|
-
"canonicalBytes":
|
|
64
|
+
"input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.27.1.tgz",
|
|
65
|
+
"tarballSha256": "a74507a1f746c9d591501ab24a630fe8bab20fb305c92738770902f003edb387",
|
|
66
|
+
"sri": "sha512-k5oKV38HxXKqwVi7qU8K9fD+P0ca7kXu52TlulHJoiGO0Q8Ebv0URtW1UXKLYawOm3ZwfVwFEBzAhuj8kMh6rg==",
|
|
67
|
+
"canonicalFiles": 193,
|
|
68
|
+
"canonicalBytes": 1211539,
|
|
69
69
|
"generator": {
|
|
70
70
|
"path": "packages/opencode/scripts/embed-common-auth.ts",
|
|
71
71
|
"version": 3,
|
|
72
|
-
"sha256": "
|
|
72
|
+
"sha256": "79e2db6c01d1048f7a8b90a5105848710890e68ebb0ff096ec5623ec96eb1012"
|
|
73
73
|
},
|
|
74
74
|
"files": [
|
|
75
75
|
{
|
|
@@ -251,33 +251,33 @@
|
|
|
251
251
|
{
|
|
252
252
|
"source": "package/dist/claustrum/consumer.d.ts",
|
|
253
253
|
"output": "claustrum/consumer.d.ts",
|
|
254
|
-
"bytes":
|
|
255
|
-
"sourceSha256": "
|
|
256
|
-
"outputSha256": "
|
|
254
|
+
"bytes": 13309,
|
|
255
|
+
"sourceSha256": "a33f8fb2750424f1dd1e80ee6e0f260d4d5b6bdf6be3b00b2ae503bfbadb4d17",
|
|
256
|
+
"outputSha256": "a33f8fb2750424f1dd1e80ee6e0f260d4d5b6bdf6be3b00b2ae503bfbadb4d17",
|
|
257
257
|
"transform": "verbatim"
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
"source": "package/dist/claustrum/consumer.js",
|
|
261
261
|
"output": "claustrum/consumer.js",
|
|
262
|
-
"bytes":
|
|
263
|
-
"sourceSha256": "
|
|
264
|
-
"outputSha256": "
|
|
262
|
+
"bytes": 38516,
|
|
263
|
+
"sourceSha256": "46a8be88c8e5270d06bda0042235d7081dea06eaf1ae15f9a5fdf2ed93e478fd",
|
|
264
|
+
"outputSha256": "46a8be88c8e5270d06bda0042235d7081dea06eaf1ae15f9a5fdf2ed93e478fd",
|
|
265
265
|
"transform": "verbatim"
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
"source": "package/dist/claustrum/custody.d.ts",
|
|
269
269
|
"output": "claustrum/custody.d.ts",
|
|
270
|
-
"bytes":
|
|
271
|
-
"sourceSha256": "
|
|
272
|
-
"outputSha256": "
|
|
270
|
+
"bytes": 16192,
|
|
271
|
+
"sourceSha256": "ac8a3f2a47ec04ba0b6b5f69425db6672aa7660cd9249853f05fb2b4669698c2",
|
|
272
|
+
"outputSha256": "ac8a3f2a47ec04ba0b6b5f69425db6672aa7660cd9249853f05fb2b4669698c2",
|
|
273
273
|
"transform": "verbatim"
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"source": "package/dist/claustrum/custody.js",
|
|
277
277
|
"output": "claustrum/custody.js",
|
|
278
|
-
"bytes":
|
|
279
|
-
"sourceSha256": "
|
|
280
|
-
"outputSha256": "
|
|
278
|
+
"bytes": 30242,
|
|
279
|
+
"sourceSha256": "cfa9c256d59ac4740f5b88fc1662a3bbb29078973cbeaf6225448c305fa580a2",
|
|
280
|
+
"outputSha256": "cfa9c256d59ac4740f5b88fc1662a3bbb29078973cbeaf6225448c305fa580a2",
|
|
281
281
|
"transform": "verbatim"
|
|
282
282
|
},
|
|
283
283
|
{
|
|
@@ -291,9 +291,9 @@
|
|
|
291
291
|
{
|
|
292
292
|
"source": "package/dist/claustrum/enrollment.js",
|
|
293
293
|
"output": "claustrum/enrollment.js",
|
|
294
|
-
"bytes":
|
|
295
|
-
"sourceSha256": "
|
|
296
|
-
"outputSha256": "
|
|
294
|
+
"bytes": 36501,
|
|
295
|
+
"sourceSha256": "0a6aa09a8927ae9ba11e4cc4fbe81cd8a3248d5f7db71e8592667bc870899078",
|
|
296
|
+
"outputSha256": "0a6aa09a8927ae9ba11e4cc4fbe81cd8a3248d5f7db71e8592667bc870899078",
|
|
297
297
|
"transform": "verbatim"
|
|
298
298
|
},
|
|
299
299
|
{
|
|
@@ -328,20 +328,36 @@
|
|
|
328
328
|
"outputSha256": "59bd24af8dbf5d923750b6e2fb15de2ce8a59aa59e11a6740527e50d5f7f93d6",
|
|
329
329
|
"transform": "verbatim"
|
|
330
330
|
},
|
|
331
|
+
{
|
|
332
|
+
"source": "package/dist/claustrum/hub.d.ts",
|
|
333
|
+
"output": "claustrum/hub.d.ts",
|
|
334
|
+
"bytes": 9169,
|
|
335
|
+
"sourceSha256": "07a5c385738649ec5c03b6afb7a916011e565c9f9d5463b280b9896024d8f0c0",
|
|
336
|
+
"outputSha256": "07a5c385738649ec5c03b6afb7a916011e565c9f9d5463b280b9896024d8f0c0",
|
|
337
|
+
"transform": "verbatim"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"source": "package/dist/claustrum/hub.js",
|
|
341
|
+
"output": "claustrum/hub.js",
|
|
342
|
+
"bytes": 40718,
|
|
343
|
+
"sourceSha256": "50d57557ccd6e59989424e0df63df75570d97cdb5f71da37ce865d75f76297fd",
|
|
344
|
+
"outputSha256": "50d57557ccd6e59989424e0df63df75570d97cdb5f71da37ce865d75f76297fd",
|
|
345
|
+
"transform": "verbatim"
|
|
346
|
+
},
|
|
331
347
|
{
|
|
332
348
|
"source": "package/dist/claustrum/index.d.ts",
|
|
333
349
|
"output": "claustrum/index.d.ts",
|
|
334
|
-
"bytes":
|
|
335
|
-
"sourceSha256": "
|
|
336
|
-
"outputSha256": "
|
|
350
|
+
"bytes": 4728,
|
|
351
|
+
"sourceSha256": "524bec258d060b75e6aeefa1e39e102e9ad7370e6c74ba2c033fcc418a1db4d7",
|
|
352
|
+
"outputSha256": "524bec258d060b75e6aeefa1e39e102e9ad7370e6c74ba2c033fcc418a1db4d7",
|
|
337
353
|
"transform": "verbatim"
|
|
338
354
|
},
|
|
339
355
|
{
|
|
340
356
|
"source": "package/dist/claustrum/index.js",
|
|
341
357
|
"output": "claustrum/index.js",
|
|
342
|
-
"bytes":
|
|
343
|
-
"sourceSha256": "
|
|
344
|
-
"outputSha256": "
|
|
358
|
+
"bytes": 3938,
|
|
359
|
+
"sourceSha256": "9868c6c475ba9390118bd45c3b5dafe18a51c13cfe4e61700496e9096143a42b",
|
|
360
|
+
"outputSha256": "9868c6c475ba9390118bd45c3b5dafe18a51c13cfe4e61700496e9096143a42b",
|
|
345
361
|
"transform": "verbatim"
|
|
346
362
|
},
|
|
347
363
|
{
|
|
@@ -379,33 +395,41 @@
|
|
|
379
395
|
{
|
|
380
396
|
"source": "package/dist/claustrum/quota-writer.d.ts",
|
|
381
397
|
"output": "claustrum/quota-writer.d.ts",
|
|
382
|
-
"bytes":
|
|
383
|
-
"sourceSha256": "
|
|
384
|
-
"outputSha256": "
|
|
398
|
+
"bytes": 1483,
|
|
399
|
+
"sourceSha256": "c3cafec7057092a67d443667bee50b19333dcf3a8d14b63c9fbe4ac3989ba389",
|
|
400
|
+
"outputSha256": "c3cafec7057092a67d443667bee50b19333dcf3a8d14b63c9fbe4ac3989ba389",
|
|
385
401
|
"transform": "verbatim"
|
|
386
402
|
},
|
|
387
403
|
{
|
|
388
404
|
"source": "package/dist/claustrum/quota-writer.js",
|
|
389
405
|
"output": "claustrum/quota-writer.js",
|
|
390
|
-
"bytes":
|
|
391
|
-
"sourceSha256": "
|
|
392
|
-
"outputSha256": "
|
|
406
|
+
"bytes": 8527,
|
|
407
|
+
"sourceSha256": "5375e7d8a300e73f4398d610090834095fd22ba4b3830f3c62d142a67dcbe9fd",
|
|
408
|
+
"outputSha256": "5375e7d8a300e73f4398d610090834095fd22ba4b3830f3c62d142a67dcbe9fd",
|
|
393
409
|
"transform": "verbatim"
|
|
394
410
|
},
|
|
395
411
|
{
|
|
396
412
|
"source": "package/dist/claustrum/roster.d.ts",
|
|
397
413
|
"output": "claustrum/roster.d.ts",
|
|
398
|
-
"bytes":
|
|
399
|
-
"sourceSha256": "
|
|
400
|
-
"outputSha256": "
|
|
414
|
+
"bytes": 15102,
|
|
415
|
+
"sourceSha256": "30fc3b4d572e43a08a700ff169ebcb52206d1200f7ca678d2bff0a3369aaa005",
|
|
416
|
+
"outputSha256": "30fc3b4d572e43a08a700ff169ebcb52206d1200f7ca678d2bff0a3369aaa005",
|
|
401
417
|
"transform": "verbatim"
|
|
402
418
|
},
|
|
403
419
|
{
|
|
404
420
|
"source": "package/dist/claustrum/roster.js",
|
|
405
421
|
"output": "claustrum/roster.js",
|
|
406
|
-
"bytes":
|
|
407
|
-
"sourceSha256": "
|
|
408
|
-
"outputSha256": "
|
|
422
|
+
"bytes": 39326,
|
|
423
|
+
"sourceSha256": "f46fc75edcf4e418f02a5699c7395f1f44abd2e28b77067b89f7622af5890214",
|
|
424
|
+
"outputSha256": "f46fc75edcf4e418f02a5699c7395f1f44abd2e28b77067b89f7622af5890214",
|
|
425
|
+
"transform": "verbatim"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"source": "package/dist/claustrum/shutdown.js",
|
|
429
|
+
"output": "claustrum/shutdown.js",
|
|
430
|
+
"bytes": 1270,
|
|
431
|
+
"sourceSha256": "6ccb19ab5e9bb84a978cb47a32b443abe432b4edfe69a318e45bb404ef75c45e",
|
|
432
|
+
"outputSha256": "6ccb19ab5e9bb84a978cb47a32b443abe432b4edfe69a318e45bb404ef75c45e",
|
|
409
433
|
"transform": "verbatim"
|
|
410
434
|
},
|
|
411
435
|
{
|
|
@@ -536,6 +560,14 @@
|
|
|
536
560
|
"outputSha256": "80779a8078e673ef68deaa7fdee3a0e1322078521a1f4156c0a595814c374044",
|
|
537
561
|
"transform": "verbatim"
|
|
538
562
|
},
|
|
563
|
+
{
|
|
564
|
+
"source": "package/dist/fs/file-read-cache.js",
|
|
565
|
+
"output": "fs/file-read-cache.js",
|
|
566
|
+
"bytes": 2121,
|
|
567
|
+
"sourceSha256": "484d18996d76c44125c880347b3d3dcd10bb352743acf44c588d0b38e8e0f1a7",
|
|
568
|
+
"outputSha256": "484d18996d76c44125c880347b3d3dcd10bb352743acf44c588d0b38e8e0f1a7",
|
|
569
|
+
"transform": "verbatim"
|
|
570
|
+
},
|
|
539
571
|
{
|
|
540
572
|
"source": "package/dist/fs/index.d.ts",
|
|
541
573
|
"output": "fs/index.d.ts",
|
|
@@ -587,17 +619,17 @@
|
|
|
587
619
|
{
|
|
588
620
|
"source": "package/dist/fs/refresh-file-lock.d.ts",
|
|
589
621
|
"output": "fs/refresh-file-lock.d.ts",
|
|
590
|
-
"bytes":
|
|
591
|
-
"sourceSha256": "
|
|
592
|
-
"outputSha256": "
|
|
622
|
+
"bytes": 2157,
|
|
623
|
+
"sourceSha256": "cbce15eb313d425501780dd4be657cbbaa7e41064bab4ae64fea91fbd54918e9",
|
|
624
|
+
"outputSha256": "cbce15eb313d425501780dd4be657cbbaa7e41064bab4ae64fea91fbd54918e9",
|
|
593
625
|
"transform": "verbatim"
|
|
594
626
|
},
|
|
595
627
|
{
|
|
596
628
|
"source": "package/dist/fs/refresh-file-lock.js",
|
|
597
629
|
"output": "fs/refresh-file-lock.js",
|
|
598
|
-
"bytes":
|
|
599
|
-
"sourceSha256": "
|
|
600
|
-
"outputSha256": "
|
|
630
|
+
"bytes": 30222,
|
|
631
|
+
"sourceSha256": "314dadbe39b9f0664b6f2f6abff674197c8d86f61ba657e2031d5a8b08ec1030",
|
|
632
|
+
"outputSha256": "314dadbe39b9f0664b6f2f6abff674197c8d86f61ba657e2031d5a8b08ec1030",
|
|
601
633
|
"transform": "verbatim"
|
|
602
634
|
},
|
|
603
635
|
{
|
|
@@ -683,9 +715,9 @@
|
|
|
683
715
|
{
|
|
684
716
|
"source": "package/dist/opencode2/errors.d.ts",
|
|
685
717
|
"output": "opencode2/errors.d.ts",
|
|
686
|
-
"bytes":
|
|
687
|
-
"sourceSha256": "
|
|
688
|
-
"outputSha256": "
|
|
718
|
+
"bytes": 1298,
|
|
719
|
+
"sourceSha256": "14d126de16a9b787108fe3a75ed1effdc09261cad42a89b4917984333e42c600",
|
|
720
|
+
"outputSha256": "14d126de16a9b787108fe3a75ed1effdc09261cad42a89b4917984333e42c600",
|
|
689
721
|
"transform": "verbatim"
|
|
690
722
|
},
|
|
691
723
|
{
|
|
@@ -699,33 +731,33 @@
|
|
|
699
731
|
{
|
|
700
732
|
"source": "package/dist/opencode2/index.d.ts",
|
|
701
733
|
"output": "opencode2/index.d.ts",
|
|
702
|
-
"bytes":
|
|
703
|
-
"sourceSha256": "
|
|
704
|
-
"outputSha256": "
|
|
734
|
+
"bytes": 1204,
|
|
735
|
+
"sourceSha256": "aebb45bf6cb0359322d56b512e6bf40370feb2dfef5b4e82c25ade078f066f84",
|
|
736
|
+
"outputSha256": "aebb45bf6cb0359322d56b512e6bf40370feb2dfef5b4e82c25ade078f066f84",
|
|
705
737
|
"transform": "verbatim"
|
|
706
738
|
},
|
|
707
739
|
{
|
|
708
740
|
"source": "package/dist/opencode2/index.js",
|
|
709
741
|
"output": "opencode2/index.js",
|
|
710
|
-
"bytes":
|
|
711
|
-
"sourceSha256": "
|
|
712
|
-
"outputSha256": "
|
|
742
|
+
"bytes": 463,
|
|
743
|
+
"sourceSha256": "a626e6a4f3511e07f1e52a0969b855884bd521f0f1382ad28ed35ca83b46fc1e",
|
|
744
|
+
"outputSha256": "a626e6a4f3511e07f1e52a0969b855884bd521f0f1382ad28ed35ca83b46fc1e",
|
|
713
745
|
"transform": "verbatim"
|
|
714
746
|
},
|
|
715
747
|
{
|
|
716
748
|
"source": "package/dist/opencode2/install.d.ts",
|
|
717
749
|
"output": "opencode2/install.d.ts",
|
|
718
|
-
"bytes":
|
|
719
|
-
"sourceSha256": "
|
|
720
|
-
"outputSha256": "
|
|
750
|
+
"bytes": 3837,
|
|
751
|
+
"sourceSha256": "14938cf47881ead2ed146478dd4c01986439bf6d586c610f386ddd2f6f95d00a",
|
|
752
|
+
"outputSha256": "14938cf47881ead2ed146478dd4c01986439bf6d586c610f386ddd2f6f95d00a",
|
|
721
753
|
"transform": "verbatim"
|
|
722
754
|
},
|
|
723
755
|
{
|
|
724
756
|
"source": "package/dist/opencode2/install.js",
|
|
725
757
|
"output": "opencode2/install.js",
|
|
726
|
-
"bytes":
|
|
727
|
-
"sourceSha256": "
|
|
728
|
-
"outputSha256": "
|
|
758
|
+
"bytes": 48348,
|
|
759
|
+
"sourceSha256": "5568d7c40a10055c69e599e3e65daf9d24243ba9e7264df6f1ec669e21a88f4c",
|
|
760
|
+
"outputSha256": "5568d7c40a10055c69e599e3e65daf9d24243ba9e7264df6f1ec669e21a88f4c",
|
|
729
761
|
"transform": "verbatim"
|
|
730
762
|
},
|
|
731
763
|
{
|
|
@@ -763,9 +795,9 @@
|
|
|
763
795
|
{
|
|
764
796
|
"source": "package/dist/opencode2/types.d.ts",
|
|
765
797
|
"output": "opencode2/types.d.ts",
|
|
766
|
-
"bytes":
|
|
767
|
-
"sourceSha256": "
|
|
768
|
-
"outputSha256": "
|
|
798
|
+
"bytes": 23395,
|
|
799
|
+
"sourceSha256": "30497c31cc2c67c0163888b55071a48fefe3090711bd4935999f403a585a4403",
|
|
800
|
+
"outputSha256": "30497c31cc2c67c0163888b55071a48fefe3090711bd4935999f403a585a4403",
|
|
769
801
|
"transform": "verbatim"
|
|
770
802
|
},
|
|
771
803
|
{
|
|
@@ -824,6 +856,22 @@
|
|
|
824
856
|
"outputSha256": "4e496ce03a8a23536b467168f1dc6a7ceffb06d00ae80cb8a8868f311b2f3a8a",
|
|
825
857
|
"transform": "verbatim"
|
|
826
858
|
},
|
|
859
|
+
{
|
|
860
|
+
"source": "package/dist/quota/commit-interval.d.ts",
|
|
861
|
+
"output": "quota/commit-interval.d.ts",
|
|
862
|
+
"bytes": 283,
|
|
863
|
+
"sourceSha256": "8b1d8b541a382d1ce366d65d9845e9d3848445cf075751b68ad963fb660ee04a",
|
|
864
|
+
"outputSha256": "8b1d8b541a382d1ce366d65d9845e9d3848445cf075751b68ad963fb660ee04a",
|
|
865
|
+
"transform": "verbatim"
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"source": "package/dist/quota/commit-interval.js",
|
|
869
|
+
"output": "quota/commit-interval.js",
|
|
870
|
+
"bytes": 864,
|
|
871
|
+
"sourceSha256": "3281afb6df69d83a7c5898e1163287f34104068ddd4085b7460c4bb392967491",
|
|
872
|
+
"outputSha256": "3281afb6df69d83a7c5898e1163287f34104068ddd4085b7460c4bb392967491",
|
|
873
|
+
"transform": "verbatim"
|
|
874
|
+
},
|
|
827
875
|
{
|
|
828
876
|
"source": "package/dist/quota/format.d.ts",
|
|
829
877
|
"output": "quota/format.d.ts",
|
|
@@ -1083,9 +1131,9 @@
|
|
|
1083
1131
|
{
|
|
1084
1132
|
"source": "package/dist/rpc/rpc-server.js",
|
|
1085
1133
|
"output": "rpc/rpc-server.js",
|
|
1086
|
-
"bytes":
|
|
1087
|
-
"sourceSha256": "
|
|
1088
|
-
"outputSha256": "
|
|
1134
|
+
"bytes": 14231,
|
|
1135
|
+
"sourceSha256": "62b92588917afeaa5ddb187c0e47fe5e318c313bc3e6065806052c3bef008f04",
|
|
1136
|
+
"outputSha256": "62b92588917afeaa5ddb187c0e47fe5e318c313bc3e6065806052c3bef008f04",
|
|
1089
1137
|
"transform": "verbatim"
|
|
1090
1138
|
},
|
|
1091
1139
|
{
|
|
@@ -1139,9 +1187,9 @@
|
|
|
1139
1187
|
{
|
|
1140
1188
|
"source": "package/dist/setup/command.js",
|
|
1141
1189
|
"output": "setup/command.js",
|
|
1142
|
-
"bytes":
|
|
1143
|
-
"sourceSha256": "
|
|
1144
|
-
"outputSha256": "
|
|
1190
|
+
"bytes": 15313,
|
|
1191
|
+
"sourceSha256": "69c58fd28873929126ee975eff1d4d7de2dafb483af5ccb630f5feb2e3c9abb2",
|
|
1192
|
+
"outputSha256": "69c58fd28873929126ee975eff1d4d7de2dafb483af5ccb630f5feb2e3c9abb2",
|
|
1145
1193
|
"transform": "verbatim"
|
|
1146
1194
|
},
|
|
1147
1195
|
{
|
|
@@ -1235,17 +1283,17 @@
|
|
|
1235
1283
|
{
|
|
1236
1284
|
"source": "package/dist/setup/register.d.ts",
|
|
1237
1285
|
"output": "setup/register.d.ts",
|
|
1238
|
-
"bytes":
|
|
1239
|
-
"sourceSha256": "
|
|
1240
|
-
"outputSha256": "
|
|
1286
|
+
"bytes": 816,
|
|
1287
|
+
"sourceSha256": "9f9c32e5eaea9623594b07dde03be3a03dec5e9569e882a7e769a9e14d67c317",
|
|
1288
|
+
"outputSha256": "9f9c32e5eaea9623594b07dde03be3a03dec5e9569e882a7e769a9e14d67c317",
|
|
1241
1289
|
"transform": "verbatim"
|
|
1242
1290
|
},
|
|
1243
1291
|
{
|
|
1244
1292
|
"source": "package/dist/setup/register.js",
|
|
1245
1293
|
"output": "setup/register.js",
|
|
1246
|
-
"bytes":
|
|
1247
|
-
"sourceSha256": "
|
|
1248
|
-
"outputSha256": "
|
|
1294
|
+
"bytes": 9616,
|
|
1295
|
+
"sourceSha256": "6318e5747df8b6e56ab4ac5e26fbc2d7446f4ab550d7a700cbc6ce19d8f80e7a",
|
|
1296
|
+
"outputSha256": "6318e5747df8b6e56ab4ac5e26fbc2d7446f4ab550d7a700cbc6ce19d8f80e7a",
|
|
1249
1297
|
"transform": "verbatim"
|
|
1250
1298
|
},
|
|
1251
1299
|
{
|
|
@@ -1339,33 +1387,33 @@
|
|
|
1339
1387
|
{
|
|
1340
1388
|
"source": "package/dist/store/mutate.d.ts",
|
|
1341
1389
|
"output": "store/mutate.d.ts",
|
|
1342
|
-
"bytes":
|
|
1343
|
-
"sourceSha256": "
|
|
1344
|
-
"outputSha256": "
|
|
1390
|
+
"bytes": 9196,
|
|
1391
|
+
"sourceSha256": "4a46be98d9eb24a690e95f26b69bd3c461d5f225170bd31fcb89147c7baac41c",
|
|
1392
|
+
"outputSha256": "4a46be98d9eb24a690e95f26b69bd3c461d5f225170bd31fcb89147c7baac41c",
|
|
1345
1393
|
"transform": "verbatim"
|
|
1346
1394
|
},
|
|
1347
1395
|
{
|
|
1348
1396
|
"source": "package/dist/store/mutate.js",
|
|
1349
1397
|
"output": "store/mutate.js",
|
|
1350
|
-
"bytes":
|
|
1351
|
-
"sourceSha256": "
|
|
1352
|
-
"outputSha256": "
|
|
1398
|
+
"bytes": 20171,
|
|
1399
|
+
"sourceSha256": "d61d08f2caed6d7a803ca4c67511e5133d28f21a90a7417f76e23b49ed00591d",
|
|
1400
|
+
"outputSha256": "d61d08f2caed6d7a803ca4c67511e5133d28f21a90a7417f76e23b49ed00591d",
|
|
1353
1401
|
"transform": "verbatim"
|
|
1354
1402
|
},
|
|
1355
1403
|
{
|
|
1356
1404
|
"source": "package/dist/store/pool.d.ts",
|
|
1357
1405
|
"output": "store/pool.d.ts",
|
|
1358
|
-
"bytes":
|
|
1359
|
-
"sourceSha256": "
|
|
1360
|
-
"outputSha256": "
|
|
1406
|
+
"bytes": 12144,
|
|
1407
|
+
"sourceSha256": "64d6e7dd5600f436422e6d309a22b7f874a6afdd866873226ab1f4d5091ebc43",
|
|
1408
|
+
"outputSha256": "64d6e7dd5600f436422e6d309a22b7f874a6afdd866873226ab1f4d5091ebc43",
|
|
1361
1409
|
"transform": "verbatim"
|
|
1362
1410
|
},
|
|
1363
1411
|
{
|
|
1364
1412
|
"source": "package/dist/store/pool.js",
|
|
1365
1413
|
"output": "store/pool.js",
|
|
1366
|
-
"bytes":
|
|
1367
|
-
"sourceSha256": "
|
|
1368
|
-
"outputSha256": "
|
|
1414
|
+
"bytes": 6358,
|
|
1415
|
+
"sourceSha256": "1503b5c0f461678f9710a5fe22e345092de70e537a114e57b0cb651795928031",
|
|
1416
|
+
"outputSha256": "1503b5c0f461678f9710a5fe22e345092de70e537a114e57b0cb651795928031",
|
|
1369
1417
|
"transform": "verbatim"
|
|
1370
1418
|
},
|
|
1371
1419
|
{
|
|
@@ -1419,9 +1467,9 @@
|
|
|
1419
1467
|
{
|
|
1420
1468
|
"source": "package/dist/store/quota-writer.js",
|
|
1421
1469
|
"output": "store/quota-writer.js",
|
|
1422
|
-
"bytes":
|
|
1423
|
-
"sourceSha256": "
|
|
1424
|
-
"outputSha256": "
|
|
1470
|
+
"bytes": 12960,
|
|
1471
|
+
"sourceSha256": "7816549913b030045e5f7848dd57ca11841a3aa6051c30c96a7d09f82341700e",
|
|
1472
|
+
"outputSha256": "7816549913b030045e5f7848dd57ca11841a3aa6051c30c96a7d09f82341700e",
|
|
1425
1473
|
"transform": "verbatim"
|
|
1426
1474
|
},
|
|
1427
1475
|
{
|
|
@@ -1515,17 +1563,17 @@
|
|
|
1515
1563
|
{
|
|
1516
1564
|
"source": "package/dist/store/settings.d.ts",
|
|
1517
1565
|
"output": "store/settings.d.ts",
|
|
1518
|
-
"bytes":
|
|
1519
|
-
"sourceSha256": "
|
|
1520
|
-
"outputSha256": "
|
|
1566
|
+
"bytes": 2994,
|
|
1567
|
+
"sourceSha256": "32446dea1f8431e3fb7e38940d1dec7259dbd5c794b4117efe3875be92405fef",
|
|
1568
|
+
"outputSha256": "32446dea1f8431e3fb7e38940d1dec7259dbd5c794b4117efe3875be92405fef",
|
|
1521
1569
|
"transform": "verbatim"
|
|
1522
1570
|
},
|
|
1523
1571
|
{
|
|
1524
1572
|
"source": "package/dist/store/settings.js",
|
|
1525
1573
|
"output": "store/settings.js",
|
|
1526
|
-
"bytes":
|
|
1527
|
-
"sourceSha256": "
|
|
1528
|
-
"outputSha256": "
|
|
1574
|
+
"bytes": 5766,
|
|
1575
|
+
"sourceSha256": "5ed4e0458800923b843b9b8f0671cca0c04cb26e428453e3bcc8b6d06b51470f",
|
|
1576
|
+
"outputSha256": "5ed4e0458800923b843b9b8f0671cca0c04cb26e428453e3bcc8b6d06b51470f",
|
|
1529
1577
|
"transform": "verbatim"
|
|
1530
1578
|
},
|
|
1531
1579
|
{
|
|
@@ -52,6 +52,8 @@ export type ReadResult = ({
|
|
|
52
52
|
kind?: 'snapshot-contended';
|
|
53
53
|
retryable?: true;
|
|
54
54
|
};
|
|
55
|
+
/** Settings need only the config classification, not a joined roster snapshot. */
|
|
56
|
+
export declare function readPoolConfig(path: string): Promise<import("./schema.js").ConfigClassification>;
|
|
55
57
|
/**
|
|
56
58
|
* Validate config/state/config bytes without locks. Roster replacement writes
|
|
57
59
|
* config before deleting old state credentials. Re-read a changed config so an
|
|
@@ -28,6 +28,10 @@ function parseFile(text) {
|
|
|
28
28
|
return { exists: true, parseError };
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
/** Settings need only the config classification, not a joined roster snapshot. */
|
|
32
|
+
export async function readPoolConfig(path) {
|
|
33
|
+
return classifyConfig(parseFile(await readText(path)));
|
|
34
|
+
}
|
|
31
35
|
/**
|
|
32
36
|
* Validate config/state/config bytes without locks. Roster replacement writes
|
|
33
37
|
* config before deleting old state credentials. Re-read a changed config so an
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { QuotaCommitTimer } from '../quota/commit-interval.js';
|
|
1
2
|
import { type Attribution } from './attribution.js';
|
|
2
3
|
import type { PoolOperationError } from './errors.js';
|
|
3
4
|
import type { PoolLogger } from './hooks.js';
|
|
@@ -24,11 +25,15 @@ export interface OpenPoolStoreOptions {
|
|
|
24
25
|
* older reading replaces. Accepted readings appear in read/load
|
|
25
26
|
* immediately, merged the same way; the returned promise still rejects
|
|
26
27
|
* current-row refusals before queueing. Await dispose or close at shutdown
|
|
27
|
-
* to drain
|
|
28
|
+
* to attempt a bounded drain; readings still pending at its timeout are
|
|
29
|
+
* discarded. Normal quota commits are at least 30 seconds apart; a full
|
|
30
|
+
* queue commits early so response handling never waits for that interval.
|
|
28
31
|
*/
|
|
29
32
|
coalesceQuota?: boolean;
|
|
30
33
|
/** Bounded quota drain on close/dispose, in milliseconds; defaults to 1,000. */
|
|
31
34
|
quotaDrainTimeoutMs?: number;
|
|
35
|
+
/** Monotonic clock and scheduling seam for detached quota commits. */
|
|
36
|
+
quotaCommitTimer?: QuotaCommitTimer;
|
|
32
37
|
/**
|
|
33
38
|
* The codec of the provider state kept beside each row's credential (see
|
|
34
39
|
* `ProviderStateCodec`). Without it no row shows a provider state, and
|
|
@@ -82,7 +82,7 @@ export function openPoolStore(options) {
|
|
|
82
82
|
firePull: (id, reason) => pulls.fire(id, reason),
|
|
83
83
|
};
|
|
84
84
|
const quotaWriter = options.coalesceQuota
|
|
85
|
-
? new PoolQuotaWriter(rt, options.quotaDrainTimeoutMs)
|
|
85
|
+
? new PoolQuotaWriter(rt, options.quotaDrainTimeoutMs, options.quotaCommitTimer)
|
|
86
86
|
: undefined;
|
|
87
87
|
const record = (id, attribution, observation) => quotaWriter
|
|
88
88
|
? quotaWriter.record(id, attribution, observation)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '../logger/index.js';
|
|
2
|
+
import { QUOTA_COMMIT_INTERVAL_MS, quotaCommitTimer, } from '../quota/commit-interval.js';
|
|
2
3
|
import { assertQuotaEpoch, assertQuotaRow, mergedQuota, } from './attribution.js';
|
|
3
4
|
import { PoolOperationError } from './errors.js';
|
|
4
5
|
import { toFailure, withTransaction } from './mutate.js';
|
|
@@ -24,19 +25,22 @@ export const POOL_QUOTA_QUEUE_LIMIT = 128;
|
|
|
24
25
|
export class PoolQuotaWriter {
|
|
25
26
|
rt;
|
|
26
27
|
timeoutMs;
|
|
28
|
+
clock;
|
|
27
29
|
pending = new Map();
|
|
28
30
|
warned = new Set();
|
|
29
31
|
wake = new Set();
|
|
30
32
|
logger;
|
|
31
33
|
timer;
|
|
34
|
+
committedAt;
|
|
32
35
|
running;
|
|
33
36
|
closing;
|
|
34
37
|
closed = false;
|
|
35
38
|
stopped = false;
|
|
36
39
|
failures = 0;
|
|
37
|
-
constructor(rt, timeoutMs = 1_000) {
|
|
40
|
+
constructor(rt, timeoutMs = 1_000, clock = quotaCommitTimer) {
|
|
38
41
|
this.rt = rt;
|
|
39
42
|
this.timeoutMs = timeoutMs;
|
|
43
|
+
this.clock = clock;
|
|
40
44
|
this.logger = rt.ctx.logger ?? createLogger('store');
|
|
41
45
|
}
|
|
42
46
|
async record(id, attribution, observation) {
|
|
@@ -126,25 +130,33 @@ export class PoolQuotaWriter {
|
|
|
126
130
|
schedule(delay) {
|
|
127
131
|
if (this.running || this.timer || !this.pending.size || this.stopped)
|
|
128
132
|
return;
|
|
129
|
-
|
|
133
|
+
const remaining = this.closed
|
|
134
|
+
? 0
|
|
135
|
+
: (this.committedAt ?? -Infinity) +
|
|
136
|
+
QUOTA_COMMIT_INTERVAL_MS -
|
|
137
|
+
this.clock.now();
|
|
138
|
+
this.timer = this.clock.schedule(Math.max(delay, remaining), () => {
|
|
130
139
|
this.timer = undefined;
|
|
131
|
-
this.flush();
|
|
132
|
-
}
|
|
140
|
+
return this.flush();
|
|
141
|
+
});
|
|
133
142
|
if (!this.closed)
|
|
134
143
|
this.timer.unref?.();
|
|
135
144
|
}
|
|
136
|
-
|
|
137
|
-
|
|
145
|
+
cancelTimer() {
|
|
146
|
+
this.timer?.cancel();
|
|
147
|
+
this.timer = undefined;
|
|
148
|
+
}
|
|
149
|
+
// A full queue overrides the interval: response handling must not wait for
|
|
150
|
+
// a quota commit slot. A flush already running is left to finish.
|
|
138
151
|
flushNow() {
|
|
139
152
|
if (this.running)
|
|
140
153
|
return;
|
|
141
|
-
|
|
142
|
-
this.timer = undefined;
|
|
154
|
+
this.cancelTimer();
|
|
143
155
|
this.flush();
|
|
144
156
|
}
|
|
145
157
|
flush() {
|
|
146
158
|
if (this.running || this.stopped || !this.pending.size)
|
|
147
|
-
return;
|
|
159
|
+
return this.running ?? Promise.resolve();
|
|
148
160
|
// Every queued reading, each row's in arrival order.
|
|
149
161
|
const batch = [...this.pending.values()].flat();
|
|
150
162
|
// Short lock attempts allow retries to pick up freshly queued readings and
|
|
@@ -208,8 +220,10 @@ export class PoolQuotaWriter {
|
|
|
208
220
|
tx.setEntry(id, { ...entry, quota, needsFirstReading: false });
|
|
209
221
|
changed = true;
|
|
210
222
|
}
|
|
211
|
-
if (changed && !this.stopped)
|
|
223
|
+
if (changed && !this.stopped) {
|
|
212
224
|
await tx.commitConfig();
|
|
225
|
+
this.committedAt = this.clock.now();
|
|
226
|
+
}
|
|
213
227
|
}, { completeTorn: false });
|
|
214
228
|
const flushed = new Set(batch);
|
|
215
229
|
for (const [id, queue] of this.pending) {
|
|
@@ -240,6 +254,7 @@ export class PoolQuotaWriter {
|
|
|
240
254
|
this.schedule(delay);
|
|
241
255
|
}
|
|
242
256
|
})();
|
|
257
|
+
return this.running;
|
|
243
258
|
}
|
|
244
259
|
warn(message, data) {
|
|
245
260
|
try {
|
|
@@ -257,8 +272,7 @@ export class PoolQuotaWriter {
|
|
|
257
272
|
return this.closing;
|
|
258
273
|
}
|
|
259
274
|
async drain() {
|
|
260
|
-
|
|
261
|
-
this.timer = undefined;
|
|
275
|
+
this.cancelTimer();
|
|
262
276
|
let deadline;
|
|
263
277
|
let wake;
|
|
264
278
|
const drained = new Promise((done) => {
|
|
@@ -281,7 +295,7 @@ export class PoolQuotaWriter {
|
|
|
281
295
|
finally {
|
|
282
296
|
this.stopped = true;
|
|
283
297
|
clearTimeout(deadline);
|
|
284
|
-
|
|
298
|
+
this.cancelTimer();
|
|
285
299
|
this.wake.delete(wake);
|
|
286
300
|
if (this.pending.size)
|
|
287
301
|
this.warn('pool quota drain timed out; pending readings left', {
|
|
@@ -50,7 +50,7 @@ export type UpdateSettingsResult = {
|
|
|
50
50
|
/** `unchanged` when the mutator left the settings as they were; nothing was written. */
|
|
51
51
|
outcome: 'updated' | 'unchanged';
|
|
52
52
|
};
|
|
53
|
-
/** Reads the settings without taking a lock or writing anything. */
|
|
53
|
+
/** Reads only the config's settings, without taking a lock or writing anything. */
|
|
54
54
|
export declare function readPoolSettings(rt: StoreRuntime): Promise<SettingsRead>;
|
|
55
55
|
/**
|
|
56
56
|
* One locked read-modify-write of the plugin's settings in the config file
|