oxe-cc 1.8.0 → 1.9.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.
Files changed (52) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +94 -0
  3. package/README.md +15 -12
  4. package/bin/lib/oxe-manifest.cjs +20 -13
  5. package/bin/lib/oxe-operational.cjs +305 -79
  6. package/bin/lib/oxe-project-health.cjs +79 -18
  7. package/bin/lib/oxe-rationality.cjs +9 -7
  8. package/bin/lib/oxe-release.cjs +26 -0
  9. package/bin/oxe-cc.js +224 -52
  10. package/docs/RELEASE-READINESS.md +6 -1
  11. package/lib/runtime/compiler/graph-compiler.js +1 -1
  12. package/lib/runtime/executor/action-tool-map.js +4 -0
  13. package/lib/runtime/executor/built-in-tools.js +27 -0
  14. package/lib/runtime/executor/llm-task-executor.d.ts +4 -1
  15. package/lib/runtime/executor/llm-task-executor.js +41 -5
  16. package/lib/runtime/executor/node-prompt-builder.d.ts +4 -1
  17. package/lib/runtime/executor/node-prompt-builder.js +13 -2
  18. package/lib/runtime/models/failure.d.ts +1 -1
  19. package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +39 -0
  20. package/lib/runtime/scheduler/multi-agent-coordinator.js +222 -13
  21. package/lib/runtime/scheduler/scheduler.d.ts +5 -1
  22. package/lib/runtime/scheduler/scheduler.js +82 -14
  23. package/lib/runtime/verification/verification-compiler.js +7 -5
  24. package/lib/runtime/workspace/strategies/git-worktree.js +18 -9
  25. package/lib/sdk/index.cjs +48 -44
  26. package/oxe/templates/PLAN.template.md +23 -9
  27. package/oxe/templates/SPEC.template.md +55 -22
  28. package/oxe/workflows/plan.md +18 -6
  29. package/oxe/workflows/spec.md +31 -9
  30. package/package.json +106 -100
  31. package/packages/runtime/package.json +18 -18
  32. package/packages/runtime/src/compiler/graph-compiler.ts +1 -1
  33. package/packages/runtime/src/evidence/evidence-store.ts +2 -2
  34. package/packages/runtime/src/executor/action-tool-map.ts +4 -0
  35. package/packages/runtime/src/executor/built-in-tools.ts +29 -0
  36. package/packages/runtime/src/executor/llm-task-executor.ts +46 -4
  37. package/packages/runtime/src/executor/node-prompt-builder.ts +18 -1
  38. package/packages/runtime/src/models/failure.ts +2 -0
  39. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +320 -46
  40. package/packages/runtime/src/scheduler/scheduler.ts +93 -15
  41. package/packages/runtime/src/verification/verification-compiler.ts +7 -5
  42. package/packages/runtime/src/workspace/strategies/git-worktree.ts +24 -16
  43. package/vscode-extension/package.json +185 -185
  44. package/vscode-extension/oxe-agents-0.9.1.vsix +0 -0
  45. package/vscode-extension/oxe-agents-0.9.2.vsix +0 -0
  46. package/vscode-extension/oxe-agents-1.0.0.vsix +0 -0
  47. package/vscode-extension/oxe-agents-1.4.0.vsix +0 -0
  48. package/vscode-extension/oxe-agents-1.5.0.vsix +0 -0
  49. package/vscode-extension/oxe-agents-1.5.1.vsix +0 -0
  50. package/vscode-extension/oxe-agents-1.6.0.vsix +0 -0
  51. package/vscode-extension/oxe-agents-1.7.0.vsix +0 -0
  52. package/vscode-extension/oxe-agents-1.8.0.vsix +0 -0
@@ -839,6 +839,18 @@ function codexIntegrationPaths() {
839
839
  };
840
840
  }
841
841
 
