@cleocode/cleo 2026.9.26 → 2026.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/bin/cleo.js +17 -1
  2. package/dist/cli/hook-entry.js +372 -0
  3. package/dist/cli/index.js +2487 -369
  4. package/package.json +13 -13
  5. package/studio-dist/client/_app/immutable/chunks/{BhOwHRY9.js → BJp57kf2.js} +1 -1
  6. package/studio-dist/client/_app/immutable/chunks/{CobI0XAU.js → Buaay_Q8.js} +1 -1
  7. package/studio-dist/client/_app/immutable/chunks/C3l-lTkq.js +1 -0
  8. package/studio-dist/client/_app/immutable/chunks/CLP4JZvZ.js +3 -0
  9. package/studio-dist/client/_app/immutable/entry/{app.DaDdqQTe.js → app.CczVILch.js} +2 -2
  10. package/studio-dist/client/_app/immutable/entry/start.D7gHmBNS.js +1 -0
  11. package/studio-dist/client/_app/immutable/nodes/{0.CKHiZeuP.js → 0.Zy2IsLEl.js} +1 -1
  12. package/studio-dist/client/_app/immutable/nodes/{1.CmaYPYrk.js → 1.DJN1QI3l.js} +1 -1
  13. package/studio-dist/client/_app/immutable/nodes/{15.D23qtyoz.js → 15.B4rwqbHV.js} +1 -1
  14. package/studio-dist/client/_app/immutable/nodes/{16.Dtt6exbd.js → 16.jn-5BG_L.js} +1 -1
  15. package/studio-dist/client/_app/immutable/nodes/{17.CPZ22rBo.js → 17.DnWGC4t9.js} +1 -1
  16. package/studio-dist/client/_app/immutable/nodes/{18.Qm_fekS5.js → 18.0zddLZOY.js} +1 -1
  17. package/studio-dist/client/_app/immutable/nodes/{20.DjGgB4KD.js → 20.DEKHq9Tc.js} +1 -1
  18. package/studio-dist/client/_app/immutable/nodes/{24.CgMoobl_.js → 24.CQB9KP-p.js} +1 -1
  19. package/studio-dist/client/_app/immutable/nodes/25.BaqToZD-.js +39 -0
  20. package/studio-dist/client/_app/immutable/nodes/{26.C1oRqB1b.js → 26.BiE1i4iE.js} +1 -1
  21. package/studio-dist/client/_app/immutable/nodes/{3.Cy4T6zbv.js → 3.BObAOu_-.js} +1 -1
  22. package/studio-dist/client/_app/version.json +1 -1
  23. package/studio-dist/server/chunks/{0-G8NhADpo.js → 0-BmUoS2yd.js} +3 -3
  24. package/studio-dist/server/chunks/1-CTjj2MYz.js +9 -0
  25. package/studio-dist/server/chunks/{15-o63WM4MZ.js → 15-Dt4kqUxW.js} +3 -3
  26. package/studio-dist/server/chunks/{16-7h8G4VoG.js → 16-kgTLJvbO.js} +3 -3
  27. package/studio-dist/server/chunks/{17-DcShICKv.js → 17-mRYB5141.js} +3 -3
  28. package/studio-dist/server/chunks/{18-BER3ZYEh.js → 18-BjZ325q5.js} +3 -3
  29. package/studio-dist/server/chunks/{20-DErTM2qU.js → 20-DQ2Vrujq.js} +3 -3
  30. package/studio-dist/server/chunks/{24-BZh7ZC1u.js → 24-DAeuAfXN.js} +3 -3
  31. package/studio-dist/server/chunks/{25-qqsEYb5C.js → 25-DGCNmzAS.js} +4 -4
  32. package/studio-dist/server/chunks/{26-C424QBHc.js → 26-CiN6bbmR.js} +3 -3
  33. package/studio-dist/server/chunks/{3-DDisSHuV.js → 3-BS2FXYjP.js} +3 -3
  34. package/studio-dist/server/chunks/{_layout.svelte-DcfphVWO.js → _layout.svelte-DJ_UWmGp.js} +4 -4
  35. package/studio-dist/server/chunks/{_page.svelte-DuD1vdhl.js → _page.svelte-BUq8_eQH.js} +3 -3
  36. package/studio-dist/server/chunks/{_page.svelte-CPdHIklX.js → _page.svelte-CRnYa4cW.js} +5 -5
  37. package/studio-dist/server/chunks/{_page.svelte-B4hg1b3p.js → _page.svelte-Ca7x-ZvH.js} +4 -4
  38. package/studio-dist/server/chunks/{_page.svelte-DBbdqQsp.js → _page.svelte-CcP_KW3Y.js} +3 -3
  39. package/studio-dist/server/chunks/{_page.svelte-EPu-M4nY.js → _page.svelte-Cfv9tDBA.js} +3 -3
  40. package/studio-dist/server/chunks/{_page.svelte-C8Ybsn2v.js → _page.svelte-D8dLEr7O.js} +3 -3
  41. package/studio-dist/server/chunks/{_page.svelte-DdaHffLO.js → _page.svelte-Dk0znswQ.js} +3 -3
  42. package/studio-dist/server/chunks/{_page.svelte-CWNRWa2L.js → _page.svelte-J4HjPhfO.js} +3 -3
  43. package/studio-dist/server/chunks/{_page.svelte-BjX_VPfv.js → _page.svelte-WR6jUiQE.js} +3 -3
  44. package/studio-dist/server/chunks/{_server.ts-wZKCwtFH.js → _server.ts-2BazvYRP.js} +3 -3
  45. package/studio-dist/server/chunks/{_server.ts-BjIJy4O3.js → _server.ts-Bih2-_5O.js} +2 -2
  46. package/studio-dist/server/chunks/{_server.ts-CmiJfYD5.js → _server.ts-C0evMKCk.js} +3 -3
  47. package/studio-dist/server/chunks/{_server.ts-C4WHkBZ_.js → _server.ts-Cr57EKWf.js} +3 -3
  48. package/studio-dist/server/chunks/{_server.ts-BGuhOntH.js → _server.ts-P4wVVksg.js} +3 -3
  49. package/studio-dist/server/chunks/{client-ARinjJG0.js → client-Cl295FWH.js} +2 -2
  50. package/studio-dist/server/chunks/{dist-CLTFgJWk.js → dist-CdoCt9zT.js} +314 -4
  51. package/studio-dist/server/chunks/{error.svelte-m5N9iUFN.js → error.svelte-ajn1HNOb.js} +3 -3
  52. package/studio-dist/server/chunks/{http-DKP1pqq1.js → http-BiQjEmVU.js} +2 -2
  53. package/studio-dist/server/chunks/{internal-BF6KxfEH.js → internal-D9MtKHIF.js} +2 -2
  54. package/studio-dist/server/chunks/{stores-UvZbmzhQ.js → stores-BlknvZ80.js} +2 -2
  55. package/studio-dist/server/index.js +1 -1
  56. package/studio-dist/server/manifest.js +17 -17
  57. package/studio-dist/client/_app/immutable/chunks/B2oT_qgu.js +0 -3
  58. package/studio-dist/client/_app/immutable/chunks/B7RPHy-R.js +0 -1
  59. package/studio-dist/client/_app/immutable/entry/start.BjuNqpl1.js +0 -1
  60. package/studio-dist/client/_app/immutable/nodes/25.DkFAoI4l.js +0 -39
  61. package/studio-dist/server/chunks/1-CfXNxnLm.js +0 -9
