Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
54e41d0
feat(oar): expose all 16 OAR runtimes in CLI/Chat, align workbench to…
songwells Dec 4, 2026
72589f4
feat(oar): add sessions.sqlite WAL store, in-process MCP write tools,…
songwells Dec 4, 2026
9541aa5
fix(oar): abort active sessions before draining shutdown requests
songoow Dec 4, 2026
4122e59
fix(oar): integrate governed Turn sessions and preserve registered Ch…
songoow Dec 4, 2026
e02a6ac
fix(oar): require completed turns and verify generic Chat health
songoow Dec 4, 2026
fb9899f
Merge reviewed Phase 3 fixes into Phase 4
songoow Dec 4, 2026
82f8820
Merge packaged OAR runtime fixes into Phase 4
songoow Dec 4, 2026
d7f2dec
Preserve OAR session identity and turn deadlines and align Workbench …
songoow Dec 4, 2026
59456a8
Synchronize the verified Goal worker lease regression
songoow Dec 4, 2026
637dfff
Preserve OAR session history, enforce turn grants and connect Dashboa…
songoow Dec 4, 2026
141329f
Keep generic OAR Chat on the root session and retire missing handles
songoow Dec 4, 2026
2b3a0c6
Preserve OAR replay, migrate real Chat transcripts and scope model di…
songoow Dec 4, 2026
e6f882f
Use the patched minimatch release in the Workbench Pi runtime
songoow Dec 4, 2026
2d60ecb
Pin patched minimatch in Dashboard OAR and synchronize the validated …
songoow Dec 4, 2026
e76e034
Merge codex/oar-deep-fusion-phase3 into codex/oar-deep-fusion-phase4-…
songwells Dec 5, 2026
9de437a
fix(oar): defer oar_turn_host import from turn CLI registration and u…
songwells Dec 5, 2026
aa5b219
Merge codex/oar-deep-fusion-phase4-runtimes into codex/oar-deep-fusio…
songwells Dec 5, 2026
b5b2a1c
fix(oar): narrow model_settings mypy types, pin standardwebhooks 1.3.…
songwells Dec 5, 2026
4451fba
Merge branch 'codex/oar-deep-fusion-phase3' into codex/oar-deep-fusio…
songwells Dec 5, 2026
cd10360
Merge branch 'codex/oar-deep-fusion-phase4-runtimes' into codex/oar-d…
songwells Dec 5, 2026
54ea3f3
Merge branch 'codex/oar-deep-fusion-phase3' into codex/oar-deep-fusio…
songwells Dec 5, 2026
c92b4e9
Merge branch 'codex/oar-deep-fusion-phase4-runtimes' into codex/oar-d…
songwells Dec 5, 2026
826b149
Merge pull request #10098 from loopx-project/codex/oar-deep-fusion-ph…
songoow Dec 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,047 changes: 4,055 additions & 992 deletions apps/presentation/dashboard/package-lock.json

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion apps/presentation/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"preview": "vite preview --host 127.0.0.1",
"smoke:action-packet": "rm -rf /tmp/loopx-action-packet-smoke && tsc --ignoreConfig --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck --strict --outDir /tmp/loopx-action-packet-smoke smoke/action-packet-smoke.ts src/data/action-packet.ts && node /tmp/loopx-action-packet-smoke/smoke/action-packet-smoke.js",
"smoke:agent-family": "tsc --ignoreConfig --target ES2022 --module ES2022 --moduleResolution Bundler --skipLibCheck --strict --outDir node_modules/.cache/loopx-agent-family src/features/personal-workspace/agent-family.ts && node src/features/personal-workspace/agent-family.test.mjs",
"smoke:oar-observe": "tsc --noEmit --ignoreConfig --target ES2022 --module ES2022 --moduleResolution Bundler --allowImportingTsExtensions --types node --skipLibCheck --strict smoke/oar-observe-smoke.ts src/data/oar-observe.ts && vite build --ssr smoke/oar-observe-smoke.ts --outDir node_modules/.cache/loopx-oar-observe-smoke --emptyOutDir && node node_modules/.cache/loopx-oar-observe-smoke/oar-observe-smoke.js",
"smoke:benchmark-study": "rm -rf node_modules/.cache/loopx-benchmark-study-smoke && tsc --ignoreConfig --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck --strict --resolveJsonModule --outDir node_modules/.cache/loopx-benchmark-study-smoke smoke/benchmark-study-contract-smoke.ts src/data/benchmark-study.ts && node node_modules/.cache/loopx-benchmark-study-smoke/smoke/benchmark-study-contract-smoke.js",
"smoke:benchmark-study-browser": "node ../../../examples/dashboard-benchmark-study-browser-smoke.mjs",
"smoke:capability-configuration": "rm -rf node_modules/.cache/loopx-capability-configuration-smoke && tsc --ignoreConfig --target ES2022 --module NodeNext --moduleResolution NodeNext --types node --skipLibCheck --strict --outDir node_modules/.cache/loopx-capability-configuration-smoke smoke/capability-configuration-smoke.ts src/data/capability-configuration.ts && node node_modules/.cache/loopx-capability-configuration-smoke/smoke/capability-configuration-smoke.js",
Expand Down Expand Up @@ -100,6 +101,7 @@
"smoke:delegation-cancel": "LOOPX_PLAYWRIGHT_PACKAGE=\"$PWD/node_modules/playwright\" node --experimental-strip-types smoke/delegation-read-cancel.ts"
},
"dependencies": {
"@botiverse/oar": "0.142.0",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/geist-mono": "^5.3.0",
"@tailwindcss/vite": "^4.3.0",
Expand Down Expand Up @@ -128,7 +130,15 @@
"vite": "^8.3.4"
},
"overrides": {
"@botiverse/bottega": {
"undici": "^7.30.2"
},
"@earendil-works/pi-coding-agent": {
"minimatch": "11.0.10"
},
"cross-spawn": "^7.1.2",
"nanoid": "3.3.18",
"postcss": "8.5.26"
"postcss": "8.5.26",
"standardwebhooks": "1.3.0"
}
}
83 changes: 83 additions & 0 deletions apps/presentation/dashboard/smoke/oar-observe-smoke.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import assert from "node:assert/strict";
import type { RawEvent } from "@botiverse/oar/browser";
import {
canonicalOarBrandId,
classifyTool,
formatOarTurnFailure,
getOarRuntimeConfigForm,
listOarRuntimeBrands,
listOarRuntimeConfigForms,
reduceOarRecordsToView,
resolveOarRuntimeBrand,
toolActionLabel,
} from "../src/data/oar-observe.ts";

