@cotal-ai/delivery 0.11.6 → 0.12.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/delivery.d.ts +15 -2
- package/dist/delivery.d.ts.map +1 -1
- package/dist/delivery.js +64 -29
- package/dist/delivery.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/delivery.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { type ParsedArgs } from "@cotal-ai/core";
|
|
1
|
+
import { type ParsedArgs, type SecretStore } from "@cotal-ai/core";
|
|
2
|
+
import { DELIVERY_CREDS_KEY } from "@cotal-ai/workspace";
|
|
3
|
+
/** Re-exported for hosted compositions: the {@link SecretStore} key a store injected into
|
|
4
|
+
* {@link runDelivery} must hold the cred under. Defined once in workspace (the key↔filename
|
|
5
|
+
* convention is the workspace layout's) so the writer, the renewal owner, and this reader can
|
|
6
|
+
* never drift apart. */
|
|
7
|
+
export { DELIVERY_CREDS_KEY };
|
|
2
8
|
/**
|
|
3
9
|
* Run the delivery daemon: the server-side Plane-3 durable backstop. A thin composition root that
|
|
4
10
|
* builds a scoped `delivery` endpoint, acquires the single-flight lease, and runs the existing
|
|
@@ -7,6 +13,13 @@ import { type ParsedArgs } from "@cotal-ai/core";
|
|
|
7
13
|
* (no signer in the daemon's trust boundary) — minting is the CLI setup helper's job (or `--dev-mint`
|
|
8
14
|
* for standalone dev). N=1 only — `shards > 1` (or a non-zero shard) is HARD-REJECTED (the partition
|
|
9
15
|
* seam ships, operating sharded delivery is deferred to the channel-prefix grammar; see core-sub-fabric.md).
|
|
16
|
+
*
|
|
17
|
+
* `store` is the hosted-composition seam: a closed composition root calls this export directly and
|
|
18
|
+
* injects its own {@link SecretStore} (KMS/Vault…) holding the cred under {@link DELIVERY_CREDS_KEY};
|
|
19
|
+
* the registered `deliver` command passes none and gets the workstation FS store (or `--creds`).
|
|
20
|
+
* Injection currently covers the daemon READ path only: the renewal owner's write side
|
|
21
|
+
* (`remintDaemonCreds(root, store?)`) accepts the same store but is not yet threaded through the
|
|
22
|
+
* manager, so hosted end-to-end renewal on an injected store is NOT wired yet.
|
|
10
23
|
*/
|
|
11
|
-
export declare function runDelivery(args: ParsedArgs): Promise<void>;
|
|
24
|
+
export declare function runDelivery(args: ParsedArgs, store?: SecretStore): Promise<void>;
|
|
12
25
|
//# sourceMappingURL=delivery.d.ts.map
|
package/dist/delivery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAUL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAA8E,MAAM,qBAAqB,CAAC;AAMrI;;;yBAGyB;AACzB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAoF9B;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuItF"}
|
package/dist/delivery.js
CHANGED
|
@@ -1,49 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join } from "node:path";
|
|
1
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
3
2
|
import { CotalEndpoint, DEFAULT_SERVER, LEASE_TTL_MS, credsClaims, idFromCreds, isReachable, mintCreds, newIdentity, } from "@cotal-ai/core";
|
|
4
|
-
import { authDir, findCotalRoot, loadSpaceAuth } from "@cotal-ai/workspace";
|
|
3
|
+
import { DELIVERY_CREDS_KEY, FsSecretStore, authDir, findCotalRoot, loadSpaceAuth, workspaceSecretStore } from "@cotal-ai/workspace";
|
|
5
4
|
import { startMembership } from "./membership.js";
|
|
6
5
|
import { executeEviction } from "./evict-exec.js";
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
/** Re-exported for hosted compositions: the {@link SecretStore} key a store injected into
|
|
7
|
+
* {@link runDelivery} must hold the cred under. Defined once in workspace (the key↔filename
|
|
8
|
+
* convention is the workspace layout's) so the writer, the renewal owner, and this reader can
|
|
9
|
+
* never drift apart. */
|
|
10
|
+
export { DELIVERY_CREDS_KEY };
|
|
11
|
+
/** Where the daemon's pre-minted cred lives — exactly ONE source, resolved up front: an injected
|
|
12
|
+
* {@link SecretStore} (a hosted composition), an explicit `--creds <file>` (e.g. a read-only
|
|
13
|
+
* container mount) as an FS store over that exact file, or the default workstation location.
|
|
14
|
+
* With an injected store the store is the ONLY credential source: every local-source flag
|
|
15
|
+
* (`--creds`, `--dev-mint`) is rejected loudly at this boundary — and it runs BEFORE any ambient
|
|
16
|
+
* read in `runDelivery` — so a hosted composition can never cross back into workstation trust
|
|
17
|
+
* material (a creds file, the local signer), not even for a space label. `where` is the human
|
|
18
|
+
* label used in error messages so a local operator still sees a path, not an abstract key. */
|
|
19
|
+
function resolveCredsStore(v, injected) {
|
|
20
|
+
if (injected) {
|
|
21
|
+
const local = ["creds", "dev-mint"].filter((f) => v[f] !== undefined);
|
|
22
|
+
if (local.length)
|
|
23
|
+
throw new Error(`delivery: ${local.map((f) => `--${f}`).join(" and ")} cannot be combined with an injected secret store — the store is the cred's only source`);
|
|
24
|
+
return { store: injected, key: DELIVERY_CREDS_KEY, where: `secret-store key "${DELIVERY_CREDS_KEY}"`, injected: true };
|
|
25
|
+
}
|
|
26
|
+
if (v.creds !== undefined) {
|
|
27
|
+
const p = resolve(v.creds);
|
|
28
|
+
return { store: new FsSecretStore(dirname(p)), key: basename(p), where: p, injected: false };
|
|
29
|
+
}
|
|
30
|
+
const root = findCotalRoot();
|
|
31
|
+
return { store: workspaceSecretStore(root), key: DELIVERY_CREDS_KEY, where: join(root, ".cotal", DELIVERY_CREDS_KEY), injected: false };
|
|
12
32
|
}
|
|
13
|
-
/** The daemon's scoped `delivery` creds — the PRODUCTION path reads a PRE-MINTED
|
|
14
|
-
*
|
|
15
|
-
* the signer: this runtime does not load `.cotal/auth`. Returned as
|
|
16
|
-
* is the D5 slice-5 class-2 reload seam — the endpoint re-invokes it
|
|
17
|
-
* the daemon renews from the renewal-owner-re-signed
|
|
18
|
-
* IDEMPOTENT on an unchanged
|
|
19
|
-
* may race the backstop); past it, an unchanged
|
|
20
|
-
* exact repair — never a silent ride to expiry. A standalone
|
|
21
|
-
* with no
|
|
22
|
-
* `delivery` cred (one stable identity) — LOUDLY flagged as dev-only, never the production
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
/** The daemon's scoped `delivery` creds — the PRODUCTION path reads a PRE-MINTED cred through the
|
|
34
|
+
* {@link SecretStore} seam ({@link resolveCredsStore}; locally the CLI's `ensureDelivery` setup helper
|
|
35
|
+
* wrote it) and NEVER touches the signer: this runtime does not load `.cotal/auth`. Returned as
|
|
36
|
+
* `{ initial, source }`: the SOURCE is the D5 slice-5 class-2 reload seam — the endpoint re-invokes it
|
|
37
|
+
* at 75% of each JWT's lifetime, so the daemon renews from the renewal-owner-re-signed store entry
|
|
38
|
+
* without a restart or a signal. Adoption is IDEMPOTENT on an unchanged value while its cred is still
|
|
39
|
+
* ahead of the renewal point (explicit reload may race the backstop); past it, an unchanged value is a
|
|
40
|
+
* MISSED remint, surfaced loudly with the exact repair — never a silent ride to expiry. A standalone
|
|
41
|
+
* dev run with no stored cred can opt into `--dev-mint`, which loads the local signer and self-remints
|
|
42
|
+
* a scoped `delivery` cred (one stable identity) — LOUDLY flagged as dev-only, never the production
|
|
43
|
+
* contract. */
|
|
44
|
+
async function loadDeliveryCreds(src, v) {
|
|
45
|
+
const { store, key, where } = src;
|
|
46
|
+
const initial = await store.get(key);
|
|
47
|
+
if (initial !== undefined) {
|
|
27
48
|
let last; // set by the FIRST source call (the endpoint's initial fetch)
|
|
28
49
|
return {
|
|
29
50
|
initial,
|
|
30
51
|
source: async () => {
|
|
31
|
-
const content =
|
|
52
|
+
const content = await store.get(key);
|
|
53
|
+
if (content === undefined)
|
|
54
|
+
throw new Error(`delivery: the scoped delivery cred is gone (${where}) — restore it (locally: re-run \`cotal up\`) before the current JWT expires`);
|
|
32
55
|
if (last !== undefined && content === last) {
|
|
33
|
-
// Unchanged
|
|
56
|
+
// Unchanged value: adoption is IDEMPOTENT while the cred is still ahead of its renewal
|
|
34
57
|
// point (the explicit reload may race the 75% backstop that just adopted the same
|
|
35
|
-
// re-sign — both succeeding is correct). Past the renewal point an unchanged
|
|
58
|
+
// re-sign — both succeeding is correct). Past the renewal point an unchanged value is a
|
|
36
59
|
// MISSED remint: fail loud with the exact repair, never a silent ride to expiry.
|
|
37
60
|
const { iat, exp } = credsClaims(content);
|
|
38
61
|
if (typeof exp === "number" && typeof iat === "number" && Date.now() / 1000 < iat + 0.75 * (exp - iat))
|
|
39
62
|
return content;
|
|
40
|
-
throw new Error(`${
|
|
63
|
+
throw new Error(`${where} still holds the previous cred — the renewal owner has not re-signed it (the manager re-signs + reloads every half-TTL); run \`cotal doctor auth --fix\`, or restart the mesh's manager, before this JWT expires`);
|
|
41
64
|
}
|
|
42
65
|
last = content;
|
|
43
66
|
return content;
|
|
44
67
|
},
|
|
45
68
|
};
|
|
46
69
|
}
|
|
70
|
+
if (src.injected)
|
|
71
|
+
throw new Error(`delivery: no cred in the injected secret store under key "${DELIVERY_CREDS_KEY}" — the hosted composition must put it before starting the daemon (local sources are never consulted when a store is injected)`);
|
|
47
72
|
if (v["dev-mint"] !== undefined) {
|
|
48
73
|
const auth = loadSpaceAuth(authDir(findCotalRoot()));
|
|
49
74
|
if (!auth)
|
|
@@ -53,7 +78,7 @@ async function loadDeliveryCreds(v) {
|
|
|
53
78
|
const initial = await mintCreds(auth, identity, "delivery");
|
|
54
79
|
return { initial, source: () => mintCreds(auth, identity, "delivery") };
|
|
55
80
|
}
|
|
56
|
-
throw new Error(`delivery: no scoped creds at ${
|
|
81
|
+
throw new Error(`delivery: no scoped creds at ${where}. Launch via \`cotal setup\`/\`cotal go\` (the setup helper mints + writes it), or pass --creds <file>; for a standalone dev run use --dev-mint.`);
|
|
57
82
|
}
|
|
58
83
|
// Parsing lives in the dispatcher now, driven by the `deliver` command's declared flags.
|
|
59
84
|
/**
|
|
@@ -64,20 +89,30 @@ async function loadDeliveryCreds(v) {
|
|
|
64
89
|
* (no signer in the daemon's trust boundary) — minting is the CLI setup helper's job (or `--dev-mint`
|
|
65
90
|
* for standalone dev). N=1 only — `shards > 1` (or a non-zero shard) is HARD-REJECTED (the partition
|
|
66
91
|
* seam ships, operating sharded delivery is deferred to the channel-prefix grammar; see core-sub-fabric.md).
|
|
92
|
+
*
|
|
93
|
+
* `store` is the hosted-composition seam: a closed composition root calls this export directly and
|
|
94
|
+
* injects its own {@link SecretStore} (KMS/Vault…) holding the cred under {@link DELIVERY_CREDS_KEY};
|
|
95
|
+
* the registered `deliver` command passes none and gets the workstation FS store (or `--creds`).
|
|
96
|
+
* Injection currently covers the daemon READ path only: the renewal owner's write side
|
|
97
|
+
* (`remintDaemonCreds(root, store?)`) accepts the same store but is not yet threaded through the
|
|
98
|
+
* manager, so hosted end-to-end renewal on an injected store is NOT wired yet.
|
|
67
99
|
*/
|
|
68
|
-
export async function runDelivery(args) {
|
|
100
|
+
export async function runDelivery(args, store) {
|
|
69
101
|
const v = args.values;
|
|
70
102
|
const shard = v.shard ? Number(v.shard) : 0;
|
|
71
103
|
const shards = v.shards ? Number(v.shards) : 1;
|
|
72
104
|
if (shards !== 1 || shard !== 0)
|
|
73
105
|
throw new Error(`delivery: sharded operation is not supported (N=1 only; got shard=${shard} shards=${shards}). ` +
|
|
74
106
|
"The partition() seam ships but operating shards>1 needs the channel-prefix grammar — see core-sub-fabric.md.");
|
|
107
|
+
// Resolve the cred source FIRST — before the ambient space derivation below — so an injected
|
|
108
|
+
// store rejects local-source flags before anything can read the workstation signer.
|
|
109
|
+
const credsSrc = resolveCredsStore(v, store);
|
|
75
110
|
// Space comes from --space (the CLI passes it). Only --dev-mint may derive it from the local signer.
|
|
76
111
|
const space = v.space ?? (v["dev-mint"] !== undefined ? loadSpaceAuth(authDir(findCotalRoot()))?.space : undefined);
|
|
77
112
|
if (!space)
|
|
78
113
|
throw new Error("delivery: --space is required (the scoped creds file does not encode it)");
|
|
79
114
|
const server = v.server ?? DEFAULT_SERVER;
|
|
80
|
-
const creds = await loadDeliveryCreds(v); // pre-minted scoped cred; NO signer/loadSpaceAuth in this path
|
|
115
|
+
const creds = await loadDeliveryCreds(credsSrc, v); // pre-minted scoped cred; NO signer/loadSpaceAuth in this path
|
|
81
116
|
let latestCreds = creds.initial; // freshest renewal — the broker-reachability poll below presents it
|
|
82
117
|
if (!(await isReachable(server, { creds: latestCreds }))) {
|
|
83
118
|
console.error(`✗ delivery: can't reach NATS at ${server}. Run: cotal up`);
|
package/dist/delivery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,GAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACrI,OAAO,EA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AAG,EAAE,GAAG,aAAa,GAAG,cAAc,EAAE,CAAC;gBAChD,OAAO,CAAC,KAAK,CAAC,uCAAuC,cAAc,GAAG,IAAI,qCAAqC,CAAC,CAAC;gBACjH,QAAQ,CAAC,CAAC,CAAC,CAAC;YACd,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACrB,CAAC,EAAE,IAAI,CAAC,CAAC;IAET,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,IAAI,OAAO,CAAO,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,sBAAsB;AAC3D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { runDelivery } from "./delivery.js";
|
|
1
|
+
import { DELIVERY_CREDS_KEY, runDelivery } from "./delivery.js";
|
|
2
2
|
import { runFeedbackIntake } from "./feedback-intake.js";
|
|
3
|
-
export { runDelivery };
|
|
3
|
+
export { DELIVERY_CREDS_KEY, runDelivery };
|
|
4
4
|
export { runFeedbackIntake };
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA2CzD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `@cotal-ai/manager` or `@cotal-ai/cli` (one-way tiering).
|
|
7
7
|
*/
|
|
8
8
|
import { registry } from "@cotal-ai/core";
|
|
9
|
-
import { runDelivery } from "./delivery.js";
|
|
9
|
+
import { DELIVERY_CREDS_KEY, runDelivery } from "./delivery.js";
|
|
10
10
|
import { runFeedbackIntake } from "./feedback-intake.js";
|
|
11
11
|
const deliveryCommands = [
|
|
12
12
|
{
|
|
@@ -45,6 +45,6 @@ const deliveryCommands = [
|
|
|
45
45
|
},
|
|
46
46
|
];
|
|
47
47
|
registry.register(...deliveryCommands);
|
|
48
|
-
export { runDelivery };
|
|
48
|
+
export { DELIVERY_CREDS_KEY, runDelivery };
|
|
49
49
|
export { runFeedbackIntake };
|
|
50
50
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,gBAAgB,GAAc;IAClC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,OAAO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EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,+DAA+D,EAAE;YAChI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,0DAA0D,EAAE;YACxH,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,sDAAsD,EAAE;YACzH,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,sCAAsC,EAAE;YACvG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,6CAA6C,EAAE;YAC9G,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,iDAAiD,EAAE;YACnH,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,kDAAkD,EAAE;SACtH;QACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;KACvC;CACF,CAAC;AAEF,QAAQ,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/delivery",
|
|
3
3
|
"description": "Cotal delivery daemon: the server-side Plane-3 durable backstop (fan-out writer + trusted reader + membership/ACL authority), a scoped least-privilege NATS client co-located with the broker.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cotal-ai/core": "0.
|
|
22
|
-
"@cotal-ai/workspace": "0.
|
|
21
|
+
"@cotal-ai/core": "0.12.0",
|
|
22
|
+
"@cotal-ai/workspace": "0.12.0"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|