@@ -1,11 +1,11 @@
1
1
  import { o as onDestroy } from './index-server-BgfA6C0S.js';
2
2
  import { t as attr_style, v as stringify, x as head, p as escape_html, k as attr, m as attr_class, j as ensure_array_like, y as bind_props, w as derived } from './dev-Br5zieNA.js';
3
- import './client-ARinjJG0.js';
3
+ import './client-Cl295FWH.js';
4
4
  import { a as Breadcrumb, B as Badge, T as Tabs, C as Card, I as IconButton } from './Tabs-DQKDflnT.js';
5
5
  import './cluster-label-layer-CysRMvhi.js';
6
6
  import { H as Hover_label, r as resolveEdgeStyleForWebGL, A as ALL_EDGE_KINDS, d as describeEdgeKind, E as EDGE_STYLE } from './no-face-up-B_3h6Hgs.js';
7
7
  import 'node:module';
8
- import './internal-BF6KxfEH.js';
8
+ import './internal-D9MtKHIF.js';
9
9
  import './utils-g564cUMV.js';
10
10
 
11
11
  //#region src/lib/graph/types.ts
@@ -1159,4 +1159,4 @@ function _page($$renderer, $$props) {
1159
1159
  }
1160
1160
 
1161
1161
  export { _page as default };
1162
- //# sourceMappingURL=_page.svelte-BjX_VPfv.js.map
1162
+ //# sourceMappingURL=_page.svelte-WR6jUiQE.js.map
@@ -1,7 +1,7 @@
1
- import { c as createSseStream, S as SSE_HEADERS } from './http-DKP1pqq1.js';
1
+ import { c as createSseStream, S as SSE_HEADERS } from './http-BiQjEmVU.js';
2
2
  import { metrics } from '@cleocode/core';
3
3
  import { listSessions } from '@cleocode/core/sessions';
4
- import './dist-CLTFgJWk.js';
4
+ import './dist-CdoCt9zT.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
7
7
  import 'path';
@@ -139,4 +139,4 @@ var GET = ({ locals, params, request }) => {
139
139
  };
140
140
 
141
141
  export { GET };
142
- //# sourceMappingURL=_server.ts-wZKCwtFH.js.map
142
+ //# sourceMappingURL=_server.ts-2BazvYRP.js.map
@@ -13,7 +13,7 @@ import '@cleocode/core/store/open-cleo-db';
13
13
  import '@cleocode/core/store/worktree-build-guard';
14
14
 
15
15
  //#region package.json
16
- var version = "2026.9.26";
16
+ var version = "2026.10.2";
17
17
  //#endregion
18
18
  //#region src/routes/api/health/+server.ts
