@agentproto/app-kit 0.5.0 → 0.5.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/README.md +42 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -91,6 +91,42 @@ An app may also declare `requires: ["@acme/shared", ...]` — app ids that must
|
|
|
91
91
|
applied to the same scope before this one can run. The runtime validates the
|
|
92
92
|
graph when mounting apps via `app_apply`.
|
|
93
93
|
|
|
94
|
+
## UI surfaces, artifacts, and dev-launch config
|
|
95
|
+
|
|
96
|
+
Beyond agents and workflows, an app can declare three optional surfaces that
|
|
97
|
+
round-trip through `emit` and `loadAppHandle` and are integrated into the
|
|
98
|
+
runtime app registry:
|
|
99
|
+
|
|
100
|
+
- **`ui`** — an HTML dashboard/panel. `html` is written to
|
|
101
|
+
`.agentproto/ui/index.html`; `APP.md` frontmatter carries the relative path
|
|
102
|
+
plus optional `title`, `description`, `tools`, and `csp`.
|
|
103
|
+
- **`artifacts`** — a list of artifact types the app's agents may produce,
|
|
104
|
+
declared for discovery.
|
|
105
|
+
- **`dev`** — one or more local launch recipes (`name`, `runtimeExecutable`,
|
|
106
|
+
`runtimeArgs`, `port`, `url`) for running the app in development.
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
export const dashboardApp = defineApp({
|
|
110
|
+
id: "@acme/dashboard",
|
|
111
|
+
name: "Operations Dashboard",
|
|
112
|
+
agents: [/* … */],
|
|
113
|
+
workflows: [/* … */],
|
|
114
|
+
ui: {
|
|
115
|
+
html: "<!doctype html><html>…</html>",
|
|
116
|
+
title: "Ops Dashboard",
|
|
117
|
+
tools: ["terminal_start", "agent_start"],
|
|
118
|
+
},
|
|
119
|
+
artifacts: [
|
|
120
|
+
{ type: "image/png", description: "Generated cover illustration" },
|
|
121
|
+
],
|
|
122
|
+
dev: {
|
|
123
|
+
launch: [
|
|
124
|
+
{ name: "web", runtimeExecutable: "npm", runtimeArgs: ["run", "dev"], port: 3000 },
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
```
|
|
129
|
+
|
|
94
130
|
## Consuming a bundle
|
|
95
131
|
|
|
96
132
|
### `handle.toMastraAgents(resolvers)` — run them
|
|
@@ -127,6 +163,7 @@ shared root `.agents/` convention:
|
|
|
127
163
|
<dir>/.agentproto/agents/reviewer/AGENT.md
|
|
128
164
|
<dir>/.agentproto/agents/fixer/AGENT.md
|
|
129
165
|
<dir>/.agentproto/workflows/review-and-fix/WORKFLOW.md (shared — a workflow may be run by several agents)
|
|
166
|
+
<dir>/.agentproto/ui/index.html (only when the app declares a `ui` surface)
|
|
130
167
|
```
|
|
131
168
|
|
|
132
169
|
The daemon's state root is migrating toward a `tenants/<t>/…` segment
|
|
@@ -146,8 +183,11 @@ whose frontmatter lists every agent + workflow the app bundles as `{ id, path }`
|
|
|
146
183
|
refs (relative to `dir`), plus the app's own optional `id` / `name` / `version`
|
|
147
184
|
(defaults to `"0.1.0"` when `id` is set) / `description`, an optional `requires`
|
|
148
185
|
array of app ids it depends on, and, when the app has a home workspace, that
|
|
149
|
-
workspace's `id`.
|
|
150
|
-
|
|
186
|
+
workspace's `id`. When declared, `ui` metadata, `artifacts`, and `dev` launch
|
|
187
|
+
configs are also carried in the frontmatter (the `ui.html` document is written
|
|
188
|
+
next to `APP.md` and referenced by path). Nothing reads `AGENT.md`/`WORKFLOW.md`
|
|
189
|
+
files on their own today — `APP.md` is the thing a future daemon `app_install`
|
|
190
|
+
discovers and consumes.
|
|
151
191
|
|
|
152
192
|
`loadAppHandle(dir)` is the inverse: it reads `APP.md`, loads each referenced
|
|
153
193
|
`AGENT.md` / `WORKFLOW.md` (and `WORKSPACE.md`, if declared) with their own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/app-kit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "@agentproto/app-kit — declare an agent (with its system prompt) and its workflows in one TypeScript module and import them anywhere. A thin umbrella over AIP-42 defineAgent + AIP-15 defineWorkflow: defineApp cross-links the two (every workflow agent-step must target the app's agent, every agent workflow ref must resolve), toMastraAgent turns the AGENT.md body into a real Mastra `instructions` field, and emit writes the .agents/<id>/AGENT.md + WORKFLOW.md(+entry) pair that runs through the agentproto-run lane unchanged.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"gray-matter": "^4.0.3",
|
|
46
46
|
"@agentproto/agent": "0.2.1",
|
|
47
|
-
"@agentproto/mastra": "0.2.
|
|
48
|
-
"@agentproto/workflow-loader": "0.1.3",
|
|
47
|
+
"@agentproto/mastra": "0.2.6",
|
|
49
48
|
"@agentproto/workflow": "0.2.0",
|
|
49
|
+
"@agentproto/workflow-loader": "0.1.3",
|
|
50
50
|
"@agentproto/workspace": "0.1.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@mastra/core": ">=1.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@mastra/core": "1.
|
|
56
|
+
"@mastra/core": "1.57.0",
|
|
57
57
|
"@types/node": "^25.6.2",
|
|
58
58
|
"tsup": "^8.5.1",
|
|
59
59
|
"typescript": "^5.9.3",
|