@schlenkr/ragents 0.1.11 → 0.1.13

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 (64) hide show
  1. package/README.md +1 -1
  2. package/apps/server/src/access-projection.ts +2 -2
  3. package/apps/server/src/plugin-build/build.ts +7 -7
  4. package/apps/server/src/profile/bundle-manifest.ts +11 -11
  5. package/apps/server/src/profile/plugin-discovery.ts +2 -2
  6. package/apps/server/src/provider.ts +1 -1
  7. package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-BfNSGxjB.js → highlighted-body-KPVGNVTW-CpPi6QLr.js} +1 -1
  8. package/apps/web/dist/assets/{main-D6bsKcIK.js → main-DJmCHGzM.js} +1 -1
  9. package/apps/web/dist/assets/{mermaid-HWGCJPDP-DROEqEeg.js → mermaid-HWGCJPDP-q-mf1kLN.js} +2 -2
  10. package/apps/web/dist/assets/{runPanel-Dumuuqry.js → runPanel-nk_aMxSn.js} +1 -1
  11. package/apps/web/dist/host-web.json +1 -1
  12. package/apps/web/dist/index.html +2 -2
  13. package/apps/web/dist/run-panel.html +2 -2
  14. package/apps/web/src/chat/QuasselHost.tsx +1 -1
  15. package/bundles/ragents.activity/ragents-bundle.json +3 -3
  16. package/bundles/ragents.actor-programs/ragents-bundle.json +3 -3
  17. package/bundles/ragents.ask/ragents-bundle.json +3 -3
  18. package/bundles/ragents.browser/ragents-bundle.json +3 -3
  19. package/bundles/ragents.documents/ragents-bundle.json +3 -3
  20. package/bundles/ragents.lsp-fsharp/ragents-bundle.json +3 -3
  21. package/bundles/ragents.lsp-roslyn/ragents-bundle.json +3 -3
  22. package/bundles/ragents.lsp-typescript/ragents-bundle.json +3 -3
  23. package/bundles/ragents.model-relay/ragents-bundle.json +3 -3
  24. package/bundles/ragents.orchestration/ragents-bundle.json +3 -3
  25. package/bundles/ragents.orchestration/web/classes.json +1 -1
  26. package/bundles/ragents.orchestration/web/index.js +1 -1
  27. package/bundles/ragents.orchestration/web/index.js.map +2 -2
  28. package/bundles/ragents.overseer/ragents-bundle.json +3 -3
  29. package/bundles/ragents.processes/ragents-bundle.json +3 -3
  30. package/bundles/ragents.product/ragents-bundle.json +3 -3
  31. package/bundles/ragents.profile-distribution/ragents-bundle.json +3 -3
  32. package/bundles/ragents.reference/ragents-bundle.json +3 -3
  33. package/bundles/ragents.todo/ragents-bundle.json +3 -3
  34. package/bundles/ragents.todo/server/index.js +0 -3
  35. package/bundles/ragents.todo/server/index.js.map +2 -2
  36. package/bundles/ragents.todo/web/classes.json +1 -1
  37. package/bundles/ragents.todo/web/index.js +1 -1
  38. package/bundles/ragents.todo/web/index.js.map +2 -2
  39. package/bundles/ragents.transcript/ragents-bundle.json +3 -3
  40. package/bundles/ragents.watch/ragents-bundle.json +3 -3
  41. package/bundles/ragents.workspace/ragents-bundle.json +3 -3
  42. package/bundles/ragents.workspace/server/index.js +4 -4
  43. package/bundles/ragents.workspace/server/index.js.map +2 -2
  44. package/bundles/ragents.workspace/web/classes.json +1 -1
  45. package/bundles/ragents.workspace/web/index.js +1 -1
  46. package/bundles/ragents.workspace/web/index.js.map +2 -2
  47. package/package.json +2 -2
  48. package/packages/ai/src/providers/openrouter.models.ts +2 -2
  49. package/packages/ragents/src/runtime/journal-storage.ts +1 -1
  50. package/packages/workspace-executor/src/contributions.ts +10 -10
  51. package/packages/workspace-executor/src/executor.ts +1 -1
  52. package/packages/workspace-executor/src/files.ts +1 -1
  53. package/packages/workspace-executor/src/index.ts +1 -1
  54. package/packages/workspace-executor/src/language-server/host.ts +1 -1
  55. package/packages/workspace-executor/src/language-server/workspace-solutions.ts +1 -1
  56. package/plugins/ragents.orchestration/web/ActorChat.tsx +1 -1
  57. package/plugins/ragents.orchestration/web/ActorChatControls.tsx +0 -1
  58. package/plugins/ragents.todo/contract.ts +0 -3
  59. package/plugins/ragents.workspace/client/workspace-client.ts +9 -9
  60. package/plugins/ragents.workspace/contract.ts +1 -1
  61. package/plugins/ragents.workspace/server/clients.ts +9 -9
  62. package/scripts/package/build-package.ts +3 -3
  63. package/scripts/package/ragents.mjs +1 -1
  64. package/scripts/remote/connect.ts +4 -4
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.overseer",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -128,8 +128,8 @@
128
128
  ]
129
129
  }
130
130
  },
131
- "stand": "271331cc0842a8eb4d784cfee17975f89237ada806724934d850d65bd162a5c0",
132
- "sourceStand": "8a605b354a48197de46f15636b58b91cd3f2a2acf29a3d188116791fa0c5b92b",
131
+ "revision": "271331cc0842a8eb4d784cfee17975f89237ada806724934d850d65bd162a5c0",
132
+ "sourceRevision": "36732e9bcdf12efc61b2bb511fbc70de0afef6154ba2eee75a4604f3afdf2237",
133
133
  "server": "server/index.js",
134
134
  "web": {
135
135
  "entry": "web/index.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.processes",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -77,8 +77,8 @@
77
77
  ]
78
78
  }
79
79
  },
80
- "stand": "20b117e1256a01bb0a9d5308095b133cfa1eaabeb3b1038664119c59772c4f5e",
81
- "sourceStand": "8ce7b38cc9b9c511e7d75ea11c49ef8a9876b03af6b47d1373e3f16d95a39da3",
80
+ "revision": "20b117e1256a01bb0a9d5308095b133cfa1eaabeb3b1038664119c59772c4f5e",
81
+ "sourceRevision": "8398be042f5a78670c52ec1d479c47bdd4292234fc77ee6dc05f4fd6442df908",
82
82
  "server": "server/index.js",
83
83
  "web": {
84
84
  "entry": "web/index.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.product",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -75,8 +75,8 @@
75
75
  ]
76
76
  }
77
77
  },