19
19
  /**
@@ -120,4 +120,4 @@ var GET = ({ locals }) => {
120
120
  };
121
121
 
122
122
  export { GET };
123
- //# sourceMappingURL=_server.ts-BjIJy4O3.js.map
123
+ //# sourceMappingURL=_server.ts-Bih2-_5O.js.map
@@ -1,6 +1,6 @@
1
- import { c as createSseStream, S as SSE_HEADERS } from './http-DKP1pqq1.js';
1
+ import { c as createSseStream, S as SSE_HEADERS } from './http-BiQjEmVU.js';
2
2
  import { g as getTasksDb } from './connections2-DyYEcX2h.js';
3
- import './dist-CLTFgJWk.js';
3
+ import './dist-CdoCt9zT.js';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import '@cleocode/core';
@@ -65,4 +65,4 @@ var GET = ({ locals, request }) => {
65
65
  };
66
66
 
67
67
  export { GET };
68
- //# sourceMappingURL=_server.ts-CmiJfYD5.js.map
68
+ //# sourceMappingURL=_server.ts-C0evMKCk.js.map
@@ -1,6 +1,6 @@
1
- import { c as createSseStream, S as SSE_HEADERS, e as encodeSseFrame } from './http-DKP1pqq1.js';
1
+ import { c as createSseStream, S as SSE_HEADERS, e as encodeSseFrame } from './http-BiQjEmVU.js';
2
2
  import { a as getBrainDb, g as getTasksDb, c as getConduitDb } from './connections2-DyYEcX2h.js';
3
- import './dist-CLTFgJWk.js';
3
+ import './dist-CdoCt9zT.js';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import '@cleocode/core';
@@ -275,4 +275,4 @@ var GET = ({ locals, request }) => {
275
275
  };
276
276
 
277
277
  export { GET };
278
- //# sourceMappingURL=_server.ts-C4WHkBZ_.js.map
278
+ //# sourceMappingURL=_server.ts-Cr57EKWf.js.map
@@ -1,8 +1,8 @@
1
- import { c as createSseStream, S as SSE_HEADERS, a as encodeStreamEvent } from './http-DKP1pqq1.js';
1
+ import { c as createSseStream, S as SSE_HEADERS, a as encodeStreamEvent } from './http-BiQjEmVU.js';
2
2
  import { c as resolveGatewayBaseUrl } from './_dispatch-DTWViLGL.js';
3
3
  import { getTaskAccessor } from '@cleocode/core/store/data-accessor';
4
4
  import { listTasks } from '@cleocode/core/tasks/list';
5
- import './dist-CLTFgJWk.js';
5
+ import './dist-CdoCt9zT.js';
6
6
  import 'node:fs';
7
7
  import 'node:path';
8
8
  import '@cleocode/core';
@@ -134,4 +134,4 @@ var GET = async ({ locals, url, request }) => {
134
134
  };
135
135
 
136
136
  export { GET };
137
- //# sourceMappingURL=_server.ts-BGuhOntH.js.map
137
+ //# sourceMappingURL=_server.ts-P4wVVksg.js.map
@@ -1,5 +1,5 @@
1
1
  import { i as index_server_exports } from './index-server-BgfA6C0S.js';
2
- import './internal-BF6KxfEH.js';
2
+ import './internal-D9MtKHIF.js';
3
3
  import './utils-g564cUMV.js';
4
4
  import { n as noop } from './dev-Br5zieNA.js';
5
5
 
@@ -42,4 +42,4 @@ function goto(url, opts = {}) {
42
42
  }
43
43
 
44
44
  export { goto as g };
45
- //# sourceMappingURL=client-ARinjJG0.js.map
45
+ //# sourceMappingURL=client-Cl295FWH.js.map
@@ -529,7 +529,7 @@ var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-
529
529
  /** Returns a regex for validating an RFC 9562/4122 UUID.
530
530
  *
531
531
  * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
532
- var uuid = (version) => {
532
+ var uuid$1 = (version) => {
533
533
  if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
534
534
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
535
535
  };
@@ -1097,8 +1097,8 @@ var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1097
1097
  v8: 8
1098
1098
  }[def.version];
1099
1099
  if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1100
- def.pattern ?? (def.pattern = uuid(v));
1101
- } else def.pattern ?? (def.pattern = uuid());
1100
+ def.pattern ?? (def.pattern = uuid$1(v));
1101
+ } else def.pattern ?? (def.pattern = uuid$1());
1102
1102
  $ZodStringFormat.init(inst, def);
1103
1103
  });
1104
1104
  var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
@@ -3731,6 +3731,14 @@ function object(shape, params) {
3731
3731
  ...normalizeParams(params)
3732
3732
  });
3733
3733
  }
3734
+ function looseObject(shape, params) {
3735
+ return new ZodObject({
3736
+ type: "object",
3737
+ shape,
3738
+ catchall: unknown(),
3739
+ ...normalizeParams(params)
3740
+ });
3741
+ }
3734
3742
  var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
3735
3743
  $ZodUnion.init(inst, def);
3736
3744
  ZodType.init(inst, def);
@@ -19246,6 +19254,308 @@ object({
19246
19254
  personal: boolean().optional()
19247
19255
  })).default([])
19248
19256
  });
19257
+ //#endregion
19258
+ //#region ../contracts/dist/nexus-cloud.js
19259
+ /**
19260
+ * Cleo Nexus remote reads: what `cleo cloud status|whoami|devices|projects`
19261
+ * parse from the API and emit in their LAFS envelopes (cleo-nexus device
19262
+ * contract v2.15, §4.1, §4.2 E2/E3/E5/E13/E14/E15, §4.4), plus the error
19263
+ * mapping table of §4.0.4.
19264
+ *
19265
+ * The response schemas are the client's tolerant reading of §4.1: every field
19266
+ * the CLI reports is named, unknown fields are stripped (never `.strict()`,
19267
+ * §4 preamble), and fields the deployed server does not send on every route
19268
+ * yet (E2's `device` is a subset of `DeviceView`, E13 has no
19269
+ * `lastPresenceAt`) are optional. They are not part of `./cloud`, which
19270
+ * mirrors the server's `@cleo-nexus/shared` package one-to-one.
19271
+ *
19272
+ * Nothing here carries a token, a key or a filesystem path the server sent;
19273
+ * the local paths in {@link CloudStatusLocal} are locations only.
19274
+ *
19275
+ * This file is types + zod schemas + const data only (arch gate 10).
19276
+ *
19277
+ * @task T12871
19278
+ * @epic T12323
19279
+ */
19280
+ /** Device states (§4.1 `DeviceState`). */
19281
+ var NEXUS_DEVICE_STATES = [
19282
+ "active",
19283
+ "signed-out",
19284
+ "revoked"
19285
+ ];
19286
+ /** Device-credential profiles (§2.3, §4.1 `DeviceProfile`). */
19287
+ var NEXUS_CLOUD_PROFILES = ["device", "read-only"];
19288
+ /**
19289
+ * The device state a newer server value parses as. Not `active`, so every
19290
+ * active-only check fails closed instead of the whole command failing.
19291
+ */
19292
+ var NEXUS_DEVICE_STATE_UNKNOWN = "unknown";
19293
+ var isoTime$1 = datetime({ offset: true });
19294
+ /** A profile the CLI does not know reads as none, never as a parse failure. */
19295
+ var profile = _enum(NEXUS_CLOUD_PROFILES).nullable().catch(null);
19296
+ /** A device state; a value added by a newer server reads as `unknown` (not active). */
19297
+ var deviceState = _enum([...NEXUS_DEVICE_STATES, NEXUS_DEVICE_STATE_UNKNOWN]).catch(NEXUS_DEVICE_STATE_UNKNOWN);
19298
+ /** `CredentialInfo` (§4.1): the credential that made the request. */
19299
+ var nexusCloudCredentialSchema = object({
19300
+ kind: _enum(["device", "session"]),
19301
+ credentialId: string().nullable().optional(),
19302
+ profile: profile.optional(),
19303
+ scopes: array(string()).default([]),
19304
+ createdAt: isoTime$1.nullable().optional(),
19305
+ lastUsedAt: isoTime$1.nullable().optional(),
19306
+ idleExpiresAt: isoTime$1.nullable().optional()
19307
+ });
19308
+ /** `DeviceView` (§4.1), as far as the CLI reports it. E2 sends a subset. */
19309
+ var nexusCloudDeviceSchema = object({
19310
+ deviceId: string(),
19311
+ name: string(),
19312
+ platform: string().optional(),
19313
+ arch: string().nullable().optional(),
19314
+ cliVersion: string().nullable().optional(),
19315
+ createdAt: isoTime$1.optional(),
19316
+ lastSeenAt: isoTime$1.nullable().optional(),
19317
+ state: deviceState,
19318
+ signedOutAt: isoTime$1.nullable().optional(),
19319
+ certificate: string().nullable().optional(),
19320
+ profile: profile.optional(),
19321
+ current: boolean().default(false),
19322
+ projects: number().int().nonnegative().optional(),
19323
+ replicas: number().int().nonnegative().optional(),
19324
+ lastSyncAt: isoTime$1.nullable().optional(),
19325
+ lastPresenceAt: isoTime$1.nullable().optional()
19326
+ });
19327
+ /** `OrganizationSummary` (§4.1). */
19328
+ var nexusCloudOrganizationSchema = object({
19329
+ id: string(),
19330
+ name: string(),
19331
+ slug: string().nullable().optional(),
19332
+ role: string().optional(),
19333
+ personal: boolean().optional()
19334
+ });
19335
+ /** `AccountUser` (§4.1). */
19336
+ var nexusCloudUserSchema = object({
19337
+ id: string(),
19338
+ email: string(),
19339
+ name: string().nullable().optional()
19340
+ });
19341
+ object({
19342
+ serverTime: isoTime$1.optional(),
19343
+ user: nexusCloudUserSchema,
19344
+ organizations: array(nexusCloudOrganizationSchema).default([]),
19345
+ credential: nexusCloudCredentialSchema,
19346
+ device: nexusCloudDeviceSchema.nullable()
19347
+ });
19348
+ object({
19349
+ devices: array(nexusCloudDeviceSchema),
19350
+ nextCursor: string().max(512).nullable().default(null),
19351
+ truncated: boolean().default(false)
19352
+ });
19353
+ /** Path-free replica presence (`ReplicaPresence`), with the R4 `sync` flag; other fields kept as sent. */
19354
+ var nexusCloudPresenceSchema = looseObject({
19355
+ observedAt: isoTime$1.optional(),
19356
+ sync: object({ enabled: boolean() }).optional()
19357
+ });
19358
+ /** `ReplicaRow` (§4.1). */
19359
+ var nexusCloudReplicaSchema = object({
19360
+ projectId: string(),
19361
+ replicaId: string(),
19362
+ deviceId: string(),
19363
+ deviceName: string(),
19364
+ deviceState: deviceState.optional(),
19365
+ attachedAt: isoTime$1.optional(),
19366
+ lastSyncAt: isoTime$1.nullable(),
19367
+ presence: nexusCloudPresenceSchema.nullable(),
19368
+ presenceAt: isoTime$1.nullable()
19369
+ });
19370
+ /** `DeviceCounts` (§4.1): distinct devices holding a replica. */
19371
+ var nexusCloudDeviceCountsSchema = object({
19372
+ active: number().int().nonnegative(),
19373
+ total: number().int().nonnegative()
19374
+ });
19375
+ /** The project fields every project view carries (`Project`, §4.1). */
19376
+ var projectFields = {
19377
+ projectId: string(),
19378
+ label: string().nullable(),
19379
+ organizationId: string(),
19380
+ organizationName: string().optional(),
19381
+ remoteUrl: string().nullable().optional(),
19382
+ createdAt: isoTime$1.optional()
19383
+ };
19384
+ object({
19385
+ projects: array(object({
19386
+ ...projectFields,
19387
+ role: string(),
19388
+ streamId: string().optional(),
19389
+ headSeq: number().int().nonnegative().nullable().optional(),
19390
+ openConflicts: number().int().nonnegative().optional(),
19391
+ replicas: array(nexusCloudReplicaSchema).default([]),
19392
+ devices: nexusCloudDeviceCountsSchema.optional(),
19393
+ replicaCount: number().int().nonnegative().optional(),
19394
+ lastSyncAt: isoTime$1.nullable().optional(),
19395
+ lastPresenceAt: isoTime$1.nullable().optional(),
19396
+ replicasTruncated: boolean().default(false)
19397
+ })),
19398
+ nextCursor: string().max(512).nullable().default(null),
19399
+ truncated: boolean().default(false),
19400
+ projectsTruncated: boolean().default(false)
19401
+ });
19402
+ object({
19403
+ project: object({
19404
+ ...projectFields,
19405
+ deletedAt: isoTime$1.nullable().optional()
19406
+ }),
19407
+ role: string(),
19408
+ canTrash: boolean().optional(),
19409
+ openConflicts: number().int().nonnegative(),
19410
+ replicas: array(nexusCloudReplicaSchema),
19411
+ devices: nexusCloudDeviceCountsSchema,
19412
+ replicaCount: number().int().nonnegative().optional(),
19413
+ lastSyncAt: isoTime$1.nullable().optional(),
19414
+ truncated: boolean().default(false),
19415
+ stream: object({
19416
+ streamId: string(),
19417
+ headSeq: number().int().nonnegative(),
19418
+ headCheckpointId: string().nullable()
19419
+ }).nullable()
19420
+ });
19421
+ object({
19422
+ replicas: array(nexusCloudReplicaSchema),
19423
+ devices: nexusCloudDeviceCountsSchema.optional(),
19424
+ nextCursor: string().max(512).nullable().default(null),
19425
+ truncated: boolean().default(false)
19426
+ });
19427
+ /** E3 check ids, in their contract order (§4.1 `StatusCheckId`). */
19428
+ var NEXUS_STATUS_CHECK_IDS = [
19429
+ "credential.valid",
19430
+ "device.registered",
19431
+ "device.active",
19432
+ "device.certified",
19433
+ "project.registered",
19434
+ "project.writable",
19435
+ "replica.attached",
19436
+ "presence.fresh",
19437
+ "replica.synced",
19438
+ "conflicts.none"
19439
+ ];
19440
+ /** The server's verdicts (§4.1 `StatusVerdict`). */
19441
+ var NEXUS_STATUS_VERDICTS = [
19442
+ "ok",
19443
+ "attention",
19444
+ "not-linked",
19445
+ "not-registered"
19446
+ ];
19447
+ [...NEXUS_STATUS_VERDICTS];
19448
+ var knownCheckId = _enum(NEXUS_STATUS_CHECK_IDS);
19449
+ /** `StatusCheck` (§4.1). Only required checks drive the verdict. */
19450
+ var nexusCloudStatusCheckSchema = object({
19451
+ id: _enum(NEXUS_STATUS_CHECK_IDS),
19452
+ ok: boolean(),
19453
+ required: boolean(),
19454
+ detail: string()
19455
+ });
19456
+ object({
19457
+ serverTime: isoTime$1.optional(),
19458
+ apiVersion: string().optional(),
19459
+ user: nexusCloudUserSchema,
19460
+ credential: nexusCloudCredentialSchema,
19461
+ device: nexusCloudDeviceSchema.nullable(),
19462
+ project: object({
19463
+ projectId: string(),
19464
+ registered: boolean(),
19465
+ organizationId: string().nullable(),
19466
+ organizationName: string().nullable(),
19467
+ role: string().nullable()
19468
+ }).nullable(),
19469
+ replica: object({
19470
+ replicaId: string(),
19471
+ attached: boolean(),
19472
+ attachedElsewhere: boolean(),
19473
+ attachedAt: isoTime$1.nullable(),
19474
+ lastSyncAt: isoTime$1.nullable(),
19475
+ presenceAt: isoTime$1.nullable(),
19476
+ lastReplicaSeq: number().int().nonnegative().nullable().optional()
19477
+ }).nullable(),
19478
+ stream: object({
19479
+ streamId: string(),
19480
+ headSeq: number().int().nonnegative(),
19481
+ headCheckpointId: string().nullable(),
19482
+ openConflicts: number().int().nonnegative(),
19483
+ devices: nexusCloudDeviceCountsSchema
19484
+ }).nullable(),
19485
+ checks: array(nexusCloudStatusCheckSchema.extend({ id: string() })).transform((list) => list.flatMap((c) => {
19486
+ const id = knownCheckId.safeParse(c.id);
19487
+ return id.success ? [{
19488
+ ...c,
19489
+ id: id.data
19490
+ }] : [];
19491
+ })),
19492
+ verdict: _enum(NEXUS_STATUS_VERDICTS).catch("attention")
19493
+ });
19494
+ //#endregion
19495
+ //#region ../contracts/dist/nexus-vault.js
19496
+ /**
19497
+ * Cloud vault contracts: `cleo cloud push | pull | restore | verify | activity | lease`.
19498
+ *
19499
+ * The vault keeps encrypted snapshots of a project's (or this account's
19500
+ * global) CLEO state on Cleo Nexus, as checkpoints on the project's journal
19501
+ * stream (or the account's `home:` stream). The server stores ciphertext plus
19502
+ * a plaintext manifest of per-table row counts and keyed hashes, and refuses a
19503
+ * snapshot that does not descend from the stream head or whose counts do not
19504
+ * reconcile with the journal.
19505
+ *
19506
+ * Keys (owner decision 2026-10-01): adding a device needs only `cleo login`
19507
+ * and the one-time browser approval. The account master key is escrowed on
19508
+ * the server (stored encrypted under a server-held key, cleo-nexus T082) and
19509
+ * released only to an approved, active device, sealed to that device's X25519
19510
+ * key (`GET /v1/account/keys/escrow`). Snapshots are encrypted, but with keys
19511
+ * the server can recover: server-escrowed encryption, not zero-knowledge.
19512
+ *
19513
+ * The response schemas here parse what the API returns for the endpoints the
19514
+ * wire contract (`./cloud/api.ts`, mirrored from cleo-nexus) does not yet
19515
+ * carry; every object is loose so a newer server's extra fields survive.
19516
+ *
19517
+ * @task T12336
19518
+ * @task T12337
19519
+ * @task T12338
19520
+ * @epic T12322
19521
+ */
19522
+ var isoTime = datetime({ offset: true });
19523
+ var uuid = string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
19524
+ looseObject({
19525
+ keyVersion: number().int().positive(),
19526
+ masterKeyVerifier: string()
19527
+ });
19528
+ looseObject({ keys: array(looseObject({
19529
+ wrappedProjectKey: string(),
19530
+ keyVersion: number().int().positive()
19531
+ })) });
19532
+ looseObject({ lease: looseObject({
19533
+ streamId: string(),
19534
+ role: string(),
19535
+ replicaId: uuid,
19536
+ expiresAt: isoTime,
19537
+ forkedFromReplicaId: uuid.nullable().optional()
19538
+ }) });
19539
+ looseObject({
19540
+ streamId: string(),
19541
+ kind: string().optional(),
19542
+ headSeq: number().int().nonnegative(),
19543
+ headCheckpointId: string().nullable(),
19544
+ maxSchemaVersion: number().int().nonnegative().optional()
19545
+ });
19546
+ looseObject({
19547
+ events: array(looseObject({
19548
+ id: union([string(), number()]),
19549
+ at: isoTime,
19550
+ actorUserId: string().nullable().optional(),
19551
+ actorDeviceId: string().nullable().optional(),
19552
+ requestId: string().nullable().optional(),
19553
+ action: string(),
19554
+ target: string().nullable().optional(),
19555
+ detail: unknown().optional()
19556
+ })),
19557
+ nextBefore: union([string(), number()]).nullable().optional()
19558
+ });
19249
19559
 
