@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
package/dist/http-db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-db.d.ts","sourceRoot":"","sources":["../src/http-db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpE,UAAU,QAAQ;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAC;QAAC,EAAE,CAAC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K,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAMxF,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAOxD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IAQlD,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAqB9E,iBAAiB,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;YAMvD,aAAa;YAgDb,OAAO;IASrB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC7D,UAAU,IAAI,QAAQ;IACtB,SAAS,IAAI,QAAQ;IACrB,QAAQ,IAAI,QAAQ;IACpB,aAAa,IAAI,QAAQ;IACzB,gBAAgB,IAAI,QAAQ;IAC5B,oBAAoB,IAAI,QAAQ;IAChC,2BAA2B,IAAI,QAAQ;IACvC,WAAW,IAAI,MAAM;IAErB;;;;;;;;OAQG;IACH,YAAY,IAAI,MAAM;IAEtB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,eAAe,CAAC,CAAS;IAE3B,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA0BzC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;YAKrB,IAAI;IAOlB,OAAO,CAAC,MAAM;CAIf"}
|
package/dist/http-db.js
CHANGED
|
@@ -6,6 +6,7 @@ export class HttpJsDb {
|
|
|
6
6
|
applicationId;
|
|
7
7
|
environment;
|
|
8
8
|
activeRevision;
|
|
9
|
+
authWaiters = new Set();
|
|
9
10
|
constructor(options) {
|
|
10
11
|
this.url = options.url.replace(/\/$/, '');
|
|
11
12
|
this.token = options.token || '';
|
|
@@ -19,19 +20,35 @@ export class HttpJsDb {
|
|
|
19
20
|
...(json ? { 'Content-Type': 'application/json' } : {}),
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
updateToken(token) {
|
|
24
|
+
this.token = token;
|
|
25
|
+
for (const wake of this.authWaiters)
|
|
26
|
+
wake();
|
|
27
|
+
this.authWaiters.clear();
|
|
28
|
+
}
|
|
29
|
+
waitForAuthChange(signal) {
|
|
30
|
+
if (signal.aborted)
|
|
31
|
+
return Promise.resolve();
|
|
32
|
+
return new Promise(resolve => {
|
|
33
|
+
const onAbort = () => { this.authWaiters.delete(wake); wake(); };
|
|
34
|
+
const wake = () => { signal.removeEventListener('abort', onAbort); resolve(); };
|
|
35
|
+
this.authWaiters.add(wake);
|
|
36
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
37
|
+
});
|
|
38
|
+
}
|
|
22
39
|
async auth_request(operation, body) {
|
|
23
40
|
const response = await fetch(`${this.url}/v1/auth/${operation}`, {
|
|
24
41
|
method: operation === 'session' ? 'GET' : 'POST',
|
|
25
42
|
headers: this.headers(body !== undefined),
|
|
26
|
-
...(body !== undefined ? { body: JSON.stringify(operation === 'signup' ? { application_id: this.applicationId, ...body } : body) } : {}),
|
|
43
|
+
...(body !== undefined ? { body: JSON.stringify(operation === 'signup' || operation === 'signin' ? { application_id: this.applicationId, ...body } : body) } : {}),
|
|
27
44
|
});
|
|
28
45
|
const value = response.status === 204 ? {} : await response.json();
|
|
29
46
|
if (!response.ok)
|
|
30
47
|
throw new FeltDBServiceError(value.message || value.error || 'Authentication failed', value.code || value.error || 'AUTHENTICATION_FAILED', value.request_id, response.status);
|
|
31
48
|
if (value.access_token)
|
|
32
|
-
this.
|
|
49
|
+
this.updateToken(value.access_token);
|
|
33
50
|
if (operation === 'signout')
|
|
34
|
-
this.
|
|
51
|
+
this.updateToken('');
|
|
35
52
|
return value;
|
|
36
53
|
}
|
|
37
54
|
splitKey(key) {
|
|
@@ -344,12 +361,20 @@ export class HttpJsDb {
|
|
|
344
361
|
}
|
|
345
362
|
async consumeEvents(controller, callback) {
|
|
346
363
|
while (!controller.signal.aborted) {
|
|
364
|
+
if (!this.token) {
|
|
365
|
+
await this.waitForAuthChange(controller.signal);
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
347
368
|
try {
|
|
348
369
|
const eventPath = this.applicationId ? `/v1/events?application_id=${encodeURIComponent(this.applicationId)}&environment=${encodeURIComponent(this.environment)}` : '/events';
|
|
349
370
|
const response = await fetch(`${this.url}${eventPath}`, {
|
|
350
371
|
headers: this.headers(),
|
|
351
372
|
signal: controller.signal,
|
|
352
373
|
});
|
|
374
|
+
if (response.status === 401 || response.status === 403) {
|
|
375
|
+
await this.waitForAuthChange(controller.signal);
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
353
378
|
if (!response.ok || !response.body)
|
|
354
379
|
throw new Error(`Event stream failed: HTTP ${response.status}`);
|
|
355
380
|
const reader = response.body.getReader();
|
package/dist/index-core.d.ts
CHANGED
|
@@ -55,6 +55,11 @@ export * from './application-contract.js';
|
|
|
55
55
|
export * from './canonical-application.js';
|
|
56
56
|
export * from './application-development.js';
|
|
57
57
|
export * from './proposal.js';
|
|
58
|
+
export * from './module.js';
|
|
59
|
+
export * from './module-intent.js';
|
|
60
|
+
export * from './application-understanding.js';
|
|
61
|
+
export * from './convergence.js';
|
|
62
|
+
export * from './intent.js';
|
|
58
63
|
export { ProtocolHandler, type Message, type Operation as ProtocolOperation, type Response as ProtocolResponse, } from './protocol.js';
|
|
59
64
|
/**
|
|
60
65
|
* Agent Runtime APIs
|
package/dist/index-core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-core.d.ts","sourceRoot":"","sources":["../src/index-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC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AAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
|
package/dist/index-core.js
CHANGED
|
@@ -54,6 +54,11 @@ export * from './application-contract.js';
|
|
|
54
54
|
export * from './canonical-application.js';
|
|
55
55
|
export * from './application-development.js';
|
|
56
56
|
export * from './proposal.js';
|
|
57
|
+
export * from './module.js';
|
|
58
|
+
export * from './module-intent.js';
|
|
59
|
+
export * from './application-understanding.js';
|
|
60
|
+
export * from './convergence.js';
|
|
61
|
+
export * from './intent.js';
|
|
57
62
|
export { ProtocolHandler, } from './protocol.js';
|
|
58
63
|
/**
|
|
59
64
|
* Agent Runtime APIs
|
package/dist/intent.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ApplicationUnderstanding, ObservedEvidenceInput } from "./application-understanding.js";
|
|
2
|
+
import { type FeltDBContractSnapshot } from "./application-development.js";
|
|
3
|
+
import { type ModuleImplementationPlan } from "./module-intent.js";
|
|
4
|
+
import { FeltDBProposalService, type FeltDBProposalPreviewArtifact, type FeltDBProposalRecord, type ProposalContext, type ProposalStore } from "./proposal.js";
|
|
5
|
+
export declare const FELTDB_INTENT_COLLECTION = "_feltdb.Intent";
|
|
6
|
+
export declare const FELTDB_INTENT_EVENT_COLLECTION = "_feltdb.IntentEvent";
|
|
7
|
+
export type IntentStatus = "received" | "resolving" | "understanding" | "planning" | "proposal_created" | "completed" | "blocked" | "failed";
|
|
8
|
+
export interface IntentAmbiguity {
|
|
9
|
+
code: "requires_selection" | "module_not_available" | "clarification_required";
|
|
10
|
+
message: string;
|
|
11
|
+
candidates: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface Intent {
|
|
14
|
+
id: string;
|
|
15
|
+
application_id: string;
|
|
16
|
+
environment: string;
|
|
17
|
+
raw_request: string;
|
|
18
|
+
action: "implement" | "extend" | "unknown";
|
|
19
|
+
target: "module" | "billing" | "unknown";
|
|
20
|
+
module?: string;
|
|
21
|
+
module_version?: string;
|
|
22
|
+
parent_intent_id?: string;
|
|
23
|
+
contract_hash: string;
|
|
24
|
+
flow_hash: string;
|
|
25
|
+
status: IntentStatus;
|
|
26
|
+
ambiguities: IntentAmbiguity[];
|
|
27
|
+
created_at: string;
|
|
28
|
+
understanding?: ApplicationUnderstanding;
|
|
29
|
+
plan?: ImplementationPlan;
|
|
30
|
+
proposal_id?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IntentEvent {
|
|
33
|
+
id: string;
|
|
34
|
+
intent_id: string;
|
|
35
|
+
status: IntentStatus;
|
|
36
|
+
created_at: string;
|
|
37
|
+
metadata: Record<string, string>;
|
|
38
|
+
}
|
|
39
|
+
export interface ConfidenceRule {
|
|
40
|
+
claim: string;
|
|
41
|
+
minimum_confidence: number;
|
|
42
|
+
allowed_authority: Array<"authoritative" | "observed" | "inferred">;
|
|
43
|
+
clarification: "block" | "warn";
|
|
44
|
+
}
|
|
45
|
+
export declare const DEFAULT_CONFIDENCE_POLICY: ConfidenceRule[];
|
|
46
|
+
export interface ImplementationPlan {
|
|
47
|
+
intent: Intent;
|
|
48
|
+
module: ModuleImplementationPlan["module"];
|
|
49
|
+
already_installed: boolean;
|
|
50
|
+
state_changes: ModuleImplementationPlan["applicationModels"];
|
|
51
|
+
relationships: string[];
|
|
52
|
+
events: string[];
|
|
53
|
+
workflows: string[];
|
|
54
|
+
capabilities: string[];
|
|
55
|
+
authorization: ModuleImplementationPlan["authorization"];
|
|
56
|
+
configuration: string[];
|
|
57
|
+
secrets: string[];
|
|
58
|
+
dependencies: ModuleImplementationPlan["dependencies"];
|
|
59
|
+
ownership: Record<string, string>;
|
|
60
|
+
assumptions: ApplicationUnderstanding["assumptions"];
|
|
61
|
+
evidence: string[];
|
|
62
|
+
source_plan: {
|
|
63
|
+
files: Array<{
|
|
64
|
+
path: string;
|
|
65
|
+
operation: "add" | "modify" | "delete";
|
|
66
|
+
role?: string;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
warnings: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface IntentExecutionResult {
|
|
72
|
+
intent: Intent;
|
|
73
|
+
understanding?: ApplicationUnderstanding;
|
|
74
|
+
plan?: ImplementationPlan;
|
|
75
|
+
proposal?: FeltDBProposalRecord;
|
|
76
|
+
preview?: FeltDBProposalPreviewArtifact;
|
|
77
|
+
blockers: string[];
|
|
78
|
+
warnings: string[];
|
|
79
|
+
}
|
|
80
|
+
export declare function resolveIntent(request: string, context: {
|
|
81
|
+
snapshot: FeltDBContractSnapshot;
|
|
82
|
+
flowHash: string;
|
|
83
|
+
parentIntentId?: string;
|
|
84
|
+
}): Intent;
|
|
85
|
+
export declare function validateImplementationPlan(plan: ImplementationPlan, understanding: ApplicationUnderstanding, policy?: ConfidenceRule[]): string[];
|
|
86
|
+
export declare class IntentService {
|
|
87
|
+
private store;
|
|
88
|
+
private context;
|
|
89
|
+
private proposals;
|
|
90
|
+
private observations?;
|
|
91
|
+
constructor(store: ProposalStore, context: () => Promise<ProposalContext>, proposals: FeltDBProposalService, observations?: (() => ObservedEvidenceInput[] | Promise<ObservedEvidenceInput[]>) | undefined);
|
|
92
|
+
execute(rawRequest: string, actor?: string): Promise<IntentExecutionResult>;
|
|
93
|
+
list(): Promise<Intent[]>;
|
|
94
|
+
get(id: string): Promise<Intent>;
|
|
95
|
+
history(id: string): Promise<IntentEvent[]>;
|
|
96
|
+
private event;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEL,K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;CAcpB"}
|
package/dist/intent.js
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { flowSourceHash, } from "./application-development.js";
|
|
2
|
+
import { createModuleImplementationProposal, resolveModuleIntent, } from "./module-intent.js";
|
|
3
|
+
import { listFeltDBModules, resolveFeltDBModule } from "./module.js";
|
|
4
|
+
import { diffFlowSpec, parseFlowSpec } from "./flowspec.js";
|
|
5
|
+
export const FELTDB_INTENT_COLLECTION = "_feltdb.Intent";
|
|
6
|
+
export const FELTDB_INTENT_EVENT_COLLECTION = "_feltdb.IntentEvent";
|
|
7
|
+
export const DEFAULT_CONFIDENCE_POLICY = [
|
|
8
|
+
{
|
|
9
|
+
claim: "module.owner",
|
|
10
|
+
minimum_confidence: 0.9,
|
|
11
|
+
allowed_authority: ["authoritative", "observed", "inferred"],
|
|
12
|
+
clarification: "block",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
claim: "payment.authority",
|
|
16
|
+
minimum_confidence: 1,
|
|
17
|
+
allowed_authority: ["authoritative"],
|
|
18
|
+
clarification: "block",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
export function resolveIntent(request, context) {
|
|
22
|
+
const raw = request.trim();
|
|
23
|
+
let resolved;
|
|
24
|
+
const ambiguities = [];
|
|
25
|
+
try {
|
|
26
|
+
resolved = resolveModuleIntent(raw);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
30
|
+
ambiguities.push({
|
|
31
|
+
code: message.startsWith("MODULE_NOT_AVAILABLE")
|
|
32
|
+
? "module_not_available"
|
|
33
|
+
: "requires_selection",
|
|
34
|
+
message,
|
|
35
|
+
candidates: listFeltDBModules().map((value) => value.id),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (!resolved && !ambiguities.length)
|
|
39
|
+
ambiguities.push({
|
|
40
|
+
code: "requires_selection",
|
|
41
|
+
message: "Intent target is not deterministically resolvable.",
|
|
42
|
+
candidates: listFeltDBModules().map((value) => value.id),
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
id: `in_${crypto.randomUUID().replaceAll("-", "")}`,
|
|
46
|
+
application_id: context.snapshot.application.application_id,
|
|
47
|
+
environment: context.snapshot.application.environment,
|
|
48
|
+
raw_request: raw,
|
|
49
|
+
action: resolved?.action ?? "unknown",
|
|
50
|
+
target: resolved ? "module" : "unknown",
|
|
51
|
+
module: resolved?.module,
|
|
52
|
+
module_version: resolved?.version,
|
|
53
|
+
parent_intent_id: context.parentIntentId,
|
|
54
|
+
contract_hash: context.snapshot.contract_hash,
|
|
55
|
+
flow_hash: context.flowHash,
|
|
56
|
+
status: ambiguities.length ? "blocked" : "resolving",
|
|
57
|
+
ambiguities,
|
|
58
|
+
created_at: new Date().toISOString(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function validateImplementationPlan(plan, understanding, policy = DEFAULT_CONFIDENCE_POLICY) {
|
|
62
|
+
const blockers = [];
|
|
63
|
+
const registered = resolveFeltDBModule({
|
|
64
|
+
name: plan.module.id,
|
|
65
|
+
provider: plan.module.provider,
|
|
66
|
+
version: plan.module.version,
|
|
67
|
+
});
|
|
68
|
+
if (registered.version !== plan.module.version)
|
|
69
|
+
blockers.push("module_version_mismatch");
|
|
70
|
+
const moduleModels = new Map(registered.models.map((value) => [value.name, value]));
|
|
71
|
+
for (const model of plan.state_changes) {
|
|
72
|
+
const authoritative = moduleModels.get(model.name);
|
|
73
|
+
if (model.ownership === "external-authoritative" &&
|
|
74
|
+
(!authoritative || authoritative.ownership !== model.ownership))
|
|
75
|
+
blockers.push(`invalid_module_model:${model.name}`);
|
|
76
|
+
}
|
|
77
|
+
for (const capability of plan.capabilities)
|
|
78
|
+
if (!registered.capabilities.includes(capability))
|
|
79
|
+
blockers.push(`undeclared_capability:${capability}`);
|
|
80
|
+
const declaredEvents = new Set(registered.reconciliation.map((value) => value.event));
|
|
81
|
+
for (const event of plan.events)
|
|
82
|
+
if (!declaredEvents.has(event))
|
|
83
|
+
blockers.push(`undeclared_event:${event}`);
|
|
84
|
+
const declaredWorkflows = new Set(registered.reconciliation.map((value) => value.workflow));
|
|
85
|
+
for (const workflow of plan.workflows)
|
|
86
|
+
if (!declaredWorkflows.has(workflow))
|
|
87
|
+
blockers.push(`undeclared_workflow:${workflow}`);
|
|
88
|
+
const declaredConfiguration = new Set(registered.configuration.map((value) => value.name));
|
|
89
|
+
for (const name of plan.configuration)
|
|
90
|
+
if (!declaredConfiguration.has(name))
|
|
91
|
+
blockers.push(`undeclared_configuration:${name}`);
|
|
92
|
+
const declaredSecrets = new Set(registered.secrets.map((value) => value.name));
|
|
93
|
+
for (const name of plan.secrets)
|
|
94
|
+
if (!declaredSecrets.has(name))
|
|
95
|
+
blockers.push(`undeclared_secret:${name}`);
|
|
96
|
+
for (const rule of policy) {
|
|
97
|
+
if (rule.claim === "payment.authority") {
|
|
98
|
+
if (!plan.module.models.some((value) => value.ownership === "external-authoritative"))
|
|
99
|
+
blockers.push("external_authority_not_module_authoritative");
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const claim = rule.claim === "module.owner"
|
|
103
|
+
? plan.module.placement.owner_claim
|
|
104
|
+
: rule.claim;
|
|
105
|
+
const inference = understanding.inferences.find((value) => value.claim === claim);
|
|
106
|
+
if (!inference ||
|
|
107
|
+
!inference.evidence.length ||
|
|
108
|
+
inference.confidence < rule.minimum_confidence ||
|
|
109
|
+
!rule.allowed_authority.includes(inference.authority))
|
|
110
|
+
blockers.push(`${claim}_confidence`);
|
|
111
|
+
}
|
|
112
|
+
if (plan.secrets.some((value) => /[=:]|sk_live|sk_test|whsec_/i.test(value)))
|
|
113
|
+
blockers.push("secret_value_in_plan");
|
|
114
|
+
for (const relationship of plan.relationships)
|
|
115
|
+
if (!relationship.includes(" -> "))
|
|
116
|
+
blockers.push(`invalid_relationship:${relationship}`);
|
|
117
|
+
return [...new Set(blockers)];
|
|
118
|
+
}
|
|
119
|
+
function canonicalPlan(intent, implementation, understanding) {
|
|
120
|
+
const artifacts = implementation.module.source_artifacts.map((value) => ({
|
|
121
|
+
path: value.path,
|
|
122
|
+
operation: (implementation.alreadyInstalled ? "modify" : "add"),
|
|
123
|
+
role: value.role,
|
|
124
|
+
}));
|
|
125
|
+
return {
|
|
126
|
+
intent: { ...intent },
|
|
127
|
+
module: implementation.module,
|
|
128
|
+
already_installed: implementation.alreadyInstalled,
|
|
129
|
+
state_changes: implementation.applicationModels,
|
|
130
|
+
relationships: implementation.relationships,
|
|
131
|
+
events: implementation.events,
|
|
132
|
+
workflows: implementation.workflows,
|
|
133
|
+
capabilities: implementation.capabilities,
|
|
134
|
+
authorization: implementation.authorization,
|
|
135
|
+
configuration: implementation.configuration,
|
|
136
|
+
secrets: implementation.secrets,
|
|
137
|
+
dependencies: implementation.dependencies,
|
|
138
|
+
ownership: {
|
|
139
|
+
[implementation.primaryApplicationModel]: implementation.owner,
|
|
140
|
+
},
|
|
141
|
+
assumptions: understanding.assumptions,
|
|
142
|
+
evidence: understanding.evidence.map((value) => value.id),
|
|
143
|
+
source_plan: {
|
|
144
|
+
files: [
|
|
145
|
+
{
|
|
146
|
+
path: "feltdb.flow",
|
|
147
|
+
operation: "modify",
|
|
148
|
+
role: "application-contract",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
path: "src/feltdb/generated-contract.ts",
|
|
152
|
+
operation: "modify",
|
|
153
|
+
role: "generated-contract",
|
|
154
|
+
},
|
|
155
|
+
...artifacts,
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
warnings: implementation.warnings,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export class IntentService {
|
|
162
|
+
store;
|
|
163
|
+
context;
|
|
164
|
+
proposals;
|
|
165
|
+
observations;
|
|
166
|
+
constructor(store, context, proposals, observations) {
|
|
167
|
+
this.store = store;
|
|
168
|
+
this.context = context;
|
|
169
|
+
this.proposals = proposals;
|
|
170
|
+
this.observations = observations;
|
|
171
|
+
}
|
|
172
|
+
async execute(rawRequest, actor = "developer") {
|
|
173
|
+
const context = await this.context();
|
|
174
|
+
const prior = await this.store.list(FELTDB_INTENT_COLLECTION);
|
|
175
|
+
const proposalHistory = await this.proposals.list();
|
|
176
|
+
let resolvedModule;
|
|
177
|
+
try {
|
|
178
|
+
resolvedModule = resolveModuleIntent(rawRequest);
|
|
179
|
+
}
|
|
180
|
+
catch { }
|
|
181
|
+
const parentProposal = resolvedModule
|
|
182
|
+
? proposalHistory
|
|
183
|
+
.filter((value) => value.metadata.module === resolvedModule.module &&
|
|
184
|
+
value.status === "applied")
|
|
185
|
+
.at(-1)
|
|
186
|
+
: undefined;
|
|
187
|
+
const parentIntent = parentProposal
|
|
188
|
+
? prior.find((value) => value.id === parentProposal.metadata.intent_id)
|
|
189
|
+
: undefined;
|
|
190
|
+
const intent = resolveIntent(rawRequest, {
|
|
191
|
+
snapshot: context.snapshot,
|
|
192
|
+
flowHash: await flowSourceHash(context.source),
|
|
193
|
+
parentIntentId: parentIntent?.id,
|
|
194
|
+
});
|
|
195
|
+
await this.store.create(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
196
|
+
await this.event(intent, "received");
|
|
197
|
+
if (intent.ambiguities.length) {
|
|
198
|
+
await this.event(intent, "blocked");
|
|
199
|
+
return {
|
|
200
|
+
intent,
|
|
201
|
+
blockers: intent.ambiguities.map((value) => value.code),
|
|
202
|
+
warnings: [],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const moduleIntent = resolveModuleIntent(rawRequest);
|
|
206
|
+
const convergence = await this.store.list("_feltdb.Convergence");
|
|
207
|
+
const convergenceEvidence = convergence
|
|
208
|
+
.filter((value) => value.proposal_id === parentProposal?.id)
|
|
209
|
+
.slice(-5)
|
|
210
|
+
.flatMap((value) => (value.findings ?? [])
|
|
211
|
+
.slice(0, 20)
|
|
212
|
+
.map((finding) => ({
|
|
213
|
+
source: "proposal_history",
|
|
214
|
+
claim: `convergence.${finding.claim}`,
|
|
215
|
+
value: finding.status,
|
|
216
|
+
source_ref: `proposal:${value.proposal_id}`,
|
|
217
|
+
})));
|
|
218
|
+
const observed = [
|
|
219
|
+
...(context.observations ?? []),
|
|
220
|
+
...((await this.observations?.()) ?? []),
|
|
221
|
+
...convergenceEvidence,
|
|
222
|
+
];
|
|
223
|
+
let generated;
|
|
224
|
+
try {
|
|
225
|
+
generated = await createModuleImplementationProposal({
|
|
226
|
+
intent: rawRequest,
|
|
227
|
+
snapshot: context.snapshot,
|
|
228
|
+
currentFlow: context.source,
|
|
229
|
+
observations: observed,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
234
|
+
intent.status = "blocked";
|
|
235
|
+
intent.ambiguities.push({
|
|
236
|
+
code: message.startsWith("CLARIFICATION_REQUIRED")
|
|
237
|
+
? "clarification_required"
|
|
238
|
+
: "requires_selection",
|
|
239
|
+
message,
|
|
240
|
+
candidates: [],
|
|
241
|
+
});
|
|
242
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
243
|
+
await this.event(intent, "blocked", { reason: message });
|
|
244
|
+
return { intent, blockers: [message], warnings: [] };
|
|
245
|
+
}
|
|
246
|
+
const understanding = generated.understanding;
|
|
247
|
+
intent.status = "understanding";
|
|
248
|
+
intent.understanding = understanding;
|
|
249
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
250
|
+
await this.event(intent, "understanding");
|
|
251
|
+
const plan = canonicalPlan(intent, generated.implementation, understanding);
|
|
252
|
+
intent.plan = plan;
|
|
253
|
+
const blockers = validateImplementationPlan(plan, understanding);
|
|
254
|
+
if (blockers.length) {
|
|
255
|
+
intent.status = "blocked";
|
|
256
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
257
|
+
await this.event(intent, "blocked");
|
|
258
|
+
return { intent, understanding, plan, blockers, warnings: plan.warnings };
|
|
259
|
+
}
|
|
260
|
+
const diff = diffFlowSpec(parseFlowSpec(context.source), parseFlowSpec(generated.proposedFlow));
|
|
261
|
+
if (plan.already_installed &&
|
|
262
|
+
diff.added.length === 0 &&
|
|
263
|
+
diff.removed.length === 0 &&
|
|
264
|
+
diff.changed.length === 0) {
|
|
265
|
+
intent.status = "completed";
|
|
266
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
267
|
+
await this.event(intent, "completed", { result: "already_converged" });
|
|
268
|
+
return {
|
|
269
|
+
intent,
|
|
270
|
+
understanding,
|
|
271
|
+
plan,
|
|
272
|
+
blockers: [],
|
|
273
|
+
warnings: [
|
|
274
|
+
"The requested module is already installed and converged. No proposal created.",
|
|
275
|
+
],
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
intent.status = "planning";
|
|
279
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
280
|
+
await this.event(intent, "planning");
|
|
281
|
+
let proposal = await this.proposals.create({
|
|
282
|
+
application_id: intent.application_id,
|
|
283
|
+
environment: intent.environment,
|
|
284
|
+
base_contract_hash: generated.baseContractHash,
|
|
285
|
+
base_flow_hash: generated.baseFlowHash,
|
|
286
|
+
proposed_flow: generated.proposedFlow,
|
|
287
|
+
summary: generated.summary,
|
|
288
|
+
warnings: generated.warnings,
|
|
289
|
+
actor,
|
|
290
|
+
metadata: {
|
|
291
|
+
created_from: "intent-engine",
|
|
292
|
+
intent_id: intent.id,
|
|
293
|
+
module: moduleIntent.module,
|
|
294
|
+
module_version: moduleIntent.version,
|
|
295
|
+
},
|
|
296
|
+
parent_proposal_id: parentProposal?.id,
|
|
297
|
+
understanding,
|
|
298
|
+
contract_diff: generated.changes,
|
|
299
|
+
source_plan: plan.source_plan,
|
|
300
|
+
});
|
|
301
|
+
await this.proposals.validate(proposal.id, "feltdb-validator");
|
|
302
|
+
const preview = await this.proposals.preview(proposal.id, actor);
|
|
303
|
+
proposal = preview.proposal;
|
|
304
|
+
intent.status = "proposal_created";
|
|
305
|
+
intent.proposal_id = proposal.id;
|
|
306
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
307
|
+
await this.event(intent, "proposal_created", { proposal_id: proposal.id });
|
|
308
|
+
intent.status = "completed";
|
|
309
|
+
await this.store.replace(FELTDB_INTENT_COLLECTION, intent.id, intent);
|
|
310
|
+
await this.event(intent, "completed");
|
|
311
|
+
return {
|
|
312
|
+
intent,
|
|
313
|
+
understanding,
|
|
314
|
+
plan,
|
|
315
|
+
proposal,
|
|
316
|
+
preview,
|
|
317
|
+
blockers: [],
|
|
318
|
+
warnings: plan.warnings,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
async list() {
|
|
322
|
+
return this.store.list(FELTDB_INTENT_COLLECTION);
|
|
323
|
+
}
|
|
324
|
+
async get(id) {
|
|
325
|
+
const value = await this.store.get(FELTDB_INTENT_COLLECTION, id);
|
|
326
|
+
if (!value)
|
|
327
|
+
throw new Error("INTENT_NOT_FOUND");
|
|
328
|
+
return value;
|
|
329
|
+
}
|
|
330
|
+
async history(id) {
|
|
331
|
+
return (await this.store.list(FELTDB_INTENT_EVENT_COLLECTION)).filter((value) => value.intent_id === id);
|
|
332
|
+
}
|
|
333
|
+
async event(intent, status, metadata = {}) {
|
|
334
|
+
const value = {
|
|
335
|
+
id: `ie_${crypto.randomUUID().replaceAll("-", "")}`,
|
|
336
|
+
intent_id: intent.id,
|
|
337
|
+
status,
|
|
338
|
+
created_at: new Date().toISOString(),
|
|
339
|
+
metadata,
|
|
340
|
+
};
|
|
341
|
+
await this.store.create(FELTDB_INTENT_EVENT_COLLECTION, value.id, value);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { FeltDBContractSnapshot, FeltDBFlowProposal } from "./application-development.js";
|
|
2
|
+
import { type FeltDBModuleDefinition, type FeltDBModuleOwnership } from "./module.js";
|
|
3
|
+
import { type ApplicationUnderstanding, type ObservedEvidenceInput } from "./application-understanding.js";
|
|
4
|
+
export interface ModuleIntent {
|
|
5
|
+
action: "implement" | "extend";
|
|
6
|
+
module: string;
|
|
7
|
+
provider: string;
|
|
8
|
+
version: string;
|
|
9
|
+
original: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ModuleImplementationPlan {
|
|
12
|
+
intent: ModuleIntent;
|
|
13
|
+
module: FeltDBModuleDefinition;
|
|
14
|
+
alreadyInstalled: boolean;
|
|
15
|
+
owner: string;
|
|
16
|
+
ownerClaim: string;
|
|
17
|
+
primaryApplicationModel: string;
|
|
18
|
+
applicationModels: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
ownership: FeltDBModuleOwnership;
|
|
21
|
+
purpose: string;
|
|
22
|
+
fields: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
optional?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
relationships: string[];
|
|
29
|
+
events: string[];
|
|
30
|
+
workflows: string[];
|
|
31
|
+
capabilities: string[];
|
|
32
|
+
authorization: FeltDBModuleDefinition["authorization"];
|
|
33
|
+
configuration: string[];
|
|
34
|
+
secrets: string[];
|
|
35
|
+
dependencies: Array<{
|
|
36
|
+
name: string;
|
|
37
|
+
status: "satisfied" | "missing";
|
|
38
|
+
evidence: string[];
|
|
39
|
+
}>;
|
|
40
|
+
stateFlow: string[];
|
|
41
|
+
warnings: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare function resolveModuleIntent(value: string): ModuleIntent | undefined;
|
|
44
|
+
export declare function planModuleImplementation(intent: ModuleIntent, snapshot: FeltDBContractSnapshot, currentFlow: string, understanding: ApplicationUnderstanding): ModuleImplementationPlan;
|
|
45
|
+
export declare function createModuleImplementationProposal(input: {
|
|
46
|
+
intent: string;
|
|
47
|
+
snapshot: FeltDBContractSnapshot;
|
|
48
|
+
currentFlow: string;
|
|
49
|
+
observations?: ObservedEvidenceInput[];
|
|
50
|
+
}): Promise<FeltDBFlowProposal>;
|
|
51
|
+
//# sourceMappingURL=module-intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-intent.d.ts","sourceRoot":"","sources":["../src/module-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,KAAK,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,qBAAqB,CAAC;QACjC,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;KACnE,CAAC,CAAC;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM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