78
- "stand": "7a3eb7a847ce6a4c8324b9c073c3c7a13c760088a194d419fe21342575c4208f",
79
- "sourceStand": "f6bc4fd7b4196d8061829877877a88969097097d5e103e83129e5a6a98e238f7",
78
+ "revision": "7a3eb7a847ce6a4c8324b9c073c3c7a13c760088a194d419fe21342575c4208f",
79
+ "sourceRevision": "c6fefb62c103db8f057e3b61019810ffca13b46bcaa449ed5c53d7139a524cfe",
80
80
  "server": "server/index.js",
81
81
  "web": {
82
82
  "entry": "web/index.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.profile-distribution",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "web": {}
54
54
  },
55
- "stand": "3e99cf5cb8921685ad83aa6aaf9657da4c648f9d68cb744988a73f227c342e1d",
56
- "sourceStand": "fb91740c2ba401391492687dd52c06e2f6542bfaa990767757e2cd9d29ff98a6",
55
+ "revision": "3e99cf5cb8921685ad83aa6aaf9657da4c648f9d68cb744988a73f227c342e1d",
56
+ "sourceRevision": "f86bd0f1a439a2c9d143101af2a58881306dd8910240226548afbebfc125682c",
57
57
  "server": "server/index.js",
58
58
  "exports": {
59
59
  "server": {},
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.reference",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  }
22
22
  },
23
- "stand": "809c8770905fa2a4d557425abf27aee27a863aec8a80655b96e40bd82307f493",
24
- "sourceStand": "f28ffeea9d423e150a95c58ccdbf2e52679d820e7bc39f13fe400fa3e6f86b72",
23
+ "revision": "809c8770905fa2a4d557425abf27aee27a863aec8a80655b96e40bd82307f493",
24
+ "sourceRevision": "abe068f9695702223dd49b2169ecca54e5a82fd4b37d02346d0c9df3582cff87",
25
25
  "server": "server/index.js",
26
26
  "web": {
27
27
  "entry": "web/index.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.todo",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -32,8 +32,8 @@
32
32
  ]
33
33
  }
34
34
  },
35
- "stand": "d211b988a287cc1df7ad6b657be4e1bbe40dc0c16873f8df234f530a7c0c86fd",
36
- "sourceStand": "309ce99effca0c0df061ec66cff775747b9ffa1eab3bffb557094adf42b7ec1a",
35
+ "revision": "5e18b249f3c8b53b61820ef05da59823d58163c6962e6d836dcb37c05034aad0",
36
+ "sourceRevision": "cdb1c230450ed69e96cebcee9da392c02edb499417fc7e2de657b2f89c36c379",
37
37
  "server": "server/index.js",
