@githolon/runtime 0.113.3 → 0.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/RUNTIME-SOURCES.sha256 +53 -44
  2. package/dist/application-reception.js +1 -1
  3. package/dist/nomos-native-runtime.js +2613 -601
  4. package/dist/nomos-runner-web.js +12 -2
  5. package/dist/nomos-runner-worker.js +3066 -863
  6. package/dist/nomos-runner.js +3011 -844
  7. package/dist/remote-reception.cjs +21 -21
  8. package/dist/remote-reception.js +21 -21
  9. package/dist/typescript-application-desk.js +24 -25
  10. package/package.json +1 -1
  11. package/runner/node-entry.mjs +2807 -691
  12. package/src/protocol/nomos/kernel/v1/kernel_pb.d.ts +349 -0
  13. package/src/protocol/nomos/kernel/v1/kernel_pb.js +310 -275
  14. package/src/protocol/nomos/runtime/v2/application_desk_pb.d.ts +8 -0
  15. package/src/protocol/nomos/runtime/v2/application_desk_pb.js +1 -1
  16. package/src/protocol/nomos/runtime/v2/correspondence_desk_pb.d.ts +220 -0
  17. package/src/protocol/nomos/runtime/v2/correspondence_desk_pb.js +62 -20
  18. package/src/protocol/nomos/runtime/v2/model_adoption_desk_pb.d.ts +14 -2
  19. package/src/protocol/nomos/runtime/v2/model_adoption_desk_pb.js +1 -1
  20. package/src/protocol/nomos/runtime/v2/observability_desk_pb.d.ts +111 -2
  21. package/src/protocol/nomos/runtime/v2/observability_desk_pb.js +27 -12
  22. package/src/protocol/nomos/runtime/v2/receiving_group_desk_pb.d.ts +0 -29
  23. package/src/protocol/nomos/runtime/v2/receiving_group_desk_pb.js +6 -13
  24. package/src/protocol/nomos/runtime/v2/residency_desk_pb.d.ts +19 -0
  25. package/src/protocol/nomos/runtime/v2/residency_desk_pb.js +1 -1
  26. package/src/typescript_application_desk.public.d.ts +0 -1
@@ -714,6 +714,15 @@ export declare type OfferAdmitted = Message<"nomos.kernel.v1.OfferAdmitted"> & {
714
714
  * @generated from field: bool already_applied = 12;
715
715
  */
716
716
  alreadyApplied: boolean;
717
+
718
+ /**
719
+ * What this offer changed in the workspace's current state, typed the way reads resolve it, so a
720
+ * host can tell which declared reads the offer can change (CAP-760). Absent when the kernel cannot
721
+ * say exactly; a host then treats every read as changed.
722
+ *
723
+ * @generated from field: optional nomos.kernel.v1.OfferStateChange state_change = 13;
724
+ */
725
+ stateChange?: OfferStateChange | undefined;
717
726
  };
718
727
 
719
728
  /**
@@ -722,6 +731,42 @@ export declare type OfferAdmitted = Message<"nomos.kernel.v1.OfferAdmitted"> & {
722
731
  */
723
732
  export declare const OfferAdmittedSchema: GenMessage<OfferAdmitted>;
724
733
 
734
+ /**
735
+ * The aggregates one admitted offer changed, by the type a read resolves for each (its `__type`,
736
+ * else its id), between the head it was admitted on and the head it produced. Exact or wider,
737
+ * never narrower: every aggregate whose state differs between the two heads is counted.
738
+ *
739
+ * @generated from message nomos.kernel.v1.OfferStateChange
740
+ */
741
+ export declare type OfferStateChange = Message<"nomos.kernel.v1.OfferStateChange"> & {
742
+ /**
743
+ * The head this offer was admitted on; OfferAdmitted.head is its child.
744
+ *
745
+ * @generated from field: string parent_head = 1;
746
+ */
747
+ parentHead: string;
748
+
749
+ /**
750
+ * Sorted, without duplicates.
751
+ *
752
+ * @generated from field: repeated string aggregate_types = 2;
753
+ */
754
+ aggregateTypes: string[];
755
+
756
+ /**
757
+ * An aggregate this offer changed may be absent (archived) at the new head.
758
+ *
759
+ * @generated from field: bool archives = 3;
760
+ */
761
+ archives: boolean;
762
+ };
763
+
764
+ /**
765
+ * Describes the message nomos.kernel.v1.OfferStateChange.
766
+ * Use `create(OfferStateChangeSchema)` to create a new message.
767
+ */
768
+ export declare const OfferStateChangeSchema: GenMessage<OfferStateChange>;
769
+
725
770
  /**
726
771
  * @generated from message nomos.kernel.v1.OfferAggregateRef
727
772
  */