842
+ /**
843
+ * @param {string} target
844
+ */
845
+ function codexWorkspacePaths(target) {
846
+ const root = path.resolve(target);
847
+ return {
848
+ root,
849
+ promptsDir: path.join(root, '.codex', 'prompts'),
850
+ skillsRoot: path.join(root, '.agents', 'skills'),
851
+ };
852
+ }
853
+
842
854
  /**
843
855
  * @param {string} filePath
844
856
  */
@@ -1108,11 +1120,21 @@ function summarizeRecoveryState(target, activeSession, activeRun, verificationAr
1108
1120
  };
1109
1121
  }
1110
1122
 
1111
- function summarizeEnterpriseRuntime(target, activeRun, activeSession, config) {
1112
- const pendingGates = readExecutionGates(target, activeSession);
1113
- const auditSummary = summarizeAuditTrail(target, activeRun && activeRun.run_id ? activeRun.run_id : null);
1114
- const runtimeMode = operational.buildRuntimeModeStatus(activeRun);
1115
- const providerCatalog = operational.buildRuntimeProviderCatalog(target);
1123
+ function summarizeEnterpriseRuntime(target, activeRun, activeSession, config) {
1124
+ const pendingGates = readExecutionGates(target, activeSession);
1125
+ const auditSummary = summarizeAuditTrail(target, activeRun && activeRun.run_id ? activeRun.run_id : null);
1126
+ const runtimeModeBase = operational.buildRuntimeModeStatus(activeRun);
1127
+ const providerCatalog = operational.buildRuntimeProviderCatalog(target);
1128
+ const enterprisePackageAvailable = Boolean(providerCatalog && providerCatalog.available);
1129
+ const runtimeMode = enterprisePackageAvailable && runtimeModeBase.enterprise_available === false
1130
+ ? {
1131
+ ...runtimeModeBase,
1132
+ enterprise_available: true,
1133
+ reason: runtimeModeBase.reason === 'Nenhum ACTIVE-RUN encontrado para o escopo atual.'
1134
+ ? 'Runtime enterprise disponível no pacote, mas ainda sem ACTIVE-RUN canónico neste escopo.'
1135
+ : 'Runtime enterprise disponível no pacote; a run atual ainda não materializou artefatos canónicos.',
1136
+ }
1137
+ : runtimeModeBase;
1116
1138
  if (!activeRun || !activeRun.run_id) {
1117
1139
  return {
1118
1140
  runtimeMode,
@@ -1484,9 +1506,16 @@ function copilotIntegrationReport(target) {
1484
1506
  * @param {string} target
1485
1507
  */
1486
1508
  function codexIntegrationReport(target) {
1487
- const paths = codexIntegrationPaths();
1488
- const promptFiles = listOxeCodexPromptFiles(paths.promptsDir);
1489
- const skillDirs = listOxeSkillDirs(paths.skillsRoot);
1509
+ const workspace = codexWorkspacePaths(target);
1510
+ const globalPaths = codexIntegrationPaths();
1511
+ const workspacePromptFiles = listOxeCodexPromptFiles(workspace.promptsDir);
1512
+ const workspaceSkillDirs = listOxeSkillDirs(workspace.skillsRoot);
1513
+ const globalPromptFiles = listOxeCodexPromptFiles(globalPaths.promptsDir);
1514
+ const globalSkillDirs = listOxeSkillDirs(globalPaths.skillsRoot);
1515
+ const workspaceDetected = workspacePromptFiles.length > 0 || workspaceSkillDirs.length > 0;
1516
+ const globalDetected = globalPromptFiles.length > 0 || globalSkillDirs.length > 0;
1517
+ const promptFiles = workspaceDetected ? workspacePromptFiles : globalPromptFiles;
1518
+ const skillDirs = workspaceDetected ? workspaceSkillDirs : globalSkillDirs;
1490
1519
  const promptNames = promptFiles.map((filePath) => path.basename(filePath));
1491
1520
  const skillNames = skillDirs.map((dirPath) => path.basename(dirPath));
1492
1521
  const promptPathWarnings = [];
@@ -1496,11 +1525,15 @@ function codexIntegrationReport(target) {
1496
1525
 
1497
1526
  /** @type {string[]} */
1498
1527
  const warnings = [];
1499
- const detected = promptFiles.length > 0 || skillDirs.length > 0;
1528
+ const detected = workspaceDetected || globalDetected;
1529
+ const promptSource = workspaceDetected ? 'workspace' : globalDetected ? 'global' : 'missing';
1500
1530
  const commandsReady = promptNames.includes('oxe.md');
1501
1531
  const skillsReady = skillNames.includes('oxe');
1532
+ if (!workspaceDetected && globalDetected) {
1533
+ warnings.push('Codex OXE foi encontrado apenas no ambiente global do usuário; este projeto não tem integração local instalada.');
1534
+ }
1502
1535
  if (detected && promptFiles.length === 0) {
1503
- warnings.push('Codex tem skills OXE instaladas, mas ~/.codex/prompts não contém prompts OXE; a barra / não listará /oxe.');
1536
+ warnings.push('Codex tem skills OXE instaladas, mas o diretório de prompts ativo não contém prompts OXE; a barra / não listará /oxe.');
1504
1537
  }
1505
1538
  if (promptFiles.length > 0 && !commandsReady) {
1506
1539
  warnings.push('Codex prompts OXE existem, mas o entrypoint principal oxe.md está ausente.');
@@ -1525,11 +1558,28 @@ function codexIntegrationReport(target) {
1525
1558
  detected,
1526
1559
  commandsReady,
1527
1560
  skillsReady,
1528
- root: paths.root,
1529
- promptsDir: paths.promptsDir,
1530
- skillsRoot: paths.skillsRoot,
1561
+ promptSource,
1562
+ root: workspaceDetected ? workspace.root : globalPaths.root,
1563
+ promptsDir: workspaceDetected ? workspace.promptsDir : globalPaths.promptsDir,
1564
+ skillsRoot: workspaceDetected ? workspace.skillsRoot : globalPaths.skillsRoot,
1531
1565
  promptFiles,
1532
1566
  skillDirs,
1567
+ workspace: {
1568
+ root: workspace.root,
1569
+ promptsDir: workspace.promptsDir,
1570
+ skillsRoot: workspace.skillsRoot,
1571
+ promptFiles: workspacePromptFiles,
1572
+ skillDirs: workspaceSkillDirs,
1573
+ detected: workspaceDetected,
1574
+ },
1575
+ global: {
1576
+ root: globalPaths.root,
1577
+ promptsDir: globalPaths.promptsDir,
1578
+ skillsRoot: globalPaths.skillsRoot,
1579
+ promptFiles: globalPromptFiles,
1580
+ skillDirs: globalSkillDirs,
1581
+ detected: globalDetected,
1582
+ },
1533
1583
  warnings,
1534
1584
  };
1535
1585
  }
@@ -2020,18 +2070,29 @@ function suggestNextStep(target, cfg = {}) {
2020
2070
  artifacts: [
2021
2071
  '.oxe/release/release-manifest.json',
2022
2072
  '.oxe/release/runtime-smoke-report.json',
2073
+ '.oxe/release/runtime-real-report.json',
2023
2074
  '.oxe/release/recovery-fixture-report.json',
2024
2075
  '.oxe/release/multi-agent-soak-report.json',
2076
+ '.oxe/release/multi-agent-real-report.json',
2025
2077
  ],
2026
2078
  };
2027
2079
  }
2028
2080
 
2081
+ if (!mapsComplete && !has(p.quick) && !has(p.spec) && !has(p.plan)) {
2082
+ return {
2083
+ step: 'oxe',
2084
+ cursorCmd: '/oxe',
2085
+ reason: 'Projeto recém-inicializado e sem SPEC/PLAN — use a entrada universal para começar o fluxo e escolher o primeiro scan.',
2086
+ artifacts: ['.oxe/STATE.md', '.oxe/codebase/'],
2087
+ };
2088
+ }
2089
+
2029
2090
  if (!mapsComplete && !has(p.quick)) {
2030
- return {
2031
- step: 'scan',
2032
- cursorCmd: '/oxe-scan',
2033
- reason: 'Mapas do codebase incompletos e sem QUICK.md — atualize o contexto com scan',
2034
- artifacts: ['.oxe/codebase/'],
2091
+ return {
2092
+ step: 'scan',
2093
+ cursorCmd: '/oxe-scan',
2094
+ reason: 'Mapas do codebase incompletos e sem QUICK.md — atualize o contexto com scan',
2095
+ artifacts: ['.oxe/codebase/'],
2035
2096
  };
2036
2097
  }
2037
2098
 
@@ -350,14 +350,16 @@ function buildExecutionRationality(paths = {}) {
350
350
  const implementationPack = summarizeImplementationPack(paths.implementationPackJson || null, planTasks);
351
351
  const referenceAnchors = summarizeReferenceAnchors(paths.referenceAnchors || null, externalRefs);
352
352
  const fixturePack = summarizeFixturePack(paths.fixturePackJson || null, planTasks, implementationPack);
353
- const criticalExecutionGaps = Array.from(
354
- new Set([
355
- ...implementationPack.criticalGaps,
356
- ...referenceAnchors.criticalGaps,
357
- ...fixturePack.criticalGaps,
358
- ])
359
- );
360
353
  const applicable = Boolean(paths.plan && fs.existsSync(paths.plan));
354
+ const criticalExecutionGaps = applicable
355
+ ? Array.from(
356
+ new Set([
357
+ ...implementationPack.criticalGaps,
358
+ ...referenceAnchors.criticalGaps,
359
+ ...fixturePack.criticalGaps,
360
+ ])
361
+ )
362
+ : [];
361
363
  return {
362
364
  applicable,
363
365
  planTaskCount: planTasks.length,
@@ -3,6 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { spawnSync } = require('child_process');
6
+ const semver = require('semver');
6
7
 
7
8
  const oxeManifest = require('./oxe-manifest.cjs');
8
9
  const runtimeSemantics = require('./oxe-runtime-semantics.cjs');
@@ -42,8 +43,10 @@ function releasePaths(projectRoot) {
42
43
  releaseDir,
43
44
  manifest: path.join(releaseDir, 'release-manifest.json'),
44
45
  smokeReport: path.join(releaseDir, 'runtime-smoke-report.json'),
46
+ runtimeRealReport: path.join(releaseDir, 'runtime-real-report.json'),
45
47
  recoveryFixtureReport: path.join(releaseDir, 'recovery-fixture-report.json'),
46
48
  multiAgentSoakReport: path.join(releaseDir, 'multi-agent-soak-report.json'),
49
+ multiAgentRealReport: path.join(releaseDir, 'multi-agent-real-report.json'),
47
50
  };
48
51
  }
49
52
 
@@ -277,6 +280,10 @@ function loadRuntimeSmokeReport(projectRoot) {
277
280
  });
278
281
  }
279
282
 
283
+ function loadRuntimeRealReport(projectRoot) {
284
+ return readReportSummary(releasePaths(projectRoot).runtimeRealReport, null, (item) => Boolean(item && item.ok));
285
+ }
286
+
280
287
  function loadRecoveryFixtureReport(projectRoot) {
281
288
  return readReportSummary(releasePaths(projectRoot).recoveryFixtureReport, null, (item) => Boolean(item && item.ok));
282
289
  }
@@ -285,6 +292,10 @@ function loadMultiAgentSoakReport(projectRoot) {
285
292
  return readReportSummary(releasePaths(projectRoot).multiAgentSoakReport, null, (item) => Boolean(item && item.ok));
286
293
  }
287
294
 
295
+ function loadMultiAgentRealReport(projectRoot) {
296
+ return readReportSummary(releasePaths(projectRoot).multiAgentRealReport, null, (item) => Boolean(item && item.ok));
297
+ }
298
+
288
299
  function readVersionSnapshot(projectRoot) {
289
300
  const packageJsonPath = path.join(projectRoot, 'package.json');
290
301
  const runtimePackagePath = path.join(projectRoot, 'packages', 'runtime', 'package.json');
@@ -349,8 +360,10 @@ function buildReleaseManifest(projectRoot, options = {}) {
349
360
  } : syncWrappers(projectRoot, packageRoot);
350
361
  const semanticsAudit = runtimeSemantics.auditRuntimeTargets(projectRoot);
351
362
  const smoke = loadRuntimeSmokeReport(projectRoot);
363
+ const runtimeReal = loadRuntimeRealReport(projectRoot);
352
364
  const recovery = loadRecoveryFixtureReport(projectRoot);
353
365
  const multiAgent = loadMultiAgentSoakReport(projectRoot);
366
+ const multiAgentReal = loadMultiAgentRealReport(projectRoot);
354
367
  const manifest = {
355
368
  schema_version: 1,
356
369
  generated_at: new Date().toISOString(),
@@ -384,8 +397,10 @@ function buildReleaseManifest(projectRoot, options = {}) {
384
397
  },
385
398
  reports: {
386
399
  runtime_smoke: smoke,
400
+ runtime_real: runtimeReal,
387
401
  recovery_fixtures: recovery,
388
402
  multi_agent_soak: multiAgent,
403
+ multi_agent_real: multiAgentReal,
389
404
  },
390
405
  };
391
406
  if (options.writeManifest) {
@@ -449,12 +464,21 @@ function evaluateReleaseManifest(manifest, options = {}) {
449
464
  if (!manifest.reports.runtime_smoke.present || !manifest.reports.runtime_smoke.ok) {
450
465
  blockers.push('runtime smoke matrix incompleta ou com falhas');
451
466
  }
467
+ if (!manifest.reports.runtime_real.present || !manifest.reports.runtime_real.ok) {
468
+ blockers.push('runtime real report incompleto ou com falhas');
469
+ }
452
470
  if (!manifest.reports.recovery_fixtures.present || !manifest.reports.recovery_fixtures.ok) {
453
471
  blockers.push('recovery fixture report incompleto ou com falhas');
454
472
  }
455
473
  if (!manifest.reports.multi_agent_soak.present || !manifest.reports.multi_agent_soak.ok) {
456
474
  blockers.push('multi-agent soak report incompleto ou com falhas');
457
475
  }
476
+ const releaseVersion = semver.valid(versions.root) ? versions.root : null;
477
+ if (releaseVersion && semver.gte(releaseVersion, '1.9.1')) {
478
+ if (!manifest.reports.multi_agent_real.present || !manifest.reports.multi_agent_real.ok) {
479
+ blockers.push('multi-agent real report incompleto ou com falhas');
480
+ }
481
+ }
458
482
  if (versions.banner.mode === 'unknown') {
459
483
  warnings.push('banner.txt sem placeholder v{version} nem versão fixa detectável');
460
484
  }
@@ -486,8 +510,10 @@ module.exports = {
486
510
  releasePaths,
487
511
  collectWrapperHashes,
488
512
  loadRuntimeSmokeReport,
513
+ loadRuntimeRealReport,
489
514
  loadRecoveryFixtureReport,
490
515
  loadMultiAgentSoakReport,
516
+ loadMultiAgentRealReport,
491
517
  buildReleaseManifest,
492
518
  inspectCanonicalSource,
493
519
  evaluateReleaseManifest,