38
38
  "web": {
39
39
  "entry": "web/index.js",
@@ -20,18 +20,15 @@ var todoStatusOf = (value) => {
20
20
  if (typeof value !== "string") return void 0;
21
21
  switch (value.trim().toLowerCase()) {
22
22
  case "open":
23
- case "offen":
24
23
  case "pending":
25
24
  return "open";
26
25
  case "active":
27
26
  case "doing":
28
27
  case "in_progress":
29
- case "in arbeit":
30
28
  case "running":
31
29
  return "active";
32
30
  case "completed":
33
31
  case "done":
34
- case "erledigt":
35
32
  case "finished":
36
33
  return "completed";
37
34
  default:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../plugins/ragents.todo/server/tool-contributor.ts", "../../../plugins/ragents.todo/server/todo-tool.ts", "../../../plugins/ragents.todo/contract.ts", "../../../plugins/ragents.todo/server/index.ts"],
4
- "sourcesContent": ["import type { ToolContributor } from \"@ragents/engine\";\nimport { toolDescriptorFrom } from \"@ragents/host/plugin-support/agent-tool.js\";\nimport { canManageTodos, createTodoTool, todoToolMetadata } from \"./todo-tool.js\";\n\nexport const createTodoToolContributor = (): ToolContributor => ({\n name: \"ragents.todo\",\n descriptors: [toolDescriptorFrom(todoToolMetadata, canManageTodos)],\n tools: () => [createTodoTool()],\n});\n", "import { Type } from \"typebox\";\nimport {\n DomainError,\n defineRunFunction,\n defineToolAvailability,\n holdsUsable,\n type RunFunction,\n} from \"@ragents/engine\";\nimport { TODO_PLUGIN_ID, TODO_STATUS_INPUTS, todoStatusOf } from \"../contract.js\";\n\nexport const todoToolMetadata = {\n name: \"todo_replace\",\n label: \"Replace To-do List\",\n description: \"Replace this agent's complete to-do snapshot with its current progress.\",\n longDescription: \"Mark an item completed only AFTER the work actually happened, never in advance; \"\n + \"update the list as you go so at most one item is active.\",\n} as const;\n\nexport const canManageTodos = defineToolAvailability({\n availability: \"conditional\",\n availabilityDetail: \"Only for agents with the capability plugin.state.write.\",\n}, (actor) => actor.kind === \"agent\" && holdsUsable(actor, \"plugin.state.write\"));\n\nconst checked = (todos: readonly { id: string; text: string; status: string }[]) => {\n const seen = new Set<string>();\n\n return todos.map((todo, index) => {\n const id = todo.id.trim();\n const text = todo.text.trim();\n const status = todoStatusOf(todo.status);\n\n if (!id) throw new DomainError(\"invalid-todo\", `todos[${index}].id is empty.`, 400);\n if (!text) throw new DomainError(\"invalid-todo\", `todos[${index}].text is empty.`, 400);\n if (!status) throw new DomainError(\"invalid-todo\", `todos[${index}].status ${todo.status} is unknown.`, 400);\n if (seen.has(id)) throw new DomainError(\"duplicate-todo-id\", `To-do ID ${id} occurs more than once.`, 400);\n\n seen.add(id);\n\n return { id, text, status };\n });\n};\n\nexport const createTodoTool = (): RunFunction =>\n defineRunFunction({\n ...todoToolMetadata,\n schema: Type.Object({\n todos: Type.Array(\n Type.Object({\n id: Type.String({ minLength: 1 }),\n text: Type.String({ minLength: 1 }),\n status: Type.Union(TODO_STATUS_INPUTS.map((value) => Type.Literal(value)), {\n description: \"open = not started, active = in progress, completed = done; \"\n + \"pending, in_progress and done are accepted as well\",\n }),\n }),\n ),\n }),\n resultSchema: Type.Null(),\n available: canManageTodos,\n run: ({ runtime, caller, context }, toolCallId, input) => {\n runtime.replacePluginState(context(toolCallId), caller.runId, {\n pluginId: TODO_PLUGIN_ID,\n scope: { kind: \"actor\", actorId: caller.actorId },\n state: { todos: checked(input.todos) },\n });\n\n return null;\n },\n });\n", "export const TODO_PLUGIN_ID = \"ragents.todo\";\n\nexport const TODO_STATUSES = [\"open\", \"active\", \"completed\"] as const;\nexport const TODO_STATUS_INPUTS = [\"open\", \"active\", \"completed\", \"pending\", \"in_progress\", \"done\"] as const;\nexport type TodoStatus = typeof TODO_STATUSES[number];\n\nexport interface TodoItem {\n id: string;\n text: string;\n status: TodoStatus;\n}\n\nexport interface TodoState {\n todos: TodoItem[];\n}\n\nexport const todoStatusOf = (value: unknown): TodoStatus | undefined => {\n if (typeof value !== \"string\") return undefined;\n\n switch (value.trim().toLowerCase()) {\n case \"open\":\n case \"offen\":\n case \"pending\":\n return \"open\";\n case \"active\":\n case \"doing\":\n case \"in_progress\":\n case \"in arbeit\":\n case \"running\":\n return \"active\";\n case \"completed\":\n case \"done\":\n case \"erledigt\":\n case \"finished\":\n return \"completed\";\n default:\n return undefined;\n }\n};\n\nconst itemOf = (value: unknown): TodoItem | undefined => {\n if (!value || typeof value !== \"object\") return undefined;\n const candidate = value as Partial<TodoItem>;\n const status = todoStatusOf(candidate.status);\n\n return typeof candidate.id === \"string\" && typeof candidate.text === \"string\" && status\n ? { id: candidate.id, text: candidate.text, status }\n : undefined;\n};\n\nexport const todoStateOf = (state: unknown): TodoState | undefined => {\n const candidate = state as Partial<TodoState> | undefined;\n if (!Array.isArray(candidate?.todos)) return undefined;\n const todos = candidate.todos.flatMap((value) => {\n const item = itemOf(value);\n return item ? [item] : [];\n });\n\n return todos.length === candidate.todos.length ? { todos } : undefined;\n};\n", "import type { RAgentsPlugin } from \"@ragents/engine\";\nimport type { PluginModule } from \"@ragents/host/plugin-support/plugin-module.js\";\nimport { createTodoToolContributor } from \"./tool-contributor.js\";\n\nconst todoPlugin: RAgentsPlugin = {\n manifest: { id: \"ragents.todo\" },\n register: (host) => host.functions(createTodoToolContributor()),\n};\n\nexport const plugin: PluginModule = { create: () => todoPlugin };\n"],
5
- "mappings": ";;;;AACA,SAAS,0BAA0B;;;ACDnC,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;;;AC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ine\";\nimport { toolDescriptorFrom } from \"@ragents/host/plugin-support/agent-tool.js\";\nimport { canManageTodos, createTodoTool, todoToolMetadata } from \"./todo-tool.js\";\n\nexport const createTodoToolContributor = (): ToolContributor => ({\n name: \"ragents.todo\",\n descriptors: [toolDescriptorFrom(todoToolMetadata, canManageTodos)],\n tools: () => [createTodoTool()],\n});\n", "import { Type } from \"typebox\";\nimport {\n DomainError,\n defineRunFunction,\n defineToolAvailability,\n holdsUsable,\n type RunFunction,\n} from \"@ragents/engine\";\nimport { TODO_PLUGIN_ID, TODO_STATUS_INPUTS, todoStatusOf } from \"../contract.js\";\n\nexport const todoToolMetadata = {\n name: \"todo_replace\",\n label: \"Replace To-do List\",\n description: \"Replace this agent's complete to-do snapshot with its current progress.\",\n longDescription: \"Mark an item completed only AFTER the work actually happened, never in advance; \"\n + \"update the list as you go so at most one item is active.\",\n} as const;\n\nexport const canManageTodos = defineToolAvailability({\n availability: \"conditional\",\n availabilityDetail: \"Only for agents with the capability plugin.state.write.\",\n}, (actor) => actor.kind === \"agent\" && holdsUsable(actor, \"plugin.state.write\"));\n\nconst checked = (todos: readonly { id: string; text: string; status: string }[]) => {\n const seen = new Set<string>();\n\n return todos.map((todo, index) => {\n const id = todo.id.trim();\n const text = todo.text.trim();\n const status = todoStatusOf(todo.status);\n\n if (!id) throw new DomainError(\"invalid-todo\", `todos[${index}].id is empty.`, 400);\n if (!text) throw new DomainError(\"invalid-todo\", `todos[${index}].text is empty.`, 400);\n if (!status) throw new DomainError(\"invalid-todo\", `todos[${index}].status ${todo.status} is unknown.`, 400);\n if (seen.has(id)) throw new DomainError(\"duplicate-todo-id\", `To-do ID ${id} occurs more than once.`, 400);\n\n seen.add(id);\n\n return { id, text, status };\n });\n};\n\nexport const createTodoTool = (): RunFunction =>\n defineRunFunction({\n ...todoToolMetadata,\n schema: Type.Object({\n todos: Type.Array(\n Type.Object({\n id: Type.String({ minLength: 1 }),\n text: Type.String({ minLength: 1 }),\n status: Type.Union(TODO_STATUS_INPUTS.map((value) => Type.Literal(value)), {\n description: \"open = not started, active = in progress, completed = done; \"\n + \"pending, in_progress and done are accepted as well\",\n }),\n }),\n ),\n }),\n resultSchema: Type.Null(),\n available: canManageTodos,\n run: ({ runtime, caller, context }, toolCallId, input) => {\n runtime.replacePluginState(context(toolCallId), caller.runId, {\n pluginId: TODO_PLUGIN_ID,\n scope: { kind: \"actor\", actorId: caller.actorId },\n state: { todos: checked(input.todos) },\n });\n\n return null;\n },\n });\n", "export const TODO_PLUGIN_ID = \"ragents.todo\";\n\nexport const TODO_STATUSES = [\"open\", \"active\", \"completed\"] as const;\nexport const TODO_STATUS_INPUTS = [\"open\", \"active\", \"completed\", \"pending\", \"in_progress\", \"done\"] as const;\nexport type TodoStatus = typeof TODO_STATUSES[number];\n\nexport interface TodoItem {\n id: string;\n text: string;\n status: TodoStatus;\n}\n\nexport interface TodoState {\n todos: TodoItem[];\n}\n\nexport const todoStatusOf = (value: unknown): TodoStatus | undefined => {\n if (typeof value !== \"string\") return undefined;\n\n switch (value.trim().toLowerCase()) {\n case \"open\":\n case \"pending\":\n return \"open\";\n case \"active\":\n case \"doing\":\n case \"in_progress\":\n case \"running\":\n return \"active\";\n case \"completed\":\n case \"done\":\n case \"finished\":\n return \"completed\";\n default:\n return undefined;\n }\n};\n\nconst itemOf = (value: unknown): TodoItem | undefined => {\n if (!value || typeof value !== \"object\") return undefined;\n const candidate = value as Partial<TodoItem>;\n const status = todoStatusOf(candidate.status);\n\n return typeof candidate.id === \"string\" && typeof candidate.text === \"string\" && status\n ? { id: candidate.id, text: candidate.text, status }\n : undefined;\n};\n\nexport const todoStateOf = (state: unknown): TodoState | undefined => {\n const candidate = state as Partial<TodoState> | undefined;\n if (!Array.isArray(candidate?.todos)) return undefined;\n const todos = candidate.todos.flatMap((value) => {\n const item = itemOf(value);\n return item ? [item] : [];\n });\n\n return todos.length === candidate.todos.length ? { todos } : undefined;\n};\n", "import type { RAgentsPlugin } from \"@ragents/engine\";\nimport type { PluginModule } from \"@ragents/host/plugin-support/plugin-module.js\";\nimport { createTodoToolContributor } from \"./tool-contributor.js\";\n\nconst todoPlugin: RAgentsPlugin = {\n manifest: { id: \"ragents.todo\" },\n register: (host) => host.functions(createTodoToolContributor()),\n};\n\nexport const plugin: PluginModule = { create: () => todoPlugin };\n"],
5
+ "mappings": ";;;;AACA,SAAS,0BAA0B;;;ACDnC,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;;;ACPA,IAAM,iBAAiB;AAGvB,IAAM,qBAAqB,CAAC,QAAQ,UAAU,aAAa,WAAW,eAAe,MAAM;AAa3F,IAAM,eAAe,CAAC,UAA2C;AACtE,MAAI,OAAO,UAAU,SAAU,QAAO;AAEtC,UAAQ,MAAM,KAAK,EAAE,YAAY,GAAG;AAAA,IAClC,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;;;ADzBO,IAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,EACb,iBAAiB;AAEnB;AAEO,IAAM,iBAAiB,uBAAuB;AAAA,EACnD,cAAc;AAAA,EACd,oBAAoB;AACtB,GAAG,CAAC,UAAU,MAAM,SAAS,WAAW,YAAY,OAAO,oBAAoB,CAAC;AAEhF,IAAM,UAAU,CAAC,UAAmE;AAClF,QAAM,OAAO,oBAAI,IAAY;AAE7B,SAAO,MAAM,IAAI,CAAC,MAAM,UAAU;AAChC,UAAM,KAAK,KAAK,GAAG,KAAK;AACxB,UAAM,OAAO,KAAK,KAAK,KAAK;AAC5B,UAAM,SAAS,aAAa,KAAK,MAAM;AAEvC,QAAI,CAAC,GAAI,OAAM,IAAI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kB,cAAc,CAAC;AAAA,EAClE,OAAO,MAAM,CAAC,eAAe,CAAC;AAChC;;;AGJA,IAAM,aAA4B;AAAA,EAChC,UAAU,EAAE,IAAI,eAAe;AAAA,EAC/B,UAAU,CAAC,SAAS,KAAK,UAAU,0BAA0B,CAAC;AAChE;AAEO,IAAM,SAAuB,EAAE,QAAQ,MAAM,WAAW;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- ["--card","--primary","[stroke-linecap:round]","[stroke-linejoin:round]","[stroke-width:2.2]","active","arbeit","aria-hidden","as","border-[1.5px]","border-border-soft","border-foreground/55","border-t","candidate","cardSections","case","className","completed","const","data-status","default","doing","done","erledigt","export","fill-none","finished","first:border-t-0","first:pt-0","from","function","gap-1.5","gap-2","grid","grid-cols-[15px_minmax(0,1fr)]","id","if","import","in","in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]","in-data-[status=active]:border-primary","in-data-[status=completed]:bg-success","in-data-[status=completed]:border-success","in-data-[status=completed]:opacity-75","in_progress","interface","item","itemOf","items","items-start","key","last:pb-0","leading-[1.35]","length","list-none","markerClass","markerOf","more","mt-px","needsRunView","not-italic","object","offen","open","order","overflow-hidden","pending","pl-0.5","place-items-center","py-1.5","return","rounded-full","runViewFrom","running","session","size-[11px]","size-[15px]","state","status","string","stroke-card","switch","text","text-[0.74rem]","text-[0px]","text-ellipsis","text-muted-foreground","text-xs","title","todo","todoStateOf","todoStatusOf","todos","type","typeof","undefined","value","view","viewBox","webPlugin"]
1
+ ["--card","--primary","[stroke-linecap:round]","[stroke-linejoin:round]","[stroke-width:2.2]","active","aria-hidden","as","border-[1.5px]","border-border-soft","border-foreground/55","border-t","candidate","cardSections","case","className","completed","const","data-status","default","doing","done","export","fill-none","finished","first:border-t-0","first:pt-0","from","function","gap-1.5","gap-2","grid","grid-cols-[15px_minmax(0,1fr)]","id","if","import","in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]","in-data-[status=active]:border-primary","in-data-[status=completed]:bg-success","in-data-[status=completed]:border-success","in-data-[status=completed]:opacity-75","in_progress","interface","item","itemOf","items","items-start","key","last:pb-0","leading-[1.35]","length","list-none","markerClass","markerOf","more","mt-px","needsRunView","not-italic","object","open","order","overflow-hidden","pending","pl-0.5","place-items-center","py-1.5","return","rounded-full","runViewFrom","running","session","size-[11px]","size-[15px]","state","status","string","stroke-card","switch","text","text-[0.74rem]","text-[0px]","text-ellipsis","text-muted-foreground","text-xs","title","todo","todoStateOf","todoStatusOf","todos","type","typeof","undefined","value","view","viewBox","webPlugin"]
@@ -1,2 +1,2 @@
1
- var r=(t,e)=>{let o=globalThis.__ragentsHostModules?.[t];if(o===void 0)throw new Error(`The host does not provide ${t}`);if(!(e in o))throw new Error(`The host does not provide ${e} from ${t}; the bundle was built against a newer host`);return o[e]};var i=r("@ragents/web/run-view","actorPluginState");var f=r("@ragents/web/run-view","runActorFrom");var l=r("@ragents/web/run-view","runViewFrom");var x="ragents.todo";var b=t=>{if(typeof t=="string")switch(t.trim().toLowerCase()){case"open":case"offen":case"pending":return"open";case"active":case"doing":case"in_progress":case"in arbeit":case"running":return"active";case"completed":case"done":case"erledigt":case"finished":return"completed";default:return}},w=t=>{if(!t||typeof t!="object")return;let e=t,o=b(e.status);return typeof e.id=="string"&&typeof e.text=="string"&&o?{id:e.id,text:e.text,status:o}:void 0},g=t=>{let e=t;if(!Array.isArray(e?.todos))return;let o=e.todos.flatMap(c=>{let a=w(c);return a?[a]:[]});return o.length===e.todos.length?{todos:o}:void 0};var p=r("@ragents/web/ui","SectionLabel");var s=r("react/jsx-runtime","jsx");var d=r("react/jsx-runtime","jsxs");var u=12,m=t=>t.status,h="grid size-[15px] mt-px place-items-center rounded-full border-[1.5px] border-foreground/55 text-[0px] not-italic in-data-[status=active]:border-primary in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))] in-data-[status=completed]:border-success in-data-[status=completed]:bg-success";function T({actor:t,session:e}){let o=l(e.runView);if(!o)return null;let a=g(i(o,x,f(t).id))?.todos??[];if(a.length===0)return null;let S=a.filter(n=>m(n)==="completed").length;return d("section",{className:"grid gap-1.5",children:[d(p,{children:[s("span",{children:"To-do"}),d("small",{children:[S,"/",a.length]})]}),s("ul",{className:"grid list-none",children:a.slice(0,u).map(n=>d("li",{className:"grid grid-cols-[15px_minmax(0,1fr)] items-start gap-2 border-t border-border-soft py-1.5 text-[0.74rem] leading-[1.35] first:border-t-0 first:pt-0 last:pb-0","data-status":m(n),children:[s("i",{"aria-hidden":!0,className:h,children:m(n)==="completed"&&s(y,{})}),s("span",{className:"overflow-hidden text-ellipsis in-data-[status=completed]:opacity-75",title:n.text,children:n.text})]},n.id))}),a.length>u&&d("small",{className:"pl-0.5 text-xs text-muted-foreground",children:["+",a.length-u," more"]})]})}function y(){return s("svg",{"aria-hidden":!0,className:"size-[11px] fill-none stroke-card [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:2.2]",viewBox:"0 0 12 12",children:s("path",{d:"M3.1 6.2 5 8.1l3.9-4.2"})})}var Y={id:"ragents.todo",needsRunView:!0,cardSections:[{id:"ragents.todo.items",order:200,Section:T}]};export{Y as webPlugin};
1
+ var r=(t,e)=>{let o=globalThis.__ragentsHostModules?.[t];if(o===void 0)throw new Error(`The host does not provide ${t}`);if(!(e in o))throw new Error(`The host does not provide ${e} from ${t}; the bundle was built against a newer host`);return o[e]};var i=r("@ragents/web/run-view","actorPluginState");var f=r("@ragents/web/run-view","runActorFrom");var l=r("@ragents/web/run-view","runViewFrom");var x="ragents.todo";var b=t=>{if(typeof t=="string")switch(t.trim().toLowerCase()){case"open":case"pending":return"open";case"active":case"doing":case"in_progress":case"running":return"active";case"completed":case"done":case"finished":return"completed";default:return}},w=t=>{if(!t||typeof t!="object")return;let e=t,o=b(e.status);return typeof e.id=="string"&&typeof e.text=="string"&&o?{id:e.id,text:e.text,status:o}:void 0},g=t=>{let e=t;if(!Array.isArray(e?.todos))return;let o=e.todos.flatMap(c=>{let a=w(c);return a?[a]:[]});return o.length===e.todos.length?{todos:o}:void 0};var p=r("@ragents/web/ui","SectionLabel");var s=r("react/jsx-runtime","jsx");var d=r("react/jsx-runtime","jsxs");var u=12,m=t=>t.status,h="grid size-[15px] mt-px place-items-center rounded-full border-[1.5px] border-foreground/55 text-[0px] not-italic in-data-[status=active]:border-primary in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))] in-data-[status=completed]:border-success in-data-[status=completed]:bg-success";function T({actor:t,session:e}){let o=l(e.runView);if(!o)return null;let a=g(i(o,x,f(t).id))?.todos??[];if(a.length===0)return null;let S=a.filter(n=>m(n)==="completed").length;return d("section",{className:"grid gap-1.5",children:[d(p,{children:[s("span",{children:"To-do"}),d("small",{children:[S,"/",a.length]})]}),s("ul",{className:"grid list-none",children:a.slice(0,u).map(n=>d("li",{className:"grid grid-cols-[15px_minmax(0,1fr)] items-start gap-2 border-t border-border-soft py-1.5 text-[0.74rem] leading-[1.35] first:border-t-0 first:pt-0 last:pb-0","data-status":m(n),children:[s("i",{"aria-hidden":!0,className:h,children:m(n)==="completed"&&s(y,{})}),s("span",{className:"overflow-hidden text-ellipsis in-data-[status=completed]:opacity-75",title:n.text,children:n.text})]},n.id))}),a.length>u&&d("small",{className:"pl-0.5 text-xs text-muted-foreground",children:["+",a.length-u," more"]})]})}function y(){return s("svg",{"aria-hidden":!0,className:"size-[11px] fill-none stroke-card [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:2.2]",viewBox:"0 0 12 12",children:s("path",{d:"M3.1 6.2 5 8.1l3.9-4.2"})})}var Y={id:"ragents.todo",needsRunView:!0,cardSections:[{id:"ragents.todo.items",order:200,Section:T}]};export{Y as webPlugin};
2
2
  //# sourceMappingURL=/plugins/ragents.todo/web/index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["ragents-host-read:read", "ragents-host-value:@ragents/web/run-view#actorPluginState", "ragents-host-value:@ragents/web/run-view#runActorFrom", "ragents-host-value:@ragents/web/run-view#runViewFrom", "../../../plugins/ragents.todo/contract.ts", "ragents-host-value:@ragents/web/ui#SectionLabel", "ragents-host-value:react/jsx-runtime#jsx", "ragents-host-value:react/jsx-runtime#jsxs", "../../../plugins/ragents.todo/web/TodoSection.tsx", "../../../plugins/ragents.todo/web/index.ts"],
4
- "sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`The host does not provide ${specifier}`);\n if (!(name in module)) throw new Error(`The host does not provide ${name} from ${specifier}; the bundle was built against a newer host`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"actorPluginState\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runActorFrom\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runViewFrom\");\n", "export const TODO_PLUGIN_ID = \"ragents.todo\";\n\nexport const TODO_STATUSES = [\"open\", \"active\", \"completed\"] as const;\nexport const TODO_STATUS_INPUTS = [\"open\", \"active\", \"completed\", \"pending\", \"in_progress\", \"done\"] as const;\nexport type TodoStatus = typeof TODO_STATUSES[number];\n\nexport interface TodoItem {\n id: string;\n text: string;\n status: TodoStatus;\n}\n\nexport interface TodoState {\n todos: TodoItem[];\n}\n\nexport const todoStatusOf = (value: unknown): TodoStatus | undefined => {\n if (typeof value !== \"string\") return undefined;\n\n switch (value.trim().toLowerCase()) {\n case \"open\":\n case \"offen\":\n case \"pending\":\n return \"open\";\n case \"active\":\n case \"doing\":\n case \"in_progress\":\n case \"in arbeit\":\n case \"running\":\n return \"active\";\n case \"completed\":\n case \"done\":\n case \"erledigt\":\n case \"finished\":\n return \"completed\";\n default:\n return undefined;\n }\n};\n\nconst itemOf = (value: unknown): TodoItem | undefined => {\n if (!value || typeof value !== \"object\") return undefined;\n const candidate = value as Partial<TodoItem>;\n const status = todoStatusOf(candidate.status);\n\n return typeof candidate.id === \"string\" && typeof candidate.text === \"string\" && status\n ? { id: candidate.id, text: candidate.text, status }\n : undefined;\n};\n\nexport const todoStateOf = (state: unknown): TodoState | undefined => {\n const candidate = state as Partial<TodoState> | undefined;\n if (!Array.isArray(candidate?.todos)) return undefined;\n const todos = candidate.todos.flatMap((value) => {\n const item = itemOf(value);\n return item ? [item] : [];\n });\n\n return todos.length === candidate.todos.length ? { todos } : undefined;\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SectionLabel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import { actorPluginState, runActorFrom, runViewFrom } from \"@ragents/web/run-view\";\nimport { TODO_PLUGIN_ID, todoStateOf, type TodoItem } from \"../contract\";\nimport type { CardSectionContext } from \"@ragents/web/PluginRegistry\";\nimport { SectionLabel } from \"@ragents/web/ui\";\n\nconst MAX_ITEMS = 12;\nconst markerOf = (todo: TodoItem) => todo.status;\n\nconst markerClass = \"grid size-[15px] mt-px place-items-center rounded-full border-[1.5px] border-foreground/55 text-[0px] not-italic\"\n + \" in-data-[status=active]:border-primary in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]\"\n + \" in-data-[status=completed]:border-success in-data-[status=completed]:bg-success\";\n\nexport function TodoSection({ actor, session }: CardSectionContext) {\n const view = runViewFrom(session.runView);\n if (!view) return null;\n const state = todoStateOf(actorPluginState(view, TODO_PLUGIN_ID, runActorFrom(actor).id));\n const todos = state?.todos ?? [];\n if (todos.length === 0) return null;\n const done = todos.filter((todo) => markerOf(todo) === \"completed\").length;\n\n return (\n <section className=\"grid gap-1.5\">\n <SectionLabel>\n <span>To-do</span>\n <small>{done}/{todos.length}</small>\n </SectionLabel>\n <ul className=\"grid list-none\">\n {todos.slice(0, MAX_ITEMS).map((todo) => (\n <li className=\"grid grid-cols-[15px_minmax(0,1fr)] items-start gap-2 border-t border-border-soft py-1.5 text-[0.74rem] leading-[1.35] first:border-t-0 first:pt-0 last:pb-0\"\n data-status={markerOf(todo)} key={todo.id}>\n <i aria-hidden className={markerClass}>{markerOf(todo) === \"completed\" && <IconCheck />}</i>\n <span className=\"overflow-hidden text-ellipsis in-data-[status=completed]:opacity-75\" title={todo.text}>{todo.text}</span>\n </li>\n ))}\n </ul>\n {todos.length > MAX_ITEMS && <small className=\"pl-0.5 text-xs text-muted-foreground\">+{todos.length - MAX_ITEMS} more</small>}\n </section>\n );\n}\n\nfunction IconCheck() {\n return (\n <svg aria-hidden className=\"size-[11px] fill-none stroke-card [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:2.2]\" viewBox=\"0 0 12 12\">\n <path d=\"M3.1 6.2 5 8.1l3.9-4.2\" />\n </svg>\n );\n}\n", "import { TodoSection } from \"./TodoSection\";\nimport type { WebPlugin } from \"@ragents/web/PluginRegistry\";\n\nexport const webPlugin: WebPlugin = {\n id: \"ragents.todo\",\n needsRunView: true,\n cardSections: [{\n id: \"ragents.todo.items\",\n order: 200,\n Section: TodoSection,\n }],\n};\n"],
5
- "mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,6BAA6BF,CAAS,EAAE,EAClF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,6BAA6BD,CAAI,SAASD,CAAS,6CAA6C,EACvI,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,wBAAyB,kBAAkB,ECA/D,IAAOC,EAAQC,EAAK,wBAAyB,cAAc,ECA3D,IAAOC,EAAQC,EAAK,wBAAyB,aAAa,ECDnD,IAAMC,EAAiB,eAgBvB,IAAMC,EAAgBC,GAA2C,CACtE,GAAI,OAAOA,GAAU,SAErB,OAAQA,EAAM,KAAK,EAAE,YAAY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AM,OAAQP,GAASD,EAASC,CAAI,IAAM,WAAW,EAAE,OAEpE,OACEa,EAAC,WAAQ,UAAU,eACjB,UAAAA,EAACC,EAAA,CACC,UAAAC,EAAC,QAAK,iBAAK,EACXF,EAAC,SAAO,UAAAD,EAAK,IAAEL,EAAM,QAAO,GAC9B,EACAQ,EAAC,MAAG,UAAU,iBACX,SAAAR,EAAM,MAAM,EAAGT,CAAS,EAAE,IAAKE,GAC9Ba,EAAC,MAAG,UAAU,+JACZ,cAAad,EAASC,CAAI,EAC1B,UAAAe,EAAC,KAAE,cAAW,GAAC,UAAWd,EAAc,SAAAF,EAASC,CAAI,IAAM,aAAee,EAACC,EAAA,EAAU,EAAG,EACxFD,EAAC,QAAK,UAAU,sEAAsE,MAAOf,EAAK,KAAO,SAAAA,EAAK,KAAK,IAFjFA,EAAK,EAGzC,CACD,EACH,EACCO,EAAM,OAAST,GAAae,EAAC,SAAM,UAAU,uCAAuC,cAAEN,EAAM,OAAST,EAAU,SAAK,GACvH,CAEJ,CAEA,SAASkB,GAAY,CACnB,OACED,EAAC,OAAI,cAAW,GAAC,UAAU,sGAAsG,QAAQ,YACvI,SAAAA,EAAC,QAAK,EAAE,yBAAyB,EACnC,CAEJ,CC3CO,IAAME,EAAuB,CAClC,GAAI,eACJ,aAAc,GACd,aAAc,CAAC,CACb,GAAI,qBACJ,MAAO,IACP,QAASC,CACX,CAAC,CACH",
4
+ "sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`The host does not provide ${specifier}`);\n if (!(name in module)) throw new Error(`The host does not provide ${name} from ${specifier}; the bundle was built against a newer host`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"actorPluginState\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runActorFrom\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/run-view\", \"runViewFrom\");\n", "export const TODO_PLUGIN_ID = \"ragents.todo\";\n\nexport const TODO_STATUSES = [\"open\", \"active\", \"completed\"] as const;\nexport const TODO_STATUS_INPUTS = [\"open\", \"active\", \"completed\", \"pending\", \"in_progress\", \"done\"] as const;\nexport type TodoStatus = typeof TODO_STATUSES[number];\n\nexport interface TodoItem {\n id: string;\n text: string;\n status: TodoStatus;\n}\n\nexport interface TodoState {\n todos: TodoItem[];\n}\n\nexport const todoStatusOf = (value: unknown): TodoStatus | undefined => {\n if (typeof value !== \"string\") return undefined;\n\n switch (value.trim().toLowerCase()) {\n case \"open\":\n case \"pending\":\n return \"open\";\n case \"active\":\n case \"doing\":\n case \"in_progress\":\n case \"running\":\n return \"active\";\n case \"completed\":\n case \"done\":\n case \"finished\":\n return \"completed\";\n default:\n return undefined;\n }\n};\n\nconst itemOf = (value: unknown): TodoItem | undefined => {\n if (!value || typeof value !== \"object\") return undefined;\n const candidate = value as Partial<TodoItem>;\n const status = todoStatusOf(candidate.status);\n\n return typeof candidate.id === \"string\" && typeof candidate.text === \"string\" && status\n ? { id: candidate.id, text: candidate.text, status }\n : undefined;\n};\n\nexport const todoStateOf = (state: unknown): TodoState | undefined => {\n const candidate = state as Partial<TodoState> | undefined;\n if (!Array.isArray(candidate?.todos)) return undefined;\n const todos = candidate.todos.flatMap((value) => {\n const item = itemOf(value);\n return item ? [item] : [];\n });\n\n return todos.length === candidate.todos.length ? { todos } : undefined;\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SectionLabel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import { actorPluginState, runActorFrom, runViewFrom } from \"@ragents/web/run-view\";\nimport { TODO_PLUGIN_ID, todoStateOf, type TodoItem } from \"../contract\";\nimport type { CardSectionContext } from \"@ragents/web/PluginRegistry\";\nimport { SectionLabel } from \"@ragents/web/ui\";\n\nconst MAX_ITEMS = 12;\nconst markerOf = (todo: TodoItem) => todo.status;\n\nconst markerClass = \"grid size-[15px] mt-px place-items-center rounded-full border-[1.5px] border-foreground/55 text-[0px] not-italic\"\n + \" in-data-[status=active]:border-primary in-data-[status=active]:bg-[color-mix(in_srgb,var(--primary)_14%,var(--card))]\"\n + \" in-data-[status=completed]:border-success in-data-[status=completed]:bg-success\";\n\nexport function TodoSection({ actor, session }: CardSectionContext) {\n const view = runViewFrom(session.runView);\n if (!view) return null;\n const state = todoStateOf(actorPluginState(view, TODO_PLUGIN_ID, runActorFrom(actor).id));\n const todos = state?.todos ?? [];\n if (todos.length === 0) return null;\n const done = todos.filter((todo) => markerOf(todo) === \"completed\").length;\n\n return (\n <section className=\"grid gap-1.5\">\n <SectionLabel>\n <span>To-do</span>\n <small>{done}/{todos.length}</small>\n </SectionLabel>\n <ul className=\"grid list-none\">\n {todos.slice(0, MAX_ITEMS).map((todo) => (\n <li className=\"grid grid-cols-[15px_minmax(0,1fr)] items-start gap-2 border-t border-border-soft py-1.5 text-[0.74rem] leading-[1.35] first:border-t-0 first:pt-0 last:pb-0\"\n data-status={markerOf(todo)} key={todo.id}>\n <i aria-hidden className={markerClass}>{markerOf(todo) === \"completed\" && <IconCheck />}</i>\n <span className=\"overflow-hidden text-ellipsis in-data-[status=completed]:opacity-75\" title={todo.text}>{todo.text}</span>\n </li>\n ))}\n </ul>\n {todos.length > MAX_ITEMS && <small className=\"pl-0.5 text-xs text-muted-foreground\">+{todos.length - MAX_ITEMS} more</small>}\n </section>\n );\n}\n\nfunction IconCheck() {\n return (\n <svg aria-hidden className=\"size-[11px] fill-none stroke-card [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:2.2]\" viewBox=\"0 0 12 12\">\n <path d=\"M3.1 6.2 5 8.1l3.9-4.2\" />\n </svg>\n );\n}\n", "import { TodoSection } from \"./TodoSection\";\nimport type { WebPlugin } from \"@ragents/web/PluginRegistry\";\n\nexport const webPlugin: WebPlugin = {\n id: \"ragents.todo\",\n needsRunView: true,\n cardSections: [{\n id: \"ragents.todo.items\",\n order: 200,\n Section: TodoSection,\n }],\n};\n"],
5
+ "mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,6BAA6BF,CAAS,EAAE,EAClF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,6BAA6BD,CAAI,SAASD,CAAS,6CAA6C,EACvI,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,wBAAyB,kBAAkB,ECA/D,IAAOC,EAAQC,EAAK,wBAAyB,cAAc,ECA3D,IAAOC,EAAQC,EAAK,wBAAyB,aAAa,ECDnD,IAAMC,EAAiB,eAgBvB,IAAMC,EAAgBC,GAA2C,CACtE,GAAI,OAAOA,GAAU,SAErB,OAAQA,EAAM,KAAK,EAAE,YAAY,EAAG,CAClC,IAAK,OACL,IAAK,UACH,MAAO,OACT,IAAK,SACL,IAAK,QACL,IAAK,cACL,IAAK,UACH,MAAO,SACT,IAAK,YACL,IAAK,OACL,IAAK,WACH,MAAO,YACT,QACE,MACJ,CACF,EAEMC,EAAUD,GAAyC,CACvD,GAAI,CAACA,GAAS,OAAOA,GAAU,SAAU,OACzC,IAAME,EAAYF,EACZG,EAASJ,EAAaG,EAAU,MAAM,EAE5C,OAAO,OAAOA,EAAU,IAAO,UAAY,OAAOA,EAAU,MAAS,UAAYC,EAC7E,CAAE,GAAID,EAAU,GAAI,KAAMA,EAAU,KAAM,OAAAC,CAAO,EACjD,MACN,EAEaC,EAAeC,GAA0C,CACpE,IAAMH,EAAYG,EAClB,GAAI,CAAC,MAAM,QAAQH,GAAW,KAAK,EAAG,OACtC,IAAMI,EAAQJ,EAAU,MAAM,QAASF,GAAU,CAC/C,IAAMO,EAAON,EAAOD,CAAK,EACzB,OAAOO,EAA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SAASkB,GAAY,CACnB,OACED,EAAC,OAAI,cAAW,GAAC,UAAU,sGAAsG,QAAQ,YACvI,SAAAA,EAAC,QAAK,EAAE,yBAAyB,EACnC,CAEJ,CC3CO,IAAME,EAAuB,CAClC,GAAI,eACJ,aAAc,GACd,aAAc,CAAC,CACb,GAAI,qBACJ,MAAO,IACP,QAASC,CACX,CAAC,CACH",
6
6
  "names": ["read", "specifier", "name", "module", "run_view_actorPluginState_default", "read", "run_view_runActorFrom_default", "read", "run_view_runViewFrom_default", "read", "TODO_PLUGIN_ID", "todoStatusOf", "value", "itemOf", "candidate", "status", "todoStateOf", "state", "todos", "item", "ui_SectionLabel_default", "read", "jsx_runtime_jsx_default", "read", "jsx_runtime_jsxs_default", "read", "MAX_ITEMS", "markerOf", "todo", "markerClass", "TodoSection", "actor", "session", "view", "run_view_runViewFrom_default", "todos", "todoStateOf", "run_view_actorPluginState_default", "TODO_PLUGIN_ID", "run_view_runActorFrom_default", "done", "jsx_runtime_jsxs_default", "ui_SectionLabel_default", "jsx_runtime_jsx_default", "IconCheck", "webPlugin", "TodoSection"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.transcript",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "web": {}
24
24
  },
