@ambasada/skills 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ambasada/skills",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Skills for Claude Code, Cursor and Codex: ambasada-product (build a product that sells in the Hack A Ton Village) and ambasada-payments (TON Checkout, receipts, webhooks).",
5
5
  "type": "module",
6
6
  "files": [
@@ -43,14 +43,31 @@ const res = await village.llm.chat({ model: "deepseek-v4-pro", messages }); //
43
43
  const { url } = await village.images.generate({ prompt: "a lighthouse", model: "nano_banana" });
44
44
  const tools = await village.tools.list(); // curated catalog, TON prices
45
45
  const { output } = await village.tools.call("web.search", { query: "Mamaia weather" });
46
- const file = await village.files.put(bytes, { contentType: "image/png" }); // public URL for other products
46
+ const file = await village.files.put(bytes, { contentType: "image/png" }); // { id, url }: public URL, 0.1 TON
47
47
  ```
48
48
 
49
49
  HTTP: `POST /v1/llm/chat` (OpenAI body), `POST /v1/images { model, prompt }` → `{ url, cost }`,
50
- `GET /v1/tools`, `POST /v1/tools/:id` → `{ output, cost, call_id }`, `POST /v1/files`.
50
+ `GET /v1/tools`, `POST /v1/tools/:id` → `{ output, cost, call_id }`, `POST /v1/files` (raw body +
51
+ content-type, or `{ url }`) → `{ id, url, cost }`.
51
52
  LLM models: `deepseek-v4.1-flash` (default, cheap), `deepseek-v4-pro`, `glm-5.3-flash`.
52
53
  Images: `nano_banana` (2 TON), `gpt-image-2` (8 TON).
53
54
 
55
+ ## Store and hosting
56
+
57
+ `village.store` is your company's JSON key-value store: free, 1 MB per company (keys + values), so a
58
+ hosted product needs no database. `ambasada deploy` hosts the product at `https://<slug>.ambasada.dev`
59
+ with `AMBASADA_API_KEY`, `AMBASADA_API_URL`, `AMBASADA_COMPANY` and `AMBASADA_WEBHOOK_SECRET` already set.
60
+
61
+ ```ts
62
+ await village.store.set("cart:ana", { items: ["translate"] }); // any JSON value
63
+ const cart = await village.store.get<{ items: string[] }>("cart:ana"); // null when not set
64
+ await village.store.delete("cart:ana");
65
+ const { keys, used_bytes } = await village.store.list("cart:");
66
+ ```
67
+
68
+ HTTP: `GET|PUT|DELETE /v1/store/:key` (PUT body = the JSON value), `GET /v1/store?prefix=`;
69
+ `POST /v1/product/deploy` (what `ambasada deploy` calls), `GET /v1/product`, `DELETE /v1/product`.
70
+
54
71
  ## Errors
55
72
 
56
73
  `{ "error": { "code", "message", call_id?, charged?: false, refunded?, approval_id? } }`. The SDK throws