vibe-coding-master 0.3.2 → 0.3.4

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.
@@ -26,7 +26,9 @@ export function createSessionService(deps) {
26
26
  const model = isCodexReviewer
27
27
  ? normalizeCodexModel(input.model ?? persisted?.model)
28
28
  : normalizeClaudeModel(input.model ?? persisted?.model);
29
- const effort = normalizeSessionEffort(input.effort ?? persisted?.effort);
29
+ const effort = isCodexReviewer
30
+ ? normalizeCodexEffort(input.effort ?? persisted?.effort)
31
+ : normalizeClaudeEffort(input.effort ?? persisted?.effort);
30
32
  const claudeSessionId = launchMode === "resume"
31
33
  ? persisted?.claudeSessionId
32
34
  : randomUUID();
@@ -225,6 +227,24 @@ export function createSessionService(deps) {
225
227
  const task = await deps.taskService.loadTask(repoRoot, taskSlug);
226
228
  await persistTaskSession(deps.fs, getTaskRuntimeRepoRoot(task), config.stateRoot, updated);
227
229
  return updated;
230
+ },
231
+ async markRoleActivityIdle(repoRoot, taskSlug, role) {
232
+ const current = await this.getRoleSession(repoRoot, taskSlug, role);
233
+ if (!current) {
234
+ return undefined;
235
+ }
236
+ const timestamp = now();
237
+ const updated = {
238
+ ...current,
239
+ activityStatus: "idle",
240
+ lastTurnEndedAt: timestamp,
241
+ updatedAt: timestamp
242
+ };
243
+ deps.registry.upsert(updated);
244
+ const config = await deps.projectService.loadConfig(repoRoot);
245
+ const task = await deps.taskService.loadTask(repoRoot, taskSlug);
246
+ await persistTaskSession(deps.fs, getTaskRuntimeRepoRoot(task), config.stateRoot, updated);
247
+ return updated;
228
248
  }
229
249
  };
230
250
  }
@@ -241,21 +261,15 @@ async function buildCodexReviewerStartCommand(fs, taskRepoRoot, launchMode, sele
241
261
  }
242
262
  await fs.ensureDir(reviewDir);
243
263
  const config = await loadCodexSessionConfig(fs, taskRepoRoot);
244
- const model = selectedModel === "default"
245
- ? config.model
246
- : selectedModel;
247
- const modelReasoningEffort = selectedEffort === "default"
248
- ? config.modelReasoningEffort
249
- : selectedEffort;
250
264
  const args = launchMode === "resume"
251
265
  ? ["resume", "--last"]
252
266
  : [];
