@devenius/junamis-skills 0.0.0-stage → 1.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/CHANGELOG.md +150 -0
- package/LICENSE +21 -0
- package/README.md +231 -2
- package/SECURITY.md +81 -0
- package/bin/junamis-skills.js +7 -0
- package/dist/cli.d.ts +59 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +564 -0
- package/dist/cli.js.map +1 -0
- package/dist/color.d.ts +40 -0
- package/dist/color.d.ts.map +1 -0
- package/dist/color.js +55 -0
- package/dist/color.js.map +1 -0
- package/dist/design/atomic.d.ts +4 -0
- package/dist/design/atomic.d.ts.map +1 -0
- package/dist/design/atomic.js +14 -0
- package/dist/design/atomic.js.map +1 -0
- package/dist/design/bootstrap.d.ts +23 -0
- package/dist/design/bootstrap.d.ts.map +1 -0
- package/dist/design/bootstrap.js +411 -0
- package/dist/design/bootstrap.js.map +1 -0
- package/dist/design/cli.d.ts +86 -0
- package/dist/design/cli.d.ts.map +1 -0
- package/dist/design/cli.js +425 -0
- package/dist/design/cli.js.map +1 -0
- package/dist/design/delta.d.ts +45 -0
- package/dist/design/delta.d.ts.map +1 -0
- package/dist/design/delta.js +557 -0
- package/dist/design/delta.js.map +1 -0
- package/dist/design/drift.d.ts +26 -0
- package/dist/design/drift.d.ts.map +1 -0
- package/dist/design/drift.js +341 -0
- package/dist/design/drift.js.map +1 -0
- package/dist/design/errors.d.ts +25 -0
- package/dist/design/errors.d.ts.map +1 -0
- package/dist/design/errors.js +30 -0
- package/dist/design/errors.js.map +1 -0
- package/dist/design/events.d.ts +18 -0
- package/dist/design/events.d.ts.map +1 -0
- package/dist/design/events.js +44 -0
- package/dist/design/events.js.map +1 -0
- package/dist/design/fingerprint.d.ts +10 -0
- package/dist/design/fingerprint.d.ts.map +1 -0
- package/dist/design/fingerprint.js +66 -0
- package/dist/design/fingerprint.js.map +1 -0
- package/dist/design/index-gen.d.ts +16 -0
- package/dist/design/index-gen.d.ts.map +1 -0
- package/dist/design/index-gen.js +94 -0
- package/dist/design/index-gen.js.map +1 -0
- package/dist/design/schema.d.ts +54 -0
- package/dist/design/schema.d.ts.map +1 -0
- package/dist/design/schema.js +408 -0
- package/dist/design/schema.js.map +1 -0
- package/dist/design/yaml.d.ts +12 -0
- package/dist/design/yaml.d.ts.map +1 -0
- package/dist/design/yaml.js +264 -0
- package/dist/design/yaml.js.map +1 -0
- package/dist/external.d.ts +61 -0
- package/dist/external.d.ts.map +1 -0
- package/dist/external.js +426 -0
- package/dist/external.js.map +1 -0
- package/dist/guide.d.ts +17 -0
- package/dist/guide.d.ts.map +1 -0
- package/dist/guide.js +219 -0
- package/dist/guide.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/install-external.d.ts +3 -0
- package/dist/install-external.d.ts.map +1 -0
- package/dist/install-external.js +37 -0
- package/dist/install-external.js.map +1 -0
- package/dist/library-install.d.ts +39 -0
- package/dist/library-install.d.ts.map +1 -0
- package/dist/library-install.js +663 -0
- package/dist/library-install.js.map +1 -0
- package/dist/orchestrator/boot.d.ts +3 -0
- package/dist/orchestrator/boot.d.ts.map +1 -0
- package/dist/orchestrator/boot.js +515 -0
- package/dist/orchestrator/boot.js.map +1 -0
- package/dist/orchestrator/cli.d.ts +37 -0
- package/dist/orchestrator/cli.d.ts.map +1 -0
- package/dist/orchestrator/cli.js +563 -0
- package/dist/orchestrator/cli.js.map +1 -0
- package/dist/orchestrator/commands.d.ts +46 -0
- package/dist/orchestrator/commands.d.ts.map +1 -0
- package/dist/orchestrator/commands.js +752 -0
- package/dist/orchestrator/commands.js.map +1 -0
- package/dist/orchestrator/compaction.d.ts +21 -0
- package/dist/orchestrator/compaction.d.ts.map +1 -0
- package/dist/orchestrator/compaction.js +93 -0
- package/dist/orchestrator/compaction.js.map +1 -0
- package/dist/orchestrator/drift.d.ts +11 -0
- package/dist/orchestrator/drift.d.ts.map +1 -0
- package/dist/orchestrator/drift.js +181 -0
- package/dist/orchestrator/drift.js.map +1 -0
- package/dist/orchestrator/errors.d.ts +52 -0
- package/dist/orchestrator/errors.d.ts.map +1 -0
- package/dist/orchestrator/errors.js +96 -0
- package/dist/orchestrator/errors.js.map +1 -0
- package/dist/orchestrator/frontmatter.d.ts +6 -0
- package/dist/orchestrator/frontmatter.d.ts.map +1 -0
- package/dist/orchestrator/frontmatter.js +50 -0
- package/dist/orchestrator/frontmatter.js.map +1 -0
- package/dist/orchestrator/fsx.d.ts +45 -0
- package/dist/orchestrator/fsx.d.ts.map +1 -0
- package/dist/orchestrator/fsx.js +295 -0
- package/dist/orchestrator/fsx.js.map +1 -0
- package/dist/orchestrator/handoff.d.ts +8 -0
- package/dist/orchestrator/handoff.d.ts.map +1 -0
- package/dist/orchestrator/handoff.js +246 -0
- package/dist/orchestrator/handoff.js.map +1 -0
- package/dist/orchestrator/hash.d.ts +10 -0
- package/dist/orchestrator/hash.d.ts.map +1 -0
- package/dist/orchestrator/hash.js +65 -0
- package/dist/orchestrator/hash.js.map +1 -0
- package/dist/orchestrator/journal.d.ts +35 -0
- package/dist/orchestrator/journal.d.ts.map +1 -0
- package/dist/orchestrator/journal.js +163 -0
- package/dist/orchestrator/journal.js.map +1 -0
- package/dist/orchestrator/lease.d.ts +31 -0
- package/dist/orchestrator/lease.d.ts.map +1 -0
- package/dist/orchestrator/lease.js +175 -0
- package/dist/orchestrator/lease.js.map +1 -0
- package/dist/orchestrator/plan.d.ts +27 -0
- package/dist/orchestrator/plan.d.ts.map +1 -0
- package/dist/orchestrator/plan.js +240 -0
- package/dist/orchestrator/plan.js.map +1 -0
- package/dist/orchestrator/report.d.ts +49 -0
- package/dist/orchestrator/report.d.ts.map +1 -0
- package/dist/orchestrator/report.js +244 -0
- package/dist/orchestrator/report.js.map +1 -0
- package/dist/orchestrator/state.d.ts +43 -0
- package/dist/orchestrator/state.d.ts.map +1 -0
- package/dist/orchestrator/state.js +369 -0
- package/dist/orchestrator/state.js.map +1 -0
- package/dist/orchestrator/store.d.ts +42 -0
- package/dist/orchestrator/store.d.ts.map +1 -0
- package/dist/orchestrator/store.js +202 -0
- package/dist/orchestrator/store.js.map +1 -0
- package/dist/orchestrator/test-hooks.d.ts +5 -0
- package/dist/orchestrator/test-hooks.d.ts.map +1 -0
- package/dist/orchestrator/test-hooks.js +31 -0
- package/dist/orchestrator/test-hooks.js.map +1 -0
- package/dist/orchestrator/time.d.ts +11 -0
- package/dist/orchestrator/time.d.ts.map +1 -0
- package/dist/orchestrator/time.js +38 -0
- package/dist/orchestrator/time.js.map +1 -0
- package/dist/paths.d.ts +9 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +42 -0
- package/dist/paths.js.map +1 -0
- package/dist/pinned-source.d.ts +13 -0
- package/dist/pinned-source.d.ts.map +1 -0
- package/dist/pinned-source.js +238 -0
- package/dist/pinned-source.js.map +1 -0
- package/dist/reconcile/cli.d.ts +17 -0
- package/dist/reconcile/cli.d.ts.map +1 -0
- package/dist/reconcile/cli.js +171 -0
- package/dist/reconcile/cli.js.map +1 -0
- package/dist/reconcile/detectors.d.ts +29 -0
- package/dist/reconcile/detectors.d.ts.map +1 -0
- package/dist/reconcile/detectors.js +294 -0
- package/dist/reconcile/detectors.js.map +1 -0
- package/dist/reconcile/manifest.d.ts +11 -0
- package/dist/reconcile/manifest.d.ts.map +1 -0
- package/dist/reconcile/manifest.js +118 -0
- package/dist/reconcile/manifest.js.map +1 -0
- package/dist/reconcile/queue.d.ts +3 -0
- package/dist/reconcile/queue.d.ts.map +1 -0
- package/dist/reconcile/queue.js +723 -0
- package/dist/reconcile/queue.js.map +1 -0
- package/dist/reconcile/score.d.ts +19 -0
- package/dist/reconcile/score.d.ts.map +1 -0
- package/dist/reconcile/score.js +58 -0
- package/dist/reconcile/score.js.map +1 -0
- package/dist/scripts/check-opencode-config.d.ts +12 -0
- package/dist/scripts/check-opencode-config.d.ts.map +1 -0
- package/dist/scripts/check-opencode-config.js +216 -0
- package/dist/scripts/check-opencode-config.js.map +1 -0
- package/dist/scripts/check-pack.d.ts +3 -0
- package/dist/scripts/check-pack.d.ts.map +1 -0
- package/dist/scripts/check-pack.js +74 -0
- package/dist/scripts/check-pack.js.map +1 -0
- package/dist/scripts/check-pins.d.ts +9 -0
- package/dist/scripts/check-pins.d.ts.map +1 -0
- package/dist/scripts/check-pins.js +65 -0
- package/dist/scripts/check-pins.js.map +1 -0
- package/dist/scripts/check-security.d.ts +3 -0
- package/dist/scripts/check-security.d.ts.map +1 -0
- package/dist/scripts/check-security.js +47 -0
- package/dist/scripts/check-security.js.map +1 -0
- package/dist/scripts/check-skills-lock.d.ts +7 -0
- package/dist/scripts/check-skills-lock.d.ts.map +1 -0
- package/dist/scripts/check-skills-lock.js +36 -0
- package/dist/scripts/check-skills-lock.js.map +1 -0
- package/dist/scripts/check-skills-sync.d.ts +7 -0
- package/dist/scripts/check-skills-sync.d.ts.map +1 -0
- package/dist/scripts/check-skills-sync.js +146 -0
- package/dist/scripts/check-skills-sync.js.map +1 -0
- package/dist/scripts/check-yaml.d.ts +3 -0
- package/dist/scripts/check-yaml.d.ts.map +1 -0
- package/dist/scripts/check-yaml.js +41 -0
- package/dist/scripts/check-yaml.js.map +1 -0
- package/dist/scripts/publish-npm.d.ts +3 -0
- package/dist/scripts/publish-npm.d.ts.map +1 -0
- package/dist/scripts/publish-npm.js +67 -0
- package/dist/scripts/publish-npm.js.map +1 -0
- package/dist/scripts/release-check.d.ts +3 -0
- package/dist/scripts/release-check.d.ts.map +1 -0
- package/dist/scripts/release-check.js +97 -0
- package/dist/scripts/release-check.js.map +1 -0
- package/dist/scripts/support.d.ts +41 -0
- package/dist/scripts/support.d.ts.map +1 -0
- package/dist/scripts/support.js +78 -0
- package/dist/scripts/support.js.map +1 -0
- package/dist/targets/claude.d.ts +4 -0
- package/dist/targets/claude.d.ts.map +1 -0
- package/dist/targets/claude.js +42 -0
- package/dist/targets/claude.js.map +1 -0
- package/dist/targets/cline.d.ts +4 -0
- package/dist/targets/cline.d.ts.map +1 -0
- package/dist/targets/cline.js +39 -0
- package/dist/targets/cline.js.map +1 -0
- package/dist/targets/cursor.d.ts +4 -0
- package/dist/targets/cursor.d.ts.map +1 -0
- package/dist/targets/cursor.js +40 -0
- package/dist/targets/cursor.js.map +1 -0
- package/dist/targets/index.d.ts +4 -0
- package/dist/targets/index.d.ts.map +1 -0
- package/dist/targets/index.js +11 -0
- package/dist/targets/index.js.map +1 -0
- package/dist/targets/opencode.d.ts +4 -0
- package/dist/targets/opencode.d.ts.map +1 -0
- package/dist/targets/opencode.js +48 -0
- package/dist/targets/opencode.js.map +1 -0
- package/dist/targets/windsurf.d.ts +4 -0
- package/dist/targets/windsurf.d.ts.map +1 -0
- package/dist/targets/windsurf.js +41 -0
- package/dist/targets/windsurf.js.map +1 -0
- package/dist/types/common.d.ts +193 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +6 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/design.d.ts +185 -0
- package/dist/types/design.d.ts.map +1 -0
- package/dist/types/design.js +3 -0
- package/dist/types/design.js.map +1 -0
- package/dist/types/guards.d.ts +13 -0
- package/dist/types/guards.d.ts.map +1 -0
- package/dist/types/guards.js +64 -0
- package/dist/types/guards.js.map +1 -0
- package/dist/types/handoff.d.ts +29 -0
- package/dist/types/handoff.d.ts.map +1 -0
- package/dist/types/handoff.js +3 -0
- package/dist/types/handoff.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/orchestrator.d.ts +414 -0
- package/dist/types/orchestrator.d.ts.map +1 -0
- package/dist/types/orchestrator.js +4 -0
- package/dist/types/orchestrator.js.map +1 -0
- package/dist/types/reconcile.d.ts +160 -0
- package/dist/types/reconcile.d.ts.map +1 -0
- package/dist/types/reconcile.js +3 -0
- package/dist/types/reconcile.js.map +1 -0
- package/docs/RECONCILE.md +505 -0
- package/docs/design/_schema.md +506 -0
- package/junamis-skills.yml +328 -0
- package/library/EXTERNAL.md +35 -0
- package/library/HANDOFF.md +93 -0
- package/library/RESUME.md +429 -0
- package/library/SAFETY.md +83 -0
- package/library/agents/context-keeper.md +41 -0
- package/library/agents/frontend.md +43 -0
- package/library/agents/maintainer.md +44 -0
- package/library/agents/nestjs.md +40 -0
- package/library/agents/nextjs.md +40 -0
- package/library/agents/operator.md +42 -0
- package/library/agents/orchestrator.md +313 -0
- package/library/agents/researcher.md +40 -0
- package/library/agents/reviewer.md +40 -0
- package/library/skills/db-migrate/SKILL.md +50 -0
- package/library/skills/decision-record/SKILL.md +74 -0
- package/library/skills/dependency-upgrade/SKILL.md +57 -0
- package/library/skills/deploy-verify/SKILL.md +51 -0
- package/library/skills/document/SKILL.md +51 -0
- package/library/skills/env-doctor/SKILL.md +65 -0
- package/library/skills/frontend/SKILL.md +63 -0
- package/library/skills/handoff/SKILL.md +79 -0
- package/library/skills/incident-response/SKILL.md +69 -0
- package/library/skills/nestjs/SKILL.md +49 -0
- package/library/skills/nextjs/SKILL.md +48 -0
- package/library/skills/perf-budget/SKILL.md +62 -0
- package/library/skills/refactor-safely/SKILL.md +48 -0
- package/library/skills/release-prep/SKILL.md +75 -0
- package/library/skills/research/SKILL.md +66 -0
- package/library/skills/rollback/SKILL.md +49 -0
- package/library/skills/route/SKILL.md +107 -0
- package/library/skills/route-external/SKILL.md +67 -0
- package/library/skills/security-audit/SKILL.md +64 -0
- package/library/skills/skill-author/SKILL.md +49 -0
- package/opencode.json +5906 -0
- package/package.json +88 -4
- package/scripts/design-registry.mjs +7 -0
- package/scripts/orchestrator-state.mjs +7 -0
- package/scripts/reconcile.mjs +7 -0
- package/skills-lock.json +197 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import type { JsonObject } from "./common.js";
|
|
2
|
+
import type { DesignFingerprint } from "./design.js";
|
|
3
|
+
import type { Candidate, WorkQueue } from "./reconcile.js";
|
|
4
|
+
export type RunStatus = "NEW_RUN" | "RESUMING" | "COMPLETE" | "BLOCKED_DRIFT" | "HALT_CORRUPT";
|
|
5
|
+
export type TaskStatus = "pending" | "in_progress" | "done" | "failed" | "needs_review";
|
|
6
|
+
/** Mirrors the reconcile queue status. A queue status is not a run status. */
|
|
7
|
+
export type ReconcileQueueStatus = "ready" | "no_work" | "blocked_drift";
|
|
8
|
+
/** The documented capability resolution values. */
|
|
9
|
+
export interface PlanTask {
|
|
10
|
+
readonly task_id: string;
|
|
11
|
+
readonly capability: string;
|
|
12
|
+
readonly depends_on: readonly string[];
|
|
13
|
+
readonly resolved_skill: string;
|
|
14
|
+
/** One of `ResolutionSource` in practice; a plan file may name any source. */
|
|
15
|
+
readonly resolution_source: string;
|
|
16
|
+
readonly owner: string;
|
|
17
|
+
readonly adapter: string | JsonObject | null;
|
|
18
|
+
readonly idempotent: boolean;
|
|
19
|
+
readonly inputs_hash: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PlanSnapshot {
|
|
22
|
+
readonly schema_version: number;
|
|
23
|
+
readonly run_id: string;
|
|
24
|
+
readonly created_at: string;
|
|
25
|
+
readonly env_fingerprint: EnvFingerprint | null;
|
|
26
|
+
readonly capabilities: readonly string[];
|
|
27
|
+
readonly tasks: readonly PlanTask[];
|
|
28
|
+
readonly checksum: string;
|
|
29
|
+
}
|
|
30
|
+
export interface EnvFingerprint {
|
|
31
|
+
readonly skills_lock_sha256: string | null;
|
|
32
|
+
readonly library_overrides_sha256: string | null;
|
|
33
|
+
readonly library_overrides_files: Readonly<Record<string, string>> | null;
|
|
34
|
+
readonly design_registry: DesignFingerprint | null;
|
|
35
|
+
readonly design_registry_files: Readonly<Record<string, string>> | null;
|
|
36
|
+
readonly orchestrator_version: string;
|
|
37
|
+
readonly handoff_schema_version: number;
|
|
38
|
+
readonly library_root: string | null;
|
|
39
|
+
readonly manifest_path: string | null;
|
|
40
|
+
}
|
|
41
|
+
/** One step in flight on a task record. */
|
|
42
|
+
export interface TaskStep {
|
|
43
|
+
readonly step_id: string;
|
|
44
|
+
readonly skill: string;
|
|
45
|
+
readonly attempt: number;
|
|
46
|
+
readonly idempotent: boolean;
|
|
47
|
+
readonly started_at: string;
|
|
48
|
+
readonly session_id: string;
|
|
49
|
+
}
|
|
50
|
+
export interface TaskResolution {
|
|
51
|
+
readonly decision: string;
|
|
52
|
+
readonly at: string;
|
|
53
|
+
}
|
|
54
|
+
export interface TaskRecord {
|
|
55
|
+
readonly schema_version: number;
|
|
56
|
+
readonly task_id: string;
|
|
57
|
+
readonly capability: string;
|
|
58
|
+
readonly status: TaskStatus;
|
|
59
|
+
readonly resolved_skill: string;
|
|
60
|
+
/** One of `ResolutionSource` in practice; carried over from the plan. */
|
|
61
|
+
readonly resolution_source: string;
|
|
62
|
+
readonly owner: string;
|
|
63
|
+
readonly adapter: string | JsonObject | null;
|
|
64
|
+
readonly current_step: TaskStep | null;
|
|
65
|
+
readonly inputs_hash: string;
|
|
66
|
+
readonly outputs: readonly string[];
|
|
67
|
+
readonly attempt: number;
|
|
68
|
+
readonly updated_at: string;
|
|
69
|
+
readonly questions?: readonly string[];
|
|
70
|
+
readonly resolution?: TaskResolution;
|
|
71
|
+
readonly last_error?: string;
|
|
72
|
+
readonly next?: string | null;
|
|
73
|
+
readonly handoff?: unknown;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The payload fields the state engine reads from a journal event.
|
|
77
|
+
*
|
|
78
|
+
* The journal is append-only and hash-chained, and `verifyChain` proves every
|
|
79
|
+
* payload byte after it was written, so these fields are engine-owned once the
|
|
80
|
+
* chain verifies. Untrusted input (the raw line) is parsed and its envelope is
|
|
81
|
+
* validated before it is folded.
|
|
82
|
+
*/
|
|
83
|
+
export interface JournalEventFields {
|
|
84
|
+
readonly created_at?: string;
|
|
85
|
+
readonly schema_version?: number;
|
|
86
|
+
readonly task_id?: string;
|
|
87
|
+
readonly step_id?: string;
|
|
88
|
+
readonly capability?: string;
|
|
89
|
+
readonly attempt?: number;
|
|
90
|
+
readonly idempotent?: boolean;
|
|
91
|
+
readonly started_at?: string;
|
|
92
|
+
readonly skill?: string;
|
|
93
|
+
readonly task_status?: TaskStatus;
|
|
94
|
+
readonly status?: TaskStatus;
|
|
95
|
+
readonly outputs?: readonly string[];
|
|
96
|
+
readonly handoff?: string | null;
|
|
97
|
+
readonly handoff_status?: string;
|
|
98
|
+
readonly next?: string | null;
|
|
99
|
+
readonly next_target?: string;
|
|
100
|
+
readonly reason?: string;
|
|
101
|
+
readonly questions?: readonly string[];
|
|
102
|
+
readonly decision?: string;
|
|
103
|
+
readonly diff?: Partial<DriftDiff> | null;
|
|
104
|
+
readonly queue_status?: string;
|
|
105
|
+
readonly stalled?: boolean;
|
|
106
|
+
readonly path?: string;
|
|
107
|
+
readonly plan?: PlanSnapshot;
|
|
108
|
+
readonly env_fingerprint?: EnvFingerprint | null;
|
|
109
|
+
readonly design_registry?: DesignFingerprint | null;
|
|
110
|
+
readonly design_registry_files?: Readonly<Record<string, string>> | null;
|
|
111
|
+
readonly lease?: Lease | null;
|
|
112
|
+
readonly reconcile?: boolean;
|
|
113
|
+
readonly bytes_removed?: number;
|
|
114
|
+
readonly last_valid_seq?: number;
|
|
115
|
+
readonly checkpoint_seq?: number;
|
|
116
|
+
readonly hash?: string;
|
|
117
|
+
}
|
|
118
|
+
/** The fields a caller supplies when it appends one journal line. */
|
|
119
|
+
export interface JournalEventInput {
|
|
120
|
+
readonly type: string;
|
|
121
|
+
readonly ts?: string;
|
|
122
|
+
readonly run_id?: string | null;
|
|
123
|
+
readonly session_id?: string | null;
|
|
124
|
+
readonly [key: string]: unknown;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* One journal line. Events are open: the named fields are always present and
|
|
128
|
+
* every contract adds its own payload on top, so extra keys are allowed.
|
|
129
|
+
*/
|
|
130
|
+
export interface JournalEvent extends JournalEventFields {
|
|
131
|
+
readonly seq: number;
|
|
132
|
+
readonly ts: string;
|
|
133
|
+
readonly type: string;
|
|
134
|
+
readonly run_id: string | null;
|
|
135
|
+
readonly session_id: string | null;
|
|
136
|
+
readonly prev_hash: string | null;
|
|
137
|
+
readonly hash: string;
|
|
138
|
+
readonly [key: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
/** One parsed journal, with a partial trailing line held back. */
|
|
141
|
+
export interface JournalLineError {
|
|
142
|
+
readonly line: string;
|
|
143
|
+
readonly error: unknown;
|
|
144
|
+
}
|
|
145
|
+
export interface JournalInfo {
|
|
146
|
+
readonly events: JournalEvent[];
|
|
147
|
+
readonly errors: JournalLineError[];
|
|
148
|
+
readonly truncated: boolean;
|
|
149
|
+
readonly partial: string;
|
|
150
|
+
readonly removedBytes: number;
|
|
151
|
+
readonly completeText: string;
|
|
152
|
+
readonly exists: boolean;
|
|
153
|
+
readonly size: number;
|
|
154
|
+
}
|
|
155
|
+
export interface JournalHead {
|
|
156
|
+
readonly seq: number;
|
|
157
|
+
readonly event_hash: string | null;
|
|
158
|
+
}
|
|
159
|
+
/** The result of verifying one run of events against a hash chain. */
|
|
160
|
+
export type ChainCheck = {
|
|
161
|
+
readonly ok: true;
|
|
162
|
+
readonly head: JournalHead;
|
|
163
|
+
} | {
|
|
164
|
+
readonly ok: false;
|
|
165
|
+
readonly index: number;
|
|
166
|
+
readonly reason: string;
|
|
167
|
+
};
|
|
168
|
+
export interface PlanReference {
|
|
169
|
+
readonly path: string;
|
|
170
|
+
readonly checksum: string | null;
|
|
171
|
+
}
|
|
172
|
+
export interface StateCursor {
|
|
173
|
+
readonly task_id: string;
|
|
174
|
+
readonly capability: string;
|
|
175
|
+
readonly step_id: string | null;
|
|
176
|
+
readonly attempt: number;
|
|
177
|
+
readonly status: TaskStatus;
|
|
178
|
+
}
|
|
179
|
+
export type TaskSummary = Readonly<Partial<Record<TaskStatus, number>>>;
|
|
180
|
+
/** `state.json`. Derived from the journal; never the source of truth. */
|
|
181
|
+
export interface StateSnapshot {
|
|
182
|
+
readonly schema_version: number;
|
|
183
|
+
readonly run_id: string;
|
|
184
|
+
readonly created_at: string;
|
|
185
|
+
readonly updated_at: string;
|
|
186
|
+
readonly run_status: RunStatus | null;
|
|
187
|
+
readonly cursor: StateCursor | null;
|
|
188
|
+
readonly plan: PlanReference;
|
|
189
|
+
readonly env_fingerprint: EnvFingerprint | null;
|
|
190
|
+
readonly tasks_summary: TaskSummary;
|
|
191
|
+
readonly journal_head: JournalHead;
|
|
192
|
+
readonly last_checkpoint: string | null;
|
|
193
|
+
readonly reconcile: ReconcileQueueStatus | null;
|
|
194
|
+
readonly stalled?: boolean;
|
|
195
|
+
readonly drift?: Partial<DriftDiff> | null;
|
|
196
|
+
readonly completed_at?: string;
|
|
197
|
+
readonly last_truncation?: JournalEvent;
|
|
198
|
+
}
|
|
199
|
+
export interface Lease {
|
|
200
|
+
readonly session_id: string;
|
|
201
|
+
readonly pid: number;
|
|
202
|
+
readonly host: string;
|
|
203
|
+
readonly started_at?: string;
|
|
204
|
+
readonly acquired_at?: string;
|
|
205
|
+
readonly heartbeat_at: string;
|
|
206
|
+
readonly ttl_seconds: number;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A contract shape with its top-level `readonly` modifiers removed. The engine
|
|
210
|
+
* rebuilds derived values in memory before it writes a snapshot, so the working
|
|
211
|
+
* copy is mutable while the snapshot itself stays a read-only contract.
|
|
212
|
+
*/
|
|
213
|
+
export type Mutable<T> = {
|
|
214
|
+
-readonly [K in keyof T]: T[K];
|
|
215
|
+
};
|
|
216
|
+
export type RunState = Mutable<StateSnapshot>;
|
|
217
|
+
export type TaskState = Mutable<TaskRecord>;
|
|
218
|
+
/** The paths one state root resolves to. */
|
|
219
|
+
export interface StatePaths {
|
|
220
|
+
readonly root: string;
|
|
221
|
+
readonly journal: string;
|
|
222
|
+
readonly state: string;
|
|
223
|
+
readonly plan: string;
|
|
224
|
+
readonly report: string;
|
|
225
|
+
readonly stateMd: string;
|
|
226
|
+
readonly checkpoints: string;
|
|
227
|
+
readonly tasks: string;
|
|
228
|
+
readonly locks: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The journal writer the store and the design registry append through. The
|
|
232
|
+
* engine module implements this port; the contract only describes it.
|
|
233
|
+
*/
|
|
234
|
+
export interface JournalSink {
|
|
235
|
+
readonly head: JournalHead;
|
|
236
|
+
readonly events: readonly JournalEvent[];
|
|
237
|
+
append(fields: JournalEventInput): Promise<JournalEvent>;
|
|
238
|
+
retainAfter(seq: number): readonly JournalEvent[];
|
|
239
|
+
lastEvents(count: number): readonly JournalEvent[];
|
|
240
|
+
}
|
|
241
|
+
/** A checkpoint snapshot with the engine's derived state at one sequence. */
|
|
242
|
+
export interface Checkpoint {
|
|
243
|
+
readonly schema_version: number;
|
|
244
|
+
readonly run_id: string;
|
|
245
|
+
readonly seq: number;
|
|
246
|
+
readonly journal_head: JournalHead;
|
|
247
|
+
readonly state: StateSnapshot;
|
|
248
|
+
readonly plan: PlanSnapshot | null;
|
|
249
|
+
readonly tasks: readonly TaskRecord[];
|
|
250
|
+
readonly checksum: string;
|
|
251
|
+
}
|
|
252
|
+
/** Everything one load of a state root produces. */
|
|
253
|
+
export interface LoadedRun {
|
|
254
|
+
readonly paths: StatePaths;
|
|
255
|
+
readonly journalInfo?: JournalInfo;
|
|
256
|
+
checkpoint: Checkpoint | null;
|
|
257
|
+
readonly journal: JournalSink;
|
|
258
|
+
run: RunState | null;
|
|
259
|
+
plan: PlanSnapshot | null;
|
|
260
|
+
tasks: TaskState[];
|
|
261
|
+
}
|
|
262
|
+
/** A lease plus its computed liveness, as `status` reports it. */
|
|
263
|
+
export interface LeaseView extends Lease {
|
|
264
|
+
readonly live: boolean;
|
|
265
|
+
readonly stale: boolean;
|
|
266
|
+
readonly age_seconds: number | null;
|
|
267
|
+
}
|
|
268
|
+
/** One lease file on disk. `invalid` marks a file that did not parse. */
|
|
269
|
+
export interface LeaseRecord {
|
|
270
|
+
readonly path: string;
|
|
271
|
+
readonly lease: Lease | null;
|
|
272
|
+
readonly invalid?: true;
|
|
273
|
+
}
|
|
274
|
+
/** A lease file plus its liveness, as the `status` snapshot reports it. */
|
|
275
|
+
export interface LeaseSummary extends Partial<LeaseView> {
|
|
276
|
+
readonly path: string;
|
|
277
|
+
readonly invalid?: boolean;
|
|
278
|
+
}
|
|
279
|
+
/** The outcome of taking the single-writer lease. */
|
|
280
|
+
export interface LeaseAcquisition {
|
|
281
|
+
readonly action: "acquired" | "taken_over" | "reacquired";
|
|
282
|
+
readonly lease: Lease;
|
|
283
|
+
readonly previous: Lease | null;
|
|
284
|
+
}
|
|
285
|
+
export interface ReconciliationSummary {
|
|
286
|
+
readonly interrupted: readonly string[];
|
|
287
|
+
readonly retried: readonly string[];
|
|
288
|
+
readonly escalated: readonly string[];
|
|
289
|
+
readonly malformedHandoffs: readonly string[];
|
|
290
|
+
}
|
|
291
|
+
/** One changed path inside the drift diff. */
|
|
292
|
+
export interface DriftPathChange {
|
|
293
|
+
readonly path: string;
|
|
294
|
+
readonly old: string | null;
|
|
295
|
+
readonly new: string | null;
|
|
296
|
+
readonly change: "added" | "removed" | "changed";
|
|
297
|
+
}
|
|
298
|
+
/** A manifest or library-override comparison. */
|
|
299
|
+
export interface DriftAspect {
|
|
300
|
+
readonly old: string | null;
|
|
301
|
+
readonly new: string | null;
|
|
302
|
+
readonly changed: boolean;
|
|
303
|
+
readonly path?: string | null;
|
|
304
|
+
readonly paths?: DriftPathChange[];
|
|
305
|
+
}
|
|
306
|
+
/** The design-registry comparison inside a drift diff. */
|
|
307
|
+
export interface DriftDesignAspect {
|
|
308
|
+
readonly old: DesignFingerprint | null;
|
|
309
|
+
readonly new: DesignFingerprint | null;
|
|
310
|
+
readonly changed: boolean;
|
|
311
|
+
readonly baseline?: boolean;
|
|
312
|
+
readonly paths: readonly DriftPathChange[];
|
|
313
|
+
}
|
|
314
|
+
/** The drift diff produced by `compareFingerprints`. */
|
|
315
|
+
export interface DriftDiff {
|
|
316
|
+
readonly match: boolean;
|
|
317
|
+
readonly recorded_missing: boolean;
|
|
318
|
+
readonly manifest: DriftAspect;
|
|
319
|
+
readonly overrides: DriftAspect;
|
|
320
|
+
readonly design: DriftDesignAspect;
|
|
321
|
+
readonly design_baseline: boolean;
|
|
322
|
+
readonly versionChanged: boolean;
|
|
323
|
+
readonly recorded_version?: string | null;
|
|
324
|
+
readonly current_version?: string | null;
|
|
325
|
+
readonly current: EnvFingerprint;
|
|
326
|
+
readonly detail?: string;
|
|
327
|
+
readonly paths?: readonly DriftPathChange[];
|
|
328
|
+
readonly [key: string]: unknown;
|
|
329
|
+
}
|
|
330
|
+
/** Resolved paths and process settings for one orchestrator session. */
|
|
331
|
+
export interface OrchestratorContext {
|
|
332
|
+
readonly projectRoot: string;
|
|
333
|
+
readonly stateRoot: string;
|
|
334
|
+
readonly sessionId: string;
|
|
335
|
+
readonly libraryRoot: string | null;
|
|
336
|
+
readonly manifestPath: string | null;
|
|
337
|
+
readonly designRoot: string;
|
|
338
|
+
readonly baseTtl: number;
|
|
339
|
+
readonly stepTtl: number;
|
|
340
|
+
readonly allowTmp: boolean;
|
|
341
|
+
readonly packageVersion: string;
|
|
342
|
+
readonly host: string;
|
|
343
|
+
readonly pid: number;
|
|
344
|
+
readonly json: boolean;
|
|
345
|
+
readonly quiet: boolean;
|
|
346
|
+
}
|
|
347
|
+
/** The object `boot` returns to the CLI. */
|
|
348
|
+
export interface BootResult {
|
|
349
|
+
readonly status: RunStatus;
|
|
350
|
+
readonly exitCode: number;
|
|
351
|
+
readonly halt: string | null;
|
|
352
|
+
readonly reportPath: string | null;
|
|
353
|
+
readonly run: StateSnapshot | null;
|
|
354
|
+
readonly plan: PlanSnapshot | null;
|
|
355
|
+
readonly tasks: readonly TaskRecord[];
|
|
356
|
+
readonly runId: string | null;
|
|
357
|
+
readonly cursor: StateCursor | null;
|
|
358
|
+
readonly tasksSummary: TaskSummary | null;
|
|
359
|
+
readonly drift: Partial<DriftDiff> | null;
|
|
360
|
+
readonly lease: Lease | null;
|
|
361
|
+
readonly leaseAction?: string;
|
|
362
|
+
readonly reconciliation: Partial<ReconciliationSummary> | null;
|
|
363
|
+
readonly workQueue: WorkQueue | null;
|
|
364
|
+
readonly workQueuePath: string | null;
|
|
365
|
+
readonly reconcileReportPath: string | null;
|
|
366
|
+
readonly reconcileStatus: ReconcileQueueStatus | null;
|
|
367
|
+
readonly queueHead: Candidate | null;
|
|
368
|
+
readonly error?: string;
|
|
369
|
+
readonly [key: string]: unknown;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* The common shape every command result satisfies. Commands add their own
|
|
373
|
+
* fields; the CLI reads these keys and ignores the rest.
|
|
374
|
+
*/
|
|
375
|
+
export interface CommandResult {
|
|
376
|
+
readonly status: string;
|
|
377
|
+
readonly exitCode: number;
|
|
378
|
+
readonly halt?: string | null;
|
|
379
|
+
readonly run?: StateSnapshot | null;
|
|
380
|
+
readonly plan?: PlanSnapshot | null;
|
|
381
|
+
readonly tasks?: readonly TaskRecord[];
|
|
382
|
+
readonly runId?: string | null;
|
|
383
|
+
readonly reportPath?: string | null;
|
|
384
|
+
readonly cursor?: StateCursor | null;
|
|
385
|
+
readonly tasksSummary?: TaskSummary | null;
|
|
386
|
+
readonly drift?: Partial<DriftDiff> | null;
|
|
387
|
+
readonly lease?: Lease | readonly LeaseSummary[] | null;
|
|
388
|
+
readonly leases?: readonly LeaseSummary[];
|
|
389
|
+
readonly reconciliation?: Partial<ReconciliationSummary> | null;
|
|
390
|
+
readonly workQueue?: WorkQueue | null;
|
|
391
|
+
readonly workQueuePath?: string | null;
|
|
392
|
+
readonly reconcileReportPath?: string | null;
|
|
393
|
+
readonly reconcileStatus?: ReconcileQueueStatus | null;
|
|
394
|
+
readonly queueHead?: Candidate | null;
|
|
395
|
+
readonly task?: string;
|
|
396
|
+
readonly step?: string;
|
|
397
|
+
readonly attempt?: number;
|
|
398
|
+
readonly idempotent?: boolean;
|
|
399
|
+
readonly handoff?: string | null;
|
|
400
|
+
readonly handoffStatus?: string;
|
|
401
|
+
readonly next?: string;
|
|
402
|
+
readonly decision?: string;
|
|
403
|
+
readonly checksum?: string | null;
|
|
404
|
+
readonly checkpoint?: string | null;
|
|
405
|
+
readonly journalHead?: JournalHead;
|
|
406
|
+
readonly path?: string;
|
|
407
|
+
readonly seq?: number;
|
|
408
|
+
readonly action?: string;
|
|
409
|
+
readonly previous?: Lease | null;
|
|
410
|
+
readonly currentFingerprint?: EnvFingerprint;
|
|
411
|
+
readonly designRegistry?: DesignFingerprint | null;
|
|
412
|
+
readonly [key: string]: unknown;
|
|
413
|
+
}
|
|
414
|
+
//# sourceMappingURL=orchestrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/types/orchestrator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,CAAC;AAE/F,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,CAAC;AAExF,8EAA8E;AAC9E,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,CAAC;AAEzE,mDAAmD;AACnD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,8EAA8E;IAC9E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CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,cAAc,CAAC;IAC7C,QAAQ,CAAC,cAAc,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACnD,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/types/orchestrator.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,qCAAqC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { Priority, Severity } from "./common.js";
|
|
2
|
+
import type { DriftDiff, LoadedRun } from "./orchestrator.js";
|
|
3
|
+
export type TargetKind = "surface" | "task" | "repo";
|
|
4
|
+
/** Where a capability's skill came from. RECONCILE §7. */
|
|
5
|
+
export type ResolutionSource = "internal_override" | "manifest" | "needs_review";
|
|
6
|
+
export interface CandidateTarget {
|
|
7
|
+
readonly kind: TargetKind;
|
|
8
|
+
readonly id: string;
|
|
9
|
+
}
|
|
10
|
+
/** Detector ids and the fixed reason weights in src/reconcile/score.ts. */
|
|
11
|
+
export type CandidateReason = "shadow_conflict" | "needs_review" | "invalid_handoff" | "failed_step" | "code_drift" | "coverage_gap" | "dependency_drift" | "plan_pending" | "stale_surface";
|
|
12
|
+
export type Capability = "scope" | "architect" | "develop" | "test" | "check" | "document" | "audit" | "sync" | "needs_review";
|
|
13
|
+
export type Effort = "unknown" | "small" | "medium" | "large";
|
|
14
|
+
export interface ProvenanceEntry {
|
|
15
|
+
readonly detector: string;
|
|
16
|
+
readonly at_seq: number;
|
|
17
|
+
readonly at_ts: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface Candidate {
|
|
20
|
+
readonly candidate_id: string;
|
|
21
|
+
readonly capability: string;
|
|
22
|
+
readonly target: CandidateTarget;
|
|
23
|
+
/**
|
|
24
|
+
* One of `CandidateReason` for every detector this package ships. A detector
|
|
25
|
+
* may report an unknown reason; the pass keeps it, scores it last, and audits
|
|
26
|
+
* it with a journal event, so the type stays open.
|
|
27
|
+
*/
|
|
28
|
+
readonly reason: string;
|
|
29
|
+
readonly priority: Priority;
|
|
30
|
+
readonly severity: Severity;
|
|
31
|
+
readonly effort: Effort;
|
|
32
|
+
readonly ready: boolean;
|
|
33
|
+
readonly blocked_by: readonly string[];
|
|
34
|
+
readonly resolved_skill: string | null;
|
|
35
|
+
readonly resolution_source: ResolutionSource;
|
|
36
|
+
readonly provenance: readonly ProvenanceEntry[];
|
|
37
|
+
readonly rationale: string;
|
|
38
|
+
readonly plan_position: number | null;
|
|
39
|
+
readonly non_dispatchable?: boolean;
|
|
40
|
+
readonly shadow_conflict?: boolean;
|
|
41
|
+
readonly drift?: Partial<DriftDiff> | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A detector's pre-resolution output. The pass dedupes it, resolves a skill,
|
|
45
|
+
* and scores it into a `Candidate`.
|
|
46
|
+
*/
|
|
47
|
+
export interface RawCandidate {
|
|
48
|
+
readonly capability: string;
|
|
49
|
+
readonly target: CandidateTarget;
|
|
50
|
+
readonly reason: string;
|
|
51
|
+
readonly severity: Severity;
|
|
52
|
+
readonly plan_position: number | null;
|
|
53
|
+
readonly rationale: string;
|
|
54
|
+
readonly provenance: readonly ProvenanceEntry[];
|
|
55
|
+
readonly non_dispatchable?: boolean;
|
|
56
|
+
readonly resolved_skill?: string;
|
|
57
|
+
readonly resolution_source?: ResolutionSource;
|
|
58
|
+
}
|
|
59
|
+
export interface QueueSummary {
|
|
60
|
+
readonly total: number;
|
|
61
|
+
readonly ready: number;
|
|
62
|
+
readonly blocked: number;
|
|
63
|
+
readonly needs_review: number;
|
|
64
|
+
readonly by_priority: Readonly<Record<Priority, number>>;
|
|
65
|
+
readonly stalled?: boolean;
|
|
66
|
+
readonly blocking_set?: readonly string[];
|
|
67
|
+
}
|
|
68
|
+
export interface QueueInputFingerprint {
|
|
69
|
+
readonly journal_head_seq: number;
|
|
70
|
+
readonly plan_checksum: string | null;
|
|
71
|
+
readonly design_index_sha256: string | null;
|
|
72
|
+
readonly env_fingerprint: {
|
|
73
|
+
readonly skills_lock_sha256: string | null;
|
|
74
|
+
readonly library_overrides_sha256: string | null;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export type WorkQueueStatus = "ready" | "no_work" | "blocked_drift";
|
|
78
|
+
/** `work-queue.json`. Derived on every pass; never committed. */
|
|
79
|
+
export interface WorkQueue {
|
|
80
|
+
readonly schema_version: number;
|
|
81
|
+
readonly pass_id: string;
|
|
82
|
+
readonly generated_at: string;
|
|
83
|
+
readonly input_fingerprint: QueueInputFingerprint;
|
|
84
|
+
readonly status: WorkQueueStatus;
|
|
85
|
+
readonly summary: QueueSummary;
|
|
86
|
+
readonly queue: readonly Candidate[];
|
|
87
|
+
readonly stalled?: boolean;
|
|
88
|
+
readonly drift?: Partial<DriftDiff> | null;
|
|
89
|
+
}
|
|
90
|
+
export interface DetectorEntry {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly enabled: boolean;
|
|
93
|
+
readonly order: number;
|
|
94
|
+
/** The raw YAML params mapping. Detectors read the keys they need. */
|
|
95
|
+
readonly params?: Record<string, unknown>;
|
|
96
|
+
readonly supported?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The normalized result of loading `reconcile/detectors.yaml`. The file itself
|
|
100
|
+
* uses `schema_version` and `tick_every`; the loader returns the camelCase
|
|
101
|
+
* `tickEvery` plus its resolved path.
|
|
102
|
+
*/
|
|
103
|
+
export interface DetectorManifest {
|
|
104
|
+
readonly path: string;
|
|
105
|
+
readonly created: boolean;
|
|
106
|
+
readonly detectors: readonly DetectorEntry[];
|
|
107
|
+
readonly tickEvery: number;
|
|
108
|
+
}
|
|
109
|
+
/** One row of the detector status table in the reconcile report. */
|
|
110
|
+
export interface DetectorStatus {
|
|
111
|
+
readonly id: string;
|
|
112
|
+
readonly enabled: boolean;
|
|
113
|
+
readonly fired: number;
|
|
114
|
+
readonly candidates: number;
|
|
115
|
+
readonly skipped?: string;
|
|
116
|
+
readonly error?: string;
|
|
117
|
+
}
|
|
118
|
+
/** A `priority_override` journal event, with the rationale RECONCILE requires. */
|
|
119
|
+
export interface PriorityOverride {
|
|
120
|
+
readonly candidate_id: string;
|
|
121
|
+
readonly from: Priority;
|
|
122
|
+
readonly to: Priority;
|
|
123
|
+
readonly rationale: string;
|
|
124
|
+
readonly by: string;
|
|
125
|
+
readonly ts?: string;
|
|
126
|
+
}
|
|
127
|
+
/** The options one RECONCILE pass accepts. */
|
|
128
|
+
export interface ReconcileOptions {
|
|
129
|
+
readonly stateRoot: string;
|
|
130
|
+
readonly projectRoot: string;
|
|
131
|
+
readonly designRoot?: string | null;
|
|
132
|
+
readonly libraryRoot?: string | null;
|
|
133
|
+
readonly manifestPath?: string | null;
|
|
134
|
+
readonly packageVersion?: string;
|
|
135
|
+
readonly trigger?: string;
|
|
136
|
+
readonly status?: string | null;
|
|
137
|
+
readonly drift?: Partial<DriftDiff> | null;
|
|
138
|
+
readonly loaded?: LoadedRun | null;
|
|
139
|
+
readonly sessionId?: string;
|
|
140
|
+
}
|
|
141
|
+
/** The result of one RECONCILE pass. */
|
|
142
|
+
export interface ReconcileResult {
|
|
143
|
+
readonly ok: true;
|
|
144
|
+
readonly status: WorkQueueStatus;
|
|
145
|
+
readonly passId: string;
|
|
146
|
+
readonly queue: WorkQueue;
|
|
147
|
+
readonly queuePath: string;
|
|
148
|
+
readonly reportPath: string;
|
|
149
|
+
readonly head: Candidate | null;
|
|
150
|
+
readonly detectorStatus: readonly DetectorStatus[];
|
|
151
|
+
readonly event: unknown;
|
|
152
|
+
readonly events: readonly unknown[];
|
|
153
|
+
readonly tick: boolean;
|
|
154
|
+
readonly stale: {
|
|
155
|
+
readonly pass_id: string | null;
|
|
156
|
+
readonly mismatched_field: string;
|
|
157
|
+
} | null;
|
|
158
|
+
readonly overridesRejected: readonly unknown[];
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=reconcile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../src/types/reconcile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,UAAU,GAAG,cAAc,CAAC;AAEjF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,WAAW,GACX,SAAS,GACT,MAAM,GACN,OAAO,GACP,UAAU,GACV,OAAO,GACP,MAAM,GACN,cAAc,CAAC;AAEnB,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC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