@@ -1922,6 +1967,17 @@ export declare type QueryResponse = Message<"nomos.kernel.v1.QueryResponse"> & {
1922
1967
  */
1923
1968
  value: InstalledLawDeclarationsResponse;
1924
1969
  case: "installedLawDeclarations";
1970
+ } | {
1971
+ /**
1972
+ * Incremental answer to a RowsQuery carrying `since_frontier` (CAP-731). The kernel computed
1973
+ * it from the exact state change set between the two read positions, under the same read
1974
+ * policies, principal and visibility as a full read. Merging it into the result read at
1975
+ * `base_frontier` yields, byte for byte, the full result at `frontier`.
1976
+ *
1977
+ * @generated from field: nomos.kernel.v1.ApplicationResultDelta application_result_delta = 31;
1978
+ */
1979
+ value: ApplicationResultDelta;
1980
+ case: "applicationResultDelta";
1925
1981
  } | { case: undefined; value?: undefined };
1926
1982
 
1927
1983
  /**
@@ -1932,6 +1988,32 @@ export declare type QueryResponse = Message<"nomos.kernel.v1.QueryResponse"> & {
1932
1988
  * @generated from field: nomos.kernel.v1.VerifyChainDiagnostics verify_chain_diagnostics = 20;
1933
1989
  */
1934
1990
  verifyChainDiagnostics?: VerifyChainDiagnostics | undefined;
1991
+
1992
+ /**
1993
+ * The kernel-issued read position of a complete `application_result` for a declared rows
1994
+ * query. Opaque to every caller: only the kernel interprets it, when it comes back as
1995
+ * `RowsQuery.since_frontier`. Absent on every other result.
1996
+ *
1997
+ * @generated from field: optional string result_frontier = 32;
1998
+ */
1999
+ resultFrontier?: string | undefined;
2000
+
2001
+ /**
2002
+ * Why a RowsQuery that asked for a delta (`since_frontier`) was answered in full. Present only
2003
+ * on such answers; a real failure is a Failure, never a reason.
2004
+ *
2005
+ * @generated from field: optional nomos.kernel.v1.FullResultReason full_result_reason = 33;
2006
+ */
2007
+ fullResultReason?: FullResultReason | undefined;
2008
+
2009
+ /**
2010
+ * What can change the answer of a declared rows query at its read position (CAP-760): present
2011
+ * beside `result_frontier` or an `application_result_delta` when the kernel can name it exactly.
2012
+ * Absent means anything may change it.
2013
+ *
2014
+ * @generated from field: optional nomos.kernel.v1.ReadDependencies result_dependencies = 34;
2015
+ */
2016
+ resultDependencies?: ReadDependencies | undefined;
1935
2017
  };
1936
2018
 
1937
2019
  /**
@@ -1940,6 +2022,85 @@ export declare type QueryResponse = Message<"nomos.kernel.v1.QueryResponse"> & {
1940
2022
  */
1941
2023
  export declare const QueryResponseSchema: GenMessage<QueryResponse>;
1942
2024
 
