@volter/world-core 2.0.37 → 3.0.1
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/README.md +4 -5
- package/app-route.cjs +12 -6
- package/app-route.d.cts +1 -1
- package/dist/app-route.cjs +12 -6
- package/dist/app-route.d.cts +1 -1
- package/dist/generated/pack-facts.json +1410 -3069
- package/dist/inject.cjs +64 -9
- package/dist/pack-facts.cjs +44 -0
- package/dist/src/actions.d.ts +3 -3
- package/dist/src/actions.js +22 -16
- package/dist/src/ancestry.d.ts +14 -2
- package/dist/src/ancestry.js +92 -2
- package/dist/src/anthropic-wire.d.ts +39 -0
- package/dist/src/anthropic-wire.js +136 -0
- package/dist/src/bytes.d.ts +7 -0
- package/dist/src/bytes.js +35 -0
- package/dist/src/changeset.d.ts +1 -1
- package/dist/src/changeset.js +0 -0
- package/dist/src/clickhouse/index.d.ts +3 -0
- package/dist/src/clickhouse/index.js +6 -0
- package/dist/src/clickhouse/sql.d.ts +233 -0
- package/dist/src/clickhouse/sql.js +4329 -0
- package/dist/src/clickhouse/types.d.ts +18 -0
- package/dist/src/clickhouse/types.js +47 -0
- package/dist/src/clickhouse/values.d.ts +146 -0
- package/dist/src/clickhouse/values.js +858 -0
- package/dist/src/client-bundle.js +2 -3
- package/dist/src/cors.d.ts +15 -0
- package/dist/src/cors.js +31 -0
- package/dist/src/derived-core.d.ts +487 -24
- package/dist/src/derived-core.js +788 -144
- package/dist/src/derived-real.d.ts +13 -0
- package/dist/src/derived-real.js +518 -0
- package/dist/src/derived.d.ts +35 -1
- package/dist/src/derived.js +61 -9
- package/dist/src/emit.js +1 -2
- package/dist/src/events.d.ts +206 -0
- package/dist/src/events.js +341 -0
- package/dist/src/executor.d.ts +3 -0
- package/dist/src/executor.js +19 -2
- package/dist/src/file-response.d.ts +6 -0
- package/dist/src/file-response.js +30 -0
- package/dist/src/fork.js +3 -2
- package/dist/src/git/history.d.ts +7 -0
- package/dist/src/git/history.js +24 -0
- package/dist/src/git/index.d.ts +1 -0
- package/dist/src/git/index.js +1 -0
- package/dist/src/git/lfs.d.ts +28 -0
- package/dist/src/git/lfs.js +66 -0
- package/dist/src/git/objects.js +3 -8
- package/dist/src/git/smart-http.d.ts +3 -1
- package/dist/src/git/smart-http.js +67 -6
- package/dist/src/graphql-wire.d.ts +29 -0
- package/dist/src/graphql-wire.js +101 -0
- package/dist/src/grpc-wire.d.ts +67 -0
- package/dist/src/grpc-wire.js +170 -0
- package/dist/src/h2.d.ts +40 -0
- package/dist/src/h2.js +656 -0
- package/dist/src/head.d.ts +32 -3
- package/dist/src/head.js +161 -40
- package/dist/src/history.d.ts +1 -1
- package/dist/src/history.js +6 -6
- package/dist/src/hpack.json +1 -0
- package/dist/src/index.d.ts +64 -75
- package/dist/src/index.js +58 -101
- package/dist/src/log.js +28 -19
- package/dist/src/machines.d.ts +50 -0
- package/dist/src/machines.js +151 -0
- package/dist/src/managed-database.d.ts +86 -0
- package/dist/src/managed-database.js +283 -0
- package/dist/src/multipart.d.ts +11 -0
- package/dist/src/multipart.js +51 -0
- package/dist/src/observe.d.ts +15 -5
- package/dist/src/observe.js +23 -9
- package/dist/src/openai-wire.d.ts +108 -0
- package/dist/src/openai-wire.js +337 -0
- package/dist/src/pack-assets.d.ts +3 -4
- package/dist/src/pack-assets.js +15 -10
- package/dist/src/pack-fetch.d.ts +77 -0
- package/dist/src/pack-fetch.js +449 -0
- package/dist/src/pack-paths.d.ts +12 -0
- package/dist/src/pack-paths.js +86 -0
- package/dist/src/packRegistry.d.ts +69 -162
- package/dist/src/packRegistry.js +55 -20
- package/dist/src/people.d.ts +13 -0
- package/dist/src/people.js +18 -0
- package/dist/src/placeholder-image.d.ts +5 -0
- package/dist/src/placeholder-image.js +114 -0
- package/dist/src/protobuf.d.ts +28 -0
- package/dist/src/protobuf.js +332 -0
- package/dist/src/redis/engine.js +1 -1
- package/dist/src/request-scope.d.ts +1 -1
- package/dist/src/request-scope.js +6 -4
- package/dist/src/resource-blob.d.ts +5 -0
- package/dist/src/resource-blob.js +11 -0
- package/dist/src/runtime.d.ts +85 -0
- package/dist/src/runtime.js +104 -0
- package/dist/src/s3/wire.d.ts +60 -0
- package/dist/src/s3/wire.js +157 -0
- package/dist/src/scenario.d.ts +3 -0
- package/dist/src/scenario.js +2 -0
- package/dist/src/schema-sample.d.ts +1 -0
- package/dist/src/schema-sample.js +21 -0
- package/dist/src/sealed-box.d.ts +14 -0
- package/dist/src/sealed-box.js +225 -0
- package/dist/src/serve-http.d.ts +14 -0
- package/dist/src/serve-http.js +27 -3
- package/dist/src/serve.d.ts +6 -0
- package/dist/src/serve.js +69 -14
- package/dist/src/signing.d.ts +135 -0
- package/dist/src/signing.js +222 -0
- package/dist/src/sigv4.d.ts +48 -0
- package/dist/src/sigv4.js +167 -0
- package/dist/src/smtp.d.ts +16 -0
- package/dist/src/smtp.js +72 -0
- package/dist/src/sockets.d.ts +51 -0
- package/dist/src/sockets.js +90 -0
- package/dist/src/state-system.d.ts +1 -0
- package/dist/src/state-system.js +1 -1
- package/dist/src/storage.d.ts +1 -1
- package/dist/src/storage.js +3 -3
- package/dist/src/trace-context.js +1 -1
- package/dist/src/twin-fetch.d.ts +0 -7
- package/dist/src/twin-fetch.js +0 -14
- package/dist/src/vendor-call.d.ts +6 -0
- package/dist/src/vendor-call.js +41 -0
- package/dist/src/world-store.js +1 -1
- package/dist/vendor-hosts.cjs +36 -125
- package/dist/vendor-hosts.d.cts +8 -0
- package/generated/pack-facts.json +1410 -3069
- package/inject.cjs +64 -9
- package/pack-facts.cjs +44 -0
- package/package.json +17 -3
- package/src/actions.ts +23 -16
- package/src/ancestry.ts +74 -2
- package/src/anthropic-wire.ts +137 -0
- package/src/bytes.ts +42 -0
- package/src/changeset.ts +5 -5
- package/src/clickhouse/index.ts +6 -0
- package/src/clickhouse/sql.ts +3059 -0
- package/src/clickhouse/types.ts +44 -0
- package/src/clickhouse/values.ts +697 -0
- package/src/client-bundle.ts +2 -3
- package/src/cors.ts +34 -0
- package/src/derived-core.ts +1013 -146
- package/src/derived-real.ts +434 -0
- package/src/derived.ts +73 -3
- package/src/emit.ts +1 -2
- package/src/events.ts +449 -0
- package/src/executor.ts +24 -2
- package/src/file-response.ts +27 -0
- package/src/fork.ts +3 -2
- package/src/git/history.ts +19 -0
- package/src/git/index.ts +1 -0
- package/src/git/lfs.ts +67 -0
- package/src/git/objects.ts +3 -5
- package/src/git/smart-http.ts +56 -6
- package/src/graphql-wire.ts +106 -0
- package/src/grpc-wire.ts +159 -0
- package/src/h2.ts +627 -0
- package/src/head.ts +132 -41
- package/src/history.ts +6 -6
- package/src/hpack.json +1 -0
- package/src/index.ts +82 -329
- package/src/log.ts +27 -18
- package/src/machines.ts +151 -0
- package/src/managed-database.ts +299 -0
- package/src/multipart.ts +51 -0
- package/src/observe.ts +31 -15
- package/src/openai-wire.ts +371 -0
- package/src/pack-assets.ts +15 -11
- package/src/pack-fetch.ts +458 -0
- package/src/pack-paths.ts +72 -0
- package/src/packRegistry.ts +79 -167
- package/src/people.ts +31 -0
- package/src/placeholder-image.ts +88 -0
- package/src/protobuf.ts +251 -0
- package/src/redis/engine.ts +1 -1
- package/src/request-scope.ts +8 -4
- package/src/resource-blob.ts +13 -0
- package/src/runtime.ts +344 -0
- package/src/s3/wire.ts +172 -0
- package/src/scenario.ts +4 -0
- package/src/schema-sample.ts +24 -0
- package/src/sealed-box.ts +182 -0
- package/src/serve-http.ts +31 -3
- package/src/serve.ts +58 -14
- package/src/signing.ts +231 -0
- package/src/sigv4.ts +158 -0
- package/src/smtp.ts +76 -0
- package/src/sockets.ts +140 -0
- package/src/state-system.ts +2 -2
- package/src/storage.ts +3 -3
- package/src/trace-context.ts +1 -1
- package/src/twin-fetch.ts +0 -20
- package/src/vendor-call.ts +41 -0
- package/src/world-store.ts +1 -1
- package/vendor-hosts.cjs +36 -125
- package/vendor-hosts.d.cts +8 -0
- package/dist/src/mirror-shell.d.ts +0 -2
- package/dist/src/mirror-shell.js +0 -13
- package/dist/src/v1-removed.d.ts +0 -159
- package/dist/src/v1-removed.js +0 -124
- package/src/mirror-shell.ts +0 -15
- package/src/v1-removed.ts +0 -172
package/dist/src/v1-removed.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
// v1 LEFT THE KERNEL (company contract "Just like Neon", 5 — ruled 2026-09-06). These names are what
|
|
2
|
-
// a protocol 1 pack still imports: the push ledger, the shadow refs and bases, observed deltas as a
|
|
3
|
-
// row kind, egress intents, plans, leases, reconcile, remote refs, the queue lifecycle, the v1 status,
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
// validation and inspector, the poll runner, the v1 apply. Each throws on its first call. A pack
|
|
6
|
-
// that reaches one is out of date; the sweep moves it (protocol 2: the head, the fold, the tree).
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
-
// Reaching a tombstone is RECORDED, process-wide (one list whichever copy of the kernel the caller
|
|
9
|
-
// resolved), so a verify() that swallows the throw and answers false is still known to have reached
|
|
10
|
-
// v1 machinery: the capability runner reads this list around each verify and says "out of date".
|
|
11
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
12
|
-
const REACHED = Symbol.for('volter.v1.reached');
|
|
13
|
-
export function v1Reached() { return (globalThis[REACHED] ??= []); }
|
|
14
|
-
// …and per SCOPE, so concurrent verifies attribute a reach to the one that made it (the runner opens a
|
|
15
|
-
// scope around each verify); one storage per process, whichever copy of the kernel the caller resolved
|
|
16
|
-
const SCOPE = Symbol.for('volter.v1.reached.scope');
|
|
17
|
-
// created on first use, never at import (a browser bundle has no AsyncLocalStorage; see observe.ts)
|
|
18
|
-
const scope = () => (globalThis[SCOPE] ??= new AsyncLocalStorage());
|
|
19
|
-
/** Run `fn` and learn which v1 names it reached (directly or through anything it awaited). */
|
|
20
|
-
export async function v1ReachedIn(fn) {
|
|
21
|
-
const reached = [];
|
|
22
|
-
const value = await scope().run(reached, fn);
|
|
23
|
-
return { value, reached };
|
|
24
|
-
}
|
|
25
|
-
const gone = (name) => { v1Reached().push(name); if (typeof AsyncLocalStorage === 'function')
|
|
26
|
-
scope().getStore()?.push(name); throw new Error(`v1 removed: ${name} — protocol 2 replaces it (the head performs, the kernel folds observations, the tree is read); this pack is out of date until the sweep moves it`); };
|
|
27
|
-
export function appendEventLocked(..._args) { return gone('appendEventLocked'); }
|
|
28
|
-
export function eventsLockPath(..._args) { return gone('eventsLockPath'); }
|
|
29
|
-
export function appendPushRecord(..._args) { return gone('appendPushRecord'); }
|
|
30
|
-
export function listPushLedger(..._args) { return gone('listPushLedger'); }
|
|
31
|
-
export function latestPushByActionId(..._args) { return gone('latestPushByActionId'); }
|
|
32
|
-
export function unconfirmedPushes(..._args) { return gone('unconfirmedPushes'); }
|
|
33
|
-
export function assertFastForward(..._args) { return gone('assertFastForward'); }
|
|
34
|
-
export function pushTransaction(..._args) { return gone('pushTransaction'); }
|
|
35
|
-
export function abandonPush(..._args) { return gone('abandonPush'); }
|
|
36
|
-
export function syncPull(..._args) { return gone('syncPull'); }
|
|
37
|
-
export function syncPush(..._args) { return gone('syncPush'); }
|
|
38
|
-
export function currentResources(..._args) { return gone('currentResources'); }
|
|
39
|
-
export function isEgressEventType(..._args) { return gone('isEgressEventType'); }
|
|
40
|
-
export function recordWriteIntent(..._args) { return gone('recordWriteIntent'); }
|
|
41
|
-
export function performExternalWrite(..._args) { return gone('performExternalWrite'); }
|
|
42
|
-
export function listUnreconciledWriteIntents(..._args) { return gone('listUnreconciledWriteIntents'); }
|
|
43
|
-
export function listEgressLedger(..._args) { return gone('listEgressLedger'); }
|
|
44
|
-
export function findWriteResultByExternal(..._args) { return gone('findWriteResultByExternal'); }
|
|
45
|
-
export function transactionSetId(..._args) { return gone('transactionSetId'); }
|
|
46
|
-
export function listPlanReviews(..._args) { return gone('listPlanReviews'); }
|
|
47
|
-
export function latestPlanReview(..._args) { return gone('latestPlanReview'); }
|
|
48
|
-
export function buildLocalActionPlan(..._args) { return gone('buildLocalActionPlan'); }
|
|
49
|
-
export function recordPlanReview(..._args) { return gone('recordPlanReview'); }
|
|
50
|
-
export function approvedPendingActionSet(..._args) { return gone('approvedPendingActionSet'); }
|
|
51
|
-
export function assertPendingActionsApproved(..._args) { return gone('assertPendingActionsApproved'); }
|
|
52
|
-
export function pendingConflicts(..._args) { return gone('pendingConflicts'); }
|
|
53
|
-
export function buildApplyPlan(..._args) { return gone('buildApplyPlan'); }
|
|
54
|
-
export function writePlan(..._args) { return gone('writePlan'); }
|
|
55
|
-
export function readPlan(..._args) { return gone('readPlan'); }
|
|
56
|
-
export function listPlans(..._args) { return gone('listPlans'); }
|
|
57
|
-
export function planRequiresApproval(..._args) { return gone('planRequiresApproval'); }
|
|
58
|
-
export function applyPlan(..._args) { return gone('applyPlan'); }
|
|
59
|
-
export function listLeases(..._args) { return gone('listLeases'); }
|
|
60
|
-
export function isLeaseActive(..._args) { return gone('isLeaseActive'); }
|
|
61
|
-
export function activeLease(..._args) { return gone('activeLease'); }
|
|
62
|
-
export function acquireLease(..._args) { return gone('acquireLease'); }
|
|
63
|
-
export function releaseLease(..._args) { return gone('releaseLease'); }
|
|
64
|
-
export function reconcile(..._args) { return gone('reconcile'); }
|
|
65
|
-
export function isCleanlyReconcilable(..._args) { return gone('isCleanlyReconcilable'); }
|
|
66
|
-
export function reconcileRequiresApproval(..._args) { return gone('reconcileRequiresApproval'); }
|
|
67
|
-
export function writeRemoteRef(..._args) { return gone('writeRemoteRef'); }
|
|
68
|
-
export function readRemoteRef(..._args) { return gone('readRemoteRef'); }
|
|
69
|
-
export function listRemoteRefs(..._args) { return gone('listRemoteRefs'); }
|
|
70
|
-
export function writeLocalRef(..._args) { return gone('writeLocalRef'); }
|
|
71
|
-
export function readLocalRef(..._args) { return gone('readLocalRef'); }
|
|
72
|
-
export function isBaseStale(..._args) { return gone('isBaseStale'); }
|
|
73
|
-
export function setQueueRowStatus(..._args) { return gone('setQueueRowStatus'); }
|
|
74
|
-
export function queueRowStatus(..._args) { return gone('queueRowStatus'); }
|
|
75
|
-
export function listQueueWithStatus(..._args) { return gone('listQueueWithStatus'); }
|
|
76
|
-
export function pendingQueueRows(..._args) { return gone('pendingQueueRows'); }
|
|
77
|
-
export function queueCounts(..._args) { return gone('queueCounts'); }
|
|
78
|
-
export function commitQueueRow(..._args) { return gone('commitQueueRow'); }
|
|
79
|
-
export function ignoreQueueRow(..._args) { return gone('ignoreQueueRow'); }
|
|
80
|
-
export function supersedeQueueRow(..._args) { return gone('supersedeQueueRow'); }
|
|
81
|
-
export function poisonQueueRow(..._args) { return gone('poisonQueueRow'); }
|
|
82
|
-
export function commitPendingQueue(..._args) { return gone('commitPendingQueue'); }
|
|
83
|
-
export function worldStatus(..._args) { return gone('worldStatus'); }
|
|
84
|
-
export function formatStatus(..._args) { return gone('formatStatus'); }
|
|
85
|
-
export function discoverWorldServices(..._args) { return gone('discoverWorldServices'); }
|
|
86
|
-
export function validateWorldService(..._args) { return gone('validateWorldService'); }
|
|
87
|
-
export function summarizeWorldFindings(..._args) { return gone('summarizeWorldFindings'); }
|
|
88
|
-
export function validateWorld(..._args) { return gone('validateWorld'); }
|
|
89
|
-
export function renderTwinHtml(..._args) { return gone('renderTwinHtml'); }
|
|
90
|
-
export function createVisualizerServer(..._args) { return gone('createVisualizerServer'); }
|
|
91
|
-
export function pushPending(..._args) { return gone('pushPending'); }
|
|
92
|
-
export function pushOperationOf(..._args) { return gone('pushOperationOf'); }
|
|
93
|
-
export function pushIdempotencyKeyOf(..._args) { return gone('pushIdempotencyKeyOf'); }
|
|
94
|
-
export function remoteRefs(..._args) { return gone('remoteRefs'); }
|
|
95
|
-
export function buildShadowState(..._args) { return gone('buildShadowState'); }
|
|
96
|
-
export function recordObservedDelta(..._args) { return gone('recordObservedDelta'); }
|
|
97
|
-
export function recordObservedDeltaLocked(..._args) { return gone('recordObservedDeltaLocked'); }
|
|
98
|
-
export function pollCursorPath(..._args) { return gone('pollCursorPath'); }
|
|
99
|
-
export function loadPollCursor(..._args) { return gone('loadPollCursor'); }
|
|
100
|
-
export function savePollCursor(..._args) { return gone('savePollCursor'); }
|
|
101
|
-
export function runConnectorPoll(..._args) { return gone('runConnectorPoll'); }
|
|
102
|
-
export function runConnectorSweep(..._args) { return gone('runConnectorSweep'); }
|
|
103
|
-
export function applyChangeset(..._args) { return gone('applyChangeset'); }
|
|
104
|
-
export function forkDivergence(..._args) { return gone('forkDivergence'); }
|
|
105
|
-
export function auditForkNoRealWrites(..._args) { return gone('auditForkNoRealWrites'); }
|
|
106
|
-
export function discardFork(..._args) { return gone('discardFork'); }
|
|
107
|
-
export function cherryPickActions(..._args) { return gone('cherryPickActions'); }
|
|
108
|
-
export function mergeForks(..._args) { return gone('mergeForks'); }
|
|
109
|
-
export function resetFork(..._args) { return gone('resetFork'); }
|
|
110
|
-
export function rebaseFork(..._args) { return gone('rebaseFork'); }
|
|
111
|
-
export const WRITE_INTENT_SUFFIX = '';
|
|
112
|
-
export const WRITE_RESULT_SUFFIX = '';
|
|
113
|
-
export class UnreconciledPushError extends Error {
|
|
114
|
-
constructor(message = 'v1 removed: UnreconciledPushError') { super(message); this.name = 'UnreconciledPushError'; }
|
|
115
|
-
}
|
|
116
|
-
export class NonFastForwardPushError extends Error {
|
|
117
|
-
constructor(message = 'v1 removed: NonFastForwardPushError') { super(message); this.name = 'NonFastForwardPushError'; }
|
|
118
|
-
}
|
|
119
|
-
export class UnreconciledWriteIntentError extends Error {
|
|
120
|
-
constructor(message = 'v1 removed: UnreconciledWriteIntentError') { super(message); this.name = 'UnreconciledWriteIntentError'; }
|
|
121
|
-
}
|
|
122
|
-
export class LeaseHeldError extends Error {
|
|
123
|
-
constructor(message = 'v1 removed: LeaseHeldError') { super(message); this.name = 'LeaseHeldError'; }
|
|
124
|
-
}
|
package/src/mirror-shell.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// A pack's mirror shell as a World serves it, at /<org>/<world>/<vendor>/mirror/ (the served World's
|
|
2
|
-
// mount and the hosted supervisor's): its <base> becomes the twin's place under the World, so the
|
|
3
|
-
// mirror's reads go to the World's wire; its assets stay under mirror/; and its own `#/` routes stay on
|
|
4
|
-
// the shell. A mirror links its routes as href="#/…", which the browser resolves against <base> — the
|
|
5
|
-
// twin's API path, not the shell — so a capture-phase handler moves the hash on the page instead.
|
|
6
|
-
|
|
7
|
-
const HASH_LINKS = `<script>document.addEventListener('click',function(e){var a=e.target&&e.target.closest&&e.target.closest('a[href^="#"]');if(!a||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;e.preventDefault();location.hash=a.getAttribute('href');},true);</script>`;
|
|
8
|
-
|
|
9
|
-
/** The shell's HTML mounted at `base` (the twin's place, ending in '/'). */
|
|
10
|
-
export function mirrorShellUnder(html: string, base: string): string {
|
|
11
|
-
const mounted = html
|
|
12
|
-
.replace(/<base href="[^"]*">/, `<base href="${base}">`)
|
|
13
|
-
.replace(/(href|src)="assets\//g, '$1="mirror/assets/');
|
|
14
|
-
return mounted.includes('</head>') ? mounted.replace('</head>', `${HASH_LINKS}</head>`) : `${HASH_LINKS}${mounted}`;
|
|
15
|
-
}
|
package/src/v1-removed.ts
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
// v1 LEFT THE KERNEL (company contract "Just like Neon", 5 — ruled 2026-09-06). These names are what
|
|
2
|
-
// a protocol 1 pack still imports: the push ledger, the shadow refs and bases, observed deltas as a
|
|
3
|
-
// row kind, egress intents, plans, leases, reconcile, remote refs, the queue lifecycle, the v1 status,
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
// validation and inspector, the poll runner, the v1 apply. Each throws on its first call. A pack
|
|
6
|
-
// that reaches one is out of date; the sweep moves it (protocol 2: the head, the fold, the tree).
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
-
// Reaching a tombstone is RECORDED, process-wide (one list whichever copy of the kernel the caller
|
|
9
|
-
// resolved), so a verify() that swallows the throw and answers false is still known to have reached
|
|
10
|
-
// v1 machinery: the capability runner reads this list around each verify and says "out of date".
|
|
11
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
12
|
-
|
|
13
|
-
const REACHED = Symbol.for('volter.v1.reached');
|
|
14
|
-
export function v1Reached(): string[] { return ((globalThis as Record<symbol, unknown>)[REACHED] ??= []) as string[]; }
|
|
15
|
-
// …and per SCOPE, so concurrent verifies attribute a reach to the one that made it (the runner opens a
|
|
16
|
-
// scope around each verify); one storage per process, whichever copy of the kernel the caller resolved
|
|
17
|
-
const SCOPE = Symbol.for('volter.v1.reached.scope');
|
|
18
|
-
// created on first use, never at import (a browser bundle has no AsyncLocalStorage; see observe.ts)
|
|
19
|
-
const scope = (): AsyncLocalStorage<string[]> => ((globalThis as Record<symbol, unknown>)[SCOPE] ??= new AsyncLocalStorage<string[]>()) as AsyncLocalStorage<string[]>;
|
|
20
|
-
/** Run `fn` and learn which v1 names it reached (directly or through anything it awaited). */
|
|
21
|
-
export async function v1ReachedIn<T>(fn: () => Promise<T>): Promise<{ value: T; reached: string[] }> {
|
|
22
|
-
const reached: string[] = [];
|
|
23
|
-
const value = await scope().run(reached, fn);
|
|
24
|
-
return { value, reached };
|
|
25
|
-
}
|
|
26
|
-
const gone = (name: string): any => { v1Reached().push(name); if (typeof AsyncLocalStorage === 'function') scope().getStore()?.push(name); throw new Error(`v1 removed: ${name} — protocol 2 replaces it (the head performs, the kernel folds observations, the tree is read); this pack is out of date until the sweep moves it`); };
|
|
27
|
-
|
|
28
|
-
export function appendEventLocked(..._args: any[]): any { return gone('appendEventLocked'); }
|
|
29
|
-
export function eventsLockPath(..._args: any[]): any { return gone('eventsLockPath'); }
|
|
30
|
-
export function appendPushRecord(..._args: any[]): any { return gone('appendPushRecord'); }
|
|
31
|
-
export function listPushLedger(..._args: any[]): any { return gone('listPushLedger'); }
|
|
32
|
-
export function latestPushByActionId(..._args: any[]): any { return gone('latestPushByActionId'); }
|
|
33
|
-
export function unconfirmedPushes(..._args: any[]): any { return gone('unconfirmedPushes'); }
|
|
34
|
-
export function assertFastForward(..._args: any[]): any { return gone('assertFastForward'); }
|
|
35
|
-
export function pushTransaction(..._args: any[]): any { return gone('pushTransaction'); }
|
|
36
|
-
export function abandonPush(..._args: any[]): any { return gone('abandonPush'); }
|
|
37
|
-
export function syncPull(..._args: any[]): any { return gone('syncPull'); }
|
|
38
|
-
export function syncPush(..._args: any[]): any { return gone('syncPush'); }
|
|
39
|
-
export function currentResources(..._args: any[]): any { return gone('currentResources'); }
|
|
40
|
-
export function isEgressEventType(..._args: any[]): any { return gone('isEgressEventType'); }
|
|
41
|
-
export function recordWriteIntent(..._args: any[]): any { return gone('recordWriteIntent'); }
|
|
42
|
-
export function performExternalWrite(..._args: any[]): any { return gone('performExternalWrite'); }
|
|
43
|
-
export function listUnreconciledWriteIntents(..._args: any[]): any { return gone('listUnreconciledWriteIntents'); }
|
|
44
|
-
export function listEgressLedger(..._args: any[]): any { return gone('listEgressLedger'); }
|
|
45
|
-
export function findWriteResultByExternal(..._args: any[]): any { return gone('findWriteResultByExternal'); }
|
|
46
|
-
export function transactionSetId(..._args: any[]): any { return gone('transactionSetId'); }
|
|
47
|
-
export function listPlanReviews(..._args: any[]): any { return gone('listPlanReviews'); }
|
|
48
|
-
export function latestPlanReview(..._args: any[]): any { return gone('latestPlanReview'); }
|
|
49
|
-
export function buildLocalActionPlan(..._args: any[]): any { return gone('buildLocalActionPlan'); }
|
|
50
|
-
export function recordPlanReview(..._args: any[]): any { return gone('recordPlanReview'); }
|
|
51
|
-
export function approvedPendingActionSet(..._args: any[]): any { return gone('approvedPendingActionSet'); }
|
|
52
|
-
export function assertPendingActionsApproved(..._args: any[]): any { return gone('assertPendingActionsApproved'); }
|
|
53
|
-
export function pendingConflicts(..._args: any[]): any { return gone('pendingConflicts'); }
|
|
54
|
-
export function buildApplyPlan(..._args: any[]): any { return gone('buildApplyPlan'); }
|
|
55
|
-
export function writePlan(..._args: any[]): any { return gone('writePlan'); }
|
|
56
|
-
export function readPlan(..._args: any[]): any { return gone('readPlan'); }
|
|
57
|
-
export function listPlans(..._args: any[]): any { return gone('listPlans'); }
|
|
58
|
-
export function planRequiresApproval(..._args: any[]): any { return gone('planRequiresApproval'); }
|
|
59
|
-
export function applyPlan(..._args: any[]): any { return gone('applyPlan'); }
|
|
60
|
-
export function listLeases(..._args: any[]): any { return gone('listLeases'); }
|
|
61
|
-
export function isLeaseActive(..._args: any[]): any { return gone('isLeaseActive'); }
|
|
62
|
-
export function activeLease(..._args: any[]): any { return gone('activeLease'); }
|
|
63
|
-
export function acquireLease(..._args: any[]): any { return gone('acquireLease'); }
|
|
64
|
-
export function releaseLease(..._args: any[]): any { return gone('releaseLease'); }
|
|
65
|
-
export function reconcile(..._args: any[]): any { return gone('reconcile'); }
|
|
66
|
-
export function isCleanlyReconcilable(..._args: any[]): any { return gone('isCleanlyReconcilable'); }
|
|
67
|
-
export function reconcileRequiresApproval(..._args: any[]): any { return gone('reconcileRequiresApproval'); }
|
|
68
|
-
export function writeRemoteRef(..._args: any[]): any { return gone('writeRemoteRef'); }
|
|
69
|
-
export function readRemoteRef(..._args: any[]): any { return gone('readRemoteRef'); }
|
|
70
|
-
export function listRemoteRefs(..._args: any[]): any { return gone('listRemoteRefs'); }
|
|
71
|
-
export function writeLocalRef(..._args: any[]): any { return gone('writeLocalRef'); }
|
|
72
|
-
export function readLocalRef(..._args: any[]): any { return gone('readLocalRef'); }
|
|
73
|
-
export function isBaseStale(..._args: any[]): any { return gone('isBaseStale'); }
|
|
74
|
-
export function setQueueRowStatus(..._args: any[]): any { return gone('setQueueRowStatus'); }
|
|
75
|
-
export function queueRowStatus(..._args: any[]): any { return gone('queueRowStatus'); }
|
|
76
|
-
export function listQueueWithStatus(..._args: any[]): any { return gone('listQueueWithStatus'); }
|
|
77
|
-
export function pendingQueueRows(..._args: any[]): any { return gone('pendingQueueRows'); }
|
|
78
|
-
export function queueCounts(..._args: any[]): any { return gone('queueCounts'); }
|
|
79
|
-
export function commitQueueRow(..._args: any[]): any { return gone('commitQueueRow'); }
|
|
80
|
-
export function ignoreQueueRow(..._args: any[]): any { return gone('ignoreQueueRow'); }
|
|
81
|
-
export function supersedeQueueRow(..._args: any[]): any { return gone('supersedeQueueRow'); }
|
|
82
|
-
export function poisonQueueRow(..._args: any[]): any { return gone('poisonQueueRow'); }
|
|
83
|
-
export function commitPendingQueue(..._args: any[]): any { return gone('commitPendingQueue'); }
|
|
84
|
-
export function worldStatus(..._args: any[]): any { return gone('worldStatus'); }
|
|
85
|
-
export function formatStatus(..._args: any[]): any { return gone('formatStatus'); }
|
|
86
|
-
export function discoverWorldServices(..._args: any[]): any { return gone('discoverWorldServices'); }
|
|
87
|
-
export function validateWorldService(..._args: any[]): any { return gone('validateWorldService'); }
|
|
88
|
-
export function summarizeWorldFindings(..._args: any[]): any { return gone('summarizeWorldFindings'); }
|
|
89
|
-
export function validateWorld(..._args: any[]): any { return gone('validateWorld'); }
|
|
90
|
-
export function renderTwinHtml(..._args: any[]): any { return gone('renderTwinHtml'); }
|
|
91
|
-
export function createVisualizerServer(..._args: any[]): any { return gone('createVisualizerServer'); }
|
|
92
|
-
export function pushPending(..._args: any[]): any { return gone('pushPending'); }
|
|
93
|
-
export function pushOperationOf(..._args: any[]): any { return gone('pushOperationOf'); }
|
|
94
|
-
export function pushIdempotencyKeyOf(..._args: any[]): any { return gone('pushIdempotencyKeyOf'); }
|
|
95
|
-
export function remoteRefs(..._args: any[]): any { return gone('remoteRefs'); }
|
|
96
|
-
export function buildShadowState(..._args: any[]): any { return gone('buildShadowState'); }
|
|
97
|
-
export function recordObservedDelta(..._args: any[]): any { return gone('recordObservedDelta'); }
|
|
98
|
-
export function recordObservedDeltaLocked(..._args: any[]): any { return gone('recordObservedDeltaLocked'); }
|
|
99
|
-
export function pollCursorPath(..._args: any[]): any { return gone('pollCursorPath'); }
|
|
100
|
-
export function loadPollCursor(..._args: any[]): any { return gone('loadPollCursor'); }
|
|
101
|
-
export function savePollCursor(..._args: any[]): any { return gone('savePollCursor'); }
|
|
102
|
-
export function runConnectorPoll(..._args: any[]): any { return gone('runConnectorPoll'); }
|
|
103
|
-
export function runConnectorSweep(..._args: any[]): any { return gone('runConnectorSweep'); }
|
|
104
|
-
export function applyChangeset(..._args: any[]): any { return gone('applyChangeset'); }
|
|
105
|
-
export function forkDivergence(..._args: any[]): any { return gone('forkDivergence'); }
|
|
106
|
-
export function auditForkNoRealWrites(..._args: any[]): any { return gone('auditForkNoRealWrites'); }
|
|
107
|
-
export function discardFork(..._args: any[]): any { return gone('discardFork'); }
|
|
108
|
-
export function cherryPickActions(..._args: any[]): any { return gone('cherryPickActions'); }
|
|
109
|
-
export function mergeForks(..._args: any[]): any { return gone('mergeForks'); }
|
|
110
|
-
export function resetFork(..._args: any[]): any { return gone('resetFork'); }
|
|
111
|
-
export function rebaseFork(..._args: any[]): any { return gone('rebaseFork'); }
|
|
112
|
-
export const WRITE_INTENT_SUFFIX = '';
|
|
113
|
-
export const WRITE_RESULT_SUFFIX = '';
|
|
114
|
-
export class UnreconciledPushError extends Error { constructor(message = 'v1 removed: UnreconciledPushError') { super(message); this.name = 'UnreconciledPushError'; } }
|
|
115
|
-
export class NonFastForwardPushError extends Error { constructor(message = 'v1 removed: NonFastForwardPushError') { super(message); this.name = 'NonFastForwardPushError'; } }
|
|
116
|
-
export class UnreconciledWriteIntentError extends Error { constructor(message = 'v1 removed: UnreconciledWriteIntentError') { super(message); this.name = 'UnreconciledWriteIntentError'; } }
|
|
117
|
-
export class LeaseHeldError extends Error { constructor(message = 'v1 removed: LeaseHeldError') { super(message); this.name = 'LeaseHeldError'; } }
|
|
118
|
-
export type PushStatus = any;
|
|
119
|
-
export type WorldPushRecord = any;
|
|
120
|
-
export type SyncResource = any;
|
|
121
|
-
export type PullResult = any;
|
|
122
|
-
export type PushItemResult = any;
|
|
123
|
-
export type PushResult = any;
|
|
124
|
-
export type EgressActor = any;
|
|
125
|
-
export type EgressWriteRequest = any;
|
|
126
|
-
export type EgressWriteOutcome = any;
|
|
127
|
-
export type EgressWriteResult = any;
|
|
128
|
-
export type EgressLedgerEntry = any;
|
|
129
|
-
export type ProviderCall = any;
|
|
130
|
-
export type WorldApplyPlan = any;
|
|
131
|
-
export type PlanReviewDecision = any;
|
|
132
|
-
export type PlanReviewRecord = any;
|
|
133
|
-
export type LocalActionPlan = any;
|
|
134
|
-
export type ApprovedPendingActionSet = any;
|
|
135
|
-
export type ActionMapper = any;
|
|
136
|
-
export type ApplyResult = any;
|
|
137
|
-
export type WorldApplyLease = any;
|
|
138
|
-
export type ReconcilePolicy = any;
|
|
139
|
-
export type FieldDecision = any;
|
|
140
|
-
export type SubjectReconcile = any;
|
|
141
|
-
export type ReconcilePlan = any;
|
|
142
|
-
export type WorldRemoteRef = any;
|
|
143
|
-
export type WorldLocalRef = any;
|
|
144
|
-
export type QueueRowStatus = any;
|
|
145
|
-
export type QueueStatusTransition = any;
|
|
146
|
-
export type QueueRowWithStatus = any;
|
|
147
|
-
export type QueueCounts = any;
|
|
148
|
-
export type WorldStatus = any;
|
|
149
|
-
export type WorldValidationFinding = any;
|
|
150
|
-
export type WorldValidationSummary = any;
|
|
151
|
-
export type WorldValidationReport = any;
|
|
152
|
-
export type PushReport = any;
|
|
153
|
-
export type RemoteRefsMode = any;
|
|
154
|
-
export type ShadowState = any;
|
|
155
|
-
export type SubjectFieldExtractor = any;
|
|
156
|
-
export type DeltaObservation = any;
|
|
157
|
-
export type DeltaResult = any;
|
|
158
|
-
export type ConnectorObservation = any;
|
|
159
|
-
export type WorldConnector = any;
|
|
160
|
-
export type ConnectorPollResult = any;
|
|
161
|
-
export type SweepConnector = any;
|
|
162
|
-
export type ConnectorSweepResult = any;
|
|
163
|
-
export type CopyResult = any;
|
|
164
|
-
export type ForkAudit = any;
|
|
165
|
-
export type ForkDivergence = any;
|
|
166
|
-
export type SubjectDivergence = any;
|
|
167
|
-
export type FieldDivergence = any;
|
|
168
|
-
export type ApplyTarget = any;
|
|
169
|
-
export type ApplyChangesetOutcome = any;
|
|
170
|
-
export type TwinProxy = any;
|
|
171
|
-
export type TwinProxyOptions = any;
|
|
172
|
-
export type VendorRoute = any;
|