oxe-cc 1.8.3 → 1.10.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 (42) hide show
  1. package/.cursor/commands/oxe-dashboard.md +2 -2
  2. package/.cursor/commands/oxe-execute.md +2 -2
  3. package/.cursor/commands/oxe-plan.md +2 -2
  4. package/.cursor/commands/oxe-quick.md +2 -2
  5. package/.cursor/commands/oxe-spec.md +3 -3
  6. package/.github/prompts/oxe-dashboard.prompt.md +2 -2
  7. package/.github/prompts/oxe-execute.prompt.md +2 -2
  8. package/.github/prompts/oxe-plan.prompt.md +2 -2
  9. package/.github/prompts/oxe-quick.prompt.md +2 -2
  10. package/.github/prompts/oxe-spec.prompt.md +3 -3
  11. package/AGENTS.md +1 -1
  12. package/CHANGELOG.md +45 -0
  13. package/README.md +32 -26
  14. package/bin/lib/oxe-context-engine.cjs +2 -0
  15. package/bin/lib/oxe-operational.cjs +230 -74
  16. package/bin/lib/oxe-project-health.cjs +43 -9
  17. package/bin/lib/oxe-rationality.cjs +146 -1
  18. package/bin/lib/oxe-release.cjs +55 -0
  19. package/bin/oxe-cc.js +60 -37
  20. package/commands/oxe/dashboard.md +2 -2
  21. package/commands/oxe/execute.md +2 -2
  22. package/commands/oxe/plan.md +2 -2
  23. package/commands/oxe/quick.md +2 -2
  24. package/commands/oxe/spec.md +3 -3
  25. package/docs/RELEASE-READINESS.md +8 -1
  26. package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +48 -0
  27. package/lib/runtime/scheduler/multi-agent-coordinator.js +274 -14
  28. package/lib/runtime/workspace/strategies/git-worktree.js +18 -9
  29. package/oxe/templates/REFERENCE-ANCHORS.template.md +12 -5
  30. package/oxe/templates/SPEC.template.md +10 -0
  31. package/oxe/templates/VISUAL-INPUTS.template.json +27 -0
  32. package/oxe/templates/VISUAL-INPUTS.template.md +36 -0
  33. package/oxe/workflows/execute.md +3 -0
  34. package/oxe/workflows/plan.md +13 -9
  35. package/oxe/workflows/references/workflow-runtime-contracts.json +44 -29
  36. package/oxe/workflows/spec.md +19 -8
  37. package/oxe/workflows/ui-spec.md +3 -2
  38. package/package.json +6 -3
  39. package/packages/runtime/package.json +1 -1
  40. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +379 -47
  41. package/packages/runtime/src/workspace/strategies/git-worktree.ts +24 -16
  42. package/vscode-extension/package.json +1 -1
@@ -9,19 +9,21 @@ export class GitWorktreeManager implements WorkspaceManager {
9
9
  readonly isolation_level = 'isolated' as const;
10
10
  private leases = new Map<string, WorkspaceLease>();
11
11
 
12
- constructor(private readonly projectRoot: string) {}
13
-
14
- async allocate(req: WorkspaceRequest): Promise<WorkspaceLease> {
15
- const wsId = `ws-${req.work_item_id}-a${req.attempt_number}`;
16
- const branch = `oxe/${req.work_item_id}-attempt${req.attempt_number}`;
17
- const worktreePath = path.join(this.projectRoot, '.oxe', 'workspaces', wsId);
18
-
19
- const baseCommit = this.git(['rev-parse', 'HEAD']).trim();
12
+ constructor(private readonly projectRoot: string) {}
13
+
14
+ async allocate(req: WorkspaceRequest): Promise<WorkspaceLease> {
15
+ const suffix = crypto.randomBytes(4).toString('hex');
16
+ const safeWorkItem = String(req.work_item_id).replace(/[^A-Za-z0-9._-]/g, '-');
17
+ const wsId = `ws-${safeWorkItem}-a${req.attempt_number}-${suffix}`;
18
+ const branch = `oxe/${safeWorkItem}-attempt${req.attempt_number}-${suffix}`;
19
+ const worktreePath = path.join(this.projectRoot, '.oxe', 'workspaces', wsId);
20
+
21
+ const baseCommit = this.git(['rev-parse', 'HEAD'], undefined, 'git_worktree requires a git repository with at least one base commit').trim();
20
22
 
21
23
  fs.mkdirSync(path.dirname(worktreePath), { recursive: true });
22
24
 
23
25
  // Create worktree on a new branch starting from HEAD
24
- this.git(['worktree', 'add', worktreePath, '-b', branch]);
26
+ this.git(['worktree', 'add', worktreePath, '-b', branch], undefined, 'failed to create git_worktree workspace');
25
27
 
26
28
  const lease: WorkspaceLease = {
27
29
  workspace_id: wsId,
@@ -70,10 +72,16 @@ export class GitWorktreeManager implements WorkspaceManager {
70
72
  this.leases.delete(id);
71
73
  }
72
74
 
73
- private git(args: string[], cwd?: string): string {
74
- return execFileSync('git', args, {
75
- cwd: cwd ?? this.projectRoot,
76
- encoding: 'utf8',
77
- });
78
- }
79
- }
75
+ private git(args: string[], cwd?: string, message?: string): string {
76
+ try {
77
+ return execFileSync('git', args, {
78
+ cwd: cwd ?? this.projectRoot,
79
+ encoding: 'utf8',
80
+ stdio: ['ignore', 'pipe', 'pipe'],
81
+ });
82
+ } catch (error) {
83
+ const detail = error instanceof Error ? error.message : String(error);
84
+ throw new Error(`${message || 'git command failed'}: git ${args.join(' ')} (${detail})`);
85
+ }
86
+ }
87
+ }
@@ -2,7 +2,7 @@
2
2
  "name": "oxe-agents",
3
3
  "displayName": "OXE Agents",
4
4
  "description": "Agentes OXE para GitHub Copilot Chat — cada fase do ciclo como um @agente no VS Code",
5
- "version": "1.8.3",
5
+ "version": "1.10.0",
6
6
  "publisher": "oxe-cc",
7
7
  "license": "MIT",
8
8
  "engines": {