19250
19560
  export { OPERATIONS as O, TASK_STATUSES as T };
19251
- //# sourceMappingURL=dist-CLTFgJWk.js.map
19561
+ //# sourceMappingURL=dist-CdoCt9zT.js.map
@@ -1,8 +1,8 @@
1
1
  import { g as getContext, p as escape_html } from './dev-Br5zieNA.js';
2
2
  import 'node:module';
3
- import './client-ARinjJG0.js';
3
+ import './client-Cl295FWH.js';
4
4
  import './index-server-BgfA6C0S.js';
5
- import './internal-BF6KxfEH.js';
5
+ import './internal-D9MtKHIF.js';
6
6
  import './utils-g564cUMV.js';
7
7
 
8
8
  //#endregion
@@ -65,4 +65,4 @@ function Error$1($$renderer, $$props) {
65
65
  }
66
66
 
67
67
  export { Error$1 as default };
68
- //# sourceMappingURL=error.svelte-m5N9iUFN.js.map
68
+ //# sourceMappingURL=error.svelte-ajn1HNOb.js.map
@@ -1,4 +1,4 @@
1
- import { O as OPERATIONS$1 } from './dist-CLTFgJWk.js';
1
+ import { O as OPERATIONS$1 } from './dist-CdoCt9zT.js';
2
2
  import '@cleocode/core';
