@agentproto/apps 0.2.2 → 0.4.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.
package/README.md CHANGED
@@ -24,6 +24,7 @@ An app here is a plain `AppHandle` — `codeTeam.agents`, `codeTeam.workflows`,
24
24
  | --- | --- | --- | --- |
25
25
  | `code-team` | `@agentproto/apps/code-team` | `implementer` → `reviewer` → `fixer` | `deliver-change` |
26
26
  | `content-team` | `@agentproto/apps/content-team` | `researcher` → `writer` → `editor` → `illustrator` | `produce-content`, `produce-cover` |
27
+ | `mail-triage` | `@agentproto/apps/mail-triage` | `triager` | `triage-inbox` |
27
28
 
28
29
  Each team is a folder with `agents/<name>.ts` (one self-contained file per agent
29
30
  — its `defineAgent` handle + `body`) and `workflows/<name>.ts`, composed in the
@@ -1,4 +1,15 @@
1
- /** The one workflow the code team delivers a change through. Every team agent
2
- * references it; the app-kit attachment invariant keeps that honest. */
1
+ /**
2
+ * The one workflow the code team delivers a change through. Every team agent
3
+ * references it; the app-kit attachment invariant keeps that honest.
4
+ *
5
+ * Three declarative `kind:"agent"` steps — implementer → reviewer → fixer —
6
+ * one per team agent, each `agent.ref` resolving (at compile time, against
7
+ * this app's own install record) to that agent's emitted AGENT.md. This
8
+ * replaces an earlier `ToolStep`-based draft (`apply_patch`/`read_diff`/
9
+ * `run_tests`) that dispatched daemon-side, where those tool ids don't
10
+ * exist — the daemon has no `apply_patch` tool, only live agent sessions
11
+ * that can edit files. Agent steps are the adoption fix (WP-B4): each step
12
+ * spawns the named team agent as a real session and lets it act.
13
+ */
3
14
  export declare const deliverChange: Readonly<import("@agentproto/workflow").WorkflowDefinition>;
4
15
  //# sourceMappingURL=deliver-change.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliver-change.d.ts","sourceRoot":"","sources":["../../../src/code-team/workflows/deliver-change.ts"],"names":[],"mappings":"AAEA;yEACyE;AACzE,eAAO,MAAM,aAAa,6DAaxB,CAAA"}
1
+ {"version":3,"file":"deliver-change.d.ts","sourceRoot":"","sources":["../../../src/code-team/workflows/deliver-change.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,6DA4BxB,CAAA"}
@@ -53,10 +53,24 @@ var deliverChange = defineWorkflow({
53
53
  inputs: {},
54
54
  outputs: {},
55
55
  steps: [
56
- { id: "implement", kind: "tool", tool: "apply_patch" },
57
- { id: "review", kind: "tool", tool: "read_diff" },
58
- { id: "fix", kind: "tool", tool: "apply_patch" },
59
- { id: "verify", kind: "tool", tool: "run_tests" }
56
+ {
57
+ id: "implement",
58
+ kind: "agent",
59
+ agent: { ref: "@agentproto/implementer" },
60
+ prompt: "Implement the requested change."
61
+ },
62
+ {
63
+ id: "review",
64
+ kind: "agent",
65
+ agent: { ref: "@agentproto/reviewer" },
66
+ prompt: "Review the diff the implementer just produced. Report every real issue as `file:line \u2014 why`."
67
+ },
68
+ {
69
+ id: "fix",
70
+ kind: "agent",
71
+ agent: { ref: "@agentproto/fixer" },
72
+ prompt: "Apply the reviewer's findings, then re-run the tests."
73
+ }
60
74
  ]
61
75
  });
62
76
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/code-team/agents/implementer.ts","../src/code-team/agents/reviewer.ts","../src/code-team/agents/fixer.ts","../src/code-team/workflows/deliver-change.ts","../src/code-team/index.ts"],"names":["defineAgent"],"mappings":";;;;;;;;;AAIO,IAAM,WAAA,GAA0B;AAAA,EACrC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,yBAAA;AAAA,IACJ,WAAA,EAAa,uCAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,gCAAA,EAAkC,6BAA6B,CAAA;AAAA,IAC5E,OAAO,CAAC,UAAA,EAAY,WAAA,EAAa,YAAA,EAAc,aAAa,aAAa,CAAA;AAAA,IACzE,SAAA,EAAW,CAAC,EAAE,GAAA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AA,IACrD,EAAE,EAAA,EAAI,QAAA,EAAU,IAAA,EAAM,MAAA,EAAQ,MAAM,WAAA,EAAY;AAAA,IAChD,EAAE,EAAA,EAAI,KAAA,EAAO,IAAA,EAAM,MAAA,EAAQ,MAAM,aAAA,EAAc;AAAA,IAC/C,EAAE,EAAA,EAAI,QAAA,EAAU,IAAA,EAAM,MAAA,EAAQ,MAAM,WAAA;AAAY;AAEpD,CAAC;;;ACAM,IAAM,WAAsB,SAAA,CAAU;AAAA,EAC3C,MAAA,EAAQ,CAAC,WAAA,EAAa,QAAA,EAAU,KAAK,CAAA;AAAA,EACrC,SAAA,EAAW,CAAC,aAAa;AAC3B,CAAC","file":"code-team.mjs","sourcesContent":["import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Writes the requested change. */\nexport const implementer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/implementer\",\n description: \"Implements the requested code change.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Change only what the task asks\", \"Match the surrounding style\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You implement the requested change. Read the task and the surrounding code \" +\n \"first, make the smallest correct change that satisfies it, then run the \" +\n \"tests. Do not touch anything the task didn't ask for.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Reviews the diff; reports only. */\nexport const reviewer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/reviewer\",\n description: \"Reviews the diff and reports findings.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Report findings only\", \"Never edit files\", \"Never run gh pr merge\"],\n // Read-only + run_command (to inspect the diff / run tests). No write/edit\n // tools — the \"never edit files\" boundary is enforced by capability too.\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You are a rigorous reviewer. Read the diff, and report each real issue as \" +\n \"`file:line — why`. Change nothing; you only report.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Applies the reviewer's findings, precisely and minimally. */\nexport const fixer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/fixer\",\n description: \"Applies the reviewer's findings, precisely and minimally.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Apply only the listed findings\", \"No unrelated refactors\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You apply the reviewer's findings. Address each listed finding exactly, add \" +\n \"nothing extra, and re-run the tests when done.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the code team delivers a change through. Every team agent\n * references it; the app-kit attachment invariant keeps that honest. */\nexport const deliverChange = defineWorkflow({\n id: \"deliver-change\",\n name: \"Deliver a code change\",\n description: \"Implement the change, review the diff, apply fixes, verify.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n { id: \"implement\", kind: \"tool\", tool: \"apply_patch\" },\n { id: \"review\", kind: \"tool\", tool: \"read_diff\" },\n { id: \"fix\", kind: \"tool\", tool: \"apply_patch\" },\n { id: \"verify\", kind: \"tool\", tool: \"run_tests\" },\n ],\n})\n","/**\n * `code-team` — a ready-made agentproto app: a small team that ships a code\n * change. Three agents (implementer → reviewer → fixer) bound to one delivery\n * workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency, no home\n * workspace. A host imports it and uses any subset of its agents/workflows:\n * in-process via `codeTeam.toMastraAgents(...)`, or on disk via\n * `codeTeam.emit(dir)`.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { implementer } from \"./agents/implementer.js\"\nimport { reviewer } from \"./agents/reviewer.js\"\nimport { fixer } from \"./agents/fixer.js\"\nimport { deliverChange } from \"./workflows/deliver-change.js\"\n\nexport const codeTeam: AppHandle = defineApp({\n agents: [implementer, reviewer, fixer],\n workflows: [deliverChange],\n})\n\nexport { implementer, reviewer, fixer, deliverChange }\n"]}
1
+ {"version":3,"sources":["../src/code-team/agents/implementer.ts","../src/code-team/agents/reviewer.ts","../src/code-team/agents/fixer.ts","../src/code-team/workflows/deliver-change.ts","../src/code-team/index.ts"],"names":["defineAgent"],"mappings":";;;;;;;;;AAIO,IAAM,WAAA,GAA0B;AAAA,EACrC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,yBAAA;AAAA,IACJ,WAAA,EAAa,uCAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,gCAAA,EAAkC,6BAA6B,CAAA;AAAA,IAC5E,OAAO,CAAC,UAAA,EAAY,WAAA,EAAa,YAAA,EAAc,aAAa,aAAa,CAAA;AAAA,IACzE,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,kBAAkB;AAAA,GACtC,CAAA;AAAA,EACD,IAAA,EACE;AAGJ;ACdO,IAAM,QAAA,GAAuB;AAAA,EAClC,OAAOA,WAAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,sBAAA;AAAA,IACJ,WAAA,EAAa,wCAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,sBAAA,EAAwB,kBAAA,EAAoB,uBAAuB,CAAA;AAAA;AAAA;AAAA,IAGhF,KAAA,EAAO,CAAC,UAAA,EAAY,WAAA,EAAa,aAAa,CAAA;AAAA,IAC9C,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,kBAAkB;AAAA,GACtC,CAAA;AAAA,EACD,IAAA,EACE;AAEJ;ACfO,IAAM,KAAA,GAAoB;AAAA,EAC/B,OAAOA,WAAA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AC3B,CAAC","file":"code-team.mjs","sourcesContent":["import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Writes the requested change. */\nexport const implementer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/implementer\",\n description: \"Implements the requested code change.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Change only what the task asks\", \"Match the surrounding style\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You implement the requested change. Read the task and the surrounding code \" +\n \"first, make the smallest correct change that satisfies it, then run the \" +\n \"tests. Do not touch anything the task didn't ask for.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Reviews the diff; reports only. */\nexport const reviewer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/reviewer\",\n description: \"Reviews the diff and reports findings.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Report findings only\", \"Never edit files\", \"Never run gh pr merge\"],\n // Read-only + run_command (to inspect the diff / run tests). No write/edit\n // tools — the \"never edit files\" boundary is enforced by capability too.\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You are a rigorous reviewer. Read the diff, and report each real issue as \" +\n \"`file:line — why`. Change nothing; you only report.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Applies the reviewer's findings, precisely and minimally. */\nexport const fixer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/fixer\",\n description: \"Applies the reviewer's findings, precisely and minimally.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Apply only the listed findings\", \"No unrelated refactors\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You apply the reviewer's findings. Address each listed finding exactly, add \" +\n \"nothing extra, and re-run the tests when done.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/**\n * The one workflow the code team delivers a change through. Every team agent\n * references it; the app-kit attachment invariant keeps that honest.\n *\n * Three declarative `kind:\"agent\"` steps — implementer → reviewer → fixer —\n * one per team agent, each `agent.ref` resolving (at compile time, against\n * this app's own install record) to that agent's emitted AGENT.md. This\n * replaces an earlier `ToolStep`-based draft (`apply_patch`/`read_diff`/\n * `run_tests`) that dispatched daemon-side, where those tool ids don't\n * exist — the daemon has no `apply_patch` tool, only live agent sessions\n * that can edit files. Agent steps are the adoption fix (WP-B4): each step\n * spawns the named team agent as a real session and lets it act.\n */\nexport const deliverChange = defineWorkflow({\n id: \"deliver-change\",\n name: \"Deliver a code change\",\n description: \"Implement the change, review the diff, apply fixes, verify.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"implement\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/implementer\" },\n prompt: \"Implement the requested change.\",\n },\n {\n id: \"review\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/reviewer\" },\n prompt:\n \"Review the diff the implementer just produced. Report every real issue as `file:line — why`.\",\n },\n {\n id: \"fix\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/fixer\" },\n prompt: \"Apply the reviewer's findings, then re-run the tests.\",\n },\n ],\n})\n","/**\n * `code-team` — a ready-made agentproto app: a small team that ships a code\n * change. Three agents (implementer → reviewer → fixer) bound to one delivery\n * workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency, no home\n * workspace. A host imports it and uses any subset of its agents/workflows:\n * in-process via `codeTeam.toMastraAgents(...)`, or on disk via\n * `codeTeam.emit(dir)`.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { implementer } from \"./agents/implementer.js\"\nimport { reviewer } from \"./agents/reviewer.js\"\nimport { fixer } from \"./agents/fixer.js\"\nimport { deliverChange } from \"./workflows/deliver-change.js\"\n\nexport const codeTeam: AppHandle = defineApp({\n agents: [implementer, reviewer, fixer],\n workflows: [deliverChange],\n})\n\nexport { implementer, reviewer, fixer, deliverChange }\n"]}
package/dist/index.d.ts CHANGED
@@ -18,4 +18,6 @@
18
18
  */
