oxe-cc 0.9.3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/commands/oxe-ask.md +1 -1
- package/.cursor/commands/oxe-capabilities.md +1 -1
- package/.cursor/commands/oxe-checkpoint.md +1 -1
- package/.cursor/commands/oxe-compact.md +1 -1
- package/.cursor/commands/oxe-dashboard.md +1 -1
- package/.cursor/commands/oxe-debug.md +1 -1
- package/.cursor/commands/oxe-discuss.md +1 -1
- package/.cursor/commands/oxe-execute.md +2 -2
- package/.cursor/commands/oxe-forensics.md +1 -1
- package/.cursor/commands/oxe-help.md +1 -1
- package/.cursor/commands/oxe-loop.md +1 -1
- package/.cursor/commands/oxe-milestone.md +1 -1
- package/.cursor/commands/oxe-next.md +1 -1
- package/.cursor/commands/oxe-obs.md +1 -1
- package/.cursor/commands/oxe-plan-agent.md +1 -1
- package/.cursor/commands/oxe-plan.md +1 -1
- package/.cursor/commands/oxe-project.md +1 -1
- package/.cursor/commands/oxe-quick.md +1 -1
- package/.cursor/commands/oxe-research.md +1 -1
- package/.cursor/commands/oxe-retro.md +1 -1
- package/.cursor/commands/oxe-review-pr.md +1 -1
- package/.cursor/commands/oxe-route.md +1 -1
- package/.cursor/commands/oxe-scan.md +1 -1
- package/.cursor/commands/oxe-security.md +1 -1
- package/.cursor/commands/oxe-session.md +2 -2
- package/.cursor/commands/oxe-ship.md +45 -0
- package/.cursor/commands/oxe-skill.md +1 -1
- package/.cursor/commands/oxe-spec.md +1 -1
- package/.cursor/commands/oxe-ui-review.md +1 -1
- package/.cursor/commands/oxe-ui-spec.md +1 -1
- package/.cursor/commands/oxe-update.md +1 -1
- package/.cursor/commands/oxe-validate-gaps.md +1 -1
- package/.cursor/commands/oxe-verify.md +1 -1
- package/.cursor/commands/oxe-workstream.md +1 -1
- package/.cursor/commands/oxe.md +4 -4
- package/.github/copilot-instructions.md +91 -1
- package/.github/prompts/oxe-ask.prompt.md +1 -1
- package/.github/prompts/oxe-capabilities.prompt.md +1 -1
- package/.github/prompts/oxe-checkpoint.prompt.md +1 -1
- package/.github/prompts/oxe-compact.prompt.md +1 -1
- package/.github/prompts/oxe-dashboard.prompt.md +1 -1
- package/.github/prompts/oxe-debug.prompt.md +1 -1
- package/.github/prompts/oxe-discuss.prompt.md +1 -1
- package/.github/prompts/oxe-execute.prompt.md +2 -2
- package/.github/prompts/oxe-forensics.prompt.md +1 -1
- package/.github/prompts/oxe-help.prompt.md +1 -1
- package/.github/prompts/oxe-loop.prompt.md +1 -1
- package/.github/prompts/oxe-milestone.prompt.md +1 -1
- package/.github/prompts/oxe-next.prompt.md +1 -1
- package/.github/prompts/oxe-obs.prompt.md +1 -1
- package/.github/prompts/oxe-plan-agent.prompt.md +1 -1
- package/.github/prompts/oxe-plan.prompt.md +1 -1
- package/.github/prompts/oxe-project.prompt.md +1 -1
- package/.github/prompts/oxe-quick.prompt.md +1 -1
- package/.github/prompts/oxe-research.prompt.md +1 -1
- package/.github/prompts/oxe-retro.prompt.md +1 -1
- package/.github/prompts/oxe-review-pr.prompt.md +1 -1
- package/.github/prompts/oxe-route.prompt.md +1 -1
- package/.github/prompts/oxe-scan.prompt.md +1 -1
- package/.github/prompts/oxe-security.prompt.md +1 -1
- package/.github/prompts/oxe-session.prompt.md +2 -2
- package/.github/prompts/oxe-ship.prompt.md +45 -0
- package/.github/prompts/oxe-skill.prompt.md +1 -1
- package/.github/prompts/oxe-spec.prompt.md +1 -1
- package/.github/prompts/oxe-ui-review.prompt.md +1 -1
- package/.github/prompts/oxe-ui-spec.prompt.md +1 -1
- package/.github/prompts/oxe-update.prompt.md +1 -1
- package/.github/prompts/oxe-validate-gaps.prompt.md +1 -1
- package/.github/prompts/oxe-verify.prompt.md +1 -1
- package/.github/prompts/oxe-workstream.prompt.md +1 -1
- package/.github/prompts/oxe.prompt.md +3 -3
- package/AGENTS.md +43 -28
- package/CHANGELOG.md +158 -0
- package/README.md +72 -50
- package/bin/banner.txt +1 -1
- package/bin/lib/oxe-dashboard.cjs +9 -7
- package/bin/lib/oxe-operational.cjs +569 -4
- package/bin/lib/oxe-project-health.cjs +1 -1
- package/bin/oxe-cc.js +141 -57
- package/commands/oxe/ask.md +5 -1
- package/commands/oxe/checkpoint.md +1 -1
- package/commands/oxe/compact.md +1 -1
- package/commands/oxe/debug.md +1 -1
- package/commands/oxe/execute.md +2 -2
- package/commands/oxe/forensics.md +1 -1
- package/commands/oxe/loop.md +1 -1
- package/commands/oxe/milestone.md +1 -1
- package/commands/oxe/next.md +1 -1
- package/commands/oxe/obs.md +1 -1
- package/commands/oxe/oxe.md +3 -3
- package/commands/oxe/project.md +1 -1
- package/commands/oxe/research.md +1 -1
- package/commands/oxe/retro.md +1 -1
- package/commands/oxe/review-pr.md +1 -1
- package/commands/oxe/route.md +1 -1
- package/commands/oxe/scan.md +1 -1
- package/commands/oxe/security.md +1 -1
- package/commands/oxe/session.md +2 -2
- package/commands/oxe/ship.md +49 -0
- package/commands/oxe/spec.md +2 -2
- package/commands/oxe/ui-review.md +1 -1
- package/commands/oxe/ui-spec.md +1 -1
- package/commands/oxe/validate-gaps.md +1 -1
- package/commands/oxe/verify.md +2 -2
- package/commands/oxe/workstream.md +1 -1
- package/lib/runtime/audit/audit-trail.d.ts +71 -0
- package/lib/runtime/audit/audit-trail.js +154 -0
- package/lib/runtime/audit/index.d.ts +2 -0
- package/lib/runtime/audit/index.js +18 -0
- package/lib/runtime/audit/policy-pack.d.ts +15 -0
- package/lib/runtime/audit/policy-pack.js +57 -0
- package/lib/runtime/compiler/graph-compiler.d.ts +83 -0
- package/lib/runtime/compiler/graph-compiler.js +135 -0
- package/lib/runtime/compiler/index.d.ts +1 -0
- package/lib/runtime/compiler/index.js +17 -0
- package/lib/runtime/context/context-pack-builder.d.ts +51 -0
- package/lib/runtime/context/context-pack-builder.js +178 -0
- package/lib/runtime/context/context-pack-store.d.ts +38 -0
- package/lib/runtime/context/context-pack-store.js +142 -0
- package/lib/runtime/context/context-profiles.d.ts +11 -0
- package/lib/runtime/context/context-profiles.js +51 -0
- package/lib/runtime/context/index.d.ts +3 -0
- package/lib/runtime/context/index.js +19 -0
- package/lib/runtime/decision/decision-engine.d.ts +43 -0
- package/lib/runtime/decision/decision-engine.js +127 -0
- package/lib/runtime/decision/decision-memo.d.ts +53 -0
- package/lib/runtime/decision/decision-memo.js +173 -0
- package/lib/runtime/decision/index.d.ts +2 -0
- package/lib/runtime/decision/index.js +18 -0
- package/lib/runtime/delivery/branch-manager.d.ts +19 -0
- package/lib/runtime/delivery/branch-manager.js +78 -0
- package/lib/runtime/delivery/ci-checks.d.ts +34 -0
- package/lib/runtime/delivery/ci-checks.js +209 -0
- package/lib/runtime/delivery/index.d.ts +4 -0
- package/lib/runtime/delivery/index.js +20 -0
- package/lib/runtime/delivery/pr-manager.d.ts +30 -0
- package/lib/runtime/delivery/pr-manager.js +82 -0
- package/lib/runtime/delivery/promotion-pipeline.d.ts +39 -0
- package/lib/runtime/delivery/promotion-pipeline.js +127 -0
- package/lib/runtime/events/bus.d.ts +9 -0
- package/lib/runtime/events/bus.js +63 -0
- package/lib/runtime/events/catalog.d.ts +3 -0
- package/lib/runtime/events/catalog.js +30 -0
- package/lib/runtime/events/envelope.d.ts +13 -0
- package/lib/runtime/events/envelope.js +2 -0
- package/lib/runtime/events/index.d.ts +3 -0
- package/lib/runtime/events/index.js +19 -0
- package/lib/runtime/evidence/evidence-store.d.ts +22 -0
- package/lib/runtime/evidence/evidence-store.js +106 -0
- package/lib/runtime/evidence/index.d.ts +1 -0
- package/lib/runtime/evidence/index.js +17 -0
- package/lib/runtime/gate/gate-manager.d.ts +39 -0
- package/lib/runtime/gate/gate-manager.js +104 -0
- package/lib/runtime/gate/index.d.ts +1 -0
- package/lib/runtime/gate/index.js +17 -0
- package/lib/runtime/index.d.ts +19 -0
- package/lib/runtime/index.js +44 -0
- package/lib/runtime/models/attempt.d.ts +12 -0
- package/lib/runtime/models/attempt.js +2 -0
- package/lib/runtime/models/evidence.d.ts +9 -0
- package/lib/runtime/models/evidence.js +2 -0
- package/lib/runtime/models/gate-decision.d.ts +10 -0
- package/lib/runtime/models/gate-decision.js +2 -0
- package/lib/runtime/models/index.d.ts +8 -0
- package/lib/runtime/models/index.js +24 -0
- package/lib/runtime/models/run.d.ts +13 -0
- package/lib/runtime/models/run.js +2 -0
- package/lib/runtime/models/session.d.ts +10 -0
- package/lib/runtime/models/session.js +2 -0
- package/lib/runtime/models/verification-result.d.ts +9 -0
- package/lib/runtime/models/verification-result.js +2 -0
- package/lib/runtime/models/work-item.d.ts +15 -0
- package/lib/runtime/models/work-item.js +2 -0
- package/lib/runtime/models/workspace.d.ts +25 -0
- package/lib/runtime/models/workspace.js +2 -0
- package/lib/runtime/plugins/capability-matrix.d.ts +20 -0
- package/lib/runtime/plugins/capability-matrix.js +59 -0
- package/lib/runtime/plugins/index.d.ts +4 -0
- package/lib/runtime/plugins/index.js +20 -0
- package/lib/runtime/plugins/plugin-abi.d.ts +76 -0
- package/lib/runtime/plugins/plugin-abi.js +2 -0
- package/lib/runtime/plugins/plugin-manifest.d.ts +22 -0
- package/lib/runtime/plugins/plugin-manifest.js +91 -0
- package/lib/runtime/plugins/plugin-registry.d.ts +21 -0
- package/lib/runtime/plugins/plugin-registry.js +119 -0
- package/lib/runtime/policy/index.d.ts +1 -0
- package/lib/runtime/policy/index.js +17 -0
- package/lib/runtime/policy/policy-engine.d.ts +67 -0
- package/lib/runtime/policy/policy-engine.js +171 -0
- package/lib/runtime/projection/index.d.ts +1 -0
- package/lib/runtime/projection/index.js +17 -0
- package/lib/runtime/projection/projection-engine.d.ts +11 -0
- package/lib/runtime/projection/projection-engine.js +218 -0
- package/lib/runtime/reducers/debug-reducer.d.ts +10 -0
- package/lib/runtime/reducers/debug-reducer.js +30 -0
- package/lib/runtime/reducers/index.d.ts +2 -0
- package/lib/runtime/reducers/index.js +18 -0
- package/lib/runtime/reducers/run-state-reducer.d.ts +46 -0
- package/lib/runtime/reducers/run-state-reducer.js +226 -0
- package/lib/runtime/scheduler/agent-registry.d.ts +44 -0
- package/lib/runtime/scheduler/agent-registry.js +96 -0
- package/lib/runtime/scheduler/agent-roles.d.ts +54 -0
- package/lib/runtime/scheduler/agent-roles.js +62 -0
- package/lib/runtime/scheduler/index.d.ts +4 -0
- package/lib/runtime/scheduler/index.js +20 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +36 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.js +253 -0
- package/lib/runtime/scheduler/run-journal.d.ts +18 -0
- package/lib/runtime/scheduler/run-journal.js +54 -0
- package/lib/runtime/scheduler/scheduler.d.ts +49 -0
- package/lib/runtime/scheduler/scheduler.js +324 -0
- package/lib/runtime/verification/index.d.ts +2 -0
- package/lib/runtime/verification/index.js +18 -0
- package/lib/runtime/verification/verification-compiler.d.ts +56 -0
- package/lib/runtime/verification/verification-compiler.js +147 -0
- package/lib/runtime/verification/verification-manifest.d.ts +58 -0
- package/lib/runtime/verification/verification-manifest.js +129 -0
- package/lib/runtime/workspace/index.d.ts +5 -0
- package/lib/runtime/workspace/index.js +24 -0
- package/lib/runtime/workspace/strategies/ephemeral-container.d.ts +22 -0
- package/lib/runtime/workspace/strategies/ephemeral-container.js +109 -0
- package/lib/runtime/workspace/strategies/git-worktree.d.ts +12 -0
- package/lib/runtime/workspace/strategies/git-worktree.js +79 -0
- package/lib/runtime/workspace/strategies/inplace.d.ts +10 -0
- package/lib/runtime/workspace/strategies/inplace.js +37 -0
- package/lib/runtime/workspace/workspace-manager.d.ts +13 -0
- package/lib/runtime/workspace/workspace-manager.js +2 -0
- package/lib/sdk/index.cjs +24 -7
- package/lib/sdk/index.d.ts +17 -7
- package/oxe/workflows/ask.md +4 -0
- package/oxe/workflows/checkpoint.md +14 -10
- package/oxe/workflows/debug.md +19 -15
- package/oxe/workflows/execute.md +30 -2
- package/oxe/workflows/forensics.md +13 -9
- package/oxe/workflows/help.md +97 -49
- package/oxe/workflows/loop.md +17 -13
- package/oxe/workflows/obs.md +4 -0
- package/oxe/workflows/oxe.md +64 -31
- package/oxe/workflows/project.md +6 -1
- package/oxe/workflows/references/workflow-runtime-contracts.json +23 -0
- package/oxe/workflows/research.md +32 -28
- package/oxe/workflows/retro.md +4 -0
- package/oxe/workflows/review-pr.md +15 -11
- package/oxe/workflows/scan.md +4 -0
- package/oxe/workflows/security.md +14 -10
- package/oxe/workflows/session.md +17 -1
- package/oxe/workflows/ship.md +142 -0
- package/oxe/workflows/spec.md +15 -0
- package/oxe/workflows/ui-review.md +20 -16
- package/oxe/workflows/ui-spec.md +7 -3
- package/oxe/workflows/validate-gaps.md +13 -9
- package/oxe/workflows/verify.md +42 -3
- package/package.json +9 -3
- package/packages/runtime/package.json +17 -0
- package/packages/runtime/src/audit/audit-trail.ts +243 -0
- package/packages/runtime/src/audit/index.ts +2 -0
- package/packages/runtime/src/audit/policy-pack.ts +62 -0
- package/packages/runtime/src/compiler/graph-compiler.ts +245 -0
- package/packages/runtime/src/compiler/index.ts +1 -0
- package/packages/runtime/src/context/context-pack-builder.ts +259 -0
- package/packages/runtime/src/context/context-pack-store.ts +197 -0
- package/packages/runtime/src/context/context-profiles.ts +60 -0
- package/packages/runtime/src/context/index.ts +3 -0
- package/packages/runtime/src/decision/decision-engine.ts +174 -0
- package/packages/runtime/src/decision/decision-memo.ts +211 -0
- package/packages/runtime/src/decision/index.ts +2 -0
- package/packages/runtime/src/delivery/branch-manager.ts +84 -0
- package/packages/runtime/src/delivery/ci-checks.ts +252 -0
- package/packages/runtime/src/delivery/index.ts +4 -0
- package/packages/runtime/src/delivery/pr-manager.ts +112 -0
- package/packages/runtime/src/delivery/promotion-pipeline.ts +180 -0
- package/packages/runtime/src/events/bus.ts +92 -0
- package/packages/runtime/src/events/catalog.ts +29 -0
- package/packages/runtime/src/events/envelope.ts +14 -0
- package/packages/runtime/src/events/index.ts +3 -0
- package/packages/runtime/src/evidence/evidence-store.ts +130 -0
- package/packages/runtime/src/evidence/index.ts +1 -0
- package/packages/runtime/src/gate/gate-manager.ts +137 -0
- package/packages/runtime/src/gate/index.ts +1 -0
- package/packages/runtime/src/index.ts +37 -0
- package/packages/runtime/src/models/attempt.ts +19 -0
- package/packages/runtime/src/models/evidence.ts +21 -0
- package/packages/runtime/src/models/gate-decision.ts +21 -0
- package/packages/runtime/src/models/index.ts +8 -0
- package/packages/runtime/src/models/run.ts +24 -0
- package/packages/runtime/src/models/session.ts +11 -0
- package/packages/runtime/src/models/verification-result.ts +10 -0
- package/packages/runtime/src/models/work-item.ts +25 -0
- package/packages/runtime/src/models/workspace.ts +28 -0
- package/packages/runtime/src/plugins/capability-matrix.ts +83 -0
- package/packages/runtime/src/plugins/index.ts +4 -0
- package/packages/runtime/src/plugins/plugin-abi.ts +95 -0
- package/packages/runtime/src/plugins/plugin-manifest.ts +113 -0
- package/packages/runtime/src/plugins/plugin-registry.ts +124 -0
- package/packages/runtime/src/policy/index.ts +1 -0
- package/packages/runtime/src/policy/policy-engine.ts +244 -0
- package/packages/runtime/src/projection/index.ts +1 -0
- package/packages/runtime/src/projection/projection-engine.ts +249 -0
- package/packages/runtime/src/reducers/debug-reducer.ts +36 -0
- package/packages/runtime/src/reducers/index.ts +2 -0
- package/packages/runtime/src/reducers/run-state-reducer.ts +269 -0
- package/packages/runtime/src/scheduler/agent-registry.ts +132 -0
- package/packages/runtime/src/scheduler/agent-roles.ts +109 -0
- package/packages/runtime/src/scheduler/index.ts +4 -0
- package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +333 -0
- package/packages/runtime/src/scheduler/run-journal.ts +62 -0
- package/packages/runtime/src/scheduler/scheduler.ts +441 -0
- package/packages/runtime/src/verification/index.ts +2 -0
- package/packages/runtime/src/verification/verification-compiler.ts +225 -0
- package/packages/runtime/src/verification/verification-manifest.ts +192 -0
- package/packages/runtime/src/workspace/index.ts +5 -0
- package/packages/runtime/src/workspace/strategies/ephemeral-container.ts +121 -0
- package/packages/runtime/src/workspace/strategies/git-worktree.ts +77 -0
- package/packages/runtime/src/workspace/strategies/inplace.ts +35 -0
- package/packages/runtime/src/workspace/workspace-manager.ts +15 -0
- package/packages/runtime/tsconfig.json +17 -0
- package/vscode-extension/oxe-agents-0.9.2.vsix +0 -0
- package/vscode-extension/oxe-agents-1.0.0.vsix +0 -0
- package/vscode-extension/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
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("./verification/verification-manifest"), exports);
|
|
34
|
+
__exportStar(require("./policy/index"), exports);
|
|
35
|
+
__exportStar(require("./gate/index"), exports);
|
|
36
|
+
__exportStar(require("./projection/index"), exports);
|
|
37
|
+
// R3 Public ABI — OXE Delivery & Extensibility
|
|
38
|
+
__exportStar(require("./plugins/index"), exports);
|
|
39
|
+
__exportStar(require("./delivery/index"), exports);
|
|
40
|
+
__exportStar(require("./context/index"), exports);
|
|
41
|
+
__exportStar(require("./scheduler/multi-agent-coordinator"), exports);
|
|
42
|
+
// R4 Public ABI — Decision, Audit & Enterprise
|
|
43
|
+
__exportStar(require("./decision/index"), exports);
|
|
44
|
+
__exportStar(require("./audit/index"), 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,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,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,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,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,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,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,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,20 @@
|
|
|
1
|
+
import type { PluginRegistry } from './plugin-registry';
|
|
2
|
+
export type ApiStability = 'stable' | 'experimental' | 'deprecated';
|
|
3
|
+
export interface ProviderCapabilityEntry {
|
|
4
|
+
name: string;
|
|
5
|
+
provider_type: 'tool' | 'workspace' | 'verifier' | 'context';
|
|
6
|
+
stability: ApiStability;
|
|
7
|
+
since_abi_version: string;
|
|
8
|
+
deprecated_in?: string;
|
|
9
|
+
replacement?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CapabilityMatrix {
|
|
12
|
+
abi_version: string;
|
|
13
|
+
entries: ProviderCapabilityEntry[];
|
|
14
|
+
}
|
|
15
|
+
export declare function buildMatrix(registry: PluginRegistry): CapabilityMatrix;
|
|
16
|
+
export declare function getStableEntries(matrix: CapabilityMatrix): ProviderCapabilityEntry[];
|
|
17
|
+
export declare function getExperimentalEntries(matrix: CapabilityMatrix): ProviderCapabilityEntry[];
|
|
18
|
+
export declare function getDeprecatedEntries(matrix: CapabilityMatrix): ProviderCapabilityEntry[];
|
|
19
|
+
export declare function markDeprecated(matrix: CapabilityMatrix, name: string, deprecatedIn: string, replacement?: string): CapabilityMatrix;
|
|
20
|
+
export declare function addEntry(matrix: CapabilityMatrix, entry: ProviderCapabilityEntry): CapabilityMatrix;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildMatrix = buildMatrix;
|
|
4
|
+
exports.getStableEntries = getStableEntries;
|
|
5
|
+
exports.getExperimentalEntries = getExperimentalEntries;
|
|
6
|
+
exports.getDeprecatedEntries = getDeprecatedEntries;
|
|
7
|
+
exports.markDeprecated = markDeprecated;
|
|
8
|
+
exports.addEntry = addEntry;
|
|
9
|
+
const plugin_manifest_1 = require("./plugin-manifest");
|
|
10
|
+
function buildMatrix(registry) {
|
|
11
|
+
const entries = [];
|
|
12
|
+
for (const plugin of registry.list()) {
|
|
13
|
+
const providers = plugin.providers ?? [];
|
|
14
|
+
for (const prov of providers) {
|
|
15
|
+
let provider_type;
|
|
16
|
+
if (prov.startsWith('tool:'))
|
|
17
|
+
provider_type = 'tool';
|
|
18
|
+
else if (prov.startsWith('workspace:'))
|
|
19
|
+
provider_type = 'workspace';
|
|
20
|
+
else if (prov.startsWith('verifier:'))
|
|
21
|
+
provider_type = 'verifier';
|
|
22
|
+
else if (prov.startsWith('context:'))
|
|
23
|
+
provider_type = 'context';
|
|
24
|
+
else
|
|
25
|
+
continue;
|
|
26
|
+
const name = prov.slice(prov.indexOf(':') + 1);
|
|
27
|
+
entries.push({
|
|
28
|
+
name,
|
|
29
|
+
provider_type,
|
|
30
|
+
stability: 'stable',
|
|
31
|
+
since_abi_version: plugin_manifest_1.CURRENT_ABI_VERSION,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { abi_version: plugin_manifest_1.CURRENT_ABI_VERSION, entries };
|
|
36
|
+
}
|
|
37
|
+
function getStableEntries(matrix) {
|
|
38
|
+
return matrix.entries.filter((e) => e.stability === 'stable');
|
|
39
|
+
}
|
|
40
|
+
function getExperimentalEntries(matrix) {
|
|
41
|
+
return matrix.entries.filter((e) => e.stability === 'experimental');
|
|
42
|
+
}
|
|
43
|
+
function getDeprecatedEntries(matrix) {
|
|
44
|
+
return matrix.entries.filter((e) => e.stability === 'deprecated');
|
|
45
|
+
}
|
|
46
|
+
function markDeprecated(matrix, name, deprecatedIn, replacement) {
|
|
47
|
+
return {
|
|
48
|
+
...matrix,
|
|
49
|
+
entries: matrix.entries.map((e) => e.name === name
|
|
50
|
+
? { ...e, stability: 'deprecated', deprecated_in: deprecatedIn, replacement }
|
|
51
|
+
: e),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function addEntry(matrix, entry) {
|
|
55
|
+
if (matrix.entries.some((e) => e.name === entry.name && e.provider_type === entry.provider_type)) {
|
|
56
|
+
return matrix;
|
|
57
|
+
}
|
|
58
|
+
return { ...matrix, entries: [...matrix.entries, entry] };
|
|
59
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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);
|
|
19
|
+
__exportStar(require("./plugin-manifest"), exports);
|
|
20
|
+
__exportStar(require("./capability-matrix"), 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
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OxePlugin } from './plugin-abi';
|
|
2
|
+
export declare const CURRENT_ABI_VERSION = "1.0.0";
|
|
3
|
+
export interface PluginManifest {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
abi_version: string;
|
|
7
|
+
capabilities: Array<'tool' | 'workspace' | 'verifier' | 'context' | 'hooks'>;
|
|
8
|
+
tool_action_types?: string[];
|
|
9
|
+
workspace_strategies?: string[];
|
|
10
|
+
verifier_check_types?: string[];
|
|
11
|
+
context_provider_names?: string[];
|
|
12
|
+
hook_names?: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface PluginValidationResult {
|
|
15
|
+
valid: boolean;
|
|
16
|
+
errors: string[];
|
|
17
|
+
warnings: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare function extractManifest(plugin: OxePlugin): PluginManifest;
|
|
20
|
+
export declare function validatePlugin(plugin: OxePlugin): PluginValidationResult;
|
|
21
|
+
export declare function isAbiCompatible(pluginAbiVersion: string): boolean;
|
|
22
|
+
export declare function sandboxInvoke<T>(fn: () => Promise<T>, timeoutMs?: number): Promise<T>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CURRENT_ABI_VERSION = void 0;
|
|
4
|
+
exports.extractManifest = extractManifest;
|
|
5
|
+
exports.validatePlugin = validatePlugin;
|
|
6
|
+
exports.isAbiCompatible = isAbiCompatible;
|
|
7
|
+
exports.sandboxInvoke = sandboxInvoke;
|
|
8
|
+
exports.CURRENT_ABI_VERSION = '1.0.0';
|
|
9
|
+
function extractManifest(plugin) {
|
|
10
|
+
const capabilities = [];
|
|
11
|
+
if (plugin.toolProviders?.length)
|
|
12
|
+
capabilities.push('tool');
|
|
13
|
+
if (plugin.workspaceProviders?.length)
|
|
14
|
+
capabilities.push('workspace');
|
|
15
|
+
if (plugin.verifierProviders?.length)
|
|
16
|
+
capabilities.push('verifier');
|
|
17
|
+
if (plugin.contextProviders?.length)
|
|
18
|
+
capabilities.push('context');
|
|
19
|
+
if (plugin.hooks && Object.keys(plugin.hooks).length > 0)
|
|
20
|
+
capabilities.push('hooks');
|
|
21
|
+
return {
|
|
22
|
+
name: plugin.name,
|
|
23
|
+
version: plugin.version ?? '0.0.0',
|
|
24
|
+
abi_version: exports.CURRENT_ABI_VERSION,
|
|
25
|
+
capabilities,
|
|
26
|
+
tool_action_types: plugin.toolProviders?.flatMap((p) => ['read_code', 'generate_patch', 'run_tests', 'collect_evidence', 'custom'].filter((t) => p.supports(t))) ?? [],
|
|
27
|
+
workspace_strategies: plugin.workspaceProviders?.map((p) => p.name) ?? [],
|
|
28
|
+
verifier_check_types: plugin.verifierProviders?.flatMap((p) => ['unit', 'integration', 'smoke', 'policy', 'security', 'custom'].filter((t) => p.supports(t))) ?? [],
|
|
29
|
+
context_provider_names: plugin.contextProviders?.map((p) => p.name) ?? [],
|
|
30
|
+
hook_names: plugin.hooks ? Object.keys(plugin.hooks) : [],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function validatePlugin(plugin) {
|
|
34
|
+
const errors = [];
|
|
35
|
+
const warnings = [];
|
|
36
|
+
if (!plugin.name || typeof plugin.name !== 'string') {
|
|
37
|
+
errors.push('Plugin must have a non-empty string name');
|
|
38
|
+
}
|
|
39
|
+
if (plugin.version && !/^\d+\.\d+\.\d+/.test(plugin.version)) {
|
|
40
|
+
warnings.push(`Plugin version "${plugin.version}" does not follow semver`);
|
|
41
|
+
}
|
|
42
|
+
if (!plugin.toolProviders?.length &&
|
|
43
|
+
!plugin.workspaceProviders?.length &&
|
|
44
|
+
!plugin.verifierProviders?.length &&
|
|
45
|
+
!plugin.contextProviders?.length &&
|
|
46
|
+
!plugin.hooks) {
|
|
47
|
+
warnings.push('Plugin declares no providers or hooks — it has no effect');
|
|
48
|
+
}
|
|
49
|
+
// Validate each tool provider
|
|
50
|
+
for (const tp of plugin.toolProviders ?? []) {
|
|
51
|
+
if (!tp.name)
|
|
52
|
+
errors.push('ToolProvider missing name');
|
|
53
|
+
if (typeof tp.supports !== 'function')
|
|
54
|
+
errors.push(`ToolProvider "${tp.name}" missing supports() method`);
|
|
55
|
+
if (typeof tp.invoke !== 'function')
|
|
56
|
+
errors.push(`ToolProvider "${tp.name}" missing invoke() method`);
|
|
57
|
+
}
|
|
58
|
+
// Validate each workspace provider
|
|
59
|
+
for (const wp of plugin.workspaceProviders ?? []) {
|
|
60
|
+
if (!wp.name)
|
|
61
|
+
errors.push('WorkspaceProvider missing name');
|
|
62
|
+
if (typeof wp.supportsStrategy !== 'function')
|
|
63
|
+
errors.push(`WorkspaceProvider "${wp.name}" missing supportsStrategy()`);
|
|
64
|
+
if (typeof wp.allocate !== 'function')
|
|
65
|
+
errors.push(`WorkspaceProvider "${wp.name}" missing allocate()`);
|
|
66
|
+
}
|
|
67
|
+
// Validate each verifier provider
|
|
68
|
+
for (const vp of plugin.verifierProviders ?? []) {
|
|
69
|
+
if (!vp.name)
|
|
70
|
+
errors.push('VerifierProvider missing name');
|
|
71
|
+
if (typeof vp.supports !== 'function')
|
|
72
|
+
errors.push(`VerifierProvider "${vp.name}" missing supports()`);
|
|
73
|
+
if (typeof vp.execute !== 'function')
|
|
74
|
+
errors.push(`VerifierProvider "${vp.name}" missing execute()`);
|
|
75
|
+
}
|
|
76
|
+
return { valid: errors.length === 0, errors, warnings };
|
|
77
|
+
}
|
|
78
|
+
function isAbiCompatible(pluginAbiVersion) {
|
|
79
|
+
// Major version must match; minor/patch are backwards-compatible
|
|
80
|
+
const [currMajor] = exports.CURRENT_ABI_VERSION.split('.').map(Number);
|
|
81
|
+
const [plugMajor] = pluginAbiVersion.split('.').map(Number);
|
|
82
|
+
return currMajor === plugMajor;
|
|
83
|
+
}
|
|
84
|
+
function sandboxInvoke(fn, timeoutMs = 10000) {
|
|
85
|
+
return new Promise((resolve, reject) => {
|
|
86
|
+
const timer = setTimeout(() => {
|
|
87
|
+
reject(new Error(`Plugin invocation timed out after ${timeoutMs}ms`));
|
|
88
|
+
}, timeoutMs);
|
|
89
|
+
fn().then((result) => { clearTimeout(timer); resolve(result); }, (err) => { clearTimeout(timer); reject(err instanceof Error ? err : new Error(String(err))); });
|
|
90
|
+
});
|
|
91
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OxePlugin, ToolProvider, WorkspaceProvider, VerifierProvider, ContextProvider } from './plugin-abi';
|
|
2
|
+
export declare class PluginRegistry {
|
|
3
|
+
private plugins;
|
|
4
|
+
register(plugin: OxePlugin): void;
|
|
5
|
+
unregister(name: string): void;
|
|
6
|
+
loadFromDirectory(dir: string): string[];
|
|
7
|
+
toolProviderFor(actionType: string): ToolProvider | null;
|
|
8
|
+
workspaceProviderFor(strategy: string): WorkspaceProvider | null;
|
|
9
|
+
verifierProviderFor(checkType: string): VerifierProvider | null;
|
|
10
|
+
contextProviderFor(name: string): ContextProvider | null;
|
|
11
|
+
allContextProviders(): ContextProvider[];
|
|
12
|
+
allToolProviders(): ToolProvider[];
|
|
13
|
+
runHook(hookName: string, ctx: Record<string, unknown>): Promise<void>;
|
|
14
|
+
list(): Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
providers: string[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare function globalRegistry(): PluginRegistry;
|
|
21
|
+
export declare function resetGlobalRegistry(): void;
|