@agentproto/runtime 3.6.1 → 4.1.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 (39) hide show
  1. package/README.md +8 -3
  2. package/dist/app-ui-build.d.ts +96 -0
  3. package/dist/app-ui-build.mjs +250 -0
  4. package/dist/app-ui-build.mjs.map +1 -0
  5. package/dist/app-ui-delivery.d.ts +75 -0
  6. package/dist/app-ui-delivery.mjs +144 -0
  7. package/dist/app-ui-delivery.mjs.map +1 -0
  8. package/dist/app-ui-placeholder.d.ts +73 -0
  9. package/dist/app-ui-placeholder.mjs +89 -0
  10. package/dist/app-ui-placeholder.mjs.map +1 -0
  11. package/dist/catalog-models.d.ts +5 -3
  12. package/dist/catalog-models.mjs.map +1 -1
  13. package/dist/config-schema.d.ts +134 -0
  14. package/dist/config-schema.mjs +3697 -0
  15. package/dist/config-schema.mjs.map +1 -0
  16. package/dist/config.d.ts +22 -2
  17. package/dist/config.mjs +3615 -4
  18. package/dist/config.mjs.map +1 -1
  19. package/dist/{context-continuity-ib9_bVYM.d.ts → context-continuity-Bn99UtVC.d.ts} +40 -1
  20. package/dist/{heartbeat-COGpMrJS.d.ts → heartbeat-BJtxbDb9.d.ts} +13 -1
  21. package/dist/heartbeat.d.ts +1 -1
  22. package/dist/index.d.ts +3057 -151
  23. package/dist/index.mjs +17669 -7188
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/mcp-imports.d.ts +2 -1
  26. package/dist/resume-strategies.mjs +27 -1
  27. package/dist/resume-strategies.mjs.map +1 -1
  28. package/dist/{session-config-DbWP9RRj.d.ts → session-config-ByfVeEQJ.d.ts} +1 -1
  29. package/dist/session-presence.mjs +3613 -6
  30. package/dist/session-presence.mjs.map +1 -1
  31. package/dist/session-story.d.ts +10 -0
  32. package/dist/{spawn-defaults-CwI9Puwy.d.ts → spawn-defaults-CZj39Znq.d.ts} +146 -2
  33. package/dist/user-presets.d.ts +8 -2
  34. package/dist/user-presets.mjs +2 -1
  35. package/dist/user-presets.mjs.map +1 -1
  36. package/docs/TRANSMITTER.md +356 -0
  37. package/docs/mcp-tools/agent_start.md +476 -0
  38. package/docs/mcp-tools/app_run.md +47 -0
  39. package/package.json +47 -23
@@ -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. */
@@ -1,4 +1,6 @@
1
1
  import { join, resolve, dirname } from 'path';
2
+ import '@agentproto/model-catalog/llm';
3
+ import 'crypto';
2
4
  import { createReadStream, promises } from 'fs';
3
5
  import { homedir } from 'os';
4
6
  import { createInterface } from 'readline';
@@ -103,6 +105,10 @@ var init_pr_provenance = __esm({
103
105
  "src/pr-provenance.ts"() {
104
106
  }
105
107
  });
108
+ var init_usage = __esm({
109
+ "src/usage.ts"() {
110
+ }
111
+ });
106
112
  function defaultTranscriptBaseDir() {
107
113
  return join(homedir(), ".agentproto", "sessions");
108
114
  }
@@ -116,6 +122,7 @@ var init_transcript_writer = __esm({
116
122
  "src/transcript-writer.ts"() {
117
123
  init_tool_call_record();
118
124
  init_pr_provenance();
125
+ init_usage();
119
126
  }
120
127
  });
121
128
 
@@ -188,7 +195,7 @@ function renderMarkdown(session, opts = {}) {
188
195
  out.push("");
189
196
  for (const m of messages) {
190
197
  const icon = ROLE_ICON[m.role] ?? m.role;
191
- const nameSuffix = m.toolName ? ` \xB7 \`${m.toolName}\`` : "";
198
+ const nameSuffix = m.toolName ? ` \xB7 \`${m.toolName}\`` : m.from ? ` \xB7 from ${m.from.relation} \`${m.from.label ?? m.from.sessionId ?? ""}\` (${m.from.kind})` : "";
192
199
  out.push(`### ${icon}${nameSuffix}`);
193
200
  if (m.reasoning?.trim()) {
194
201
  out.push("");
@@ -652,6 +659,25 @@ ${rec.stderr}`);
652
659
  flushAssistant();
653
660
  messages.push({ role: "user", text: rec.text ?? "", ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {} });
654
661
  break;
662
+ case "session-message": {
663
+ flushAssistant();
664
+ const m = rec.message;
665
+ if (!m) break;
666
+ const relation = m.from?.relation ?? "system";
667
+ messages.push({
668
+ role: "user",
669
+ text: m.text ?? "",
670
+ from: {
671
+ ...m.from?.sessionId ? { sessionId: m.from.sessionId } : {},
672
+ ...m.from?.label ? { label: m.from.label } : {},
673
+ relation,
674
+ kind: m.kind ?? "report",
675
+ messageId: m.id
676
+ },
677
+ ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {}
678
+ });
679
+ break;
680
+ }
655
681
  case "system-prompt":
656
682
  flushAssistant();
657
683
  messages.push({ role: "system", text: rec.text ?? "", ...tsOrUndefined !== void 0 ? { ts: tsOrUndefined } : {} });