oxe-cc 1.12.0 → 1.16.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 (40) hide show
  1. package/.github/dependabot.yml +31 -0
  2. package/.github/workflows/ci.yml +141 -56
  3. package/.github/workflows/release.yml +114 -89
  4. package/CHANGELOG.md +866 -754
  5. package/README.md +600 -736
  6. package/bin/lib/oxe-agent-install.cjs +299 -284
  7. package/bin/lib/oxe-artifact-catalog.cjs +376 -0
  8. package/bin/lib/oxe-command-registry.cjs +31 -0
  9. package/bin/lib/oxe-context-engine.cjs +11 -11
  10. package/bin/lib/oxe-core-command-handlers.cjs +82 -0
  11. package/bin/lib/oxe-dashboard.cjs +140 -140
  12. package/bin/lib/oxe-manifest.cjs +20 -20
  13. package/bin/lib/oxe-npm-version.cjs +6 -4
  14. package/bin/lib/oxe-plugin-cli.cjs +95 -0
  15. package/bin/lib/oxe-plugins.cjs +94 -3
  16. package/bin/lib/oxe-process.cjs +67 -0
  17. package/bin/lib/oxe-project-health.cjs +2846 -2781
  18. package/bin/lib/oxe-runtime-semantics.cjs +68 -69
  19. package/bin/oxe-cc.js +369 -353
  20. package/docs/INTEGRATION.md +182 -0
  21. package/docs/QUALITY-GATES.md +46 -0
  22. package/docs/RELEASE-READINESS.md +86 -61
  23. package/docs/RUNTIME-SMOKE-MATRIX.md +137 -135
  24. package/docs/oxe-artifact-map.html +1172 -0
  25. package/lib/sdk/index.cjs +20 -0
  26. package/lib/sdk/index.d.ts +971 -876
  27. package/lib/sdk/index.types.ts +933 -0
  28. package/oxe/templates/PLUGINS.md +8 -1
  29. package/oxe/templates/STATE-REFERENCE.md +125 -0
  30. package/oxe/templates/STATE.md +11 -121
  31. package/oxe/workflows/help.md +2 -0
  32. package/package.json +129 -108
  33. package/packages/runtime/package.json +18 -18
  34. package/packages/runtime/src/evidence/evidence-store.ts +2 -2
  35. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +728 -728
  36. package/packages/runtime/src/workspace/strategies/git-worktree.ts +24 -24
  37. package/packages/runtime/tsconfig.json +8 -2
  38. package/vscode-extension/.vscodeignore +2 -0
  39. package/vscode-extension/package.json +193 -185
  40. package/vscode-extension/src/extension.js +11 -1