19
19
  export { codeTeam } from "./code-team/index.js";
20
20
  export { contentTeam } from "./content-team/index.js";
21
+ export { mailTriage } from "./mail-triage/index.js";
22
+ export { mediaViewer } from "./media-viewer/index.js";
21
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
package/dist/index.mjs CHANGED
@@ -53,10 +53,24 @@ var deliverChange = defineWorkflow({
53
53
  inputs: {},
54
54
  outputs: {},
55
55
  steps: [
56
- { id: "implement", kind: "tool", tool: "apply_patch" },
57
- { id: "review", kind: "tool", tool: "read_diff" },
58
- { id: "fix", kind: "tool", tool: "apply_patch" },
59
- { id: "verify", kind: "tool", tool: "run_tests" }
56
+ {
57
+ id: "implement",
58
+ kind: "agent",
59
+ agent: { ref: "@agentproto/implementer" },
60
+ prompt: "Implement the requested change."
61
+ },
62
+ {
63
+ id: "review",
64
+ kind: "agent",
65
+ agent: { ref: "@agentproto/reviewer" },
66
+ prompt: "Review the diff the implementer just produced. Report every real issue as `file:line \u2014 why`."
67
+ },
68
+ {
69
+ id: "fix",
70
+ kind: "agent",
71
+ agent: { ref: "@agentproto/fixer" },
72
+ prompt: "Apply the reviewer's findings, then re-run the tests."
73
+ }
60
74
  ]
61
75
  });
62
76
 
@@ -149,7 +163,123 @@ var contentTeam = defineApp({
149
163
  agents: [researcher, writer, editor, illustrator],
150
164
  workflows: [produceContent, produceCover]
151
165
  });
