@cotal-ai/workspace 0.13.2 → 0.14.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/auth-paths.d.ts +180 -18
- package/dist/auth-paths.d.ts.map +1 -1
- package/dist/auth-paths.js +739 -31
- package/dist/auth-paths.js.map +1 -1
- package/dist/connect.js +3 -3
- package/dist/connect.js.map +1 -1
- package/dist/local-process.d.ts +2 -1
- package/dist/local-process.d.ts.map +1 -1
- package/dist/local-process.js +37 -3
- package/dist/local-process.js.map +1 -1
- package/dist/mesh-registry.d.ts +3 -1
- package/dist/mesh-registry.d.ts.map +1 -1
- package/dist/mesh-registry.js +59 -6
- package/dist/mesh-registry.js.map +1 -1
- package/dist/mesh-target.d.ts +1 -1
- package/dist/mesh-target.d.ts.map +1 -1
- package/dist/mesh-target.js +98 -30
- package/dist/mesh-target.js.map +1 -1
- package/dist/render.js +2 -0
- package/dist/render.js.map +1 -1
- package/dist/renewal.d.ts +28 -7
- package/dist/renewal.d.ts.map +1 -1
- package/dist/renewal.js +66 -11
- package/dist/renewal.js.map +1 -1
- package/dist/space.d.ts +4 -2
- package/dist/space.d.ts.map +1 -1
- package/dist/space.js +6 -4
- package/dist/space.js.map +1 -1
- package/package.json +2 -2
package/dist/mesh-target.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-target.js","sourceRoot":"","sources":["../src/mesh-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"mesh-target.js","sourceRoot":"","sources":["../src/mesh-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAA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AAK,cAAc,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CACxE,CAAC;QACF,IAAI,SAAS;YACX,MAAM,IAAI,eAAe,CACvB,kBAAkB,EAClB,kBAAkB,SAAS,CAAC,KAAK,oBAAoB,cAAc,EAAE,EACrE,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,CACnD,CAAC;QACJ,OAAO,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,eAAe,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;IACnF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEzF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;IAC1D,MAAM,IAAI,eAAe,CAAC,kBAAkB,EAAE,4BAA4B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;QAC5F,SAAS,EAAE,KAAK;KACjB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/render.js
CHANGED
|
@@ -23,6 +23,8 @@ function renderTargetError(err) {
|
|
|
23
23
|
return `✗ another mesh ("${d.space}") is running at ${d.server} - run \`cotal up\` here to start yours, or \`--space ${d.space}\` to join it`;
|
|
24
24
|
case "stale-auth-root":
|
|
25
25
|
return `✗ registry entry "${d.space}" points at ${d.root}, whose auth is now for "${d.found}" - stale entry removed; re-run \`cotal up\` or check \`cotal meshes\``;
|
|
26
|
+
case "unreadable-auth":
|
|
27
|
+
return `✗ space "${d.space}"'s trust material under ${d.root} will not load (${err.message}) - repair or remove the account record, then re-run \`cotal up\``;
|
|
26
28
|
case "user-auth-unrecorded":
|
|
27
29
|
// U11: without a TRUSTED local record of the space's IdP there is no actionable
|
|
28
30
|
// `cotal login --idp <?>` line to print — the honest recovery is re-registering the mesh
|
package/dist/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAmBA,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB,CAAC,CAAiB;IACpD,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,WAAW;YACd,OAAO,sBAAsB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;QAC/D,KAAK,WAAW;YACd,OAAO,eAAe,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,qGAAqG;AACrG,SAAS,iBAAiB,CAAC,GAAoB;IAC7C,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC;IACtB,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,qEAAqE,CAAC;QAC/E,KAAK,eAAe;YAClB,OAAO,oBAAoB,CAAC,CAAC,SAAS,qCAAqC,CAAC;QAC9E,KAAK,kBAAkB;YACrB,OAAO,+BAA+B,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,gFAAgF,CAAC;QACvJ,KAAK,kBAAkB;YACrB,OAAO,oBAAoB,CAAC,CAAC,KAAK,oBAAoB,CAAC,CAAC,MAAM,yDAAyD,CAAC,CAAC,KAAK,eAAe,CA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,KAAK,eAAe;QAC/B,CAAC,CAAC,6BAA6B,MAAM,yDAAyD;QAC9F,CAAC,CAAC,6BAA6B,MAAM,kCAAkC,CAAC;AAC5E,CAAC"}
|
package/dist/renewal.d.ts
CHANGED
|
@@ -42,13 +42,34 @@ export interface RemintResult {
|
|
|
42
42
|
* The manager — the D5 standing-renewal owner, and a hosted-path caller (manager.ts calls this
|
|
43
43
|
* unconditionally) — passes the SAME store it gives the daemon (its `ManagerOptions.secretStore`),
|
|
44
44
|
* so a hosted composition re-signs into the store the daemon renews from, never a divergent one; no
|
|
45
|
-
* store means the local workspace FS composition (keys = the filenames under `.cotal/`).
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
45
|
+
* store means the local workspace FS composition (keys = the filenames under `.cotal/`).
|
|
46
|
+
*
|
|
47
|
+
* `expectedSpace` (the caller's known space — the manager's `this.space`, doctor's resolved space) is
|
|
48
|
+
* a REQUIRED positional and is validated against the store's signer: the daemon creds are SPACE-SCOPED,
|
|
49
|
+
* so a store whose signer is for a DIFFERENT space (a swap after start, a misconfigured hosted mount)
|
|
50
|
+
* must NOT re-sign — that would overwrite each last-good cred with one the space's broker rejects,
|
|
51
|
+
* breaking the daemon on a value that looks freshly renewed. It is required (not optional) so the
|
|
52
|
+
* unsafe no-space call cannot compile — the same claim-exceeds-enforcement trap the cross-space fix
|
|
53
|
+
* would otherwise leave for the next caller. A signer that fails validation fails EVERY file
|
|
54
|
+
* (`ok:false`), leaving the standing creds intact toward their loud expiry rather than clobbering them.
|
|
55
|
+
* The store's ATOMIC put is load-bearing here, because the daemons re-read these values LIVE (the
|
|
56
|
+
* delivery endpoint's 75% source refresh, the membership feed's 75% renewal fetch).
|
|
57
|
+
*
|
|
58
|
+
* The last-good cred is NEVER overwritten with an UNPROVEN one — a bundle's JWT chain is self-bound,
|
|
59
|
+
* not broker-bound (two `createSpaceAuth(space)` calls yield same-named, DIFFERENT-account chains), so
|
|
60
|
+
* a same-label alternate signer could mint a broker-dead cred and CLOBBER the last-good (availability
|
|
61
|
+
* loss). Proof before overwrite is one of: (1) `opts.preflight` — a disposable "does the broker accept
|
|
62
|
+
* this cred" probe the caller owns (the manager passes a {@link probeConnect} over `this.servers`),
|
|
63
|
+
* which gates EVERY candidate when supplied; or (2) AUTHORITY CONTINUITY — the candidate is signed by
|
|
64
|
+
* the SAME account signing key (`iss`) as the current (last-good, already broker-accepted) cred, the
|
|
65
|
+
* same authority the broker trusts, which the OFFLINE local repair (`doctor auth --fix`) relies on. A
|
|
66
|
+
* same-label alternate account breaks continuity, so with no preflight it is refused, not clobbered.
|
|
67
|
+
*
|
|
68
|
+
* Structured per-file results, never throws: a failed remint leaves the old cred running toward its
|
|
69
|
+
* loud expiry and the caller records/reports the failure. */
|
|
70
|
+
export declare function remintDaemonCreds(root: string, expectedSpace: string, store?: SecretStore, opts?: {
|
|
71
|
+
preflight?: (creds: string) => Promise<boolean>;
|
|
72
|
+
}): Promise<RemintResult[]>;
|
|
52
73
|
/** The renewal owner's audit record — what `cotal doctor auth` renders so "file re-signed" and
|
|
53
74
|
* "daemon adopted" are distinguishable states, per the D5 panel gate. One file, overwritten per
|
|
54
75
|
* pass: the CURRENT renewal state, not a log (history is the git/ops layer's job). */
|
package/dist/renewal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renewal.d.ts","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"renewal.d.ts","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,gBAAgB,CAAC;AAIxB;;;;;;;GAOG;AAEH;;;;kGAIkG;AAClG,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD;;uFAEuF;AACvF,eAAO,MAAM,uBAAuB,wBAAwB,CAAC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AAG,SAAS,CAQzE"}
|
package/dist/renewal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { credsFingerprint, identityFromCreds, mintCreds, writeSecretFile, } from "@cotal-ai/core";
|
|
4
|
-
import {
|
|
3
|
+
import { credsClaims, credsFingerprint, identityFromCreds, mintCreds, writeSecretFile, } from "@cotal-ai/core";
|
|
4
|
+
import { getSpaceAuth } from "./auth-paths.js";
|
|
5
5
|
import { workspaceSecretStore } from "./secret-store-fs.js";
|
|
6
6
|
/**
|
|
7
7
|
* D5 slice 5 class-2 standing renewal — the RENEWAL OWNER'S half, shared by the manager (the
|
|
@@ -34,17 +34,48 @@ export const REMINTABLE_DAEMON_CREDS = [
|
|
|
34
34
|
* The manager — the D5 standing-renewal owner, and a hosted-path caller (manager.ts calls this
|
|
35
35
|
* unconditionally) — passes the SAME store it gives the daemon (its `ManagerOptions.secretStore`),
|
|
36
36
|
* so a hosted composition re-signs into the store the daemon renews from, never a divergent one; no
|
|
37
|
-
* store means the local workspace FS composition (keys = the filenames under `.cotal/`).
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
* store means the local workspace FS composition (keys = the filenames under `.cotal/`).
|
|
38
|
+
*
|
|
39
|
+
* `expectedSpace` (the caller's known space — the manager's `this.space`, doctor's resolved space) is
|
|
40
|
+
* a REQUIRED positional and is validated against the store's signer: the daemon creds are SPACE-SCOPED,
|
|
41
|
+
* so a store whose signer is for a DIFFERENT space (a swap after start, a misconfigured hosted mount)
|
|
42
|
+
* must NOT re-sign — that would overwrite each last-good cred with one the space's broker rejects,
|
|
43
|
+
* breaking the daemon on a value that looks freshly renewed. It is required (not optional) so the
|
|
44
|
+
* unsafe no-space call cannot compile — the same claim-exceeds-enforcement trap the cross-space fix
|
|
45
|
+
* would otherwise leave for the next caller. A signer that fails validation fails EVERY file
|
|
46
|
+
* (`ok:false`), leaving the standing creds intact toward their loud expiry rather than clobbering them.
|
|
47
|
+
* The store's ATOMIC put is load-bearing here, because the daemons re-read these values LIVE (the
|
|
48
|
+
* delivery endpoint's 75% source refresh, the membership feed's 75% renewal fetch).
|
|
49
|
+
*
|
|
50
|
+
* The last-good cred is NEVER overwritten with an UNPROVEN one — a bundle's JWT chain is self-bound,
|
|
51
|
+
* not broker-bound (two `createSpaceAuth(space)` calls yield same-named, DIFFERENT-account chains), so
|
|
52
|
+
* a same-label alternate signer could mint a broker-dead cred and CLOBBER the last-good (availability
|
|
53
|
+
* loss). Proof before overwrite is one of: (1) `opts.preflight` — a disposable "does the broker accept
|
|
54
|
+
* this cred" probe the caller owns (the manager passes a {@link probeConnect} over `this.servers`),
|
|
55
|
+
* which gates EVERY candidate when supplied; or (2) AUTHORITY CONTINUITY — the candidate is signed by
|
|
56
|
+
* the SAME account signing key (`iss`) as the current (last-good, already broker-accepted) cred, the
|
|
57
|
+
* same authority the broker trusts, which the OFFLINE local repair (`doctor auth --fix`) relies on. A
|
|
58
|
+
* same-label alternate account breaks continuity, so with no preflight it is refused, not clobbered.
|
|
59
|
+
*
|
|
60
|
+
* Structured per-file results, never throws: a failed remint leaves the old cred running toward its
|
|
61
|
+
* loud expiry and the caller records/reports the failure. */
|
|
62
|
+
export async function remintDaemonCreds(root, expectedSpace, store, opts) {
|
|
63
|
+
const s = store ?? workspaceSecretStore(root);
|
|
64
|
+
// Read + FULLY VALIDATE the SIGNER through the SAME store the daemon creds live in (symmetric with
|
|
65
|
+
// the daemon's `runDelivery(args, store)`) — reading it from the FS while writing the daemon creds
|
|
66
|
+
// to an injected store would split authority (signer ← disk, cred ← KMS): the class 3b closed for
|
|
67
|
+
// daemon creds, here for the signer. `getSpaceAuth(s, expectedSpace)` cross-checks the trust chain
|
|
68
|
+
// against the caller's space; a wrong-space or malformed signer THROWS (never re-signs).
|
|
69
|
+
let auth;
|
|
70
|
+
try {
|
|
71
|
+
auth = await getSpaceAuth(s, expectedSpace);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
// Wrong-space / malformed signer: fail every file, DO NOT overwrite the last-good creds.
|
|
75
|
+
return REMINTABLE_DAEMON_CREDS.map(({ file }) => ({ file, ok: false, error: e.message }));
|
|
76
|
+
}
|
|
45
77
|
if (!auth)
|
|
46
78
|
return REMINTABLE_DAEMON_CREDS.map(({ file }) => ({ file, ok: false, skipped: "no-auth" }));
|
|
47
|
-
const s = store ?? workspaceSecretStore(root);
|
|
48
79
|
const results = [];
|
|
49
80
|
for (const { file, profile } of REMINTABLE_DAEMON_CREDS) {
|
|
50
81
|
try {
|
|
@@ -54,6 +85,30 @@ export async function remintDaemonCreds(root, store) {
|
|
|
54
85
|
continue;
|
|
55
86
|
}
|
|
56
87
|
const next = await mintCreds(auth, identityFromCreds(current), profile);
|
|
88
|
+
// NEVER overwrite the last-good cred with an UNPROVEN one. A bundle's JWT chain is SELF-bound,
|
|
89
|
+
// not broker-bound (two `createSpaceAuth(space)` calls yield same-named, DIFFERENT-account chains),
|
|
90
|
+
// so `expectedSpace` + full-chain validity is not enough. Proof is one of:
|
|
91
|
+
// (1) a broker PREFLIGHT — the manager's live "does the broker accept this cred" probe; OR
|
|
92
|
+
// (2) AUTHORITY CONTINUITY — the candidate is signed by the SAME account signing key (`iss`) as
|
|
93
|
+
// the current (last-good, already broker-accepted) cred, i.e. the same authority the broker
|
|
94
|
+
// already trusts. This is what the OFFLINE local repair (`doctor auth --fix`, no live broker)
|
|
95
|
+
// relies on. A same-label ALTERNATE account (full OR stripped) breaks continuity, so with no
|
|
96
|
+
// preflight it is REFUSED — the last-good is preserved rather than clobbered by a broker-dead cred.
|
|
97
|
+
let proven;
|
|
98
|
+
let why;
|
|
99
|
+
if (opts?.preflight) {
|
|
100
|
+
proven = await opts.preflight(next);
|
|
101
|
+
why = "the broker refused the re-signed cred (wrong-account or unreachable signer)";
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
const iss = credsClaims(next).iss;
|
|
105
|
+
proven = iss !== undefined && iss === credsClaims(current).iss;
|
|
106
|
+
why = "the re-signed cred's signer is not the last-good cred's authority, and no broker preflight was supplied";
|
|
107
|
+
}
|
|
108
|
+
if (!proven) {
|
|
109
|
+
results.push({ file, ok: false, error: `${why} - last-good cred preserved` });
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
57
112
|
await s.put(file, next);
|
|
58
113
|
results.push({ file, ok: true, fingerprint: credsFingerprint(next) });
|
|
59
114
|
}
|
package/dist/renewal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renewal.js","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eAAe,
|
|
1
|
+
{"version":3,"file":"renewal.js","sourceRoot":"","sources":["../src/renewal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;;;GAOG;AAEH;;;;kGAIkG;AAClG,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD;;uFAEuF;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D;;qDAEqD;AACrD,MAAM,CAAC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+
* Commands resolve it through here so they always match the folder's mesh instead of assuming the
|
|
3
|
+
* global default. A root that has grown to hold SEVERAL space accounts makes this question
|
|
4
|
+
* ambiguous, and {@link soleSpaceOf} fails loud there rather than picking one - such a caller has
|
|
5
|
+
* to name its space (`--space`). */
|
|
4
6
|
export declare function resolveSpace(cwd: string): string;
|
|
5
7
|
//# sourceMappingURL=space.d.ts.map
|
package/dist/space.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../src/space.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../src/space.ts"],"names":[],"mappings":"AAGA;;;;qCAIqC;AACrC,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
package/dist/space.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DEFAULT_SPACE } from "@cotal-ai/core";
|
|
2
|
-
import { authDir, findCotalRoot,
|
|
2
|
+
import { authDir, findCotalRoot, soleSpaceOf } from "./auth-paths.js";
|
|
3
3
|
/** The space this folder operates on: its `.cotal/auth` space if set up, else the default.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Commands resolve it through here so they always match the folder's mesh instead of assuming the
|
|
5
|
+
* global default. A root that has grown to hold SEVERAL space accounts makes this question
|
|
6
|
+
* ambiguous, and {@link soleSpaceOf} fails loud there rather than picking one - such a caller has
|
|
7
|
+
* to name its space (`--space`). */
|
|
6
8
|
export function resolveSpace(cwd) {
|
|
7
|
-
return
|
|
9
|
+
return soleSpaceOf(authDir(findCotalRoot(cwd))) ?? DEFAULT_SPACE;
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=space.js.map
|
package/dist/space.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.js","sourceRoot":"","sources":["../src/space.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"space.js","sourceRoot":"","sources":["../src/space.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEtE;;;;qCAIqC;AACrC,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC;AACnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/workspace",
|
|
3
3
|
"description": "Cotal machine-local workstation layer: the ~/.cotal mesh registry, target resolution, preflight, on-disk auth-path I/O, and the command-copy renderer — operator concerns over a local checkout, kept separate from the wire protocol in @cotal-ai/core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cotal-ai/core": "0.
|
|
21
|
+
"@cotal-ai/core": "0.14.0"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist"
|