oxe-cc 1.4.1 → 1.5.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/.cursor/commands/oxe-verify-audit.md +46 -0
- package/.cursor/commands/oxe-workflow-authoring.md +47 -0
- package/.github/prompts/oxe-compact.prompt.md +1 -1
- package/.github/prompts/oxe-plan-agent.prompt.md +1 -0
- package/.github/prompts/oxe-verify-audit.prompt.md +46 -0
- package/.github/prompts/oxe-workflow-authoring.prompt.md +47 -0
- package/.github/workflows/ci.yml +1 -0
- package/.github/workflows/release.yml +1 -0
- package/AGENTS.md +3 -1
- package/CHANGELOG.md +25 -0
- package/QUICKSTART.md +99 -0
- package/README.md +19 -10
- package/bin/lib/oxe-install-resolve.cjs +10 -0
- package/bin/lib/oxe-operational.cjs +34 -28
- package/bin/lib/oxe-project-health.cjs +38 -6
- package/bin/lib/oxe-release.cjs +423 -0
- package/bin/oxe-cc.js +389 -294
- package/commands/oxe/verify-audit.md +50 -0
- package/commands/oxe/workflow-authoring.md +50 -0
- package/docs/INCIDENT-PLAYBOOK.md +181 -0
- package/docs/RELEASE-READINESS.md +46 -0
- package/docs/ROLES.md +129 -0
- package/docs/RUNTIME-SMOKE-MATRIX.md +128 -0
- package/docs/TEAM-ADOPTION.md +153 -0
- package/docs/WALKTHROUGH.md +241 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +28 -0
- package/lib/runtime/scheduler/multi-agent-coordinator.js +152 -26
- package/lib/sdk/README.md +2 -0
- package/lib/sdk/index.cjs +22 -8
- package/lib/sdk/index.d.ts +60 -16
- package/oxe/templates/config.template.json +1 -0
- package/package.json +28 -20
- package/packages/runtime/package.json +1 -1
- package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +357 -193
- package/vscode-extension/oxe-agents-1.5.0.vsix +0 -0
- package/vscode-extension/package.json +1 -1
|
@@ -5,12 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MultiAgentCoordinator = void 0;
|
|
7
7
|
exports.multiAgentStatePath = multiAgentStatePath;
|
|
8
|
+
exports.multiAgentSummaryPath = multiAgentSummaryPath;
|
|
8
9
|
exports.loadMultiAgentState = loadMultiAgentState;
|
|
10
|
+
exports.loadMultiAgentSummary = loadMultiAgentSummary;
|
|
9
11
|
const fs_1 = __importDefault(require("fs"));
|
|
10
12
|
const path_1 = __importDefault(require("path"));
|
|
11
13
|
const bus_1 = require("../events/bus");
|
|
12
14
|
const scheduler_1 = require("./scheduler");
|
|
13
15
|
const agent_roles_1 = require("./agent-roles");
|
|
16
|
+
const agent_registry_1 = require("./agent-registry");
|
|
14
17
|
function ensureRunDir(projectRoot, runId) {
|
|
15
18
|
const dir = path_1.default.join(projectRoot, '.oxe', 'runs', runId);
|
|
16
19
|
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
@@ -21,6 +24,24 @@ function persistMultiAgentArtifacts(projectRoot, runId, state, handoffs = [], ar
|
|
|
21
24
|
fs_1.default.writeFileSync(path_1.default.join(runDir, 'multi-agent-state.json'), JSON.stringify(state, null, 2), 'utf8');
|
|
22
25
|
fs_1.default.writeFileSync(path_1.default.join(runDir, 'handoffs.json'), JSON.stringify(handoffs, null, 2), 'utf8');
|
|
23
26
|
fs_1.default.writeFileSync(path_1.default.join(runDir, 'arbitration-results.json'), JSON.stringify(arbitrationResults, null, 2), 'utf8');
|
|
27
|
+
const summary = {
|
|
28
|
+
run_id: state.run_id,
|
|
29
|
+
mode: state.mode,
|
|
30
|
+
workspace_isolation_enforced: state.workspace_isolation_enforced,
|
|
31
|
+
agent_count: state.agent_count,
|
|
32
|
+
completed_count: state.completed.length,
|
|
33
|
+
failed_count: state.failed.length,
|
|
34
|
+
blocked_count: state.blocked.length,
|
|
35
|
+
ownership_count: state.ownership.length,
|
|
36
|
+
handoff_count: handoffs.length,
|
|
37
|
+
arbitration_count: arbitrationResults.length,
|
|
38
|
+
orphan_reassignment_count: state.orphan_reassignments.length,
|
|
39
|
+
timeout_count: state.timed_out_agents.length,
|
|
40
|
+
participating_agents: state.agent_results.map((entry) => entry.agent_id),
|
|
41
|
+
health: state.timed_out_agents.length > 0 || state.failed.length > 0 ? 'degraded' : 'healthy',
|
|
42
|
+
updated_at: state.updated_at,
|
|
43
|
+
};
|
|
44
|
+
fs_1.default.writeFileSync(path_1.default.join(runDir, 'multi-agent-summary.json'), JSON.stringify(summary, null, 2), 'utf8');
|
|
24
45
|
}
|
|
25
46
|
function ensureIsolatedAgents(agents) {
|
|
26
47
|
const shared = agents.filter((agent) => agent.workspaceManager.isolation_level !== 'isolated');
|
|
@@ -41,7 +62,7 @@ function buildOwnership(agents, partitions) {
|
|
|
41
62
|
}
|
|
42
63
|
return ownership;
|
|
43
64
|
}
|
|
44
|
-
function makeState(mode, runId, agents, partitions, agentResults, completed, failed, blocked, orphanReassignments) {
|
|
65
|
+
function makeState(mode, runId, agents, partitions, agentResults, completed, failed, blocked, orphanReassignments, timedOutAgents) {
|
|
45
66
|
return {
|
|
46
67
|
run_id: runId,
|
|
47
68
|
mode,
|
|
@@ -60,16 +81,82 @@ function makeState(mode, runId, agents, partitions, agentResults, completed, fai
|
|
|
60
81
|
assigned_task_ids: partitions[idx] ?? agent.assignedTaskIds ?? [],
|
|
61
82
|
completed: result?.completed ?? [],
|
|
62
83
|
failed: result?.failed ?? [],
|
|
84
|
+
timed_out: Boolean(result?.timed_out),
|
|
85
|
+
reassigned_task_ids: result?.reassigned_task_ids ?? [],
|
|
63
86
|
};
|
|
64
87
|
}),
|
|
65
88
|
orphan_reassignments: orphanReassignments,
|
|
89
|
+
timed_out_agents: timedOutAgents,
|
|
66
90
|
updated_at: new Date().toISOString(),
|
|
67
91
|
};
|
|
68
92
|
}
|
|
93
|
+
async function runGraphForAgent(graph, nodeIds, agent, idx, opts, heartbeatTimeoutMs) {
|
|
94
|
+
const subGraph = subGraphFor(graph, nodeIds);
|
|
95
|
+
if (subGraph.nodes.size === 0) {
|
|
96
|
+
return {
|
|
97
|
+
agent_id: agent.id,
|
|
98
|
+
completed: [],
|
|
99
|
+
failed: [],
|
|
100
|
+
timed_out: false,
|
|
101
|
+
assigned_task_ids: nodeIds,
|
|
102
|
+
reassigned_task_ids: [],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const ctx = {
|
|
106
|
+
projectRoot: opts.projectRoot,
|
|
107
|
+
sessionId: opts.sessionId,
|
|
108
|
+
runId: `${opts.runId}-agent${idx}`,
|
|
109
|
+
executor: agent.executor,
|
|
110
|
+
workspaceManager: agent.workspaceManager,
|
|
111
|
+
onEvent: opts.onEvent,
|
|
112
|
+
};
|
|
113
|
+
const scheduler = new scheduler_1.Scheduler();
|
|
114
|
+
const work = scheduler.run(subGraph, ctx);
|
|
115
|
+
if (!heartbeatTimeoutMs || heartbeatTimeoutMs <= 0) {
|
|
116
|
+
const result = await work;
|
|
117
|
+
return {
|
|
118
|
+
agent_id: agent.id,
|
|
119
|
+
completed: result.completed,
|
|
120
|
+
failed: result.failed,
|
|
121
|
+
timed_out: false,
|
|
122
|
+
assigned_task_ids: nodeIds,
|
|
123
|
+
reassigned_task_ids: [],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
let timer = null;
|
|
127
|
+
const raced = await Promise.race([
|
|
128
|
+
work.then((result) => ({ type: 'result', result })),
|
|
129
|
+
new Promise((resolve) => {
|
|
130
|
+
timer = setTimeout(() => resolve({ type: 'timeout' }), heartbeatTimeoutMs);
|
|
131
|
+
}),
|
|
132
|
+
]);
|
|
133
|
+
if (timer)
|
|
134
|
+
clearTimeout(timer);
|
|
135
|
+
if (raced && raced.type === 'timeout') {
|
|
136
|
+
return {
|
|
137
|
+
agent_id: agent.id,
|
|
138
|
+
completed: [],
|
|
139
|
+
failed: [],
|
|
140
|
+
timed_out: true,
|
|
141
|
+
assigned_task_ids: nodeIds,
|
|
142
|
+
reassigned_task_ids: [],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const result = raced.result;
|
|
146
|
+
return {
|
|
147
|
+
agent_id: agent.id,
|
|
148
|
+
completed: result.completed,
|
|
149
|
+
failed: result.failed,
|
|
150
|
+
timed_out: false,
|
|
151
|
+
assigned_task_ids: nodeIds,
|
|
152
|
+
reassigned_task_ids: [],
|
|
153
|
+
};
|
|
154
|
+
}
|
|
69
155
|
// ─── Parallel mode ───────────────────────────────────────────────────────────
|
|
70
156
|
async function runParallel(graph, opts) {
|
|
71
157
|
const { agents, projectRoot, sessionId, runId } = opts;
|
|
72
158
|
ensureIsolatedAgents(agents);
|
|
159
|
+
const heartbeatTimeoutMs = opts.heartbeatTimeoutMs ?? null;
|
|
73
160
|
const partitions = agents.map((agent) => [...(agent.assignedTaskIds ?? [])]);
|
|
74
161
|
if (partitions.every((partition) => partition.length === 0)) {
|
|
75
162
|
const allIds = [...graph.nodes.keys()];
|
|
@@ -77,33 +164,55 @@ async function runParallel(graph, opts) {
|
|
|
77
164
|
partitions[index % agents.length].push(id);
|
|
78
165
|
});
|
|
79
166
|
}
|
|
167
|
+
const registry = new agent_registry_1.AgentRegistry(heartbeatTimeoutMs == null ? 30000 : heartbeatTimeoutMs);
|
|
168
|
+
agents.forEach((agent, idx) => {
|
|
169
|
+
registry.register(agent.id, agent.executor, agent.workspaceManager, partitions[idx] ?? []);
|
|
170
|
+
});
|
|
80
171
|
(0, bus_1.appendEvent)(projectRoot, sessionId, {
|
|
81
172
|
type: 'RunStarted',
|
|
82
173
|
run_id: runId,
|
|
83
174
|
payload: { mode: 'parallel', agent_count: agents.length, isolation_level: 'isolated' },
|
|
84
175
|
});
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const ctx = {
|
|
91
|
-
projectRoot,
|
|
92
|
-
sessionId,
|
|
93
|
-
runId: `${runId}-agent${idx}`,
|
|
94
|
-
executor: agent.executor,
|
|
95
|
-
workspaceManager: agent.workspaceManager,
|
|
96
|
-
onEvent: opts.onEvent,
|
|
97
|
-
};
|
|
98
|
-
const scheduler = new scheduler_1.Scheduler();
|
|
99
|
-
const result = await scheduler.run(subGraph, ctx);
|
|
100
|
-
return { agent_id: agent.id, completed: result.completed, failed: result.failed };
|
|
176
|
+
const initialResults = await Promise.all(agents.map(async (agent, idx) => {
|
|
177
|
+
registry.beat(agent.id, partitions[idx][0] || null);
|
|
178
|
+
const result = await runGraphForAgent(graph, partitions[idx], agent, idx, opts, heartbeatTimeoutMs);
|
|
179
|
+
registry.setStatus(agent.id, result.timed_out ? 'timeout' : 'idle');
|
|
180
|
+
return result;
|
|
101
181
|
}));
|
|
102
|
-
const
|
|
103
|
-
const failed = agentResults.flatMap((result) => result.failed);
|
|
182
|
+
const timedOutAgents = [];
|
|
104
183
|
const blocked = [];
|
|
105
184
|
const orphanReassignments = [];
|
|
106
|
-
const
|
|
185
|
+
const agentResults = initialResults.map((entry) => ({
|
|
186
|
+
...entry,
|
|
187
|
+
reassigned_task_ids: entry.reassigned_task_ids || [],
|
|
188
|
+
}));
|
|
189
|
+
const liveAgents = agentResults.filter((entry) => !entry.timed_out);
|
|
190
|
+
for (const timedOut of agentResults.filter((entry) => entry.timed_out)) {
|
|
191
|
+
timedOutAgents.push({
|
|
192
|
+
agent_id: timedOut.agent_id,
|
|
193
|
+
work_item_ids: timedOut.assigned_task_ids,
|
|
194
|
+
detected_at: new Date().toISOString(),
|
|
195
|
+
});
|
|
196
|
+
const fallback = liveAgents.find((entry) => entry.agent_id !== timedOut.agent_id);
|
|
197
|
+
if (!fallback || timedOut.assigned_task_ids.length === 0)
|
|
198
|
+
continue;
|
|
199
|
+
const fallbackIdx = agents.findIndex((agent) => agent.id === fallback.agent_id);
|
|
200
|
+
const timeoutIdx = agents.findIndex((agent) => agent.id === timedOut.agent_id);
|
|
201
|
+
const rerun = await runGraphForAgent(graph, timedOut.assigned_task_ids, agents[fallbackIdx], fallbackIdx, opts, null);
|
|
202
|
+
fallback.completed.push(...rerun.completed);
|
|
203
|
+
fallback.failed.push(...rerun.failed);
|
|
204
|
+
fallback.reassigned_task_ids.push(...timedOut.assigned_task_ids);
|
|
205
|
+
partitions[fallbackIdx] = [...partitions[fallbackIdx], ...timedOut.assigned_task_ids];
|
|
206
|
+
partitions[timeoutIdx] = [];
|
|
207
|
+
orphanReassignments.push({
|
|
208
|
+
from_agent_id: timedOut.agent_id,
|
|
209
|
+
to_agent_id: fallback.agent_id,
|
|
210
|
+
work_item_ids: timedOut.assigned_task_ids,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
const completed = Array.from(new Set(agentResults.flatMap((result) => result.completed)));
|
|
214
|
+
const failed = Array.from(new Set(agentResults.flatMap((result) => result.failed)));
|
|
215
|
+
const state = makeState('parallel', runId, agents, partitions, agentResults, completed, failed, blocked, orphanReassignments, timedOutAgents);
|
|
107
216
|
persistMultiAgentArtifacts(projectRoot, runId, state);
|
|
108
217
|
(0, bus_1.appendEvent)(projectRoot, sessionId, {
|
|
109
218
|
type: 'RunCompleted',
|
|
@@ -119,6 +228,7 @@ async function runParallel(graph, opts) {
|
|
|
119
228
|
agent_results: agentResults,
|
|
120
229
|
arbitration_results: [],
|
|
121
230
|
state,
|
|
231
|
+
summary: loadMultiAgentSummary(projectRoot, runId) || undefined,
|
|
122
232
|
};
|
|
123
233
|
}
|
|
124
234
|
// ─── Competitive mode ────────────────────────────────────────────────────────
|
|
@@ -154,9 +264,9 @@ async function runCompetitive(graph, opts) {
|
|
|
154
264
|
}
|
|
155
265
|
const partitions = [Array.from(graph.nodes.keys()), Array.from(graph.nodes.keys())];
|
|
156
266
|
const state = makeState('competitive', runId, opts.agents, partitions, [
|
|
157
|
-
{ agent_id: agentA.id, completed, failed },
|
|
158
|
-
{ agent_id: agentB.id, completed: [], failed: [] },
|
|
159
|
-
], completed, failed, blocked, []);
|
|
267
|
+
{ agent_id: agentA.id, completed, failed, timed_out: false, reassigned_task_ids: [] },
|
|
268
|
+
{ agent_id: agentB.id, completed: [], failed: [], timed_out: false, reassigned_task_ids: [] },
|
|
269
|
+
], completed, failed, blocked, [], []);
|
|
160
270
|
persistMultiAgentArtifacts(projectRoot, runId, state, [], arbitrationResults);
|
|
161
271
|
(0, bus_1.appendEvent)(projectRoot, sessionId, {
|
|
162
272
|
type: 'RunCompleted',
|
|
@@ -175,6 +285,7 @@ async function runCompetitive(graph, opts) {
|
|
|
175
285
|
],
|
|
176
286
|
arbitration_results: arbitrationResults,
|
|
177
287
|
state,
|
|
288
|
+
summary: loadMultiAgentSummary(projectRoot, runId) || undefined,
|
|
178
289
|
};
|
|
179
290
|
}
|
|
180
291
|
async function competeTwoAgents(nodeId, node, agentA, agentB, opts, arbitrationResults) {
|
|
@@ -294,9 +405,9 @@ async function runCooperative(graph, opts) {
|
|
|
294
405
|
}
|
|
295
406
|
const partitions = [Array.from(graph.nodes.keys()), Array.from(graph.nodes.keys())];
|
|
296
407
|
const state = makeState('cooperative', runId, opts.agents, partitions, [
|
|
297
|
-
{ agent_id: planner.id, completed: [], failed: [] },
|
|
298
|
-
{ agent_id: executor.id, completed, failed },
|
|
299
|
-
], completed, failed, blocked, []);
|
|
408
|
+
{ agent_id: planner.id, completed: [], failed: [], timed_out: false, reassigned_task_ids: [] },
|
|
409
|
+
{ agent_id: executor.id, completed, failed, timed_out: false, reassigned_task_ids: [] },
|
|
410
|
+
], completed, failed, blocked, [], []);
|
|
300
411
|
persistMultiAgentArtifacts(projectRoot, runId, state, handoffs, []);
|
|
301
412
|
(0, bus_1.appendEvent)(projectRoot, sessionId, {
|
|
302
413
|
type: 'RunCompleted',
|
|
@@ -316,6 +427,7 @@ async function runCooperative(graph, opts) {
|
|
|
316
427
|
handoffs,
|
|
317
428
|
arbitration_results: [],
|
|
318
429
|
state,
|
|
430
|
+
summary: loadMultiAgentSummary(projectRoot, runId) || undefined,
|
|
319
431
|
};
|
|
320
432
|
}
|
|
321
433
|
// ─── Public API ──────────────────────────────────────────────────────────────
|
|
@@ -334,6 +446,9 @@ exports.MultiAgentCoordinator = MultiAgentCoordinator;
|
|
|
334
446
|
function multiAgentStatePath(projectRoot, runId) {
|
|
335
447
|
return path_1.default.join(projectRoot, '.oxe', 'runs', runId, 'multi-agent-state.json');
|
|
336
448
|
}
|
|
449
|
+
function multiAgentSummaryPath(projectRoot, runId) {
|
|
450
|
+
return path_1.default.join(projectRoot, '.oxe', 'runs', runId, 'multi-agent-summary.json');
|
|
451
|
+
}
|
|
337
452
|
function loadMultiAgentState(projectRoot, runId) {
|
|
338
453
|
const statePath = multiAgentStatePath(projectRoot, runId);
|
|
339
454
|
if (!fs_1.default.existsSync(statePath))
|
|
@@ -345,6 +460,17 @@ function loadMultiAgentState(projectRoot, runId) {
|
|
|
345
460
|
return null;
|
|
346
461
|
}
|
|
347
462
|
}
|
|
463
|
+
function loadMultiAgentSummary(projectRoot, runId) {
|
|
464
|
+
const summaryPath = multiAgentSummaryPath(projectRoot, runId);
|
|
465
|
+
if (!fs_1.default.existsSync(summaryPath))
|
|
466
|
+
return null;
|
|
467
|
+
try {
|
|
468
|
+
return JSON.parse(fs_1.default.readFileSync(summaryPath, 'utf8'));
|
|
469
|
+
}
|
|
470
|
+
catch {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
348
474
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
349
475
|
function subGraphFor(graph, nodeIds) {
|
|
350
476
|
const ids = new Set(nodeIds);
|
package/lib/sdk/README.md
CHANGED
|
@@ -76,5 +76,7 @@ O SDK já expõe os helpers usados pela operação enterprise do OXE:
|
|
|
76
76
|
- `operational.readRuntimeGates(...)` / `operational.resolveRuntimeGate(...)`
|
|
77
77
|
- `operational.recoverRuntimeState(...)` / `operational.replayRuntimeState(...)`
|
|
78
78
|
- `operational.readRuntimeMultiAgentStatus(...)` / `operational.multiAgentStatus(...)`
|
|
79
|
+
- `release.checkReleaseConsistency(...)` / `release.buildReleaseManifest(...)`
|
|
80
|
+
- `release.loadRuntimeSmokeReport(...)` / `release.loadRecoveryFixtureReport(...)` / `release.loadMultiAgentSoakReport(...)`
|
|
79
81
|
|
|
80
82
|
Use esses helpers quando quiser integrar gates, verify, recovery e multi-agent a scripts de CI, automações internas ou observabilidade.
|
package/lib/sdk/index.cjs
CHANGED
|
@@ -17,8 +17,9 @@ const plugins = require('../../bin/lib/oxe-plugins.cjs');
|
|
|
17
17
|
const dashboard = require('../../bin/lib/oxe-dashboard.cjs');
|
|
18
18
|
const operational = require('../../bin/lib/oxe-operational.cjs');
|
|
19
19
|
const azure = require('../../bin/lib/oxe-azure.cjs');
|
|
20
|
-
const context = require('../../bin/lib/oxe-context-engine.cjs');
|
|
21
|
-
const runtimeSemantics = require('../../bin/lib/oxe-runtime-semantics.cjs');
|
|
20
|
+
const context = require('../../bin/lib/oxe-context-engine.cjs');
|
|
21
|
+
const runtimeSemantics = require('../../bin/lib/oxe-runtime-semantics.cjs');
|
|
22
|
+
const release = require('../../bin/lib/oxe-release.cjs');
|
|
22
23
|
|
|
23
24
|
const PACKAGE_ROOT = path.join(__dirname, '..', '..');
|
|
24
25
|
|
|
@@ -636,12 +637,25 @@ module.exports = {
|
|
|
636
637
|
},
|
|
637
638
|
|
|
638
639
|
/** Dashboard local: contexto consolidado e persistência de revisão do plano. */
|
|
639
|
-
dashboard: {
|
|
640
|
-
loadDashboardContext: dashboard.loadDashboardContext,
|
|
641
|
-
savePlanReviewStatus: dashboard.savePlanReviewStatus,
|
|
642
|
-
addPlanReviewComment: dashboard.addPlanReviewComment,
|
|
643
|
-
updatePlanReviewCommentStatus: dashboard.updatePlanReviewCommentStatus,
|
|
644
|
-
},
|
|
640
|
+
dashboard: {
|
|
641
|
+
loadDashboardContext: dashboard.loadDashboardContext,
|
|
642
|
+
savePlanReviewStatus: dashboard.savePlanReviewStatus,
|
|
643
|
+
addPlanReviewComment: dashboard.addPlanReviewComment,
|
|
644
|
+
updatePlanReviewCommentStatus: dashboard.updatePlanReviewCommentStatus,
|
|
645
|
+
},
|
|
646
|
+
|
|
647
|
+
/** Release readiness: manifest, smoke matrix e checks de consistência antes de publicar. */
|
|
648
|
+
release: {
|
|
649
|
+
REQUIRED_RUNTIMES: release.REQUIRED_RUNTIMES,
|
|
650
|
+
WRAPPER_TARGETS: release.WRAPPER_TARGETS,
|
|
651
|
+
releasePaths: release.releasePaths,
|
|
652
|
+
collectWrapperHashes: release.collectWrapperHashes,
|
|
653
|
+
loadRuntimeSmokeReport: release.loadRuntimeSmokeReport,
|
|
654
|
+
loadRecoveryFixtureReport: release.loadRecoveryFixtureReport,
|
|
655
|
+
loadMultiAgentSoakReport: release.loadMultiAgentSoakReport,
|
|
656
|
+
buildReleaseManifest: release.buildReleaseManifest,
|
|
657
|
+
checkReleaseConsistency: release.checkReleaseConsistency,
|
|
658
|
+
},
|
|
645
659
|
|
|
646
660
|
/** Runtime operacional: tracing, active run, catálogo de capabilities e memória em camadas. */
|
|
647
661
|
operational: {
|
package/lib/sdk/index.d.ts
CHANGED
|
@@ -146,18 +146,50 @@ export interface GateQueueSnapshot {
|
|
|
146
146
|
all?: Array<Record<string, unknown>>;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
export interface MultiAgentStatusSummary {
|
|
150
|
-
path: string | null;
|
|
151
|
-
enabled: boolean;
|
|
152
|
-
runId: string | null;
|
|
153
|
-
mode: string | null;
|
|
149
|
+
export interface MultiAgentStatusSummary {
|
|
150
|
+
path: string | null;
|
|
151
|
+
enabled: boolean;
|
|
152
|
+
runId: string | null;
|
|
153
|
+
mode: string | null;
|
|
154
154
|
workspaceIsolationEnforced: boolean;
|
|
155
155
|
agents: Array<Record<string, unknown>>;
|
|
156
|
-
ownership: Array<Record<string, unknown>>;
|
|
157
|
-
orphanReassignments: Array<Record<string, unknown>>;
|
|
158
|
-
handoffs: Array<Record<string, unknown>>;
|
|
159
|
-
arbitrationResults: Array<Record<string, unknown>>;
|
|
160
|
-
|
|
156
|
+
ownership: Array<Record<string, unknown>>;
|
|
157
|
+
orphanReassignments: Array<Record<string, unknown>>;
|
|
158
|
+
handoffs: Array<Record<string, unknown>>;
|
|
159
|
+
arbitrationResults: Array<Record<string, unknown>>;
|
|
160
|
+
summary?: Record<string, unknown> | null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface ReleaseManifest {
|
|
164
|
+
schema_version: number;
|
|
165
|
+
generated_at: string;
|
|
166
|
+
project_root: string;
|
|
167
|
+
package_root: string;
|
|
168
|
+
release_contract: Record<string, unknown>;
|
|
169
|
+
versions: Record<string, unknown>;
|
|
170
|
+
runtime_compiled: { path: string; ok: boolean };
|
|
171
|
+
wrappers: Record<string, unknown>;
|
|
172
|
+
reports: Record<string, unknown>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface ReleaseConsistencyResult {
|
|
176
|
+
ok: boolean;
|
|
177
|
+
blockers: string[];
|
|
178
|
+
warnings: string[];
|
|
179
|
+
manifest: ReleaseManifest;
|
|
180
|
+
manifestPath: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface RuntimeSmokeReport {
|
|
184
|
+
path: string;
|
|
185
|
+
present: boolean;
|
|
186
|
+
ok: boolean;
|
|
187
|
+
total: number;
|
|
188
|
+
failures: string[];
|
|
189
|
+
missingRequired: string[];
|
|
190
|
+
results: Array<Record<string, unknown>>;
|
|
191
|
+
raw: Record<string, unknown> | null;
|
|
192
|
+
}
|
|
161
193
|
|
|
162
194
|
export interface PolicyDecisionSummary {
|
|
163
195
|
total: number;
|
|
@@ -685,12 +717,24 @@ export interface OxeSdk {
|
|
|
685
717
|
installNpmPlugin: (projectRoot: string, pkgName: string, version?: string) => { ok: boolean; path: string; error: string };
|
|
686
718
|
};
|
|
687
719
|
|
|
688
|
-
dashboard: {
|
|
689
|
-
loadDashboardContext: (projectRoot: string, opts?: { activeSession?: string | null }) => Record<string, unknown>;
|
|
690
|
-
savePlanReviewStatus: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown>;
|
|
691
|
-
addPlanReviewComment: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown>;
|
|
692
|
-
updatePlanReviewCommentStatus: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown> | null;
|
|
693
|
-
};
|
|
720
|
+
dashboard: {
|
|
721
|
+
loadDashboardContext: (projectRoot: string, opts?: { activeSession?: string | null }) => Record<string, unknown>;
|
|
722
|
+
savePlanReviewStatus: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown>;
|
|
723
|
+
addPlanReviewComment: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown>;
|
|
724
|
+
updatePlanReviewCommentStatus: (projectRoot: string, input?: Record<string, unknown>) => Record<string, unknown> | null;
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
release: {
|
|
728
|
+
REQUIRED_RUNTIMES: string[];
|
|
729
|
+
WRAPPER_TARGETS: Array<Record<string, unknown>>;
|
|
730
|
+
releasePaths: (projectRoot: string) => Record<string, string>;
|
|
731
|
+
collectWrapperHashes: (projectRoot: string) => Record<string, unknown>;
|
|
732
|
+
loadRuntimeSmokeReport: (projectRoot: string) => RuntimeSmokeReport;
|
|
733
|
+
loadRecoveryFixtureReport: (projectRoot: string) => RuntimeSmokeReport;
|
|
734
|
+
loadMultiAgentSoakReport: (projectRoot: string) => RuntimeSmokeReport;
|
|
735
|
+
buildReleaseManifest: (projectRoot: string, options?: Record<string, unknown>) => ReleaseManifest;
|
|
736
|
+
checkReleaseConsistency: (projectRoot: string, options?: Record<string, unknown>) => ReleaseConsistencyResult;
|
|
737
|
+
};
|
|
694
738
|
|
|
695
739
|
context: ContextAPI;
|
|
696
740
|
runtimeSemantics: RuntimeSemanticsAPI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxe-cc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "OXE — spec-driven workflows in .oxe/ with runtime enterprise, evidence-first verification and multi-runtime integrations (npx)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"types": "lib/sdk/index.d.ts",
|
|
40
40
|
"bin": {
|
|
41
|
-
"oxe-cc": "bin/oxe-cc.js"
|
|
41
|
+
"oxe-cc": "bin/oxe-cc.js",
|
|
42
|
+
"oxe": "bin/oxe-cc.js"
|
|
42
43
|
},
|
|
43
44
|
"files": [
|
|
44
45
|
"bin",
|
|
@@ -46,28 +47,35 @@
|
|
|
46
47
|
"oxe",
|
|
47
48
|
"assets",
|
|
48
49
|
".cursor",
|
|
49
|
-
".github",
|
|
50
|
-
"commands",
|
|
51
|
-
"vscode-extension",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"packages/runtime/
|
|
50
|
+
".github",
|
|
51
|
+
"commands",
|
|
52
|
+
"vscode-extension",
|
|
53
|
+
"docs",
|
|
54
|
+
"QUICKSTART.md",
|
|
55
|
+
"packages/runtime/src",
|
|
56
|
+
"packages/runtime/package.json",
|
|
57
|
+
"packages/runtime/tsconfig.json",
|
|
55
58
|
"AGENTS.md",
|
|
56
59
|
"README.md",
|
|
57
60
|
"CHANGELOG.md"
|
|
58
61
|
],
|
|
59
|
-
"scripts": {
|
|
60
|
-
"build:runtime": "cd packages/runtime && npm run build",
|
|
61
|
-
"sync:runtime-metadata": "node scripts/sync-runtime-metadata.cjs",
|
|
62
|
-
"sync:cursor": "node scripts/sync-cursor-from-prompts.cjs",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"test": "
|
|
66
|
-
"test:
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build:runtime": "cd packages/runtime && npm run build",
|
|
64
|
+
"sync:runtime-metadata": "node scripts/sync-runtime-metadata.cjs",
|
|
65
|
+
"sync:cursor": "node scripts/sync-cursor-from-prompts.cjs",
|
|
66
|
+
"release:doctor": "node scripts/release-doctor.cjs",
|
|
67
|
+
"release:manifest": "node scripts/release-doctor.cjs --write-manifest",
|
|
68
|
+
"test:root": "node --test tests/install.test.cjs tests/oxe-project-health.test.cjs tests/oxe-dashboard.test.cjs tests/oxe-operational.test.cjs tests/oxe-azure.test.cjs tests/oxe-sdk.test.cjs tests/oxe-manifest.test.cjs tests/oxe-agent-install.test.cjs tests/oxe-install-resolve-full.test.cjs tests/oxe-health-extended.test.cjs tests/oxe-workflows-edge.test.cjs tests/oxe-sdk-edge.test.cjs tests/oxe-cli-edge.test.cjs tests/oxe-npm-version.test.cjs tests/oxe-scripts.test.cjs tests/oxe-retro-health.test.cjs tests/oxe-security-permissions.test.cjs tests/oxe-runtime-semantics.test.cjs tests/oxe-plugins.test.cjs",
|
|
69
|
+
"test:runtime": "cd packages/runtime && npm test",
|
|
70
|
+
"test:runtime-smoke": "node scripts/runtime-smoke-matrix.cjs",
|
|
71
|
+
"test:recovery-fixtures": "node scripts/run-recovery-fixtures.cjs",
|
|
72
|
+
"test:multi-agent-soak": "node scripts/run-multi-agent-soak.cjs",
|
|
73
|
+
"test": "npm run build:runtime && npm run test:root && npm run test:runtime && npm run test:runtime-smoke && npm run test:recovery-fixtures && npm run test:multi-agent-soak",
|
|
74
|
+
"test:coverage": "c8 --check-coverage --lines 82 --functions 85 --branches 58 --statements 82 npm test",
|
|
75
|
+
"scan:assets": "node scripts/oxe-assets-scan.cjs",
|
|
76
|
+
"build:vscode-ext": "cd vscode-extension && npx @vscode/vsce package --no-yarn --allow-missing-repository",
|
|
77
|
+
"prepublishOnly": "npm test && npm run scan:assets && npm run build:vscode-ext && npm run release:manifest && node bin/oxe-cc.js --version"
|
|
78
|
+
},
|
|
71
79
|
"c8": {
|
|
72
80
|
"all": true,
|
|
73
81
|
"include": [
|