@@ -238,7 +238,6 @@ function humanizeValue(value) {
238
238
  plan: 'plano',
239
239
  findings: 'achados',
240
240
  routing: 'roteamento',
241
- execution: 'execução',
242
241
  read_heavy: 'leitura intensa',
243
242
  write_bounded: 'mutação limitada',
244
243
  review_heavy: 'revisão intensa',
@@ -253,23 +252,23 @@ function humanizeValue(value) {
253
252
  return labels[key] || key.replace(/_/g, ' ');
254
253
  }
255
254
 
256
- function buildContextPackPaths(slug) {
257
- return {
258
- markdown: `.oxe/context/packs/${slug}.md`,
259
- json: `.oxe/context/packs/${slug}.json`,
260
- inspectCommand: `oxe-cc context inspect --workflow ${slug} --json`,
261
- };
262
- }
263
-
264
- function buildWorkflowResolutionBlock(slug) {
265
- return [
266
- '<!-- oxe-workflow-resolution:start -->',
267
- '',
268
- `**Resolução do workflow canónico:** a partir do CWD atual, subir diretórios até encontrar .oxe/workflows/${slug}.md ou oxe/workflows/${slug}.md. Ler e aplicar integralmente o primeiro ficheiro encontrado. Não assumir que o CWD já é a raiz do repositório. Se nenhum existir, reportar os paths tentados e parar.`,
269
- '',
270
- '<!-- oxe-workflow-resolution:end -->',
271
- ].join('\n');
272
- }
255
+ function buildContextPackPaths(slug) {
256
+ return {
257
+ markdown: `.oxe/context/packs/${slug}.md`,
258
+ json: `.oxe/context/packs/${slug}.json`,
259
+ inspectCommand: `oxe-cc context inspect --workflow ${slug} --json`,
260
+ };
261
+ }
262
+
263
+ function buildWorkflowResolutionBlock(slug) {
264
+ return [
265
+ '<!-- oxe-workflow-resolution:start -->',
266
+ '',
267
+ `**Resolução do workflow canónico:** a partir do CWD atual, subir diretórios até encontrar .oxe/workflows/${slug}.md ou oxe/workflows/${slug}.md. Ler e aplicar integralmente o primeiro ficheiro encontrado. Não assumir que o CWD já é a raiz do repositório. Se nenhum existir, reportar os paths tentados e parar.`,
268
+ '',
269
+ '<!-- oxe-workflow-resolution:end -->',
270
+ ].join('\n');
271
+ }
273
272
 
274
273
  function buildReasoningContractBlock(meta, options = {}) {
275
274
  const includeReference = options.includeReference !== false;
@@ -346,14 +345,14 @@ function parseFrontmatterMap(raw) {
346
345
  return out;
347
346
  }
348
347
 
349
- function auditWrapperText(slug, raw) {
350
- const frontmatter = parseFrontmatterMap(raw);
351
- const expected = getRuntimeMetadataForSlug(slug);
352
- const expectedPack = buildContextPackPaths(slug);
353
- const workflowResolution = buildWorkflowResolutionBlock(slug);
354
- const issues = [];
355
- for (const key of RUNTIME_METADATA_KEYS) {
356
- if ((frontmatter[key] || '') !== (expected[key] || '')) {
348
+ function auditWrapperText(slug, raw) {
349
+ const frontmatter = parseFrontmatterMap(raw);
350
+ const expected = getRuntimeMetadataForSlug(slug);
351
+ const expectedPack = buildContextPackPaths(slug);
352
+ const workflowResolution = buildWorkflowResolutionBlock(slug);
353
+ const issues = [];
354
+ for (const key of RUNTIME_METADATA_KEYS) {
355
+ if ((frontmatter[key] || '') !== (expected[key] || '')) {
357
356
  issues.push({ key, expected: expected[key] || '', actual: frontmatter[key] || '' });
358
357
  }
359
358
  }
@@ -366,43 +365,43 @@ function auditWrapperText(slug, raw) {
366
365
  if (!String(raw || '').includes(expectedPack.markdown) || !String(raw || '').includes(expectedPack.json)) {
367
366
  issues.push({ key: 'oxe_context_pack_entry', expected: `${expectedPack.markdown} + ${expectedPack.json}`, actual: 'missing' });
368
367
  }
369
- if (!String(raw || '').includes('Regra pack-first')) {
370
- issues.push({ key: 'oxe_pack_first_rule', expected: 'present', actual: 'missing' });
371
- }
372
- if (!String(raw || '').includes('<!-- oxe-workflow-resolution:start -->')) {
373
- issues.push({ key: 'oxe_workflow_resolution_block', expected: 'present', actual: 'missing' });
374
- } else {
375
- if (!String(raw || '').includes(`.oxe/workflows/${slug}.md`) || !String(raw || '').includes(`oxe/workflows/${slug}.md`)) {
376
- issues.push({
377
- key: 'oxe_workflow_resolution_paths',
378
- expected: workflowResolution,
379
- actual: 'missing_path_reference',
380
- });
381
- }
382
- if (!/subir diretórios até encontrar/i.test(String(raw || ''))) {
383
- issues.push({
384
- key: 'oxe_workflow_resolution_walkup',
385
- expected: 'subir diretórios até encontrar',
386
- actual: 'missing',
387
- });
388
- }
389
- }
390
- if (/\*\*Workflow can[óôo]nic[oa]:\*\*/i.test(String(raw || ''))) {
391
- issues.push({
392
- key: 'legacy_workflow_anchor',
393
- expected: 'absent',
394
- actual: 'present',
395
- });
396
- }
397
- if (/raiz do projeto atual \(CWD\)|na raiz do repositório em contexto|na raiz do repositório em que estás a trabalhar/i.test(String(raw || ''))) {
398
- issues.push({
399
- key: 'legacy_fixed_root_instruction',
400
- expected: 'absent',
401
- actual: 'present',
402
- });
403
- }
404
- return {
405
- slug,
368
+ if (!String(raw || '').includes('Regra pack-first')) {
369
+ issues.push({ key: 'oxe_pack_first_rule', expected: 'present', actual: 'missing' });
370
+ }
371
+ if (!String(raw || '').includes('<!-- oxe-workflow-resolution:start -->')) {
372
+ issues.push({ key: 'oxe_workflow_resolution_block', expected: 'present', actual: 'missing' });
373
+ } else {
374
+ if (!String(raw || '').includes(`.oxe/workflows/${slug}.md`) || !String(raw || '').includes(`oxe/workflows/${slug}.md`)) {
375
+ issues.push({
376
+ key: 'oxe_workflow_resolution_paths',
377
+ expected: workflowResolution,
378
+ actual: 'missing_path_reference',
379
+ });
380
+ }
381
+ if (!/subir diretórios até encontrar/i.test(String(raw || ''))) {
382
+ issues.push({
383
+ key: 'oxe_workflow_resolution_walkup',
384
+ expected: 'subir diretórios até encontrar',
385
+ actual: 'missing',
386
+ });
387
+ }
388
+ }
389
+ if (/\*\*Workflow can[óôo]nic[oa]:\*\*/i.test(String(raw || ''))) {
390
+ issues.push({
391
+ key: 'legacy_workflow_anchor',
392
+ expected: 'absent',
393
+ actual: 'present',
394
+ });
395
+ }
396
+ if (/raiz do projeto atual \(CWD\)|na raiz do repositório em contexto|na raiz do repositório em que estás a trabalhar/i.test(String(raw || ''))) {
397
+ issues.push({
398
+ key: 'legacy_fixed_root_instruction',
399
+ expected: 'absent',
400
+ actual: 'present',
401
+ });
402
+ }
403
+ return {
404
+ slug,
406
405
  frontmatter,
407
406
  expected,
408
407
  issues,
@@ -496,12 +495,12 @@ module.exports = {
496
495
  REQUIRED_CONTRACT_FIELDS,
497
496
  RUNTIME_METADATA_KEYS,
498
497
  auditRuntimeTargets,
499
- auditWrapperText,
500
- buildContextPackPaths,
501
- buildContextTiers,
502
- buildReasoningContractBlock,
503
- buildWorkflowResolutionBlock,
504
- computeSemanticsHash,
498
+ auditWrapperText,
499
+ buildContextPackPaths,
500
+ buildContextTiers,
501
+ buildReasoningContractBlock,
502
+ buildWorkflowResolutionBlock,
503
+ computeSemanticsHash,
505
504
  getAllWorkflowContracts,
506
505
  getRuntimeMetadataForSlug,
507
506
  getWorkflowContract,