166
+ var triager = {
167
+ agent: defineAgent({
168
+ schema: "agent/v1",
169
+ id: "@agentproto/triager",
170
+ description: "Triages your inbox \u2014 finds unread mail, categorizes, labels, archives.",
171
+ model: "claude-sonnet-5",
172
+ boundaries: [
173
+ "Always show the triage plan before applying",
174
+ "Never delete \u2014 only archive, label, or mark read",
175
+ "Ask before applying bulk actions on more than 20 messages"
176
+ ],
177
+ tools: [
178
+ "mailbox_list",
179
+ "mailbox_search",
180
+ "mailbox_list_threads",
181
+ "mailbox_get_thread",
182
+ "mailbox_labels_list",
183
+ "mailbox_label_create",
184
+ "mailbox_triage_plan",
185
+ "mailbox_triage_apply"
186
+ ],
187
+ workflows: [{ ref: "triage-inbox" }]
188
+ }),
189
+ body: "You scan the inbox for unread messages using mailbox_search. Categorize them (urgent, needs-reply, newsletter, notification, spam). Create a triage plan: label each category, archive newsletters+notifications, keep urgent+needs-reply in inbox. Show the plan before applying. Use mailbox_triage_plan to build the plan and mailbox_triage_apply to execute it after user confirmation."
190
+ };
191
+ var triageInbox = defineWorkflow({
192
+ id: "triage-inbox",
193
+ name: "Triage Inbox",
194
+ description: "Scan inbox, categorize unread messages, create and apply triage plan.",
195
+ version: "0.1.0",
196
+ inputs: {},
197
+ outputs: {},
198
+ steps: [
199
+ {
200
+ id: "triage",
201
+ kind: "agent",
202
+ agent: { ref: "@agentproto/triager" },
203
+ prompt: "Scan the inbox for unread messages. Categorize them (urgent, needs-reply, newsletter, notification, spam). Create a triage plan: label each category, archive newsletters+notifications, keep urgent+needs-reply in inbox. Show me the plan before applying."
204
+ }
205
+ ]
206
+ });
207
+
208
+ // src/mail-triage/index.ts
209
+ var mailTriage = defineApp({
210
+ agents: [triager],
211
+ workflows: [triageInbox]
212
+ });
213
+ var cataloger = {
214
+ agent: defineAgent({
215
+ schema: "agent/v1",
216
+ id: "@agentproto/media-cataloger",
217
+ description: "Scans a folder for media files (images, video, audio), collects metadata, and produces a structured catalog.",
218
+ model: "claude-sonnet-5",
219
+ boundaries: [
220
+ "Read-only \u2014 never modify, rename, move, or delete files",
221
+ "Only catalog files with recognized media extensions",
222
+ "Report exact file sizes and paths, never estimate"
223
+ ],
224
+ tools: ["list_dir", "read_file", "file_info"],
225
+ workflows: [{ ref: "scan-media" }]
226
+ }),
227
+ body: [
228
+ "You scan a workspace folder for media files and produce a structured JSON catalog.",
229
+ "",
230
+ "Walk the target directory recursively using list_dir. For each file, check the",
231
+ "extension against known media types:",
232
+ "- Images: .jpg, .jpeg, .png, .gif, .webp, .svg, .bmp, .ico, .avif",
233
+ "- Video: .mp4, .webm, .mov, .avi, .mkv",
234
+ "- Audio: .mp3, .wav, .ogg, .flac, .aac, .m4a",
235
+ "",
236
+ "For each media file found, use file_info to get size and modification date.",
237
+ "",
238
+ "Output a JSON object with this shape:",
239
+ "```json",
240
+ "{",
241
+ ' "folder": "<scanned path>",',
242
+ ' "scannedAt": "<ISO timestamp>",',
243
+ ' "summary": { "total": N, "images": N, "video": N, "audio": N, "totalSizeBytes": N },',
244
+ ' "files": [',
245
+ " {",
246
+ ' "path": "relative/path.jpg",',
247
+ ' "name": "file.jpg",',
248
+ ' "type": "image",',
249
+ ' "extension": ".jpg",',
250
+ ' "sizeBytes": 123456,',
251
+ ' "modifiedAt": "2026-08-01T12:00:00Z"',
252
+ " }",
253
+ " ]",
254
+ "}",
255
+ "```",
256
+ "",
257
+ "Sort files by type (images first, then video, then audio), then by name."
258
+ ].join("\n")
259
+ };
260
+ var scanMedia = defineWorkflow({
261
+ id: "scan-media",
262
+ name: "Scan Media",
263
+ description: "Scan a folder for media files, collect metadata, and produce a structured catalog.",
264
+ version: "0.1.0",
265
+ inputs: {},
266
+ outputs: {},
267
+ steps: [
268
+ {
269
+ id: "catalog",
270
+ kind: "agent",
271
+ agent: { ref: "@agentproto/media-cataloger" },
272
+ prompt: "Scan the workspace root folder for media files (images, video, audio). Walk all subdirectories recursively. For each media file, collect its path, name, type, extension, size, and modification date. Output the full catalog as a single JSON object."
273
+ }
274
+ ]
275
+ });
276
+
277
+ // src/media-viewer/index.ts
278
+ var mediaViewer = defineApp({
279
+ agents: [cataloger],
280
+ workflows: [scanMedia]
281
+ });
152
282
 
153
- export { codeTeam, contentTeam };
283
+ export { codeTeam, contentTeam, mailTriage, mediaViewer };
154
284
  //# sourceMappingURL=index.mjs.map
