@agentproto/apps 0.1.1 → 0.2.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/dist/content-team/agents/illustrator.d.ts +4 -0
- package/dist/content-team/agents/illustrator.d.ts.map +1 -0
- package/dist/content-team/index.d.ts +3 -1
- package/dist/content-team/index.d.ts.map +1 -1
- package/dist/content-team/workflows/produce-cover.d.ts +3 -0
- package/dist/content-team/workflows/produce-cover.d.ts.map +1 -0
- package/dist/content-team.mjs +29 -3
- package/dist/content-team.mjs.map +1 -1
- package/dist/index.mjs +28 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"illustrator.d.ts","sourceRoot":"","sources":["../../../src/content-team/agents/illustrator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,2DAA2D;AAC3D,eAAO,MAAM,WAAW,EAAE,UAsBzB,CAAA"}
|
|
@@ -10,7 +10,9 @@ import { type AppHandle } from "@agentproto/app-kit";
|
|
|
10
10
|
import { researcher } from "./agents/researcher.js";
|
|
11
11
|
import { writer } from "./agents/writer.js";
|
|
12
12
|
import { editor } from "./agents/editor.js";
|
|
13
|
+
import { illustrator } from "./agents/illustrator.js";
|
|
13
14
|
import { produceContent } from "./workflows/produce-content.js";
|
|
15
|
+
import { produceCover } from "./workflows/produce-cover.js";
|
|
14
16
|
export declare const contentTeam: AppHandle;
|
|
15
|
-
export { researcher, writer, editor, produceContent };
|
|
17
|
+
export { researcher, writer, editor, illustrator, produceContent, produceCover };
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content-team/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/content-team/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,eAAO,MAAM,WAAW,EAAE,SAGxB,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"produce-cover.d.ts","sourceRoot":"","sources":["../../../src/content-team/workflows/produce-cover.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,eAAO,MAAM,YAAY,6DAevB,CAAA"}
|
package/dist/content-team.mjs
CHANGED
|
@@ -43,6 +43,18 @@ var editor = {
|
|
|
43
43
|
}),
|
|
44
44
|
body: "You edit the draft. Tighten the voice, cut fluff, fix clarity \u2014 without changing what the writer meant. Leave it shorter than you found it."
|
|
45
45
|
};
|
|
46
|
+
var illustrator = {
|
|
47
|
+
agent: defineAgent({
|
|
48
|
+
schema: "agent/v1",
|
|
49
|
+
id: "@agentproto/illustrator",
|
|
50
|
+
description: "Art-directs the cover illustration for each article.",
|
|
51
|
+
model: "claude-sonnet-5",
|
|
52
|
+
boundaries: ["One cover per article", "Text-free prompts only"],
|
|
53
|
+
tools: ["read_file", "write_file", "run_command"],
|
|
54
|
+
workflows: [{ ref: "produce-cover" }]
|
|
55
|
+
}),
|
|
56
|
+
body: "You art-direct a single cover illustration for the article. Read the article (read_file) to extract the one visual idea that best represents the piece, then write the art direction (write_file) as a clean, text-free image prompt. Keep the visual discipline tight: bold flat shapes, limited risograph-style palettes, strong negative space, and a single focal subject. Never include text, lettering, logos, watermarks, or UI chrome in the prompt. Produce exactly one cover per article; if the article calls for a literal diagram or chart, fall back to a precise gpt-image-1 style description and treat the diagram itself as the image subject. Use run_command only to inspect generated assets or move files during the upload step."
|
|
57
|
+
};
|
|
46
58
|
var produceContent = defineWorkflow({
|
|
47
59
|
id: "produce-content",
|
|
48
60
|
name: "Produce a piece of content",
|
|
@@ -59,13 +71,27 @@ var produceContent = defineWorkflow({
|
|
|
59
71
|
{ id: "publish", kind: "tool", tool: "run_command" }
|
|
60
72
|
]
|
|
61
73
|
});
|
|
74
|
+
var produceCover = defineWorkflow({
|
|
75
|
+
id: "produce-cover",
|
|
76
|
+
name: "Produce a cover illustration",
|
|
77
|
+
description: "Read the article, derive the cover concept, generate the base image, clean it up, and upload the final cover.",
|
|
78
|
+
version: "0.1.0",
|
|
79
|
+
inputs: {},
|
|
80
|
+
outputs: {},
|
|
81
|
+
steps: [
|
|
82
|
+
{ id: "concept-from-article", kind: "tool", tool: "content.cover-concept" },
|
|
83
|
+
{ id: "base-gen", kind: "tool", tool: "content.cover-base-gen" },
|
|
84
|
+
{ id: "cleanup", kind: "tool", tool: "content.cover-cleanup" },
|
|
85
|
+
{ id: "upload", kind: "tool", tool: "content.cover-upload" }
|
|
86
|
+
]
|
|
87
|
+
});
|
|
62
88
|
|
|
63
89
|
// src/content-team/index.ts
|
|
64
90
|
var contentTeam = defineApp({
|
|
65
|
-
agents: [researcher, writer, editor],
|
|
66
|
-
workflows: [produceContent]
|
|
91
|
+
agents: [researcher, writer, editor, illustrator],
|
|
92
|
+
workflows: [produceContent, produceCover]
|
|
67
93
|
});
|
|
68
94
|
|
|
69
|
-
export { contentTeam, editor, produceContent, researcher, writer };
|
|
95
|
+
export { contentTeam, editor, illustrator, produceContent, produceCover, researcher, writer };
|
|
70
96
|
//# sourceMappingURL=content-team.mjs.map
|
|
71
97
|
//# sourceMappingURL=content-team.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/content-team/agents/researcher.ts","../src/content-team/agents/writer.ts","../src/content-team/agents/editor.ts","../src/content-team/workflows/produce-content.ts","../src/content-team/index.ts"],"names":["defineAgent"],"mappings":";;;;;;;;;AAIO,IAAM,UAAA,GAAyB;AAAA,EACpC,OAAO,WAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,wBAAA;AAAA,IACJ,WAAA,EAAa,gEAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,kBAAA,EAAoB,wBAAwB,CAAA;AAAA,IACzD,KAAA,EAAO,CAAC,UAAA,EAAY,WAAA,EAAa,aAAa,CAAA;AAAA,IAC9C,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,mBAAmB;AAAA,GACvC,CAAA;AAAA,EACD,IAAA,EACE;AAIJ;ACfO,IAAM,MAAA,GAAqB;AAAA,EAChC,OAAOA,WAAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,oBAAA;AAAA,IACJ,WAAA,EAAa,+CAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,mBAAA,EAAqB,wBAAwB,CAAA;AAAA,IAC1D,KAAA,EAAO,CAAC,UAAA,EAAY,WAAA,EAAa,cAAc,WAAW,CAAA;AAAA,IAC1D,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,mBAAmB;AAAA,GACvC,CAAA;AAAA,EACD,IAAA,EACE;AAEJ;ACbO,IAAM,MAAA,GAAqB;AAAA,EAChC,OAAOA,WAAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,oBAAA;AAAA,IACJ,WAAA,EAAa,iDAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,+BAAA,EAAiC,gBAAgB,CAAA;AAAA,IAC9D,KAAA,EAAO,CAAC,WAAA,EAAa,WAAW,CAAA;AAAA,IAChC,SAAA,EAAW,CAAC,EAAE,GAAA,EAAK,mBAAmB;AAAA,GACvC,CAAA;AAAA,EACD,IAAA,EACE;AAEJ;ACbO,IAAM,iBAAiB,cAAA,CAAe;AAAA,EAC3C,EAAA,EAAI,iBAAA;AAAA,EACJ,IAAA,EAAM,4BAAA;AAAA,EACN,WAAA,EAAa,6DAAA;AAAA,EACb,OAAA,EAAS,OAAA;AAAA,EACT,QAAQ,EAAC;AAAA,EACT,SAAS,EAAC;AAAA;AAAA;AAAA,EAGV,KAAA,EAAO;AAAA,IACL,EAAE,EAAA,EAAI,UAAA,EAAY,IAAA,EAAM,MAAA,EAAQ,MAAM,WAAA,EAAY;AAAA,IAClD,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;;;
|
|
1
|
+
{"version":3,"sources":["../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-c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AAA,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;;;ACDM,IAAM,cAAyB,SAAA,CAAU;AAAA,EAC9C,MAAA,EAAQ,CAAC,UAAA,EAAY,MAAA,EAAQ,QAAQ,WAAW,CAAA;AAAA,EAChD,SAAA,EAAW,CAAC,cAAA,EAAgB,YAAY;AAC1C,CAAC","file":"content-team.mjs","sourcesContent":["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"]}
|
package/dist/index.mjs
CHANGED
|
@@ -101,6 +101,18 @@ var editor = {
|
|
|
101
101
|
}),
|
|
102
102
|
body: "You edit the draft. Tighten the voice, cut fluff, fix clarity \u2014 without changing what the writer meant. Leave it shorter than you found it."
|
|
103
103
|
};
|
|
104
|
+
var illustrator = {
|
|
105
|
+
agent: defineAgent({
|
|
106
|
+
schema: "agent/v1",
|
|
107
|
+
id: "@agentproto/illustrator",
|
|
108
|
+
description: "Art-directs the cover illustration for each article.",
|
|
109
|
+
model: "claude-sonnet-5",
|
|
110
|
+
boundaries: ["One cover per article", "Text-free prompts only"],
|
|
111
|
+
tools: ["read_file", "write_file", "run_command"],
|
|
112
|
+
workflows: [{ ref: "produce-cover" }]
|
|
113
|
+
}),
|
|
114
|
+
body: "You art-direct a single cover illustration for the article. Read the article (read_file) to extract the one visual idea that best represents the piece, then write the art direction (write_file) as a clean, text-free image prompt. Keep the visual discipline tight: bold flat shapes, limited risograph-style palettes, strong negative space, and a single focal subject. Never include text, lettering, logos, watermarks, or UI chrome in the prompt. Produce exactly one cover per article; if the article calls for a literal diagram or chart, fall back to a precise gpt-image-1 style description and treat the diagram itself as the image subject. Use run_command only to inspect generated assets or move files during the upload step."
|
|
115
|
+
};
|
|
104
116
|
var produceContent = defineWorkflow({
|
|
105
117
|
id: "produce-content",
|
|
106
118
|
name: "Produce a piece of content",
|
|
@@ -117,11 +129,25 @@ var produceContent = defineWorkflow({
|
|
|
117
129
|
{ id: "publish", kind: "tool", tool: "run_command" }
|
|
118
130
|
]
|
|
119
131
|
});
|
|
132
|
+
var produceCover = defineWorkflow({
|
|
133
|
+
id: "produce-cover",
|
|
134
|
+
name: "Produce a cover illustration",
|
|
135
|
+
description: "Read the article, derive the cover concept, generate the base image, clean it up, and upload the final cover.",
|
|
136
|
+
version: "0.1.0",
|
|
137
|
+
inputs: {},
|
|
138
|
+
outputs: {},
|
|
139
|
+
steps: [
|
|
140
|
+
{ id: "concept-from-article", kind: "tool", tool: "content.cover-concept" },
|
|
141
|
+
{ id: "base-gen", kind: "tool", tool: "content.cover-base-gen" },
|
|
142
|
+
{ id: "cleanup", kind: "tool", tool: "content.cover-cleanup" },
|
|
143
|
+
{ id: "upload", kind: "tool", tool: "content.cover-upload" }
|
|
144
|
+
]
|
|
145
|
+
});
|
|
120
146
|
|
|
121
147
|
// src/content-team/index.ts
|
|
122
148
|
var contentTeam = defineApp({
|
|
123
|
-
agents: [researcher, writer, editor],
|
|
124
|
-
workflows: [produceContent]
|
|
149
|
+
agents: [researcher, writer, editor, illustrator],
|
|
150
|
+
workflows: [produceContent, produceCover]
|
|
125
151
|
});
|
|
126
152
|
|
|
127
153
|
export { codeTeam, contentTeam };
|
package/dist/index.mjs.map
CHANGED
|
@@ -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/workflows/produce-content.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,C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AAC,cAAc;AAC5B,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 { 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","/**\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 { produceContent } from \"./workflows/produce-content.js\"\n\nexport const contentTeam: AppHandle = defineApp({\n agents: [researcher, writer, editor],\n workflows: [produceContent],\n})\n\nexport { researcher, writer, editor, produceContent }\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"],"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,YA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AAA,EAAQ,MAAM,WAAA,EAAY;AAAA,IAClD,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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/apps",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"default": "./dist/index.mjs"
|
|
33
33
|
},
|
|
34
34
|
"./code-team": {
|
|
35
|
-
"types": "./dist/code-team.d.ts",
|
|
35
|
+
"types": "./dist/code-team/index.d.ts",
|
|
36
36
|
"import": "./dist/code-team.mjs",
|
|
37
37
|
"default": "./dist/code-team.mjs"
|
|
38
38
|
},
|
|
39
39
|
"./content-team": {
|
|
40
|
-
"types": "./dist/content-team.d.ts",
|
|
40
|
+
"types": "./dist/content-team/index.d.ts",
|
|
41
41
|
"import": "./dist/content-team.mjs",
|
|
42
42
|
"default": "./dist/content-team.mjs"
|
|
43
43
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@agentproto/agent": "0.2.1",
|
|
56
|
-
"@agentproto/app-kit": "0.
|
|
56
|
+
"@agentproto/app-kit": "0.3.0",
|
|
57
57
|
"@agentproto/workflow": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|