@agentproto/runtime 3.6.1 → 4.0.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.
@@ -17,6 +17,7 @@
17
17
  * - ~/.cursor/mcp.json (cursor) — flat `mcpServers` map.
18
18
  * - ~/.config/goose/config.yaml (goose) — TOML/YAML hybrid; we
19
19
  * only handle the YAML form for now.
20
+ * - ~/.codex/config.toml (codex) — `[mcp_servers.<name>]` tables.
20
21
  * - any `.mcp.json` under the user's home that follows the
21
22
  * standard mcpServers shape.
22
23
  *
@@ -29,7 +30,7 @@ interface DiscoveredMcp {
29
30
  * cross-call identity (UI treat as React key). */
30
31
  id: string;
31
32
  /** Where we found it. Lets the UI render a source badge. */
32
- source: "claude-code" | "cursor" | "goose" | "workspace";
33
+ source: "claude-code" | "cursor" | "goose" | "codex" | "workspace";
33
34
  /** "global" when the entry sits at the top level of the host's
34
35
  * config; "project:<path>" when it's scoped to a single
35
36
  * workspace. claude-code in particular nests per-project. */
@@ -188,7 +188,7 @@ function renderMarkdown(session, opts = {}) {
188
188
  out.push("");
189
189
  for (const m of messages) {
190
190
  const icon = ROLE_ICON[m.role] ?? m.role;
191
- const nameSuffix = m.toolName ? ` \xB7 \`${m.toolName}\`` : "";
191
+ const nameSuffix = m.toolName ? ` \xB7 \`${m.toolName}\`` : m.from ? ` \xB7 from ${m.from.relation} \`${m.from.label ?? m.from.sessionId ?? ""}\` (${m.from.kind})` : "";
192
192
  out.push(`### ${icon}${nameSuffix}`);
193
193
  if (m.reasoning?.trim()) {
194
194
  out.push("");
@@ -652,6 +652,25 @@ ${rec.stderr}`);
652
652
  flushAssistant();
653
653
  messages.push({ role: "user", text: rec.text ?? "", ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {} });
654
654
  break;
655
+ case "session-message": {
656
+ flushAssistant();
657
+ const m = rec.message;
658
+ if (!m) break;
659
+ const relation = m.from?.relation ?? "system";
660
+ messages.push({
661
+ role: "user",
662
+ text: m.text ?? "",
663
+ from: {
664
+ ...m.from?.sessionId ? { sessionId: m.from.sessionId } : {},
665
+ ...m.from?.label ? { label: m.from.label } : {},
666
+ relation,
667
+ kind: m.kind ?? "report",
668
+ messageId: m.id
669
+ },
670
+ ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {}
671
+ });
672
+ break;
673
+ }
655
674
  case "system-prompt":
656
675
  flushAssistant();
657
676
  messages.push({ role: "system", text: rec.text ?? "", ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {} });