experimental-ash 0.55.2 → 0.56.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/CHANGELOG.md +27 -0
- package/LICENSE +202 -0
- package/dist/docs/public/meta.json +1 -0
- package/dist/docs/public/onboarding.md +7 -5
- package/dist/docs/public/tools.mdx +10 -2
- package/dist/skills/agent/SKILL.md +169 -0
- package/dist/skills/agent/references/deployment.md +35 -0
- package/dist/skills/agent/references/getting-started.md +58 -0
- package/dist/skills/agent/references/project-layout.md +35 -0
- package/dist/skills/agent/references/runtime-model.md +24 -0
- package/dist/skills/agent/references/skills.md +26 -0
- package/dist/skills/agent/scripts/add-to-existing-project.sh +12 -0
- package/dist/skills/agent/scripts/bootstrap-from-npm.sh +9 -0
- package/dist/skills/agent/scripts/verify-local-agent.sh +16 -0
- package/dist/skills/ash-add-agent/SKILL.md +166 -0
- package/dist/skills/ash-add-next/SKILL.md +137 -0
- package/dist/skills/framework/SKILL.md +93 -0
- package/dist/skills/framework/references/architecture.md +14 -0
- package/dist/skills/framework/references/discovery-and-compilation.md +15 -0
- package/dist/skills/framework/references/quality-gates.md +13 -0
- package/dist/skills/framework/references/runtime-model.md +12 -0
- package/dist/skills/framework/references/workspace-and-sandbox.md +25 -0
- package/dist/skills/framework/scripts/framework-review-checklist.sh +13 -0
- package/dist/skills/framework/scripts/run-framework-gates.sh +8 -0
- package/dist/src/client/output-schema.js +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +2 -0
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/manifest.d.ts +4 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +1 -0
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/harness/code-mode-lifecycle.js +1 -1
- package/dist/src/harness/code-mode.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +1 -0
- package/dist/src/harness/provider-tools.d.ts +7 -1
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.d.ts +2 -0
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/packages/ash-scaffold/src/channels.js +2 -2
- package/dist/src/packages/ash-scaffold/src/steps/run-add-to-agent.js +1 -1
- package/dist/src/packages/ash-scaffold/src/web-template.js +2 -2
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/definitions/tool.d.ts +21 -1
- package/dist/src/public/tools/define-bash-tool.js +1 -1
- package/dist/src/public/tools/define-glob-tool.js +1 -1
- package/dist/src/public/tools/define-grep-tool.js +1 -1
- package/dist/src/public/tools/define-read-file-tool.js +1 -1
- package/dist/src/public/tools/define-write-file-tool.js +1 -1
- package/dist/src/public/tools/internal.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/connections/authorization-tokens.d.ts +8 -0
- package/dist/src/runtime/connections/authorization-tokens.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +14 -0
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/types.d.ts +1 -0
- package/dist/src/runtime/framework-tools/ask-question.d.ts +4 -0
- package/dist/src/runtime/framework-tools/ask-question.js +1 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +5 -0
- package/dist/src/runtime/framework-tools/bash.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +1 -0
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
- package/dist/src/runtime/framework-tools/final-output.js +1 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +5 -0
- package/dist/src/runtime/framework-tools/glob.js +2 -2
- package/dist/src/runtime/framework-tools/grep.d.ts +5 -0
- package/dist/src/runtime/framework-tools/grep.js +2 -2
- package/dist/src/runtime/framework-tools/read-file.d.ts +5 -0
- package/dist/src/runtime/framework-tools/read-file.js +2 -2
- package/dist/src/runtime/framework-tools/skill.d.ts +2 -0
- package/dist/src/runtime/framework-tools/skill.js +1 -1
- package/dist/src/runtime/framework-tools/todo.d.ts +2 -0
- package/dist/src/runtime/framework-tools/todo.js +2 -2
- package/dist/src/runtime/framework-tools/web-fetch.d.ts +3 -0
- package/dist/src/runtime/framework-tools/web-fetch.js +2 -2
- package/dist/src/runtime/framework-tools/web-search.d.ts +17 -0
- package/dist/src/runtime/framework-tools/web-search.js +1 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +5 -0
- package/dist/src/runtime/framework-tools/write-file.js +2 -2
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +5 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +2 -1
- package/dist/src/shared/json-schema.d.ts +3 -1
- package/dist/src/shared/json-schema.js +1 -1
- package/dist/src/shared/tool-definition.d.ts +10 -2
- package/package.json +20 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# experimental-ash
|
|
2
2
|
|
|
3
|
+
## 0.56.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e5f2d97: Ship the root Ash skill packages inside the npm package under `dist/skills`. The docs site now renders those canonical `SKILL.md` files directly as skill reference pages, avoiding duplicated skill documentation.
|
|
8
|
+
- 80ca852: Add optional `outputSchema` support to `defineTool` and propagate tool output schemas into code mode host tools. Framework tools with fixed result shapes now declare output schemas, provider-managed `web_search` injects the selected provider's output schema at runtime, and code mode logs a warning when an exposed host tool has no output schema.
|
|
9
|
+
|
|
10
|
+
Use deterministic per-turn completion hook tokens in the workflow driver so fast subagent resumes cannot collide with a prior turn's completion hook while the Workflow SDK is still persisting disposal.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- bdf208a: Connections now recover when the remote server rejects an already-issued
|
|
15
|
+
token. An MCP `401` (the bearer was revoked or expired out of band) is
|
|
16
|
+
classified as authorization-required: Ash evicts the stale cached token,
|
|
17
|
+
tears down the connection, and re-enters the sign-in flow instead of
|
|
18
|
+
narrating an opaque transport error. A loop guard fails the connection
|
|
19
|
+
terminally if a freshly authorized token is still rejected, so a broken
|
|
20
|
+
grant cannot trigger an endless re-authorization loop.
|
|
21
|
+
- f158cb2: Drop verified Slack `http_timeout` retry deliveries so delayed acknowledgements do not start duplicate sessions.
|
|
22
|
+
- 4d59025: Add Apache-2.0 license metadata, a root license file, and publish-time package license copies along with clearer package descriptions and discovery keywords.
|
|
23
|
+
|
|
24
|
+
## 0.55.3
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 4cee7b4: Fix code-mode dropping state written by `action.result` hooks and channel handlers. Nested tool-result events are emitted from a pooled worker's bridge callback, so the synchronous hook and channel `events` dispatch ran under a stale async context and their `defineState` writes were lost. Code mode now re-enters the originating session's context before emitting, matching direct mode.
|
|
29
|
+
|
|
3
30
|
## 0.55.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
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.
|
|
@@ -28,8 +28,8 @@ Collect these up front. A capable agent should use a structured question UI (suc
|
|
|
28
28
|
4. **Model provider** — how the agent reaches a model:
|
|
29
29
|
- Vercel project (default) — create a project, or pass `--project <slug>` to link an existing one, and use AI Gateway via OIDC.
|
|
30
30
|
- API key override — pass `--gateway-api-key <key>` to write `AI_GATEWAY_API_KEY` to `.env.local`.
|
|
31
|
-
-
|
|
32
|
-
5. **Deploy** — whether to deploy to Vercel production now. Required for Slack to receive events; pass `--
|
|
31
|
+
- Skip Vercel — pass `--skip-vercel` for web/REPL-only setups that should scaffold without a Vercel project or Vercel Services config; the agent will not reach a model until you add a provider. Slack still requires a Vercel project.
|
|
32
|
+
5. **Deploy** — whether to deploy to Vercel production now. Required for Slack to receive events; pass `--skip-deploy` to skip only the final deployment.
|
|
33
33
|
|
|
34
34
|
## Step 1 — Scaffold (non-interactive)
|
|
35
35
|
|
|
@@ -42,13 +42,15 @@ npx create-experimental-ash-agent@latest <name> \
|
|
|
42
42
|
[--team <slug>] \
|
|
43
43
|
[--project <slug>] \
|
|
44
44
|
[--gateway-api-key <key>] \
|
|
45
|
-
[--
|
|
46
|
-
[--
|
|
45
|
+
[--skip-vercel] \
|
|
46
|
+
[--skip-deploy] \
|
|
47
47
|
--target-dir <parent-dir> \
|
|
48
48
|
--yes --json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
By default the CLI creates a Vercel project named `<name>`, links it non-interactively, and pulls the project's AI Gateway environment. Use `--project <slug>` when the user picked an existing project, `--team <slug>` when they picked a non-current Vercel team, `--gateway-api-key <key>` when they want a pasted key in `.env.local`, and `--
|
|
51
|
+
By default the CLI creates a Vercel project named `<name>`, links it non-interactively, and pulls the project's AI Gateway environment. Use `--project <slug>` when the user picked an existing project, `--team <slug>` when they picked a non-current Vercel team, `--gateway-api-key <key>` when they want a pasted key in `.env.local`, and `--skip-vercel` only for web/REPL-only setups where they explicitly do not want Vercel provisioning or Vercel Services config.
|
|
52
|
+
|
|
53
|
+
To scaffold into an existing directory instead of creating `<parent-dir>/<name>`, omit `<name>` and pass `--in-place --target-dir <dir>`. Add `-y` / `--yes` only when replacing existing Ash scaffold files is intended; the CLI logs every overwritten file.
|
|
52
54
|
|
|
53
55
|
The CLI advances as far as it can without human input. When it reaches a login or browser step, it emits an `action-required` record and exits cleanly instead of blocking on a prompt:
|
|
54
56
|
|
|
@@ -64,7 +64,11 @@ The AI SDK uses `inputSchema` to validate and transform model input (including Z
|
|
|
64
64
|
Ash accepts Zod, any Standard Schema, or a plain JSON Schema object. Zod and Standard Schema
|
|
65
65
|
definitions infer the `execute(input, ctx)` input type. Plain JSON Schema is accepted at runtime, but
|
|
66
66
|
TypeScript treats `input` as `Record<string, unknown>` because the schema does not carry a static
|
|
67
|
-
|
|
67
|
+
input type.
|
|
68
|
+
|
|
69
|
+
Add `outputSchema` when the tool returns structured data. It is optional, but code mode uses it to
|
|
70
|
+
type host-tool return values inside generated code. Zod and Standard Schema output schemas also type
|
|
71
|
+
the value returned from `execute`.
|
|
68
72
|
|
|
69
73
|
`agent/tools/lookup_customer.ts`
|
|
70
74
|
|
|
@@ -77,8 +81,12 @@ export default defineTool({
|
|
|
77
81
|
inputSchema: z.object({
|
|
78
82
|
customerId: z.string(),
|
|
79
83
|
}),
|
|
84
|
+
outputSchema: z.object({
|
|
85
|
+
customerId: z.string(),
|
|
86
|
+
status: z.enum(["active", "inactive"]),
|
|
87
|
+
}),
|
|
80
88
|
async execute(input) {
|
|
81
|
-
return { customerId: input.customerId };
|
|
89
|
+
return { customerId: input.customerId, status: "active" };
|
|
82
90
|
},
|
|
83
91
|
});
|
|
84
92
|
```
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ash-agent
|
|
3
|
+
description: Public Ash guide for app authors. Use when building Ash apps, writing user-facing docs/examples, explaining project layout, or helping someone deploy and operate an Ash project. Prefer authored-file guidance, minimal examples, and end-user implementation details.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Ash repo
|
|
6
|
+
version: "0.0.1"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Use this skill for end-user Ash work.
|
|
10
|
+
|
|
11
|
+
## When to use this skill
|
|
12
|
+
|
|
13
|
+
Use this skill when the task is about how an app author uses Ash, including:
|
|
14
|
+
|
|
15
|
+
- building an Ash app
|
|
16
|
+
- writing or updating public docs and examples
|
|
17
|
+
- explaining agent layout and authoring slots
|
|
18
|
+
- teaching how skills, tools, the sandbox, channels, or subagents fit together
|
|
19
|
+
- showing how to install Ash from npm and get started locally
|
|
20
|
+
- helping someone deploy or operate an Ash app
|
|
21
|
+
|
|
22
|
+
If the task is mainly about Ash internals, compiler behavior, runtime plumbing, or implementation
|
|
23
|
+
constraints, load the `ash-framework` skill instead.
|
|
24
|
+
|
|
25
|
+
## How to use this skill
|
|
26
|
+
|
|
27
|
+
1. Start from the app author's point of view.
|
|
28
|
+
2. Read the bundled references before relying on memory.
|
|
29
|
+
3. Use the scripts in `scripts/` when they match the user's goal.
|
|
30
|
+
4. Keep guidance task-oriented, concrete, and minimal.
|
|
31
|
+
|
|
32
|
+
## Writing or updating public docs
|
|
33
|
+
|
|
34
|
+
The docs website at `apps/docs` renders two directories directly:
|
|
35
|
+
|
|
36
|
+
- `/docs/public` — polished public docs, manually ordered via
|
|
37
|
+
`/docs/public/meta.json`.
|
|
38
|
+
- `/research/active` — active design notes, mounted under `/docs/research`
|
|
39
|
+
and listed alphabetically with no meta.json.
|
|
40
|
+
|
|
41
|
+
Every markdown file in either directory that should render on the site
|
|
42
|
+
**must** have this shape:
|
|
43
|
+
|
|
44
|
+
```md
|
|
45
|
+
---
|
|
46
|
+
title: "Short page title"
|
|
47
|
+
description: "One-sentence summary of the page."
|
|
48
|
+
url: /custom/site/path # optional, /docs/public only; only if filename ≠ site URL
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
Body starts here. Do NOT repeat the title as an `# H1` in the body — the
|
|
52
|
+
site renders the frontmatter `title` as the page heading.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After creating a new `/docs/public` page:
|
|
56
|
+
|
|
57
|
+
- Add its slug to `/docs/public/meta.json#pages` in the section that matches
|
|
58
|
+
its topic. The slug is the filename without the `.md` extension for root
|
|
59
|
+
files, or the folder name for subfolder groups. The trailing `"..."` token
|
|
60
|
+
auto-includes anything missing but gets placed at the bottom — put new
|
|
61
|
+
pages in the intended position explicitly.
|
|
62
|
+
|
|
63
|
+
New `/research/active` files need no meta.json work — the Research section
|
|
64
|
+
sorts alphabetically.
|
|
65
|
+
|
|
66
|
+
Files intentionally excluded from the site (the top-level `README.md` in
|
|
67
|
+
each directory, etc.) should have no frontmatter and be listed in the
|
|
68
|
+
EXCLUDES set of `scripts/check-docs.mjs`. `pnpm docs:check` validates every
|
|
69
|
+
other file in both directories.
|
|
70
|
+
|
|
71
|
+
## What Ash is
|
|
72
|
+
|
|
73
|
+
Ash is a filesystem-first framework for durable backend agents.
|
|
74
|
+
Authors define agents on disk with files like `instructions.md`, `skills/`, `tools/`, `sandbox/`,
|
|
75
|
+
`channels/`, `subagents/`, `schedules/`, and `agent.ts`.
|
|
76
|
+
|
|
77
|
+
## Core behavior to reinforce
|
|
78
|
+
|
|
79
|
+
- `instructions.md` is the always-on instructions prompt.
|
|
80
|
+
- `skills/` are on-demand procedures loaded only when relevant.
|
|
81
|
+
- `tools/` are typed executable integrations.
|
|
82
|
+
- each agent has exactly one sandbox; the workspace is the filesystem inside it.
|
|
83
|
+
- `sandbox/sandbox.ts` overrides the sandbox definition and `sandbox/workspace/` seeds files; both
|
|
84
|
+
are optional and the framework supplies a default.
|
|
85
|
+
- `channels/` are authored messaging-platform entrypoints and can seed durable context in
|
|
86
|
+
`onDeliver()`.
|
|
87
|
+
- `getSession()`, `getSandbox()`, and `getSkill()` are public authored runtime helpers.
|
|
88
|
+
- `getContext()`, `requireContext()`, `hasContext()`, `setContext()`, and `ensureContext()` are the
|
|
89
|
+
public unified context helpers.
|
|
90
|
+
- channel classes can declare `static readonly contextProviders = [...]` to derive live step-local
|
|
91
|
+
values from durable context.
|
|
92
|
+
- `SlackChannel` subclasses can override `handleInteraction(ctx, interaction)` for no-wake Slack UI
|
|
93
|
+
actions, use `getSlackThread()` for thread reads/posts, and call `editMessage(messageTs, renderable)`
|
|
94
|
+
to update Slack messages inline.
|
|
95
|
+
- `subagents/` are specialist child agents with separate runs.
|
|
96
|
+
- `schedules/` are recurring triggers.
|
|
97
|
+
- `agent.ts` is where model, name, metadata, build, compaction, and workspace preferences live.
|
|
98
|
+
- route auth and IP policy live on the HTTP channel layer, not in `agent.ts`.
|
|
99
|
+
|
|
100
|
+
## Preferred workflow
|
|
101
|
+
|
|
102
|
+
Read these bundled references in roughly this order:
|
|
103
|
+
|
|
104
|
+
1. `references/getting-started.md`
|
|
105
|
+
2. `references/project-layout.md`
|
|
106
|
+
3. `references/skills.md`
|
|
107
|
+
4. `references/runtime-model.md`
|
|
108
|
+
5. `references/deployment.md`
|
|
109
|
+
|
|
110
|
+
## How to explain Ash well
|
|
111
|
+
|
|
112
|
+
- lead with how to use Ash, not how Ash is implemented
|
|
113
|
+
- start with the authored filesystem shape and the smallest working path
|
|
114
|
+
- explain when to use each authored slot and show the file path where it lives
|
|
115
|
+
- use one minimal example before edge cases
|
|
116
|
+
- explain that skills are discovered first and loaded through the framework-owned `load_skill` tool
|
|
117
|
+
- explain current boundaries such as root-only `schedules/` when relevant
|
|
118
|
+
- mention the package name is `experimental-ash` while the framework and CLI are called Ash and `ash`
|
|
119
|
+
- note that route auth lives on channels and that `agent.ts` no longer owns it
|
|
120
|
+
- for Slack or custom channel examples, explain the two-step context pattern: `onDeliver()` writes
|
|
121
|
+
durable keys, then `static readonly contextProviders = [...]` rebuilds live per-step values
|
|
122
|
+
- for Slack UI interactions, explain that `handleInteraction(ctx, interaction)` is the subclass hook
|
|
123
|
+
for no-wake `block_actions`, `editMessage(messageTs, renderable)` edits messages inline,
|
|
124
|
+
`getSlackThread()` exposes thread reads/posts, and `SlackRenderable` is the authored output format
|
|
125
|
+
- point people to packaged references instead of assuming repo docs are available
|
|
126
|
+
|
|
127
|
+
Prefer feature-first framing like:
|
|
128
|
+
|
|
129
|
+
- "Use a tool when you need typed executable logic."
|
|
130
|
+
- "Use a sandbox when the model needs an isolated shell environment."
|
|
131
|
+
- "Use a skill when you want optional procedure guidance without bloating every turn."
|
|
132
|
+
|
|
133
|
+
Avoid starting with compiler, discovery, runtime, or harness internals unless the task truly requires them.
|
|
134
|
+
|
|
135
|
+
## Bundled scripts
|
|
136
|
+
|
|
137
|
+
Use these packaged scripts when helpful:
|
|
138
|
+
|
|
139
|
+
- `scripts/bootstrap-from-npm.sh` - scaffold a new Ash app from npm
|
|
140
|
+
- `scripts/add-to-existing-project.sh` - add Ash to an existing app
|
|
141
|
+
- `scripts/verify-local-agent.sh` - reminder of the common local verification commands
|
|
142
|
+
|
|
143
|
+
## Build, dev, and deployment expectations
|
|
144
|
+
|
|
145
|
+
- `ash info` validates the authored surface and inspects the resolved app contract.
|
|
146
|
+
- `ash build` compiles artifacts and builds the runtime host output.
|
|
147
|
+
- `ash dev` runs the local host and interactive REPL.
|
|
148
|
+
- stable runtime routes include `GET /.well-known/ash/v1/health`, `POST /.well-known/ash/v1/message`, and `GET /.well-known/ash/v1/runs/:runId/stream`
|
|
149
|
+
- channel webhooks follow `POST /.well-known/ash/v1/channels/<channelId>/webhook` when channels are configured
|
|
150
|
+
- recommend local development first, then Vercel deployment when shared durable hosting matters
|
|
151
|
+
|
|
152
|
+
## Supporting skills
|
|
153
|
+
|
|
154
|
+
When public Ash work touches adjacent systems, also load the relevant specialist skills:
|
|
155
|
+
|
|
156
|
+
- `ash-framework` for compiler, runtime, discovery, or artifact internals
|
|
157
|
+
- `ai-sdk` for AI SDK APIs, tool calling, and provider integration details
|
|
158
|
+
- `workflow` for durable orchestration behavior and step-boundary decisions
|
|
159
|
+
|
|
160
|
+
For deployment-heavy tasks, it can also help to install Vercel-maintained skills with `npx skills`
|
|
161
|
+
so the agent can pull in current deployment guidance.
|
|
162
|
+
|
|
163
|
+
## Completion checklist
|
|
164
|
+
|
|
165
|
+
- keep the answer user-facing and task-oriented
|
|
166
|
+
- if public behavior changes, update public docs too
|
|
167
|
+
- prefer packaged references and scripts over repo-only links
|
|
168
|
+
- run the expected quality gates before considering the work done
|
|
169
|
+
- ensure public API changes are documented and covered by tests
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Deployment Reference
|
|
2
|
+
|
|
3
|
+
Recommended posture:
|
|
4
|
+
|
|
5
|
+
1. develop locally
|
|
6
|
+
2. validate with build and checks
|
|
7
|
+
3. deploy to Vercel when you need shared durable hosting
|
|
8
|
+
|
|
9
|
+
## Common deployment flow
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
vercel login
|
|
13
|
+
vercel link
|
|
14
|
+
pnpm build
|
|
15
|
+
vercel
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Production deploy:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
vercel --prod
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Verify a deployment
|
|
25
|
+
|
|
26
|
+
- health route responds
|
|
27
|
+
- message route returns a `runId`
|
|
28
|
+
- run stream returns NDJSON lifecycle events
|
|
29
|
+
- any configured channel auth still succeeds in production
|
|
30
|
+
|
|
31
|
+
## Optional remote REPL
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ash dev https://<deployment-url>
|
|
35
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Getting Started Reference
|
|
2
|
+
|
|
3
|
+
Ash is a filesystem-first framework for durable backend agents.
|
|
4
|
+
|
|
5
|
+
## Install from npm
|
|
6
|
+
|
|
7
|
+
The framework is called Ash, the published npm package is `experimental-ash`,
|
|
8
|
+
and the scaffolder package is `create-experimental-ash-agent`.
|
|
9
|
+
|
|
10
|
+
Guided setup for a human (the wizard asks for each decision):
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm create experimental-ash-agent -i
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
When an AI agent sets Ash up on the user's behalf, the create flow is **headless
|
|
17
|
+
by default** — it takes flags (at minimum `<name>` and `--model`) and bails with
|
|
18
|
+
`--help` rather than prompting. Don't improvise it: follow the executable
|
|
19
|
+
**Onboarding** skill, which encodes model, channels (web/Slack), provisioning,
|
|
20
|
+
deploy, and the browser/OAuth handoffs:
|
|
21
|
+
|
|
22
|
+
- repo: `docs/public/onboarding.md`
|
|
23
|
+
- Markdown: https://ash.labs.vercel.dev/llms.mdx/onboarding
|
|
24
|
+
|
|
25
|
+
Slack is not a headless create channel. Scaffold/provision headlessly with
|
|
26
|
+
`--channels web`, then add Slack from the project directory with the interactive
|
|
27
|
+
channel setup:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ash channels add slack
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
That setup uses Vercel Connect under the hood:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
vercel connect create slack --triggers --name <name>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Add Ash to an existing app instead:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm add -D experimental-ash
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Smallest working path
|
|
46
|
+
|
|
47
|
+
1. scaffold or create a project
|
|
48
|
+
2. add `agent/instructions.md`
|
|
49
|
+
3. add `agent/agent.ts`
|
|
50
|
+
4. add one tool if runtime behavior is needed
|
|
51
|
+
5. run `pnpm dev`
|
|
52
|
+
|
|
53
|
+
## Important naming note
|
|
54
|
+
|
|
55
|
+
- framework name: Ash
|
|
56
|
+
- npm package name: `experimental-ash`
|
|
57
|
+
- scaffolder package: `create-experimental-ash-agent`
|
|
58
|
+
- CLI name: `ash`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Project Layout Reference
|
|
2
|
+
|
|
3
|
+
Recommended layout:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
my-agent/
|
|
7
|
+
├── package.json
|
|
8
|
+
├── tsconfig.json
|
|
9
|
+
└── agent/
|
|
10
|
+
├── agent.ts
|
|
11
|
+
├── instructions.md
|
|
12
|
+
├── skills/
|
|
13
|
+
├── lib/
|
|
14
|
+
├── sandbox/
|
|
15
|
+
├── tools/
|
|
16
|
+
├── channels/
|
|
17
|
+
├── schedules/
|
|
18
|
+
└── subagents/
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Slot guide
|
|
22
|
+
|
|
23
|
+
- `instructions.md` - base instructions prompt (the legacy `system.md` slot still works with a deprecation warning)
|
|
24
|
+
- `skills/` - on-demand procedures
|
|
25
|
+
- `tools/` - typed executable integrations
|
|
26
|
+
- `channels/` - HTTP or messaging entrypoints; `onDeliver()` writes durable context and static
|
|
27
|
+
`contextProviders` rebuild live step-local values when needed; Slack channels can override
|
|
28
|
+
`handleInteraction(...)` for no-wake UI actions
|
|
29
|
+
- `sandbox/` - the agent's single sandbox; optional `sandbox.ts` override and optional
|
|
30
|
+
`workspace/` seed files
|
|
31
|
+
- `subagents/` - specialist child agents (each carries its own independent `sandbox/`)
|
|
32
|
+
- `schedules/` - recurring jobs
|
|
33
|
+
- `agent.ts` - additive runtime config for model, name, metadata, build, compaction, and workspace
|
|
34
|
+
|
|
35
|
+
Prefer the nested `agent/` layout for new apps.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Runtime Model Reference
|
|
2
|
+
|
|
3
|
+
Key runtime ideas for app authors:
|
|
4
|
+
|
|
5
|
+
- `ash info` resolves and validates the authored surface
|
|
6
|
+
- `ash build` compiles artifacts and host output
|
|
7
|
+
- `ash dev` starts local development and the REPL
|
|
8
|
+
- `POST /.well-known/ash/v1/message` starts or resumes a run
|
|
9
|
+
- `GET /.well-known/ash/v1/runs/:runId/stream` streams lifecycle events
|
|
10
|
+
|
|
11
|
+
Important mental model:
|
|
12
|
+
|
|
13
|
+
- message execution is durable
|
|
14
|
+
- follow-up turns can resume the same run
|
|
15
|
+
- tools execute inside framework-owned runtime wrappers
|
|
16
|
+
- subagents run as child runs
|
|
17
|
+
- channels own auth, delivery policy, and per-turn context seeding
|
|
18
|
+
- `onDeliver()` can write durable serializable context before the step runs
|
|
19
|
+
- channel classes can declare `static readonly contextProviders = [...]` to rebuild live
|
|
20
|
+
non-serializable step-local values after `onDeliver()`
|
|
21
|
+
- Slack channels handle custom `block_actions` inline via `handleInteraction(ctx, interaction)` and
|
|
22
|
+
use `getSlackThread()` / `editMessage(messageTs, renderable)` for Slack-native reads and updates
|
|
23
|
+
- tools and other authored step code read those values through unified context helpers such as
|
|
24
|
+
`requireContext(...)`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Skills Reference
|
|
2
|
+
|
|
3
|
+
Skills are Ash's on-demand procedure layer.
|
|
4
|
+
|
|
5
|
+
## How skills work
|
|
6
|
+
|
|
7
|
+
1. Ash discovers skills under `skills/`.
|
|
8
|
+
2. The runtime advertises available skills to the model.
|
|
9
|
+
3. The runtime provides a framework-owned `load_skill` tool.
|
|
10
|
+
4. When the model activates a skill, that skill's instructions join the active turn context.
|
|
11
|
+
|
|
12
|
+
## Rules that matter
|
|
13
|
+
|
|
14
|
+
- flat skills can be simple markdown files under `skills/*.md`
|
|
15
|
+
- packaged skills live under `skills/<name>/SKILL.md`
|
|
16
|
+
- packaged `SKILL.md` files must include `name` and `description`
|
|
17
|
+
- tools remain visible whether or not a skill is activated
|
|
18
|
+
- the legacy `allowed-tools` field is not supported
|
|
19
|
+
- skills are loaded through the framework-owned `load_skill` tool
|
|
20
|
+
|
|
21
|
+
## When to use a skill
|
|
22
|
+
|
|
23
|
+
Use a skill for optional procedures, call-routing guidance, and repeatable workflows that should not
|
|
24
|
+
inflate every turn.
|
|
25
|
+
|
|
26
|
+
Do not use a skill for always-on identity or typed execution.
|