25
- "stand": "e3bb513053f6385f9d78d314d28302324095a5163c4e1563df6fc8b3251305f7",
26
- "sourceStand": "3e6be16236b43b5f5fa1e453ceab1d5161dfd8743e22426c0d6ded7791b875e1",
25
+ "revision": "e3bb513053f6385f9d78d314d28302324095a5163c4e1563df6fc8b3251305f7",
26
+ "sourceRevision": "ba610549f1f1b3e87940617518d45b4bc918362fb9c20283b2a5061877bed103",
27
27
  "server": "server/index.js",
28
28
  "exports": {
29
29
  "server": {},
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.watch",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "web": {}
26
26
  },
27
- "stand": "007ee50ab186e3070930f23e9795210fa36c723365657325d5440cc2f0b81d60",
28
- "sourceStand": "681876d879d89f466c5d264590dd173c210ed5f0ea439bd4e90a3059df696677",
27
+ "revision": "007ee50ab186e3070930f23e9795210fa36c723365657325d5440cc2f0b81d60",
28
+ "sourceRevision": "ebb0ba3e7ca11870abab5787c259c3d2ad3b36247caeb4b4efd9bcceebbb7047",
29
29
  "server": "server/index.js",
30
30
  "exports": {
31
31
  "server": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "format": 4,
2
+ "format": 5,
3
3
  "id": "ragents.workspace",
4
4
  "api": 7,
5
5
  "hostNames": {
@@ -136,8 +136,8 @@
136
136
  ]
137
137
  }
