@aexol/spectral 0.9.221 → 0.9.222
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/dist/agent/index.d.ts +7 -3
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +35 -8
- package/dist/extensions/aexol-backend-client.d.ts +85 -0
- package/dist/extensions/aexol-backend-client.d.ts.map +1 -0
- package/dist/extensions/aexol-backend-client.js +159 -0
- package/dist/extensions/aexol-mcp.d.ts +10 -6
- package/dist/extensions/aexol-mcp.d.ts.map +1 -1
- package/dist/extensions/aexol-mcp.js +21 -106
- package/dist/extensions/logic-trace-backend-draft.d.ts +68 -0
- package/dist/extensions/logic-trace-backend-draft.d.ts.map +1 -0
- package/dist/extensions/logic-trace-backend-draft.js +171 -0
- package/dist/extensions/logic-trace-validate.d.ts +33 -0
- package/dist/extensions/logic-trace-validate.d.ts.map +1 -0
- package/dist/extensions/logic-trace-validate.js +73 -0
- package/dist/extensions/logic-trace.d.ts +213 -0
- package/dist/extensions/logic-trace.d.ts.map +1 -0
- package/dist/extensions/logic-trace.js +1098 -0
- package/dist/generated/parser/lexer.d.ts +148 -0
- package/dist/generated/parser/lexer.d.ts.map +1 -0
- package/dist/generated/parser/lexer.js +877 -0
- package/dist/generated/parser/mod.d.ts +26 -0
- package/dist/generated/parser/mod.d.ts.map +1 -0
- package/dist/generated/parser/mod.js +30 -0
- package/dist/generated/parser/parser.d.ts +161 -0
- package/dist/generated/parser/parser.d.ts.map +1 -0
- package/dist/generated/parser/parser.js +754 -0
- package/dist/generated/parser/tokenizer.d.ts +107 -0
- package/dist/generated/parser/tokenizer.d.ts.map +1 -0
- package/dist/generated/parser/tokenizer.js +202 -0
- package/dist/generated/parser/validator.d.ts +45 -0
- package/dist/generated/parser/validator.d.ts.map +1 -0
- package/dist/generated/parser/validator.js +202 -0
- package/dist/generated/zeus/const.d.ts.map +1 -1
- package/dist/generated/zeus/const.js +4 -170
- package/dist/generated/zeus/index.d.ts +8 -873
- package/dist/generated/zeus/index.d.ts.map +1 -1
- package/dist/generated/zeus/index.js +0 -7
- package/dist/mcp/ui-stream-types.d.ts +2 -2
- package/dist/memory/tools/share-project-observation.js +1 -1
- package/dist/memory/tools/write-project-observation.d.ts.map +1 -1
- package/dist/memory/tools/write-project-observation.js +4 -3
- package/dist/sdk/agent-core/harness/types.d.ts +0 -1
- package/dist/sdk/agent-core/harness/types.d.ts.map +1 -1
- package/dist/sdk/agent-core/index.d.ts +0 -8
- package/dist/sdk/agent-core/index.d.ts.map +1 -1
- package/dist/sdk/agent-core/index.js +0 -9
- package/dist/sdk/coding-agent/core/extensions/index.d.ts +1 -1
- package/dist/sdk/coding-agent/core/extensions/index.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/native-extensions.js +2 -2
- package/dist/sdk/coding-agent/core/extensions/types.d.ts +20 -1
- package/dist/sdk/coding-agent/core/extensions/types.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/tools/tool-definition-wrapper.d.ts +9 -4
- package/dist/sdk/coding-agent/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/tools/tool-definition-wrapper.js +15 -2
- package/dist/sdk/coding-agent/index.d.ts +1 -1
- package/dist/sdk/coding-agent/index.d.ts.map +1 -1
- package/dist/server/agent-bridge/headless-ui.d.ts +20 -0
- package/dist/server/agent-bridge/headless-ui.d.ts.map +1 -0
- package/dist/server/agent-bridge/headless-ui.js +85 -0
- package/dist/server/agent-bridge/pricing.d.ts +37 -0
- package/dist/server/agent-bridge/pricing.d.ts.map +1 -0
- package/dist/server/agent-bridge/pricing.js +202 -0
- package/dist/server/agent-bridge/rehydrate.d.ts +35 -0
- package/dist/server/agent-bridge/rehydrate.d.ts.map +1 -0
- package/dist/server/agent-bridge/rehydrate.js +122 -0
- package/dist/server/agent-bridge/synthetic-model.d.ts +27 -0
- package/dist/server/agent-bridge/synthetic-model.d.ts.map +1 -0
- package/dist/server/agent-bridge/synthetic-model.js +92 -0
- package/dist/server/agent-bridge.d.ts +11 -1
- package/dist/server/agent-bridge.d.ts.map +1 -1
- package/dist/server/agent-bridge.js +42 -481
- package/dist/server/session-stream/compaction-events.d.ts +13 -0
- package/dist/server/session-stream/compaction-events.d.ts.map +1 -0
- package/dist/server/session-stream/compaction-events.js +32 -0
- package/dist/server/session-stream/history-prune.d.ts +35 -0
- package/dist/server/session-stream/history-prune.d.ts.map +1 -0
- package/dist/server/session-stream/history-prune.js +182 -0
- package/dist/server/session-stream/memory.d.ts +48 -0
- package/dist/server/session-stream/memory.d.ts.map +1 -0
- package/dist/server/session-stream/memory.js +136 -0
- package/dist/server/session-stream/replay-tail.d.ts +4 -0
- package/dist/server/session-stream/replay-tail.d.ts.map +1 -0
- package/dist/server/session-stream/replay-tail.js +39 -0
- package/dist/server/session-stream/turn-events.d.ts +33 -0
- package/dist/server/session-stream/turn-events.d.ts.map +1 -0
- package/dist/server/session-stream/turn-events.js +65 -0
- package/dist/server/session-stream/turn-silence.d.ts +8 -0
- package/dist/server/session-stream/turn-silence.d.ts.map +1 -0
- package/dist/server/session-stream/turn-silence.js +72 -0
- package/dist/server/session-stream.d.ts +137 -36
- package/dist/server/session-stream.d.ts.map +1 -1
- package/dist/server/session-stream.js +18 -509
- package/dist/server/storage/observation-ranking.d.ts +14 -0
- package/dist/server/storage/observation-ranking.d.ts.map +1 -0
- package/dist/server/storage/observation-ranking.js +37 -0
- package/dist/server/storage/preflight.d.ts +20 -0
- package/dist/server/storage/preflight.d.ts.map +1 -0
- package/dist/server/storage/preflight.js +22 -0
- package/dist/server/storage/project-binding.d.ts +5 -0
- package/dist/server/storage/project-binding.d.ts.map +1 -0
- package/dist/server/storage/project-binding.js +32 -0
- package/dist/server/storage/rows.d.ts +104 -0
- package/dist/server/storage/rows.d.ts.map +1 -0
- package/dist/server/storage/rows.js +2 -0
- package/dist/server/storage/schema.d.ts +20 -0
- package/dist/server/storage/schema.d.ts.map +1 -0
- package/dist/server/storage/schema.js +134 -0
- package/dist/server/storage/types.d.ts +66 -0
- package/dist/server/storage/types.d.ts.map +1 -0
- package/dist/server/storage/types.js +1 -0
- package/dist/server/storage.d.ts +7 -94
- package/dist/server/storage.d.ts.map +1 -1
- package/dist/server/storage.js +6 -224
- package/dist/server/wire.d.ts +6 -0
- package/dist/server/wire.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/sdk/agent-core/harness/agent-harness.d.ts +0 -92
- package/dist/sdk/agent-core/harness/agent-harness.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/agent-harness.js +0 -899
- package/dist/sdk/agent-core/harness/env/nodejs.d.ts +0 -51
- package/dist/sdk/agent-core/harness/env/nodejs.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/env/nodejs.js +0 -485
- package/dist/sdk/agent-core/harness/prompt-templates.d.ts +0 -48
- package/dist/sdk/agent-core/harness/prompt-templates.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/prompt-templates.js +0 -229
- package/dist/sdk/agent-core/harness/session/jsonl-repo.d.ts +0 -26
- package/dist/sdk/agent-core/harness/session/jsonl-repo.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/session/jsonl-repo.js +0 -100
- package/dist/sdk/agent-core/harness/session/jsonl-storage.d.ts +0 -33
- package/dist/sdk/agent-core/harness/session/jsonl-storage.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/session/jsonl-storage.js +0 -230
- package/dist/sdk/agent-core/harness/session/memory-repo.d.ts +0 -18
- package/dist/sdk/agent-core/harness/session/memory-repo.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/session/memory-repo.js +0 -41
- package/dist/sdk/agent-core/harness/session/memory-storage.d.ts +0 -25
- package/dist/sdk/agent-core/harness/session/memory-storage.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/session/memory-storage.js +0 -113
- package/dist/sdk/agent-core/harness/session/repo-utils.d.ts +0 -11
- package/dist/sdk/agent-core/harness/session/repo-utils.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/session/repo-utils.js +0 -38
- package/dist/sdk/agent-core/harness/skills.d.ts +0 -44
- package/dist/sdk/agent-core/harness/skills.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/skills.js +0 -310
- package/dist/sdk/agent-core/harness/utils/shell-output.d.ts +0 -14
- package/dist/sdk/agent-core/harness/utils/shell-output.d.ts.map +0 -1
- package/dist/sdk/agent-core/harness/utils/shell-output.js +0 -125
- package/dist/sdk/agent-core/node.d.ts +0 -3
- package/dist/sdk/agent-core/node.d.ts.map +0 -1
- package/dist/sdk/agent-core/node.js +0 -2
- package/dist/sdk/agent-core/proxy.d.ts +0 -69
- package/dist/sdk/agent-core/proxy.d.ts.map +0 -1
- package/dist/sdk/agent-core/proxy.js +0 -297
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend refine draft adapter for the logic-trace extension.
|
|
3
|
+
*
|
|
4
|
+
* Implements the `LogicTraceDraftRunner` seam (see logic-trace.ts) on top of
|
|
5
|
+
* the backend from/refine pipeline instead of the local LLM agent loop:
|
|
6
|
+
* 1. `remote_refine_aexol_content` — submits the CURRENT remote logic.aexol
|
|
7
|
+
* content plus a compressed merge instruction prompt (full-spec rewrite,
|
|
8
|
+
* "merge, never append-only", grammar + leak rules) and the serialized
|
|
9
|
+
* recent-activity delta. Answers `{ ok, task: { id, status } }`. The
|
|
10
|
+
* session model is intentionally NOT sent — the backend resolves the
|
|
11
|
+
* team's default model.
|
|
12
|
+
* 2. `remote_get_from_task` — polled locally (NOT via remote_wait_task,
|
|
13
|
+
* whose internal wait exceeds the MCP client's 30s fetch abort) until a
|
|
14
|
+
* terminal status or the configured timeout. Answers
|
|
15
|
+
* `{ ok, task: { id, status, aexolCode, … } }`.
|
|
16
|
+
* 3. COMPLETED with an `aexolCode` → `{ submitted: { content, changed } }`
|
|
17
|
+
* where `changed` is a plain string comparison against the current
|
|
18
|
+
* remote content.
|
|
19
|
+
* 4. Anything else (FAILED / CANCELLED / poll timeout / missing content /
|
|
20
|
+
* any error) → `{}` — the empty outcome is the seam's fallback signal
|
|
21
|
+
* and attemptLogicTraceSync retries with the local draft runner. The
|
|
22
|
+
* adapter NEVER throws past the seam.
|
|
23
|
+
*
|
|
24
|
+
* This file only adapts the draft STEP; the downstream sanitize → parser
|
|
25
|
+
* gate → hash dedupe → push flow stays in logic-trace.ts untouched.
|
|
26
|
+
*/
|
|
27
|
+
import { LOGIC_TRACE_LEAK_RULES } from "./logic-trace.js";
|
|
28
|
+
const LOGIC_TRACE_DEBUG_ENV = "PI_LOGIC_TRACE_DEBUG";
|
|
29
|
+
/** Default cadence between `remote_get_from_task` polls. */
|
|
30
|
+
export const DEFAULT_DRAFT_BACKEND_POLL_INTERVAL_MS = 2_000;
|
|
31
|
+
/** Default total wait for a refine task to reach a terminal status. */
|
|
32
|
+
export const DEFAULT_DRAFT_BACKEND_POLL_TIMEOUT_MS = 120_000;
|
|
33
|
+
function debugEnabled() {
|
|
34
|
+
const v = process.env[LOGIC_TRACE_DEBUG_ENV]?.trim().toLowerCase();
|
|
35
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
36
|
+
}
|
|
37
|
+
function debug(line, extra) {
|
|
38
|
+
if (!debugEnabled())
|
|
39
|
+
return;
|
|
40
|
+
process.stderr.write(`[logic-trace-backend-draft] ${line}${extra !== undefined ? ` ${JSON.stringify(extra)}` : ""}\n`);
|
|
41
|
+
}
|
|
42
|
+
function firstJson(content) {
|
|
43
|
+
const first = content[0];
|
|
44
|
+
return first && typeof first.json === "object" && first.json !== null
|
|
45
|
+
? first.json
|
|
46
|
+
: undefined;
|
|
47
|
+
}
|
|
48
|
+
const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
49
|
+
const MERGE_INSTRUCTIONS = `Update the ONE logic.aexol file given below: it is the project's single business-logic spec (domain types, enums, roles, workflows, agents). Return the COMPLETE updated file as aexolCode — a full-spec rewrite, never a diff, patch or changelog.
|
|
50
|
+
- "Merge, never append-only": extend or reorganize the existing types/enums/roles/workflows/agents with the new facts; do not duplicate definitions that already exist.
|
|
51
|
+
- The returned aexolCode MUST parse with the Aexol parser; keep the file compact and grammar-valid.
|
|
52
|
+
- Keep existing correct definitions; remove one only when it is clearly superseded by the new information.
|
|
53
|
+
- Do not invent facts beyond the recent activity below.`;
|
|
54
|
+
function buildRefinementPrompt(delta, promptRules) {
|
|
55
|
+
return [
|
|
56
|
+
MERGE_INSTRUCTIONS,
|
|
57
|
+
// Shared leak rules — the same bullet list LOGIC_TRACE_SYSTEM carries,
|
|
58
|
+
// defined once in logic-trace.ts. Read lazily (function scope): the
|
|
59
|
+
// logic-trace ↔ backend-draft import cycle makes top-level access a TDZ
|
|
60
|
+
// hazard.
|
|
61
|
+
LOGIC_TRACE_LEAK_RULES,
|
|
62
|
+
promptRules ? `\n${promptRules}` : "",
|
|
63
|
+
`\nRECENT AGENT ACTIVITY:\n${delta}`,
|
|
64
|
+
].join("\n");
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Build a `LogicTraceDraftRunner` that delegates the .aexol draft step to the
|
|
68
|
+
* backend from/refine pipeline. See the module doc for the outcome contract.
|
|
69
|
+
*/
|
|
70
|
+
export function createBackendRefineDraftRunner(options) {
|
|
71
|
+
const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_DRAFT_BACKEND_POLL_INTERVAL_MS;
|
|
72
|
+
const pollTimeoutMs = options.pollTimeoutMs ?? DEFAULT_DRAFT_BACKEND_POLL_TIMEOUT_MS;
|
|
73
|
+
const sleep = options.sleep ?? defaultSleep;
|
|
74
|
+
return async (input) => {
|
|
75
|
+
try {
|
|
76
|
+
const currentContent = input.currentContent;
|
|
77
|
+
// Without current remote content there is nothing to refine — the
|
|
78
|
+
// local runner owns authoring a starting spec (starter template).
|
|
79
|
+
if (typeof currentContent !== "string" || !currentContent.trim()) {
|
|
80
|
+
debug("no current remote content → fallback signal");
|
|
81
|
+
return {};
|
|
82
|
+
}
|
|
83
|
+
if (input.signal?.aborted) {
|
|
84
|
+
debug("aborted before refine call");
|
|
85
|
+
return {};
|
|
86
|
+
}
|
|
87
|
+
const refinementPrompt = buildRefinementPrompt(input.delta, options.promptRules);
|
|
88
|
+
const teamArg = options.teamId ? { teamId: options.teamId } : {};
|
|
89
|
+
const started = await options.client.callTool("remote_refine_aexol_content", {
|
|
90
|
+
aexolContent: currentContent,
|
|
91
|
+
refinementPrompt,
|
|
92
|
+
projectId: options.projectId,
|
|
93
|
+
...teamArg,
|
|
94
|
+
...(options.guidance !== undefined ? { guidance: options.guidance } : {}),
|
|
95
|
+
...(options.maxRetries !== undefined ? { maxRetries: options.maxRetries } : {}),
|
|
96
|
+
});
|
|
97
|
+
if (started.isError) {
|
|
98
|
+
debug("remote_refine_aexol_content reported an error → fallback signal");
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
101
|
+
const json = firstJson(started.content);
|
|
102
|
+
// Real wire shape: { ok, task: { id, status } }. `?? json` tolerates a
|
|
103
|
+
// legacy flat { id, status } payload — the same both-shapes unwrap as
|
|
104
|
+
// extractCreatedFileId in logic-trace.ts (json.id ?? json.file.id).
|
|
105
|
+
// A missing/undefined task collapses to {} → no id → the fallback
|
|
106
|
+
// signal below.
|
|
107
|
+
const task = (json?.task ?? json ?? {});
|
|
108
|
+
const taskId = typeof task.id === "string" ? task.id : undefined;
|
|
109
|
+
if (!taskId) {
|
|
110
|
+
debug("refine returned no task id → fallback signal", { task });
|
|
111
|
+
return {};
|
|
112
|
+
}
|
|
113
|
+
// Poll locally to a terminal status (remote_wait_task's internal wait
|
|
114
|
+
// would exceed the client's 30s fetch abort — do not use it).
|
|
115
|
+
const deadline = Date.now() + pollTimeoutMs;
|
|
116
|
+
for (;;) {
|
|
117
|
+
let res;
|
|
118
|
+
try {
|
|
119
|
+
res = await options.client.callTool("remote_get_from_task", { taskId });
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
debug("remote_get_from_task threw → fallback signal", {
|
|
123
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
124
|
+
});
|
|
125
|
+
return {};
|
|
126
|
+
}
|
|
127
|
+
if (res.isError) {
|
|
128
|
+
debug("remote_get_from_task reported an error (task failed?) → fallback signal");
|
|
129
|
+
return {};
|
|
130
|
+
}
|
|
131
|
+
const pollJson = firstJson(res.content);
|
|
132
|
+
// Same nested unwrap as the refine response: the real backend
|
|
133
|
+
// answers { ok, task: { id, status, aexolCode, … } }.
|
|
134
|
+
const poll = (pollJson?.task ?? pollJson ?? {});
|
|
135
|
+
const status = typeof poll.status === "string" ? poll.status.toUpperCase() : "";
|
|
136
|
+
if (status === "COMPLETED") {
|
|
137
|
+
const code = typeof poll.aexolCode === "string" ? poll.aexolCode : undefined;
|
|
138
|
+
if (!code || !code.trim()) {
|
|
139
|
+
debug("task COMPLETED without aexolCode → fallback signal");
|
|
140
|
+
return {};
|
|
141
|
+
}
|
|
142
|
+
const changed = code !== currentContent;
|
|
143
|
+
debug("backend refine task completed", { taskId, changed });
|
|
144
|
+
return { submitted: { content: code, changed } };
|
|
145
|
+
}
|
|
146
|
+
if (status === "FAILED" || status === "CANCELLED") {
|
|
147
|
+
debug("backend refine task terminal failure → fallback signal", { status });
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
if (Date.now() >= deadline) {
|
|
151
|
+
debug("backend refine poll timeout → fallback signal", { pollTimeoutMs });
|
|
152
|
+
return {};
|
|
153
|
+
}
|
|
154
|
+
await sleep(pollIntervalMs);
|
|
155
|
+
if (input.signal?.aborted) {
|
|
156
|
+
debug("aborted while polling → fallback signal");
|
|
157
|
+
return {};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
// Never throw past the draftRunner seam: any unexpected error is the
|
|
163
|
+
// empty outcome, which attemptLogicTraceSync turns into the local
|
|
164
|
+
// draft fallback.
|
|
165
|
+
debug("backend draft failed → fallback signal", {
|
|
166
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
167
|
+
});
|
|
168
|
+
return {};
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser-backed validity gate for the ONE cloud `logic.aexol` file.
|
|
3
|
+
*
|
|
4
|
+
* The logic-trace extension (see `logic-trace.ts`) maintains a remote
|
|
5
|
+
* `logic.aexol` mirror of the project's business logic. Every path that can
|
|
6
|
+
* write that file — the draft LLM's `submit_logic_trace` tool, the automatic
|
|
7
|
+
* sync engine, and the manual `remote_logic_trace_write` tool — funnels
|
|
8
|
+
* through this gate, so the remote file can never hold content the Aexol
|
|
9
|
+
* parser rejects.
|
|
10
|
+
*
|
|
11
|
+
* The parser itself lives in `src/generated/parser/` (vendored verbatim from
|
|
12
|
+
* `packages/parser/` by `scripts/vendor-parser.mjs`) so this module stays a
|
|
13
|
+
* static, dependency-free import that works in packaged checkouts too.
|
|
14
|
+
*/
|
|
15
|
+
export interface SpecParseDiagnostics {
|
|
16
|
+
/** true only when the spec parses AND the validator reports zero errors. */
|
|
17
|
+
ok: boolean;
|
|
18
|
+
/** Readable "line N: message" strings for every blocking problem. */
|
|
19
|
+
errors: string[];
|
|
20
|
+
/** Readable strings for non-blocking / best-practice advisories. */
|
|
21
|
+
warnings: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse `content` and run the semantic validator. Never throws — parser
|
|
25
|
+
* failures become `errors` entries and `ok: false` diagnostics.
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateLogicTraceSpec(content: string): SpecParseDiagnostics;
|
|
28
|
+
/**
|
|
29
|
+
* Render diagnostics as one newline-joined block (empty string when nothing
|
|
30
|
+
* to report) ready to be appended to a tool-result error message.
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatSpecErrors(result: SpecParseDiagnostics): string;
|
|
33
|
+
//# sourceMappingURL=logic-trace-validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic-trace-validate.d.ts","sourceRoot":"","sources":["../../src/extensions/logic-trace-validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,MAAM,WAAW,oBAAoB;IACpC,4EAA4E;IAC5E,EAAE,EAAE,OAAO,CAAC;IACZ,qEAAqE;IACrE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAyBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,CAiB5E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAKrE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser-backed validity gate for the ONE cloud `logic.aexol` file.
|
|
3
|
+
*
|
|
4
|
+
* The logic-trace extension (see `logic-trace.ts`) maintains a remote
|
|
5
|
+
* `logic.aexol` mirror of the project's business logic. Every path that can
|
|
6
|
+
* write that file — the draft LLM's `submit_logic_trace` tool, the automatic
|
|
7
|
+
* sync engine, and the manual `remote_logic_trace_write` tool — funnels
|
|
8
|
+
* through this gate, so the remote file can never hold content the Aexol
|
|
9
|
+
* parser rejects.
|
|
10
|
+
*
|
|
11
|
+
* The parser itself lives in `src/generated/parser/` (vendored verbatim from
|
|
12
|
+
* `packages/parser/` by `scripts/vendor-parser.mjs`) so this module stays a
|
|
13
|
+
* static, dependency-free import that works in packaged checkouts too.
|
|
14
|
+
*/
|
|
15
|
+
import { Validator, parseAexol, } from "../generated/parser/mod.js";
|
|
16
|
+
/** Extract the "at line N[:M]" line number a SyntaxError message carries. */
|
|
17
|
+
function lineOfParseFailure(err) {
|
|
18
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
19
|
+
const match = message.match(/at line (\d+)/);
|
|
20
|
+
return match ? Number(match[1]) : undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Format a thrown parse failure as "line N: <message>" when the message
|
|
24
|
+
* carries line information, otherwise as the bare message.
|
|
25
|
+
*/
|
|
26
|
+
function describeParseFailure(err) {
|
|
27
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
28
|
+
const line = lineOfParseFailure(err);
|
|
29
|
+
if (line === undefined)
|
|
30
|
+
return message;
|
|
31
|
+
return `line ${line}: ${message}`;
|
|
32
|
+
}
|
|
33
|
+
/** Format a validator issue as "line N: message" (nodes always carry a line). */
|
|
34
|
+
function describeValidatorIssue(issue) {
|
|
35
|
+
return `line ${issue.node.location.line}: ${issue.message}`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parse `content` and run the semantic validator. Never throws — parser
|
|
39
|
+
* failures become `errors` entries and `ok: false` diagnostics.
|
|
40
|
+
*/
|
|
41
|
+
export function validateLogicTraceSpec(content) {
|
|
42
|
+
if (typeof content !== "string") {
|
|
43
|
+
return { ok: false, errors: ["content is not a string: " + typeof content], warnings: [] };
|
|
44
|
+
}
|
|
45
|
+
const errors = [];
|
|
46
|
+
const warnings = [];
|
|
47
|
+
let program;
|
|
48
|
+
try {
|
|
49
|
+
program = parseAexol(content);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
errors.push(describeParseFailure(err));
|
|
53
|
+
return { ok: false, errors, warnings };
|
|
54
|
+
}
|
|
55
|
+
const result = new Validator(program).validate();
|
|
56
|
+
for (const issue of result.errors)
|
|
57
|
+
errors.push(describeValidatorIssue(issue));
|
|
58
|
+
for (const issue of result.warnings)
|
|
59
|
+
warnings.push(describeValidatorIssue(issue));
|
|
60
|
+
return { ok: errors.length === 0, errors, warnings };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Render diagnostics as one newline-joined block (empty string when nothing
|
|
64
|
+
* to report) ready to be appended to a tool-result error message.
|
|
65
|
+
*/
|
|
66
|
+
export function formatSpecErrors(result) {
|
|
67
|
+
const lines = [];
|
|
68
|
+
for (const error of result.errors)
|
|
69
|
+
lines.push(`- Error: ${error}`);
|
|
70
|
+
for (const warning of result.warnings)
|
|
71
|
+
lines.push(`- Warning: ${warning}`);
|
|
72
|
+
return lines.join("\n");
|
|
73
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logic trace extension.
|
|
3
|
+
*
|
|
4
|
+
* Maintains EXACTLY ONE cloud-hosted file, `logic.aexol`, inside the Aexol
|
|
5
|
+
* Studio project the current directory is bound to (`.aexol/aexol.jsonc`).
|
|
6
|
+
* The file mirrors the project's business logic (types / enums / roles /
|
|
7
|
+
* workflows / agents) as a valid Aexol specification.
|
|
8
|
+
*
|
|
9
|
+
* Automatic refresh works the same way observational memory refreshes
|
|
10
|
+
* observations (see `../memory/hooks/observer-trigger.ts`):
|
|
11
|
+
* - `turn_end` hook fires the refresh attempt,
|
|
12
|
+
* - a token threshold gates how much new material must exist before a run,
|
|
13
|
+
* - an in-flight singleton prevents concurrent runs,
|
|
14
|
+
* - a passive flag (`PI_LOGIC_TRACE_PASSIVE`) disables it entirely.
|
|
15
|
+
*
|
|
16
|
+
* A `session_before_compact` hook additionally forces one flush attempt with
|
|
17
|
+
* the accumulated delta before the context is compacted away (mirroring the
|
|
18
|
+
* flush-before-compact semantics of `../memory/hooks/compaction-hook.ts`).
|
|
19
|
+
*
|
|
20
|
+
* Each refresh fetches the CURRENT remote `logic.aexol` and lets the model
|
|
21
|
+
* return the FULL updated spec (merge, never append-only) through a single
|
|
22
|
+
* `submit_logic_trace` tool call. Pushes are skipped when the model reports
|
|
23
|
+
* no change or when the content hash is unchanged (hashId).
|
|
24
|
+
*
|
|
25
|
+
* This is a SEPARATE mechanism from memory/observations — it only reuses
|
|
26
|
+
* generic helpers from `../memory/` and never writes any memory state.
|
|
27
|
+
*/
|
|
28
|
+
import { Type } from "../sdk/ai/index.js";
|
|
29
|
+
import { type AgentTool } from "../sdk/agent-core/index.js";
|
|
30
|
+
import { type ExtensionAPI, type ExtensionUIContext } from "../sdk/coding-agent/index.js";
|
|
31
|
+
import { type StudioBinding } from "../studio-binding.js";
|
|
32
|
+
import { type AexolBackendBootstrap } from "./aexol-backend-client.js";
|
|
33
|
+
import { type BackendRefineDraftRunnerOptions } from "./logic-trace-backend-draft.js";
|
|
34
|
+
import { type Entry } from "../memory/branch.js";
|
|
35
|
+
/** The single remote file this extension maintains. */
|
|
36
|
+
export declare const LOGIC_TRACE_REMOTE_PATH = "logic.aexol";
|
|
37
|
+
/** Default token amount of new material required before an automatic sync. */
|
|
38
|
+
export declare const DEFAULT_THRESHOLD_TOKENS = 800;
|
|
39
|
+
/** Default cadence between backend refine task polls (draftBackend path). */
|
|
40
|
+
export declare const DEFAULT_DRAFT_BACKEND_POLL_INTERVAL_MS = 2000;
|
|
41
|
+
/** Default total wait for a backend refine task to reach a terminal status. */
|
|
42
|
+
export declare const DEFAULT_DRAFT_BACKEND_TIMEOUT_MS = 120000;
|
|
43
|
+
export interface LogicTraceModelRef {
|
|
44
|
+
provider: string;
|
|
45
|
+
id: string;
|
|
46
|
+
}
|
|
47
|
+
export interface LogicTraceSettings {
|
|
48
|
+
passive?: boolean;
|
|
49
|
+
thresholdTokens?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Opt-in: draft the .aexol spec through the backend from/refine pipeline
|
|
52
|
+
* (remote_refine_aexol_content) instead of the local LLM draftRunner.
|
|
53
|
+
* Default false — the local draft runner stays the default path and the
|
|
54
|
+
* fallback whenever the backend draft produces no submission.
|
|
55
|
+
*/
|
|
56
|
+
draftBackend?: boolean;
|
|
57
|
+
draftBackendPollIntervalMs?: number;
|
|
58
|
+
draftBackendTimeoutMs?: number;
|
|
59
|
+
draftBackendMaxRetries?: number;
|
|
60
|
+
model?: LogicTraceModelRef;
|
|
61
|
+
}
|
|
62
|
+
export interface LogicTraceConfig {
|
|
63
|
+
passive: boolean;
|
|
64
|
+
thresholdTokens: number;
|
|
65
|
+
draftBackend: boolean;
|
|
66
|
+
draftBackendPollIntervalMs: number;
|
|
67
|
+
draftBackendTimeoutMs: number;
|
|
68
|
+
draftBackendMaxRetries?: number;
|
|
69
|
+
model?: LogicTraceModelRef;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resolve settings from `~/.spectral/settings.json` and `<cwd>/.spectral/settings.json`
|
|
73
|
+
* (project wins), then apply the `PI_LOGIC_TRACE_PASSIVE` env override — the
|
|
74
|
+
* same layered scheme as `../memory/config.ts` under its own namespaced key.
|
|
75
|
+
*/
|
|
76
|
+
export declare function loadLogicTraceConfig(cwd: string, env?: NodeJS.ProcessEnv): LogicTraceConfig;
|
|
77
|
+
/** Exported: also embedded into the backend-refine prompt (draftBackend path). */
|
|
78
|
+
export declare const LOGIC_TRACE_GRAMMAR = ".aexol quick grammar (one file, top-level blocks in any order, '#' lines are comments):\n- type Name { fieldName: Type ... } \u2014 one field per line. Scalar types: string, number, boolean, datetime.\n A capitalized identifier references another type or enum; a trailing [] marks a list (e.g. items: Task[]).\n- enum Name { values, one per line, then '}' on its own line }.\n- role Name { permission resource { actions } } \u2014 actions from: create, read, update, delete.\n- workflow Name { a single 'initial stateA' line, then one 'state X -> Y, Z' line per transition }.\n- agent Name: BaseRole { can ..., must ..., should ... } \u2014 ' : BaseRole' is optional.\n- visitor { can ... } \u2014 optional.\n- Reserved grammar words (visitor, type, enum, role, workflow, agent, permission, action, state, transition, \u2026) must NOT appear as identifiers: e.g. do not name a visitor/test step 'state' \u2014 write 'can inspect sync status', never 'can inspect sync state'.";
|
|
79
|
+
/**
|
|
80
|
+
* Leak-rule bullet list shared by LOGIC_TRACE_SYSTEM (local draft) and the
|
|
81
|
+
* backend refine adapter's MERGE_INSTRUCTIONS — defined once so the two
|
|
82
|
+
* prompts cannot drift apart.
|
|
83
|
+
*/
|
|
84
|
+
export declare const LOGIC_TRACE_LEAK_RULES = "- NEVER include secrets: no API keys or tokens (sk-\u2026, xox\u2026, ghp_\u2026, AKIA\u2026, JWTs), no Bearer/Authorization headers, and no KEY=value environment-variable-style assignments.\n- NEVER include absolute filesystem paths (/home/\u2026, /Users/\u2026, /root/\u2026, C:\\Users\\\u2026) or localhost URLs; refer to resources by project-relative names. Redact or omit anything sensitive.";
|
|
85
|
+
export declare const LOGIC_TRACE_SYSTEM = "You maintain the ONE logic.aexol file of the current Aexol Studio project: a valid, human-readable Aexol specification that mirrors the project's business logic (domain types, enums, roles, workflows, agents). It is always a FULL spec, never a changelog.\n\n.aexol quick grammar (one file, top-level blocks in any order, '#' lines are comments):\n- type Name { fieldName: Type ... } \u2014 one field per line. Scalar types: string, number, boolean, datetime.\n A capitalized identifier references another type or enum; a trailing [] marks a list (e.g. items: Task[]).\n- enum Name { values, one per line, then '}' on its own line }.\n- role Name { permission resource { actions } } \u2014 actions from: create, read, update, delete.\n- workflow Name { a single 'initial stateA' line, then one 'state X -> Y, Z' line per transition }.\n- agent Name: BaseRole { can ..., must ..., should ... } \u2014 ' : BaseRole' is optional.\n- visitor { can ... } \u2014 optional.\n- Reserved grammar words (visitor, type, enum, role, workflow, agent, permission, action, state, transition, \u2026) must NOT appear as identifiers: e.g. do not name a visitor/test step 'state' \u2014 write 'can inspect sync status', never 'can inspect sync state'.\n\nReference template (shape only \u2014 not content you must reproduce):\n\"\"\"\n# Project Logic\n\ntype ChecklistItem {\n id: string\n title: string\n done: boolean\n createdAt: datetime\n assignee: string\n status: ItemState\n}\n\nenum ItemState {\n planned\n started\n done\n archived\n}\n\nworkflow ItemLifecycle {\n initial planned\n state planned -> started, archived\n state started -> done, planned\n state done -> done\n state archived -> archived\n}\n\nrole DomainAdmin {\n permission checklist { create, read, update, delete }\n}\n\nagent ChecklistAgent: DomainAdmin {\n can plan items\n must validate titles\n}\n\nvisitor {\n can view items\n}\n\"\"\"\n\nRules:\n- Return the COMPLETE updated file every time. Merge new facts into the existing structure (\"merge, never append-only\"): extend or reorganize existing types/agents/workflows instead of duplicating them.\n- HARD CONSTRAINT: the submitted file MUST parse with the Aexol parser (types, enums, workflows, roles, agents, visitors). Invalid syntax is rejected with parser errors you must fix and resubmit.\n- Keep the existing correct definitions; remove one only when it is clearly superseded by the new information.\n- Keep the file compact and grammar-valid. Validity beats exhaustiveness; do not invent facts beyond the recent activity.\n- NEVER include secrets: no API keys or tokens (sk-\u2026, xox\u2026, ghp_\u2026, AKIA\u2026, JWTs), no Bearer/Authorization headers, and no KEY=value environment-variable-style assignments.\n- NEVER include absolute filesystem paths (/home/\u2026, /Users/\u2026, /root/\u2026, C:\\Users\\\u2026) or localhost URLs; refer to resources by project-relative names. Redact or omit anything sensitive.\n- If the recent activity does not change business logic meaningfully (docs, prose, file paths, UI cosmetics), submit changed=false.\n- Call submit_logic_trace exactly once with the full content, then reply with a short plain-text confirmation to end the run.";
|
|
86
|
+
/**
|
|
87
|
+
* Strip secret/host-specific material from spec content before it is sent to
|
|
88
|
+
* remote_update_project_file / remote_create_project_file. Best-effort,
|
|
89
|
+
* format-preserving token pass: anything that looks like an API key
|
|
90
|
+
* (sk-…, xox*-, ghp…) a Bearer token, a JWT, an AWS access key, a
|
|
91
|
+
* `KEY=value` environment assignment, an absolute filesystem path, or a
|
|
92
|
+
* localhost URL is replaced in place with a redaction marker.
|
|
93
|
+
*/
|
|
94
|
+
export declare function sanitizeLogicTraceContent(content: string): string;
|
|
95
|
+
export interface LogicTraceDraftInput {
|
|
96
|
+
model: unknown;
|
|
97
|
+
apiKey: string;
|
|
98
|
+
headers?: Record<string, string>;
|
|
99
|
+
/** Current remote logic.aexol content, or undefined when not created yet. */
|
|
100
|
+
currentContent: string | undefined;
|
|
101
|
+
/** Serialized recent conversation delta (already length-capped). */
|
|
102
|
+
delta: string;
|
|
103
|
+
signal?: AbortSignal;
|
|
104
|
+
}
|
|
105
|
+
export interface LogicTraceSubmission {
|
|
106
|
+
content: string;
|
|
107
|
+
changed: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface LogicTraceDraftOutput {
|
|
110
|
+
submitted?: LogicTraceSubmission;
|
|
111
|
+
}
|
|
112
|
+
export type LogicTraceDraftRunner = (input: LogicTraceDraftInput) => Promise<LogicTraceDraftOutput>;
|
|
113
|
+
declare const SubmitLogicTraceSchema: Type.TObject<{
|
|
114
|
+
content: Type.TString;
|
|
115
|
+
changed: Type.TBoolean;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Build the draft-loop `submit_logic_trace` tool. Exported (like the internal
|
|
119
|
+
* `buildReadTool` / `buildWriteTool` builders, but visible to tests) so the
|
|
120
|
+
* parser-backed gate is unit-testable without an LLM: `collect` fires exactly
|
|
121
|
+
* once per VALID submission; invalid ones are rejected with parser diagnostics
|
|
122
|
+
* and never collected. Runtime wiring in `runLogicTraceDraft` is unchanged.
|
|
123
|
+
*/
|
|
124
|
+
export declare function buildSubmitTool(collect: (submission: LogicTraceSubmission) => void): AgentTool<typeof SubmitLogicTraceSchema>;
|
|
125
|
+
/**
|
|
126
|
+
* Default draft runner: ONE agentLoop call with a single submit tool.
|
|
127
|
+
* Structurally mirrors `../memory/observer.ts` (drain events, await result,
|
|
128
|
+
* collect via the tool's execute) but accumulates exactly one submission.
|
|
129
|
+
*/
|
|
130
|
+
export declare function runLogicTraceDraft(input: LogicTraceDraftInput): Promise<LogicTraceDraftOutput>;
|
|
131
|
+
interface RemoteState {
|
|
132
|
+
id: string | null;
|
|
133
|
+
contentHash: string | undefined;
|
|
134
|
+
}
|
|
135
|
+
interface LogicTraceServerState {
|
|
136
|
+
binding: StudioBinding | null;
|
|
137
|
+
bindingMtimeMs: number | null;
|
|
138
|
+
/** Last known remote {id, contentHash} per cwd — refreshed on fetch & push. */
|
|
139
|
+
remote: RemoteState | null;
|
|
140
|
+
/** rawTokensSinceLastBound value at the last sync ATTEMPT (skip-gate watermark). */
|
|
141
|
+
syncedTokens: number;
|
|
142
|
+
/** In-flight singleton. */
|
|
143
|
+
syncInFlight: boolean;
|
|
144
|
+
/** Promise of the in-flight sync (null when idle). Test/diagnostic hook. */
|
|
145
|
+
syncPromise: Promise<LogicTraceOutcome> | null;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Await/diagnose the in-flight sync for a cwd (null when idle). Exposed for
|
|
149
|
+
* deterministic tests and diagnostics; production hooks stay fire-and-forget.
|
|
150
|
+
*/
|
|
151
|
+
export declare function pendingLogicTraceSync(cwd: string): Promise<LogicTraceOutcome> | null;
|
|
152
|
+
export interface LogicTraceOutcome {
|
|
153
|
+
pushed: boolean;
|
|
154
|
+
ok: boolean;
|
|
155
|
+
reason?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface LogicTraceSyncDeps {
|
|
158
|
+
cwd: string;
|
|
159
|
+
config: LogicTraceConfig;
|
|
160
|
+
state: LogicTraceServerState;
|
|
161
|
+
/**
|
|
162
|
+
* Lazy backend bootstrap — invoked ONLY after the binding check and the
|
|
163
|
+
* token-threshold gate passed, so an unbound or sub-threshold turn never
|
|
164
|
+
* bootstraps a backend (no token work, no OAuth browser flow).
|
|
165
|
+
*/
|
|
166
|
+
getBootstrap: (cwd: string) => Promise<AexolBackendBootstrap>;
|
|
167
|
+
draftRunner: LogicTraceDraftRunner;
|
|
168
|
+
/**
|
|
169
|
+
* Factory for the optional backend refine draft runner (draftBackend
|
|
170
|
+
* setting). Invoked per sync only when config.draftBackend is on; its
|
|
171
|
+
* empty outcome triggers the local `draftRunner` fallback.
|
|
172
|
+
*/
|
|
173
|
+
backendDraftFactory: (options: BackendRefineDraftRunnerOptions) => LogicTraceDraftRunner;
|
|
174
|
+
signal?: AbortSignal;
|
|
175
|
+
ui: UiNotifier;
|
|
176
|
+
model: unknown;
|
|
177
|
+
modelRegistry: unknown;
|
|
178
|
+
entries: Entry[];
|
|
179
|
+
leafId: string | undefined;
|
|
180
|
+
/** Force mode (compaction flush): bypass the token-threshold gate. */
|
|
181
|
+
force?: boolean;
|
|
182
|
+
}
|
|
183
|
+
interface UiNotifier {
|
|
184
|
+
hasUI: boolean;
|
|
185
|
+
ui?: ExtensionUIContext;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Run one guarded sync attempt. The in-flight singleton guard is checked AND
|
|
189
|
+
* set synchronously so two back-to-back hook invocations can never race into
|
|
190
|
+
* a second concurrent run. The returned promise never rejects; concurrent
|
|
191
|
+
* callers while a run is in flight get `null` instead.
|
|
192
|
+
*/
|
|
193
|
+
export declare function runLogicTraceSync(deps: LogicTraceSyncDeps): Promise<LogicTraceOutcome> | null;
|
|
194
|
+
export interface LogicTraceExtensionOptions {
|
|
195
|
+
/** Injectable draft step — tests pass a fake runner here. */
|
|
196
|
+
draftRunner?: LogicTraceDraftRunner;
|
|
197
|
+
/**
|
|
198
|
+
* Injectable backend refine draft factory — tests point this at a stub
|
|
199
|
+
* (or leave the default to exercise the real adapter against a mock MCP).
|
|
200
|
+
*/
|
|
201
|
+
backendDraftFactory?: (options: BackendRefineDraftRunnerOptions) => LogicTraceDraftRunner;
|
|
202
|
+
/** Injectable backend bootstrap — tests point this at a mock MCP server. */
|
|
203
|
+
clientFactory?: (options: {
|
|
204
|
+
warn?: (line: string) => void;
|
|
205
|
+
}) => Promise<AexolBackendBootstrap>;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Logic trace extension entry point: automatic refresh hooks
|
|
209
|
+
* (`turn_end`, `session_before_compact`) plus the two agent tools.
|
|
210
|
+
*/
|
|
211
|
+
export declare function logicTraceExtension(ext: ExtensionAPI, options?: LogicTraceExtensionOptions): void;
|
|
212
|
+
export default logicTraceExtension;
|
|
213
|
+
//# sourceMappingURL=logic-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logic-trace.d.ts","sourceRoot":"","sources":["../../src/extensions/logic-trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,EAAE,IAAI,EAA4B,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAKN,KAAK,SAAS,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EA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