@feltdb/core 0.7.4 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/application-development.d.ts +10 -3
- package/dist/application-development.d.ts.map +1 -1
- package/dist/application-development.js +11 -1
- package/dist/application-manifest.d.ts +2 -0
- package/dist/application-manifest.d.ts.map +1 -1
- package/dist/application-manifest.js +1 -1
- package/dist/application-understanding.d.ts +76 -0
- package/dist/application-understanding.d.ts.map +1 -0
- package/dist/application-understanding.js +282 -0
- package/dist/canonical-application.d.ts +1 -0
- package/dist/canonical-application.d.ts.map +1 -1
- package/dist/canonical-application.js +3 -2
- package/dist/cli/ai-model-config.js +3 -3
- package/dist/cli/cli.js +1 -1
- package/dist/cli/commands.js +321 -45
- package/dist/cli/index.js +1 -1
- package/dist/cli/managed-environment.js +6 -0
- package/dist/cli/managed-project.js +6 -0
- package/dist/cli/proposal-client.js +16 -3
- package/dist/cli/publish-engine.js +8 -5
- package/dist/cli/repository-evidence.js +55 -0
- package/dist/cli/source-sync.js +220 -61
- package/dist/convergence.d.ts +55 -0
- package/dist/convergence.d.ts.map +1 -0
- package/dist/convergence.js +63 -0
- package/dist/create/cli.js +10 -1
- package/dist/create/create.js +10 -12
- package/dist/create/managed-account.js +72 -7
- package/dist/create/package-versions.js +1 -1
- package/dist/create/server-source/crates/feltdb/src/application.rs +14 -0
- package/dist/create/server-source/crates/feltdb/src/lib.rs +20 -2
- package/dist/create/server-source/crates/feltdb-server/src/app_state.rs +12 -24
- package/dist/create/server-source/crates/feltdb-server/src/application_contract.rs +11 -3
- package/dist/create/server-source/crates/feltdb-server/src/authenticated_principal.rs +0 -1
- package/dist/create/server-source/crates/feltdb-server/src/certification_harness.rs +23 -22
- package/dist/create/server-source/crates/feltdb-server/src/connections.rs +14 -0
- package/dist/create/server-source/crates/feltdb-server/src/delegation_token.rs +5 -15
- package/dist/create/server-source/crates/feltdb-server/src/durable_operations.rs +13 -28
- package/dist/create/server-source/crates/feltdb-server/src/identity.rs +79 -14
- package/dist/create/server-source/crates/feltdb-server/src/key_management.rs +28 -7
- package/dist/create/server-source/crates/feltdb-server/src/lib.rs +5 -5
- package/dist/create/server-source/crates/feltdb-server/src/main.rs +1929 -261
- package/dist/create/server-source/crates/feltdb-server/src/managed_diagnostics.rs +10 -30
- package/dist/create/server-source/crates/feltdb-server/src/membership_policy.rs +12 -4
- package/dist/create/server-source/crates/feltdb-server/src/request_telemetry.rs +8 -6
- package/dist/create/server-source/crates/feltdb-server/src/snapshot_cursor.rs +10 -14
- package/dist/create/server-source/crates/feltdb-server/src/tenancy.rs +191 -22
- package/dist/create/server-source/crates/feltdb-server/src/tenant_policies.rs +9 -21
- package/dist/create/server-source/crates/feltdb-server/src/transaction_idempotency.rs +5 -3
- package/dist/create/server-source/crates/feltdb-server/src/transaction_recovery.rs +9 -8
- package/dist/create/server-source/crates/feltdb-server/tests/revision_recovery_integration_test.rs +1 -4
- package/dist/create/template/default-project/feltdb.flow +5 -0
- package/dist/create/template/default-project/src/context/AuthContext.tsx +9 -1
- package/dist/create/template/default-project/src/pages/SignUp.tsx +1 -1
- package/dist/flowspec.d.ts +1 -0
- package/dist/flowspec.d.ts.map +1 -1
- package/dist/flowspec.js +51 -12
- package/dist/http-client.d.ts +166 -14
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +91 -31
- package/dist/http-db.d.ts +3 -0
- package/dist/http-db.d.ts.map +1 -1
- package/dist/http-db.js +28 -3
- package/dist/index-core.d.ts +5 -0
- package/dist/index-core.d.ts.map +1 -1
- package/dist/index-core.js +5 -0
- package/dist/intent.d.ts +98 -0
- package/dist/intent.d.ts.map +1 -0
- package/dist/intent.js +343 -0
- package/dist/module-intent.d.ts +51 -0
- package/dist/module-intent.d.ts.map +1 -0
- package/dist/module-intent.js +230 -0
- package/dist/module.d.ts +105 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +566 -0
- package/dist/proposal.d.ts +92 -4
- package/dist/proposal.d.ts.map +1 -1
- package/dist/proposal.js +150 -6
- package/dist/studio/app.d.ts +3 -1
- package/dist/studio/app.d.ts.map +1 -1
- package/dist/studio/components/AskFeltDB.d.ts +2 -1
- package/dist/studio/components/AskFeltDB.d.ts.map +1 -1
- package/dist/studio/components/ContractInspector.d.ts +7 -0
- package/dist/studio/components/ContractInspector.d.ts.map +1 -0
- package/dist/studio/components/ManagedInstancePanel.d.ts.map +1 -1
- package/dist/studio/components/ManagedInstancePanel.js +1 -5
- package/dist/studio/components/ModuleExplorer.d.ts +6 -0
- package/dist/studio/components/ModuleExplorer.d.ts.map +1 -0
- package/dist/studio/components/ProposalBrowser.d.ts +10 -1
- package/dist/studio/components/ProposalBrowser.d.ts.map +1 -1
- package/dist/studio/components/StateExplorer.d.ts +6 -7
- package/dist/studio/components/StateExplorer.d.ts.map +1 -1
- package/dist/studio/components/index.d.ts +2 -0
- package/dist/studio/components/index.d.ts.map +1 -1
- package/dist/studio/components/index.js +4 -4
- package/dist/studio/components-Duq2xQWt.js +2845 -0
- package/dist/studio/index.js +193 -147
- package/dist/studio/studio.css +1 -1
- package/dist/studio/utils/index.d.ts +2 -0
- package/dist/studio/utils/index.d.ts.map +1 -1
- package/dist/studio/utils/index.js +14 -12
- package/dist/studio/utils/managed-instance.d.ts +0 -4
- package/dist/studio/utils/managed-instance.d.ts.map +1 -1
- package/dist/studio/utils/managed-instance.js +0 -4
- package/dist/studio/utils/proposal-api.d.ts +56 -0
- package/dist/studio/utils/proposal-api.d.ts.map +1 -0
- package/dist/studio/utils/proposal-api.js +94 -0
- package/dist/studio/utils/service-api.d.ts +81 -0
- package/dist/studio/utils/service-api.d.ts.map +1 -0
- package/dist/studio/utils/service-api.js +51 -0
- package/dist/studio-app/assets/{feltdb_wasm-B-Ccgccb.js → feltdb_wasm-bIqcRzAr.js} +1 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-BE79okwX.wasm +0 -0
- package/dist/studio-app/assets/{index-BRrmvaKw.css → index-Cd_NPw14.css} +1 -1
- package/dist/studio-app/assets/index-XGYdlElN.js +29 -0
- package/dist/studio-app/index.html +2 -2
- package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
- package/dist/workspace/local-development-authority.d.ts +2 -0
- package/dist/workspace/local-development-authority.d.ts.map +1 -1
- package/dist/workspace/local-development-authority.js +128 -4
- package/package.json +1 -1
- package/dist/studio/components-Bm4sjhcX.js +0 -2162
- package/dist/studio-app/assets/dist-DA1MYSzp.js +0 -1
- package/dist/studio-app/assets/feltdb_wasm_bg-wH3enJIA.wasm +0 -0
- package/dist/studio-app/assets/index-CEIqowCh.js +0 -42
- package/dist/studio-app/assets/lib-B2_7fcn7.js +0 -69
- package/dist/studio-app/assets/worker-CARZ5g7K.js +0 -69
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { formatFlowSpec, parseFlowSpec, } from "./flowspec.js";
|
|
2
|
+
import { findFeltDBModules, listFeltDBModules, resolveFeltDBModule, } from "./module.js";
|
|
3
|
+
import { collectApplicationUnderstanding, understandingOwner, } from "./application-understanding.js";
|
|
4
|
+
async function sourceHash(source) {
|
|
5
|
+
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(source.replace(/\r\n/g, "\n")));
|
|
6
|
+
return `sha256:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
7
|
+
}
|
|
8
|
+
export function resolveModuleIntent(value) {
|
|
9
|
+
const implement = /^\s*implement\s+([a-z0-9][a-z0-9-]*)\s*[.!]?\s*$/i.exec(value);
|
|
10
|
+
const finish = /^\s*finish(?:\s+the)?\s+([a-z0-9][a-z0-9-]*)\s+implementation\s*[.!]?\s*$/i.exec(value);
|
|
11
|
+
let matches = [];
|
|
12
|
+
let action = "implement";
|
|
13
|
+
const requested = (implement?.[1] || finish?.[1])?.toLowerCase();
|
|
14
|
+
if (requested)
|
|
15
|
+
matches = findFeltDBModules(requested);
|
|
16
|
+
else {
|
|
17
|
+
const words = new Set(value.toLowerCase().match(/[a-z0-9-]+/g) ?? []);
|
|
18
|
+
matches = listFeltDBModules().filter((module) => module.intent_keywords.some((keyword) => words.has(keyword)));
|
|
19
|
+
action = "extend";
|
|
20
|
+
if (!matches.length)
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
if (!matches.length)
|
|
24
|
+
throw new Error(`MODULE_NOT_AVAILABLE: ${requested}. No proposal created. Available modules: ${listFeltDBModules()
|
|
25
|
+
.map((module) => module.id)
|
|
26
|
+
.join(", ")}`);
|
|
27
|
+
if (matches.length > 1)
|
|
28
|
+
throw new Error(`AMBIGUOUS_MODULE_INTENT: ${requested ?? value}. Candidates: ${matches.map((module) => module.id).join(", ")}`);
|
|
29
|
+
const module = matches[0];
|
|
30
|
+
return {
|
|
31
|
+
action,
|
|
32
|
+
module: module.id,
|
|
33
|
+
provider: module.provider,
|
|
34
|
+
version: module.version,
|
|
35
|
+
original: value,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function applicationAuthorization(module, owner, snapshot) {
|
|
39
|
+
const ownerPolicy = snapshot.policies.find((value) => value.resource === owner ||
|
|
40
|
+
value.name === owner ||
|
|
41
|
+
value.resource === module.placement.primary_application_model);
|
|
42
|
+
const vocabulary = [ownerPolicy?.write, ownerPolicy?.read].filter((value) => Boolean(value));
|
|
43
|
+
const management = vocabulary.find((value) => /admin|owner/i.test(value));
|
|
44
|
+
if (!management && vocabulary.length)
|
|
45
|
+
throw new Error(`CLARIFICATION_REQUIRED: no compatible ${module.id} management policy for ${owner}`);
|
|
46
|
+
const subject = management ?? "owner";
|
|
47
|
+
return module.authorization.map((requirement) => requirement.subject === "owner"
|
|
48
|
+
? {
|
|
49
|
+
...requirement,
|
|
50
|
+
subject,
|
|
51
|
+
implication: `${subject} (${module.placement.primary_application_model}.${module.placement.owner_field} -> ${owner}) may manage ${module.name}`,
|
|
52
|
+
}
|
|
53
|
+
: requirement);
|
|
54
|
+
}
|
|
55
|
+
function dependencyStatus(module, snapshot) {
|
|
56
|
+
const collections = new Set(snapshot.schema.map((value) => value.name));
|
|
57
|
+
const capabilities = new Set(snapshot.capabilities.map((value) => value.name));
|
|
58
|
+
return module.dependencies.map((dependency) => {
|
|
59
|
+
const collection = dependency.any_collections?.find((value) => collections.has(value));
|
|
60
|
+
const capability = dependency.any_capabilities?.find((value) => capabilities.has(value));
|
|
61
|
+
const policy = dependency.name === "authentication"
|
|
62
|
+
? snapshot.policies.find((value) => [value.read, value.write].some((subject) => subject === "authenticated" || subject?.includes("member")))
|
|
63
|
+
: undefined;
|
|
64
|
+
return {
|
|
65
|
+
name: dependency.name,
|
|
66
|
+
status: (collection || capability || policy ? "satisfied" : "missing"),
|
|
67
|
+
evidence: [
|
|
68
|
+
...(collection ? [`collection:${collection}`] : []),
|
|
69
|
+
...(capability ? [`capability:${capability}`] : []),
|
|
70
|
+
...(policy ? [`policy:${policy.name}`] : []),
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function substitute(type, module, owner, snapshot) {
|
|
76
|
+
if (type === "$project" || type === "ref $project") {
|
|
77
|
+
const project = snapshot.schema.find((value) => value.name === "Project")?.name;
|
|
78
|
+
return project ? type.replace("$project", project) : undefined;
|
|
79
|
+
}
|
|
80
|
+
return type.replaceAll("$owner", owner).replaceAll("$module", module.id);
|
|
81
|
+
}
|
|
82
|
+
export function planModuleImplementation(intent, snapshot, currentFlow, understanding) {
|
|
83
|
+
const module = resolveFeltDBModule({
|
|
84
|
+
name: intent.module,
|
|
85
|
+
provider: intent.provider,
|
|
86
|
+
version: intent.version,
|
|
87
|
+
});
|
|
88
|
+
const spec = parseFlowSpec(currentFlow);
|
|
89
|
+
const owner = understandingOwner(understanding, module);
|
|
90
|
+
if (!owner)
|
|
91
|
+
throw new Error(`CLARIFICATION_REQUIRED: ${module.placement.owner_claim}`);
|
|
92
|
+
const alreadyInstalled = Boolean(spec.modules?.some((value) => value.name === module.id));
|
|
93
|
+
const pattern = module.patterns.find((value) => value.owner_candidates.includes(owner));
|
|
94
|
+
if (!pattern)
|
|
95
|
+
throw new Error(`CLARIFICATION_REQUIRED: ${module.placement.owner_claim}=${owner} is unsupported by ${module.id}`);
|
|
96
|
+
const applicationModels = (intent.action === "extend" && module.extension_application_models?.length
|
|
97
|
+
? module.extension_application_models
|
|
98
|
+
: pattern.application_models).map((value) => ({
|
|
99
|
+
...value,
|
|
100
|
+
fields: value.fields
|
|
101
|
+
.map((field) => ({
|
|
102
|
+
...field,
|
|
103
|
+
type: substitute(field.type, module, owner, snapshot),
|
|
104
|
+
}))
|
|
105
|
+
.filter((field) => Boolean(field.type)),
|
|
106
|
+
}));
|
|
107
|
+
const relationships = applicationModels.flatMap((model) => model.fields
|
|
108
|
+
.filter((field) => field.type.startsWith("ref "))
|
|
109
|
+
.map((field) => `${model.name}.${field.name} -> ${field.type.slice(4)}`));
|
|
110
|
+
const implementedEvents = new Set(spec.triggers.map((value) => value.event));
|
|
111
|
+
const implementedWorkflows = new Set(spec.workflows.map((value) => value.name));
|
|
112
|
+
const dependencies = dependencyStatus(module, snapshot);
|
|
113
|
+
const missing = dependencies.filter((value) => value.status === "missing");
|
|
114
|
+
if (missing.length)
|
|
115
|
+
throw new Error(`MISSING_MODULE_DEPENDENCY: ${missing.map((value) => value.name).join(", ")}`);
|
|
116
|
+
return {
|
|
117
|
+
intent,
|
|
118
|
+
module,
|
|
119
|
+
alreadyInstalled,
|
|
120
|
+
owner,
|
|
121
|
+
ownerClaim: module.placement.owner_claim,
|
|
122
|
+
primaryApplicationModel: module.placement.primary_application_model,
|
|
123
|
+
applicationModels,
|
|
124
|
+
relationships,
|
|
125
|
+
events: module.reconciliation
|
|
126
|
+
.map((value) => value.event)
|
|
127
|
+
.filter((value) => !implementedEvents.has(value)),
|
|
128
|
+
workflows: module.reconciliation
|
|
129
|
+
.map((value) => value.workflow)
|
|
130
|
+
.filter((value) => !implementedWorkflows.has(value)),
|
|
131
|
+
capabilities: [...module.capabilities],
|
|
132
|
+
authorization: applicationAuthorization(module, owner, snapshot),
|
|
133
|
+
configuration: module.configuration.map((value) => value.name),
|
|
134
|
+
secrets: module.secrets.map((value) => value.name),
|
|
135
|
+
dependencies,
|
|
136
|
+
stateFlow: module.reconciliation[0]
|
|
137
|
+
? [
|
|
138
|
+
module.reconciliation[0].event,
|
|
139
|
+
module.reconciliation[0].workflow,
|
|
140
|
+
...module.reconciliation[0].writes,
|
|
141
|
+
]
|
|
142
|
+
: [],
|
|
143
|
+
warnings: module.validation.map((value) => `Required: ${value}`),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function addCollection(spec, collection) {
|
|
147
|
+
if (!spec.collections.some((value) => value.name === collection.name))
|
|
148
|
+
spec.collections.push(collection);
|
|
149
|
+
}
|
|
150
|
+
export async function createModuleImplementationProposal(input) {
|
|
151
|
+
const resolved = resolveModuleIntent(input.intent);
|
|
152
|
+
if (!resolved)
|
|
153
|
+
throw new Error("NOT_A_MODULE_INTENT");
|
|
154
|
+
const understanding = await collectApplicationUnderstanding({
|
|
155
|
+
intent: input.intent,
|
|
156
|
+
snapshot: input.snapshot,
|
|
157
|
+
currentFlow: input.currentFlow,
|
|
158
|
+
moduleIntent: resolved,
|
|
159
|
+
observations: input.observations,
|
|
160
|
+
});
|
|
161
|
+
const plan = planModuleImplementation(resolved, input.snapshot, input.currentFlow, understanding);
|
|
162
|
+
const spec = parseFlowSpec(input.currentFlow);
|
|
163
|
+
if (resolved.action === "extend" && !plan.alreadyInstalled)
|
|
164
|
+
throw new Error(`MODULE_NOT_INSTALLED: ${plan.module.id}. Run implement ${plan.module.id} first.`);
|
|
165
|
+
if (!spec.modules?.some((value) => value.name === plan.module.id))
|
|
166
|
+
spec.modules.push({
|
|
167
|
+
name: plan.module.id,
|
|
168
|
+
provider: plan.module.provider,
|
|
169
|
+
version: plan.module.version,
|
|
170
|
+
});
|
|
171
|
+
for (const model of plan.applicationModels)
|
|
172
|
+
addCollection(spec, {
|
|
173
|
+
name: model.name,
|
|
174
|
+
fields: model.fields.map((field) => ({
|
|
175
|
+
name: field.name,
|
|
176
|
+
type: field.type,
|
|
177
|
+
optional: Boolean(field.optional),
|
|
178
|
+
})),
|
|
179
|
+
indexes: [],
|
|
180
|
+
});
|
|
181
|
+
for (const reconciliation of plan.module.reconciliation) {
|
|
182
|
+
if (!spec.workflows.some((value) => value.name === reconciliation.workflow)) {
|
|
183
|
+
const readCapability = plan.module.capabilities.find((value) => value.endsWith(".read"));
|
|
184
|
+
spec.workflows.push({
|
|
185
|
+
name: reconciliation.workflow,
|
|
186
|
+
parameters: "",
|
|
187
|
+
steps: [
|
|
188
|
+
{
|
|
189
|
+
name: "reconcile",
|
|
190
|
+
statements: [
|
|
191
|
+
...reconciliation.reads.map((value) => `read ${value}`),
|
|
192
|
+
...reconciliation.writes.map((value) => `write ${value}`),
|
|
193
|
+
...(readCapability ? [`capability ${readCapability}`] : []),
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
if (!spec.triggers.some((value) => value.event === reconciliation.event))
|
|
200
|
+
spec.triggers.push({
|
|
201
|
+
event: reconciliation.event,
|
|
202
|
+
statements: [`run ${reconciliation.workflow}`],
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (!spec.policies.some((value) => value.name === plan.primaryApplicationModel))
|
|
206
|
+
spec.policies.push({
|
|
207
|
+
name: plan.primaryApplicationModel,
|
|
208
|
+
statements: ["read: owner", "write: owner"],
|
|
209
|
+
});
|
|
210
|
+
const prefix = resolved.action === "extend"
|
|
211
|
+
? "Extend"
|
|
212
|
+
: plan.alreadyInstalled
|
|
213
|
+
? "Complete"
|
|
214
|
+
: "Implement";
|
|
215
|
+
return {
|
|
216
|
+
baseContractHash: input.snapshot.contract_hash,
|
|
217
|
+
baseFlowHash: await sourceHash(input.currentFlow),
|
|
218
|
+
proposedFlow: formatFlowSpec(spec),
|
|
219
|
+
summary: `${prefix} ${plan.module.name}`,
|
|
220
|
+
changes: [
|
|
221
|
+
...plan.applicationModels.map((value) => `${value.name} (${value.ownership})`),
|
|
222
|
+
...plan.relationships,
|
|
223
|
+
...plan.workflows,
|
|
224
|
+
...plan.capabilities,
|
|
225
|
+
],
|
|
226
|
+
warnings: plan.warnings,
|
|
227
|
+
implementation: plan,
|
|
228
|
+
understanding,
|
|
229
|
+
};
|
|
230
|
+
}
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type FeltDBModuleOwnership = "external-authoritative" | "application-authoritative" | "derived" | "synchronized";
|
|
2
|
+
export interface FeltDBModuleField {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
optional?: boolean;
|
|
6
|
+
immutable?: boolean;
|
|
7
|
+
externally_owned?: boolean;
|
|
8
|
+
application_readable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface FeltDBModuleModel {
|
|
11
|
+
name: string;
|
|
12
|
+
authority: "external" | "application";
|
|
13
|
+
ownership: FeltDBModuleOwnership;
|
|
14
|
+
fields: FeltDBModuleField[];
|
|
15
|
+
}
|
|
16
|
+
export interface FeltDBModuleRelationship {
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
kind: "one" | "many";
|
|
20
|
+
}
|
|
21
|
+
export interface FeltDBModuleRequirement {
|
|
22
|
+
name: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
environments?: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
visibility?: "server" | "browser";
|
|
27
|
+
}
|
|
28
|
+
export interface FeltDBModuleApplicationField {
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
optional?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface FeltDBModulePattern {
|
|
34
|
+
name: string;
|
|
35
|
+
when: string;
|
|
36
|
+
owner_candidates: string[];
|
|
37
|
+
application_models: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
ownership: FeltDBModuleOwnership;
|
|
40
|
+
purpose: string;
|
|
41
|
+
fields: FeltDBModuleApplicationField[];
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
44
|
+
export interface FeltDBModuleReconciliation {
|
|
45
|
+
event: string;
|
|
46
|
+
workflow: string;
|
|
47
|
+
reads: string[];
|
|
48
|
+
writes: string[];
|
|
49
|
+
outcome: string;
|
|
50
|
+
}
|
|
51
|
+
export interface FeltDBModuleDependency {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
any_collections?: string[];
|
|
55
|
+
any_capabilities?: string[];
|
|
56
|
+
}
|
|
57
|
+
export interface FeltDBModuleSourceArtifact {
|
|
58
|
+
path: string;
|
|
59
|
+
role: string;
|
|
60
|
+
purpose: string;
|
|
61
|
+
}
|
|
62
|
+
export interface FeltDBModuleDefinition {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
version: string;
|
|
66
|
+
provider: string;
|
|
67
|
+
compatibility: string[];
|
|
68
|
+
intent_keywords: string[];
|
|
69
|
+
models: FeltDBModuleModel[];
|
|
70
|
+
relationships: FeltDBModuleRelationship[];
|
|
71
|
+
events: string[];
|
|
72
|
+
capabilities: string[];
|
|
73
|
+
workflows: string[];
|
|
74
|
+
configuration: FeltDBModuleRequirement[];
|
|
75
|
+
secrets: FeltDBModuleRequirement[];
|
|
76
|
+
validation: string[];
|
|
77
|
+
dependencies: FeltDBModuleDependency[];
|
|
78
|
+
authorization: Array<{
|
|
79
|
+
capability: string;
|
|
80
|
+
subject: string;
|
|
81
|
+
implication: string;
|
|
82
|
+
}>;
|
|
83
|
+
patterns: FeltDBModulePattern[];
|
|
84
|
+
reconciliation: FeltDBModuleReconciliation[];
|
|
85
|
+
placement: {
|
|
86
|
+
owner_claim: string;
|
|
87
|
+
primary_application_model: string;
|
|
88
|
+
owner_field: string;
|
|
89
|
+
};
|
|
90
|
+
source_artifacts: FeltDBModuleSourceArtifact[];
|
|
91
|
+
extension_application_models?: FeltDBModulePattern["application_models"];
|
|
92
|
+
}
|
|
93
|
+
export interface FlowModuleDeclaration {
|
|
94
|
+
name: string;
|
|
95
|
+
provider: string;
|
|
96
|
+
version?: string;
|
|
97
|
+
}
|
|
98
|
+
export declare function validateFeltDBModule(module: FeltDBModuleDefinition): string[];
|
|
99
|
+
export declare function registerFeltDBModule(module: FeltDBModuleDefinition): () => void;
|
|
100
|
+
export declare function listFeltDBModules(): FeltDBModuleDefinition[];
|
|
101
|
+
export declare function resolveFeltDBModule(declaration: FlowModuleDeclaration): FeltDBModuleDefinition;
|
|
102
|
+
export declare function findFeltDBModules(query: string): FeltDBModuleDefinition[];
|
|
103
|
+
export declare function resolveFeltDBModules(declarations?: FlowModuleDeclaration[]): FeltDBModuleDefinition[];
|
|
104
|
+
export declare function validateResolvedModules(modules: FeltDBModuleDefinition[], environment?: string): string[];
|
|
105
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,wBAAwB,GACxB,2BAA2B,GAC3B,SAAS,GACT,cAAc,CAAC;AACnB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AACD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,UAAU,GAAG,aAAa,CAAC;IACtC,SAAS,EAAE,qBAAqB,CAAC;IACjC,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AACD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,E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