155
285
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/code-team/agents/implementer.ts","../src/code-team/agents/reviewer.ts","../src/code-team/agents/fixer.ts","../src/code-team/workflows/deliver-change.ts","../src/code-team/index.ts","../src/content-team/agents/researcher.ts","../src/content-team/agents/writer.ts","../src/content-team/agents/editor.ts","../src/content-team/agents/illustrator.ts","../src/content-team/workflows/produce-content.ts","../src/content-team/workflows/produce-cover.ts","../src/content-team/index.ts"],"names":["defineAgent","defineWorkflow","defineApp"],"mappings":";;;;;;;;;AAIO,IAAM,WAAA,GAA0B;AAAA,EACrC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,yBAAA;AAAA,IACJ,WAAA,EAAa,uCAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,gCAAA,EAAkC,6BAA6B,CAAA;AAAA,IAC5E,OAAO,CAAC,UAAA,EAAY,WAAA,EAAa,YAAA,EAAc,aAAa,aAAa,CAAA;AAAA,IACzE,SA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EAAE,EAAA,EAAI,OAAA,EAAS,IAAA,EAAM,MAAA,EAAQ,MAAM,YAAA,EAAa;AAAA,IAChD,EAAE,EAAA,EAAI,MAAA,EAAQ,IAAA,EAAM,MAAA,EAAQ,MAAM,WAAA,EAAY;AAAA,IAC9C,EAAE,EAAA,EAAI,SAAA,EAAW,IAAA,EAAM,MAAA,EAAQ,MAAM,aAAA;AAAc;AAEvD,CAAC,CAAA;AChBM,IAAM,eAAeA,cAAAA,CAAe;AAAA,EACzC,EAAA,EAAI,eAAA;AAAA,EACJ,IAAA,EAAM,8BAAA;AAAA,EACN,WAAA,EACE,+GAAA;AAAA,EAEF,OAAA,EAAS,OAAA;AAAA,EACT,QAAQ,EAAC;AAAA,EACT,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL,EAAE,EAAA,EAAI,sBAAA,EAAwB,IAAA,EAAM,MAAA,EAAQ,MAAM,uBAAA,EAAwB;AAAA,IAC1E,EAAE,EAAA,EAAI,UAAA,EAAY,IAAA,EAAM,MAAA,EAAQ,MAAM,wBAAA,EAAyB;AAAA,IAC/D,EAAE,EAAA,EAAI,SAAA,EAAW,IAAA,EAAM,MAAA,EAAQ,MAAM,uBAAA,EAAwB;AAAA,IAC7D,EAAE,EAAA,EAAI,QAAA,EAAU,IAAA,EAAM,MAAA,EAAQ,MAAM,sBAAA;AAAuB;AAE/D,CAAC,CAAA;;;ACDM,IAAM,cAAyBC,SAAAA,CAAU;AAAA,EAC9C,MAAA,EAAQ,CAAC,UAAA,EAAY,MAAA,EAAQ,QAAQ,WAAW,CAAA;AAAA,EAChD,SAAA,EAAW,CAAC,cAAA,EAAgB,YAAY;AAC1C,CAAC","file":"index.mjs","sourcesContent":["import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Writes the requested change. */\nexport const implementer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/implementer\",\n description: \"Implements the requested code change.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Change only what the task asks\", \"Match the surrounding style\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You implement the requested change. Read the task and the surrounding code \" +\n \"first, make the smallest correct change that satisfies it, then run the \" +\n \"tests. Do not touch anything the task didn't ask for.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Reviews the diff; reports only. */\nexport const reviewer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/reviewer\",\n description: \"Reviews the diff and reports findings.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Report findings only\", \"Never edit files\", \"Never run gh pr merge\"],\n // Read-only + run_command (to inspect the diff / run tests). No write/edit\n // tools — the \"never edit files\" boundary is enforced by capability too.\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You are a rigorous reviewer. Read the diff, and report each real issue as \" +\n \"`file:line — why`. Change nothing; you only report.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Applies the reviewer's findings, precisely and minimally. */\nexport const fixer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/fixer\",\n description: \"Applies the reviewer's findings, precisely and minimally.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Apply only the listed findings\", \"No unrelated refactors\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You apply the reviewer's findings. Address each listed finding exactly, add \" +\n \"nothing extra, and re-run the tests when done.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the code team delivers a change through. Every team agent\n * references it; the app-kit attachment invariant keeps that honest. */\nexport const deliverChange = defineWorkflow({\n id: \"deliver-change\",\n name: \"Deliver a code change\",\n description: \"Implement the change, review the diff, apply fixes, verify.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n { id: \"implement\", kind: \"tool\", tool: \"apply_patch\" },\n { id: \"review\", kind: \"tool\", tool: \"read_diff\" },\n { id: \"fix\", kind: \"tool\", tool: \"apply_patch\" },\n { id: \"verify\", kind: \"tool\", tool: \"run_tests\" },\n ],\n})\n","/**\n * `code-team` — a ready-made agentproto app: a small team that ships a code\n * change. Three agents (implementer → reviewer → fixer) bound to one delivery\n * workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency, no home\n * workspace. A host imports it and uses any subset of its agents/workflows:\n * in-process via `codeTeam.toMastraAgents(...)`, or on disk via\n * `codeTeam.emit(dir)`.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { implementer } from \"./agents/implementer.js\"\nimport { reviewer } from \"./agents/reviewer.js\"\nimport { fixer } from \"./agents/fixer.js\"\nimport { deliverChange } from \"./workflows/deliver-change.js\"\n\nexport const codeTeam: AppHandle = defineApp({\n agents: [implementer, reviewer, fixer],\n workflows: [deliverChange],\n})\n\nexport { implementer, reviewer, fixer, deliverChange }\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Gathers sources for the piece. */\nexport const researcher: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/researcher\",\n description: \"Reads the provided sources and summarizes them for the writer.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Cite every claim\", \"Prefer primary sources\"],\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You read the source material already in the workspace (list_dir, then \" +\n \"read_file the sources), extract the key facts, and hand the writer a tight \" +\n \"brief with a citation for every claim. Use run_command only to fetch a URL \" +\n \"already named in the task; do not invent sources.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Drafts the piece from the brief. */\nexport const writer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/writer\",\n description: \"Drafts the piece from the researcher's brief.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Stay on the brief\", \"One idea per paragraph\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You draft the piece from the brief and its sources. Lead with the point, \" +\n \"keep one idea per paragraph, and don't invent facts the brief doesn't have.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Tightens the draft. */\nexport const editor: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/editor\",\n description: \"Edits the draft for voice, clarity, and length.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Preserve the writer's meaning\", \"Cut, don't pad\"],\n tools: [\"read_file\", \"edit_file\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You edit the draft. Tighten the voice, cut fluff, fix clarity — without \" +\n \"changing what the writer meant. Leave it shorter than you found it.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Art-directs the cover illustration for each article. */\nexport const illustrator: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/illustrator\",\n description: \"Art-directs the cover illustration for each article.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"One cover per article\", \"Text-free prompts only\"],\n tools: [\"read_file\", \"write_file\", \"run_command\"],\n workflows: [{ ref: \"produce-cover\" }],\n }),\n body:\n \"You art-direct a single cover illustration for the article. \" +\n \"Read the article (read_file) to extract the one visual idea that best \" +\n \"represents the piece, then write the art direction (write_file) as a \" +\n \"clean, text-free image prompt. Keep the visual discipline tight: bold \" +\n \"flat shapes, limited risograph-style palettes, strong negative space, and \" +\n \"a single focal subject. Never include text, lettering, logos, watermarks, \" +\n \"or UI chrome in the prompt. Produce exactly one cover per article; if the \" +\n \"article calls for a literal diagram or chart, fall back to a precise \" +\n \"gpt-image-1 style description and treat the diagram itself as the image \" +\n \"subject. Use run_command only to inspect generated assets or move files \" +\n \"during the upload step.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the content team produces a piece through. Every team\n * agent references it (app-kit attachment invariant). */\nexport const produceContent = defineWorkflow({\n id: \"produce-content\",\n name: \"Produce a piece of content\",\n description: \"Read the sources, draft the piece, edit it, then commit it.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n // Concrete workspace tools (fs + exec), so the workflow describes a process\n // a standard runtime can actually run — not abstract tools nothing provides.\n steps: [\n { id: \"research\", kind: \"tool\", tool: \"read_file\" },\n { id: \"draft\", kind: \"tool\", tool: \"write_file\" },\n { id: \"edit\", kind: \"tool\", tool: \"edit_file\" },\n { id: \"publish\", kind: \"tool\", tool: \"run_command\" },\n ],\n})\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the illustrator uses to produce a cover. */\nexport const produceCover = defineWorkflow({\n id: \"produce-cover\",\n name: \"Produce a cover illustration\",\n description:\n \"Read the article, derive the cover concept, generate the base image, \" +\n \"clean it up, and upload the final cover.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n { id: \"concept-from-article\", kind: \"tool\", tool: \"content.cover-concept\" },\n { id: \"base-gen\", kind: \"tool\", tool: \"content.cover-base-gen\" },\n { id: \"cleanup\", kind: \"tool\", tool: \"content.cover-cleanup\" },\n { id: \"upload\", kind: \"tool\", tool: \"content.cover-upload\" },\n ],\n})\n","/**\n * `content-team` — a ready-made agentproto app: a small team that produces a\n * piece of content. Three agents (researcher → writer → editor) bound to one\n * production workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency. A host\n * imports it and uses any subset of its agents/workflows.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { researcher } from \"./agents/researcher.js\"\nimport { writer } from \"./agents/writer.js\"\nimport { editor } from \"./agents/editor.js\"\nimport { illustrator } from \"./agents/illustrator.js\"\nimport { produceContent } from \"./workflows/produce-content.js\"\nimport { produceCover } from \"./workflows/produce-cover.js\"\n\nexport const contentTeam: AppHandle = defineApp({\n agents: [researcher, writer, editor, illustrator],\n workflows: [produceContent, produceCover],\n})\n\nexport { researcher, writer, editor, illustrator, produceContent, produceCover }\n"]}
1
+ {"version":3,"sources":["../src/code-team/agents/implementer.ts","../src/code-team/agents/reviewer.ts","../src/code-team/agents/fixer.ts","../src/code-team/workflows/deliver-change.ts","../src/code-team/index.ts","../src/content-team/agents/researcher.ts","../src/content-team/agents/writer.ts","../src/content-team/agents/editor.ts","../src/content-team/agents/illustrator.ts","../src/content-team/workflows/produce-content.ts","../src/content-team/workflows/produce-cover.ts","../src/content-team/index.ts","../src/mail-triage/agents/triager.ts","../src/mail-triage/workflows/triage-inbox.ts","../src/mail-triage/index.ts","../src/media-viewer/agents/cataloger.ts","../src/media-viewer/workflows/scan-media.ts","../src/media-viewer/index.ts"],"names":["defineAgent","defineWorkflow","defineApp"],"mappings":";;;;;;;;;AAIO,IAAM,WAAA,GAA0B;AAAA,EACrC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,yBAAA;AAAA,IACJ,WAAA,EAAa,uCAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,gCAAA,EAAkC,6BAA6B,CAAA;AAAA,IAC5E,OAAO,CAAC,UAAA,EAAY,WAAA,EAAa,YAAA,EAAc,aAAa,aAAa,CAAA;AAAA,IACzE,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,kBAAkB;AAAA,GACtC,CAAA;AAAA,EACD,IAAA,EACE;AAGJ,CAAA;ACdO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\"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Writes the requested change. */\nexport const implementer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/implementer\",\n description: \"Implements the requested code change.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Change only what the task asks\", \"Match the surrounding style\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You implement the requested change. Read the task and the surrounding code \" +\n \"first, make the smallest correct change that satisfies it, then run the \" +\n \"tests. Do not touch anything the task didn't ask for.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Reviews the diff; reports only. */\nexport const reviewer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/reviewer\",\n description: \"Reviews the diff and reports findings.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Report findings only\", \"Never edit files\", \"Never run gh pr merge\"],\n // Read-only + run_command (to inspect the diff / run tests). No write/edit\n // tools — the \"never edit files\" boundary is enforced by capability too.\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You are a rigorous reviewer. Read the diff, and report each real issue as \" +\n \"`file:line — why`. Change nothing; you only report.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Applies the reviewer's findings, precisely and minimally. */\nexport const fixer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/fixer\",\n description: \"Applies the reviewer's findings, precisely and minimally.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Apply only the listed findings\", \"No unrelated refactors\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\", \"run_command\"],\n workflows: [{ ref: \"deliver-change\" }],\n }),\n body:\n \"You apply the reviewer's findings. Address each listed finding exactly, add \" +\n \"nothing extra, and re-run the tests when done.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/**\n * The one workflow the code team delivers a change through. Every team agent\n * references it; the app-kit attachment invariant keeps that honest.\n *\n * Three declarative `kind:\"agent\"` steps — implementer → reviewer → fixer —\n * one per team agent, each `agent.ref` resolving (at compile time, against\n * this app's own install record) to that agent's emitted AGENT.md. This\n * replaces an earlier `ToolStep`-based draft (`apply_patch`/`read_diff`/\n * `run_tests`) that dispatched daemon-side, where those tool ids don't\n * exist — the daemon has no `apply_patch` tool, only live agent sessions\n * that can edit files. Agent steps are the adoption fix (WP-B4): each step\n * spawns the named team agent as a real session and lets it act.\n */\nexport const deliverChange = defineWorkflow({\n id: \"deliver-change\",\n name: \"Deliver a code change\",\n description: \"Implement the change, review the diff, apply fixes, verify.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"implement\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/implementer\" },\n prompt: \"Implement the requested change.\",\n },\n {\n id: \"review\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/reviewer\" },\n prompt:\n \"Review the diff the implementer just produced. Report every real issue as `file:line — why`.\",\n },\n {\n id: \"fix\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/fixer\" },\n prompt: \"Apply the reviewer's findings, then re-run the tests.\",\n },\n ],\n})\n","/**\n * `code-team` — a ready-made agentproto app: a small team that ships a code\n * change. Three agents (implementer → reviewer → fixer) bound to one delivery\n * workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency, no home\n * workspace. A host imports it and uses any subset of its agents/workflows:\n * in-process via `codeTeam.toMastraAgents(...)`, or on disk via\n * `codeTeam.emit(dir)`.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { implementer } from \"./agents/implementer.js\"\nimport { reviewer } from \"./agents/reviewer.js\"\nimport { fixer } from \"./agents/fixer.js\"\nimport { deliverChange } from \"./workflows/deliver-change.js\"\n\nexport const codeTeam: AppHandle = defineApp({\n agents: [implementer, reviewer, fixer],\n workflows: [deliverChange],\n})\n\nexport { implementer, reviewer, fixer, deliverChange }\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Gathers sources for the piece. */\nexport const researcher: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/researcher\",\n description: \"Reads the provided sources and summarizes them for the writer.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Cite every claim\", \"Prefer primary sources\"],\n tools: [\"list_dir\", \"read_file\", \"run_command\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You read the source material already in the workspace (list_dir, then \" +\n \"read_file the sources), extract the key facts, and hand the writer a tight \" +\n \"brief with a citation for every claim. Use run_command only to fetch a URL \" +\n \"already named in the task; do not invent sources.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Drafts the piece from the brief. */\nexport const writer: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/writer\",\n description: \"Drafts the piece from the researcher's brief.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Stay on the brief\", \"One idea per paragraph\"],\n tools: [\"list_dir\", \"read_file\", \"write_file\", \"edit_file\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You draft the piece from the brief and its sources. Lead with the point, \" +\n \"keep one idea per paragraph, and don't invent facts the brief doesn't have.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Tightens the draft. */\nexport const editor: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/editor\",\n description: \"Edits the draft for voice, clarity, and length.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"Preserve the writer's meaning\", \"Cut, don't pad\"],\n tools: [\"read_file\", \"edit_file\"],\n workflows: [{ ref: \"produce-content\" }],\n }),\n body:\n \"You edit the draft. Tighten the voice, cut fluff, fix clarity — without \" +\n \"changing what the writer meant. Leave it shorter than you found it.\",\n}\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Art-directs the cover illustration for each article. */\nexport const illustrator: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/illustrator\",\n description: \"Art-directs the cover illustration for each article.\",\n model: \"claude-sonnet-5\",\n boundaries: [\"One cover per article\", \"Text-free prompts only\"],\n tools: [\"read_file\", \"write_file\", \"run_command\"],\n workflows: [{ ref: \"produce-cover\" }],\n }),\n body:\n \"You art-direct a single cover illustration for the article. \" +\n \"Read the article (read_file) to extract the one visual idea that best \" +\n \"represents the piece, then write the art direction (write_file) as a \" +\n \"clean, text-free image prompt. Keep the visual discipline tight: bold \" +\n \"flat shapes, limited risograph-style palettes, strong negative space, and \" +\n \"a single focal subject. Never include text, lettering, logos, watermarks, \" +\n \"or UI chrome in the prompt. Produce exactly one cover per article; if the \" +\n \"article calls for a literal diagram or chart, fall back to a precise \" +\n \"gpt-image-1 style description and treat the diagram itself as the image \" +\n \"subject. Use run_command only to inspect generated assets or move files \" +\n \"during the upload step.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the content team produces a piece through. Every team\n * agent references it (app-kit attachment invariant). */\nexport const produceContent = defineWorkflow({\n id: \"produce-content\",\n name: \"Produce a piece of content\",\n description: \"Read the sources, draft the piece, edit it, then commit it.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n // Concrete workspace tools (fs + exec), so the workflow describes a process\n // a standard runtime can actually run — not abstract tools nothing provides.\n steps: [\n { id: \"research\", kind: \"tool\", tool: \"read_file\" },\n { id: \"draft\", kind: \"tool\", tool: \"write_file\" },\n { id: \"edit\", kind: \"tool\", tool: \"edit_file\" },\n { id: \"publish\", kind: \"tool\", tool: \"run_command\" },\n ],\n})\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** The one workflow the illustrator uses to produce a cover. */\nexport const produceCover = defineWorkflow({\n id: \"produce-cover\",\n name: \"Produce a cover illustration\",\n description:\n \"Read the article, derive the cover concept, generate the base image, \" +\n \"clean it up, and upload the final cover.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n { id: \"concept-from-article\", kind: \"tool\", tool: \"content.cover-concept\" },\n { id: \"base-gen\", kind: \"tool\", tool: \"content.cover-base-gen\" },\n { id: \"cleanup\", kind: \"tool\", tool: \"content.cover-cleanup\" },\n { id: \"upload\", kind: \"tool\", tool: \"content.cover-upload\" },\n ],\n})\n","/**\n * `content-team` — a ready-made agentproto app: a small team that produces a\n * piece of content. Three agents (researcher → writer → editor) bound to one\n * production workflow, declared with `@agentproto/app-kit`.\n *\n * Generic on purpose — `@agentproto/…` ids, no product dependency. A host\n * imports it and uses any subset of its agents/workflows.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { researcher } from \"./agents/researcher.js\"\nimport { writer } from \"./agents/writer.js\"\nimport { editor } from \"./agents/editor.js\"\nimport { illustrator } from \"./agents/illustrator.js\"\nimport { produceContent } from \"./workflows/produce-content.js\"\nimport { produceCover } from \"./workflows/produce-cover.js\"\n\nexport const contentTeam: AppHandle = defineApp({\n agents: [researcher, writer, editor, illustrator],\n workflows: [produceContent, produceCover],\n})\n\nexport { researcher, writer, editor, illustrator, produceContent, produceCover }\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Triages your inbox — finds unread mail, categorizes, labels, archives. */\nexport const triager: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/triager\",\n description: \"Triages your inbox — finds unread mail, categorizes, labels, archives.\",\n model: \"claude-sonnet-5\",\n boundaries: [\n \"Always show the triage plan before applying\",\n \"Never delete — only archive, label, or mark read\",\n \"Ask before applying bulk actions on more than 20 messages\",\n ],\n tools: [\n \"mailbox_list\",\n \"mailbox_search\",\n \"mailbox_list_threads\",\n \"mailbox_get_thread\",\n \"mailbox_labels_list\",\n \"mailbox_label_create\",\n \"mailbox_triage_plan\",\n \"mailbox_triage_apply\",\n ],\n workflows: [{ ref: \"triage-inbox\" }],\n }),\n body:\n \"You scan the inbox for unread messages using mailbox_search. Categorize them \" +\n \"(urgent, needs-reply, newsletter, notification, spam). Create a triage plan: \" +\n \"label each category, archive newsletters+notifications, keep urgent+needs-reply \" +\n \"in inbox. Show the plan before applying. Use mailbox_triage_plan to build the \" +\n \"plan and mailbox_triage_apply to execute it after user confirmation.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** Single-agent workflow: triage the inbox. */\nexport const triageInbox = defineWorkflow({\n id: \"triage-inbox\",\n name: \"Triage Inbox\",\n description: \"Scan inbox, categorize unread messages, create and apply triage plan.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"triage\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/triager\" },\n prompt:\n \"Scan the inbox for unread messages. Categorize them (urgent, needs-reply, \" +\n \"newsletter, notification, spam). Create a triage plan: label each category, \" +\n \"archive newsletters+notifications, keep urgent+needs-reply in inbox. \" +\n \"Show me the plan before applying.\",\n },\n ],\n})\n","/**\n * `mail-triage` — a single-agent agentproto app for email triage.\n *\n * One agent (triager) scans inbox, categorizes unread mail, and applies\n * triage actions (label, archive). Proves the APP primitive works end-to-end\n * with a simple, useful real-world task.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { triager } from \"./agents/triager.js\"\nimport { triageInbox } from \"./workflows/triage-inbox.js\"\n\nexport const mailTriage: AppHandle = defineApp({\n agents: [triager],\n workflows: [triageInbox],\n})\n\nexport { triager, triageInbox }\n","import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\nexport const cataloger: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/media-cataloger\",\n description:\n \"Scans a folder for media files (images, video, audio), collects metadata, and produces a structured catalog.\",\n model: \"claude-sonnet-5\",\n boundaries: [\n \"Read-only — never modify, rename, move, or delete files\",\n \"Only catalog files with recognized media extensions\",\n \"Report exact file sizes and paths, never estimate\",\n ],\n tools: [\"list_dir\", \"read_file\", \"file_info\"],\n workflows: [{ ref: \"scan-media\" }],\n }),\n body: [\n \"You scan a workspace folder for media files and produce a structured JSON catalog.\",\n \"\",\n \"Walk the target directory recursively using list_dir. For each file, check the\",\n \"extension against known media types:\",\n \"- Images: .jpg, .jpeg, .png, .gif, .webp, .svg, .bmp, .ico, .avif\",\n \"- Video: .mp4, .webm, .mov, .avi, .mkv\",\n \"- Audio: .mp3, .wav, .ogg, .flac, .aac, .m4a\",\n \"\",\n \"For each media file found, use file_info to get size and modification date.\",\n \"\",\n \"Output a JSON object with this shape:\",\n \"```json\",\n '{',\n ' \"folder\": \"<scanned path>\",',\n ' \"scannedAt\": \"<ISO timestamp>\",',\n ' \"summary\": { \"total\": N, \"images\": N, \"video\": N, \"audio\": N, \"totalSizeBytes\": N },',\n ' \"files\": [',\n ' {',\n ' \"path\": \"relative/path.jpg\",',\n ' \"name\": \"file.jpg\",',\n ' \"type\": \"image\",',\n ' \"extension\": \".jpg\",',\n ' \"sizeBytes\": 123456,',\n ' \"modifiedAt\": \"2026-08-01T12:00:00Z\"',\n \" }\",\n \" ]\",\n \"}\",\n \"```\",\n \"\",\n \"Sort files by type (images first, then video, then audio), then by name.\",\n ].join(\"\\n\"),\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\nexport const scanMedia = defineWorkflow({\n id: \"scan-media\",\n name: \"Scan Media\",\n description:\n \"Scan a folder for media files, collect metadata, and produce a structured catalog.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"catalog\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/media-cataloger\" },\n prompt:\n \"Scan the workspace root folder for media files (images, video, audio). \" +\n \"Walk all subdirectories recursively. For each media file, collect its path, \" +\n \"name, type, extension, size, and modification date. Output the full catalog \" +\n \"as a single JSON object.\",\n },\n ],\n})\n","/**\n * `media-viewer` — a single-agent agentproto app for media cataloging.\n *\n * One agent (cataloger) scans a workspace folder for images, video, and audio\n * files, collects metadata, and produces a structured JSON catalog. Paired\n * with a Cowork McpApp gallery widget for visual browsing.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { cataloger } from \"./agents/cataloger.js\"\nimport { scanMedia } from \"./workflows/scan-media.js\"\n\nexport const mediaViewer: AppHandle = defineApp({\n agents: [cataloger],\n workflows: [scanMedia],\n})\n\nexport { cataloger, scanMedia }\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AgentEntry } from "@agentproto/app-kit";
2
+ /** Triages your inbox — finds unread mail, categorizes, labels, archives. */
3
+ export declare const triager: AgentEntry;
4
+ //# sourceMappingURL=triager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triager.d.ts","sourceRoot":"","sources":["../../../src/mail-triage/agents/triager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,6EAA6E;AAC7E,eAAO,MAAM,OAAO,EAAE,UA6BrB,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `mail-triage` — a single-agent agentproto app for email triage.
3
+ *
4
+ * One agent (triager) scans inbox, categorizes unread mail, and applies
5
+ * triage actions (label, archive). Proves the APP primitive works end-to-end
6
+ * with a simple, useful real-world task.
7
+ */
8
+ import { type AppHandle } from "@agentproto/app-kit";
9
+ import { triager } from "./agents/triager.js";
10
+ import { triageInbox } from "./workflows/triage-inbox.js";
11
+ export declare const mailTriage: AppHandle;
12
+ export { triager, triageInbox };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mail-triage/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,eAAO,MAAM,UAAU,EAAE,SAGvB,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ /** Single-agent workflow: triage the inbox. */
2
+ export declare const triageInbox: Readonly<import("@agentproto/workflow").WorkflowDefinition>;
3
+ //# sourceMappingURL=triage-inbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triage-inbox.d.ts","sourceRoot":"","sources":["../../../src/mail-triage/workflows/triage-inbox.ts"],"names":[],"mappings":"AAEA,+CAA+C;AAC/C,eAAO,MAAM,WAAW,6DAmBtB,CAAA"}
@@ -0,0 +1,60 @@
1
+ import { defineApp } from '@agentproto/app-kit';
2
+ import { defineAgent } from '@agentproto/agent';
3
+ import { defineWorkflow } from '@agentproto/workflow';
4
+
5
+ /**
6
+ * @agentproto/apps v0.1.0
7
+ * Ready-made agentproto apps (teams of agents + workflows) built on app-kit.
8
+ */
9
+
10
+ var triager = {
11
+ agent: defineAgent({
12
+ schema: "agent/v1",
13
+ id: "@agentproto/triager",
14
+ description: "Triages your inbox \u2014 finds unread mail, categorizes, labels, archives.",
15
+ model: "claude-sonnet-5",
16
+ boundaries: [
17
+ "Always show the triage plan before applying",
18
+ "Never delete \u2014 only archive, label, or mark read",
19
+ "Ask before applying bulk actions on more than 20 messages"
20
+ ],
21
+ tools: [
22
+ "mailbox_list",
23
+ "mailbox_search",
24
+ "mailbox_list_threads",
25
+ "mailbox_get_thread",
26
+ "mailbox_labels_list",
27
+ "mailbox_label_create",
28
+ "mailbox_triage_plan",
29
+ "mailbox_triage_apply"
30
+ ],
31
+ workflows: [{ ref: "triage-inbox" }]
32
+ }),
33
+ body: "You scan the inbox for unread messages using mailbox_search. Categorize them (urgent, needs-reply, newsletter, notification, spam). Create a triage plan: label each category, archive newsletters+notifications, keep urgent+needs-reply in inbox. Show the plan before applying. Use mailbox_triage_plan to build the plan and mailbox_triage_apply to execute it after user confirmation."
34
+ };
35
+ var triageInbox = defineWorkflow({
36
+ id: "triage-inbox",
37
+ name: "Triage Inbox",
38
+ description: "Scan inbox, categorize unread messages, create and apply triage plan.",
39
+ version: "0.1.0",
40
+ inputs: {},
41
+ outputs: {},
42
+ steps: [
43
+ {
44
+ id: "triage",
45
+ kind: "agent",
46
+ agent: { ref: "@agentproto/triager" },
47
+ prompt: "Scan the inbox for unread messages. Categorize them (urgent, needs-reply, newsletter, notification, spam). Create a triage plan: label each category, archive newsletters+notifications, keep urgent+needs-reply in inbox. Show me the plan before applying."
48
+ }
49
+ ]
50
+ });
51
+
52
+ // src/mail-triage/index.ts
53
+ var mailTriage = defineApp({
54
+ agents: [triager],
55
+ workflows: [triageInbox]
56
+ });
57
+
58
+ export { mailTriage, triageInbox, triager };
59
+ //# sourceMappingURL=mail-triage.mjs.map
60
+ //# sourceMappingURL=mail-triage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mail-triage/agents/triager.ts","../src/mail-triage/workflows/triage-inbox.ts","../src/mail-triage/index.ts"],"names":[],"mappings":";;;;;;;;;AAIO,IAAM,OAAA,GAAsB;AAAA,EACjC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,qBAAA;AAAA,IACJ,WAAA,EAAa,6EAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY;AAAA,MACV,6CAAA;AAAA,MACA,uDAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,cAAA;AAAA,MACA,gBAAA;AAAA,MACA,sBAAA;AAAA,MACA,oBAAA;AAAA,MACA,qBAAA;AAAA,MACA,sBAAA;AAAA,MACA,qBAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,gBAAgB;AAAA,GACpC,CAAA;AAAA,EACD,IAAA,EACE;AAKJ;AC9BO,IAAM,cAAc,cAAA,CAAe;AAAA,EACxC,EAAA,EAAI,cAAA;AAAA,EACJ,IAAA,EAAM,cAAA;AAAA,EACN,WAAA,EAAa,uEAAA;AAAA,EACb,OAAA,EAAS,OAAA;AAAA,EACT,QAAQ,EAAC;AAAA,EACT,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL;AAAA,MACE,EAAA,EAAI,QAAA;AAAA,MACJ,IAAA,EAAM,OAAA;AAAA,MACN,KAAA,EAAO,EAAE,GAAA,EAAK,qBAAA,EAAsB;AAAA,MACpC,MAAA,EACE;AAAA;AAIJ;AAEJ,CAAC;;;ACVM,IAAM,aAAwB,SAAA,CAAU;AAAA,EAC7C,MAAA,EAAQ,CAAC,OAAO,CAAA;AAAA,EAChB,SAAA,EAAW,CAAC,WAAW;AACzB,CAAC","file":"mail-triage.mjs","sourcesContent":["import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\n/** Triages your inbox — finds unread mail, categorizes, labels, archives. */\nexport const triager: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/triager\",\n description: \"Triages your inbox — finds unread mail, categorizes, labels, archives.\",\n model: \"claude-sonnet-5\",\n boundaries: [\n \"Always show the triage plan before applying\",\n \"Never delete — only archive, label, or mark read\",\n \"Ask before applying bulk actions on more than 20 messages\",\n ],\n tools: [\n \"mailbox_list\",\n \"mailbox_search\",\n \"mailbox_list_threads\",\n \"mailbox_get_thread\",\n \"mailbox_labels_list\",\n \"mailbox_label_create\",\n \"mailbox_triage_plan\",\n \"mailbox_triage_apply\",\n ],\n workflows: [{ ref: \"triage-inbox\" }],\n }),\n body:\n \"You scan the inbox for unread messages using mailbox_search. Categorize them \" +\n \"(urgent, needs-reply, newsletter, notification, spam). Create a triage plan: \" +\n \"label each category, archive newsletters+notifications, keep urgent+needs-reply \" +\n \"in inbox. Show the plan before applying. Use mailbox_triage_plan to build the \" +\n \"plan and mailbox_triage_apply to execute it after user confirmation.\",\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\n/** Single-agent workflow: triage the inbox. */\nexport const triageInbox = defineWorkflow({\n id: \"triage-inbox\",\n name: \"Triage Inbox\",\n description: \"Scan inbox, categorize unread messages, create and apply triage plan.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"triage\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/triager\" },\n prompt:\n \"Scan the inbox for unread messages. Categorize them (urgent, needs-reply, \" +\n \"newsletter, notification, spam). Create a triage plan: label each category, \" +\n \"archive newsletters+notifications, keep urgent+needs-reply in inbox. \" +\n \"Show me the plan before applying.\",\n },\n ],\n})\n","/**\n * `mail-triage` — a single-agent agentproto app for email triage.\n *\n * One agent (triager) scans inbox, categorizes unread mail, and applies\n * triage actions (label, archive). Proves the APP primitive works end-to-end\n * with a simple, useful real-world task.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { triager } from \"./agents/triager.js\"\nimport { triageInbox } from \"./workflows/triage-inbox.js\"\n\nexport const mailTriage: AppHandle = defineApp({\n agents: [triager],\n workflows: [triageInbox],\n})\n\nexport { triager, triageInbox }\n"]}
@@ -0,0 +1,3 @@
1
+ import type { AgentEntry } from "@agentproto/app-kit";
2
+ export declare const cataloger: AgentEntry;
3
+ //# sourceMappingURL=cataloger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cataloger.d.ts","sourceRoot":"","sources":["../../../src/media-viewer/agents/cataloger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,eAAO,MAAM,SAAS,EAAE,UA+CvB,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `media-viewer` — a single-agent agentproto app for media cataloging.
3
+ *
4
+ * One agent (cataloger) scans a workspace folder for images, video, and audio
5
+ * files, collects metadata, and produces a structured JSON catalog. Paired
6
+ * with a Cowork McpApp gallery widget for visual browsing.
7
+ */
8
+ import { type AppHandle } from "@agentproto/app-kit";
9
+ import { cataloger } from "./agents/cataloger.js";
10
+ import { scanMedia } from "./workflows/scan-media.js";
11
+ export declare const mediaViewer: AppHandle;
12
+ export { cataloger, scanMedia };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media-viewer/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,eAAO,MAAM,WAAW,EAAE,SAGxB,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const scanMedia: Readonly<import("@agentproto/workflow").WorkflowDefinition>;
2
+ //# sourceMappingURL=scan-media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scan-media.d.ts","sourceRoot":"","sources":["../../../src/media-viewer/workflows/scan-media.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,6DAoBpB,CAAA"}
@@ -0,0 +1,82 @@
1
+ import { defineApp } from '@agentproto/app-kit';
2
+ import { defineAgent } from '@agentproto/agent';
3
+ import { defineWorkflow } from '@agentproto/workflow';
4
+
5
+ /**
6
+ * @agentproto/apps v0.1.0
7
+ * Ready-made agentproto apps (teams of agents + workflows) built on app-kit.
8
+ */
9
+
10
+ var cataloger = {
11
+ agent: defineAgent({
12
+ schema: "agent/v1",
13
+ id: "@agentproto/media-cataloger",
14
+ description: "Scans a folder for media files (images, video, audio), collects metadata, and produces a structured catalog.",
15
+ model: "claude-sonnet-5",
16
+ boundaries: [
17
+ "Read-only \u2014 never modify, rename, move, or delete files",
18
+ "Only catalog files with recognized media extensions",
19
+ "Report exact file sizes and paths, never estimate"
20
+ ],
21
+ tools: ["list_dir", "read_file", "file_info"],
22
+ workflows: [{ ref: "scan-media" }]
23
+ }),
24
+ body: [
25
+ "You scan a workspace folder for media files and produce a structured JSON catalog.",
26
+ "",
27
+ "Walk the target directory recursively using list_dir. For each file, check the",
28
+ "extension against known media types:",
29
+ "- Images: .jpg, .jpeg, .png, .gif, .webp, .svg, .bmp, .ico, .avif",
30
+ "- Video: .mp4, .webm, .mov, .avi, .mkv",
31
+ "- Audio: .mp3, .wav, .ogg, .flac, .aac, .m4a",
32
+ "",
33
+ "For each media file found, use file_info to get size and modification date.",
34
+ "",
35
+ "Output a JSON object with this shape:",
36
+ "```json",
37
+ "{",
38
+ ' "folder": "<scanned path>",',
39
+ ' "scannedAt": "<ISO timestamp>",',
40
+ ' "summary": { "total": N, "images": N, "video": N, "audio": N, "totalSizeBytes": N },',
41
+ ' "files": [',
42
+ " {",
43
+ ' "path": "relative/path.jpg",',
44
+ ' "name": "file.jpg",',
45
+ ' "type": "image",',
46
+ ' "extension": ".jpg",',
47
+ ' "sizeBytes": 123456,',
48
+ ' "modifiedAt": "2026-08-01T12:00:00Z"',
49
+ " }",
50
+ " ]",
51
+ "}",
52
+ "```",
53
+ "",
54
+ "Sort files by type (images first, then video, then audio), then by name."
55
+ ].join("\n")
56
+ };
57
+ var scanMedia = defineWorkflow({
58
+ id: "scan-media",
59
+ name: "Scan Media",
60
+ description: "Scan a folder for media files, collect metadata, and produce a structured catalog.",
61
+ version: "0.1.0",
62
+ inputs: {},
63
+ outputs: {},
64
+ steps: [
65
+ {
66
+ id: "catalog",
67
+ kind: "agent",
68
+ agent: { ref: "@agentproto/media-cataloger" },
69
+ prompt: "Scan the workspace root folder for media files (images, video, audio). Walk all subdirectories recursively. For each media file, collect its path, name, type, extension, size, and modification date. Output the full catalog as a single JSON object."
70
+ }
71
+ ]
72
+ });
73
+
74
+ // src/media-viewer/index.ts
75
+ var mediaViewer = defineApp({
76
+ agents: [cataloger],
77
+ workflows: [scanMedia]
78
+ });
79
+
80
+ export { cataloger, mediaViewer, scanMedia };
81
+ //# sourceMappingURL=media-viewer.mjs.map
82
+ //# sourceMappingURL=media-viewer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/media-viewer/agents/cataloger.ts","../src/media-viewer/workflows/scan-media.ts","../src/media-viewer/index.ts"],"names":[],"mappings":";;;;;;;;;AAGO,IAAM,SAAA,GAAwB;AAAA,EACnC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,6BAAA;AAAA,IACJ,WAAA,EACE,8GAAA;AAAA,IACF,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY;AAAA,MACV,8DAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO,CAAC,UAAA,EAAY,WAAA,EAAa,WAAW,CAAA;AAAA,IAC5C,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,cAAc;AAAA,GAClC,CAAA;AAAA,EACD,IAAA,EAAM;AAAA,IACJ,oFAAA;AAAA,IACA,EAAA;AAAA,IACA,gFAAA;AAAA,IACA,sCAAA;AAAA,IACA,mEAAA;AAAA,IACA,wCAAA;AAAA,IACA,8CAAA;AAAA,IACA,EAAA;AAAA,IACA,6EAAA;AAAA,IACA,EAAA;AAAA,IACA,uCAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAA;AAAA,IACA,+BAAA;AAAA,IACA,mCAAA;AAAA,IACA,wFAAA;AAAA,IACA,cAAA;AAAA,IACA,OAAA;AAAA,IACA,oCAAA;AAAA,IACA,2BAAA;AAAA,IACA,wBAAA;AAAA,IACA,4BAAA;AAAA,IACA,4BAAA;AAAA,IACA,4CAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,GAAA;AAAA,IACA,KAAA;AAAA,IACA,EAAA;AAAA,IACA;AAAA,GACF,CAAE,KAAK,IAAI;AACb;AChDO,IAAM,YAAY,cAAA,CAAe;AAAA,EACtC,EAAA,EAAI,YAAA;AAAA,EACJ,IAAA,EAAM,YAAA;AAAA,EACN,WAAA,EACE,oFAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAAA,EACT,QAAQ,EAAC;AAAA,EACT,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL;AAAA,MACE,EAAA,EAAI,SAAA;AAAA,MACJ,IAAA,EAAM,OAAA;AAAA,MACN,KAAA,EAAO,EAAE,GAAA,EAAK,6BAAA,EAA8B;AAAA,MAC5C,MAAA,EACE;AAAA;AAIJ;AAEJ,CAAC;;;ACVM,IAAM,cAAyB,SAAA,CAAU;AAAA,EAC9C,MAAA,EAAQ,CAAC,SAAS,CAAA;AAAA,EAClB,SAAA,EAAW,CAAC,SAAS;AACvB,CAAC","file":"media-viewer.mjs","sourcesContent":["import { defineAgent } from \"@agentproto/agent\"\nimport type { AgentEntry } from \"@agentproto/app-kit\"\n\nexport const cataloger: AgentEntry = {\n agent: defineAgent({\n schema: \"agent/v1\",\n id: \"@agentproto/media-cataloger\",\n description:\n \"Scans a folder for media files (images, video, audio), collects metadata, and produces a structured catalog.\",\n model: \"claude-sonnet-5\",\n boundaries: [\n \"Read-only — never modify, rename, move, or delete files\",\n \"Only catalog files with recognized media extensions\",\n \"Report exact file sizes and paths, never estimate\",\n ],\n tools: [\"list_dir\", \"read_file\", \"file_info\"],\n workflows: [{ ref: \"scan-media\" }],\n }),\n body: [\n \"You scan a workspace folder for media files and produce a structured JSON catalog.\",\n \"\",\n \"Walk the target directory recursively using list_dir. For each file, check the\",\n \"extension against known media types:\",\n \"- Images: .jpg, .jpeg, .png, .gif, .webp, .svg, .bmp, .ico, .avif\",\n \"- Video: .mp4, .webm, .mov, .avi, .mkv\",\n \"- Audio: .mp3, .wav, .ogg, .flac, .aac, .m4a\",\n \"\",\n \"For each media file found, use file_info to get size and modification date.\",\n \"\",\n \"Output a JSON object with this shape:\",\n \"```json\",\n '{',\n ' \"folder\": \"<scanned path>\",',\n ' \"scannedAt\": \"<ISO timestamp>\",',\n ' \"summary\": { \"total\": N, \"images\": N, \"video\": N, \"audio\": N, \"totalSizeBytes\": N },',\n ' \"files\": [',\n ' {',\n ' \"path\": \"relative/path.jpg\",',\n ' \"name\": \"file.jpg\",',\n ' \"type\": \"image\",',\n ' \"extension\": \".jpg\",',\n ' \"sizeBytes\": 123456,',\n ' \"modifiedAt\": \"2026-08-01T12:00:00Z\"',\n \" }\",\n \" ]\",\n \"}\",\n \"```\",\n \"\",\n \"Sort files by type (images first, then video, then audio), then by name.\",\n ].join(\"\\n\"),\n}\n","import { defineWorkflow } from \"@agentproto/workflow\"\n\nexport const scanMedia = defineWorkflow({\n id: \"scan-media\",\n name: \"Scan Media\",\n description:\n \"Scan a folder for media files, collect metadata, and produce a structured catalog.\",\n version: \"0.1.0\",\n inputs: {},\n outputs: {},\n steps: [\n {\n id: \"catalog\",\n kind: \"agent\",\n agent: { ref: \"@agentproto/media-cataloger\" },\n prompt:\n \"Scan the workspace root folder for media files (images, video, audio). \" +\n \"Walk all subdirectories recursively. For each media file, collect its path, \" +\n \"name, type, extension, size, and modification date. Output the full catalog \" +\n \"as a single JSON object.\",\n },\n ],\n})\n","/**\n * `media-viewer` — a single-agent agentproto app for media cataloging.\n *\n * One agent (cataloger) scans a workspace folder for images, video, and audio\n * files, collects metadata, and produces a structured JSON catalog. Paired\n * with a Cowork McpApp gallery widget for visual browsing.\n */\n\nimport { defineApp, type AppHandle } from \"@agentproto/app-kit\"\nimport { cataloger } from \"./agents/cataloger.js\"\nimport { scanMedia } from \"./workflows/scan-media.js\"\n\nexport const mediaViewer: AppHandle = defineApp({\n agents: [cataloger],\n workflows: [scanMedia],\n})\n\nexport { cataloger, scanMedia }\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentproto/apps",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "@agentproto/apps — a home for ready-made agentproto apps (teams of agents + their workflows), declared with @agentproto/app-kit. Import a team (code-team, content-team, …) and use any of its agents/workflows from your own host: in-process via toMastraAgents(), or emit its manifests to disk.",
5
5
  "keywords": [
6
6
  "agentproto",
@@ -41,6 +41,16 @@
41
41
  "import": "./dist/content-team.mjs",
42
42
  "default": "./dist/content-team.mjs"
43
43
  },
44
+ "./mail-triage": {
45
+ "types": "./dist/mail-triage/index.d.ts",
46
+ "import": "./dist/mail-triage.mjs",
47
+ "default": "./dist/mail-triage.mjs"
48
+ },
49
+ "./media-viewer": {
50
+ "types": "./dist/media-viewer/index.d.ts",
51
+ "import": "./dist/media-viewer.mjs",
52
+ "default": "./dist/media-viewer.mjs"
53
+ },
44
54
  "./package.json": "./package.json"
45
55
  },
46
56
  "files": [
@@ -53,8 +63,8 @@
53
63
  },
54
64
  "dependencies": {
55
65
  "@agentproto/agent": "0.2.1",
56
- "@agentproto/app-kit": "0.3.2",
57
- "@agentproto/workflow": "0.1.1"
66
+ "@agentproto/app-kit": "0.4.0",
67
+ "@agentproto/workflow": "0.2.0"
58
68
  },
59
69
  "peerDependencies": {
60
70
  "@mastra/core": ">=1.0.0"
@@ -65,7 +75,7 @@
65
75
  "tsup": "^8.5.1",
66
76
  "typescript": "^5.9.3",
67
77
  "vitest": "^3.2.4",
68
- "@agentproto/mastra": "0.2.4",
78
+ "@agentproto/mastra": "0.2.5",
69
79
  "@agentproto/tooling": "0.1.0-alpha.0"
70
80
  },
71
81
  "scripts": {