2025
+ /**
2026
+ * The state a declared rows result reads, from the installed read law. A state change touching none
2027
+ * of it leaves the next delta from this result's position empty. Exact or wider, never narrower.
2028
+ *
2029
+ * @generated from message nomos.kernel.v1.ReadDependencies
2030
+ */
2031
+ export declare type ReadDependencies = Message<"nomos.kernel.v1.ReadDependencies"> & {
2032
+ /**
2033
+ * Aggregate types (as OfferStateChange.aggregate_types names them) whose state the rows, their
2034
+ * membership or the read law come from. Sorted, without duplicates.
2035
+ *
2036
+ * @generated from field: repeated string aggregate_types = 1;
2037
+ */
2038
+ aggregateTypes: string[];
2039
+
2040
+ /**
2041
+ * A combined field reads a related row by reference: an archive of any aggregate may change it.
2042
+ *
2043
+ * @generated from field: bool reads_archives = 2;
2044
+ */
2045
+ readsArchives: boolean;
2046
+
2047
+ /**
2048
+ * The commit whose state this answer shows (as OfferStateChange.parent_head names a head).
2049
+ *
2050
+ * @generated from field: string read_at = 3;
2051
+ */
2052
+ readAt: string;
2053
+ };
2054
+
2055
+ /**
2056
+ * Describes the message nomos.kernel.v1.ReadDependencies.
2057
+ * Use `create(ReadDependenciesSchema)` to create a new message.
2058
+ */
2059
+ export declare const ReadDependenciesSchema: GenMessage<ReadDependencies>;
2060
+
2061
+ /**
2062
+ * The rows of one declared query that changed between two kernel-issued read positions.
2063
+ *
2064
+ * @generated from message nomos.kernel.v1.ApplicationResultDelta
2065
+ */
2066
+ export declare type ApplicationResultDelta = Message<"nomos.kernel.v1.ApplicationResultDelta"> & {
2067
+ /**
2068
+ * The position the caller's result must be at (the request's `since_frontier`).
2069
+ *
2070
+ * @generated from field: string base_frontier = 1;
2071
+ */
2072
+ baseFrontier: string;
2073
+
2074
+ /**
2075
+ * The position this delta advances it to; the next request's `since_frontier`.
2076
+ *
2077
+ * @generated from field: string frontier = 2;
2078
+ */
2079
+ frontier: string;
2080
+
2081
+ /**
2082
+ * Every added or changed visible row, encoded with the SAME `QueryResult_<identity>` contract as
2083
+ * the full result (rows sorted by id; no page metadata), so generated decoders decode it.
2084
+ *
2085
+ * @generated from field: google.protobuf.Any changed_rows = 3;
2086
+ */
2087
+ changedRows?: Any | undefined;
2088
+
2089
+ /**
2090
+ * Ids that no longer belong to the result. Sorted, disjoint from `changed_rows`; an id the
2091
+ * caller never held is a no-op.
2092
+ *
2093
+ * @generated from field: repeated string removed_ids = 4;
2094
+ */
2095
+ removedIds: string[];
2096
+ };
2097
+
2098
+ /**
2099
+ * Describes the message nomos.kernel.v1.ApplicationResultDelta.
2100
+ * Use `create(ApplicationResultDeltaSchema)` to create a new message.
2101
+ */
2102
+ export declare const ApplicationResultDeltaSchema: GenMessage<ApplicationResultDelta>;
2103
+
1943
2104
  /**
1944
2105
  * OpenAPI is already a JSON document, not a tenant value or a recursive NomosValue tree.
1945
2106
  * Intermediate runtimes forward it without parsing/reconstructing every schema property.
@@ -2150,6 +2311,42 @@ export declare type MaintenanceQuantumQuery = Message<"nomos.kernel.v1.Maintenan
2150
2311
  * @generated from field: bool read_index_only = 6;
2151
2312
  */
2152
2313
  readIndexOnly: boolean;
