lua-cli 3.20.0 → 3.22.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/dist/api-exports.d.ts +32 -0
- package/dist/api-exports.js +31 -2
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1317 -319
- package/dist/index.js.map +1 -1
- package/docs/CLI_REFERENCE.md +21 -18
- package/docs/README.md +2 -2
- package/docs/api/Templates.md +24 -1
- package/package.json +3 -3
- package/template/package.json +1 -1
package/docs/CLI_REFERENCE.md
CHANGED
|
@@ -587,39 +587,42 @@ $ lua channels list
|
|
|
587
587
|
|
|
588
588
|
## Marketplace
|
|
589
589
|
|
|
590
|
-
### `lua marketplace`
|
|
590
|
+
### `lua marketplace [noun] [action]`
|
|
591
591
|
|
|
592
|
-
|
|
592
|
+
Browse, install, and manage marketplace skills and agent templates.
|
|
593
593
|
|
|
594
594
|
**Usage:**
|
|
595
595
|
```bash
|
|
596
|
-
lua marketplace [options]
|
|
596
|
+
lua marketplace [noun] [action] [options]
|
|
597
597
|
```
|
|
598
598
|
|
|
599
599
|
**Description:**
|
|
600
|
-
|
|
600
|
+
With no arguments, prompts for a domain — **Skills** or **Agent templates** — then hands off to that domain's own interactive picker. Pass `noun` (`skill` or `template`) to skip straight to a domain, and `action` for non-interactive mode.
|
|
601
601
|
|
|
602
|
-
**
|
|
603
|
-
-
|
|
604
|
-
-
|
|
605
|
-
|
|
606
|
-
|
|
602
|
+
**Skill actions** (`lua marketplace skill <action>`):
|
|
603
|
+
- `list`, `publish`, `edit`, `unlist`, `unpublish`, `mine` — manage your own listings
|
|
604
|
+
- `search`, `view`, `install`, `update`, `uninstall`, `installed` — browse and manage skills on this agent
|
|
605
|
+
|
|
606
|
+
**Template actions** (`lua marketplace template <action>`):
|
|
607
|
+
- `create`, `publish`, `view`, `versions` — manage a versioned snapshot of an agent's deployable manifest
|
|
608
|
+
- `install`, `apply`, `status`, `installed`, `uninstall` — install onto one agent, or fleet-apply across many
|
|
607
609
|
|
|
608
610
|
**Example:**
|
|
609
611
|
```bash
|
|
610
612
|
$ lua marketplace
|
|
611
|
-
? What would you like to
|
|
612
|
-
❯
|
|
613
|
-
|
|
613
|
+
? What would you like to browse?
|
|
614
|
+
❯ Skills
|
|
615
|
+
Agent templates
|
|
614
616
|
|
|
615
|
-
?
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
- Communication
|
|
617
|
+
? What would you like to do?
|
|
618
|
+
❯ Browse & search for skills
|
|
619
|
+
Install a skill
|
|
620
|
+
...
|
|
620
621
|
|
|
621
|
-
|
|
622
|
+
$ lua marketplace skill install --marketplace-id xyz --version-id v1 --force
|
|
622
623
|
✅ Skill installed successfully
|
|
624
|
+
|
|
625
|
+
$ lua marketplace template apply --template-id xyz --all-installed --force
|
|
623
626
|
```
|
|
624
627
|
|
|
625
628
|
---
|
package/docs/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# lua-cli v3.
|
|
1
|
+
# lua-cli v3.22.0
|
|
2
2
|
|
|
3
|
-
Welcome to the comprehensive API documentation for lua-cli v3.
|
|
3
|
+
Welcome to the comprehensive API documentation for lua-cli v3.22.0. This guide covers every API, class, and function exported by the package.
|
|
4
4
|
|
|
5
5
|
## 📚 Documentation Index
|
|
6
6
|
|
package/docs/api/Templates.md
CHANGED
|
@@ -107,7 +107,7 @@ Sends a template message to one or more phone numbers.
|
|
|
107
107
|
- `data` (object)
|
|
108
108
|
- `phoneNumbers` (string[]) - Array of phone numbers (E.164 format)
|
|
109
109
|
- `values` (object, optional) - Template variable values
|
|
110
|
-
- `header` (object) - Header variables (key-value pairs). For media-header templates, pass the media URL
|
|
110
|
+
- `header` (object) - Header variables (key-value pairs). For media-header templates, pass the media instead, either as a URL — `image_url` (IMAGE), `video_url` (VIDEO), `document_url` + optional `document_filename` (DOCUMENT), all of which must be publicly reachable over HTTPS — or as a Meta media id: `image_id`, `video_id`, `document_id`. An id takes precedence if both are given.
|
|
111
111
|
- `body` (object) - Body variables (key-value pairs)
|
|
112
112
|
- `buttons` (array) - Button values
|
|
113
113
|
|
|
@@ -154,6 +154,29 @@ const response = await Templates.whatsapp.send(
|
|
|
154
154
|
);
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
+
**Example (media header by Meta media id):**
|
|
158
|
+
```typescript
|
|
159
|
+
// Upload the image to Meta once via POST /{phone-number-id}/media, then reuse the returned
|
|
160
|
+
// media id across every send. WhatsApp skips the per-send URL fetch entirely, which is the
|
|
161
|
+
// cheaper and more reliable option for bulk campaigns.
|
|
162
|
+
//
|
|
163
|
+
// Three constraints: the id must come from POST /{phone-number-id}/media (NOT the Resumable
|
|
164
|
+
// Upload API, whose "h:..." handle is only valid for template creation); it is scoped to the
|
|
165
|
+
// business phone number it was uploaded on, which must be the one behind this channel; and
|
|
166
|
+
// Meta expires media ids after 30 days.
|
|
167
|
+
const response = await Templates.whatsapp.send(
|
|
168
|
+
'channel_123',
|
|
169
|
+
'promo_template',
|
|
170
|
+
{
|
|
171
|
+
phoneNumbers: ['+1234567890'],
|
|
172
|
+
values: {
|
|
173
|
+
header: { image_id: '1234567890123456' },
|
|
174
|
+
body: { discount: '20%' }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
```
|
|
179
|
+
|
|
157
180
|
## Template Structure
|
|
158
181
|
|
|
159
182
|
### Template Components
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"stripe": "^19.2.0",
|
|
110
110
|
"ts-node": "^10.9.2",
|
|
111
111
|
"tsup": "^8.5.1",
|
|
112
|
-
"@lua/shared-sandbox": "0.0.1",
|
|
113
112
|
"@lua/shared-source-sync": "0.0.1",
|
|
114
|
-
"@lua/shared-types": "0.0.1"
|
|
113
|
+
"@lua/shared-types": "0.0.1",
|
|
114
|
+
"@lua/shared-sandbox": "0.0.1"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"clean": "rm -rf dist temp",
|