@stacklink/sdk 0.3.15 → 0.6.2

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 (34) hide show
  1. package/README.md +26 -0
  2. package/compatibility.json +1 -1
  3. package/dist/src/domain/billing-plans.d.ts +827 -0
  4. package/dist/src/domain/billing-plans.d.ts.map +1 -0
  5. package/dist/src/domain/billing-plans.js +893 -0
  6. package/dist/src/domain/billing-plans.js.map +1 -0
  7. package/dist/src/domain/bot-avatar.d.ts +46 -0
  8. package/dist/src/domain/bot-avatar.d.ts.map +1 -0
  9. package/dist/src/domain/bot-avatar.js +436 -0
  10. package/dist/src/domain/bot-avatar.js.map +1 -0
  11. package/dist/src/domain/bot-contract.d.ts +1472 -700
  12. package/dist/src/domain/bot-contract.d.ts.map +1 -1
  13. package/dist/src/domain/bot-contract.js +133 -10
  14. package/dist/src/domain/bot-contract.js.map +1 -1
  15. package/dist/src/domain/memory-contract.d.ts +275 -275
  16. package/dist/src/domain/platform-approval-contract.d.ts +10 -4
  17. package/dist/src/domain/platform-approval-contract.d.ts.map +1 -1
  18. package/dist/src/domain/platform-approval-contract.js.map +1 -1
  19. package/dist/src/domain/provider-branding.d.ts.map +1 -1
  20. package/dist/src/domain/provider-branding.js +3 -0
  21. package/dist/src/domain/provider-branding.js.map +1 -1
  22. package/dist/src/domain/stacklink-meta-tools.d.ts +21 -5
  23. package/dist/src/domain/stacklink-meta-tools.d.ts.map +1 -1
  24. package/dist/src/domain/stacklink-meta-tools.js +73 -45
  25. package/dist/src/domain/stacklink-meta-tools.js.map +1 -1
  26. package/dist/src/domain/workflow-contract.d.ts +24338 -0
  27. package/dist/src/domain/workflow-contract.d.ts.map +1 -0
  28. package/dist/src/domain/workflow-contract.js +95 -0
  29. package/dist/src/domain/workflow-contract.js.map +1 -0
  30. package/dist/src/sdk/index.d.ts +329 -30
  31. package/dist/src/sdk/index.d.ts.map +1 -1
  32. package/dist/src/sdk/index.js +194 -47
  33. package/dist/src/sdk/index.js.map +1 -1
  34. package/package.json +1 -1
package/README.md CHANGED
@@ -72,6 +72,32 @@ console.log(result.output ?? result.finalText);
72
72
 
73
73
  Reuse the returned `conversationId` for the next message. Preserve the last event sequence to resume observation. Published invocations are available through the existing session MCP endpoint using `STACKLINK_BOTS`; no separate server per bot is needed.
74
74
 
75
+ ## Workflows (0.6.2)
76
+
77
+ Use `https://api.stacklink.in` for production.
78
+ Workflow trigger changes now follow draft → publish. `workflows.triggers(id)`
79
+ returns the draft `revision`, draft `triggers`, and active `liveTriggers`.
80
+ Pass `expectedRevision` to `saveTrigger`, or as the third argument to
81
+ `deleteTrigger`. Publish the returned revision to apply the change. A stale
82
+ revision returns 409; saving a trigger no longer activates it immediately.
83
+
84
+ Bot steps, child workflows, For each and Bot attachments accept `"live"` in place
85
+ of a numeric revision/version. New runs resolve live references once and retain
86
+ that setup through waits, retries and every item. Existing numeric pins remain
87
+ supported. Pausing blocks new starts; publishing does not resume a paused workflow.
88
+ The [Workflows guide](https://docs.stacklink.in/docs/workflows) covers definitions,
89
+ permissions, stable job keys and recovery.
90
+
91
+ Embedded authoring uses the same workflow methods. Your backend calls
92
+ `workflows.issueEmbeddedAccess` with the customer and person from its authenticated
93
+ session. The separate `@stacklink/workflow-builder` browser package mounts the
94
+ hosted editor using that one-use access; never send your project key to the browser.
95
+ Use `workflows.withEmbeddedAccess(projectId, accessToken)` for person-scoped lists,
96
+ approvals and analytics, or `workflows.forCustomer(customerId)` for trusted backend
97
+ administration. Customer ownership, assigned approvals and usage visibility are
98
+ enforced by the server. See the [embedded guide](https://docs.stacklink.in/docs/workflows#embed-the-builder-in-your-application)
99
+ for setup, renewal, connections, publishing and the retained Acme Desk example.
100
+
75
101
  ## Shared approvals (0.3.3)
76
102
 
77
103
  `client.approvals` lists and retrieves approvals for an authorized session, submits a permitted decision or customer correction, and observes reconnectable approval events. A project key represents an application; it cannot substitute for a required human company approver. `asCustomer` derives the customer from the authenticated session and still requires a scoped customer grant. Continue observing the original execution after deciding; do not resubmit the action.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sdkVersion": "0.3.15",
3
+ "sdkVersion": "0.6.2",
4
4
  "node": ">=22.0.0",
5
5
  "tested": {
6
6
  "ai": "7.0.31",