2314
+
2315
+ /**
2316
+ * The idle pin quantum: pin the live positions the current raw frontier index
2317
+ * does not serve (normally the admitted frontier behind unsynced local
2318
+ * writes), once per position, and prune every other addressed derivative in
2319
+ * bounded batches. No reader waits on it, so the host sends it only after the
2320
+ * workspace has been write-idle for a quiet window, never during a burst.
2321
+ * Exclusive of the other modes; maintenance_pending asks for another quantum.
2322
+ *
2323
+ * @generated from field: bool maintain_addressed_frontiers = 7;
2324
+ */
2325
+ maintainAddressedFrontiers: boolean;
2326
+
2327
+ /**
2328
+ * The durability flush quantum (CAP-746). Under the deferred durability policy a save forces
2329
+ * nothing to stable storage; the kernel owes every file it wrote to one ordered flush (objects,
2330
+ * then refs, then disposable SQLite, then a last-known-good marker per workspace). The host
2331
+ * decides WHEN (after a short write-quiet window, bounded during a long burst); the kernel
2332
+ * decides WHAT, and flushes everything it owes, whichever workspace the quantum names. A no-op
2333
+ * under the synchronous policy. Exclusive of the other modes; maintenance_pending asks for
2334
+ * another quantum.
2335
+ *
2336
+ * @generated from field: bool flush_durability = 8;
2337
+ */
2338
+ flushDurability: boolean;
2339
+
2340
+ /**
2341
+ * The peer's local writes are in a burst (CAP-750). Packing loose custody objects waits for the
2342
+ * person to pause, so the host sends a custody quantum (maintain_git_custody) during a burst
2343
+ * only after the kernel reported loose_custody_pressure. The kernel then packs one small slice of
2344
+ * loose objects and does nothing else in that quantum: no staged-pack promotion, no multi-pack
2345
+ * index or repack step, no command warming.
2346
+ *
2347
+ * @generated from field: bool local_write_burst = 9;
2348
+ */
2349
+ localWriteBurst: boolean;
2153
2350
  };
2154
2351
 
2155
2352
  /**
@@ -2216,6 +2413,15 @@ export declare type MaintenanceQuantumResponse = Message<"nomos.kernel.v1.Mainte
2216
2413
  * @generated from field: optional string prepared_command_selector = 11;
2217
2414
  */
2218
2415
  preparedCommandSelector?: string | undefined;
2416
+
2417
+ /**
2418
+ * The loose objects this kernel instance has written and not yet packed exceed the growth guard
2419
+ * (CAP-750). Reported on every maintenance quantum, so a host holding custody packing back for a
2420
+ * burst learns when an endless burst must pack in small slices after all.
2421
+ *
2422
+ * @generated from field: bool loose_custody_pressure = 12;
2423
+ */
2424
+ looseCustodyPressure: boolean;
2219
2425
  };
2220
2426
 
2221
2427
  /**
@@ -3106,6 +3312,16 @@ export declare type SyncResponse = Message<"nomos.kernel.v1.SyncResponse"> & {
3106
3312
  * @generated from field: repeated string parked_local_refs = 14;
3107
3313
  */
3108
3314
  parkedLocalRefs: string[];
3315
+
3316
+ /**
3317
+ * The replay spent its `replay_offer_budget` before finishing (CAP-757). Nothing was published:
3318
+ * live main is unchanged and `head` is still the live head. The kernel keeps its private
3319
+ * candidate; the same request again continues it from the next offer. Every other field is
3320
+ * empty until the answer that completes the replay.
3321
+ *
3322
+ * @generated from field: bool replay_pending = 15;
3323
+ */
3324
+ replayPending: boolean;
3109
3325
  };
3110
3326
 
3111
3327
  /**
@@ -5138,6 +5354,16 @@ export declare type RowsQuery = Message<"nomos.kernel.v1.RowsQuery"> & {
5138
5354
  * @generated from field: google.protobuf.Any application_arguments = 5;
5139
5355
  */
5140
5356
  applicationArguments?: Any | undefined;