138
138
  },
139
- "stand": "50910db884fc0812f90824613eb13db90bd612a008fad1af6e2137d517b781da",
140
- "sourceStand": "48d29d061e41e08d89a3a51e802d9a93c683cbb09369a3b0fa500b4ab4e04ed4",
139
+ "revision": "53498a6dbf25ada77b6dcdf7bb1d188c16229a85c7ddeeafa10e6335a8230954",
140
+ "sourceRevision": "f937fbba39f6d0ab90e55e494976d0d650054b722212d7e25cf8ddb835f91492",
141
141
  "server": "server/index.js",
142
142
  "web": {
143
143
  "entry": "web/index.js",
@@ -65,7 +65,7 @@ var executorVersion = Type.String({ minLength: 1, maxLength: 64, description: "V
65
65
  var PLUGIN_ID_PATTERN = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;
66
66
  var executorContributions = Type.Array(Type.Object({
67
67
  plugin: Type.String({ pattern: PLUGIN_ID_PATTERN.source, maxLength: 128, description: "ID of the plugin" }),
68
- stand: Type.String({ pattern: "^[0-9a-f]{64}$", description: "SHA-256 of the contribution file" })
68
+ revision: Type.String({ pattern: "^[0-9a-f]{64}$", description: "SHA-256 of the contribution file" })
69
69
  }, { additionalProperties: false }), { maxItems: 64, description: "The plugins' contributions to the executor, in the order of the server's plugin list" });
70
70
  var clientDescription = {
71
71
  label: Type.String({ minLength: 1, maxLength: 120 }),
@@ -455,9 +455,9 @@ var assertExecutor = (label, executor) => {
455
455
  409
456
456
  );
457
457
  };
458
- var described = (contributions) => contributions.map(({ plugin: plugin2, stand }) => `${plugin2} (${stand.slice(0, 12)})`).join(", ") || "none";
458
+ var described = (contributions) => contributions.map(({ plugin: plugin2, revision }) => `${plugin2} (${revision.slice(0, 12)})`).join(", ") || "none";
459
459
  var assertContributions = (label, expected, given) => {
460
- const key = (entry) => `${entry.plugin}\0${entry.stand}`;
460
+ const key = (entry) => `${entry.plugin}\0${entry.revision}`;
461
461
  const same = expected.length === given.length && expected.every((entry) => given.some((other) => key(other) === key(entry)));
462
462
  if (same) return;
463
463
  throw new DomainError2(
@@ -482,7 +482,7 @@ var WorkspaceClientRegistry = class {
482
482
  #pendingStops = /* @__PURE__ */ new Map();
483
483
  #stopRetries = /* @__PURE__ */ new Map();
484
484
  constructor(contributions) {
485
- this.contributions = contributions.map(({ plugin: plugin2, stand }) => ({ plugin: plugin2, stand }));
485
+ this.contributions = contributions.map(({ plugin: plugin2, revision }) => ({ plugin: plugin2, revision }));
486
486
  }
487
487
  async register(id, description, executor, contributions, connection) {
488
488
  if (connection.streamless) {