dappily-agent-kit 0.4.0 → 0.5.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.
Files changed (2) hide show
  1. package/README.md +48 -14
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # 🦞 Dappily Agent Kit
2
2
 
3
- **AI agent toolkit for Hedera 15 actions + self-forging action generator.**
3
+ **Type what you want. Dappily safely compiles it into a verified Hedera action.**
4
4
 
5
- Give any AI agent the ability to interact with the Hedera network. Define actions as JSON specs, generate working TypeScript automatically.
5
+ 15 testnet-verified actions + an AI-powered action synthesis pipeline. Describe a Hedera action in plain English → the system generates a validated spec → produces type-safe TypeScript → compiles it → verifies it on testnet → promotes it to your codebase. The AI never writes code. It fills a constrained form. Everything else is deterministic.
6
6
 
7
- ## What's New in 0.3.0: The Forge
7
+ ## What's New in 0.5.0: The Architect
8
8
 
9
- The kit now includes a **deterministic action generator**. Write a JSON spec → get a working, type-safe Hedera action with zero manual code.
9
+ The Forge now includes an **AI spec architect**. Describe what you want in English → get a testnet-verified Hedera action.
10
+
11
+ ```bash
12
+ # Describe what you want
13
+ npx ts-node src/forge/architect/specCommand.ts "create a token called DEMO with 1M supply"
14
+
15
+ # → LLM picks actionKind: create_token
16
+ # → Zod validates the plan
17
+ # → Deterministic spec v4 generated
18
+ # → Ready for sandbox + promote
19
+ ```
20
+
21
+ The LLM never sees the Hedera SDK. It picks from 15 known action lanes and identifies inputs. Everything structural comes from testnet-proven reference specs.
10
22
 
11
23
  ```typescript
12
24
  import { validateSpec, generateAction } from "dappily-agent-kit";
@@ -81,17 +93,19 @@ Every action returns:
81
93
  { ok: false, error: "INSUFFICIENT_PAYER_BALANCE", details: "..." }
82
94
  ```
83
95
 
84
- ## The Forge: Self-Forging Actions
96
+ ## The Forge: AI-Constrained Action Synthesis
85
97
 
86
- The Forge is a deterministic code generator that turns JSON specs into working Hedera actions.
98
+ The Forge is a pipeline that turns plain English into verified Hedera actions.
87
99
 
88
100
  ### How It Works
89
101
 
90
- 1. **Spec** — A JSON file describing the action: inputs, SDK methods, transforms, error maps
91
- 2. **Validate** — Zod schema ensures the spec is machine-correct
92
- 3. **Generate** — Deterministic template fill produces TypeScript code
93
- 4. **Compile** — `tsc --strict` verifies type safety
94
- 5. **Test** — Run against Hedera testnet to verify real execution
102
+ 1. **Describe** — Tell the architect what you want in English
103
+ 2. **Plan** — LLM produces an ActionPlan (Zod-validated, safe-set gated)
104
+ 3. **Spec** — Deterministic conversion to ActionSpec v4 from reference templates
105
+ 4. **Generate** — Template fill produces TypeScript code (no AI here)
106
+ 5. **Compile** — `tsc --strict` verifies type safety
107
+ 6. **Test** — Sandbox runs against Hedera testnet
108
+ 7. **Promote** — Passes → copied to `src/actions/` with registry update
95
109
 
96
110
  ### Spec Format (v4)
97
111
 
@@ -121,11 +135,23 @@ The Forge is a deterministic code generator that turns JSON specs into working H
121
135
  ### CLI
122
136
 
123
137
  ```bash
138
+ # AI Architect — describe what you want
139
+ npm run forge:spec -- "send HBAR to another wallet"
140
+ npm run forge:spec -- "create a token called DEMO"
141
+ npm run forge:spec -- "burn an NFT" --i-understand # destructive actions require flag
142
+
124
143
  # Validate all specs
125
144
  npm run forge:validate
126
145
 
127
146
  # Generate an action from a spec
128
147
  npm run forge:generate -- specs/create_token.spec.json output.ts
148
+
149
+ # Sandbox — compile check (default) or full testnet
150
+ npm run forge:sandbox -- path/to/spec.json # dry-run
151
+ npm run forge:sandbox -- path/to/spec.json --live # testnet
152
+
153
+ # Promote — sandbox (live) → copy to actions → update registry
154
+ npm run forge:promote -- path/to/spec.json
129
155
  ```
130
156
 
131
157
  ### 15 Reference Specs
@@ -168,9 +194,16 @@ dappily-agent-kit/
168
194
  │ ├── agent/ # HederaAgentKit
169
195
  │ ├── actions/ # 15 built-in actions
170
196
  │ ├── types/ # ActionResult types
171
- │ └── forge/ # Self-Forging system
197
+ │ └── forge/ # Action Synthesis Pipeline
172
198
  │ ├── actionSpec.ts # Spec schema (Zod, v4)
173
199
  │ ├── generator.ts # Deterministic code generator
200
+ │ ├── sandbox.ts # Compile + testnet verification
201
+ │ ├── promote.ts # Promotion gate (testnet receipt required)
202
+ │ ├── architect/ # AI spec architect
203
+ │ │ ├── specCommand.ts # CLI entry point
204
+ │ │ ├── actionPlan.ts # ActionPlan schema + safe set
205
+ │ │ ├── planToSpec.ts # Deterministic plan → spec converter
206
+ │ │ └── prompt.ts # System prompt + few-shot examples
174
207
  │ └── specs/ # 15 reference specs
175
208
  ├── examples/
176
209
  ├── dist/
@@ -182,8 +215,9 @@ dappily-agent-kit/
182
215
  - [x] 15 actions across HTS, NFT, HCS — all testnet-verified
183
216
  - [x] Deterministic action generator (Forge)
184
217
  - [x] 15 reference specs (v4 format)
185
- - [ ] Sandbox runner (automated generate → compile → testnet)
186
- - [ ] Prompt Spec (LLM generates specs, generator does the rest)
218
+ - [x] Sandbox runner (automated generate → compile → testnet)
219
+ - [x] AI Spec Architect (English ActionPlan Spec Code)
220
+ - [x] Promotion gate (testnet receipt required)
187
221
  - [ ] Mirror Node queries
188
222
  - [ ] Framework adapters (Vercel AI, LangChain, MCP)
189
223
  - [ ] Wallet signing interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dappily-agent-kit",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "AI agent toolkit for Hedera — 15 actions + self-forging action generator. Spec → Code → Testnet.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,6 +19,7 @@
19
19
  "forge:sandbox:batch": "npx ts-node src/forge/sandbox_batch.ts",
20
20
  "forge:sandbox:live": "npx ts-node src/forge/sandbox_batch.ts -- --live",
21
21
  "forge:promote": "npx ts-node src/forge/promote.ts",
22
+ "forge:spec": "npx ts-node src/forge/architect/specCommand.ts",
22
23
  "prepublishOnly": "npm run build"
23
24
  },
24
25
  "keywords": [