@lunnoa/client 1.0.0 → 1.2.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/README.md +27 -1
- package/dist/cli.js +832 -62
- package/dist/index.cjs +45 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1092 -932
- package/dist/index.d.ts +1092 -932
- package/dist/index.js +44 -2
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +28 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +741 -630
- package/dist/react.d.ts +741 -630
- package/dist/react.js +28 -0
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/skills/lunnoa-client/SKILL.md +19 -3
- package/skills/lunnoa-solution-design/SKILL.md +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunnoa/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "TypeScript SDK for building applications on top of Lunnoa Automate — typed client for the Public API (agents, workflows, executions, entities, knowledge, queues), SSE agent chat streaming, and deployment-specific codegen",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -54,8 +54,12 @@ Run these before inventing resources or shipping UI code:
|
|
|
54
54
|
browser (SDK throws when `window` exists).
|
|
55
55
|
2. **Codegen** — When building typed UIs, run
|
|
56
56
|
`npx @lunnoa/client codegen` against the deployment first.
|
|
57
|
-
3. **Discover before inventing** —
|
|
58
|
-
`
|
|
57
|
+
3. **Discover before inventing** — prefer the CLI (JSON for agents), then
|
|
58
|
+
the SDK: `npx @lunnoa/client tools list --json --for-agent`,
|
|
59
|
+
`tools get <actionId> --json`, `apps list`, `connections list`,
|
|
60
|
+
`agents|workflows|entity-types|projects list`, `features`.
|
|
61
|
+
SDK equivalents: `workflowApps.list()`, `agents.list`, `workflows.list`,
|
|
62
|
+
`entityTypes.list`, `discovery.enabledFeatures()`.
|
|
59
63
|
Do not invent catalogue action ids.
|
|
60
64
|
4. **Run vs deploy** — Ad-hoc: `actions.run` / `runs.start` /
|
|
61
65
|
`workflows.execute`. Durable shared automation: CLI
|
|
@@ -361,6 +365,18 @@ const result = await lunnoa.runs.start(ping);
|
|
|
361
365
|
// or lunnoa.runs.startAndWait(ping)
|
|
362
366
|
```
|
|
363
367
|
|
|
368
|
+
Discover the catalogue **before** writing `defineAction` (do not guess ids):
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
npx @lunnoa/client tools list --json --for-agent
|
|
372
|
+
npx @lunnoa/client tools search email --json --for-agent
|
|
373
|
+
npx @lunnoa/client tools get http_action_send-request --json
|
|
374
|
+
npx @lunnoa/client connections list --app gmail --json
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
`tools get` returns `inputConfig` / `inputFields` and a `defineAction` sketch.
|
|
378
|
+
`tools list` is compact; use `get` for the schema. `--json` is for coding agents.
|
|
379
|
+
|
|
364
380
|
Deploy to Automate UI (upsert by slug; prefer CLI):
|
|
365
381
|
|
|
366
382
|
```bash
|
|
@@ -510,7 +526,7 @@ emails (capped; not Azure object IDs).
|
|
|
510
526
|
3. Call `discovery.enabledFeatures()` and hide unsupported areas.
|
|
511
527
|
4. Build forms/tables from `attributeSchema` / `customInputConfig` (or the generated types).
|
|
512
528
|
5. Render workflow progress from `executionPath`; handle `NEEDS_INPUT` with `submitInput`.
|
|
513
|
-
6. For single-action calls, use `actions.run`; for linear multi-step, use `runs.start` / `defineWorkflow`. Deploy with `npx @lunnoa/client workflows|agents deploy`. Discover catalogue via `workflowApps.list()
|
|
529
|
+
6. For single-action calls, use `actions.run`; for linear multi-step, use `runs.start` / `defineWorkflow`. Deploy with `npx @lunnoa/client workflows|agents deploy`. Discover catalogue via `npx @lunnoa/client tools list|get|search` (or `workflowApps.list()`).
|
|
514
530
|
7. For Request Approval nodes, use `approvals.inbox` / `approvals.decide` (or `executions.submitApproval`).
|
|
515
531
|
8. Chat: stream via SSE, handle resume (reconnects) and stop, load history from the task.
|
|
516
532
|
9. Handle `LunnoaApiError`: 401 → re-auth; 403 → hide the capability; 429 → back off.
|
|
@@ -63,8 +63,9 @@ interrogation.
|
|
|
63
63
|
### Integrations
|
|
64
64
|
|
|
65
65
|
- Which external systems? Prefer existing catalogue apps (Slack, HTTP, CRM…).
|
|
66
|
-
- Do not invent action ids. Implementation must
|
|
67
|
-
|
|
66
|
+
- Do not invent action ids. Implementation must discover the catalogue for
|
|
67
|
+
this API key (`npx @lunnoa/client tools list --json --for-agent`, then
|
|
68
|
+
`tools get <actionId> --json`, or `workflowApps.list()` / codegen).
|
|
68
69
|
|
|
69
70
|
### Auth for any custom UI
|
|
70
71
|
|
|
@@ -96,8 +97,9 @@ interrogation.
|
|
|
96
97
|
2. **Connections stay on Lunnoa.** Definitions only reference connection ids
|
|
97
98
|
(or omit for sole/default resolution). Never ask the partner to put OAuth
|
|
98
99
|
secrets in their app.
|
|
99
|
-
3. **Do not invent catalogue actions.** Discover with
|
|
100
|
-
|
|
100
|
+
3. **Do not invent catalogue actions.** Discover with
|
|
101
|
+
`npx @lunnoa/client tools list|get|search --json` (or `workflowApps.list()`
|
|
102
|
+
/ codegen). Client `defineAction` binds existing catalogue actions; toolkit
|
|
101
103
|
`createAction` is a different product (in-platform apps).
|
|
102
104
|
4. **Durable vs ephemeral:** experiments → `runs.start`; shared production
|
|
103
105
|
automation → CLI `workflows deploy` / `agents deploy` by slug.
|
|
@@ -131,8 +133,8 @@ can execute. Use this shape:
|
|
|
131
133
|
- Notes: <CORS, BFF, project id, env vars>
|
|
132
134
|
|
|
133
135
|
### Discovery (run first)
|
|
134
|
-
- [ ]
|
|
135
|
-
- [ ] agents
|
|
136
|
+
- [ ] `npx @lunnoa/client tools list --json --for-agent` then `tools get <id>`
|
|
137
|
+
- [ ] agents / workflows / entity-types / projects list — reuse before create
|
|
136
138
|
- [ ] codegen — if building typed entity/workflow accessors
|
|
137
139
|
|
|
138
140
|
### Resources
|
|
@@ -175,7 +177,7 @@ continue in a coding turn with that skill loaded.
|
|
|
175
177
|
action)? Need approvals? Existing HTTP/CRM connections?
|
|
176
178
|
|
|
177
179
|
**You conclude (example):** Pattern A BFF; Agent `order-status` with tools
|
|
178
|
-
`defineAction` for ERP lookup (after `
|
|
180
|
+
`defineAction` for ERP lookup (after `tools list` / `tools get`) + optional
|
|
179
181
|
workflow for staff notifications; UI = chat only; no agent schedule.
|
|
180
182
|
|
|
181
183
|
**You produce** the build brief, then hand off.
|