codehere 0.3.4 → 0.5.0-alpha.2
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/README.md +68 -11
- package/dist/index.js +43 -0
- package/dist/infrastructure/hooks/claude-sdk-hook.js +18 -3
- package/dist/infrastructure/orchestration/aider-adapter.js +12 -2
- package/dist/infrastructure/orchestration/claude-code-adapter.js +9 -1
- package/dist/infrastructure/orchestration/codex-adapter.js +6 -1
- package/dist/infrastructure/orchestration/conductor-adapter.js +12 -2
- package/dist/infrastructure/orchestration/gemini-adapter.js +425 -0
- package/dist/infrastructure/orchestration/generic-cli-adapter.js +10 -2
- package/dist/infrastructure/orchestration/memory-injector.js +337 -0
- package/dist/infrastructure/orchestration/opencode-adapter.js +34 -4
- package/dist/infrastructure/orchestration/progress-aggregator.js +157 -0
- package/dist/infrastructure/orchestration/readiness.js +2 -5
- package/dist/infrastructure/orchestration/session-manager.js +2 -1
- package/dist/infrastructure/orchestration/session-persistence.js +13 -1
- package/dist/infrastructure/protocols/mcp-server-impl.js +30 -3
- package/dist/infrastructure/protocols/ui-page.js +468 -59
- package/dist/presentation/cli/commands/init-command.js +342 -24
- package/dist/presentation/cli/commands/memory-command.js +1017 -0
- package/dist/presentation/cli/commands/protocols-builder.js +254 -0
- package/dist/presentation/cli/commands/protocols-command.js +84 -0
- package/dist/presentation/cli/commands/repo-map-builder.js +247 -0
- package/package.json +4 -3
|
@@ -437,10 +437,24 @@ export function startMCPServer(options = {}) {
|
|
|
437
437
|
// ── E2 · Per-agent readiness (onboarding surface) ─────────────────────────
|
|
438
438
|
// Full registry snapshot: install state + auth state + hints. Powers the
|
|
439
439
|
// setup-aware agent dropdown and the one-click swap flow on auth errors.
|
|
440
|
+
//
|
|
441
|
+
// Apr 29: Conductor moved to a separate `auto` field. The web UI IS the
|
|
442
|
+
// Conductor surface — exposing "conductor" as a peer in the agents array
|
|
443
|
+
// is the "Gmail asks you to pick 'email' before composing" anti-pattern.
|
|
444
|
+
// But Conductor's readiness state IS the Auto option's readiness, so the
|
|
445
|
+
// UI needs it preserved (codex Round 1 caught: fresh install with no
|
|
446
|
+
// specialists installed would otherwise lose the setup prompt — Auto
|
|
447
|
+
// gets selected by default, submission fails at /api/task because
|
|
448
|
+
// conductor.isInstalled() returns false). The separate `auto` field
|
|
449
|
+
// keeps the setup hint plumbing intact while preventing the dropdown
|
|
450
|
+
// from showing Conductor as a peer choice.
|
|
440
451
|
if (req.method === 'GET' && req.url === '/api/readiness/agents') {
|
|
441
452
|
try {
|
|
453
|
+
const all = readinessForAllAgents();
|
|
454
|
+
const auto = all.find((a) => a.id === 'conductor');
|
|
455
|
+
const agents = all.filter((a) => a.id !== 'conductor');
|
|
442
456
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
443
|
-
res.end(JSON.stringify({ agents
|
|
457
|
+
res.end(JSON.stringify({ agents, auto }));
|
|
444
458
|
}
|
|
445
459
|
catch (e) {
|
|
446
460
|
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
@@ -485,9 +499,22 @@ export function startMCPServer(options = {}) {
|
|
|
485
499
|
// log/spawn. Stops log injection (`agent: "claude-code\n[FAKE]"`),
|
|
486
500
|
// future-proofs against partial-match exploits, and fails fast
|
|
487
501
|
// with a clear 400 instead of letting SessionManager.spawn throw.
|
|
502
|
+
//
|
|
503
|
+
// Apr 29: default flipped from 'claude-code' to 'conductor'. The web
|
|
504
|
+
// UI is the Conductor surface; tasks submitted without an explicit
|
|
505
|
+
// agent route through the supervisor (rule-based routing today,
|
|
506
|
+
// LLM classifier in v0.6). Empty string is treated like undefined
|
|
507
|
+
// so the form submitting `agent: ""` (Auto option) hits the same
|
|
508
|
+
// path. Specialists remain explicit overrides via the dropdown.
|
|
509
|
+
// Type-check is preserved: non-string non-undefined values still 400.
|
|
510
|
+
if (agent !== undefined && agent !== null && typeof agent !== 'string') {
|
|
511
|
+
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
512
|
+
res.end(JSON.stringify({ error: 'agent must be a string or omitted' }));
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
488
515
|
const validAgentIds = new Set(allAdapters().map((a) => a.id));
|
|
489
|
-
const agentId = agent
|
|
490
|
-
if (
|
|
516
|
+
const agentId = (typeof agent === 'string' && agent.length > 0) ? agent : 'conductor';
|
|
517
|
+
if (!validAgentIds.has(agentId)) {
|
|
491
518
|
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
492
519
|
res.end(JSON.stringify({
|
|
493
520
|
error: `Unknown agent: ${typeof agentId === 'string' ? agentId.slice(0, 64) : '<non-string>'}`,
|