@ikenga/contract 0.17.0 → 0.18.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwa.d.ts","sourceRoot":"","sources":["../src/ngwa.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;sEAKsE;AACtE,eAAO,MAAM,UAAU,sHAMb,CAAC;AACX,eAAO,MAAM,cAAc,wHAAqB,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAInD,2EAA2E;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;IAG1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD;2EAC2E;AAC3E,eAAO,MAAM,YAAY,2EAGf,CAAC;AACX,eAAO,MAAM,gBAAgB,6EAAuB,CAAC;AACrD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;kDAEkD;AAClD,eAAO,MAAM,gBAAgB;;IAE3B,2CAA2C;;IAE3C,cAAc;;IAEd,4BAA4B;;IAE5B,oEAAoE;;IAEpE,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;EAKhD,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAI1D,eAAO,MAAM,WAAW,+EAEd,CAAC;AACX,eAAO,MAAM,eAAe,iFAAsB,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;+DAE+D;AAC/D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AACH,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpF,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
package/dist/ngwa.js ADDED
@@ -0,0 +1,225 @@
1
+ // Ngwa — the unified "installed thing" item, frozen as gate G-NGWA-ITEM
2
+ // (`plans/shell-ux-rearchitecture/drafts/ngwa-item.md` §2, Round 11).
3
+ //
4
+ // One `NgwaItem` joins five subsystems that no command joins today: the pkg
5
+ // kernel (`InstalledSummary`), the Ọba Claude-asset store (`ClaudeStoreEntry`),
6
+ // the engine-config scan (`claude_config.rs`), the `engine_assets` registry,
7
+ // and trust (`pkg/trust.rs` + `commands/pkg_trust.rs`). None of the five is a
8
+ // superset of another, so this type is a join, not a rename of any one of them.
9
+ //
10
+ // Producer: the Rust `ngwa_snapshot` command (WP-14). Consumers: WP-15
11
+ // installed+store, WP-16 scopes+health, WP-17 item detail, WP-18 trust sheet.
12
+ //
13
+ // KEY CASING IS `snake_case`, deliberately. The producer is a Rust command
14
+ // whose neighbouring struct (`InstalledSummary`) serializes with serde defaults
15
+ // and no renames; Ọba's camelCase renames are the exception in this codebase,
16
+ // not the rule, and matching serde defaults keeps `ngwa_snapshot` free of a
17
+ // rename attribute per field.
18
+ //
19
+ // The draft is FROZEN: any change to the shape below needs a new round in
20
+ // `04-discussion.md`, not an edit here.
21
+ import { z } from 'zod';
22
+ // ── Kind ──────────────────────────────────────────────────────────────────
23
+ /** Eleven kinds — two more than D-02's locked Kind facet. `bundle` and
24
+ * `sidecar` are real in the code (`Kind::Bundle`, `SidecarSpec`) and reachable
25
+ * through *More filters*; `workflow` has no producer in Phase 2 (Phase 4 /
26
+ * G-MANIFEST-V5) but stays in the union so adding one is not a contract break.
27
+ * `project` and `artifact` from the older `ngwa-surface.html` are NOT here —
28
+ * neither is in the locked facet list and neither has a producer. */
29
+ export const NGWA_KINDS = [
30
+ 'app', 'engine', 'tool', 'sidecar', // from the pkg kernel
31
+ 'skill', 'agent', 'command', 'hook', // from Ọba + the engine-config scan
32
+ 'bundle', // Ọba bundle, or a pkg that only pulls requires[]
33
+ 'schedule', // manifest cron[]
34
+ 'workflow', // Phase 4 — no producer in Phase 2
35
+ ];
36
+ export const NgwaKindSchema = z.enum(NGWA_KINDS);
37
+ // ── Scope ─────────────────────────────────────────────────────────────────
38
+ /** `personal` is the kernel's `project_id: null` and Ọba's `workspace`. */
39
+ export const NgwaScopeSchema = z.discriminatedUnion('kind', [
40
+ z.object({ kind: z.literal('personal') }),
41
+ z.object({ kind: z.literal('project'), project_id: z.string() }),
42
+ ]);
43
+ // ── Source (provenance) ───────────────────────────────────────────────────
44
+ /** The union of the kernel's `InstallSource` (`builtin`/`registry`/`local`/
45
+ * `dev`) and Ọba's `ProvenanceSource` (`local`/`git`/`npx`/`catalog`). */
46
+ export const NGWA_SOURCES = [
47
+ 'builtin', 'registry', 'git', 'npx', 'local', 'dev',
48
+ 'catalog', // deprecated Ọba back-compat only (claude_store.rs:94-109)
49
+ ];
50
+ export const NgwaSourceSchema = z.enum(NGWA_SOURCES);
51
+ /** Provenance. The plan's single `source` string could not hold the url / ref /
52
+ * resolved version / publisher both provenance records carry, so it became an
53
+ * object; `origin.source` is the facet value. */
54
+ export const NgwaOriginSchema = z.object({
55
+ source: NgwaSourceSchema,
56
+ /** registry url | git remote | npm spec */
57
+ url: z.string().nullable(),
58
+ /** git ref */
59
+ ref: z.string().nullable(),
60
+ /** git SHA | npm version */
61
+ resolved_version: z.string().nullable(),
62
+ /** `InstallSource::Registry.publisher_key`, or catalog publisher */
63
+ publisher: z.string().nullable(),
64
+ /** vault-owned and deletable (Ọba `managed`) */
65
+ managed: z.boolean(),
66
+ auto_update: z.boolean(),
67
+ installed_at_ms: z.number().nullable(),
68
+ updated_at_ms: z.number().nullable(),
69
+ });
70
+ // ── State ─────────────────────────────────────────────────────────────────
71
+ export const NGWA_STATES = [
72
+ 'enabled', 'disabled', 'available', 'update', 'orphaned', 'broken',
73
+ ];
74
+ export const NgwaStateSchema = z.enum(NGWA_STATES);
75
+ /** Live supervisor state. Only long-lived sidecars / MCP servers have one.
76
+ * Read from `sidecar_supervisor` directly — `PkgRowV2.state` never does, which
77
+ * is drift §10.5 that this type fixes for the new surface. */
78
+ export const NgwaRuntimeSchema = z.object({
79
+ state: z.enum([
80
+ 'spawning', 'running', 'crashed', 'blocked', 'parked', 'stopped', 'shuttingdown',
81
+ ]),
82
+ pid: z.number().nullable(),
83
+ uptime_s: z.number().nullable(),
84
+ restarts: z.number(),
85
+ last_err: z.string().nullable(),
86
+ last_crash_ms: z.number().nullable(),
87
+ });
88
+ // ── Trust ─────────────────────────────────────────────────────────────────
89
+ /** The four sorted permission lists the trust snapshot hash is taken over
90
+ * (`trust.rs:61-67`, `159-182`). All-or-nothing: no per-permission row exists
91
+ * anywhere, which is the constraint WP-18 inherits. */
92
+ export const NgwaPermsSummarySchema = z.object({
93
+ shell_execute: z.array(z.string()),
94
+ fs_write_outside_sandbox: z.array(z.string()),
95
+ net: z.array(z.string()),
96
+ vault_keys: z.array(z.string()),
97
+ });
98
+ /** Two distinct trust systems exist and must not be conflated: `pkg/trust.rs`
99
+ * is the per-call sensitive-permission gate (`state`), `commands/pkg_trust.rs`
100
+ * is the separate boot-time capability-diff review (`review_pending`). The
101
+ * D-02 facet values are derived, not read off one enum:
102
+ * `builtin` ← `auto_trusted`; `signed` ← `signed`; `unsigned` ← `!signed &&
103
+ * state !== 'needs_approval'`; `review` ← `state === 'needs_approval' ||
104
+ * review_pending`. Ọba primitives get `state: 'not_applicable'`, `perms: null`
105
+ * — a skill declares intent and is never granted anything. */
106
+ export const NgwaTrustSchema = z.object({
107
+ /** Mirrors PkgTrustState; 'not_applicable' for everything that is not a pkg. */
108
+ state: z.enum([
109
+ 'auto_trusted', 'auto_granted', 'granted', 'needs_approval', 'not_applicable',
110
+ ]),
111
+ /** manifest `signature` present, or minisign-verified catalog entry */
112
+ signed: z.boolean(),
113
+ /** provenance-trusted (builtin / dev) */
114
+ auto_trusted: z.boolean(),
115
+ /** a TrustReview row is waiting (pkg_trust.rs) */
116
+ review_pending: z.boolean(),
117
+ /** null when state is 'not_applicable' */
118
+ perms: NgwaPermsSummarySchema.nullable(),
119
+ last_granted_at_ms: z.number().nullable(),
120
+ });
121
+ // ── Placement ─────────────────────────────────────────────────────────────
122
+ /** The real per-instance placement record, sourced primarily from the
123
+ * `claude_config` scan; `engine_assets` is a second contributor that marks a
124
+ * placement `managed_by: 'pkg'`. `present === false` on an `enabled` item is
125
+ * the orphan case WP-16 Health reports. */
126
+ export const NgwaPlacementSchema = z.object({
127
+ /** 'claude' | 'gemini' | 'codex' | ... */
128
+ engine: z.string(),
129
+ scope: NgwaScopeSchema,
130
+ path: z.string(),
131
+ mechanism: z.enum(['symlink-dir', 'file', 'settings-key']),
132
+ /** the target actually exists on disk */
133
+ present: z.boolean(),
134
+ link_target: z.string().nullable(),
135
+ /** the link resolves into the Ọba store */
136
+ in_store: z.boolean(),
137
+ managed_by: z.enum(['oba', 'pkg', 'user']),
138
+ /** path of the placement that shadows this one */
139
+ overridden_by: z.string().nullable(),
140
+ format: z.enum(['md-yaml', 'toml', 'json-embedded']).nullable(),
141
+ status: z.enum(['active', 'deprecated']),
142
+ });
143
+ // ── Usage ─────────────────────────────────────────────────────────────────
144
+ /** null on the item means "never measured" and MUST render as "—", never as 0
145
+ * (designs/frame-workbench-v4.html:2679 — "anything not measured reads —").
146
+ * Phase 2 sources this from transcript JSONL (DEC-24); `'hooks'` stays a legal
147
+ * value so a later increment can add it — principally for `hook` rows, which
148
+ * the transcript cannot see at all — without reopening the gate. */
149
+ export const NgwaUsageSchema = z.object({
150
+ source: z.enum(['hooks', 'transcript']),
151
+ last_used_ms: z.number().nullable(),
152
+ count_7d: z.number().nullable(),
153
+ count_30d: z.number().nullable(),
154
+ /** null when the chosen source carries no tokens */
155
+ tokens_30d: z.number().nullable(),
156
+ /** Earliest moment the source can see. Anything before it is unknown, not zero. */
157
+ window_start_ms: z.number(),
158
+ });
159
+ // ── Dependency edges ──────────────────────────────────────────────────────
160
+ export const NgwaRefSchema = z.object({
161
+ /** open, mirroring RequiresEntry.kind (manifest.rs:177-192) */
162
+ kind: z.union([NgwaKindSchema, z.string()]),
163
+ name: z.string(),
164
+ /** resolved NgwaItem.id, or null if unresolved */
165
+ item_id: z.string().nullable(),
166
+ source: NgwaSourceSchema.nullable(),
167
+ ref: z.string().nullable(),
168
+ });
169
+ // ── The item ──────────────────────────────────────────────────────────────
170
+ export const NgwaItemSchema = z.object({
171
+ /** Stable across a refresh. Pkg-backed: the manifest id. Everything else:
172
+ * `${kind}:${scope_key}:${name}` where scope_key is 'personal' | `project:<id>`. */
173
+ id: z.string(),
174
+ kind: NgwaKindSchema,
175
+ /** the on-disk / manifest name (stable, used for joins) */
176
+ name: z.string(),
177
+ /** manifest `name`, else `name` */
178
+ display_name: z.string(),
179
+ description: z.string().nullable(),
180
+ /** null for Ọba primitives with no resolved version */
181
+ version: z.string().nullable(),
182
+ /** registry index only; null otherwise */
183
+ latest_version: z.string().nullable(),
184
+ scope: NgwaScopeSchema,
185
+ origin: NgwaOriginSchema,
186
+ state: NgwaStateSchema,
187
+ runtime: NgwaRuntimeSchema.nullable(),
188
+ trust: NgwaTrustSchema,
189
+ /** An item with no placements is not an error: a pkg app has none. */
190
+ placements: z.array(NgwaPlacementSchema),
191
+ /** null = unmeasured. A measured zero is `{ count_7d: 0, … }`; the UI must
192
+ * distinguish them. */
193
+ usage: NgwaUsageSchema.nullable(),
194
+ requires: z.array(NgwaRefSchema),
195
+ /** Computed per snapshot by inverting `requires[]`, never stored — Ọba
196
+ * deliberately does not persist the reverse graph (claude_store.rs:120-122). */
197
+ required_by: z.array(NgwaRefSchema),
198
+ /** The pkg that contributed this item, when it is not itself a pkg. */
199
+ owner_pkg_id: z.string().nullable(),
200
+ install_path: z.string().nullable(),
201
+ /** Engines this item is placed in, derived from placements[]. Facet source. */
202
+ engines: z.array(z.string()),
203
+ });
204
+ /** Per-source health entry, so the UI can say "Ọba unreadable" instead of
205
+ * silently rendering "no skills". */
206
+ export const NgwaSourceHealthSchema = z.object({
207
+ ok: z.boolean(),
208
+ error: z.string().nullable(),
209
+ count: z.number(),
210
+ });
211
+ export const NgwaSnapshotSchema = z.object({
212
+ /** `id` is unique within a snapshot; WP-14 asserts uniqueness. */
213
+ items: z.array(NgwaItemSchema),
214
+ as_of_ms: z.number(),
215
+ /** Per-source health, so the UI can say "Ọba unreadable" instead of "no skills". */
216
+ sources: z.object({
217
+ kernel: NgwaSourceHealthSchema,
218
+ oba: NgwaSourceHealthSchema,
219
+ engine_config: NgwaSourceHealthSchema,
220
+ engine_assets: NgwaSourceHealthSchema,
221
+ trust: NgwaSourceHealthSchema,
222
+ usage: NgwaSourceHealthSchema,
223
+ }),
224
+ });
225
+ //# sourceMappingURL=ngwa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngwa.js","sourceRoot":"","sources":["../src/ngwa.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,sEAAsE;AACtE,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,8EAA8E;AAC9E,gFAAgF;AAChF,EAAE;AACF,uEAAuE;AACvE,8EAA8E;AAC9E,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,wCAAwC;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6EAA6E;AAE7E;;;;;sEAKsE;AACtE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,QAAQ,EAAE,MAAM,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H;sCACsC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,kEAAkE;IAClE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,oFAAoF;IACpF,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,MAAM,EAAE,sBAAsB;QAC9B,GAAG,EAAE,sBAAsB;QAC3B,aAAa,EAAE,sBAAsB;QACrC,aAAa,EAAE,sBAAsB;QACrC,KAAK,EAAE,sBAAsB;QAC7B,KAAK,EAAE,sBAAsB;KAC9B,CAAC;CACH,CAAC,CAAC"}
@@ -406,13 +406,15 @@ export declare const PkgVersionSchema: z.ZodObject<{
406
406
  }, {
407
407
  required?: boolean | undefined;
408
408
  }>>;