5357
+
5358
+ /**
5359
+ * Opt-in incremental read (CAP-731): the `result_frontier` (or delta `frontier`) of the result
5360
+ * the caller holds for this exact query and arguments. The kernel answers with an
5361
+ * `application_result_delta` from that position, or with the full result and a typed
5362
+ * `full_result_reason`. Only valid with the application Protobuf result format.
5363
+ *
5364
+ * @generated from field: optional string since_frontier = 6;
5365
+ */
5366
+ sinceFrontier?: string | undefined;
5141
5367
  };
5142
5368
 
5143
5369
  /**
@@ -6145,6 +6371,17 @@ export declare type SyncRequest = Message<"nomos.kernel.v1.SyncRequest"> & {
6145
6371
  * @generated from field: uint64 parked_at_millis = 5;
6146
6372
  */
6147
6373
  parkedAtMillis: bigint;
6374
+
6375
+ /**
6376
+ * The most offers (incoming and local) this call judges before it answers `replay_pending`
6377
+ * (CAP-757). Receiving a backlog is then bounded steps the host interleaves with foreground
6378
+ * work, never one call that holds the kernel for the whole backlog. Absent or 0 replays
6379
+ * everything in one call, as before. Local writes made between steps are rebased in the same
6380
+ * replay; anything else that moves live main starts it again.
6381
+ *
6382
+ * @generated from field: uint32 replay_offer_budget = 6;
6383
+ */
6384
+ replayOfferBudget: number;
6148
6385
  };
6149
6386
 
6150
6387
  /**
@@ -6180,6 +6417,28 @@ export declare type KernelConfigurationRequest = Message<"nomos.kernel.v1.Kernel
6180
6417
  * @generated from field: optional bool trusts_custodian_history = 2;
6181
6418
  */
6182
6419
  trustsCustodianHistory?: boolean | undefined;
6420
+
6421
+ /**
6422
+ * A peer property, not law (CAP-746): this peer is a personal device whose saves acknowledge
6423
+ * once their writes reach the OS. The kernel forces nothing to stable storage on the hot path
6424
+ * and owes it to an ordered background flush (MaintenanceQuantumQuery.flush_durability); a
6425
+ * reopen after an unclean shutdown returns main to the last flushed head if its newer custody
6426
+ * is unreadable and rebuilds unsynced disposable indexes. Absent or false keeps synchronous
6427
+ * durability (the cloud custodian). Immutable once set.
6428
+ *
6429
+ * @generated from field: optional bool deferred_durability = 3;
6430
+ */
6431
+ deferredDurability?: boolean | undefined;
6432
+
6433
+ /**
6434
+ * Observability only, never law: this host counts the host calls it services into the kernel's
6435
+ * per-offer phase ledger (kernel/src/offer_phases.rs). The kernel answers with the ledger's
6436
+ * address in its own linear memory; the host adds one call and its nanoseconds there for every
6437
+ * host call, and reads the finished offer line back from the same block. Changes no judgment.
6438
+ *
6439
+ * @generated from field: bool host_call_ledger = 4;
6440
+ */
6441
+ hostCallLedger: boolean;
6183
6442
  };
6184
6443
 
6185
6444
  /**
@@ -6196,6 +6455,13 @@ export declare type KernelConfigurationResponse = Message<"nomos.kernel.v1.Kerne
6196
6455
  * @generated from field: nomos.kernel.v1.Acknowledged result = 1;
6197
6456
  */
6198
6457
  result?: Acknowledged | undefined;
6458
+
6459
+ /**
6460
+ * Present when the request asked for `host_call_ledger`: the ledger block's linear-memory address.
6461
+ *
6462
+ * @generated from field: optional uint32 host_call_ledger = 2;
6463
+ */
6464
+ hostCallLedger?: number | undefined;
6199
6465
  };
6200
6466
 
6201
6467
  /**
@@ -6891,6 +7157,16 @@ export declare type IntentsAboveRequest = Message<"nomos.kernel.v1.IntentsAboveR
6891
7157
  * @generated from field: bool compact_stored = 7;
6892
7158
  */
6893
7159
  compactStored: boolean;
