@feltdb/feltkit 0.3.22 → 0.3.24

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 (155) hide show
  1. package/dist/app.d.ts +17 -3
  2. package/dist/app.js +10 -0
  3. package/dist/app.js.map +1 -1
  4. package/dist/appboundry/build.js +4 -0
  5. package/dist/appboundry/build.js.map +1 -1
  6. package/dist/authorize.d.ts +1 -1
  7. package/dist/cli/deploy-appboundry.d.ts +26 -0
  8. package/dist/cli/deploy-appboundry.js +1 -1
  9. package/dist/cli/deploy-appboundry.js.map +1 -1
  10. package/dist/cli/main.js +17 -153
  11. package/dist/cli/main.js.map +1 -1
  12. package/dist/client/index.d.ts +83 -4
  13. package/dist/client/index.js +204 -10
  14. package/dist/client/index.js.map +1 -1
  15. package/dist/dashboard/assets/index-BEjtLLYq.js +15 -0
  16. package/dist/dashboard/index.html +1 -1
  17. package/dist/docs.d.ts +1 -1
  18. package/dist/docs.js +2 -0
  19. package/dist/docs.js.map +1 -1
  20. package/dist/index.d.ts +4 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/platform/approvals.d.ts +102 -0
  23. package/dist/platform/approvals.js +155 -0
  24. package/dist/platform/approvals.js.map +1 -0
  25. package/dist/platform/artifacts.d.ts +126 -0
  26. package/dist/platform/artifacts.js +251 -0
  27. package/dist/platform/artifacts.js.map +1 -0
  28. package/dist/platform/blobs.d.ts +25 -0
  29. package/dist/platform/blobs.js +78 -0
  30. package/dist/platform/blobs.js.map +1 -0
  31. package/dist/platform/diff.d.ts +23 -0
  32. package/dist/platform/diff.js +107 -0
  33. package/dist/platform/diff.js.map +1 -0
  34. package/dist/platform/exec.d.ts +182 -0
  35. package/dist/platform/exec.js +575 -0
  36. package/dist/platform/exec.js.map +1 -0
  37. package/dist/platform/managed.d.ts +43 -0
  38. package/dist/platform/managed.js +137 -0
  39. package/dist/platform/managed.js.map +1 -0
  40. package/dist/platform/operations.d.ts +30 -13
  41. package/dist/platform/operations.js +8 -17
  42. package/dist/platform/operations.js.map +1 -1
  43. package/dist/platform/permissions.d.ts +15 -0
  44. package/dist/platform/permissions.js +16 -0
  45. package/dist/platform/permissions.js.map +1 -0
  46. package/dist/platform/platform.d.ts +51 -0
  47. package/dist/platform/platform.js +105 -6
  48. package/dist/platform/platform.js.map +1 -1
  49. package/dist/platform/releases.d.ts +150 -0
  50. package/dist/platform/releases.js +467 -0
  51. package/dist/platform/releases.js.map +1 -0
  52. package/dist/platform/review.d.ts +10 -0
  53. package/dist/platform/review.js +109 -0
  54. package/dist/platform/review.js.map +1 -0
  55. package/dist/platform/server.js +7 -0
  56. package/dist/platform/server.js.map +1 -1
  57. package/dist/platform/source.d.ts +2 -0
  58. package/dist/platform/source.js +1 -1
  59. package/dist/platform/source.js.map +1 -1
  60. package/dist/platform/workspace-operations.d.ts +2 -0
  61. package/dist/platform/workspace-operations.js +605 -0
  62. package/dist/platform/workspace-operations.js.map +1 -0
  63. package/dist/platform/workspaces.d.ts +211 -0
  64. package/dist/platform/workspaces.js +435 -0
  65. package/dist/platform/workspaces.js.map +1 -0
  66. package/dist/react/index.d.ts +29 -1
  67. package/dist/react/index.js +50 -0
  68. package/dist/react/index.js.map +1 -1
  69. package/dist/runtime/activity.d.ts +1 -1
  70. package/dist/runtime/agent.d.ts +216 -2
  71. package/dist/runtime/agent.js +333 -7
  72. package/dist/runtime/agent.js.map +1 -1
  73. package/dist/runtime/approval-rules.d.ts +16 -0
  74. package/dist/runtime/approval-rules.js +37 -0
  75. package/dist/runtime/approval-rules.js.map +1 -0
  76. package/dist/runtime/authboundry.d.ts +53 -0
  77. package/dist/runtime/authboundry.js +82 -0
  78. package/dist/runtime/authboundry.js.map +1 -0
  79. package/dist/runtime/authority.d.ts +18 -1
  80. package/dist/runtime/authority.js +26 -1
  81. package/dist/runtime/authority.js.map +1 -1
  82. package/dist/runtime/browser-inference.d.ts +52 -0
  83. package/dist/runtime/browser-inference.js +53 -0
  84. package/dist/runtime/browser-inference.js.map +1 -0
  85. package/dist/runtime/context.d.ts +110 -0
  86. package/dist/runtime/decisions.d.ts +23 -0
  87. package/dist/runtime/decisions.js +54 -0
  88. package/dist/runtime/decisions.js.map +1 -1
  89. package/dist/runtime/generation.d.ts +94 -0
  90. package/dist/runtime/generation.js +295 -0
  91. package/dist/runtime/generation.js.map +1 -0
  92. package/dist/runtime/runtime.d.ts +10 -2
  93. package/dist/runtime/runtime.js +125 -1
  94. package/dist/runtime/runtime.js.map +1 -1
  95. package/dist/server/admin.d.ts +9 -1
  96. package/dist/server/admin.js +84 -2
  97. package/dist/server/admin.js.map +1 -1
  98. package/dist/server/index.d.ts +1 -1
  99. package/dist/server/index.js +208 -11
  100. package/dist/server/index.js.map +1 -1
  101. package/dist/server/tenancy.js +1 -1
  102. package/dist/server/tenancy.js.map +1 -1
  103. package/dist/testing/index.d.ts +11 -0
  104. package/dist/testing/index.js +7 -3
  105. package/dist/testing/index.js.map +1 -1
  106. package/docs/AUTH.md +3 -2
  107. package/docs/EXTENSION-HOSTS.md +52 -0
  108. package/docs/GENERATION.md +136 -0
  109. package/docs/README.md +4 -2
  110. package/package.json +6 -8
  111. package/skills/.claude-plugin/marketplace.json +1 -1
  112. package/skills/.claude-plugin/plugin.json +1 -1
  113. package/dist/cli/compose.d.ts +0 -31
  114. package/dist/cli/compose.js +0 -274
  115. package/dist/cli/compose.js.map +0 -1
  116. package/dist/cli/create.d.ts +0 -219
  117. package/dist/cli/create.js +0 -1197
  118. package/dist/cli/create.js.map +0 -1
  119. package/dist/cli/domain.d.ts +0 -174
  120. package/dist/cli/domain.js +0 -1170
  121. package/dist/cli/domain.js.map +0 -1
  122. package/dist/cli/screens.d.ts +0 -25
  123. package/dist/cli/screens.js +0 -282
  124. package/dist/cli/screens.js.map +0 -1
  125. package/dist/cli/shell.d.ts +0 -7
  126. package/dist/cli/shell.js +0 -63
  127. package/dist/cli/shell.js.map +0 -1
  128. package/dist/composition/catalog.d.ts +0 -3
  129. package/dist/composition/catalog.js +0 -217
  130. package/dist/composition/catalog.js.map +0 -1
  131. package/dist/composition/contract.d.ts +0 -165
  132. package/dist/composition/contract.js +0 -12
  133. package/dist/composition/contract.js.map +0 -1
  134. package/dist/composition/execute.d.ts +0 -110
  135. package/dist/composition/execute.js +0 -350
  136. package/dist/composition/execute.js.map +0 -1
  137. package/dist/composition/generate.d.ts +0 -105
  138. package/dist/composition/generate.js +0 -274
  139. package/dist/composition/generate.js.map +0 -1
  140. package/dist/composition/plan.d.ts +0 -131
  141. package/dist/composition/plan.js +0 -558
  142. package/dist/composition/plan.js.map +0 -1
  143. package/dist/composition/profiles.d.ts +0 -20
  144. package/dist/composition/profiles.js +0 -81
  145. package/dist/composition/profiles.js.map +0 -1
  146. package/dist/composition/reconcile.d.ts +0 -153
  147. package/dist/composition/reconcile.js +0 -282
  148. package/dist/composition/reconcile.js.map +0 -1
  149. package/dist/composition/recover.d.ts +0 -89
  150. package/dist/composition/recover.js +0 -407
  151. package/dist/composition/recover.js.map +0 -1
  152. package/dist/composition/resolve.d.ts +0 -2
  153. package/dist/composition/resolve.js +0 -208
  154. package/dist/composition/resolve.js.map +0 -1
  155. package/dist/dashboard/assets/index-BrC1AtZ1.js +0 -15