409
- sqlite: z.ZodOptional<z.ZodObject<{
409
+ sqlite: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodBoolean, {
410
+ db: string;
411
+ } | undefined, boolean>, z.ZodObject<{
410
412
  db: z.ZodDefault<z.ZodString>;
411
413
  }, "strip", z.ZodTypeAny, {
412
414
  db: string;
413
415
  }, {
414
416
  db?: string | undefined;
415
- }>>;
417
+ }>]>>;
416
418
  webview: z.ZodOptional<z.ZodObject<{
417
419
  child_webviews: z.ZodDefault<z.ZodBoolean>;
418
420
  partitions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -482,6 +484,8 @@ export declare const PkgVersionSchema: z.ZodObject<{
482
484
  }, "strip", z.ZodTypeAny, {
483
485
  sqlite?: {
484
486
  db: string;
487
+ } | {
488
+ db: string;
485
489
  } | undefined;
486
490
  secrets?: {
487
491
  declarations: {
@@ -509,7 +513,7 @@ export declare const PkgVersionSchema: z.ZodObject<{
509
513
  commands: string[];
510
514
  } | undefined;
511
515
  }, {
512
- sqlite?: {
516
+ sqlite?: boolean | {
513
517
  db?: string | undefined;
514
518
  } | undefined;
515
519
  secrets?: {
@@ -763,6 +767,8 @@ export declare const PkgVersionSchema: z.ZodObject<{
763
767
  capabilities?: {
764
768
  sqlite?: {
765
769
  db: string;
770
+ } | {
771
+ db: string;
766
772
  } | undefined;
767
773
  secrets?: {
768
774
  declarations: {
@@ -879,7 +885,7 @@ export declare const PkgVersionSchema: z.ZodObject<{
879
885
  source?: "git" | "npx" | "catalog" | "local" | undefined;
880
886
  }[] | undefined;
881
887
  capabilities?: {
882
- sqlite?: {
888
+ sqlite?: boolean | {
883
889
  db?: string | undefined;
884
890
  } | undefined;
885
891
  secrets?: {
@@ -1149,6 +1155,8 @@ export declare const PkgVersionSchema: z.ZodObject<{
1149
1155
  capabilities?: {
1150
1156
  sqlite?: {
1151
1157
  db: string;
1158
+ } | {
1159
+ db: string;
1152
1160
  } | undefined;
1153
1161
  secrets?: {
1154
1162
  declarations: {
@@ -1276,7 +1284,7 @@ export declare const PkgVersionSchema: z.ZodObject<{
1276
1284
  source?: "git" | "npx" | "catalog" | "local" | undefined;
1277
1285
  }[] | undefined;
1278
1286
  capabilities?: {
1279
- sqlite?: {
1287
+ sqlite?: boolean | {
1280
1288
  db?: string | undefined;
1281
1289
  } | undefined;
1282
1290
  secrets?: {
@@ -1805,13 +1813,15 @@ export declare const PkgDetailSchema: z.ZodObject<{
1805
1813
  }, {
1806
1814
  required?: boolean | undefined;
1807
1815
  }>>;
1808
- sqlite: z.ZodOptional<z.ZodObject<{
1816
+ sqlite: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodBoolean, {
1817
+ db: string;
1818
+ } | undefined, boolean>, z.ZodObject<{
1809
1819
  db: z.ZodDefault<z.ZodString>;
1810
1820
  }, "strip", z.ZodTypeAny, {
1811
1821
  db: string;
1812
1822
  }, {
1813
1823
  db?: string | undefined;
1814
- }>>;
1824
+ }>]>>;
1815
1825
  webview: z.ZodOptional<z.ZodObject<{
1816
1826
  child_webviews: z.ZodDefault<z.ZodBoolean>;
1817
1827
  partitions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1881,6 +1891,8 @@ export declare const PkgDetailSchema: z.ZodObject<{
1881
1891
  }, "strip", z.ZodTypeAny, {
1882
1892
  sqlite?: {
1883
1893
  db: string;
1894
+ } | {
1895
+ db: string;
1884
1896
  } | undefined;
1885
1897
  secrets?: {
1886
1898
  declarations: {
@@ -1908,7 +1920,7 @@ export declare const PkgDetailSchema: z.ZodObject<{
1908
1920
  commands: string[];
1909
1921
  } | undefined;
1910
1922
  }, {
1911
- sqlite?: {
1923
+ sqlite?: boolean | {
1912
1924
  db?: string | undefined;
1913
1925
  } | undefined;
1914
1926
  secrets?: {
@@ -2162,6 +2174,8 @@ export declare const PkgDetailSchema: z.ZodObject<{
2162
2174
  capabilities?: {
2163
2175
  sqlite?: {
2164
2176
  db: string;
2177
+ } | {
2178
+ db: string;
2165
2179
  } | undefined;
2166
2180
  secrets?: {
2167
2181
  declarations: {
@@ -2278,7 +2292,7 @@ export declare const PkgDetailSchema: z.ZodObject<{
2278
2292
  source?: "git" | "npx" | "catalog" | "local" | undefined;
2279
2293
  }[] | undefined;
2280
2294
  capabilities?: {
2281
- sqlite?: {
2295
+ sqlite?: boolean | {
2282
2296
  db?: string | undefined;
2283
2297
  } | undefined;
2284
2298
  secrets?: {
@@ -2548,6 +2562,8 @@ export declare const PkgDetailSchema: z.ZodObject<{
2548
2562
  capabilities?: {
2549
2563
  sqlite?: {
2550
2564
  db: string;
2565
+ } | {
2566
+ db: string;
2551
2567
  } | undefined;
2552
2568
  secrets?: {
2553
2569
  declarations: {
@@ -2675,7 +2691,7 @@ export declare const PkgDetailSchema: z.ZodObject<{
2675
2691
  source?: "git" | "npx" | "catalog" | "local" | undefined;
2676
2692
  }[] | undefined;
2677
2693
  capabilities?: {
2678
- sqlite?: {
2694
+ sqlite?: boolean | {
2679
2695
  db?: string | undefined;
2680
2696
  } | undefined;
2681
2697
  secrets?: {
@@ -2929,6 +2945,8 @@ export declare const PkgDetailSchema: z.ZodObject<{
2929
2945
  capabilities?: {
2930
2946
  sqlite?: {
2931
2947
  db: string;
2948
+ } | {
2949
+ db: string;
2932
2950
  } | undefined;
2933
2951
  secrets?: {
2934
2952
  declarations: {
@@ -3061,7 +3079,7 @@ export declare const PkgDetailSchema: z.ZodObject<{
3061
3079
  source?: "git" | "npx" | "catalog" | "local" | undefined;
3062
3080
  }[] | undefined;
3063
3081
  capabilities?: {
3064
- sqlite?: {
3082
+ sqlite?: boolean | {
3065
3083
  db?: string | undefined;
3066
3084
  } | undefined;
3067
3085
  secrets?: {
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAIlD;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,0DAA0D;;;;;;;;EAE1D,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB;IAC3B,4BAA4B;;IAE5B,iDAAiD;;IAEjD,yEAAyE;;IAEzE,2DAA2D;;IAE3D,mFAAmF;;IAEnF,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAqB;;IAErB;;;;;OAKG;;IAEH,4EAA4E;;IAE5E,2EAA2E;;IAE3E;;;;OAIG;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB;;IAE9B,wDAAwD;;;QAnCxD,qBAAqB;;QAErB,qBAAqB;;QAErB;;;;;WAKG;;QAEH,4EAA4E;;QAE5E,2EAA2E;;QAE3E;;;;WAIG;;QAEH;;;;;;;WAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUH,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAIhE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikenga/contract",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Shared contract for the Ikenga pkg system: manifest schema, RPC types, Engine interface, capability scopes.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -71,6 +71,10 @@
71
71
  "./app-bridge": {
72
72
  "types": "./dist/app-bridge.d.ts",
73
73
  "import": "./dist/app-bridge.js"
74
+ },
75
+ "./ngwa": {
76
+ "types": "./dist/ngwa.d.ts",
77
+ "import": "./dist/ngwa.js"
74
78
  }
75
79
  },
76
80
  "files": [
@@ -113,6 +117,6 @@
113
117
  "dev": "tsc -p tsconfig.json --watch",
114
118
  "typecheck": "tsc -p tsconfig.json --noEmit",
115
119
  "generate:schemas": "node scripts/generate-schemas.mjs",
116
- "test": "node --test --import=tsx 'src/**/*.test.ts'"
120
+ "test": "node --test --import=tsx \"src/**/*.test.ts\""
117
121
  }
118
122
  }
package/src/index.ts CHANGED
@@ -12,6 +12,7 @@ export * from './window.js';
12
12
  export * from './action-frontmatter.js';
13
13
  export * from './host-context.js';
14
14
  export * from './app-bridge.js';
15
+ export * from './ngwa.js';
15
16
 
16
17
  /** This package's own version. */
17
18
  export const CONTRACT_PACKAGE_VERSION = '0.5.0' as const;
@@ -238,3 +238,27 @@ test('Manifest: allowed_origins empty array survives as an explicit lockdown', (
238
238
  });
239
239
  assert.deepEqual(m.capabilities?.webview?.allowed_origins, []);
240
240
  });
241
+
242
+ test('Manifest: capabilities.sqlite accepts boolean true', () => {
243
+ const m = ManifestSchema.parse({
244
+ ...BASE,
245
+ capabilities: { sqlite: true },
246
+ });
247
+ assert.deepEqual(m.capabilities?.sqlite, { db: 'ikenga.local' });
248
+ });
249
+
250
+ test('Manifest: capabilities.sqlite accepts boolean false as disabled', () => {
251
+ const m = ManifestSchema.parse({
252
+ ...BASE,
253
+ capabilities: { sqlite: false },
254
+ });
255
+ assert.equal(m.capabilities?.sqlite, undefined);
256
+ });
257
+
258
+ test('Manifest: capabilities.sqlite accepts object config', () => {
259
+ const m = ManifestSchema.parse({
260
+ ...BASE,
261
+ capabilities: { sqlite: { db: 'custom.db' } },
262
+ });
263
+ assert.deepEqual(m.capabilities?.sqlite, { db: 'custom.db' });
264
+ });
package/src/manifest.ts CHANGED
@@ -167,15 +167,22 @@ export const CronEntrySchema = z.object({
167
167
  env_from_settings: z.array(z.string()).default([]),
168
168
  });
169
169
 
170
- /** Local SQLite capability (api ≥ 2). Threads the logical db name into the
171
- * iframe host context so the pkg can call `db_query` without hard-coding it.
172
- * Mirrors `SqliteCapability` in `shell/src-tauri/src/pkg/manifest.rs`. */
173
- export const SqliteCapabilitySchema = z.object({
170
+ export const SqliteCapabilityObjectSchema = z.object({
174
171
  /** Logical DB name. Currently only `"ikenga.local"` is supported.
175
172
  * Defaults to `"ikenga.local"` when omitted. */
176
173
  db: z.string().default('ikenga.local'),
177
174
  });
178
- export type SqliteCapability = z.infer<typeof SqliteCapabilitySchema>;
175
+
176
+ /** Local SQLite capability (api ≥ 2). Threads the logical db name into the
177
+ * iframe host context so the pkg can call `db_query` without hard-coding it.
178
+ * Accepts boolean `true` (defaults `db` to `"ikenga.local"`), `false` (disabled),
179
+ * or an object `{ db?: string }`.
180
+ * Mirrors `SqliteCapability` in `shell/src-tauri/src/pkg/manifest.rs`. */
181
+ export const SqliteCapabilitySchema = z.union([
182
+ z.boolean().transform((v) => (v ? { db: 'ikenga.local' } : undefined)),
183
+ SqliteCapabilityObjectSchema,
184
+ ]);
185
+ export type SqliteCapability = z.infer<typeof SqliteCapabilityObjectSchema>;
179
186
 
180
187
  /** Supabase capability. Mirrors `SupabaseCapability` in
181
188
  * `shell/src-tauri/src/pkg/manifest.rs`. */