3
3
  import 'path';
4
4
 
@@ -107,4 +107,4 @@ function createSseStream(source, signal) {
107
107
  }
108
108
 
109
109
  export { SSE_HEADERS as S, encodeStreamEvent as a, createSseStream as c, encodeSseFrame as e };
110
- //# sourceMappingURL=http-DKP1pqq1.js.map
110
+ //# sourceMappingURL=http-BiQjEmVU.js.map
@@ -1430,7 +1430,7 @@ var options = {
1430
1430
  app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\" data-theme=\"dark\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"color-scheme\" content=\"dark\" />\n <title>CLEO Studio</title>\n " + head + "\n </head>\n <body class=\"cleo-root\" data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
1431
1431
  error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
1432
1432
  },
1433
- version_hash: "1ti4tmi"
1433
+ version_hash: "2umimu"
1434
1434
  };
1435
1435
  async function get_hooks() {
1436
1436
  let handle;
@@ -1453,4 +1453,4 @@ async function get_hooks() {
1453
1453
  }
1454
1454
 
1455
1455
  export { stringify as A, make_trackable as B, stringify$1 as C, read_implementation as D, split_remote_key as E, set_read_implementation as F, IN_WEBCONTAINER as I, NULL_BODY_STATUS as N, TRAILING_SLASH_PARAM as T, get_message as a, get_hooks as b, coalesce_to_error as c, INVALIDATED_PARAM as d, decode_pathname as e, find_route as f, get_status as g, normalize_path as h, disable_search as i, validate_layout_exports as j, validate_page_server_exports as k, validate_page_exports as l, merge_tracing as m, noop as n, options as o, parse as p, noop_span as q, create_remote_key as r, hash as s, compact as t, once as u, validate_layout_server_exports as v, with_request_store as w, normalize_error as x, resolve as y, parse_remote_arg as z };
1456
- //# sourceMappingURL=internal-BF6KxfEH.js.map
1456
+ //# sourceMappingURL=internal-D9MtKHIF.js.map
@@ -1,6 +1,6 @@
1
1
  import { g as getContext } from './dev-Br5zieNA.js';
2
2
  import 'node:module';
3
- import './client-ARinjJG0.js';
3
+ import './client-Cl295FWH.js';
4
4
 
5
5
  //#region ../../node_modules/.pnpm/@sveltejs+kit@2.57.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte_e94e6db60b0c5f7146157d0facbe8042/node_modules/@sveltejs/kit/src/runtime/app/stores.js
6
6
  /**
@@ -30,4 +30,4 @@ var page = { subscribe(fn) {
30
30
  } };
31
31
 
32
32
  export { page as p };
33
- //# sourceMappingURL=stores-UvZbmzhQ.js.map
33
+ //# sourceMappingURL=stores-BlknvZ80.js.map
@@ -1,5 +1,5 @@
1
1
  import { _ as __commonJSMin } from './chunks/index-server-BgfA6C0S.js';
2
- import { c as coalesce_to_error, g as get_status, a as get_message, w as with_request_store, p as parse, o as options, I as IN_WEBCONTAINER, b as get_hooks, n as noop, T as TRAILING_SLASH_PARAM, d as INVALIDATED_PARAM, e as decode_pathname, f as find_route, h as normalize_path, i as disable_search, m as merge_tracing, v as validate_layout_server_exports, j as validate_layout_exports, k as validate_page_server_exports, l as validate_page_exports, q as noop_span, r as create_remote_key, s as hash, t as compact, u as once, x as normalize_error, y as resolve, z as parse_remote_arg, A as stringify, B as make_trackable, C as stringify$1, D as read_implementation, E as split_remote_key, N as NULL_BODY_STATUS, F as set_read_implementation } from './chunks/internal-BF6KxfEH.js';
2
+ import { c as coalesce_to_error, g as get_status, a as get_message, w as with_request_store, p as parse, o as options, I as IN_WEBCONTAINER, b as get_hooks, n as noop, T as TRAILING_SLASH_PARAM, d as INVALIDATED_PARAM, e as decode_pathname, f as find_route, h as normalize_path, i as disable_search, m as merge_tracing, v as validate_layout_server_exports, j as validate_layout_exports, k as validate_page_server_exports, l as validate_page_exports, q as noop_span, r as create_remote_key, s as hash, t as compact, u as once, x as normalize_error, y as resolve, z as parse_remote_arg, A as stringify, B as make_trackable, C as stringify$1, D as read_implementation, E as split_remote_key, N as NULL_BODY_STATUS, F as set_read_implementation } from './chunks/internal-D9MtKHIF.js';
3
3
  import { H as HttpError, a as text_decoder, S as SvelteKitError, h as has_resolution_suffix, c as has_data_suffix, s as strip_resolution_suffix, d as strip_data_suffix, e as add_data_suffix, f as add_resolution_suffix, R as Redirect, t as text_encoder, A as ActionFailure, g as get_relative_path, i as base64_encode } from './chunks/utils-g564cUMV.js';
4
4
  import { j as json, t as text, e as error, i as isRedirect } from './chunks/exports-Dg-gdPPq.js';
5
5
  import { u as uneval, aa as writable, ab as readable } from './chunks/dev-Br5zieNA.js';
@@ -10,12 +10,12 @@ return {
10
10
  assets: new Set(["favicon.png"]),
11
11
  mimeTypes: {".png":"image/png"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start.BjuNqpl1.js",app:"_app/immutable/entry/app.DaDdqQTe.js",imports:["_app/immutable/entry/start.BjuNqpl1.js","_app/immutable/chunks/B2oT_qgu.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/entry/app.DaDdqQTe.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/C6jhAnil.js","_app/immutable/chunks/B8WnZMYa.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.D7gHmBNS.js",app:"_app/immutable/entry/app.CczVILch.js",imports:["_app/immutable/entry/start.D7gHmBNS.js","_app/immutable/chunks/CLP4JZvZ.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/entry/app.CczVILch.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/C6jhAnil.js","_app/immutable/chunks/B8WnZMYa.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
- __memo(() => import('./chunks/0-G8NhADpo.js')),
16
- __memo(() => import('./chunks/1-CfXNxnLm.js')),
15
+ __memo(() => import('./chunks/0-BmUoS2yd.js')),
16
+ __memo(() => import('./chunks/1-CTjj2MYz.js')),
17
17
  __memo(() => import('./chunks/2-DQaIET_o.js')),
18
- __memo(() => import('./chunks/3-DDisSHuV.js')),
18
+ __memo(() => import('./chunks/3-BS2FXYjP.js')),
19
19
  __memo(() => import('./chunks/4-C9BMSh4K.js')),
20
20
  __memo(() => import('./chunks/5-C0CF4WKG.js')),
21
21
  __memo(() => import('./chunks/6-BWyOJust.js')),
@@ -27,18 +27,18 @@ return {
27
27
  __memo(() => import('./chunks/12-WE1u104t.js')),
28
28
  __memo(() => import('./chunks/13-joBDoxhK.js')),
29
29
  __memo(() => import('./chunks/14-Doj5F4uJ.js')),
30
- __memo(() => import('./chunks/15-o63WM4MZ.js')),
31
- __memo(() => import('./chunks/16-7h8G4VoG.js')),
32
- __memo(() => import('./chunks/17-DcShICKv.js')),
33
- __memo(() => import('./chunks/18-BER3ZYEh.js')),
30
+ __memo(() => import('./chunks/15-Dt4kqUxW.js')),
31
+ __memo(() => import('./chunks/16-kgTLJvbO.js')),
32
+ __memo(() => import('./chunks/17-mRYB5141.js')),
33
+ __memo(() => import('./chunks/18-BjZ325q5.js')),
34
34
  __memo(() => import('./chunks/19-BAQHPrMB.js')),
35
- __memo(() => import('./chunks/20-DErTM2qU.js')),
35
+ __memo(() => import('./chunks/20-DQ2Vrujq.js')),
36
36
  __memo(() => import('./chunks/21-qhGjkW41.js')),
37
37
  __memo(() => import('./chunks/22-Byy16hFA.js')),
38
38
  __memo(() => import('./chunks/23-D194DGVi.js')),
39
- __memo(() => import('./chunks/24-BZh7ZC1u.js')),
40
- __memo(() => import('./chunks/25-qqsEYb5C.js')),
41
- __memo(() => import('./chunks/26-C424QBHc.js')),
39
+ __memo(() => import('./chunks/24-DAeuAfXN.js')),
40
+ __memo(() => import('./chunks/25-DGCNmzAS.js')),
41
+ __memo(() => import('./chunks/26-CiN6bbmR.js')),
42
42
  __memo(() => import('./chunks/27-Cqzlh9gZ.js')),
43
43
  __memo(() => import('./chunks/28-DeYe2rpm.js')),
44
44
  __memo(() => import('./chunks/29-d_lZvJg3.js')),
@@ -82,7 +82,7 @@ return {
82
82
  pattern: /^\/api\/brain\/stream\/?$/,
83
83
  params: [],
84
84
  page: null,
85
- endpoint: __memo(() => import('./chunks/_server.ts-C4WHkBZ_.js'))
85
+ endpoint: __memo(() => import('./chunks/_server.ts-Cr57EKWf.js'))
86
86
  },
87
87
  {
88
88
  id: "/api/brain/substrate/[name]",
@@ -110,7 +110,7 @@ return {
110
110
  pattern: /^\/api\/health\/?$/,
111
111
  params: [],
112
112
  page: null,
113
- endpoint: __memo(() => import('./chunks/_server.ts-BjIJy4O3.js'))
113
+ endpoint: __memo(() => import('./chunks/_server.ts-Bih2-_5O.js'))
114
114
  },
115
115
  {
116
116
  id: "/api/memory/decision-store",
@@ -355,7 +355,7 @@ return {
355
355
  pattern: /^\/api\/tasks\/events\/?$/,
356
356
  params: [],
357
357
  page: null,
358
- endpoint: __memo(() => import('./chunks/_server.ts-CmiJfYD5.js'))
358
+ endpoint: __memo(() => import('./chunks/_server.ts-C0evMKCk.js'))
359
359
  },
360
360
  {
361
361
  id: "/api/tasks/graph",
@@ -390,7 +390,7 @@ return {
390
390
  pattern: /^\/api\/tasks\/subscribe\/?$/,
391
391
  params: [],
392
392
  page: null,
393
- endpoint: __memo(() => import('./chunks/_server.ts-BGuhOntH.js'))
393
+ endpoint: __memo(() => import('./chunks/_server.ts-P4wVVksg.js'))
394
394
  },
395
395
  {
396
396
  id: "/api/tasks/tree/[epicId]",
@@ -425,7 +425,7 @@ return {
425
425
  pattern: /^\/api\/tasks\/([^/]+?)\/stream\/?$/,
426
426
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
427
427
  page: null,
428
- endpoint: __memo(() => import('./chunks/_server.ts-wZKCwtFH.js'))
428
+ endpoint: __memo(() => import('./chunks/_server.ts-2BazvYRP.js'))
429
429
  },
430
430
  {
431
431
  id: "/api/tasks/[id]/transition",