oxe-cc 0.9.3 → 1.0.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.
Files changed (151) hide show
  1. package/README.md +1 -1
  2. package/bin/banner.txt +1 -1
  3. package/bin/lib/oxe-dashboard.cjs +9 -7
  4. package/bin/lib/oxe-operational.cjs +569 -4
  5. package/bin/oxe-cc.js +141 -57
  6. package/lib/runtime/compiler/graph-compiler.d.ts +83 -0
  7. package/lib/runtime/compiler/graph-compiler.js +135 -0
  8. package/lib/runtime/compiler/index.d.ts +1 -0
  9. package/lib/runtime/compiler/index.js +17 -0
  10. package/lib/runtime/context/context-pack-builder.d.ts +36 -0
  11. package/lib/runtime/context/context-pack-builder.js +136 -0
  12. package/lib/runtime/context/index.d.ts +1 -0
  13. package/lib/runtime/context/index.js +17 -0
  14. package/lib/runtime/delivery/branch-manager.d.ts +19 -0
  15. package/lib/runtime/delivery/branch-manager.js +78 -0
  16. package/lib/runtime/delivery/ci-checks.d.ts +34 -0
  17. package/lib/runtime/delivery/ci-checks.js +209 -0
  18. package/lib/runtime/delivery/index.d.ts +3 -0
  19. package/lib/runtime/delivery/index.js +19 -0
  20. package/lib/runtime/delivery/pr-manager.d.ts +30 -0
  21. package/lib/runtime/delivery/pr-manager.js +82 -0
  22. package/lib/runtime/events/bus.d.ts +9 -0
  23. package/lib/runtime/events/bus.js +63 -0
  24. package/lib/runtime/events/catalog.d.ts +3 -0
  25. package/lib/runtime/events/catalog.js +30 -0
  26. package/lib/runtime/events/envelope.d.ts +13 -0
  27. package/lib/runtime/events/envelope.js +2 -0
  28. package/lib/runtime/events/index.d.ts +3 -0
  29. package/lib/runtime/events/index.js +19 -0
  30. package/lib/runtime/evidence/evidence-store.d.ts +22 -0
  31. package/lib/runtime/evidence/evidence-store.js +106 -0
  32. package/lib/runtime/evidence/index.d.ts +1 -0
  33. package/lib/runtime/evidence/index.js +17 -0
  34. package/lib/runtime/gate/gate-manager.d.ts +39 -0
  35. package/lib/runtime/gate/gate-manager.js +104 -0
  36. package/lib/runtime/gate/index.d.ts +1 -0
  37. package/lib/runtime/gate/index.js +17 -0
  38. package/lib/runtime/index.d.ts +16 -0
  39. package/lib/runtime/index.js +40 -0
  40. package/lib/runtime/models/attempt.d.ts +12 -0
  41. package/lib/runtime/models/attempt.js +2 -0
  42. package/lib/runtime/models/evidence.d.ts +9 -0
  43. package/lib/runtime/models/evidence.js +2 -0
  44. package/lib/runtime/models/gate-decision.d.ts +10 -0
  45. package/lib/runtime/models/gate-decision.js +2 -0
  46. package/lib/runtime/models/index.d.ts +8 -0
  47. package/lib/runtime/models/index.js +24 -0
  48. package/lib/runtime/models/run.d.ts +13 -0
  49. package/lib/runtime/models/run.js +2 -0
  50. package/lib/runtime/models/session.d.ts +10 -0
  51. package/lib/runtime/models/session.js +2 -0
  52. package/lib/runtime/models/verification-result.d.ts +9 -0
  53. package/lib/runtime/models/verification-result.js +2 -0
  54. package/lib/runtime/models/work-item.d.ts +15 -0
  55. package/lib/runtime/models/work-item.js +2 -0
  56. package/lib/runtime/models/workspace.d.ts +25 -0
  57. package/lib/runtime/models/workspace.js +2 -0
  58. package/lib/runtime/plugins/index.d.ts +2 -0
  59. package/lib/runtime/plugins/index.js +18 -0
  60. package/lib/runtime/plugins/plugin-abi.d.ts +76 -0
  61. package/lib/runtime/plugins/plugin-abi.js +2 -0
  62. package/lib/runtime/plugins/plugin-registry.d.ts +21 -0
  63. package/lib/runtime/plugins/plugin-registry.js +114 -0
  64. package/lib/runtime/policy/index.d.ts +1 -0
  65. package/lib/runtime/policy/index.js +17 -0
  66. package/lib/runtime/policy/policy-engine.d.ts +40 -0
  67. package/lib/runtime/policy/policy-engine.js +80 -0
  68. package/lib/runtime/projection/index.d.ts +1 -0
  69. package/lib/runtime/projection/index.js +17 -0
  70. package/lib/runtime/projection/projection-engine.d.ts +11 -0
  71. package/lib/runtime/projection/projection-engine.js +218 -0
  72. package/lib/runtime/reducers/debug-reducer.d.ts +10 -0
  73. package/lib/runtime/reducers/debug-reducer.js +30 -0
  74. package/lib/runtime/reducers/index.d.ts +2 -0
  75. package/lib/runtime/reducers/index.js +18 -0
  76. package/lib/runtime/reducers/run-state-reducer.d.ts +20 -0
  77. package/lib/runtime/reducers/run-state-reducer.js +110 -0
  78. package/lib/runtime/scheduler/index.d.ts +1 -0
  79. package/lib/runtime/scheduler/index.js +17 -0
  80. package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +34 -0
  81. package/lib/runtime/scheduler/multi-agent-coordinator.js +166 -0
  82. package/lib/runtime/scheduler/scheduler.d.ts +39 -0
  83. package/lib/runtime/scheduler/scheduler.js +196 -0
  84. package/lib/runtime/verification/index.d.ts +1 -0
  85. package/lib/runtime/verification/index.js +17 -0
  86. package/lib/runtime/verification/verification-compiler.d.ts +56 -0
  87. package/lib/runtime/verification/verification-compiler.js +147 -0
  88. package/lib/runtime/workspace/index.d.ts +5 -0
  89. package/lib/runtime/workspace/index.js +24 -0
  90. package/lib/runtime/workspace/strategies/ephemeral-container.d.ts +22 -0
  91. package/lib/runtime/workspace/strategies/ephemeral-container.js +109 -0
  92. package/lib/runtime/workspace/strategies/git-worktree.d.ts +12 -0
  93. package/lib/runtime/workspace/strategies/git-worktree.js +79 -0
  94. package/lib/runtime/workspace/strategies/inplace.d.ts +10 -0
  95. package/lib/runtime/workspace/strategies/inplace.js +37 -0
  96. package/lib/runtime/workspace/workspace-manager.d.ts +13 -0
  97. package/lib/runtime/workspace/workspace-manager.js +2 -0
  98. package/lib/sdk/index.cjs +24 -7
  99. package/lib/sdk/index.d.ts +17 -7
  100. package/package.json +9 -3
  101. package/packages/runtime/package.json +17 -0
  102. package/packages/runtime/src/compiler/graph-compiler.ts +245 -0
  103. package/packages/runtime/src/compiler/index.ts +1 -0
  104. package/packages/runtime/src/context/context-pack-builder.ts +193 -0
  105. package/packages/runtime/src/context/index.ts +1 -0
  106. package/packages/runtime/src/delivery/branch-manager.ts +84 -0
  107. package/packages/runtime/src/delivery/ci-checks.ts +252 -0
  108. package/packages/runtime/src/delivery/index.ts +3 -0
  109. package/packages/runtime/src/delivery/pr-manager.ts +112 -0
  110. package/packages/runtime/src/events/bus.ts +92 -0
  111. package/packages/runtime/src/events/catalog.ts +29 -0
  112. package/packages/runtime/src/events/envelope.ts +14 -0
  113. package/packages/runtime/src/events/index.ts +3 -0
  114. package/packages/runtime/src/evidence/evidence-store.ts +130 -0
  115. package/packages/runtime/src/evidence/index.ts +1 -0
  116. package/packages/runtime/src/gate/gate-manager.ts +137 -0
  117. package/packages/runtime/src/gate/index.ts +1 -0
  118. package/packages/runtime/src/index.ts +32 -0
  119. package/packages/runtime/src/models/attempt.ts +19 -0
  120. package/packages/runtime/src/models/evidence.ts +21 -0
  121. package/packages/runtime/src/models/gate-decision.ts +21 -0
  122. package/packages/runtime/src/models/index.ts +8 -0
  123. package/packages/runtime/src/models/run.ts +24 -0
  124. package/packages/runtime/src/models/session.ts +11 -0
  125. package/packages/runtime/src/models/verification-result.ts +10 -0
  126. package/packages/runtime/src/models/work-item.ts +25 -0
  127. package/packages/runtime/src/models/workspace.ts +28 -0
  128. package/packages/runtime/src/plugins/index.ts +2 -0
  129. package/packages/runtime/src/plugins/plugin-abi.ts +95 -0
  130. package/packages/runtime/src/plugins/plugin-registry.ts +119 -0
  131. package/packages/runtime/src/policy/index.ts +1 -0
  132. package/packages/runtime/src/policy/policy-engine.ts +113 -0
  133. package/packages/runtime/src/projection/index.ts +1 -0
  134. package/packages/runtime/src/projection/projection-engine.ts +249 -0
  135. package/packages/runtime/src/reducers/debug-reducer.ts +36 -0
  136. package/packages/runtime/src/reducers/index.ts +2 -0
  137. package/packages/runtime/src/reducers/run-state-reducer.ts +127 -0
  138. package/packages/runtime/src/scheduler/index.ts +1 -0
  139. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +231 -0
  140. package/packages/runtime/src/scheduler/scheduler.ts +281 -0
  141. package/packages/runtime/src/verification/index.ts +1 -0
  142. package/packages/runtime/src/verification/verification-compiler.ts +225 -0
  143. package/packages/runtime/src/workspace/index.ts +5 -0
  144. package/packages/runtime/src/workspace/strategies/ephemeral-container.ts +121 -0
  145. package/packages/runtime/src/workspace/strategies/git-worktree.ts +77 -0
  146. package/packages/runtime/src/workspace/strategies/inplace.ts +35 -0
  147. package/packages/runtime/src/workspace/workspace-manager.ts +15 -0
  148. package/packages/runtime/tsconfig.json +17 -0
  149. package/vscode-extension/oxe-agents-0.9.2.vsix +0 -0
  150. package/vscode-extension/oxe-agents-1.0.0.vsix +0 -0
  151. package/vscode-extension/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ import type { Evidence, EvidenceType } from '../models/evidence';