253
- args.push("--cd", codexDir, "--add-dir", reviewDir, "--sandbox", "workspace-write", "--ask-for-approval", "never", "--dangerously-bypass-hook-trust");
254
- if (model && model !== "default") {
255
- args.push("--model", model);
267
+ args.push("--cd", codexDir, "--add-dir", reviewDir, "--sandbox", "workspace-write", "--ask-for-approval", "never", "--dangerously-bypass-hook-trust", "--search");
268
+ if (selectedModel !== "default") {
269
+ args.push("--model", selectedModel);
256
270
  }
257
- if (modelReasoningEffort && modelReasoningEffort !== "default") {
258
- args.push("--config", `model_reasoning_effort="${modelReasoningEffort}"`);
271
+ if (selectedEffort !== "default") {
272
+ args.push("--config", `model_reasoning_effort="${selectedEffort}"`);
259
273
  }
260
274
  return {
261
275
  command: config.command,
@@ -268,17 +282,13 @@ async function loadCodexSessionConfig(fs, taskRepoRoot) {
268
282
  const configPath = resolveRepoPath(taskRepoRoot, CODEX_CONFIG_PATH);
269
283
  if (!(await fs.pathExists(configPath))) {
270
284
  return {
271
- command: "codex",
272
- model: "gpt-5.5",
273
- modelReasoningEffort: "xhigh"
285
+ command: "codex"
274
286
  };
275
287
  }
276
288
  const content = await fs.readText(configPath);
277
289
  const reviewSection = extractTomlSection(content, "vcm.codex_review");
278
290
  return {
279
- command: parseTomlString(reviewSection, "command") ?? "codex",
280
- model: parseTomlString(content, "model") ?? "gpt-5.5",
281
- modelReasoningEffort: parseTomlString(content, "model_reasoning_effort") ?? "xhigh"
291
+ command: parseTomlString(content, "command") ?? parseTomlString(reviewSection, "command") ?? "codex"
282
292
  };
283
293
  }
284
294
  function matchesRoleHookSession(record, input) {
@@ -332,7 +342,9 @@ async function loadPersistedRoleRecord(fs, repoRoot, stateRoot, taskSlug, role)
332
342
  model: record.role === CODEX_REVIEWER_ROLE
333
343
  ? normalizeCodexModel(record.model)
334
344
  : normalizeClaudeModel(record.model),
335
- effort: normalizeSessionEffort(record.effort)
345
+ effort: record.role === CODEX_REVIEWER_ROLE
346
+ ? normalizeCodexEffort(record.effort)
347
+ : normalizeClaudeEffort(record.effort)
336
348
  }
337
349
  : undefined;
338
350
  }
@@ -400,7 +412,18 @@ function normalizeCodexModel(value) {
400
412
  }
401
413
  return "gpt-5.5";
402
414
  }
403
- function normalizeSessionEffort(value) {
415
+ function normalizeClaudeEffort(value) {
416
+ if (value === "low"
417
+ || value === "medium"
418
+ || value === "high"
419
+ || value === "xhigh"
420
+ || value === "max"
421
+ || value === "ultracode") {
422
+ return value;
423
+ }
424
+ return "default";
425
+ }
426
+ function normalizeCodexEffort(value) {
404
427
  if (value === "low"
405
428
  || value === "medium"
406
429
  || value === "high"
@@ -93,15 +93,11 @@ Summary: <one or two sentences>
93
93
  - Do not request broader filesystem or network permissions.`;
94
94
  }
95
95
  export function renderCodexConfigHarnessRules() {
96
- return `model = "gpt-5.5"
97
- model_reasoning_effort = "xhigh"
96
+ return `# VCM reads this file before launching the Codex Reviewer terminal.
97
+ # Codex CLI project hooks live in .ai/codex/.codex/.
98
98
  approval_policy = "never"
99
99
  default_permissions = "vcm_codex_reviewer"
100
100
 
101
- [vcm.codex_review]
102
- enabled = false
103
- required_gates = []
104
-
105
101
  [permissions.vcm_codex_reviewer.workspace_roots]
106
102
  "../.." = true
107
103
 
@@ -115,7 +111,7 @@ required_gates = []
115
111
  "**/*.env" = "deny"
116
112
 
117
113
  [permissions.vcm_codex_reviewer.network]
118
- enabled = false`;
114
+ enabled = true`;
119
115
  }
120
116
  export function renderCodexCliConfigHarnessRules() {
121
117
  return `[features]
@@ -366,11 +362,6 @@ import uuid
366
362
  from datetime import datetime, timezone
367
363
  from pathlib import Path
368
364
 
369
- try:
370
- import tomllib
371
- except ModuleNotFoundError:
372
- tomllib = None
373
-
374
365
 
375
366
  GATES = ("architecture-plan", "validation-adequacy", "final-diff")
376
367
  REPORTS = {
@@ -468,20 +459,6 @@ def write_json(path: Path, data: dict) -> None:
468
459
  tmp.replace(path)
469
460
 
470
461
 
471
- def load_config(root: Path) -> dict:
472
- path = root / ".ai/codex/config.toml"
473
- if not path.is_file() or tomllib is None:
474
- return {}
475
- return tomllib.loads(path.read_text())
476
-
477
-
478
- def codex_review_config(root: Path) -> dict:
479
- config = load_config(root)
480
- vcm = config.get("vcm", {})
481
- review = vcm.get("codex_review", {}) if isinstance(vcm, dict) else {}
482
- return review if isinstance(review, dict) else {}
483
-
484
-
485
462
  def command_output(root: Path, command: list[str]) -> bytes:
486
463
  result = subprocess.run(
487
464
  command,
@@ -522,11 +499,11 @@ def request_id(gate: str) -> str:
522
499
 
523
500
  def local_request(gate: str) -> int:
524
501
  root = root_dir()
525
- review_config = codex_review_config(root)
526
- enabled = bool(review_config.get("enabled", False))
527
- required = set(review_config.get("required_gates", []))
528
502
  index_path = root / ".ai/vcm/codex-reviews/index.json"
529
503
  index = read_json(index_path)
504
+ enabled = bool(index.get("enabled", False))
505
+ gate_record = index.get("gates", {}).get(gate, {}) if isinstance(index.get("gates"), dict) else {}
506
+ required = bool(gate_record.get("required", False)) if isinstance(gate_record, dict) else False
530
507
  index.update({"version": 1, "enabled": enabled})
531
508
  index.setdefault("gates", {})
532
509
 
@@ -536,7 +513,7 @@ def local_request(gate: str) -> int:
536
513
  print_result("disabled", gate=gate)
537
514
  return 0
538
515
 
539
- if gate not in required:
516
+ if not required:
540
517
  gate_record = index["gates"].setdefault(gate, {})
541
518
  gate_record.update({"required": False, "status": "not_required", "updatedAt": now_iso()})
542
519
  write_json(index_path, index)
@@ -47,7 +47,7 @@ export const CODEX_MODEL_OPTIONS = [
47
47
  description: "Codex account default"
48
48
  }
49
49
  ];
50
- export const SESSION_EFFORT_OPTIONS = [
50
+ export const CODEX_EFFORT_OPTIONS = [
51
51
  {
52
52
  value: "default",
53
53
  label: "Default",
@@ -79,3 +79,12 @@ export const SESSION_EFFORT_OPTIONS = [
79
79
  description: "Maximum reasoning"
80
80
  }
81
81
  ];
82
+ export const CLAUDE_EFFORT_OPTIONS = [
83
+ ...CODEX_EFFORT_OPTIONS,
84
+ {
85
+ value: "ultracode",
86
+ label: "Ultracode",
87
+ description: "Claude Code dynamic workflows with xhigh reasoning"
88
+ }
89
+ ];
90
+ export const SESSION_EFFORT_OPTIONS = CLAUDE_EFFORT_OPTIONS;