7160
+
7161
+ /**
7162
+ * With `base` and a nonzero `limit`: the `limit` commits immediately ABOVE base, oldest first,
7163
+ * rather than the newest `limit` below head. A bounded continuation from a boundary the
7164
+ * receiver already holds; only the selected commits' changes are read. Refused when base is
7165
+ * not on head's first-parent chain.
7166
+ *
7167
+ * @generated from field: bool from_base = 8;
7168
+ */
7169
+ fromBase: boolean;
6894
7170
  };
6895
7171
 
6896
7172
  /**
@@ -10150,6 +10426,79 @@ export enum KernelRefusalCode {
10150
10426
  */
10151
10427
  export declare const KernelRefusalCodeSchema: GenEnum<KernelRefusalCode>;
10152
10428
 
10429
+ /**
10430
+ * Typed premise for answering a delta request with the complete result.
10431
+ *
10432
+ * @generated from enum nomos.kernel.v1.FullResultReason
10433
+ */
10434
+ export enum FullResultReason {
10435
+ /**
10436
+ * @generated from enum value: FULL_RESULT_REASON_UNSPECIFIED = 0;
10437
+ */
10438
+ UNSPECIFIED = 0,
10439
+
10440
+ /**
10441
+ * The request named no base position.
10442
+ *
10443
+ * @generated from enum value: FULL_RESULT_REASON_NO_BASE = 1;
10444
+ */
10445
+ NO_BASE = 1,
10446
+
10447
+ /**
10448
+ * The installed law changed between the two positions.
10449
+ *
10450
+ * @generated from enum value: FULL_RESULT_REASON_LAW_CHANGED = 2;
10451
+ */
10452
+ LAW_CHANGED = 2,
10453
+
10454
+ /**
10455
+ * The principal, or the workspace-wide grant the read relied on, changed.
10456
+ *
10457
+ * @generated from enum value: FULL_RESULT_REASON_READ_AUTHORITY_CHANGED = 3;
10458
+ */
10459
+ READ_AUTHORITY_CHANGED = 3,
10460
+
10461
+ /**
10462
+ * The principal reads this type record by record; visibility is not a function of the rows.
10463
+ *
10464
+ * @generated from enum value: FULL_RESULT_REASON_PER_RECORD_REFUSAL = 4;
10465
+ */
10466
+ PER_RECORD_REFUSAL = 4,
10467
+
10468
+ /**
10469
+ * An ordered read is selected by its declared order and limit, not by membership.
10470
+ *
10471
+ * @generated from enum value: FULL_RESULT_REASON_ORDERED_READ = 5;
10472
+ */
10473
+ ORDERED_READ = 5,
10474
+
10475
+ /**
10476
+ * The rows carry clock-derived fields whose value changes without a state change.
10477
+ *
10478
+ * @generated from enum value: FULL_RESULT_REASON_TEMPORAL_FIELDS = 6;
10479
+ */
10480
+ TEMPORAL_FIELDS = 6,
10481
+
10482
+ /**
10483
+ * This replica no longer holds the base position's state.
10484
+ *
10485
+ * @generated from enum value: FULL_RESULT_REASON_BASE_UNAVAILABLE = 7;
10486
+ */
10487
+ BASE_UNAVAILABLE = 7,
10488
+
10489
+ /**
10490
+ * One of the positions predates the state-tree format, which has no exact change set.
10491
+ *
10492
+ * @generated from enum value: FULL_RESULT_REASON_LEGACY_STATE = 8;
10493
+ */
10494
+ LEGACY_STATE = 8,
10495
+ }
10496
+
10497
+ /**
10498
+ * Describes the enum nomos.kernel.v1.FullResultReason.
10499
+ */
10500
+ export declare const FullResultReasonSchema: GenEnum<FullResultReason>;
10501
+
10153
10502
  /**
10154
10503
  * VINTF-inspired compatibility algebra over Nomos's canonical OpenUSD law.
10155
10504
  * The application matrix is USDA; Protobuf carries only the closed request and