@cotal-ai/runtime 0.168.0 → 0.170.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/mesh-handler.d.ts +38 -153
- package/dist/mesh-handler.d.ts.map +1 -1
- package/dist/mesh-handler.js +41 -624
- package/dist/mesh-handler.js.map +1 -1
- package/dist/mesh-pause-timers.d.ts +119 -0
- package/dist/mesh-pause-timers.d.ts.map +1 -0
- package/dist/mesh-pause-timers.js +369 -0
- package/dist/mesh-pause-timers.js.map +1 -0
- package/dist/mesh-seat-watch.d.ts +142 -0
- package/dist/mesh-seat-watch.d.ts.map +1 -0
- package/dist/mesh-seat-watch.js +309 -0
- package/dist/mesh-seat-watch.js.map +1 -0
- package/dist/offline-command.d.ts.map +1 -1
- package/dist/offline-command.js +24 -22
- package/dist/offline-command.js.map +1 -1
- package/dist/run-command.d.ts.map +1 -1
- package/dist/run-command.js +21 -27
- package/dist/run-command.js.map +1 -1
- package/dist/run-driver.d.ts +1 -0
- package/dist/run-driver.d.ts.map +1 -1
- package/dist/run-driver.js +20 -15
- package/dist/run-driver.js.map +1 -1
- package/dist/run-host.d.ts.map +1 -1
- package/dist/run-host.js +2 -1
- package/dist/run-host.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -41,11 +41,11 @@ const runCommand = {
|
|
|
41
41
|
subcommands: [
|
|
42
42
|
{ name: "list", aliases: ["ps"], hidden: true, summary: "list recorded workflow runs", reads: true, outputs: ["json", "plain"] },
|
|
43
43
|
{ name: "start", flagNames: ["space", "server", "creds", "on", "file", "local", "admit-read", "admit-publish", "endpoint", "timeout", "json", "plain"], summary: "start a workflow on the manager", examples: [{ command: "cotal run start <file>", note: "start a workflow on your manager" }, { command: "cotal run start <file> --on <instance>", note: "start it on one named manager" }], usage: "cotal run start <file> [--on <instance>] [--timeout <dur>] [--json|--plain] | run start <file> --local --admit-read <channels> --admit-publish <channels> [--endpoint <ep>]", outputs: ["json", "plain"] },
|
|
44
|
-
{ name: "show", aliases: ["journal"], flagNames: ["space", "server", "creds", "on", "local", "endpoint", "json", "plain"], summary: "read recorded state, open requests and journal", examples: [{ command: "cotal run show <run-id>", note: "read a run's state and recent journal" }, { command: "cotal run show <run-id> --json", note: "the same as one JSON document" }], usage: "cotal run show <run-id> [--on <instance> | --local] [--endpoint <ep>] [--json|--plain]", reads: true, outputs: ["json", "plain"] },
|
|
44
|
+
{ name: "show", aliases: ["journal"], flagNames: ["space", "server", "creds", "on", "local", "endpoint", "limit", "json", "plain"], summary: "read recorded state, open requests and journal", examples: [{ command: "cotal run show <run-id>", note: "read a run's state and recent journal" }, { command: "cotal run show <run-id> --json", note: "the same as one JSON document" }], usage: "cotal run show <run-id> [--on <instance> | --local] [--endpoint <ep>] [--limit <n>] [--json|--plain]", reads: true, outputs: ["json", "plain"] },
|
|
45
45
|
{ name: "resume", flagNames: ["space", "server", "creds", "on", "file", "local", "endpoint", "timeout", "json", "plain"], summary: "resume a workflow from its recorded program", examples: [{ command: "cotal run resume <run-id>", note: "resume a stopped run from its recorded program" }], usage: "cotal run resume <run-id> [--on <instance>] [--timeout <dur>] [--json|--plain] | run resume <run-id> --local [--file <program>] [--endpoint <ep>]", outputs: ["json", "plain"] },
|
|
46
46
|
{ name: "answer", flagNames: ["space", "server", "creds", "on", "local", "endpoint", "by", "value", "artifact", "json", "plain"], summary: "answer an open checkpoint or ask", examples: [{ command: "cotal run answer <run-id> <step> --value '<json>'", note: "answer a step that waits for you" }], usage: "cotal run answer <run-id> <step> [--value <json>] [--artifact <ref>] [--on <instance> | --local --by <who>] [--endpoint <ep>] [--json|--plain]", outputs: ["json", "plain"] },
|
|
47
47
|
{ name: "amend", flagNames: ["space", "server", "creds", "on", "local", "endpoint", "by", "value", "artifact", "json", "plain"], summary: "record an amendment without reopening the pause", examples: [{ command: "cotal run amend <run-id> <step> --value '<json>'", note: "change an answer you already gave" }], usage: "cotal run amend <run-id> <step> [--value <json>] [--artifact <ref>] [--on <instance> | --local --by <who>] [--endpoint <ep>] [--json|--plain]", outputs: ["json", "plain"] },
|
|
48
|
-
{ name: "check", aliases: ["migrate"], flagNames: ["space", "server", "creds", "endpoint"], summary: "check an edited program against a recorded journal without committing it", examples: [{ command: "cotal run check <run-id> <file>", note: "check whether an edited program fits a run" }], usage: "cotal run check <run-id> <file> [--endpoint <ep>]", reads: true },
|
|
48
|
+
{ name: "check", aliases: ["migrate"], flagNames: ["space", "server", "creds", "file", "local", "endpoint"], summary: "check an edited program against a recorded journal without committing it", examples: [{ command: "cotal run check <run-id> <file>", note: "check whether an edited program fits a run" }], usage: "cotal run check <run-id> (<file> | --file <program>) [--local] [--endpoint <ep>]", reads: true },
|
|
49
49
|
{ name: "revoke", flagNames: ["space", "server", "creds", "local", "by", "reason", "endpoint"], summary: "revoke run admission; it does not cancel work that touches no channel", examples: [{ command: "cotal run revoke <run-id> --local --by <who> --reason <text>", note: "revoke a local run's admission" }], usage: "cotal run revoke <run-id> --local --by <who> --reason <text> [--endpoint <ep>]" },
|
|
50
50
|
...["validate", "plan", "simulate"].map((name) => ({ name, flagNames: name === "simulate" ? ["handler", "json", "plain"] : ["json", "plain"], summary: name === "validate" ? "validate cotal-lang offline" : name === "plan" ? "show validated static call sites offline" : "simulate with explicit JSON results offline", examples: name === "validate" ? [{ command: "cotal run validate <file>", note: "check a workflow program offline" }] : name === "plan" ? [{ command: "cotal run plan <file>", note: "list the calls a program makes, offline" }] : [{ command: "cotal run simulate <file> --handler <results.json>", note: "run a program offline with canned results" }], usage: name === "simulate" ? "cotal run simulate <file> [--handler <results.json>] [--json|--plain]" : `cotal run ${name} <file> [--json|--plain]`, reads: true, prepareMeshTarget: false, outputs: ["json", "plain"] })),
|
|
51
51
|
{ name: "turns", flagNames: ["space", "server", "json", "plain"], summary: "read this managed seat's own assigned turns", examples: [{ command: "cotal run turns", note: "list the turns assigned to this agent" }], usage: "cotal run turns [--json|--plain]", reads: true, prepareMeshTarget: false, outputs: ["json", "plain"] },
|
|
@@ -55,7 +55,7 @@ const runCommand = {
|
|
|
55
55
|
flags: [
|
|
56
56
|
...targetFlags,
|
|
57
57
|
{ name: "on", type: "string", value: "<instance>", description: "hosted verbs only: pin one full manager instance as `cotal ps` prints it" },
|
|
58
|
-
{ name: "file", type: "string", short: "f", value: "<program>", description: "cotal-lang program source (start; resume --local when no program is recorded)", completion: "files" },
|
|
58
|
+
{ name: "file", type: "string", short: "f", value: "<program>", description: "cotal-lang program source (start, check; resume --local when no program is recorded)", completion: "files" },
|
|
59
59
|
{ name: "local", type: "boolean", description: "drive in this process instead of on the manager (bare broker, or a run the manager cannot host)" },
|
|
60
60
|
{ name: "admit-read", type: "string", value: "<channels>", description: "start --local: the channels the run may read, comma-separated patterns or `none` (required; SPEC 14.8)" },
|
|
61
61
|
{ name: "admit-publish", type: "string", value: "<channels>", description: "start --local: the channels the run may post to, comma-separated patterns or `none` (required; SPEC 14.8)" },
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAuG,MAAM,iBAAiB,CAAC;AACtK,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,YAAY,GAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,GAMpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,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AO,EAAE;QAC/K,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,wBAAwB,EAAE,WAAW,EAAE,2CAA2C,EAAE;QAC7H,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,2CAA2C,EAAE;QAC1G,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,qCAAqC,EAAE;KACtG;IACD,WAAW,EAAE,eAAe;IAC5B,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC;CACxC,CAAC;AAEF,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC"}
|
package/dist/mesh-handler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CheckpointRef, type CheckpointSettleFact, type EpCaller, type RunAdmissionView } from "@cotal-ai/core";
|
|
1
|
+
import { type CheckpointRef, type CheckpointSettleFact, type EpCaller, type EpError, type RunAdmissionView } from "@cotal-ai/core";
|
|
2
2
|
import type { NatsConnection } from "@nats-io/transport-node";
|
|
3
3
|
import type { JetStreamClient, JetStreamManager } from "@nats-io/jetstream";
|
|
4
4
|
import { type KV } from "@nats-io/kv";
|
|
@@ -7,7 +7,7 @@ import { type RunPauseHost } from "./run-pause-host.js";
|
|
|
7
7
|
import type { RunWaitHost } from "./run-wait-host.js";
|
|
8
8
|
import { type LoopLagObserver } from "./host-starvation.js";
|
|
9
9
|
import type { RunScopeAuthority } from "./run-scope-authority.js";
|
|
10
|
-
interface RunMeshServices {
|
|
10
|
+
export interface RunMeshServices {
|
|
11
11
|
readonly pauses: RunPauseHost;
|
|
12
12
|
readonly waits: RunWaitHost;
|
|
13
13
|
readonly authority: RunScopeAuthority;
|
|
@@ -601,65 +601,6 @@ export declare class MeshHandler {
|
|
|
601
601
|
*/
|
|
602
602
|
private waitSender;
|
|
603
603
|
private relayAsk;
|
|
604
|
-
/**
|
|
605
|
-
* An escalated checkpoint, delivered to the agent it names.
|
|
606
|
-
*
|
|
607
|
-
* `to` is legal only with `onExpiry: "escalate"` and the escalation is the SECOND mint, so this
|
|
608
|
-
* runs once per chain at most. The addressee is resolved through the run's own roster: a name
|
|
609
|
-
* this run spawned is a seat and is told, and anything else is a person — the pause is
|
|
610
|
-
* answerable from anywhere by design, its addressee is on the entry, and refusing a program
|
|
611
|
-
* that escalates to a human would be this host narrowing an option the reference leaves open.
|
|
612
|
-
*
|
|
613
|
-
* The relay is the ask's, because the two are the same act: one turn on the seat, carrying what
|
|
614
|
-
* is asked and the token to answer under, settling on the checkpoint plane rather than on the
|
|
615
|
-
* relay's own terminal.
|
|
616
|
-
*/
|
|
617
|
-
private relayEscalation;
|
|
618
|
-
/**
|
|
619
|
-
* Submit one relay to a seat as a `turn` goal, and read its acceptance.
|
|
620
|
-
*
|
|
621
|
-
* IDEMPOTENT BY THE GOAL RECORD, which is also the arbiter when the invoke does not come back:
|
|
622
|
-
* a relay that landed and lost its reply is a relay that landed, and re-submitting it would put
|
|
623
|
-
* a second turn on the seat for one request. A seat the serve boundary reports gone is the
|
|
624
|
-
* agent-down failure (L4002); every other refusal is this endpoint's and is uncatchable.
|
|
625
|
-
*
|
|
626
|
-
* The relay carries the pause's own `deadlineAt` and the manager holds it to that instant: a
|
|
627
|
-
* duration counted from the manager's acceptance would outlive the pause by the submit's trip
|
|
628
|
-
* plus skew and show the seat an attempt whose answer is refused. A relay the manager refuses as
|
|
629
|
-
* already past, and that is past on this clock too, has nobody left to tell, because the pause
|
|
630
|
-
* denies at that same instant; the arm that follows meets the passed deadline and decides the
|
|
631
|
-
* outcome.
|
|
632
|
-
*/
|
|
633
|
-
private relayToSeat;
|
|
634
|
-
/**
|
|
635
|
-
* Withdraw the relay a cancelled step sent to a seat, through the manager's reserved `cancel`
|
|
636
|
-
* (SPEC 13.6 item 4), so the seat is not shown it again. A token no relay rode has no goal and
|
|
637
|
-
* nothing to withdraw, and a relay that already ended is the outcome either way: the manager
|
|
638
|
-
* refuses it with the cached terminal, so a repeated withdrawal is a no-op. Any other refusal
|
|
639
|
-
* throws under the code it was refused with, which leaves a discharge open to retry.
|
|
640
|
-
*
|
|
641
|
-
* Only the manager that accepted the relay holds it, and the class rail reaches any member, so a
|
|
642
|
-
* refusal is final only from the accepter its index entry names. One from another member is
|
|
643
|
-
* re-issued on the class rail, as the spawn discharge's despawn is.
|
|
644
|
-
*/
|
|
645
|
-
private withdrawRelay;
|
|
646
|
-
/**
|
|
647
|
-
* Withdraw a cancelled step's relay before the cancellation leaves the step, so the scope it
|
|
648
|
-
* settles shows the seat nothing the run withdrew. A withdrawal that fails is tried again rather
|
|
649
|
-
* than left to the discharge, which runs only when the run ends: until then the relay would stay
|
|
650
|
-
* first on the seat and hold back the run's next turn to it. The retries stop when the relay's
|
|
651
|
-
* deadline passes, because the manager no longer serves it then, and a failure that outlasts it
|
|
652
|
-
* is the step's error. A refusal no retry can change is the step's error at once, since retrying
|
|
653
|
-
* it would only hold the cancelled step in its scope until that deadline: of the refusals, only
|
|
654
|
-
* `unavailable` (a manager still reconciling at boot) and `deadline-exceeded` (a lost reply) are
|
|
655
|
-
* tried again.
|
|
656
|
-
*
|
|
657
|
-
* That deadline is read from the relay's goal, where the accepting manager recorded the instant
|
|
658
|
-
* it stops serving the relay; a withdrawal holds only the goal id. No deadline is known until that
|
|
659
|
-
* goal is read, and the relay may be served until then, so a failed read is tried again as well.
|
|
660
|
-
* A goal record that can never yield a deadline is thrown.
|
|
661
|
-
*/
|
|
662
|
-
private withdrawCancelledRelay;
|
|
663
604
|
/**
|
|
664
605
|
* `monitor` registers interest: after it, `down(agent)` is an event a branch can await (§5.9).
|
|
665
606
|
*
|
|
@@ -733,107 +674,42 @@ export declare class MeshHandler {
|
|
|
733
674
|
* tolerant of exactly one foreign move — a NEWER generation on a row (the member left and
|
|
734
675
|
* rejoined on its own), which the stale-write guard reports and this leave must not evict. */
|
|
735
676
|
private releaseConclave;
|
|
736
|
-
/**
|
|
737
|
-
|
|
738
|
-
* resolution — and what an ABSENT row means belongs to the caller: `resolveMemberPrincipal`
|
|
739
|
-
* refuses the join loudly, and `waitDown` reads it as the death it is waiting for. */
|
|
740
|
-
private presenceRows;
|
|
741
|
-
/** One poll of the presence death watch `wait(down)` and `turn` share. `undefined` means this
|
|
742
|
-
* incarnation is still live, or a lapse has not yet stood for {@link LAPSE_CONFIRM_MS}. A missing
|
|
743
|
-
* incarnation is `"superseded"` when a live row holds the name and `"lapsed"` when nothing does.
|
|
744
|
-
* `watch` is the caller's own window, written here and read on the next poll. An incomplete scan
|
|
745
|
-
* decides nothing and returns `undefined`; every other read failure is raised. */
|
|
746
|
-
private presenceDeath;
|
|
747
|
-
/** Whether a lapse of `name#uid` confirmed from presence stands as the death, asked of the manager
|
|
748
|
-
* first. A lapse is only the seat's heartbeats going quiet: on a loaded host a live seat's presence
|
|
749
|
-
* writer stalls past {@link LAPSE_CONFIRM_MS} while its process goes on working (#2807), and the
|
|
750
|
-
* manager owns that process. Only the manager holding the seat has a running row under its
|
|
751
|
-
* incarnation, so that row keeps it alive whoever reports it. A miss decides only from the manager
|
|
752
|
-
* that allocated it, the committer of its spawn terminal: another member of the class rail knows
|
|
753
|
-
* only its own seats, so the class rail is asked again, as a spawn's discharge asks it. An allocator
|
|
754
|
-
* that does not answer leaves presence as the only witness, which is the case presence is the
|
|
755
|
-
* authority for: the manager died with the seat. The asking can outlast the caller's own
|
|
756
|
-
* cancellation, deadline or terminal, so once `decided` holds nothing stands and no refusal is
|
|
757
|
-
* raised: that authority decides at the caller's next check. */
|
|
758
|
-
private lapseStands;
|
|
759
|
-
/**
|
|
760
|
-
* Arm this pause, or ATTACH to the one already recorded under the same token.
|
|
761
|
-
*
|
|
762
|
-
* A mint is idempotent only if the whole spec is identical, so the recorded spec is the
|
|
763
|
-
* authority for BOTH halves of the mint's identity and a resume may not recompute either. The
|
|
764
|
-
* deadline, because `now() + duration` is a different deadline a second later, and the plane
|
|
765
|
-
* reads a different deadline as a different intent. And the HOLDER, because a resumed run does
|
|
766
|
-
* not necessarily arrive under the principal that minted its pause: the CLI mints a fresh holder
|
|
767
|
-
* per invocation, and a cross-host adoption is a different principal by definition. Only the
|
|
768
|
-
* recorded holder itself may mint again — completing its own crash between the spec and the
|
|
769
|
-
* status, where the identical spec is exactly what makes the retry idempotent. Everyone else
|
|
770
|
-
* attaches. Measured before the repair, through the CLI: one `resume` of a checkpoint-parked
|
|
771
|
-
* run re-minted under its own fresh holder, the plane refused ("a token is minted once"), and
|
|
772
|
-
* the interpreter recorded that infrastructure refusal as the step's own failure (L4000) — a
|
|
773
|
-
* stranded run whose journal blames the program.
|
|
774
|
-
*
|
|
775
|
-
* An already-passed deadline cannot be minted at all, correctly, because a due pause is not being
|
|
776
|
-
* armed. It needs its schedule re-emitted at the status's current generation, which is the
|
|
777
|
-
* reconciler's job — the same operation an attaching successor needs, so the two share the exit.
|
|
778
|
-
* A first arm whose deadline has passed has nothing to attach to and raises `PauseOverdue`.
|
|
779
|
-
* A spec with no status that this holder cannot complete is unrepairable from here, so it is
|
|
780
|
-
* raised rather than waited on.
|
|
781
|
-
*/
|
|
677
|
+
/** The pause timers own no handler state: each input is read through the handler at its use. */
|
|
678
|
+
private readonly pauseTimers;
|
|
782
679
|
private arm;
|
|
783
|
-
/** `arm`, answering `true` when the deadline passed before anything was minted for it. Only a
|
|
784
|
-
* first arm finds that (`PauseOverdue`), and there is then no pause to settle, so a caller whose
|
|
785
|
-
* deadline is its own outcome takes `true` as that outcome. Cancellation still wins. */
|
|
786
680
|
private armUnlessDue;
|
|
787
|
-
private armOnce;
|
|
788
|
-
/** Push a live deadline out — the idle window restarting. The heartbeat CAS-advances the
|
|
789
|
-
* generation before replacing the timer, so a fire from the old one no-ops rather than racing. */
|
|
790
681
|
private push;
|
|
791
|
-
/**
|
|
792
|
-
* Take the broker's `.fire` for this deadline, if it has published one, and let the checkpoint
|
|
793
|
-
* plane judge it. Answers whether the fire SETTLED the pause.
|
|
794
|
-
*
|
|
795
|
-
* A fire is a MESSAGE and a settlement is a FACT; `handleCheckpointFire` is what turns one into
|
|
796
|
-
* the other, and a pause nobody answers ends no other way.
|
|
797
|
-
*
|
|
798
|
-
* READ BY SUBJECT rather than by a subscription, because the fire is a record of a deadline
|
|
799
|
-
* passing and callers here are already polling: `last_by_subj` gives the current one whether it
|
|
800
|
-
* arrived a moment ago or while this host was down, and a resume lands in the second case.
|
|
801
|
-
*
|
|
802
|
-
* IDEMPOTENT BY THE PLANE rather than by bookkeeping here: a fire handed over twice finds the
|
|
803
|
-
* pause settled and declines. The one repeated verdict with a side effect is `re-armed` under
|
|
804
|
-
* owner-behind clock skew, and over-emission is idempotent at the timer writer.
|
|
805
|
-
*/
|
|
806
|
-
private takeFire;
|
|
807
|
-
/** Has this deadline settled? `undefined` for "no deadline" and for "not yet".
|
|
808
|
-
*
|
|
809
|
-
* A `wait` observes its deadlines by polling this, so the fire is taken on the same poll: the
|
|
810
|
-
* settle fact a `wait` is reading for is one this process has to produce, and reading for it
|
|
811
|
-
* without ever producing it is how a `wait` with a timeout waited past its timeout forever. */
|
|
812
682
|
private expired;
|
|
813
|
-
/** End a deadline that is no longer waited on, by claiming its one-use settlement with no answer.
|
|
814
|
-
* A timer left armed would fire into a run that has moved on; claiming it is how the plane says
|
|
815
|
-
* "this pause is over" without a second mechanism for cancellation. */
|
|
816
683
|
private cancelTimer;
|
|
817
|
-
/** The message at a recorded stream sequence — the re-bind path after a crash. */
|
|
818
684
|
private messageAt;
|
|
819
|
-
/**
|
|
820
|
-
* Wait for this token's one-use settlement.
|
|
821
|
-
*
|
|
822
|
-
* A settle that ALREADY landed is the ordinary case on a resume: the run crashed while paused and
|
|
823
|
-
* the timer fired, or somebody answered, without it. Reading before waiting is not an
|
|
824
|
-
* optimization, it is the difference between resuming and waiting forever for an event that is
|
|
825
|
-
* already in the past.
|
|
826
|
-
*/
|
|
827
685
|
private settle;
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
private
|
|
833
|
-
|
|
834
|
-
private
|
|
686
|
+
/** The relay and presence watch own no handler state: each input, the handler's own members
|
|
687
|
+
* included, is read through the handler at its use. */
|
|
688
|
+
private readonly seatWatch;
|
|
689
|
+
private relayEscalation;
|
|
690
|
+
private relayToSeat;
|
|
691
|
+
private withdrawRelay;
|
|
692
|
+
private withdrawCancelledRelay;
|
|
693
|
+
private presenceRows;
|
|
694
|
+
private presenceDeath;
|
|
835
695
|
}
|
|
836
696
|
export { waitConsumerName, waitConsumerConfig } from "@cotal-ai/core";
|
|
697
|
+
/** How long one poll of a wait's consumer blocks. The deadline itself is durable; this is only how
|
|
698
|
+
* late its observation can be, and a shorter poll buys latency at the cost of fetch traffic. */
|
|
699
|
+
export declare const WAIT_POLL_MS = 2000;
|
|
700
|
+
/** The seat an ask is told to: its roster identity and address.
|
|
701
|
+
* `host` pins a placed seat's turns to its placement instance; unplaced seats use the class rail. */
|
|
702
|
+
export type SeatAddress = {
|
|
703
|
+
name: string;
|
|
704
|
+
uid: string;
|
|
705
|
+
owner: string;
|
|
706
|
+
actor: string;
|
|
707
|
+
host?: string;
|
|
708
|
+
};
|
|
709
|
+
/** What an `expired` turn refusal shows. The placed host speaks for its own seat. A class-rail
|
|
710
|
+
* target-unmapped refusal says only that no member the call reached maps the seat: in a space with
|
|
711
|
+
* more than one manager a live seat on a member it missed answers the same as a dead one. */
|
|
712
|
+
export declare function seatDownReading(err: EpError, host: string | undefined): string;
|
|
837
713
|
/** The restart budget this host asks the manager to enforce for a spawn. */
|
|
838
714
|
type AgentSupervise = {
|
|
839
715
|
restarts: number;
|
|
@@ -847,6 +723,15 @@ type AgentSupervise = {
|
|
|
847
723
|
* than accepted as a silent no-op.
|
|
848
724
|
*/
|
|
849
725
|
export declare function readSupervise(raw: unknown, persona: string): AgentSupervise;
|
|
726
|
+
/** Bound on the manager's synchronous `turn` ACCEPT reply (the relay registration, not the yield). */
|
|
727
|
+
export declare const TURN_ACCEPT_DEADLINE_MS = 30000;
|
|
728
|
+
/** How many class-rail calls a despawn, a relay withdrawal or a lapse's inspect sends before it stops
|
|
729
|
+
* waiting for the one manager that holds its goal (the spawn's allocator, the relay's accepter) to
|
|
730
|
+
* answer. Each is one {@link MeshHandler.invokeManager} call, whose describe and invoke both land on
|
|
731
|
+
* that manager with probability 1/m^2 per trip in a space of m managers, so one call reaches it with
|
|
732
|
+
* probability (1 - ((m-1)/m)^17) / m: about 1/2 for m = 2 and 0.25 for m = 4. All 65 then miss
|
|
733
|
+
* with probability about 2^-65 and 9e-9. */
|
|
734
|
+
export declare const MANAGER_ROUTE_ATTEMPTS = 64;
|
|
850
735
|
/**
|
|
851
736
|
* #1616 proof item 5 — ALIAS NORMALIZATION POLICY. One clone reached through a symlink and through
|
|
852
737
|
* its realpath is ONE writable directory, and the single-writer rule keys on identity, so the two
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-handler.d.ts","sourceRoot":"","sources":["../src/mesh-handler.ts"],"names":[],"mappings":"AAqBA,OAAO,
|
|
1
|
+
{"version":3,"file":"mesh-handler.d.ts","sourceRoot":"","sources":["../src/mesh-handler.ts"],"names":[],"mappings":"AAqBA,OAAO,EA2CL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAGzB,KAAK,QAAQ,EACb,KAAK,OAAO,EAMZ,KAAK,gBAAgB,EAItB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAO,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KA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