@@ -1,274 +0,0 @@
1
- /**
2
- * `feltkit compose`: write the generator-owned foundation files, or check them.
3
- *
4
- * It reads and writes only the three generated paths (composition/generate.ts). It never loads the
5
- * application (feltkit/app.ts imports the generated declaration, so loading it first would be circular)
6
- * and never reads or writes any other file. A generated file that differs from its lock is refused, not
7
- * overwritten: the developer decides what happens to the change.
8
- */
9
- import { mkdirSync, renameSync, writeFileSync } from "node:fs";
10
- import { dirname, join } from "node:path";
11
- import { FeltKitError } from "../errors.js";
12
- import { GENERATED_PATHS, RECORD_PATH, checkFoundation, generateFoundation, } from "../composition/generate.js";
13
- import { readGeneratedState, reconcile } from "../composition/reconcile.js";
14
- import { planComposition } from "../composition/plan.js";
15
- import { executePlan } from "../composition/execute.js";
16
- import { inspectRecovery } from "../composition/recover.js";
17
- export { readGeneratedState };
18
- import { c, line, symbols } from "./output.js";
19
- /** Problems that mean a generated file is not what the generator wrote: never overwritten. */
20
- const REFUSE = new Set(["GENERATED_FILE_MODIFIED", "RECORD_MODIFIED", "RECORD_MALFORMED", "LOCK_MALFORMED", "UNTRACKED_GENERATED_FILE"]);
21
- export function parseParams(values) {
22
- const params = {};
23
- for (const raw of values) {
24
- const eq = raw.indexOf("=");
25
- const key = eq < 0 ? raw : raw.slice(0, eq);
26
- const dot = key.lastIndexOf(".");
27
- if (eq < 0 || dot <= 0 || dot === key.length - 1) {
28
- throw new FeltKitError("INVALID_ARGUMENT", `--param ${raw} is not <capability>.<parameter>=<value>.`, { hint: "For example --param identity.accounts.emailFrom=auth@example.com" });
29
- }
30
- const text = raw.slice(eq + 1);
31
- let value = text;
32
- try {
33
- value = JSON.parse(text);
34
- }
35
- catch {
36
- // Not JSON: the string itself.
37
- }
38
- const capability = key.slice(0, dot);
39
- const parameter = key.slice(dot + 1);
40
- const own = (params[capability] ??= {});
41
- if (parameter in own)
42
- throw new FeltKitError("INVALID_ARGUMENT", `--param ${key} was given more than once; give it once.`);
43
- own[parameter] = value;
44
- }
45
- return params;
46
- }
47
- function printProblem(p) {
48
- line(`${symbols.fail} ${p.code}${p.file ? ` ${p.file}` : ""}: ${p.message}`);
49
- if (p.expected !== undefined)
50
- line(` expected ${p.expected}`);
51
- if (p.observed !== undefined)
52
- line(` observed ${p.observed}`);
53
- for (const r of p.recovery)
54
- line(c.dim(` - ${r}`));
55
- }
56
- /** Write atomically (temporary file, then rename), so an interrupted run never leaves half a file. */
57
- function write(projectDir, path, text) {
58
- const file = join(projectDir, path);
59
- mkdirSync(dirname(file), { recursive: true });
60
- const temporary = `${file}.${process.pid}.tmp`;
61
- writeFileSync(temporary, text);
62
- renameSync(temporary, file);
63
- }
64
- export function compose(projectDir, options) {
65
- const state = readGeneratedState(projectDir);
66
- const check = checkFoundation(state);
67
- if (options.check) {
68
- if (options.json)
69
- line(JSON.stringify({ ok: check.ok, problems: check.problems }, null, 2));
70
- else if (check.ok)
71
- line(`${symbols.ok} The generated foundation is current: ${GENERATED_PATHS.join(", ")} match ${RECORD_PATH} and FeltKit's definitions.`);
72
- else
73
- check.problems.forEach(printProblem);
74
- return check.ok ? 0 : 1;
75
- }
76
- // Refuse before anything is written: a changed generated file stays exactly as the developer left it.
77
- const refused = check.problems.filter((p) => REFUSE.has(p.code));
78
- if (refused.length) {
79
- refused.forEach(printProblem);
80
- line(`${symbols.fail} Nothing was written. \`feltkit compose\` never overwrites a generated file that was changed after it wrote it.`);
81
- return 1;
82
- }
83
- const fresh = options.profile !== undefined || options.include.length > 0 || options.params.length > 0;
84
- let inputs;
85
- if (fresh) {
86
- if (!options.profile)
87
- throw new FeltKitError("INVALID_ARGUMENT", "Name the profile: feltkit compose --profile <collaborative-workspace|individual-accounts> [--param identity.accounts.emailFrom=<sender>]");
88
- inputs = { profile: options.profile, include: options.include, params: parseParams(options.params) };
89
- }
90
- else if (check.record) {
91
- inputs = { profile: check.record.profile.id, include: check.record.include, params: check.record.params };
92
- }
93
- else {
94
- throw new FeltKitError("INVALID_ARGUMENT", `There is no ${RECORD_PATH} to compose from.`, { hint: "Start one: feltkit compose --profile <collaborative-workspace|individual-accounts> [--param identity.accounts.emailFrom=<sender>]" });
95
- }
96
- const result = generateFoundation(inputs);
97
- if (!result.ok) {
98
- for (const e of result.errors) {
99
- line(`${symbols.fail} ${e.code}${e.capability ? ` ${e.capability}${e.parameter ? `.${e.parameter}` : ""}` : ""}: ${e.message}`);
100
- line(c.dim(` ${e.hint}`));
101
- }
102
- line(`${symbols.fail} Nothing was written.`);
103
- return 1;
104
- }
105
- const written = [];
106
- for (const path of GENERATED_PATHS) {
107
- if (state[path] === result.files[path])
108
- continue;
109
- write(projectDir, path, result.files[path]);
110
- written.push(path);
111
- }
112
- if (options.json) {
113
- line(JSON.stringify({ ok: true, written, composition: result.record.composition, capabilities: result.record.capabilities, limitations: result.record.limitations }, null, 2));
114
- return 0;
115
- }
116
- if (!written.length)
117
- line(`${symbols.ok} The generated foundation is already current (${result.record.composition.slice(0, 19)}…). Nothing was written.`);
118
- else
119
- for (const path of written)
120
- line(`${symbols.ok} ${path} written`);
121
- line(c.dim(` ${result.record.profile.id} v${result.record.profile.version}: ${result.record.capabilities.map((x) => `${x.id}@${x.version}`).join(", ")}`));
122
- if (result.record.limitations.length)
123
- line(c.dim(` The application's own tests must uphold: ${result.record.limitations.join(", ")}`));
124
- if (written.includes(GENERATED_PATHS[0]))
125
- line(c.dim(" feltkit/app.ts is yours: import { foundation } from \"./_foundation/declaration.js\" and spread it into feltkit({...})."));
126
- return 0;
127
- }
128
- // ── Reconciliation (read-only) ───────────────────────────────────────────────
129
- function printFinding(f) {
130
- line(`${symbols.fail} ${f.state} · ${f.code}${f.paths.length ? ` ${f.paths.join(", ")}` : ""}${f.confidence === "uncertain" ? c.dim(" (needs a person)") : ""}`);
131
- line(` ${f.what}`);
132
- line(c.dim(` ${f.why}`));
133
- if (f.expected !== undefined)
134
- line(` expected ${f.expected}`);
135
- if (f.observed !== undefined)
136
- line(` observed ${f.observed}`);
137
- for (const n of f.next)
138
- line(c.dim(` - ${n}`));
139
- }
140
- /** `feltkit compose reconcile`: report, never change. */
141
- export async function reconcileCommand(projectDir, json) {
142
- const report = await reconcile(projectDir);
143
- if (json) {
144
- line(JSON.stringify(report, null, 2));
145
- return report.ok ? 0 : 1;
146
- }
147
- if (report.ok) {
148
- line(`${symbols.ok} CURRENT: the generated foundation is what the recorded composition produces with this FeltKit, and ${report.application.file} consumes it.`);
149
- }
150
- else {
151
- line(`${report.state} (${report.findings.length} finding${report.findings.length === 1 ? "" : "s"})`);
152
- report.findings.forEach(printFinding);
153
- }
154
- const r = report.recorded;
155
- if (r.profile)
156
- line(c.dim(` Recorded: ${r.profile.id} v${r.profile.version}; ${r.capabilities.map((x) => `${x.id}@${x.version}`).join(", ")}; ${r.generator}; FeltKit ${r.sdk}; composition ${r.composition?.slice(0, 19)}…`));
157
- line(c.dim(` Installed: ${report.installed.generator}; FeltKit ${report.installed.sdk}`));
158
- const a = report.application;
159
- if (a.status === "analyzed") {
160
- const counts = Object.values(a.consumption ?? {}).reduce((n, k) => ({ ...n, [k]: (n[k] ?? 0) + 1 }), {});
161
- line(c.dim(` ${a.file}: imports the foundation: ${a.imports ? "yes" : "no"}; paths ${Object.entries(counts).map(([k, n]) => `${n} ${k}`).join(", ")}${a.additions?.length ? `; application additions: ${a.additions.join(", ")}` : ""}`));
162
- }
163
- else
164
- line(c.dim(` ${a.file}: not analyzed (${a.reason})`));
165
- line(c.dim(" Nothing was written: reconciliation only reports."));
166
- return report.ok ? 0 : 1;
167
- }
168
- const MARK = { DETERMINISTIC: symbols.ok, REVIEW_REQUIRED: "?", BLOCKED: symbols.fail, UNSUPPORTED: symbols.fail };
169
- function printOperation(o) {
170
- line(`${MARK[o.classification]} ${o.id} ${c.dim(`[${o.classification}, ${o.boundary}]`)}`);
171
- if (o.current !== undefined || o.proposed !== undefined)
172
- line(` ${o.current ?? "—"} → ${o.proposed ?? "—"}`);
173
- line(c.dim(` ${o.reason}`));
174
- if (o.decision)
175
- line(` ${o.classification === "REVIEW_REQUIRED" ? "decide" : "blocked"}: ${o.decision}`);
176
- if (o.dependsOn.length)
177
- line(c.dim(` after ${o.dependsOn.join(", ")}`));
178
- }
179
- /** `feltkit compose plan`: show what would change, never change it. */
180
- export async function planCommand(projectDir, options) {
181
- const plan = await planComposition(projectDir, {
182
- ...(options.profile !== undefined ? { profile: options.profile } : {}),
183
- include: options.include,
184
- exclude: options.exclude,
185
- params: parseParams(options.params),
186
- });
187
- const failed = plan.status === "BLOCKED" || plan.status === "UNSUPPORTED";
188
- if (options.json) {
189
- line(JSON.stringify(plan, null, 2));
190
- return failed ? 1 : 0;
191
- }
192
- line(`${plan.status} ${c.dim(`plan ${plan.id.slice(0, 19)}… · target ${plan.target.source}: ${plan.target.inputs.profile}${plan.target.inputs.include.length ? ` + ${plan.target.inputs.include.join(", ")}` : ""}`)}`);
193
- if (plan.status === "NO_CHANGE")
194
- line(`${symbols.ok} The recorded composition is what the installed definitions produce; nothing would change.`);
195
- const byId = new Map(plan.operations.map((o) => [o.id, o]));
196
- for (const id of plan.order)
197
- printOperation(byId.get(id));
198
- if (plan.affected.files.length)
199
- line(c.dim(` Files: ${plan.affected.files.join(", ")}`));
200
- if (plan.affected.paths.length)
201
- line(c.dim(` Declaration paths: ${plan.affected.paths.join(", ")}`));
202
- if (plan.decisions.length)
203
- line(` ${plan.decisions.length} decision(s) before this can be applied.`);
204
- if (plan.blockers.length)
205
- line(` ${plan.blockers.length} blocker(s).`);
206
- if (plan.unsupported.length)
207
- line(` ${plan.unsupported.length} unsupported target change(s).`);
208
- line(c.dim(" Nothing was written: a plan only shows the change. `feltkit compose --profile … --param …` applies one."));
209
- return failed ? 1 : 0;
210
- }
211
- /** `feltkit compose apply`: execute exactly one approved plan, and show the evidence. */
212
- export async function applyCommand(projectDir, options) {
213
- const result = await executePlan(projectDir, {
214
- ...(options.profile !== undefined ? { profile: options.profile } : {}),
215
- include: options.include,
216
- exclude: options.exclude,
217
- params: parseParams(options.params),
218
- ...(options.approve !== undefined ? { approve: options.approve } : {}),
219
- });
220
- if (options.json) {
221
- line(JSON.stringify(result, null, 2));
222
- return result.ok ? 0 : 1;
223
- }
224
- line(`${result.ok ? symbols.ok : symbols.fail} ${result.code} ${c.dim(result.plan.id ? `plan ${result.plan.id.slice(0, 19)}…` : "")}`);
225
- line(` ${result.message}`);
226
- for (const r of result.operations.refused)
227
- line(c.dim(` refused ${r.id}: ${r.reason}`));
228
- for (const [path, f] of Object.entries(result.files))
229
- if (f.written || f.before !== f.after)
230
- line(` ${f.written ? "written" : "changed"} ${path}: ${f.before?.slice(0, 19) ?? "absent"}… → ${f.after?.slice(0, 19) ?? "absent"}…`);
231
- if (result.operations.executed.length)
232
- line(c.dim(` executed ${result.operations.executed.length} operation(s): ${result.operations.executed.join(", ")}`));
233
- if (result.postconditions.length)
234
- line(c.dim(` verified: ${result.postconditions.join("; ")}`));
235
- for (const e of result.evidence)
236
- line(c.dim(` · ${e}`));
237
- if (result.transaction.outcome === "interrupted" || result.code === "POSTCONDITION_FAILED")
238
- line(` Journal: ${result.transaction.journal}`);
239
- return result.ok ? 0 : 1;
240
- }
241
- // ── Recovery inspection (reads only) ─────────────────────────────────────────
242
- /** `feltkit compose recover --inspect`: explain an interrupted transaction; change nothing. */
243
- export async function recoverCommand(projectDir, json) {
244
- const report = await inspectRecovery(projectDir);
245
- if (json) {
246
- line(JSON.stringify(report, null, 2));
247
- return report.ok ? 0 : 1;
248
- }
249
- line(`${report.ok ? symbols.ok : symbols.fail} ${report.state}${report.journal.present ? c.dim(` journal ${report.journal.path} (${report.journal.valid ? `phase ${report.journal.phase}, plan ${report.journal.plan?.slice(0, 19)}…` : "invalid"})`) : c.dim(" no journal")}`);
250
- for (const p of report.journal.problems)
251
- line(` journal: ${p}`);
252
- for (const f of report.files) {
253
- line(` ${f.class.padEnd(10)} ${f.path}${f.committed ? c.dim(" (journaled as replaced)") : ""}`);
254
- line(c.dim(` ${f.reason}`));
255
- line(c.dim(` prior ${f.prior ?? "absent"} · expected ${f.expected} · observed ${f.observed ?? "absent"}`));
256
- if (f.priorSources.length || f.expectedSources.length)
257
- line(c.dim(` prior bytes: ${f.priorSources.join(", ") || "no verified source"} · expected bytes: ${f.expectedSources.join(", ") || "no verified source"}`));
258
- }
259
- for (const s of report.staged)
260
- line(c.dim(` staged temporary ${s.path} (${s.sha256 ?? "unreadable"}${s.matches ? `, for ${s.matches}` : ""}): not an output`));
261
- for (const cand of report.candidates)
262
- line(` ${cand.state} state: ${cand.complete ? "complete" : cand.restorable ? `restorable (${cand.differing.map((d) => d.path).join(", ")} differ)` : `not restorable from verified sources (${cand.differing.filter((d) => !d.sources.length).map((d) => d.path).join(", ")} have none)`}`);
263
- if (report.verification.integrity !== null)
264
- line(c.dim(` as the files are: \`feltkit compose --check\` ${report.verification.integrity ? "passes" : `fails (${report.verification.integrityProblems.join(", ")})`}${report.verification.reconciliation ? `; reconciliation ${report.verification.reconciliation}` : ""}`));
265
- for (const g of report.evidenceGaps)
266
- line(` evidence gap: ${g}`);
267
- if (report.actions.length) {
268
- line(" What to do:");
269
- report.actions.forEach((a, i) => line(` ${i + 1}. ${a}`));
270
- }
271
- line(c.dim(` This inspection will not: ${report.willNot.join("; ")}.`));
272
- return report.ok ? 0 : 1;
273
- }
274
- //# sourceMappingURL=compose.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/cli/compose.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,WAAW,EACX,eAAe,EACf,kBAAkB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAA2C,MAAM,6BAA6B,CAAC;AACrH,OAAO,EAAE,eAAe,EAAwC,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAwB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAuB,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAW/C,8FAA8F;AAC9F,MAAM,MAAM,GAAG,IAAI,GAAG,CAA2B,CAAC,yBAAyB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,0BAA0B,CAAC,CAAC,CAAC;AAEnK,MAAM,UAAU,WAAW,CAAC,MAAgB;IAC1C,MAAM,MAAM,GAAgC,EAAE,CAA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,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC"}
@@ -1,219 +0,0 @@
1
- import type { CapabilityId } from "../composition/contract.js";
2
- import { DECLARATION_PATH, LOCK_PATH, RECORD_PATH, type GenerateResult } from "../composition/generate.js";
3
- import type { Profile } from "../composition/contract.js";
4
- import { type Entity, type Tenancy } from "./domain.js";
5
- export type { Entity, Tenancy } from "./domain.js";
6
- export type AppKind = "business" | "portal" | "collaboration" | "marketplace" | "operations" | "personal" | "custom";
7
- export type Participant = "customers" | "staff" | "administrators" | "partners" | "collaborators" | "agents";
8
- /** `workspaces`: the kind's data belongs to organizations people join (the default answer); `individuals`: to each person. */
9
- export declare const APP_KINDS: ReadonlyArray<{
10
- value: AppKind;
11
- label: string;
12
- hint: string;
13
- tenancy: Tenancy;
14
- }>;
15
- /** `needs`: a participant that exists only with workspaces (membership, invitation into one). */
16
- export declare const PARTICIPANTS: ReadonlyArray<{
17
- value: Participant;
18
- label: string;
19
- hint: string;
20
- needs?: Tenancy;
21
- }>;
22
- /** The two foundations, as the requirement a developer states. The profile follows from the answer; nothing else selects it. */
23
- export declare const TENANCIES: ReadonlyArray<{
24
- value: Tenancy;
25
- label: string;
26
- hint: string;
27
- profile: Profile;
28
- }>;
29
- /** A catalog capability, explained for a developer who does not know the platform. Every id is a real catalog entry. */
30
- export interface CapabilityGuide {
31
- readonly id: CapabilityId;
32
- readonly label: string;
33
- readonly provides: string;
34
- readonly addresses: string;
35
- readonly constraints: string;
36
- readonly applicationOwned: string;
37
- /** Offered only when it fits the participants chosen; always offered when absent. */
38
- readonly offeredFor?: readonly Participant[];
39
- }
40
- export declare const CAPABILITY_GUIDE: readonly CapabilityGuide[];
41
- /** Needs people ask for that no catalog capability composes today. Each line is what the SDK offers instead, verified in source. */
42
- export declare const NOT_COMPOSABLE: ReadonlyArray<{
43
- id: string;
44
- label: string;
45
- status: string;
46
- }>;
47
- export interface Answers {
48
- dir: string;
49
- name: string;
50
- description: string;
51
- kind: AppKind;
52
- participants: Participant[];
53
- /** Optional capabilities the developer selected (profile-required ones are never listed here). */
54
- include: CapabilityId[];
55
- params: Record<string, Record<string, unknown>>;
56
- entities: Entity[];
57
- workflows: string[];
58
- /** Needs selected from NOT_COMPOSABLE: recorded as application-owned work, never as capabilities. */
59
- notComposable: string[];
60
- /** Permissions the agent role holds (application-owned; only with agents.membership). */
61
- agentPermissions: string[];
62
- /** Whether the application's data belongs to organizations people join. Decides the profile. */
63
- tenancy: Tenancy;
64
- /** With individuals: the application's roles beyond the base one, highest first (application-owned, declared in feltkit/app.ts). */
65
- roles: string[];
66
- /** With individuals: which of `roles` may change anyone's shared records. */
67
- managers: string[];
68
- }
69
- /** The profile the answers select: a function of the stated requirement, not of a flag. */
70
- export declare function profileFor(a: Pick<Answers, "tenancy">): Profile;
71
- export interface Choice {
72
- readonly value: string;
73
- readonly label: string;
74
- readonly hint?: string;
75
- /** Always selected; shown, not askable. */
76
- readonly locked?: boolean;
77
- }
78
- /** How the composer talks to the developer. The terminal implementation is below; tests script one. */
79
- export interface Prompter {
80
- say(text: string): void;
81
- text(prompt: string, options?: {
82
- default?: string;
83
- required?: boolean;
84
- validate?: (value: string) => string | null;
85
- }): Promise<string>;
86
- choose(prompt: string, choices: readonly Choice[], options?: {
87
- default?: string;
88
- }): Promise<string>;
89
- multi(prompt: string, choices: readonly Choice[], options?: {
90
- default?: readonly string[];
91
- }): Promise<string[]>;
92
- confirm(prompt: string, defaultValue: boolean): Promise<boolean>;
93
- }
94
- export declare class Cancelled extends Error {
95
- constructor();
96
- }
97
- /**
98
- * The terminal prompter: numbered choices, comma-separated multiple choices, y/n; an empty required
99
- * answer asks again; "q" cancels; end of input cancels. Lines are queued as they arrive, so answers
100
- * piped in all at once (a script, a test) are not lost between questions.
101
- */
102
- export declare function terminalPrompter(input?: NodeJS.ReadableStream, output?: NodeJS.WritableStream): Prompter & {
103
- close(): void;
104
- };
105
- /** "a" or "an" for a word the developer chose: the workspace noun is theirs, so "a acme" is their word, mis-articled. */
106
- export declare const article: (word: string) => string;
107
- export declare function defaultAnswers(dir: string, name: string): Answers;
108
- type Section = "basics" | "kind" | "participants" | "capabilities" | "details" | "data";
109
- /**
110
- * Ask, section by section, adapting to earlier answers. Returns the answers, or throws Cancelled.
111
- * `sections` limits a pass to what the developer wants to change (the review loop).
112
- */
113
- /**
114
- * Asks what the composition needs.
115
- *
116
- * `brief` is the first pass: it asks what shapes the application — its name, its kind, who the data belongs to, who
117
- * uses it, which capabilities, the one account setting that has no default, and the entities — and leaves every
118
- * other setting at the value it would have suggested anyway. The review then offers them, section by section, to
119
- * anyone who wants them, and a re-ask is never brief.
120
- *
121
- * The first pass used to put around twenty questions between a developer and an application, most of them
122
- * configuration with a perfectly good default: what a workspace is called, the role list, who manages members, who
123
- * may create one, typed claims, a file size limit, notification type names, workflows, and a list of things that
124
- * are not composable at all and are only recorded as text. Each one read as a decision that had to be made before
125
- * anything could exist. They are decisions better made against something that does.
126
- */
127
- export declare function interview(io: Prompter, start: Answers, sections?: readonly Section[], { brief }?: {
128
- brief?: boolean;
129
- }): Promise<Answers>;
130
- /** The composition request the answers translate to: the inputs `feltkit compose` records. */
131
- export declare function compositionInputs(a: Answers): {
132
- profile: string;
133
- include: string[];
134
- params: Record<string, Record<string, unknown>>;
135
- };
136
- export interface Preview {
137
- readonly profile: Profile;
138
- readonly inputs: ReturnType<typeof compositionInputs>;
139
- readonly result: GenerateResult;
140
- readonly explicit: readonly CapabilityId[];
141
- readonly implied: ReadonlyArray<{
142
- id: CapabilityId;
143
- because: string;
144
- }>;
145
- readonly entities: readonly Entity[];
146
- readonly roles: Readonly<Record<string, readonly string[]>>;
147
- readonly notComposable: ReadonlyArray<{
148
- label: string;
149
- status: string;
150
- }>;
151
- readonly applicationOwned: readonly string[];
152
- }
153
- /** What the composition would be: the resolver's own output, plus what the application adds and what stays its own. */
154
- export declare function preview(a: Answers): Preview;
155
- /**
156
- * Who may do what with an entity, operation by operation, from the resolved roles (what the application's roles will
157
- * really grant) and the generated functions' rules: the roles holding each permission, "anyone" for a public read, and
158
- * the ownership or scope rule the function applies after the permission. A description of generated behavior, proven by
159
- * the generated tests; the permission check itself is the runtime's.
160
- */
161
- export declare function authorizationLines(a: Answers, p: Preview, e: Entity): string[];
162
- export declare function renderPreview(a: Answers, p: Preview): string[];
163
- export interface Created {
164
- readonly dir: string;
165
- readonly files: readonly string[];
166
- readonly composition: string | null;
167
- readonly integrity: boolean;
168
- readonly reconciliation: string | null;
169
- readonly next: readonly string[];
170
- }
171
- /** feltkit/app.ts for the answers: application-owned, written once, never touched by composition again. */
172
- export declare function renderAppModule(a: Answers, p: Preview): string;
173
- /** Scaffold the shell, write the application-owned app.ts, compose the foundation with `feltkit compose`, verify. */
174
- export declare function createApplication(a: Answers, p: Preview): Promise<Created>;
175
- export interface CreateOptions {
176
- dir?: string;
177
- name?: string;
178
- description?: string;
179
- kind?: string;
180
- participants: string[];
181
- include: string[];
182
- params: string[];
183
- /** `workspaces` or `individuals`: who the data belongs to (the requirement that selects the foundation). Default: the kind's. */
184
- tenancy?: string;
185
- /** With individuals: application roles beyond the base one, highest first. */
186
- roles: string[];
187
- /** With individuals: which of `roles` manage shared data. */
188
- managers: string[];
189
- /** `name[:workspace|shared|personal][:description]` */
190
- entities: string[];
191
- /** `entity.field:type[?]` (see domain.ts parseFields) */
192
- fields: string[];
193
- /** `entity.field->target[?]` */
194
- refs: string[];
195
- /** Entities owned by their creator. */
196
- owned: string[];
197
- /** Shared entities anyone may read without signing in (list and get public). */
198
- public: string[];
199
- /** Entities whose records carry file attachments (implies services.files). */
200
- attach: string[];
201
- /** Membership claims, `name:type[=default]` (workspaces only; see domain.ts parseClaims). */
202
- claims?: string[];
203
- /** `entity:claim=value[|value]`: the entity's functions require the membership claim. */
204
- require?: string[];
205
- /** `entity.f1,f2` */
206
- unique: string[];
207
- workflows: string[];
208
- yes: boolean;
209
- interactive: boolean;
210
- dryRun: boolean;
211
- json: boolean;
212
- /** Replaceable in tests. */
213
- prompter?: Prompter;
214
- stdinIsTTY?: boolean;
215
- }
216
- /** Answers from flags alone (the machine-usable form); what is missing is named. */
217
- export declare function answersFromOptions(o: CreateOptions): Answers;
218
- export declare function createCommand(o: CreateOptions): Promise<number>;
219
- export { DECLARATION_PATH, LOCK_PATH, RECORD_PATH };