2
+ export interface EvidenceCollectOptions {
3
+ work_item_id: string;
4
+ run_id: string;
5
+ attempt_number: number;
6
+ }
7
+ export interface EvidenceContent {
8
+ evidence: Evidence;
9
+ content: Buffer;
10
+ }
11
+ export declare class EvidenceStore {
12
+ private readonly projectRoot;
13
+ constructor(projectRoot: string);
14
+ private evidenceDir;
15
+ private indexPath;
16
+ private readIndex;
17
+ private writeIndex;
18
+ collect(type: EvidenceType, content: Buffer | string, opts: EvidenceCollectOptions): Promise<Evidence>;
19
+ list(opts: EvidenceCollectOptions): Promise<Evidence[]>;
20
+ get(evidenceId: string, opts: EvidenceCollectOptions): Promise<EvidenceContent | null>;
21
+ listByRun(runId: string): Promise<Evidence[]>;
22
+ }
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EvidenceStore = void 0;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const fs_1 = __importDefault(require("fs"));
10
+ const EXT_MAP = {
11
+ diff: 'patch',
12
+ stdout: 'txt',
13
+ stderr: 'txt',
14
+ junit_xml: 'xml',
15
+ coverage: 'json',
16
+ screenshot: 'png',
17
+ trace: 'json',
18
+ log: 'txt',
19
+ security_report: 'json',
20
+ api_output: 'json',
21
+ summary: 'json',
22
+ };
23
+ class EvidenceStore {
24
+ constructor(projectRoot) {
25
+ this.projectRoot = projectRoot;
26
+ }
27
+ evidenceDir(runId, workItemId, attemptNumber) {
28
+ return path_1.default.join(this.projectRoot, '.oxe', 'evidence', 'runs', runId, workItemId, `attempt-${attemptNumber}`);
29
+ }
30
+ indexPath(runId, workItemId, attemptNumber) {
31
+ return path_1.default.join(this.evidenceDir(runId, workItemId, attemptNumber), 'index.json');
32
+ }
33
+ readIndex(runId, workItemId, attemptNumber) {
34
+ const p = this.indexPath(runId, workItemId, attemptNumber);
35
+ if (!fs_1.default.existsSync(p))
36
+ return [];
37
+ try {
38
+ return JSON.parse(fs_1.default.readFileSync(p, 'utf8'));
39
+ }
40
+ catch {
41
+ return [];
42
+ }
43
+ }
44
+ writeIndex(runId, workItemId, attemptNumber, items) {
45
+ fs_1.default.writeFileSync(this.indexPath(runId, workItemId, attemptNumber), JSON.stringify(items, null, 2), 'utf8');
46
+ }
47
+ async collect(type, content, opts) {
48
+ const { work_item_id, run_id, attempt_number } = opts;
49
+ const dir = this.evidenceDir(run_id, work_item_id, attempt_number);
50
+ fs_1.default.mkdirSync(dir, { recursive: true });
51
+ const buf = Buffer.isBuffer(content) ? content : Buffer.from(content, 'utf8');
52
+ const checksum = crypto_1.default.createHash('sha256').update(buf).digest('hex').slice(0, 16);
53
+ const ext = EXT_MAP[type] ?? 'bin';
54
+ const existing = this.readIndex(run_id, work_item_id, attempt_number);
55
+ const seq = existing.filter((e) => e.type === type).length + 1;
56
+ const filename = seq === 1 ? `${type}.${ext}` : `${type}-${seq}.${ext}`;
57
+ const filePath = path_1.default.join(dir, filename);
58
+ fs_1.default.writeFileSync(filePath, buf);
59
+ const evidence = {
60
+ evidence_id: `ev-${run_id}-${work_item_id}-a${attempt_number}-${type}-${seq}`,
61
+ attempt_id: `${work_item_id}-a${attempt_number}`,
62
+ type,
63
+ path: path_1.default.relative(this.projectRoot, filePath),
64
+ checksum,
65
+ created_at: new Date().toISOString(),
66
+ };
67
+ this.writeIndex(run_id, work_item_id, attempt_number, [...existing, evidence]);
68
+ return evidence;
69
+ }
70
+ async list(opts) {
71
+ return this.readIndex(opts.run_id, opts.work_item_id, opts.attempt_number);
72
+ }
73
+ async get(evidenceId, opts) {
74
+ const items = this.readIndex(opts.run_id, opts.work_item_id, opts.attempt_number);
75
+ const ev = items.find((e) => e.evidence_id === evidenceId);
76
+ if (!ev)
77
+ return null;
78
+ const absPath = path_1.default.join(this.projectRoot, ev.path);
79
+ if (!fs_1.default.existsSync(absPath))
80
+ return null;
81
+ return { evidence: ev, content: fs_1.default.readFileSync(absPath) };
82
+ }
83
+ async listByRun(runId) {
84
+ const runDir = path_1.default.join(this.projectRoot, '.oxe', 'evidence', 'runs', runId);
85
+ if (!fs_1.default.existsSync(runDir))
86
+ return [];
87
+ const all = [];
88
+ for (const workItem of fs_1.default.readdirSync(runDir)) {
89
+ const wiDir = path_1.default.join(runDir, workItem);
90
+ for (const attempt of fs_1.default.readdirSync(wiDir)) {
91
+ const indexPath = path_1.default.join(wiDir, attempt, 'index.json');
92
+ if (fs_1.default.existsSync(indexPath)) {
93
+ try {
94
+ const items = JSON.parse(fs_1.default.readFileSync(indexPath, 'utf8'));
95
+ all.push(...items);
96
+ }
97
+ catch {
98
+ // skip corrupt index
99
+ }
100
+ }
101
+ }
102
+ }
103
+ return all;
104
+ }
105
+ }
106
+ exports.EvidenceStore = EvidenceStore;
@@ -0,0 +1 @@
1
+ export * from './evidence-store';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./evidence-store"), exports);
@@ -0,0 +1,39 @@
1
+ import type { GateScope, GateDecisionValue } from '../models/gate-decision';
2
+ export interface GateContext {
3
+ work_item_id?: string;
4
+ run_id?: string;
5
+ description: string;
6
+ evidence_refs: string[];
7
+ risks: string[];
8
+ }
9
+ export interface GateToken {
10
+ gate_id: string;
11
+ scope: GateScope;
12
+ requested_at: string;
13
+ context: GateContext;
14
+ status: 'pending' | 'resolved';
15
+ decision?: GateDecisionValue;
16
+ actor?: string;
17
+ reason?: string;
18
+ resolved_at?: string;
19
+ }
20
+ export interface GateResolution {
21
+ decision: GateDecisionValue;
22
+ actor: string;
23
+ reason?: string;
24
+ }
25
+ export declare class GateManager {
26
+ private readonly projectRoot;
27
+ private readonly sessionId;
28
+ private readonly runId;
29
+ constructor(projectRoot: string, sessionId: string | null, runId: string);
30
+ private gatesPath;
31
+ private readGates;
32
+ private writeGates;
33
+ request(scope: GateScope, ctx: GateContext): Promise<GateToken>;
34
+ resolve(token: GateToken, resolution: GateResolution): Promise<GateToken>;
35
+ isPending(scope: GateScope): boolean;
36
+ listPending(): GateToken[];
37
+ listAll(): GateToken[];
38
+ get(gateId: string): GateToken | null;
39
+ }
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GateManager = void 0;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const fs_1 = __importDefault(require("fs"));
10
+ const bus_1 = require("../events/bus");
11
+ class GateManager {
12
+ constructor(projectRoot, sessionId, runId) {
13
+ this.projectRoot = projectRoot;
14
+ this.sessionId = sessionId;
15
+ this.runId = runId;
16
+ }
17
+ gatesPath() {
18
+ if (this.sessionId) {
19
+ return path_1.default.join(this.projectRoot, '.oxe', this.sessionId, 'execution', 'GATES.json');
20
+ }
21
+ return path_1.default.join(this.projectRoot, '.oxe', 'execution', 'GATES.json');
22
+ }
23
+ readGates() {
24
+ const p = this.gatesPath();
25
+ if (!fs_1.default.existsSync(p))
26
+ return [];
27
+ try {
28
+ return JSON.parse(fs_1.default.readFileSync(p, 'utf8'));
29
+ }
30
+ catch {
31
+ return [];
32
+ }
33
+ }
34
+ writeGates(gates) {
35
+ const p = this.gatesPath();
36
+ fs_1.default.mkdirSync(path_1.default.dirname(p), { recursive: true });
37
+ fs_1.default.writeFileSync(p, JSON.stringify(gates, null, 2), 'utf8');
38
+ }
39
+ async request(scope, ctx) {
40
+ const token = {
41
+ gate_id: `gate-${crypto_1.default.randomBytes(4).toString('hex')}`,
42
+ scope,
43
+ requested_at: new Date().toISOString(),
44
+ context: ctx,
45
+ status: 'pending',
46
+ };
47
+ const gates = this.readGates();
48
+ gates.push(token);
49
+ this.writeGates(gates);
50
+ (0, bus_1.appendEvent)(this.projectRoot, this.sessionId, {
51
+ type: 'GateRequested',
52
+ run_id: this.runId,
53
+ work_item_id: ctx.work_item_id ?? null,
54
+ payload: {
55
+ gate_id: token.gate_id,
56
+ scope,
57
+ description: ctx.description,
58
+ evidence_refs: ctx.evidence_refs,
59
+ risks: ctx.risks,
60
+ },
61
+ });
62
+ return token;
63
+ }
64
+ async resolve(token, resolution) {
65
+ const gates = this.readGates();
66
+ const idx = gates.findIndex((g) => g.gate_id === token.gate_id);
67
+ if (idx === -1)
68
+ throw new Error(`Gate ${token.gate_id} not found`);
69
+ const resolved = {
70
+ ...gates[idx],
71
+ status: 'resolved',
72
+ decision: resolution.decision,
73
+ actor: resolution.actor,
74
+ reason: resolution.reason ?? undefined,
75
+ resolved_at: new Date().toISOString(),
76
+ };
77
+ gates[idx] = resolved;
78
+ this.writeGates(gates);
79
+ (0, bus_1.appendEvent)(this.projectRoot, this.sessionId, {
80
+ type: 'GateResolved',
81
+ run_id: this.runId,
82
+ payload: {
83
+ gate_id: token.gate_id,
84
+ scope: token.scope,
85
+ decision: resolution.decision,
86
+ actor: resolution.actor,
87
+ },
88
+ });
89
+ return resolved;
90
+ }
91
+ isPending(scope) {
92
+ return this.readGates().some((g) => g.scope === scope && g.status === 'pending');
93
+ }
94
+ listPending() {
95
+ return this.readGates().filter((g) => g.status === 'pending');
96
+ }
97
+ listAll() {
98
+ return this.readGates();
99
+ }
100
+ get(gateId) {
101
+ return this.readGates().find((g) => g.gate_id === gateId) ?? null;
102
+ }
103
+ }
104
+ exports.GateManager = GateManager;
@@ -0,0 +1 @@
1
+ export * from './gate-manager';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./gate-manager"), exports);
@@ -0,0 +1,16 @@
1
+ export * from './models/index';
2
+ export * from './events/index';
3
+ export * from './reducers/index';
4
+ export * from './compiler/index';
5
+ export * from './scheduler/index';
6
+ export * from './workspace/index';
7
+ export * from './evidence/index';
8
+ export { compile as compileVerification, runCheck, runSuite, summarizeSuite, } from './verification/verification-compiler';
9
+ export type { CheckType, AcceptanceCheck, AcceptanceCheckSuite, CheckResult, } from './verification/verification-compiler';
10
+ export * from './policy/index';
11
+ export * from './gate/index';
12
+ export * from './projection/index';
13
+ export * from './plugins/index';
14
+ export * from './delivery/index';
15
+ export * from './context/index';
16
+ export * from './scheduler/multi-agent-coordinator';
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.summarizeSuite = exports.runSuite = exports.runCheck = exports.compileVerification = void 0;
18
+ // R1 Public ABI — OXE Runtime Foundation
19
+ __exportStar(require("./models/index"), exports);
20
+ __exportStar(require("./events/index"), exports);
21
+ __exportStar(require("./reducers/index"), exports);
22
+ __exportStar(require("./compiler/index"), exports);
23
+ __exportStar(require("./scheduler/index"), exports);
24
+ __exportStar(require("./workspace/index"), exports);
25
+ // R2 Public ABI — OXE Evidence & Verification
26
+ __exportStar(require("./evidence/index"), exports);
27
+ // verification exports compile as compileVerification to avoid conflict with compiler/compile
28
+ var verification_compiler_1 = require("./verification/verification-compiler");
29
+ Object.defineProperty(exports, "compileVerification", { enumerable: true, get: function () { return verification_compiler_1.compile; } });
30
+ Object.defineProperty(exports, "runCheck", { enumerable: true, get: function () { return verification_compiler_1.runCheck; } });
31
+ Object.defineProperty(exports, "runSuite", { enumerable: true, get: function () { return verification_compiler_1.runSuite; } });
32
+ Object.defineProperty(exports, "summarizeSuite", { enumerable: true, get: function () { return verification_compiler_1.summarizeSuite; } });
33
+ __exportStar(require("./policy/index"), exports);
34
+ __exportStar(require("./gate/index"), exports);
35
+ __exportStar(require("./projection/index"), exports);
36
+ // R3 Public ABI — OXE Delivery & Extensibility
37
+ __exportStar(require("./plugins/index"), exports);
38
+ __exportStar(require("./delivery/index"), exports);
39
+ __exportStar(require("./context/index"), exports);
40
+ __exportStar(require("./scheduler/multi-agent-coordinator"), exports);
@@ -0,0 +1,12 @@
1
+ export type AttemptOutcome = 'success' | 'failure_env' | 'failure_policy' | 'failure_test' | 'failure_timeout' | 'cancelled';
2
+ export interface Attempt {
3
+ attempt_id: string;
4
+ work_item_id: string;
5
+ attempt_number: number;
6
+ workspace_id: string | null;
7
+ agent_profile: string | null;
8
+ model: string | null;
9
+ started_at: string;
10
+ ended_at: string | null;
11
+ outcome: AttemptOutcome | null;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export type EvidenceType = 'diff' | 'stdout' | 'stderr' | 'junit_xml' | 'coverage' | 'screenshot' | 'trace' | 'log' | 'security_report' | 'api_output' | 'summary';
2
+ export interface Evidence {
3
+ evidence_id: string;
4
+ attempt_id: string;
5
+ type: EvidenceType;
6
+ path: string;
7
+ checksum: string | null;
8
+ created_at: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export type GateDecisionValue = 'approved' | 'rejected' | 'approved_with_caveats' | 'needs_more_evidence';
2
+ export type GateScope = 'plan_approval' | 'critical_mutation' | 'security' | 'pr_promotion' | 'merge';
3
+ export interface GateDecision {
4
+ gate_id: string;
5
+ scope: GateScope;
6
+ decision: GateDecisionValue;
7
+ actor: string;
8
+ reason: string | null;
9
+ timestamp: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export * from './session';
2
+ export * from './run';
3
+ export * from './work-item';
4
+ export * from './attempt';
5
+ export * from './workspace';
6
+ export * from './evidence';
7
+ export * from './gate-decision';
8
+ export * from './verification-result';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./session"), exports);
18
+ __exportStar(require("./run"), exports);
19
+ __exportStar(require("./work-item"), exports);
20
+ __exportStar(require("./attempt"), exports);
21
+ __exportStar(require("./workspace"), exports);
22
+ __exportStar(require("./evidence"), exports);
23
+ __exportStar(require("./gate-decision"), exports);
24
+ __exportStar(require("./verification-result"), exports);
@@ -0,0 +1,13 @@
1
+ export type RunStatus = 'planned' | 'running' | 'paused' | 'waiting_approval' | 'failed' | 'completed' | 'replaying' | 'aborted' | 'cancelled';
2
+ export type RunMode = 'completo' | 'por_onda' | 'por_tarefa';
3
+ export type RunInitiator = 'user' | 'scheduler' | 'retry' | 'replay';
4
+ export interface Run {
5
+ run_id: string;
6
+ session_id: string | null;
7
+ graph_version: string;
8
+ started_at: string;
9
+ ended_at: string | null;
10
+ status: RunStatus;
11
+ initiator: RunInitiator;
12
+ mode: RunMode;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export type SessionStatus = 'active' | 'archived' | 'closed';
2
+ export interface Session {
3
+ session_id: string;
4
+ title: string;
5
+ created_at: string;
6
+ status: SessionStatus;
7
+ repo_root: string;
8
+ baseline_commit: string | null;
9
+ active_run_id: string | null;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ export type VerificationStatus = 'pass' | 'fail' | 'skip' | 'error';
2
+ export interface VerificationResult {
3
+ verification_id: string;
4
+ work_item_id: string;
5
+ check_id: string;
6
+ status: VerificationStatus;
7
+ evidence_refs: string[];
8
+ summary: string | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type { WorkspaceStrategy } from './workspace';
2
+ export type WorkItemStatus = 'pending' | 'ready' | 'running' | 'completed' | 'failed' | 'blocked' | 'skipped';
3
+ export type WorkItemType = 'task' | 'checkpoint' | 'gate' | 'verification';
4
+ export interface WorkItem {
5
+ work_item_id: string;
6
+ run_id: string;
7
+ title: string;
8
+ type: WorkItemType;
9
+ depends_on: string[];
10
+ mutation_scope: string[];
11
+ policy_ref: string | null;
12
+ verify_ref: string[];
13
+ status: WorkItemStatus;
14
+ workspace_strategy: WorkspaceStrategy;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ export type WorkspaceStrategy = 'inplace' | 'git_worktree' | 'ephemeral_container';
2
+ export type WorkspaceStatus = 'allocating' | 'ready' | 'dirty' | 'disposed' | 'error';
3
+ export interface Workspace {
4
+ workspace_id: string;
5
+ strategy: WorkspaceStrategy;
6
+ base_commit: string | null;
7
+ branch: string | null;
8
+ container_ref: string | null;
9
+ status: WorkspaceStatus;
10
+ root_path: string;
11
+ }
12
+ export interface WorkspaceLease {
13
+ workspace_id: string;
14
+ strategy: WorkspaceStrategy;
15
+ branch: string | null;
16
+ base_commit: string | null;
17
+ root_path: string;
18
+ ttl_minutes: number;
19
+ }
20
+ export interface SnapshotRef {
21
+ snapshot_id: string;
22
+ workspace_id: string;
23
+ commit: string;
24
+ created_at: string;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './plugin-abi';
2
+ export * from './plugin-registry';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./plugin-abi"), exports);
18
+ __exportStar(require("./plugin-registry"), exports);
@@ -0,0 +1,76 @@
1
+ import type { WorkspaceManager } from '../workspace/workspace-manager';
2
+ import type { VerificationResult } from '../models/verification-result';
3
+ export interface ToolInvocationInput {
4
+ action_type: string;
5
+ work_item_id: string;
6
+ run_id: string;
7
+ attempt_id: string;
8
+ params: Record<string, unknown>;
9
+ workspace_root: string;
10
+ }
11
+ export interface ToolInvocationResult {
12
+ success: boolean;
13
+ output: string;
14
+ evidence_paths: string[];
15
+ side_effects_applied: string[];
16
+ error?: string;
17
+ }
18
+ export interface ToolProvider {
19
+ readonly name: string;
20
+ readonly kind: 'read' | 'mutation' | 'verification' | 'analysis' | 'external_operation';
21
+ readonly idempotent: boolean;
22
+ supports(actionType: string): boolean;
23
+ invoke(input: ToolInvocationInput): Promise<ToolInvocationResult>;
24
+ }
25
+ export interface WorkspaceProvider extends WorkspaceManager {
26
+ readonly name: string;
27
+ supportsStrategy(strategy: string): boolean;
28
+ }
29
+ export interface VerificationInput {
30
+ check_id: string;
31
+ check_type: string;
32
+ command: string | null;
33
+ work_item_id: string;
34
+ workspace_root: string;
35
+ evidence_dir: string;
36
+ }
37
+ export interface VerifierProvider {
38
+ readonly name: string;
39
+ supports(checkType: string): boolean;
40
+ execute(input: VerificationInput): Promise<VerificationResult>;
41
+ }
42
+ export interface ContextRequest {
43
+ work_item_id: string;
44
+ run_id: string;
45
+ decision_type: 'execute' | 'verify' | 'plan' | 'review';
46
+ artifact_paths: string[];
47
+ project_root: string;
48
+ }
49
+ export interface PluginContextArtifact {
50
+ source: string;
51
+ weight: number;
52
+ reason: string;
53
+ content?: string;
54
+ }
55
+ export interface PluginContextArtifacts {
56
+ included: PluginContextArtifact[];
57
+ excluded: Array<{
58
+ source: string;
59
+ reason: string;
60
+ }>;
61
+ total_weight: number;
62
+ }
63
+ export interface ContextProvider {
64
+ readonly name: string;
65
+ collect(input: ContextRequest): Promise<PluginContextArtifacts>;
66
+ }
67
+ export interface OxePlugin {
68
+ readonly name: string;
69
+ readonly version?: string;
70
+ toolProviders?: ToolProvider[];
71
+ workspaceProviders?: WorkspaceProvider[];
72
+ verifierProviders?: VerifierProvider[];
73
+ contextProviders?: ContextProvider[];
74
+ /** Legacy lifecycle hooks (compatible with oxe-plugins.cjs) */
75
+ hooks?: Record<string, (ctx: Record<string, unknown>) => Promise<void> | void>;
76
+ }