@elaraai/e3-rack 0.0.0-bootstrap.0 → 1.0.94
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 +407 -2
- package/dist/src/client/client.spec.d.ts +6 -0
- package/dist/src/client/client.spec.d.ts.map +1 -0
- package/dist/src/client/client.spec.js +150 -0
- package/dist/src/client/client.spec.js.map +1 -0
- package/dist/src/client/connect.d.ts +52 -0
- package/dist/src/client/connect.d.ts.map +1 -0
- package/dist/src/client/connect.js +112 -0
- package/dist/src/client/connect.js.map +1 -0
- package/dist/src/client/hub-client.d.ts +57 -0
- package/dist/src/client/hub-client.d.ts.map +1 -0
- package/dist/src/client/hub-client.js +87 -0
- package/dist/src/client/hub-client.js.map +1 -0
- package/dist/src/client/local-http.d.ts +78 -0
- package/dist/src/client/local-http.d.ts.map +1 -0
- package/dist/src/client/local-http.js +149 -0
- package/dist/src/client/local-http.js.map +1 -0
- package/dist/src/client/session-attempts.d.ts +20 -0
- package/dist/src/client/session-attempts.d.ts.map +1 -0
- package/dist/src/client/session-attempts.js +88 -0
- package/dist/src/client/session-attempts.js.map +1 -0
- package/dist/src/client/session-data-server.d.ts +37 -0
- package/dist/src/client/session-data-server.d.ts.map +1 -0
- package/dist/src/client/session-data-server.js +280 -0
- package/dist/src/client/session-data-server.js.map +1 -0
- package/dist/src/client/session-data-server.spec.d.ts +6 -0
- package/dist/src/client/session-data-server.spec.d.ts.map +1 -0
- package/dist/src/client/session-data-server.spec.js +192 -0
- package/dist/src/client/session-data-server.spec.js.map +1 -0
- package/dist/src/client/session.d.ts +119 -0
- package/dist/src/client/session.d.ts.map +1 -0
- package/dist/src/client/session.js +290 -0
- package/dist/src/client/session.js.map +1 -0
- package/dist/src/hub/config.d.ts +74 -0
- package/dist/src/hub/config.d.ts.map +1 -0
- package/dist/src/hub/config.js +159 -0
- package/dist/src/hub/config.js.map +1 -0
- package/dist/src/hub/fair-lease-store.d.ts +36 -0
- package/dist/src/hub/fair-lease-store.d.ts.map +1 -0
- package/dist/src/hub/fair-lease-store.js +73 -0
- package/dist/src/hub/fair-lease-store.js.map +1 -0
- package/dist/src/hub/hub.d.ts +91 -0
- package/dist/src/hub/hub.d.ts.map +1 -0
- package/dist/src/hub/hub.js +641 -0
- package/dist/src/hub/hub.js.map +1 -0
- package/dist/src/hub/hub.spec.d.ts +6 -0
- package/dist/src/hub/hub.spec.d.ts.map +1 -0
- package/dist/src/hub/hub.spec.js +363 -0
- package/dist/src/hub/hub.spec.js.map +1 -0
- package/dist/src/hub/infrastructure.spec.d.ts +6 -0
- package/dist/src/hub/infrastructure.spec.d.ts.map +1 -0
- package/dist/src/hub/infrastructure.spec.js +211 -0
- package/dist/src/hub/infrastructure.spec.js.map +1 -0
- package/dist/src/hub/lock.d.ts +62 -0
- package/dist/src/hub/lock.d.ts.map +1 -0
- package/dist/src/hub/lock.js +165 -0
- package/dist/src/hub/lock.js.map +1 -0
- package/dist/src/hub/main.d.ts +16 -0
- package/dist/src/hub/main.d.ts.map +1 -0
- package/dist/src/hub/main.js +56 -0
- package/dist/src/hub/main.js.map +1 -0
- package/dist/src/hub/session-bridge.d.ts +116 -0
- package/dist/src/hub/session-bridge.d.ts.map +1 -0
- package/dist/src/hub/session-bridge.js +336 -0
- package/dist/src/hub/session-bridge.js.map +1 -0
- package/dist/src/identity/file-identity-store.d.ts +18 -0
- package/dist/src/identity/file-identity-store.d.ts.map +1 -0
- package/dist/src/identity/file-identity-store.js +34 -0
- package/dist/src/identity/file-identity-store.js.map +1 -0
- package/dist/src/identity/file-identity-store.spec.d.ts +6 -0
- package/dist/src/identity/file-identity-store.spec.d.ts.map +1 -0
- package/dist/src/identity/file-identity-store.spec.js +59 -0
- package/dist/src/identity/file-identity-store.spec.js.map +1 -0
- package/dist/src/identity/in-memory-identity-store.d.ts +48 -0
- package/dist/src/identity/in-memory-identity-store.d.ts.map +1 -0
- package/dist/src/identity/in-memory-identity-store.js +102 -0
- package/dist/src/identity/in-memory-identity-store.js.map +1 -0
- package/dist/src/identity/machine-identity.d.ts +134 -0
- package/dist/src/identity/machine-identity.d.ts.map +1 -0
- package/dist/src/identity/machine-identity.js +65 -0
- package/dist/src/identity/machine-identity.js.map +1 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +34 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lease/closure.d.ts +96 -0
- package/dist/src/lease/closure.d.ts.map +1 -0
- package/dist/src/lease/closure.js +192 -0
- package/dist/src/lease/closure.js.map +1 -0
- package/dist/src/lease/closure.spec.d.ts +6 -0
- package/dist/src/lease/closure.spec.d.ts.map +1 -0
- package/dist/src/lease/closure.spec.js +35 -0
- package/dist/src/lease/closure.spec.js.map +1 -0
- package/dist/src/lease/coordinator.d.ts +34 -0
- package/dist/src/lease/coordinator.d.ts.map +1 -0
- package/dist/src/lease/coordinator.js +42 -0
- package/dist/src/lease/coordinator.js.map +1 -0
- package/dist/src/lease/in-memory-lease-store.d.ts +58 -0
- package/dist/src/lease/in-memory-lease-store.d.ts.map +1 -0
- package/dist/src/lease/in-memory-lease-store.js +132 -0
- package/dist/src/lease/in-memory-lease-store.js.map +1 -0
- package/dist/src/lease/lease-store.d.ts +169 -0
- package/dist/src/lease/lease-store.d.ts.map +1 -0
- package/dist/src/lease/lease-store.js +94 -0
- package/dist/src/lease/lease-store.js.map +1 -0
- package/dist/src/lease/lease-store.spec.d.ts +6 -0
- package/dist/src/lease/lease-store.spec.d.ts.map +1 -0
- package/dist/src/lease/lease-store.spec.js +8 -0
- package/dist/src/lease/lease-store.spec.js.map +1 -0
- package/dist/src/lease/rack-dispatch.d.ts +105 -0
- package/dist/src/lease/rack-dispatch.d.ts.map +1 -0
- package/dist/src/lease/rack-dispatch.js +6 -0
- package/dist/src/lease/rack-dispatch.js.map +1 -0
- package/dist/src/mutation-queue.d.ts +13 -0
- package/dist/src/mutation-queue.d.ts.map +1 -0
- package/dist/src/mutation-queue.js +17 -0
- package/dist/src/mutation-queue.js.map +1 -0
- package/dist/src/paths.d.ts +56 -0
- package/dist/src/paths.d.ts.map +1 -0
- package/dist/src/paths.js +82 -0
- package/dist/src/paths.js.map +1 -0
- package/dist/src/protocol/control.d.ts +295 -0
- package/dist/src/protocol/control.d.ts.map +1 -0
- package/dist/src/protocol/control.js +74 -0
- package/dist/src/protocol/control.js.map +1 -0
- package/dist/src/protocol/index.d.ts +9 -0
- package/dist/src/protocol/index.d.ts.map +1 -0
- package/dist/src/protocol/index.js +9 -0
- package/dist/src/protocol/index.js.map +1 -0
- package/dist/src/protocol/rack-wire.d.ts +357 -0
- package/dist/src/protocol/rack-wire.d.ts.map +1 -0
- package/dist/src/protocol/rack-wire.js +262 -0
- package/dist/src/protocol/rack-wire.js.map +1 -0
- package/dist/src/protocol/rack-wire.spec.d.ts +6 -0
- package/dist/src/protocol/rack-wire.spec.d.ts.map +1 -0
- package/dist/src/protocol/rack-wire.spec.js +14 -0
- package/dist/src/protocol/rack-wire.spec.js.map +1 -0
- package/dist/src/protocol/registration.d.ts +70 -0
- package/dist/src/protocol/registration.d.ts.map +1 -0
- package/dist/src/protocol/registration.js +67 -0
- package/dist/src/protocol/registration.js.map +1 -0
- package/dist/src/protocol/session-data.d.ts +69 -0
- package/dist/src/protocol/session-data.d.ts.map +1 -0
- package/dist/src/protocol/session-data.js +26 -0
- package/dist/src/protocol/session-data.js.map +1 -0
- package/dist/src/protocol/task-envelope.d.ts +198 -0
- package/dist/src/protocol/task-envelope.d.ts.map +1 -0
- package/dist/src/protocol/task-envelope.js +93 -0
- package/dist/src/protocol/task-envelope.js.map +1 -0
- package/dist/src/protocol/wire-golden.d.ts +8 -0
- package/dist/src/protocol/wire-golden.d.ts.map +1 -0
- package/dist/src/protocol/wire-golden.js +34 -0
- package/dist/src/protocol/wire-golden.js.map +1 -0
- package/dist/src/protocol/wire-samples.d.ts +11 -0
- package/dist/src/protocol/wire-samples.d.ts.map +1 -0
- package/dist/src/protocol/wire-samples.js +52 -0
- package/dist/src/protocol/wire-samples.js.map +1 -0
- package/dist/src/registry/file-rack-registry.d.ts +68 -0
- package/dist/src/registry/file-rack-registry.d.ts.map +1 -0
- package/dist/src/registry/file-rack-registry.js +138 -0
- package/dist/src/registry/file-rack-registry.js.map +1 -0
- package/dist/src/registry/file-rack-registry.spec.d.ts +6 -0
- package/dist/src/registry/file-rack-registry.spec.d.ts.map +1 -0
- package/dist/src/registry/file-rack-registry.spec.js +50 -0
- package/dist/src/registry/file-rack-registry.spec.js.map +1 -0
- package/dist/src/registry/rack-registry.d.ts +64 -0
- package/dist/src/registry/rack-registry.d.ts.map +1 -0
- package/dist/src/registry/rack-registry.js +65 -0
- package/dist/src/registry/rack-registry.js.map +1 -0
- package/dist/src/registry/rack-registry.spec.d.ts +6 -0
- package/dist/src/registry/rack-registry.spec.d.ts.map +1 -0
- package/dist/src/registry/rack-registry.spec.js +8 -0
- package/dist/src/registry/rack-registry.spec.js.map +1 -0
- package/dist/src/routing/eligibility.d.ts +38 -0
- package/dist/src/routing/eligibility.d.ts.map +1 -0
- package/dist/src/routing/eligibility.js +78 -0
- package/dist/src/routing/eligibility.js.map +1 -0
- package/dist/src/routing/host-coupling.d.ts +26 -0
- package/dist/src/routing/host-coupling.d.ts.map +1 -0
- package/dist/src/routing/host-coupling.js +62 -0
- package/dist/src/routing/host-coupling.js.map +1 -0
- package/dist/src/routing/policy.d.ts +188 -0
- package/dist/src/routing/policy.d.ts.map +1 -0
- package/dist/src/routing/policy.js +212 -0
- package/dist/src/routing/policy.js.map +1 -0
- package/dist/src/routing/routing.spec.d.ts +6 -0
- package/dist/src/routing/routing.spec.d.ts.map +1 -0
- package/dist/src/routing/routing.spec.js +100 -0
- package/dist/src/routing/routing.spec.js.map +1 -0
- package/dist/src/routing/tiers.d.ts +22 -0
- package/dist/src/routing/tiers.d.ts.map +1 -0
- package/dist/src/routing/tiers.js +26 -0
- package/dist/src/routing/tiers.js.map +1 -0
- package/dist/src/runner/api-server.d.ts +45 -0
- package/dist/src/runner/api-server.d.ts.map +1 -0
- package/dist/src/runner/api-server.js +21 -0
- package/dist/src/runner/api-server.js.map +1 -0
- package/dist/src/runner/capacity.d.ts +13 -0
- package/dist/src/runner/capacity.d.ts.map +1 -0
- package/dist/src/runner/capacity.js +18 -0
- package/dist/src/runner/capacity.js.map +1 -0
- package/dist/src/runner/rack-body.d.ts +43 -0
- package/dist/src/runner/rack-body.d.ts.map +1 -0
- package/dist/src/runner/rack-body.js +208 -0
- package/dist/src/runner/rack-body.js.map +1 -0
- package/dist/src/runner/rack-runner.d.ts +62 -0
- package/dist/src/runner/rack-runner.d.ts.map +1 -0
- package/dist/src/runner/rack-runner.js +75 -0
- package/dist/src/runner/rack-runner.js.map +1 -0
- package/dist/src/runner/rack-runner.spec.d.ts +6 -0
- package/dist/src/runner/rack-runner.spec.d.ts.map +1 -0
- package/dist/src/runner/rack-runner.spec.js +302 -0
- package/dist/src/runner/rack-runner.spec.js.map +1 -0
- package/dist/src/runner/split.spec.d.ts +6 -0
- package/dist/src/runner/split.spec.d.ts.map +1 -0
- package/dist/src/runner/split.spec.js +188 -0
- package/dist/src/runner/split.spec.js.map +1 -0
- package/dist/src/runner-event.d.ts +261 -0
- package/dist/src/runner-event.d.ts.map +1 -0
- package/dist/src/runner-event.js +332 -0
- package/dist/src/runner-event.js.map +1 -0
- package/dist/src/server/beast2.d.ts +19 -0
- package/dist/src/server/beast2.d.ts.map +1 -0
- package/dist/src/server/beast2.js +18 -0
- package/dist/src/server/beast2.js.map +1 -0
- package/dist/src/server/body-limit.d.ts +16 -0
- package/dist/src/server/body-limit.d.ts.map +1 -0
- package/dist/src/server/body-limit.js +53 -0
- package/dist/src/server/body-limit.js.map +1 -0
- package/dist/src/server/body-limit.spec.d.ts +2 -0
- package/dist/src/server/body-limit.spec.d.ts.map +1 -0
- package/dist/src/server/body-limit.spec.js +32 -0
- package/dist/src/server/body-limit.spec.js.map +1 -0
- package/dist/src/server/bounded.d.ts +16 -0
- package/dist/src/server/bounded.d.ts.map +1 -0
- package/dist/src/server/bounded.js +39 -0
- package/dist/src/server/bounded.js.map +1 -0
- package/dist/src/server/dispatch.d.ts +137 -0
- package/dist/src/server/dispatch.d.ts.map +1 -0
- package/dist/src/server/dispatch.js +267 -0
- package/dist/src/server/dispatch.js.map +1 -0
- package/dist/src/server/env-publication.d.ts +45 -0
- package/dist/src/server/env-publication.d.ts.map +1 -0
- package/dist/src/server/env-publication.js +10 -0
- package/dist/src/server/env-publication.js.map +1 -0
- package/dist/src/server/index.d.ts +16 -0
- package/dist/src/server/index.d.ts.map +1 -0
- package/dist/src/server/index.js +17 -0
- package/dist/src/server/index.js.map +1 -0
- package/dist/src/server/protocol.spec.d.ts +6 -0
- package/dist/src/server/protocol.spec.d.ts.map +1 -0
- package/dist/src/server/protocol.spec.js +78 -0
- package/dist/src/server/protocol.spec.js.map +1 -0
- package/dist/src/server/rack-routes.d.ts +175 -0
- package/dist/src/server/rack-routes.d.ts.map +1 -0
- package/dist/src/server/rack-routes.js +755 -0
- package/dist/src/server/rack-routes.js.map +1 -0
- package/dist/src/server/rack-routes.spec.d.ts +6 -0
- package/dist/src/server/rack-routes.spec.d.ts.map +1 -0
- package/dist/src/server/rack-routes.spec.js +477 -0
- package/dist/src/server/rack-routes.spec.js.map +1 -0
- package/dist/src/server/storage-bridge.d.ts +140 -0
- package/dist/src/server/storage-bridge.d.ts.map +1 -0
- package/dist/src/server/storage-bridge.js +6 -0
- package/dist/src/server/storage-bridge.js.map +1 -0
- package/dist/src/state-file.d.ts +10 -0
- package/dist/src/state-file.d.ts.map +1 -0
- package/dist/src/state-file.js +38 -0
- package/dist/src/state-file.js.map +1 -0
- package/dist/src/testing/in-memory.d.ts +116 -0
- package/dist/src/testing/in-memory.d.ts.map +1 -0
- package/dist/src/testing/in-memory.js +193 -0
- package/dist/src/testing/in-memory.js.map +1 -0
- package/dist/src/testing/index.d.ts +14 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +14 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/testing/lease-store-contract.d.ts +14 -0
- package/dist/src/testing/lease-store-contract.d.ts.map +1 -0
- package/dist/src/testing/lease-store-contract.js +78 -0
- package/dist/src/testing/lease-store-contract.js.map +1 -0
- package/dist/src/testing/protocol-suite.d.ts +38 -0
- package/dist/src/testing/protocol-suite.d.ts.map +1 -0
- package/dist/src/testing/protocol-suite.js +207 -0
- package/dist/src/testing/protocol-suite.js.map +1 -0
- package/dist/src/testing/rack-registry-contract.d.ts +15 -0
- package/dist/src/testing/rack-registry-contract.d.ts.map +1 -0
- package/dist/src/testing/rack-registry-contract.js +106 -0
- package/dist/src/testing/rack-registry-contract.js.map +1 -0
- package/dist/src/testing/test-rack-agent.d.ts +121 -0
- package/dist/src/testing/test-rack-agent.d.ts.map +1 -0
- package/dist/src/testing/test-rack-agent.js +316 -0
- package/dist/src/testing/test-rack-agent.js.map +1 -0
- package/dist/src/tls/tls.d.ts +67 -0
- package/dist/src/tls/tls.d.ts.map +1 -0
- package/dist/src/tls/tls.js +200 -0
- package/dist/src/tls/tls.js.map +1 -0
- package/dist/src/tls/tls.spec.d.ts +6 -0
- package/dist/src/tls/tls.spec.d.ts.map +1 -0
- package/dist/src/tls/tls.spec.js +101 -0
- package/dist/src/tls/tls.spec.js.map +1 -0
- package/dist/src/version.d.ts +9 -0
- package/dist/src/version.d.ts.map +1 -0
- package/dist/src/version.js +10 -0
- package/dist/src/version.js.map +1 -0
- package/package.json +67 -7
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { ArrayType, BooleanType, DateTimeType, IntegerType, OptionType, StringType, StructType, type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
/**
|
|
7
|
+
* Rack security posture (D12, #90) — deliberately a SEPARATE settings key
|
|
8
|
+
* from the delegation policy: both are stored as BEAST2 blobs, and
|
|
9
|
+
* adding a field to an already-stored struct breaks decoding of existing
|
|
10
|
+
* values. New security knobs evolve here (or in further keys), never by
|
|
11
|
+
* widening the delegation policy.
|
|
12
|
+
*/
|
|
13
|
+
export declare const RackSecurityPolicyType: StructType<{
|
|
14
|
+
/**
|
|
15
|
+
* Quarantine every agent process restart (new bootId) until an admin
|
|
16
|
+
* approves it in the fleet table. Enrollment itself authorizes the FIRST
|
|
17
|
+
* boot — the admin minted that token moments earlier.
|
|
18
|
+
*/
|
|
19
|
+
readonly requireStartApproval: BooleanType;
|
|
20
|
+
}>;
|
|
21
|
+
export type RackSecurityPolicy = ValueTypeOf<typeof RackSecurityPolicyType>;
|
|
22
|
+
/**
|
|
23
|
+
* One enrolled rack agent, as recorded in the rack registry at enrollment
|
|
24
|
+
* and refreshed by heartbeats. `tiers` uses the runner-tier vocabulary
|
|
25
|
+
* (node | py | py-datascience | c | full — see #57): only tasks whose tier
|
|
26
|
+
* the rack has actually built are routed to it.
|
|
27
|
+
*
|
|
28
|
+
* Boot identity (D12, #90): `lastBootId` is what the agent most recently
|
|
29
|
+
* reported (a fresh uuid per process lifetime; none until the first
|
|
30
|
+
* heartbeat lands), `approvedBootId` is the boot a human authorized —
|
|
31
|
+
* enrollment covers the first boot (adopted on its first heartbeat), every
|
|
32
|
+
* later restart needs the fleet-table Approve when the deployment's
|
|
33
|
+
* {@link RackSecurityPolicyType} demands it. A rack is QUARANTINED (no
|
|
34
|
+
* leases) while the two differ under `requireStartApproval`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RackRegistrationType: StructType<{
|
|
37
|
+
readonly rackId: StringType;
|
|
38
|
+
readonly label: StringType;
|
|
39
|
+
readonly enrolledAt: DateTimeType;
|
|
40
|
+
readonly tiers: ArrayType<StringType>;
|
|
41
|
+
/** Enrollment declaration until first heartbeat, then ready free plus occupied slots (zero if unhealthy). */
|
|
42
|
+
readonly capacity: IntegerType;
|
|
43
|
+
readonly lastSeenAt: DateTimeType;
|
|
44
|
+
readonly agentVersion: StringType;
|
|
45
|
+
readonly healthy: BooleanType;
|
|
46
|
+
readonly lastBootId: OptionType<StringType>;
|
|
47
|
+
readonly approvedBootId: OptionType<StringType>;
|
|
48
|
+
}>;
|
|
49
|
+
export type RackRegistration = ValueTypeOf<typeof RackRegistrationType>;
|
|
50
|
+
/**
|
|
51
|
+
* One entry of a rack's activity timeline (fleet UI, D12): a lease this
|
|
52
|
+
* rack claimed, newest first. `status` is the lease status
|
|
53
|
+
* (claimed | completed | superseded | cancelled); `outcome` is the task
|
|
54
|
+
* result when completed (success | failed), with `error` carrying the
|
|
55
|
+
* failure detail. Task stdout/stderr is NOT here — it lives with the task
|
|
56
|
+
* in the workspace UI.
|
|
57
|
+
*/
|
|
58
|
+
export declare const RackActivityEntryType: StructType<{
|
|
59
|
+
readonly repo: StringType;
|
|
60
|
+
readonly workspace: StringType;
|
|
61
|
+
readonly taskName: StringType;
|
|
62
|
+
readonly tier: StringType;
|
|
63
|
+
readonly status: StringType;
|
|
64
|
+
readonly outcome: OptionType<StringType>;
|
|
65
|
+
readonly error: OptionType<StringType>;
|
|
66
|
+
readonly claimedAt: DateTimeType;
|
|
67
|
+
readonly completedAt: OptionType<DateTimeType>;
|
|
68
|
+
}>;
|
|
69
|
+
export type RackActivityEntry = ValueTypeOf<typeof RackActivityEntryType>;
|
|
70
|
+
//# sourceMappingURL=registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../../src/protocol/registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAExI;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;IACjC;;;;OAIG;;EAEH,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB;;;;;IAK/B,6GAA6G;;;;;;;EAO7G,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;EAUhC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { ArrayType, BooleanType, DateTimeType, IntegerType, OptionType, StringType, StructType } from "@elaraai/east";
|
|
6
|
+
/**
|
|
7
|
+
* Rack security posture (D12, #90) — deliberately a SEPARATE settings key
|
|
8
|
+
* from the delegation policy: both are stored as BEAST2 blobs, and
|
|
9
|
+
* adding a field to an already-stored struct breaks decoding of existing
|
|
10
|
+
* values. New security knobs evolve here (or in further keys), never by
|
|
11
|
+
* widening the delegation policy.
|
|
12
|
+
*/
|
|
13
|
+
export const RackSecurityPolicyType = StructType({
|
|
14
|
+
/**
|
|
15
|
+
* Quarantine every agent process restart (new bootId) until an admin
|
|
16
|
+
* approves it in the fleet table. Enrollment itself authorizes the FIRST
|
|
17
|
+
* boot — the admin minted that token moments earlier.
|
|
18
|
+
*/
|
|
19
|
+
requireStartApproval: BooleanType,
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* One enrolled rack agent, as recorded in the rack registry at enrollment
|
|
23
|
+
* and refreshed by heartbeats. `tiers` uses the runner-tier vocabulary
|
|
24
|
+
* (node | py | py-datascience | c | full — see #57): only tasks whose tier
|
|
25
|
+
* the rack has actually built are routed to it.
|
|
26
|
+
*
|
|
27
|
+
* Boot identity (D12, #90): `lastBootId` is what the agent most recently
|
|
28
|
+
* reported (a fresh uuid per process lifetime; none until the first
|
|
29
|
+
* heartbeat lands), `approvedBootId` is the boot a human authorized —
|
|
30
|
+
* enrollment covers the first boot (adopted on its first heartbeat), every
|
|
31
|
+
* later restart needs the fleet-table Approve when the deployment's
|
|
32
|
+
* {@link RackSecurityPolicyType} demands it. A rack is QUARANTINED (no
|
|
33
|
+
* leases) while the two differ under `requireStartApproval`.
|
|
34
|
+
*/
|
|
35
|
+
export const RackRegistrationType = StructType({
|
|
36
|
+
rackId: StringType,
|
|
37
|
+
label: StringType,
|
|
38
|
+
enrolledAt: DateTimeType,
|
|
39
|
+
tiers: ArrayType(StringType),
|
|
40
|
+
/** Enrollment declaration until first heartbeat, then ready free plus occupied slots (zero if unhealthy). */
|
|
41
|
+
capacity: IntegerType,
|
|
42
|
+
lastSeenAt: DateTimeType,
|
|
43
|
+
agentVersion: StringType,
|
|
44
|
+
healthy: BooleanType,
|
|
45
|
+
lastBootId: OptionType(StringType),
|
|
46
|
+
approvedBootId: OptionType(StringType),
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* One entry of a rack's activity timeline (fleet UI, D12): a lease this
|
|
50
|
+
* rack claimed, newest first. `status` is the lease status
|
|
51
|
+
* (claimed | completed | superseded | cancelled); `outcome` is the task
|
|
52
|
+
* result when completed (success | failed), with `error` carrying the
|
|
53
|
+
* failure detail. Task stdout/stderr is NOT here — it lives with the task
|
|
54
|
+
* in the workspace UI.
|
|
55
|
+
*/
|
|
56
|
+
export const RackActivityEntryType = StructType({
|
|
57
|
+
repo: StringType,
|
|
58
|
+
workspace: StringType,
|
|
59
|
+
taskName: StringType,
|
|
60
|
+
tier: StringType,
|
|
61
|
+
status: StringType,
|
|
62
|
+
outcome: OptionType(StringType),
|
|
63
|
+
error: OptionType(StringType),
|
|
64
|
+
claimedAt: DateTimeType,
|
|
65
|
+
completedAt: OptionType(DateTimeType),
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=registration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../src/protocol/registration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAExI;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;IAC/C;;;;OAIG;IACH,oBAAoB,EAAE,WAAW;CAClC,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;IAC7C,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,UAAU;IACjB,UAAU,EAAE,YAAY;IACxB,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC;IAC5B,6GAA6G;IAC7G,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,UAAU;IACxB,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAClC,cAAc,EAAE,UAAU,CAAC,UAAU,CAAC;CACvC,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;IAC9C,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC;IAC/B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC;CACtC,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { ArrayType, BooleanType, IntegerType, StringType, StructType, type ValueTypeOf } from '@elaraai/east';
|
|
6
|
+
/** Forwards an opaque lease to its repository-owning session. */
|
|
7
|
+
export declare const LeaseDataType: StructType<{
|
|
8
|
+
readonly leaseJson: StringType;
|
|
9
|
+
}>;
|
|
10
|
+
/** Records a newly claimed attempt, owned by the hub's process. */
|
|
11
|
+
export declare const LeaseRunningType: StructType<{
|
|
12
|
+
readonly leaseJson: StringType;
|
|
13
|
+
readonly owner: StructType<{
|
|
14
|
+
readonly pid: IntegerType;
|
|
15
|
+
readonly pidStartTime: IntegerType;
|
|
16
|
+
readonly bootId: StringType;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
/** Ends an attempt without treating infrastructure loss as a task failure. */
|
|
20
|
+
export declare const LeaseStoppedType: StructType<{
|
|
21
|
+
readonly leaseJson: StringType;
|
|
22
|
+
readonly cancelled: BooleanType;
|
|
23
|
+
readonly cause: StringType;
|
|
24
|
+
}>;
|
|
25
|
+
/** Records a current-protocol agent result. */
|
|
26
|
+
export declare const LeaseOutcomeType: StructType<{
|
|
27
|
+
readonly leaseJson: StringType;
|
|
28
|
+
readonly resultJson: StringType;
|
|
29
|
+
}>;
|
|
30
|
+
/** Verifies a complete output graph, not only its root object. */
|
|
31
|
+
export declare const VerifyOutputType: StructType<{
|
|
32
|
+
readonly hash: StringType;
|
|
33
|
+
}>;
|
|
34
|
+
/** Re-references immutable objects before the hub returns a held target. */
|
|
35
|
+
export declare const TouchObjectsType: ArrayType<StringType>;
|
|
36
|
+
/** Delivers an ordered log batch and flushes it before acknowledging. */
|
|
37
|
+
export declare const SessionLogsType: StructType<{
|
|
38
|
+
readonly taskHash: StringType;
|
|
39
|
+
readonly inputsHash: StringType;
|
|
40
|
+
readonly executionId: StringType;
|
|
41
|
+
readonly chunks: ArrayType<StructType<{
|
|
42
|
+
readonly stream: import("@elaraai/east").VariantType<{
|
|
43
|
+
readonly stdout: import("@elaraai/east").NullType;
|
|
44
|
+
readonly stderr: import("@elaraai/east").NullType;
|
|
45
|
+
}>;
|
|
46
|
+
readonly data: StringType;
|
|
47
|
+
}>>;
|
|
48
|
+
}>;
|
|
49
|
+
/** Binds a staged upload and receipt to exactly one lease, hash and size. */
|
|
50
|
+
export declare const SessionUploadType: StructType<{
|
|
51
|
+
readonly leaseId: StringType;
|
|
52
|
+
readonly hash: StringType;
|
|
53
|
+
readonly size: IntegerType;
|
|
54
|
+
readonly receipt: StringType;
|
|
55
|
+
}>;
|
|
56
|
+
/** An upload declaration, derived from the session wire. */
|
|
57
|
+
export type SessionUpload = ValueTypeOf<typeof SessionUploadType>;
|
|
58
|
+
/** Temporary transfer state; retained across session takeover, never across a hub restart. */
|
|
59
|
+
export declare const SessionUploadStateType: StructType<{
|
|
60
|
+
readonly declaration: StructType<{
|
|
61
|
+
readonly leaseId: StringType;
|
|
62
|
+
readonly hash: StringType;
|
|
63
|
+
readonly size: IntegerType;
|
|
64
|
+
readonly receipt: StringType;
|
|
65
|
+
}>;
|
|
66
|
+
readonly fileId: StringType;
|
|
67
|
+
readonly committed: BooleanType;
|
|
68
|
+
}>;
|
|
69
|
+
//# sourceMappingURL=session-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-data.d.ts","sourceRoot":"","sources":["../../../src/protocol/session-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAI9G,iEAAiE;AACjE,eAAO,MAAM,aAAa;;EAAwC,CAAC;AACnE,mEAAmE;AACnE,eAAO,MAAM,gBAAgB;;;;;;;EAA6D,CAAC;AAC3F,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB;;;;EAAmF,CAAC;AACjH,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB;;;EAAgE,CAAC;AAC9F,kEAAkE;AAClE,eAAO,MAAM,gBAAgB;;EAAmC,CAAC;AACjE,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,uBAAwB,CAAC;AACtD,yEAAyE;AACzE,eAAO,MAAM,eAAe;;;;;;;;;;;EAA6H,CAAC;AAC1J,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB;;;;;EAAgG,CAAC;AAC/H,4DAA4D;AAC5D,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,8FAA8F;AAC9F,eAAO,MAAM,sBAAsB;;;;;;;;;EAA6F,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { ArrayType, BooleanType, IntegerType, StringType, StructType } from '@elaraai/east';
|
|
6
|
+
import { HubOwnerType } from './control.js';
|
|
7
|
+
import { RackLogChunkType } from './rack-wire.js';
|
|
8
|
+
/** Forwards an opaque lease to its repository-owning session. */
|
|
9
|
+
export const LeaseDataType = StructType({ leaseJson: StringType });
|
|
10
|
+
/** Records a newly claimed attempt, owned by the hub's process. */
|
|
11
|
+
export const LeaseRunningType = StructType({ leaseJson: StringType, owner: HubOwnerType });
|
|
12
|
+
/** Ends an attempt without treating infrastructure loss as a task failure. */
|
|
13
|
+
export const LeaseStoppedType = StructType({ leaseJson: StringType, cancelled: BooleanType, cause: StringType });
|
|
14
|
+
/** Records a current-protocol agent result. */
|
|
15
|
+
export const LeaseOutcomeType = StructType({ leaseJson: StringType, resultJson: StringType });
|
|
16
|
+
/** Verifies a complete output graph, not only its root object. */
|
|
17
|
+
export const VerifyOutputType = StructType({ hash: StringType });
|
|
18
|
+
/** Re-references immutable objects before the hub returns a held target. */
|
|
19
|
+
export const TouchObjectsType = ArrayType(StringType);
|
|
20
|
+
/** Delivers an ordered log batch and flushes it before acknowledging. */
|
|
21
|
+
export const SessionLogsType = StructType({ taskHash: StringType, inputsHash: StringType, executionId: StringType, chunks: ArrayType(RackLogChunkType) });
|
|
22
|
+
/** Binds a staged upload and receipt to exactly one lease, hash and size. */
|
|
23
|
+
export const SessionUploadType = StructType({ leaseId: StringType, hash: StringType, size: IntegerType, receipt: StringType });
|
|
24
|
+
/** Temporary transfer state; retained across session takeover, never across a hub restart. */
|
|
25
|
+
export const SessionUploadStateType = StructType({ declaration: SessionUploadType, fileId: StringType, committed: BooleanType });
|
|
26
|
+
//# sourceMappingURL=session-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-data.js","sourceRoot":"","sources":["../../../src/protocol/session-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAoB,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;AACnE,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;AAC3F,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACjH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;AAC9F,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;AACjE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;AACtD,yEAAyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAC1J,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;AAG/H,8FAA8F;AAC9F,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What a rack lease carries to its agent, and what the agent completes it
|
|
7
|
+
* with (epic #67; v2 since elaraai/e3-cloud#214).
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* A lease carries the runner containers' v2 event (#205): its guest makes the
|
|
11
|
+
* call of e3-core's own execution the event names, as a runner Lambda does,
|
|
12
|
+
* over the objects its host staged. Beside the event it carries what a rack
|
|
13
|
+
* needs and a container does not:
|
|
14
|
+
* - the workspace and the task's name, for the activity view;
|
|
15
|
+
* - the runtime version the work was built with, which the agent boots (#189);
|
|
16
|
+
* - the environment the guest's rootfs is composed from;
|
|
17
|
+
* - the lease's closure: every object its guest may read, and no other.
|
|
18
|
+
*
|
|
19
|
+
* A function lease names its program by hash, staged with the closure, so a
|
|
20
|
+
* lease's row stays small.
|
|
21
|
+
*/
|
|
22
|
+
import type { RunnerDetachedEvent, RunnerRun, RunnerTaskEvent, RunnerUnitEvent } from '../runner-event.js';
|
|
23
|
+
/** The version of the lease event this build writes and reads. */
|
|
24
|
+
export declare const RACK_LEASE_VERSION = 2;
|
|
25
|
+
/**
|
|
26
|
+
* What a lease's guest may read: the objects its execution reads (#214).
|
|
27
|
+
* Inline when small; when large, the hash of an object in the repository's
|
|
28
|
+
* store that lists them (`encodeClosure`), which is itself admitted.
|
|
29
|
+
*/
|
|
30
|
+
export type RackLeaseClosure = {
|
|
31
|
+
readonly hashes: readonly string[];
|
|
32
|
+
} | {
|
|
33
|
+
readonly object: string;
|
|
34
|
+
readonly count: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* A lease's work, v2 (#214): a dataflow task, a unit of a split task, or a
|
|
38
|
+
* function call.
|
|
39
|
+
*/
|
|
40
|
+
export interface RackLeaseEvent {
|
|
41
|
+
/** {@link RACK_LEASE_VERSION} */
|
|
42
|
+
readonly version: typeof RACK_LEASE_VERSION;
|
|
43
|
+
/**
|
|
44
|
+
* The runner containers' v2 event (#205) the guest runs: `task`, `unit` or
|
|
45
|
+
* `run-detached`, with the launch id the attempt's `running` record is
|
|
46
|
+
* stamped with. A function lease's `spec.bodyIr` is empty: its program is
|
|
47
|
+
* {@link program}.
|
|
48
|
+
*/
|
|
49
|
+
readonly runnerEvent: RunnerTaskEvent | RunnerUnitEvent | RunnerDetachedEvent;
|
|
50
|
+
/** The workspace */
|
|
51
|
+
readonly workspace: string;
|
|
52
|
+
/** The task's name, or `fn:{name}` for a function: what the activity view shows */
|
|
53
|
+
readonly taskName: string;
|
|
54
|
+
/** The e3 version the work was built with: the runtime the guest runs (#189) */
|
|
55
|
+
readonly e3Version?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The environment spec hash the work declares, when it declares one: the
|
|
58
|
+
* worker composes the environment's rootfs from its published layers, and
|
|
59
|
+
* the guest links it where e3-core looks for it.
|
|
60
|
+
*/
|
|
61
|
+
readonly environment?: string;
|
|
62
|
+
/** A function lease's program: the object its detached call's `bodyIr` is */
|
|
63
|
+
readonly program?: string;
|
|
64
|
+
/** Every object the guest may read */
|
|
65
|
+
readonly closure: RackLeaseClosure;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* What a rack agent completes a lease with.
|
|
69
|
+
*/
|
|
70
|
+
export interface RackLeaseResult {
|
|
71
|
+
/** The task's name, as the event names it */
|
|
72
|
+
taskName: string;
|
|
73
|
+
/** `success` only when the work succeeded: the activity view's outcome */
|
|
74
|
+
status: 'success' | 'failed';
|
|
75
|
+
/**
|
|
76
|
+
* A task or unit lease's outcome, as e3-core's execution ended it: the
|
|
77
|
+
* record the cloud writes of the attempt. Absent, `status` says.
|
|
78
|
+
*/
|
|
79
|
+
state?: 'success' | 'failed' | 'error';
|
|
80
|
+
/** The output's hash, when it succeeded: every object it names committed */
|
|
81
|
+
outputHash?: string;
|
|
82
|
+
/** The runner's exit code, when it failed */
|
|
83
|
+
exitCode?: number;
|
|
84
|
+
/** What went wrong, when it did not succeed */
|
|
85
|
+
error?: string;
|
|
86
|
+
/** The highest peak resident memory, in bytes, a runner process reached */
|
|
87
|
+
peakBytes?: number;
|
|
88
|
+
/** Whether e3 stopped it because its run was aborted */
|
|
89
|
+
cancelled?: boolean;
|
|
90
|
+
/** How long it ran, in ms */
|
|
91
|
+
duration?: number;
|
|
92
|
+
/** A function lease's detached call's outcome (#83). `status` mirrors it
|
|
93
|
+
* (`success` ⇔ kind 'success') so the lease store's validation applies
|
|
94
|
+
* unchanged. */
|
|
95
|
+
detached?: RackFunctionResult;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The attempt a claimed lease runs: the cloud mints its execution id when a
|
|
99
|
+
* rack claims the lease, and writes its `running` record then, stamped with
|
|
100
|
+
* the rack launch; the rack's completion writes its outcome under it (#214).
|
|
101
|
+
*/
|
|
102
|
+
export interface RackLeaseAttempt {
|
|
103
|
+
/** The attempt's execution id, a UUIDv7: its records' */
|
|
104
|
+
readonly executionId: string;
|
|
105
|
+
/** When its rack claimed the lease, in ms since the epoch */
|
|
106
|
+
readonly startedAtMs: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Wire shape of a delegated function call's outcome (#83): a JSON-safe
|
|
110
|
+
* mirror of e3-core's `DetachedResult` with the value bytes base64. Rides
|
|
111
|
+
* inside the completion's `resultJson` onto the lease row (no object-store
|
|
112
|
+
* writes: functions are persistence-free), so the AGENT size-gates
|
|
113
|
+
* `valueB64` and streams to keep the row under the DynamoDB item cap; an
|
|
114
|
+
* over-sized value is reported as kind 'failed' with `rackResultTooLarge`
|
|
115
|
+
* and the runner re-runs the call on cloud.
|
|
116
|
+
*/
|
|
117
|
+
export interface RackFunctionResult {
|
|
118
|
+
kind: 'success' | 'failed' | 'too_large' | 'timed_out';
|
|
119
|
+
/** Result value bytes (beast2), base64: kind 'success' only. */
|
|
120
|
+
valueB64?: string;
|
|
121
|
+
stdout: string;
|
|
122
|
+
stderr: string;
|
|
123
|
+
stdoutTruncated: boolean;
|
|
124
|
+
stderrTruncated: boolean;
|
|
125
|
+
/** kind 'failed' */
|
|
126
|
+
exitCode?: number;
|
|
127
|
+
/** kind 'too_large' */
|
|
128
|
+
bytes?: number;
|
|
129
|
+
limit?: number;
|
|
130
|
+
/** kind 'timed_out' */
|
|
131
|
+
ms?: number;
|
|
132
|
+
/** The rack produced a result too large to relay through the lease row:
|
|
133
|
+
* the runner should fall back to cloud rather than surface a failure. */
|
|
134
|
+
rackResultTooLarge?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Whether a lease is a function call's (#83): its guest runs `runDetached`,
|
|
138
|
+
* and nothing it does is recorded.
|
|
139
|
+
*
|
|
140
|
+
* @param event - The lease's event
|
|
141
|
+
* @returns Whether it is a function lease
|
|
142
|
+
* @example
|
|
143
|
+
* const attempt = isFunctionLease(lease.event) ? undefined : { executionId: uuidv7(), startedAtMs: now() };
|
|
144
|
+
*/
|
|
145
|
+
export declare function isFunctionLease(event: RackLeaseEvent): boolean;
|
|
146
|
+
/**
|
|
147
|
+
* The task object a lease's work runs: a task's or a unit's task, or a
|
|
148
|
+
* function lease's program.
|
|
149
|
+
*
|
|
150
|
+
* @param event - The lease's event
|
|
151
|
+
* @returns The object's hash
|
|
152
|
+
* @example
|
|
153
|
+
* const leaseId = makeLeaseId(leaseTaskHash(event), inputsHash(leaseInputs(event)));
|
|
154
|
+
*/
|
|
155
|
+
export declare function leaseTaskHash(event: RackLeaseEvent): string;
|
|
156
|
+
/**
|
|
157
|
+
* The inputs a lease's attempt is recorded under, as e3-core records them: a
|
|
158
|
+
* task's input hashes, a unit's inputs; none for a function.
|
|
159
|
+
*
|
|
160
|
+
* @param event - The lease's event
|
|
161
|
+
* @returns The inputs
|
|
162
|
+
* @example
|
|
163
|
+
* const inHash = inputsHash(leaseInputs(event));
|
|
164
|
+
*/
|
|
165
|
+
export declare function leaseInputs(event: RackLeaseEvent): string[];
|
|
166
|
+
/**
|
|
167
|
+
* Whether a lease's attempt is recorded as a unit (e3-core's `unit: !own`):
|
|
168
|
+
* a piece or a merge of a split task; not a task, nor the one unit of a task
|
|
169
|
+
* whose input closes no piece (elaraai/east-workspace#953).
|
|
170
|
+
*
|
|
171
|
+
* @param event - The lease's event
|
|
172
|
+
* @returns What the attempt's records say
|
|
173
|
+
* @example
|
|
174
|
+
* const status = variant('success', { ...common, unit: leaseRecordsUnit(event) });
|
|
175
|
+
*/
|
|
176
|
+
export declare function leaseRecordsUnit(event: RackLeaseEvent): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The dataflow run a lease's work is part of, when a dataflow launched it:
|
|
179
|
+
* what its completion wakes (#208), and what re-attaches to it (#207).
|
|
180
|
+
*
|
|
181
|
+
* @param event - The lease's event
|
|
182
|
+
* @returns The run, or undefined
|
|
183
|
+
* @example
|
|
184
|
+
* const run = leaseRun(lease.event);
|
|
185
|
+
* if (run !== undefined) await wake(lease.repo, run);
|
|
186
|
+
*/
|
|
187
|
+
export declare function leaseRun(event: RackLeaseEvent): RunnerRun | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Whether a stored event is a v2 lease event this build runs: one written
|
|
190
|
+
* before #214 is not granted.
|
|
191
|
+
*
|
|
192
|
+
* @param event - The event, as the lease store holds it
|
|
193
|
+
* @returns Whether it is one
|
|
194
|
+
* @example
|
|
195
|
+
* if (!isLeaseEventV2(lease.event)) return forbidden('no work this build runs');
|
|
196
|
+
*/
|
|
197
|
+
export declare function isLeaseEventV2(event: unknown): event is RackLeaseEvent;
|
|
198
|
+
//# sourceMappingURL=task-envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-envelope.d.ts","sourceRoot":"","sources":["../../../src/protocol/task-envelope.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE3G,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACtC;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,kBAAkB,CAAC;IAC5C;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,eAAe,GAAG,eAAe,GAAG,mBAAmB,CAAC;IAC9E,oBAAoB;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IACvC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;qBAEiB;IACjB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;IACvD,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;8EAC0E;IAC1E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAE9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAG3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,EAAE,CAO3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAG/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,GAAG,SAAS,CAGrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAKtE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/** The version of the lease event this build writes and reads. */
|
|
6
|
+
export const RACK_LEASE_VERSION = 2;
|
|
7
|
+
/**
|
|
8
|
+
* Whether a lease is a function call's (#83): its guest runs `runDetached`,
|
|
9
|
+
* and nothing it does is recorded.
|
|
10
|
+
*
|
|
11
|
+
* @param event - The lease's event
|
|
12
|
+
* @returns Whether it is a function lease
|
|
13
|
+
* @example
|
|
14
|
+
* const attempt = isFunctionLease(lease.event) ? undefined : { executionId: uuidv7(), startedAtMs: now() };
|
|
15
|
+
*/
|
|
16
|
+
export function isFunctionLease(event) {
|
|
17
|
+
return event.runnerEvent.mode === 'run-detached';
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The task object a lease's work runs: a task's or a unit's task, or a
|
|
21
|
+
* function lease's program.
|
|
22
|
+
*
|
|
23
|
+
* @param event - The lease's event
|
|
24
|
+
* @returns The object's hash
|
|
25
|
+
* @example
|
|
26
|
+
* const leaseId = makeLeaseId(leaseTaskHash(event), inputsHash(leaseInputs(event)));
|
|
27
|
+
*/
|
|
28
|
+
export function leaseTaskHash(event) {
|
|
29
|
+
const run = event.runnerEvent;
|
|
30
|
+
return run.mode === 'run-detached' ? event.program ?? '' : run.taskHash;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The inputs a lease's attempt is recorded under, as e3-core records them: a
|
|
34
|
+
* task's input hashes, a unit's inputs; none for a function.
|
|
35
|
+
*
|
|
36
|
+
* @param event - The lease's event
|
|
37
|
+
* @returns The inputs
|
|
38
|
+
* @example
|
|
39
|
+
* const inHash = inputsHash(leaseInputs(event));
|
|
40
|
+
*/
|
|
41
|
+
export function leaseInputs(event) {
|
|
42
|
+
const run = event.runnerEvent;
|
|
43
|
+
switch (run.mode) {
|
|
44
|
+
case 'task': return [...run.inputHashes];
|
|
45
|
+
case 'unit': return [...run.unit.inputs];
|
|
46
|
+
default: return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Whether a lease's attempt is recorded as a unit (e3-core's `unit: !own`):
|
|
51
|
+
* a piece or a merge of a split task; not a task, nor the one unit of a task
|
|
52
|
+
* whose input closes no piece (elaraai/east-workspace#953).
|
|
53
|
+
*
|
|
54
|
+
* @param event - The lease's event
|
|
55
|
+
* @returns What the attempt's records say
|
|
56
|
+
* @example
|
|
57
|
+
* const status = variant('success', { ...common, unit: leaseRecordsUnit(event) });
|
|
58
|
+
*/
|
|
59
|
+
export function leaseRecordsUnit(event) {
|
|
60
|
+
const run = event.runnerEvent;
|
|
61
|
+
return run.mode === 'unit' && !run.unit.own;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The dataflow run a lease's work is part of, when a dataflow launched it:
|
|
65
|
+
* what its completion wakes (#208), and what re-attaches to it (#207).
|
|
66
|
+
*
|
|
67
|
+
* @param event - The lease's event
|
|
68
|
+
* @returns The run, or undefined
|
|
69
|
+
* @example
|
|
70
|
+
* const run = leaseRun(lease.event);
|
|
71
|
+
* if (run !== undefined) await wake(lease.repo, run);
|
|
72
|
+
*/
|
|
73
|
+
export function leaseRun(event) {
|
|
74
|
+
const run = event.runnerEvent;
|
|
75
|
+
return run.mode === 'task' || run.mode === 'unit' ? run.run : undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Whether a stored event is a v2 lease event this build runs: one written
|
|
79
|
+
* before #214 is not granted.
|
|
80
|
+
*
|
|
81
|
+
* @param event - The event, as the lease store holds it
|
|
82
|
+
* @returns Whether it is one
|
|
83
|
+
* @example
|
|
84
|
+
* if (!isLeaseEventV2(lease.event)) return forbidden('no work this build runs');
|
|
85
|
+
*/
|
|
86
|
+
export function isLeaseEventV2(event) {
|
|
87
|
+
if (typeof event !== 'object' || event === null)
|
|
88
|
+
return false;
|
|
89
|
+
const { version, runnerEvent, closure } = event;
|
|
90
|
+
return version === RACK_LEASE_VERSION && typeof runnerEvent === 'object' && runnerEvent !== null
|
|
91
|
+
&& typeof closure === 'object' && closure !== null;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=task-envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-envelope.js","sourceRoot":"","sources":["../../../src/protocol/task-envelope.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,kEAAkE;AAClE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAmHpC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,KAAqB;IACnD,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,cAAc,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,KAAqB;IACjD,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,OAAO,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAqB;IAC/C,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;QACzC,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAqB;IACpD,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,OAAO,GAAG,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC;AAC9C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAqB;IAC5C,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAC9B,OAAO,GAAG,CAAC,IAAI,KAAK,MAAM,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,KAAgC,CAAC;IAC3E,OAAO,OAAO,KAAK,kBAAkB,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,IAAI;WAC3F,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/** Existing wire bytes from e3-cloud main 43d9ac9d9a423b69450320f6a802a8191ffefd53;
|
|
6
|
+
* additive cancellation-watch bytes from the matching e3-cloud#254 implementation. @internal */
|
|
7
|
+
export declare const wireGolden: Readonly<Record<string, string>>;
|
|
8
|
+
//# sourceMappingURL=wire-golden.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-golden.d.ts","sourceRoot":"","sources":["../../../src/protocol/wire-golden.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;gGACgG;AAChG,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0BvD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/** Existing wire bytes from e3-cloud main 43d9ac9d9a423b69450320f6a802a8191ffefd53;
|
|
6
|
+
* additive cancellation-watch bytes from the matching e3-cloud#254 implementation. @internal */
|
|
7
|
+
export const wireGolden = {
|
|
8
|
+
"RackWatchRequestType": "89456173740d0a0500270304010902047265706f00076c656173654964000a0109010d72756e6e696e674c6561736573020100000e0e0001047265706f056c6561736500",
|
|
9
|
+
"RackWatchResponseType": "89456173740d0a05001e0304010902047265706f00076c656173654964000a0109010473746f70020100000e0e0001047265706f056c6561736500",
|
|
10
|
+
"RackHostInfoType": "89456173740d0a05002e0304010a00020904056c6162656c0005746965727301086361706163697479020c6167656e7456657273696f6e000100002121047261636b0002046e6f646502707900040f302e352e302b65332e312e302e3835",
|
|
11
|
+
"RackEnrollRequestType": "89456173740d0a05004b0405010a00020904056c6162656c0005746965727301086361706163697479020c6167656e7456657273696f6e0009020f656e726f6c6c6d656e74546f6b656e0008686f7374496e666f03010000282806656e726f6c6c047261636b0002046e6f646502707900040f302e352e302b65332e312e302e3835",
|
|
12
|
+
"RackEnrollResponseType": "89456173740d0a0500180102010902067261636b496400097261636b546f6b656e000100000b0b047261636b05746f6b656e",
|
|
13
|
+
"RackLeaseRefType": "89456173740d0a0500140102010902047265706f00076c656173654964000100000b0b047265706f056c65617365",
|
|
14
|
+
"RackLeaseRequestType": "89456173740d0a0500160203010a0009020574696572730106626f6f744964000100000d0d0001046e6f64650004626f6f74",
|
|
15
|
+
"RackLeaseGrantType": "89456173740d0a050052020301050907047265706f0009776f726b737061636500076c656173654964000474696572000b636f6d7075746553697a6500096576656e744a736f6e00127669736962696c697479446561646c696e65010100002323047265706f03646576056c65617365046e6f6465056c61726765027b7d80a0abfef962",
|
|
16
|
+
"RackHeartbeatRequestType": "89456173740d0a05006205060402010902047265706f02076c656173654964020a030906076865616c746879000c667265654361706163697479010d72756e6e696e674c6561736573040c6167656e7456657273696f6e0206626f6f744964020a6361636865427974657301010000272701020001047265706f056c65617365000f302e352e302b65332e312e302e383504626f6f74f601",
|
|
17
|
+
"RackHeartbeatResponseType": "89456173740d0a05004d0607010902047265706f00076c656173654964000a01000802046e6f6e650304736f6d65000409030473746f70020c726f7461746564546f6b656e040f70656e64696e67417070726f76616c0501000016160001047265706f056c65617365000105746f6b656e01",
|
|
18
|
+
"RackExtendRequestType": "89456173740d0a0500140102010902047265706f00076c656173654964000100000b0b047265706f056c65617365",
|
|
19
|
+
"RackCompleteRequestType": "89456173740d0a05005c050601000802046e6f6e650104736f6d6500060802046e6f6e650104736f6d65030905047265706f00076c656173654964000a726573756c744a736f6e000e6f757470757455706c6f61644964020c696e6c696e654f7574707574040100001a1a047265706f056c65617365027b7d010675706c6f616401020102",
|
|
20
|
+
"RackObjectSizeType": "89456173740d0a0500120203010209020468617368000473697a650101000142077348a410700000",
|
|
21
|
+
"RackObjectCommitType": "89456173740d0a05001b0203010209030468617368000473697a65010776657273696f6e000100014a0f7348a41070b017a526a76616940000",
|
|
22
|
+
"RackStorageRequestType": "89456173740d0a05008a010a0b010a00000209020468617368000473697a65030802046e6f6e650204736f6d65040802046e6f6e650204736f6d65000a0409030468617368000473697a65030776657273696f6e000a080907047265706f00076c65617365496400046e65656401066f7574707574050b656e764d616e696665737406076f7574707574730707636f6d6d69747309010001a9022a63294a2dc867cd494d2c4e65607448a41050c1080e46e6d4bc326a18c4400d43d88b529353330b4a1800",
|
|
23
|
+
"RackObjectDescriptorType": "89456173740d0a05002e04050106090204686173680004646174610109020468617368000375726c00080206696e6c696e65020375726c03010001450a637048a4103031320100",
|
|
24
|
+
"RackEnvLayerType": "89456173740d0a05001e02030102090306646967657374000375726c000973697a6542797465730101000027270a7368613235363a6162631a68747470733a2f2f7261636b2e696e76616c69642f6c617965720a",
|
|
25
|
+
"RackWriteTargetType": "89456173740d0a050024040500010b010109020375726c0107686561646572730208020468656c640003707574030100002c2c011868747470733a2f2f7261636b2e696e76616c69642f70757400010a782d636865636b73756d0361626300",
|
|
26
|
+
"RackStorageResponseType": "89456173740d0a0500870216170106090204686173680004646174610109020468617368000375726c00080206696e6c696e65020375726c030a040009020375726c000875706c6f61644964000802046e6f6e650604736f6d650702090306646967657374000375726c000973697a654279746573090a0a09020c6d616e69666573744a736f6e00066c61796572730b0802046e6f6e650604736f6d650c0b000009020375726c0007686561646572730e08020468656c6406037075740f090204686173680006746172676574100a1104090204686173680009636f6d6d6974746564130a140905076f626a6563747305066f75747075740803656e760d07746172676574731209636f6d6d697474656415010001a4036e6360647448a4104864949414145be9eb17252667eb65e69525e664a6e8a7a796303062972a282d612b2dc8c94f4c6164aaae6560e42ace48343235b34a4c4a96c2aa2127b132b5888b81818962b7e27611d01915bac919a9c9d9c5a5b9cc40a73038245108181818280f5d460600",
|
|
27
|
+
"RackLogChunkType": "89456173740d0a05002603040008020673746465727200067374646f7574000109020673747265616d010464617461020100000808010668656c6c6f0a",
|
|
28
|
+
"RackLogsRequestType": "89456173740d0a0500410506010008020673746465727201067374646f75740109020673747265616d020464617461000a030903047265706f00076c65617365496400066368756e6b73040100001616047265706f056c65617365000100066572726f720a00",
|
|
29
|
+
"RackCompleteResponseType": "89456173740d0a050035020300080309646973636172646564000a6964656d706f74656e7400087265636f726465640009010b646973706f736974696f6e01010000010102",
|
|
30
|
+
"RackSecurityPolicyType": "89456173740d0a05001b010204090114726571756972655374617274417070726f76616c00010000010101",
|
|
31
|
+
"RackRegistrationType": "89456173740d0a05008401070801050a000204000802046e6f6e650504736f6d6500090a067261636b496400056c6162656c000a656e726f6c6c656441740105746965727302086361706163697479030a6c6173745365656e4174010c6167656e7456657273696f6e00076865616c746879040a6c617374426f6f744964060e617070726f766564426f6f744964060100003f3f047261636b047261636b80a0abfef9620002046e6f6465027079000480a0abfef9620f302e352e302b65332e312e302e3835010104626f6f740104626f6f74",
|
|
32
|
+
"RackActivityEntryType": "89456173740d0a050074050601000802046e6f6e650104736f6d6500050802046e6f6e650104736f6d65030909047265706f0009776f726b737061636500087461736b4e616d65000474696572000673746174757300076f7574636f6d6502056572726f720209636c61696d65644174030b636f6d706c657465644174040100003c3c047265706f036465760474657374046e6f646509636f6d706c6574656401077375636365737301076d65737361676580a0abfef9620180a0abfef962"
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=wire-golden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-golden.js","sourceRoot":"","sources":["../../../src/protocol/wire-golden.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;gGACgG;AAChG,MAAM,CAAC,MAAM,UAAU,GAAqC;IAC1D,sBAAsB,EAAE,0IAA0I;IAClK,uBAAuB,EAAE,wHAAwH;IACjJ,kBAAkB,EAAE,8LAA8L;IAClN,uBAAuB,EAAE,sQAAsQ;IAC/R,wBAAwB,EAAE,sGAAsG;IAChI,kBAAkB,EAAE,8FAA8F;IAClH,sBAAsB,EAAE,sGAAsG;IAC9H,oBAAoB,EAAE,0QAA0Q;IAChS,0BAA0B,EAAE,kTAAkT;IAC9U,2BAA2B,EAAE,sOAAsO;IACnQ,uBAAuB,EAAE,8FAA8F;IACvH,yBAAyB,EAAE,4QAA4Q;IACvS,oBAAoB,EAAE,kFAAkF;IACxG,sBAAsB,EAAE,oHAAoH;IAC5I,wBAAwB,EAAE,4YAA4Y;IACta,0BAA0B,EAAE,gJAAgJ;IAC5K,kBAAkB,EAAE,0KAA0K;IAC9L,qBAAqB,EAAE,gMAAgM;IACvN,yBAAyB,EAAE,8wBAA8wB;IACzyB,kBAAkB,EAAE,4HAA4H;IAChJ,qBAAqB,EAAE,8MAA8M;IACrO,0BAA0B,EAAE,4IAA4I;IACxK,wBAAwB,EAAE,wFAAwF;IAClH,sBAAsB,EAAE,waAAwa;IAChc,uBAAuB,EAAE,gYAAgY;CAC1Z,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/** Fixed samples used by this package and cloud adoption checks. @internal */
|
|
6
|
+
export declare const wireSamples: {
|
|
7
|
+
name: string;
|
|
8
|
+
value: unknown;
|
|
9
|
+
encode: () => Uint8Array;
|
|
10
|
+
}[];
|
|
11
|
+
//# sourceMappingURL=wire-samples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire-samples.d.ts","sourceRoot":"","sources":["../../../src/protocol/wire-samples.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,8EAA8E;AAC9E,eAAO,MAAM,WAAW;UALmE,MAAM;WAAS,OAAO;YAAU,MAAM,UAAU;GAqC1I,CAAC"}
|