@agentproto/apps 0.1.1
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/LICENSE +202 -0
- package/README.md +45 -0
- package/dist/code-team/agents/fixer.d.ts +4 -0
- package/dist/code-team/agents/fixer.d.ts.map +1 -0
- package/dist/code-team/agents/implementer.d.ts +4 -0
- package/dist/code-team/agents/implementer.d.ts.map +1 -0
- package/dist/code-team/agents/reviewer.d.ts +4 -0
- package/dist/code-team/agents/reviewer.d.ts.map +1 -0
- package/dist/code-team/index.d.ts +18 -0
- package/dist/code-team/index.d.ts.map +1 -0
- package/dist/code-team/workflows/deliver-change.d.ts +4 -0
- package/dist/code-team/workflows/deliver-change.d.ts.map +1 -0
- package/dist/code-team.mjs +71 -0
- package/dist/code-team.mjs.map +1 -0
- package/dist/content-team/agents/editor.d.ts +4 -0
- package/dist/content-team/agents/editor.d.ts.map +1 -0
- package/dist/content-team/agents/researcher.d.ts +4 -0
- package/dist/content-team/agents/researcher.d.ts.map +1 -0
- package/dist/content-team/agents/writer.d.ts +4 -0
- package/dist/content-team/agents/writer.d.ts.map +1 -0
- package/dist/content-team/index.d.ts +16 -0
- package/dist/content-team/index.d.ts.map +1 -0
- package/dist/content-team/workflows/produce-content.d.ts +4 -0
- package/dist/content-team/workflows/produce-content.d.ts.map +1 -0
- package/dist/content-team.mjs +71 -0
- package/dist/content-team.mjs.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +129 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @agentproto/apps
|
|
2
|
+
|
|
3
|
+
Ready-made agentproto **apps** — *teams* of agents plus the workflows they run,
|
|
4
|
+
each declared with [`@agentproto/app-kit`](../app-kit). Import a team, use any
|
|
5
|
+
subset of its agents/workflows from your own host.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { codeTeam } from "@agentproto/apps/code-team"
|
|
9
|
+
|
|
10
|
+
// In-process: build the team and pick the agent(s) you want.
|
|
11
|
+
const built = await codeTeam.toMastraAgents({ resolveModel: (ref) => registry.resolve(ref) })
|
|
12
|
+
built["@agentproto/reviewer"].agent // just the reviewer, as a runnable Mastra agent
|
|
13
|
+
|
|
14
|
+
// …or use several. The record is keyed by agent id.
|
|
15
|
+
const { ["@agentproto/implementer"]: impl, ["@agentproto/fixer"]: fixer } = built
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
An app here is a plain `AppHandle` — `codeTeam.agents`, `codeTeam.workflows`,
|
|
19
|
+
`codeTeam.toMastraAgents(...)`, `codeTeam.emit(dir)`. Nothing new to learn.
|
|
20
|
+
|
|
21
|
+
## Teams
|
|
22
|
+
|
|
23
|
+
| Team | Import | Agents | Workflow |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `code-team` | `@agentproto/apps/code-team` | `implementer` → `reviewer` → `fixer` | `deliver-change` |
|
|
26
|
+
| `content-team` | `@agentproto/apps/content-team` | `researcher` → `writer` → `editor` | `produce-content` |
|
|
27
|
+
|
|
28
|
+
Each team is a folder with `agents/<name>.ts` (one self-contained file per agent
|
|
29
|
+
— its `defineAgent` handle + `body`) and `workflows/<name>.ts`, composed in the
|
|
30
|
+
team's `index.ts`. A new team is a sibling folder + a re-export.
|
|
31
|
+
|
|
32
|
+
## Two ways to consume
|
|
33
|
+
|
|
34
|
+
- **In-process** — `await team.toMastraAgents({ resolveModel })` returns the
|
|
35
|
+
built agents keyed by id; take the ones you need. `@mastra/core` is a peer
|
|
36
|
+
dependency, so install it in the host.
|
|
37
|
+
- **On disk** — `await team.emit(dir)` writes the AGENT.md / WORKFLOW.md
|
|
38
|
+
manifests for a runtime that loads a workspace from disk. No Mastra needed.
|
|
39
|
+
|
|
40
|
+
## Generic by design
|
|
41
|
+
|
|
42
|
+
Team ids are `@agentproto/…` and depend on **no** product package (the
|
|
43
|
+
architecture invariant: nothing under `@agentproto/*` may import an app's
|
|
44
|
+
`@<app>/core`). That's what lets any host — including agentik-studio — import a
|
|
45
|
+
team and use its agents/workflows directly.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixer.d.ts","sourceRoot":"","sources":["../../../src/code-team/agents/fixer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,gEAAgE;AAChE,eAAO,MAAM,KAAK,EAAE,UAanB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementer.d.ts","sourceRoot":"","sources":["../../../src/code-team/agents/implementer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,mCAAmC;AACnC,eAAO,MAAM,WAAW,EAAE,UAczB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../../src/code-team/agents/reviewer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,sCAAsC;AACtC,eAAO,MAAM,QAAQ,EAAE,UAetB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `code-team` — a ready-made agentproto app: a small team that ships a code
|
|
3
|
+
* change. Three agents (implementer → reviewer → fixer) bound to one delivery
|
|
4
|
+
* workflow, declared with `@agentproto/app-kit`.
|
|
5
|
+
*
|
|
6
|
+
* Generic on purpose — `@agentproto/…` ids, no product dependency, no home
|
|
7
|
+
* workspace. A host imports it and uses any subset of its agents/workflows:
|
|
8
|
+
* in-process via `codeTeam.toMastraAgents(...)`, or on disk via
|
|
9
|
+
* `codeTeam.emit(dir)`.
|
|
10
|
+
*/
|
|
11
|
+
import { type AppHandle } from "@agentproto/app-kit";
|
|
12
|
+
import { implementer } from "./agents/implementer.js";
|
|
13
|
+
import { reviewer } from "./agents/reviewer.js";
|
|
14
|
+
import { fixer } from "./agents/fixer.js";
|
|
15
|
+
import { deliverChange } from "./workflows/deliver-change.js";
|
|
16
|
+
export declare const codeTeam: AppHandle;
|
|
17
|
+
export { implementer, reviewer, fixer, deliverChange };
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code-team/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAE7D,eAAO,MAAM,QAAQ,EAAE,SAGrB,CAAA;AAEF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
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. */
|
|
3
|
+
export declare const deliverChange: Readonly<import("@agentproto/workflow").WorkflowDefinition>;
|
|
4
|
+
//# sourceMappingURL=deliver-change.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 implementer = {
|
|
11
|
+
agent: defineAgent({
|
|
12
|
+
schema: "agent/v1",
|
|
13
|
+
id: "@agentproto/implementer",
|
|
14
|
+
description: "Implements the requested code change.",
|
|
15
|
+
model: "claude-sonnet-5",
|
|
16
|
+
boundaries: ["Change only what the task asks", "Match the surrounding style"],
|
|
17
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file", "run_command"],
|
|
18
|
+
workflows: [{ ref: "deliver-change" }]
|
|
19
|
+
}),
|
|
20
|
+
body: "You implement the requested change. Read the task and the surrounding code first, make the smallest correct change that satisfies it, then run the tests. Do not touch anything the task didn't ask for."
|
|
21
|
+
};
|
|
22
|
+
var reviewer = {
|
|
23
|
+
agent: defineAgent({
|
|
24
|
+
schema: "agent/v1",
|
|
25
|
+
id: "@agentproto/reviewer",
|
|
26
|
+
description: "Reviews the diff and reports findings.",
|
|
27
|
+
model: "claude-sonnet-5",
|
|
28
|
+
boundaries: ["Report findings only", "Never edit files", "Never run gh pr merge"],
|
|
29
|
+
// Read-only + run_command (to inspect the diff / run tests). No write/edit
|
|
30
|
+
// tools — the "never edit files" boundary is enforced by capability too.
|
|
31
|
+
tools: ["list_dir", "read_file", "run_command"],
|
|
32
|
+
workflows: [{ ref: "deliver-change" }]
|
|
33
|
+
}),
|
|
34
|
+
body: "You are a rigorous reviewer. Read the diff, and report each real issue as `file:line \u2014 why`. Change nothing; you only report."
|
|
35
|
+
};
|
|
36
|
+
var fixer = {
|
|
37
|
+
agent: defineAgent({
|
|
38
|
+
schema: "agent/v1",
|
|
39
|
+
id: "@agentproto/fixer",
|
|
40
|
+
description: "Applies the reviewer's findings, precisely and minimally.",
|
|
41
|
+
model: "claude-sonnet-5",
|
|
42
|
+
boundaries: ["Apply only the listed findings", "No unrelated refactors"],
|
|
43
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file", "run_command"],
|
|
44
|
+
workflows: [{ ref: "deliver-change" }]
|
|
45
|
+
}),
|
|
46
|
+
body: "You apply the reviewer's findings. Address each listed finding exactly, add nothing extra, and re-run the tests when done."
|
|
47
|
+
};
|
|
48
|
+
var deliverChange = defineWorkflow({
|
|
49
|
+
id: "deliver-change",
|
|
50
|
+
name: "Deliver a code change",
|
|
51
|
+
description: "Implement the change, review the diff, apply fixes, verify.",
|
|
52
|
+
version: "0.1.0",
|
|
53
|
+
inputs: {},
|
|
54
|
+
outputs: {},
|
|
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" }
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// src/code-team/index.ts
|
|
64
|
+
var codeTeam = defineApp({
|
|
65
|
+
agents: [implementer, reviewer, fixer],
|
|
66
|
+
workflows: [deliverChange]
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export { codeTeam, deliverChange, fixer, implementer, reviewer };
|
|
70
|
+
//# sourceMappingURL=code-team.mjs.map
|
|
71
|
+
//# sourceMappingURL=code-team.mjs.map
|
|
@@ -0,0 +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,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,WAAAA,CAAY;AAAA,IACjB,MAAA,EAAQ,UAAA;AAAA,IACR,EAAA,EAAI,mBAAA;AAAA,IACJ,WAAA,EAAa,2DAAA;AAAA,IACb,KAAA,EAAO,iBAAA;AAAA,IACP,UAAA,EAAY,CAAC,gCAAA,EAAkC,wBAAwB,CAAA;AAAA,IACvE,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;AAEJ;ACbO,IAAM,gBAAgB,cAAA,CAAe;AAAA,EAC1C,EAAA,EAAI,gBAAA;AAAA,EACJ,IAAA,EAAM,uBAAA;AAAA,EACN,WAAA,EAAa,6DAAA;AAAA,EACb,OAAA,EAAS,OAAA;AAAA,EACT,QAAQ,EAAC;AAAA,EACT,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL,EAAE,EAAA,EAAI,WAAA,EAAa,IAAA,EAAM,MAAA,EAAQ,MAAM,aAAA,EAAc;AAAA,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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/content-team/agents/editor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,0BAA0B;AAC1B,eAAO,MAAM,MAAM,EAAE,UAapB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"researcher.d.ts","sourceRoot":"","sources":["../../../src/content-team/agents/researcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,qCAAqC;AACrC,eAAO,MAAM,UAAU,EAAE,UAexB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/content-team/agents/writer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,uCAAuC;AACvC,eAAO,MAAM,MAAM,EAAE,UAapB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `content-team` — a ready-made agentproto app: a small team that produces a
|
|
3
|
+
* piece of content. Three agents (researcher → writer → editor) bound to one
|
|
4
|
+
* production workflow, declared with `@agentproto/app-kit`.
|
|
5
|
+
*
|
|
6
|
+
* Generic on purpose — `@agentproto/…` ids, no product dependency. A host
|
|
7
|
+
* imports it and uses any subset of its agents/workflows.
|
|
8
|
+
*/
|
|
9
|
+
import { type AppHandle } from "@agentproto/app-kit";
|
|
10
|
+
import { researcher } from "./agents/researcher.js";
|
|
11
|
+
import { writer } from "./agents/writer.js";
|
|
12
|
+
import { editor } from "./agents/editor.js";
|
|
13
|
+
import { produceContent } from "./workflows/produce-content.js";
|
|
14
|
+
export declare const contentTeam: AppHandle;
|
|
15
|
+
export { researcher, writer, editor, produceContent };
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAE/D,eAAO,MAAM,WAAW,EAAE,SAGxB,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The one workflow the content team produces a piece through. Every team
|
|
2
|
+
* agent references it (app-kit attachment invariant). */
|
|
3
|
+
export declare const produceContent: Readonly<import("@agentproto/workflow").WorkflowDefinition>;
|
|
4
|
+
//# sourceMappingURL=produce-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"produce-content.d.ts","sourceRoot":"","sources":["../../../src/content-team/workflows/produce-content.ts"],"names":[],"mappings":"AAEA;0DAC0D;AAC1D,eAAO,MAAM,cAAc,6DAezB,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 researcher = {
|
|
11
|
+
agent: defineAgent({
|
|
12
|
+
schema: "agent/v1",
|
|
13
|
+
id: "@agentproto/researcher",
|
|
14
|
+
description: "Reads the provided sources and summarizes them for the writer.",
|
|
15
|
+
model: "claude-sonnet-5",
|
|
16
|
+
boundaries: ["Cite every claim", "Prefer primary sources"],
|
|
17
|
+
tools: ["list_dir", "read_file", "run_command"],
|
|
18
|
+
workflows: [{ ref: "produce-content" }]
|
|
19
|
+
}),
|
|
20
|
+
body: "You read the source material already in the workspace (list_dir, then read_file the sources), extract the key facts, and hand the writer a tight brief with a citation for every claim. Use run_command only to fetch a URL already named in the task; do not invent sources."
|
|
21
|
+
};
|
|
22
|
+
var writer = {
|
|
23
|
+
agent: defineAgent({
|
|
24
|
+
schema: "agent/v1",
|
|
25
|
+
id: "@agentproto/writer",
|
|
26
|
+
description: "Drafts the piece from the researcher's brief.",
|
|
27
|
+
model: "claude-sonnet-5",
|
|
28
|
+
boundaries: ["Stay on the brief", "One idea per paragraph"],
|
|
29
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file"],
|
|
30
|
+
workflows: [{ ref: "produce-content" }]
|
|
31
|
+
}),
|
|
32
|
+
body: "You draft the piece from the brief and its sources. Lead with the point, keep one idea per paragraph, and don't invent facts the brief doesn't have."
|
|
33
|
+
};
|
|
34
|
+
var editor = {
|
|
35
|
+
agent: defineAgent({
|
|
36
|
+
schema: "agent/v1",
|
|
37
|
+
id: "@agentproto/editor",
|
|
38
|
+
description: "Edits the draft for voice, clarity, and length.",
|
|
39
|
+
model: "claude-sonnet-5",
|
|
40
|
+
boundaries: ["Preserve the writer's meaning", "Cut, don't pad"],
|
|
41
|
+
tools: ["read_file", "edit_file"],
|
|
42
|
+
workflows: [{ ref: "produce-content" }]
|
|
43
|
+
}),
|
|
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
|
+
};
|
|
46
|
+
var produceContent = defineWorkflow({
|
|
47
|
+
id: "produce-content",
|
|
48
|
+
name: "Produce a piece of content",
|
|
49
|
+
description: "Read the sources, draft the piece, edit it, then commit it.",
|
|
50
|
+
version: "0.1.0",
|
|
51
|
+
inputs: {},
|
|
52
|
+
outputs: {},
|
|
53
|
+
// Concrete workspace tools (fs + exec), so the workflow describes a process
|
|
54
|
+
// a standard runtime can actually run — not abstract tools nothing provides.
|
|
55
|
+
steps: [
|
|
56
|
+
{ id: "research", kind: "tool", tool: "read_file" },
|
|
57
|
+
{ id: "draft", kind: "tool", tool: "write_file" },
|
|
58
|
+
{ id: "edit", kind: "tool", tool: "edit_file" },
|
|
59
|
+
{ id: "publish", kind: "tool", tool: "run_command" }
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// src/content-team/index.ts
|
|
64
|
+
var contentTeam = defineApp({
|
|
65
|
+
agents: [researcher, writer, editor],
|
|
66
|
+
workflows: [produceContent]
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export { contentTeam, editor, produceContent, researcher, writer };
|
|
70
|
+
//# sourceMappingURL=content-team.mjs.map
|
|
71
|
+
//# sourceMappingURL=content-team.mjs.map
|
|
@@ -0,0 +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;;;ACJM,IAAM,cAAyB,SAAA,CAAU;AAAA,EAC9C,MAAA,EAAQ,CAAC,UAAA,EAAY,MAAA,EAAQ,MAAM,CAAA;AAAA,EACnC,SAAA,EAAW,CAAC,cAAc;AAC5B,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 { 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"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agentproto/apps — a home for ready-made agentproto apps: **teams** of
|
|
3
|
+
* agents plus the workflows they run, each declared with
|
|
4
|
+
* [`@agentproto/app-kit`](../app-kit).
|
|
5
|
+
*
|
|
6
|
+
* An app here is a plain `AppHandle`. Import one and use any subset of its
|
|
7
|
+
* agents/workflows from your own host:
|
|
8
|
+
*
|
|
9
|
+
* - in-process: `await codeTeam.toMastraAgents({ resolveModel })` and pick
|
|
10
|
+
* the agent(s) you want by id;
|
|
11
|
+
* - on disk: `await codeTeam.emit(dir)` to write the AGENT.md / WORKFLOW.md
|
|
12
|
+
* manifests for a runtime that loads from a workspace.
|
|
13
|
+
*
|
|
14
|
+
* Teams are generic (`@agentproto/…` ids, no product dependency), so any host
|
|
15
|
+
* — including agentik-studio — can consume them. Each team lives in its own
|
|
16
|
+
* folder (`code-team/`, `content-team/`) with `agents/` + `workflows/`, and is
|
|
17
|
+
* re-exported here + as a subpath (`@agentproto/apps/<team>`).
|
|
18
|
+
*/
|
|
19
|
+
export { codeTeam } from "./code-team/index.js";
|
|
20
|
+
export { contentTeam } from "./content-team/index.js";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
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 implementer = {
|
|
11
|
+
agent: defineAgent({
|
|
12
|
+
schema: "agent/v1",
|
|
13
|
+
id: "@agentproto/implementer",
|
|
14
|
+
description: "Implements the requested code change.",
|
|
15
|
+
model: "claude-sonnet-5",
|
|
16
|
+
boundaries: ["Change only what the task asks", "Match the surrounding style"],
|
|
17
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file", "run_command"],
|
|
18
|
+
workflows: [{ ref: "deliver-change" }]
|
|
19
|
+
}),
|
|
20
|
+
body: "You implement the requested change. Read the task and the surrounding code first, make the smallest correct change that satisfies it, then run the tests. Do not touch anything the task didn't ask for."
|
|
21
|
+
};
|
|
22
|
+
var reviewer = {
|
|
23
|
+
agent: defineAgent({
|
|
24
|
+
schema: "agent/v1",
|
|
25
|
+
id: "@agentproto/reviewer",
|
|
26
|
+
description: "Reviews the diff and reports findings.",
|
|
27
|
+
model: "claude-sonnet-5",
|
|
28
|
+
boundaries: ["Report findings only", "Never edit files", "Never run gh pr merge"],
|
|
29
|
+
// Read-only + run_command (to inspect the diff / run tests). No write/edit
|
|
30
|
+
// tools — the "never edit files" boundary is enforced by capability too.
|
|
31
|
+
tools: ["list_dir", "read_file", "run_command"],
|
|
32
|
+
workflows: [{ ref: "deliver-change" }]
|
|
33
|
+
}),
|
|
34
|
+
body: "You are a rigorous reviewer. Read the diff, and report each real issue as `file:line \u2014 why`. Change nothing; you only report."
|
|
35
|
+
};
|
|
36
|
+
var fixer = {
|
|
37
|
+
agent: defineAgent({
|
|
38
|
+
schema: "agent/v1",
|
|
39
|
+
id: "@agentproto/fixer",
|
|
40
|
+
description: "Applies the reviewer's findings, precisely and minimally.",
|
|
41
|
+
model: "claude-sonnet-5",
|
|
42
|
+
boundaries: ["Apply only the listed findings", "No unrelated refactors"],
|
|
43
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file", "run_command"],
|
|
44
|
+
workflows: [{ ref: "deliver-change" }]
|
|
45
|
+
}),
|
|
46
|
+
body: "You apply the reviewer's findings. Address each listed finding exactly, add nothing extra, and re-run the tests when done."
|
|
47
|
+
};
|
|
48
|
+
var deliverChange = defineWorkflow({
|
|
49
|
+
id: "deliver-change",
|
|
50
|
+
name: "Deliver a code change",
|
|
51
|
+
description: "Implement the change, review the diff, apply fixes, verify.",
|
|
52
|
+
version: "0.1.0",
|
|
53
|
+
inputs: {},
|
|
54
|
+
outputs: {},
|
|
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" }
|
|
60
|
+
]
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// src/code-team/index.ts
|
|
64
|
+
var codeTeam = defineApp({
|
|
65
|
+
agents: [implementer, reviewer, fixer],
|
|
66
|
+
workflows: [deliverChange]
|
|
67
|
+
});
|
|
68
|
+
var researcher = {
|
|
69
|
+
agent: defineAgent({
|
|
70
|
+
schema: "agent/v1",
|
|
71
|
+
id: "@agentproto/researcher",
|
|
72
|
+
description: "Reads the provided sources and summarizes them for the writer.",
|
|
73
|
+
model: "claude-sonnet-5",
|
|
74
|
+
boundaries: ["Cite every claim", "Prefer primary sources"],
|
|
75
|
+
tools: ["list_dir", "read_file", "run_command"],
|
|
76
|
+
workflows: [{ ref: "produce-content" }]
|
|
77
|
+
}),
|
|
78
|
+
body: "You read the source material already in the workspace (list_dir, then read_file the sources), extract the key facts, and hand the writer a tight brief with a citation for every claim. Use run_command only to fetch a URL already named in the task; do not invent sources."
|
|
79
|
+
};
|
|
80
|
+
var writer = {
|
|
81
|
+
agent: defineAgent({
|
|
82
|
+
schema: "agent/v1",
|
|
83
|
+
id: "@agentproto/writer",
|
|
84
|
+
description: "Drafts the piece from the researcher's brief.",
|
|
85
|
+
model: "claude-sonnet-5",
|
|
86
|
+
boundaries: ["Stay on the brief", "One idea per paragraph"],
|
|
87
|
+
tools: ["list_dir", "read_file", "write_file", "edit_file"],
|
|
88
|
+
workflows: [{ ref: "produce-content" }]
|
|
89
|
+
}),
|
|
90
|
+
body: "You draft the piece from the brief and its sources. Lead with the point, keep one idea per paragraph, and don't invent facts the brief doesn't have."
|
|
91
|
+
};
|
|
92
|
+
var editor = {
|
|
93
|
+
agent: defineAgent({
|
|
94
|
+
schema: "agent/v1",
|
|
95
|
+
id: "@agentproto/editor",
|
|
96
|
+
description: "Edits the draft for voice, clarity, and length.",
|
|
97
|
+
model: "claude-sonnet-5",
|
|
98
|
+
boundaries: ["Preserve the writer's meaning", "Cut, don't pad"],
|
|
99
|
+
tools: ["read_file", "edit_file"],
|
|
100
|
+
workflows: [{ ref: "produce-content" }]
|
|
101
|
+
}),
|
|
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
|
+
};
|
|
104
|
+
var produceContent = defineWorkflow({
|
|
105
|
+
id: "produce-content",
|
|
106
|
+
name: "Produce a piece of content",
|
|
107
|
+
description: "Read the sources, draft the piece, edit it, then commit it.",
|
|
108
|
+
version: "0.1.0",
|
|
109
|
+
inputs: {},
|
|
110
|
+
outputs: {},
|
|
111
|
+
// Concrete workspace tools (fs + exec), so the workflow describes a process
|
|
112
|
+
// a standard runtime can actually run — not abstract tools nothing provides.
|
|
113
|
+
steps: [
|
|
114
|
+
{ id: "research", kind: "tool", tool: "read_file" },
|
|
115
|
+
{ id: "draft", kind: "tool", tool: "write_file" },
|
|
116
|
+
{ id: "edit", kind: "tool", tool: "edit_file" },
|
|
117
|
+
{ id: "publish", kind: "tool", tool: "run_command" }
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// src/content-team/index.ts
|
|
122
|
+
var contentTeam = defineApp({
|
|
123
|
+
agents: [researcher, writer, editor],
|
|
124
|
+
workflows: [produceContent]
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export { codeTeam, contentTeam };
|
|
128
|
+
//# sourceMappingURL=index.mjs.map
|
|
129
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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":"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","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"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentproto/apps",
|
|
3
|
+
"version": "0.1.1",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"agentproto",
|
|
7
|
+
"app",
|
|
8
|
+
"agents",
|
|
9
|
+
"team",
|
|
10
|
+
"code-team",
|
|
11
|
+
"app-kit",
|
|
12
|
+
"open-standard"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://agentproto.sh/docs/aip-42",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/agentproto/ts",
|
|
18
|
+
"directory": "packages/apps"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/agentproto/ts/issues"
|
|
22
|
+
},
|
|
23
|
+
"license": "Apache-2.0",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "dist/index.mjs",
|
|
26
|
+
"module": "dist/index.mjs",
|
|
27
|
+
"types": "dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.mjs",
|
|
32
|
+
"default": "./dist/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./code-team": {
|
|
35
|
+
"types": "./dist/code-team.d.ts",
|
|
36
|
+
"import": "./dist/code-team.mjs",
|
|
37
|
+
"default": "./dist/code-team.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./content-team": {
|
|
40
|
+
"types": "./dist/content-team.d.ts",
|
|
41
|
+
"import": "./dist/content-team.mjs",
|
|
42
|
+
"default": "./dist/content-team.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"README.md",
|
|
49
|
+
"LICENSE"
|
|
50
|
+
],
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@agentproto/agent": "0.2.1",
|
|
56
|
+
"@agentproto/app-kit": "0.2.0",
|
|
57
|
+
"@agentproto/workflow": "0.1.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@mastra/core": ">=1.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@mastra/core": "1.32.1",
|
|
64
|
+
"@types/node": "^25.6.2",
|
|
65
|
+
"tsup": "^8.5.1",
|
|
66
|
+
"typescript": "^5.9.3",
|
|
67
|
+
"vitest": "^3.2.4",
|
|
68
|
+
"@agentproto/mastra": "0.2.2",
|
|
69
|
+
"@agentproto/tooling": "0.1.0-alpha.0"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"dev": "tsup --watch",
|
|
73
|
+
"build": "tsup && tsc -p tsconfig.build.json",
|
|
74
|
+
"clean": "rm -rf dist",
|
|
75
|
+
"check-types": "tsc --noEmit",
|
|
76
|
+
"test": "vitest run",
|
|
77
|
+
"test:watch": "vitest"
|
|
78
|
+
}
|
|
79
|
+
}
|