// 1) All 16 OAR brands resolve offline with SVG icons in both light & dark themes.
const lightBrands = listOarRuntimeBrands("light");
const darkBrands = listOarRuntimeBrands("dark");
assert.equal(lightBrands.length, 16);
assert.equal(darkBrands.length, 16);

assert.equal(canonicalOarBrandId("deepseek_harness_segment"), "dsh");
assert.equal(canonicalOarBrandId("claude-code"), "claude");
assert.equal(canonicalOarBrandId("agy-cli"), "antigravity");
assert.equal(canonicalOarBrandId("droid"), "factory");
assert.equal(canonicalOarBrandId("unknown-custom"), null);

const codexDark = resolveOarRuntimeBrand("codex-cli", "dark");
assert.ok(codexDark);
assert.equal(codexDark.id, "codex");
assert.equal(codexDark.name, "Codex");
assert.ok(codexDark.icon?.startsWith("data:image/svg+xml,"));

// 2) Declarative OAR runtime config forms resolve cleanly.
const forms = listOarRuntimeConfigForms();
assert.ok(typeof forms === "object" && forms !== null);
for (const key of Object.keys(forms)) {
assert.ok(getOarRuntimeConfigForm(key) !== null);
}

// 3) Pure @botiverse/oar/observe fold reduces RawEvent[] cleanly in browser-safe code.
const records: RawEvent[] = [
{
sessionId: "sess-ui-1",
agentPath: [],
seq: 0,
receivedAt: 1_700_000_000_000,
kind: "frame",
body: {
type: "scripted/turn",
native: {},
events: [
{ kind: "turn_active" },
{ kind: "text_delta", text: "All tests passed." },
{ kind: "turn_ended", outcome: { kind: "completed" } },
],
},
},
];
const snapshot = reduceOarRecordsToView("sess-ui-1", records, "codex");
assert.equal(snapshot.view.rootSessionId, "sess-ui-1");
assert.equal(snapshot.status.kind, "idle");
assert.ok(snapshot.view.messages.length >= 1);

const action = classifyTool("claude", "Read", '{"file_path":"README.md"}');
assert.equal(action.kind, "read_file");
assert.equal(action.detail, "README.md");
assert.ok(toolActionLabel(action.kind, "done").length > 0);

