@agent-plan/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Antonio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @agent-plan/core
2
+
3
+ Harness-agnostic core for Agent Plan.
4
+
5
+ Includes:
6
+ - schemas
7
+ - persistence (`PlanStore`)
8
+ - ordering/numbering normalization
9
+ - status rollups
10
+ - markdown rendering/export
11
+
12
+ See the repository root README for full documentation:
13
+ https://github.com/ovidius72/agent-planner#readme
@@ -0,0 +1,8 @@
1
+ import type { PlanWorkspace } from "./schema.js";
2
+ export declare class ExportService {
3
+ exportToMarkdown(plan: PlanWorkspace, full?: boolean): string;
4
+ private phasesForFeature;
5
+ private deriveGlobalStatus;
6
+ private generateSynthesis;
7
+ }
8
+ //# sourceMappingURL=export-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-service.d.ts","sourceRoot":"","sources":["../src/export-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,aAAa,EAAQ,MAAM,aAAa,CAAC;AA+BvE,qBAAa,aAAa;IACxB,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,UAAQ,GAAG,MAAM;IAsF3D,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,iBAAiB;CAO1B"}
@@ -0,0 +1,126 @@
1
+ import { statusBadge, statusIcon } from "./render-utils.js";
2
+ function escapeTableCell(value) {
3
+ return value.replace(/\|/g, "\\|").replace(/\r?\n/g, "<br>");
4
+ }
5
+ function doneCount(items) {
6
+ return items.filter((item) => item.status === "done").length;
7
+ }
8
+ function taskProgress(tasks) {
9
+ return `${doneCount(tasks)} / ${tasks.length}`;
10
+ }
11
+ function seq(value) {
12
+ return String(value && value > 0 ? value : 0).padStart(3, "0");
13
+ }
14
+ function featureLabel(feature) {
15
+ return `F${seq(feature.number)} — ${feature.name}`;
16
+ }
17
+ function phaseLabel(phase) {
18
+ return `P${seq(phase.number)} — ${phase.title}`;
19
+ }
20
+ function taskLabel(task) {
21
+ return `T${seq(task.number)} — ${task.title}`;
22
+ }
23
+ export class ExportService {
24
+ exportToMarkdown(plan, full = false) {
25
+ const { project, features, phases } = plan;
26
+ const lines = [];
27
+ lines.push(`# ${escapeTableCell(project.name)}`);
28
+ lines.push("");
29
+ if (project.description) {
30
+ lines.push(project.description);
31
+ lines.push("");
32
+ }
33
+ lines.push("## Riepilogo Features");
34
+ lines.push("");
35
+ lines.push("| Feature | Fasi (Fatte/Totali) | Task (Fatti/Totali) | Stato |");
36
+ lines.push("| :--- | :---: | :---: | :--- |");
37
+ if (features.features.length === 0) {
38
+ lines.push("| _Nessuna feature_ | 0 / 0 | 0 / 0 | - |");
39
+ }
40
+ for (const feature of features.features) {
41
+ const featurePhases = this.phasesForFeature(feature, phases);
42
+ const featureTasks = featurePhases.flatMap((phase) => phase.tasks);
43
+ lines.push(`| ${escapeTableCell(featureLabel(feature))} | ${doneCount(featurePhases)} / ${featurePhases.length} | ${taskProgress(featureTasks)} | ${statusBadge(feature.status)} |`);
44
+ }
45
+ lines.push("");
46
+ const allTasks = phases.flatMap((phase) => phase.tasks);
47
+ const completedTasks = doneCount(allTasks);
48
+ const progress = allTasks.length > 0 ? Math.round((completedTasks / allTasks.length) * 100) : 0;
49
+ const globalStatus = this.deriveGlobalStatus(phases);
50
+ lines.push("## Recap Stato Attività");
51
+ lines.push("");
52
+ lines.push(`- **Stato Globale**: ${statusBadge(globalStatus)}`);
53
+ lines.push(`- **Progresso Totale**: ${progress}% (${completedTasks} / ${allTasks.length} task completati)`);
54
+ lines.push(`- **Sintesi**: ${this.generateSynthesis(progress, allTasks.length)}`);
55
+ lines.push("");
56
+ if (!full)
57
+ return lines.join("\n");
58
+ lines.push("---");
59
+ lines.push("");
60
+ lines.push("# Dettaglio Operativo");
61
+ lines.push("");
62
+ for (const feature of features.features) {
63
+ lines.push(`## Dettaglio Feature: ${escapeTableCell(featureLabel(feature))} (${statusBadge(feature.status)})`);
64
+ lines.push("");
65
+ const featurePhases = this.phasesForFeature(feature, phases);
66
+ lines.push("| Livello | Elemento | Stato | Info/Progresso |");
67
+ lines.push("| :--- | :--- | :---: | :--- |");
68
+ if (featurePhases.length === 0) {
69
+ lines.push("| _Nessuna fase_ | - | - | - |");
70
+ }
71
+ for (const phase of featurePhases) {
72
+ lines.push(`| ${statusIcon(phase.status)} **Fase** | **${escapeTableCell(phaseLabel(phase))}** | ${statusBadge(phase.status)} | ${taskProgress(phase.tasks)} Task |`);
73
+ for (const task of phase.tasks) {
74
+ lines.push(`| └─ Task | ${escapeTableCell(taskLabel(task))} | ${statusBadge(task.status)} | |`);
75
+ }
76
+ }
77
+ lines.push("");
78
+ }
79
+ const featurePhaseIds = new Set(features.features.flatMap((feature) => this.phasesForFeature(feature, phases).map((phase) => phase.id)));
80
+ const orphanPhases = phases.filter((phase) => !featurePhaseIds.has(phase.id));
81
+ if (orphanPhases.length > 0) {
82
+ lines.push("## Fasi senza feature");
83
+ lines.push("");
84
+ lines.push("| Livello | Elemento | Stato | Info/Progresso |");
85
+ lines.push("| :--- | :--- | :---: | :--- |");
86
+ for (const phase of orphanPhases) {
87
+ lines.push(`| ${statusIcon(phase.status)} **Fase** | **${escapeTableCell(phaseLabel(phase))}** | ${statusBadge(phase.status)} | ${taskProgress(phase.tasks)} Task |`);
88
+ for (const task of phase.tasks) {
89
+ lines.push(`| └─ Task | ${escapeTableCell(taskLabel(task))} | ${statusBadge(task.status)} | |`);
90
+ }
91
+ }
92
+ lines.push("");
93
+ }
94
+ return lines.join("\n");
95
+ }
96
+ phasesForFeature(feature, phases) {
97
+ const byId = new Map(phases.map((phase) => [phase.id, phase]));
98
+ const ordered = feature.phaseIds.map((id) => byId.get(id)).filter((phase) => Boolean(phase));
99
+ const orderedIds = new Set(ordered.map((phase) => phase.id));
100
+ const inferred = phases.filter((phase) => phase.featureId === feature.id && !orderedIds.has(phase.id));
101
+ return [...ordered, ...inferred];
102
+ }
103
+ deriveGlobalStatus(phases) {
104
+ const allTasks = phases.flatMap((phase) => phase.tasks);
105
+ if (allTasks.length === 0)
106
+ return "planned";
107
+ if (allTasks.every((task) => task.status === "done"))
108
+ return "done";
109
+ if (allTasks.some((task) => task.status === "in-progress"))
110
+ return "in-progress";
111
+ if (allTasks.some((task) => task.status === "blocked"))
112
+ return "blocked";
113
+ return "planned";
114
+ }
115
+ generateSynthesis(progress, totalTasks) {
116
+ if (totalTasks === 0)
117
+ return "Il progetto è appena stato inizializzato. Non ci sono task definiti.";
118
+ if (progress === 100)
119
+ return "Il progetto è completato. Tutte le feature e i task sono stati chiusi.";
120
+ if (progress > 75)
121
+ return `Il progetto è in fase di chiusura (${progress}%). Mancano gli ultimi dettagli.`;
122
+ if (progress > 25)
123
+ return `Il progetto è in fase di implementazione attiva (${progress}%).`;
124
+ return `Il progetto è nelle fasi iniziali di setup e pianificazione (${progress}%).`;
125
+ }
126
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./naming.js";
2
+ export * from "./schema.js";
3
+ export { PlanStore, PlanStoreError, setWriteBusyHook, setWriteNotifyHook, migrateToUuids, withFeatureLock } from "./plan-store.js";
4
+ export { PlanRenderer } from "./renderer.js";
5
+ export { ExportService } from "./export-service.js";
6
+ export type { CodebaseProfile, ResumeFocus, ActivityEntry, ActivityLog, AmbientFacts } from "./schema.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnI,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from "./naming.js";
2
+ export * from "./schema.js";
3
+ export { PlanStore, PlanStoreError, setWriteBusyHook, setWriteNotifyHook, migrateToUuids, withFeatureLock } from "./plan-store.js";
4
+ export { PlanRenderer } from "./renderer.js";
5
+ export { ExportService } from "./export-service.js";
@@ -0,0 +1,14 @@
1
+ export declare function normalizeSlug(input: string): string;
2
+ export declare function formatTwoDigitNumber(value: number): string;
3
+ export declare function formatThreeDigitNumber(value: number): string;
4
+ export declare function createPhaseId(): string;
5
+ /** True for legacy phase ids that are NOT feature-scoped (e.g. `phase-01-...`). */
6
+ export declare function isLegacyPhaseId(phaseId: string): boolean;
7
+ /** Compute the feature-scoped id for a legacy phase, preserving featureId/number/slug. */
8
+ export declare function migratePhaseId(featureId: string, number: number, slug: string): string;
9
+ export declare function createTaskId(): string;
10
+ export declare function createRequirementId(): string;
11
+ export declare function createMacroTaskId(): string;
12
+ export declare function createFeatureId(): string;
13
+ export declare function createChecklistItemId(taskId: string, number: number, title: string): string;
14
+ //# sourceMappingURL=naming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../src/naming.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGtF;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3F"}
package/dist/naming.js ADDED
@@ -0,0 +1,44 @@
1
+ import { randomUUID } from "node:crypto";
2
+ const SLUG_PATTERN = /[^a-z0-9]+/g;
3
+ const MULTI_DASH_PATTERN = /-+/g;
4
+ export function normalizeSlug(input) {
5
+ return input
6
+ .trim()
7
+ .toLowerCase()
8
+ .replace(SLUG_PATTERN, "-")
9
+ .replace(MULTI_DASH_PATTERN, "-")
10
+ .replace(/^-|-$/g, "");
11
+ }
12
+ export function formatTwoDigitNumber(value) {
13
+ return String(value).padStart(2, "0");
14
+ }
15
+ export function formatThreeDigitNumber(value) {
16
+ return String(value).padStart(3, "0");
17
+ }
18
+ export function createPhaseId() {
19
+ return randomUUID();
20
+ }
21
+ /** True for legacy phase ids that are NOT feature-scoped (e.g. `phase-01-...`). */
22
+ export function isLegacyPhaseId(phaseId) {
23
+ return phaseId.startsWith("phase-") && !phaseId.startsWith("feature-");
24
+ }
25
+ /** Compute the feature-scoped id for a legacy phase, preserving featureId/number/slug. */
26
+ export function migratePhaseId(featureId, number, slug) {
27
+ // In UUID world, this is just randomUUID, but we keep signature for compatibility if needed
28
+ return randomUUID();
29
+ }
30
+ export function createTaskId() {
31
+ return randomUUID();
32
+ }
33
+ export function createRequirementId() {
34
+ return randomUUID();
35
+ }
36
+ export function createMacroTaskId() {
37
+ return randomUUID();
38
+ }
39
+ export function createFeatureId() {
40
+ return randomUUID();
41
+ }
42
+ export function createChecklistItemId(taskId, number, title) {
43
+ return `${taskId}-check-${formatThreeDigitNumber(number)}-${normalizeSlug(title)}`;
44
+ }
@@ -0,0 +1,140 @@
1
+ import { type FeaturesDocument, type Manifest, type Phase, type PlanWorkspace, type Project, type RequirementsDocument, type ActivityEntry, type ActivityLog, type CodebaseProfile, type ResumeFocus } from "./schema.js";
2
+ export declare class PlanStoreError extends Error {
3
+ readonly cause?: unknown | undefined;
4
+ constructor(message: string, cause?: unknown | undefined);
5
+ }
6
+ export declare function setWriteBusyHook(hook: ((busy: boolean) => void) | undefined): void;
7
+ export declare function setWriteNotifyHook(hook: (() => void) | undefined): void;
8
+ export declare function withFeatureLock<T>(featureId: string, fn: () => Promise<T>): Promise<T>;
9
+ export declare function migrateToUuids(store: PlanStore): Promise<void>;
10
+ export declare class PlanStore {
11
+ readonly root: string;
12
+ private autoSync;
13
+ private syncGuard;
14
+ private batchInProgress;
15
+ constructor(root: string);
16
+ /** When enabled, status rollup (syncStatuses) runs automatically after every
17
+ * phase/feature/project save. Used by the pi-adapter so the agent's tool
18
+ * mutations keep phase/feature statuses derived from task statuses. */
19
+ enableAutoSync(value: boolean): void;
20
+ /** Run a batch operation with autoSync suspended. Internal saves inside the
21
+ * batch will NOT re-trigger syncStatuses (which would be O(N^2) on large
22
+ * planners). The caller is responsible for triggering any needed final
23
+ * sync explicitly. */
24
+ private runAsBatch;
25
+ /** Public batch wrapper used by the module-level migrateToUuids helper. */
26
+ runBatchForMigration<T>(fn: () => Promise<T>): Promise<T>;
27
+ private maybeAutoSync;
28
+ private normalizeTasks;
29
+ private normalizeFeaturesDocument;
30
+ private normalizePhaseDocument;
31
+ private normalizeStructureSnapshot;
32
+ ensureStructureOrdering(): Promise<{
33
+ changed: boolean;
34
+ }>;
35
+ private manifestPath;
36
+ private projectPath;
37
+ private requirementsPath;
38
+ private featuresPath;
39
+ private phasesDir;
40
+ private phasePath;
41
+ private generatedDir;
42
+ private codebasePath;
43
+ private resumePath;
44
+ private activityPath;
45
+ private handoffPath;
46
+ init(projectName: string): Promise<void>;
47
+ exists(): Promise<boolean>;
48
+ loadManifest(): Promise<Manifest>;
49
+ loadProject(): Promise<Project>;
50
+ loadPhase(phaseId: string): Promise<Phase>;
51
+ loadFeatures(): Promise<FeaturesDocument>;
52
+ loadCodebaseProfile(): Promise<CodebaseProfile | null>;
53
+ saveCodebaseProfile(profile: CodebaseProfile): Promise<void>;
54
+ loadResume(): Promise<ResumeFocus | null>;
55
+ saveResume(resume: ResumeFocus): Promise<void>;
56
+ /**
57
+ * Authorize a temporary guard bypass so edit/write tools may proceed even
58
+ * when no task is in-progress. Harness-agnostic: stored in resume.json so
59
+ * every adapter (Pi, Claude Code, Codex, ...) reads the same source.
60
+ * Time-scoped; auto-expires after `durationMinutes` (default 15).
61
+ */
62
+ authorizeGuardBypass(durationMinutes?: number): Promise<string>;
63
+ /** Clear any active guard bypass. */
64
+ clearGuardBypass(): Promise<void>;
65
+ /** True when a guard bypass is currently active (not expired). */
66
+ isGuardBypassed(): Promise<boolean>;
67
+ loadActivityLog(): Promise<ActivityLog>;
68
+ handoffExists(): Promise<boolean>;
69
+ loadHandoff(): Promise<{
70
+ content: string;
71
+ createdAt: string;
72
+ updatedAt: string;
73
+ } | null>;
74
+ saveHandoff(content: string): Promise<void>;
75
+ deleteHandoff(): Promise<void>;
76
+ appendActivity(type: string, ref: string, summary: string): Promise<ActivityEntry>;
77
+ /** Derive an up-to-date resume focus from the current workspace state. */
78
+ refreshResume(notes?: string, lastSessionSummary?: string): Promise<ResumeFocus>;
79
+ loadRequirements(): Promise<RequirementsDocument>;
80
+ loadAllPhases(): Promise<Phase[]>;
81
+ loadAll(): Promise<PlanWorkspace>;
82
+ /** Migrate legacy non-feature-scoped phase ids to feature-scoped ids and repair
83
+ * dangling feature.phaseIds references. Idempotent. */
84
+ migratePhaseIds(): Promise<{
85
+ renamed: number;
86
+ repaired: number;
87
+ inferred: number;
88
+ }>;
89
+ /**
90
+ * Remove orphan backup/temp files from .planner/:
91
+ * - `*.json.bak` whose main `.json` no longer exists (e.g. deleted phases)
92
+ * - `*.tmp.*` leftover from interrupted atomic writes
93
+ * Harness-agnostic; safe to run in background at startup.
94
+ */
95
+ cleanupOrphanBackups(): Promise<{
96
+ removed: number;
97
+ }>;
98
+ /** Repair dangling references and report integrity. One-shot maintenance op. */
99
+ repair(): Promise<{
100
+ migrated: {
101
+ renamed: number;
102
+ repaired: number;
103
+ inferred: number;
104
+ };
105
+ integrity: {
106
+ duplicatePhaseIds: string[];
107
+ danglingPhaseIds: string[];
108
+ };
109
+ }>;
110
+ /** Validate plan integrity: globally unique phase ids and resolvable feature.phaseIds. */
111
+ validateIntegrity(): Promise<{
112
+ duplicatePhaseIds: string[];
113
+ danglingPhaseIds: string[];
114
+ }>;
115
+ private derivePhaseStatus;
116
+ private deriveFeatureStatus;
117
+ syncStatuses(): Promise<void>;
118
+ /** Optimized rollup: syncs only the affected phase and its parent feature.
119
+ * Drastically reduces write operations and 'busy' window for task updates. */
120
+ syncTaskStatusRollup(phaseId: string): Promise<void>;
121
+ updateProject(updater: (p: Project) => Project): Promise<Project>;
122
+ updateFeatures(updater: (f: FeaturesDocument) => FeaturesDocument): Promise<FeaturesDocument>;
123
+ updateRequirements(updater: (r: RequirementsDocument) => RequirementsDocument): Promise<RequirementsDocument>;
124
+ saveProject(project: Project): Promise<void>;
125
+ saveFeatures(features: FeaturesDocument): Promise<void>;
126
+ saveRequirements(reqs: RequirementsDocument): Promise<void>;
127
+ savePhase(phase: Phase): Promise<void>;
128
+ /** Atomic read-modify-write on a single phase file. Serializes concurrent
129
+ * task_create / phase_update calls on the SAME phaseId so batch operations
130
+ * don't lose tasks (last-write-wins race condition). */
131
+ updatePhase(phaseId: string, updater: (phase: Phase) => Phase): Promise<Phase>;
132
+ deletePhase(phaseId: string): Promise<void>;
133
+ /** Load the full workspace (manifest + phases + project + requirements + features) */
134
+ loadWorkspace(): Promise<PlanWorkspace>;
135
+ /** Load all data, render markdown, and write into generated/. */
136
+ writeGenerated(): Promise<string[]>;
137
+ /** Update manifest.updatedAt to reflect a change. */
138
+ private touchManifest;
139
+ }
140
+ //# sourceMappingURL=plan-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-store.d.ts","sourceRoot":"","sources":["../src/plan-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,gBAAgB,EAGrB,KAAK,QAAQ,EAEb,KAAK,KAAK,EAEV,KAAK,aAAa,EAElB,KAAK,OAAO,EAEZ,KAAK,oBAAoB,EAIzB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAOrB,qBAAa,cAAe,SAAQ,KAAK;aAGrB,KAAK,CAAC,EAAE,OAAO;gBAD/B,OAAO,EA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