// 4) Failure advice formatting preserves OAR recovery semantics.
const formatted = formatOarTurnFailure(
{
kind: "failed",
failure: "rate_limited",
reason: "429 too many requests",
status: 429,
},
"Codex",
);
assert.ok(formatted.text.length > 0);
assert.equal(formatted.advice.retry, "now");
assert.equal(formatted.advice.userAction, false);

console.log("Dashboard OAR observe/brands/forms smoke passed");
12 changes: 8 additions & 4 deletions apps/presentation/dashboard/src/data/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,14 +844,18 @@ export type AgentModelDiscovery = {
ok: true;
schema_version: "loopx_chat_agent_model_options_v1";
agent_id: string;
oar_runtime_id?: string;
supported: boolean;
model: { id: string; label: string; selected: string; options: AgentModelOption[] } | null;
reasoning_effort?: { id: string; label: string; selected: string; options: AgentModelOption[] } | null;
model: { id: string; label: string; selected: string | null; options: AgentModelOption[] } | null;
reasoning_effort?: { id: string; label: string; selected: string | null; options: AgentModelOption[] } | null;
};

export function discoverAgentModelOptions(agentId: string, signal?: AbortSignal, goalId?: string, modelId?: string) {
export function discoverAgentModelOptions(
agentId: string, signal?: AbortSignal, context: { goalId?: string; projectRef?: string; modelId?: string } = {},
) {
return requestJson<AgentModelDiscovery>("/api/chat/agent-model-options", {
method: "POST", signal, body: JSON.stringify({agent_id: agentId, ...(goalId ? {goal_id: goalId} : {}), ...(modelId ? {agent_model_id: modelId} : {})}),
method: "POST", signal, body: JSON.stringify({agent_id: agentId, ...(context.projectRef ? {project_ref: context.projectRef} : {}),
...(context.goalId ? {goal_id: context.goalId} : {}), ...(context.modelId ? {agent_model_id: context.modelId} : {})}),
});
}

Expand Down
202 changes: 202 additions & 0 deletions apps/presentation/dashboard/src/data/oar-observe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
/**
* Browser-safe OAR observability, branding, and runtime configuration form
* adapter for LoopX Dashboard.
*
* Imports ONLY browser-safe `@botiverse/oar` subpaths (`@botiverse/oar/observe`,
* `@botiverse/oar/brands`, `@botiverse/oar/forms`) with zero Node built-ins.
*/
import type { RawEvent, TurnOutcome } from "@botiverse/oar/browser";
import {
runtimeBrandIcon,
runtimeBrands,
type RuntimeBrand,
} from "@botiverse/oar/brands";
import {
configForms,
type RuntimeConfigForm,
} from "@botiverse/oar/forms";
import {
classifyTool,
contextUsageOf,
failureAdvice,
failureText,
groupToolActivity,
initialConversation,
initialSessionView,
initialTaskState,
noticeText,
noticeTone,
observeStalls,
phaseLabel,
reduceConversation,
reduceSessionView,
reduceTaskState,
statusOf,
taskStatusLabel,
toolActionLabel,
toolGroupSummary,
usageOf,
type AgentStatus,
type ConversationState,
type FailureAdvice,
type SessionView,
type StallInfo,
type TaskState,
} from "@botiverse/oar/observe";

export type OarThemeMode = "light" | "dark";

export interface OarRuntimeBrandSummary {
readonly id: string;
readonly name: string;
readonly icon: string | null;
}

export interface OarReducedSessionSnapshot {
readonly view: SessionView;
readonly conversation: ConversationState;
readonly tasks: TaskState;
readonly status: AgentStatus;
readonly phaseText: string;
readonly usage: ReturnType<typeof usageOf>["value"];
readonly contextUsage: ReturnType<typeof contextUsageOf>["value"];
}

const RUNTIME_BRAND_ALIASES: Readonly<Record<string, keyof typeof runtimeBrands>> = {
codex: "codex",
"codex-cli": "codex",
codex_cli: "codex",
claude: "claude",
"claude-code": "claude",
claude_code: "claude",
dsh: "dsh",
"deepseek-harness": "dsh",
deepseek_harness: "dsh",
deepseek_harness_segment: "dsh",
pi: "pi",
"pi-cli": "pi",
"pi-durable": "pi-durable",
pi_durable: "pi-durable",
opencode: "opencode",
opencode2: "opencode",
antigravity: "antigravity",
"antigravity-cli": "antigravity",
"agy-cli": "antigravity",
agy: "antigravity",
kimi: "kimi",
"kimi-cli": "kimi",
qwen: "qwen",
devin: "devin",
factory: "factory",
droid: "factory",
grok: "grok",
codebuddy: "codebuddy",
qoder: "qoder",
qodercli: "qoder",
cursor: "cursor",
"cursor-cli": "cursor",
bottega: "bottega",
};

/** Normalize a LoopX agent_id or adapter alias onto its canonical OAR brand key. */
export function canonicalOarBrandId(rawId: string): keyof typeof runtimeBrands | null {
const token = rawId.trim().toLowerCase();
return RUNTIME_BRAND_ALIASES[token] ?? null;
}

/** Resolve offline SVG brand icon + display label for any OAR runtime or alias. */
export function resolveOarRuntimeBrand(
runtimeOrAgentId: string,
theme: OarThemeMode = "light",
): OarRuntimeBrandSummary | null {
const canonical = canonicalOarBrandId(runtimeOrAgentId);
if (!canonical) return null;
const brand = runtimeBrands[canonical] as RuntimeBrand;
return {
id: canonical,
name: brand.name,
icon: runtimeBrandIcon(brand, theme),
};
}

/** Return all 16 OAR built-in runtime brands resolved for the active theme. */
export function listOarRuntimeBrands(theme: OarThemeMode = "light"): readonly OarRuntimeBrandSummary[] {
return (Object.keys(runtimeBrands) as (keyof typeof runtimeBrands)[]).map((id) => {
const brand = runtimeBrands[id] as RuntimeBrand;
return {
id,
name: brand.name,
icon: runtimeBrandIcon(brand, theme),
};
});
}

/** Look up OAR's declarative configuration form schema for a runtime ID or alias. */
export function getOarRuntimeConfigForm(runtimeOrAgentId: string): RuntimeConfigForm | null {
const canonical = canonicalOarBrandId(runtimeOrAgentId);
if (!canonical) return null;
return configForms[canonical] ?? null;
}

/** Return all declared OAR runtime configuration forms indexed by runtime ID. */
export function listOarRuntimeConfigForms(): Readonly<Record<string, RuntimeConfigForm>> {
return configForms;
}

/**
* Pure fold from OAR `RawEvent[]` records into Dashboard-ready session view,
* conversation transcript, task state, agent status, and usage projections.
*/
export function reduceOarRecordsToView(
sessionId: string,
records: readonly RawEvent[],
runtimeId?: string,
): OarReducedSessionSnapshot {
let view = initialSessionView(sessionId);
let conversation = initialConversation();
let tasks = initialTaskState();
for (const record of records) {
view = reduceSessionView(view, record, sessionId);
conversation = reduceConversation(conversation, record, sessionId);
tasks = reduceTaskState(tasks, record);
}
const status = statusOf(records, sessionId).value;
const phase = status.kind === "running" ? phaseLabel(status.phase, runtimeId) : status.kind;
return {
view,
conversation,
tasks,
status,
phaseText: phase,
usage: usageOf(records, sessionId).value,
contextUsage: contextUsageOf(records, sessionId).value,
};
}

/** Format a failed OAR `TurnOutcome` into user-safe message + typed recovery advice. */
export function formatOarTurnFailure(
outcome: Extract<TurnOutcome, { readonly kind: "failed" }>,
runtimeName = "Agent",
): {
readonly text: string;
readonly advice: FailureAdvice;
} {
const credential = "credential" in outcome ? outcome.credential : undefined;
return {
text: failureText(outcome.failure, runtimeName, credential),
advice: failureAdvice(outcome.failure),
};
}

export {
classifyTool,
groupToolActivity,
noticeText,
noticeTone,
observeStalls,
phaseLabel,
taskStatusLabel,
toolActionLabel,
toolGroupSummary,
type StallInfo,
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,25 @@ export const AGENT_FAMILY_ROOTS = [
"coco",
"openai",
"anthropic",
"dsh",
"pi",
"opencode",
"antigravity",
"agy",
"kimi",
"qwen",
"devin",
"factory",
"grok",
"codebuddy",
"qoder",
"cursor",
"bottega",
] as const;

export type AgentFamilyRoot = (typeof AGENT_FAMILY_ROOTS)[number];

const GENERIC_ADAPTER_KINDS = new Set(["acp", "status_projection"]);
const GENERIC_ADAPTER_KINDS = new Set(["acp", "oar_runtime", "status_projection"]);

/** Return the bounded family root for an id, or the normalized id itself. */
export function agentFamily(agentId: string): string {
Expand Down
Loading
Loading