@trydreamstate/cli 1.3.11 → 1.3.12

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 (49) hide show
  1. package/agent-plugin/.claude-plugin/plugin.json +1 -1
  2. package/agent-plugin/.codex-plugin/plugin.json +1 -1
  3. package/agent-plugin/skills/crm/SKILL.md +3 -1
  4. package/agent-plugin/skills/diagnostics/SKILL.md +11 -3
  5. package/agent-plugin/skills/dreamstate/SKILL.md +1 -1
  6. package/agent-plugin/skills/facebook-posts/SKILL.md +1 -1
  7. package/agent-plugin/skills/first-win/SKILL.md +1 -1
  8. package/agent-plugin/skills/inbox-replies/SKILL.md +1 -1
  9. package/agent-plugin/skills/instagram-posts/SKILL.md +1 -1
  10. package/agent-plugin/skills/knowledge/SKILL.md +1 -1
  11. package/agent-plugin/skills/linkedin-posts/SKILL.md +1 -1
  12. package/agent-plugin/skills/linkedin-warm-signals/SKILL.md +3 -2
  13. package/agent-plugin/skills/list-building/SKILL.md +14 -2
  14. package/agent-plugin/skills/list-building/incoming-people.md +1 -1
  15. package/agent-plugin/skills/outreach/SKILL.md +3 -3
  16. package/agent-plugin/skills/outreach/enrollment.md +8 -4
  17. package/agent-plugin/skills/outreach/message-copy.md +5 -3
  18. package/agent-plugin/skills/plays/SKILL.md +1 -1
  19. package/agent-plugin/skills/reddit-posts/SKILL.md +1 -1
  20. package/agent-plugin/skills/skill-authoring/SKILL.md +1 -1
  21. package/agent-plugin/skills/social/SKILL.md +4 -2
  22. package/agent-plugin/skills/tiktok-posts/SKILL.md +1 -1
  23. package/agent-plugin/skills/visibility/SKILL.md +1 -1
  24. package/agent-plugin/skills/workflows/SKILL.md +3 -1
  25. package/agent-plugin/skills/worksheet-tidy/SKILL.md +1 -1
  26. package/agent-plugin/skills/writing/SKILL.md +1 -1
  27. package/agent-plugin/skills/x-posts/SKILL.md +1 -1
  28. package/agent-plugin/skills/youtube-posts/SKILL.md +1 -1
  29. package/dist/agentGuidance.generated.json +2 -2
  30. package/dist/client.d.ts +1 -1
  31. package/dist/client.d.ts.map +1 -1
  32. package/dist/client.js +3 -2
  33. package/dist/gatedRun.d.ts +0 -1
  34. package/dist/gatedRun.d.ts.map +1 -1
  35. package/dist/gatedRun.js +2 -2
  36. package/dist/generated/packVerbs.generated.json +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +11 -7
  40. package/dist/installedSkillLinks.d.ts +4 -0
  41. package/dist/installedSkillLinks.d.ts.map +1 -0
  42. package/dist/installedSkillLinks.js +40 -0
  43. package/dist/runWait.d.ts +1 -1
  44. package/dist/runWait.d.ts.map +1 -1
  45. package/dist/runWait.js +18 -11
  46. package/dist/skillInstaller.d.ts +1 -1
  47. package/dist/skillInstaller.d.ts.map +1 -1
  48. package/dist/skillInstaller.js +7 -39
  49. package/package.json +5 -3
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dreamstate",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Dreamstate for AI agents: build workbooks of companies and people, run LinkedIn and email sequences, answer replies, post to LinkedIn and X, and manage your CRM from your coding agent.",
5
5
  "author": {
6
6
  "name": "Dreamstate",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dreamstate",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Dreamstate for AI agents: build workbooks of companies and people, run LinkedIn and email sequences, answer replies, post to LinkedIn and X, and manage your CRM from your coding agent.",
5
5
  "author": {
6
6
  "name": "Dreamstate",
@@ -3,7 +3,7 @@ name: crm
3
3
  description: "Maintain trustworthy customer and company records by separating stable facts, judgement, and time-bound activity; deduplicating only from strong identity evidence; and keeping pipeline tied to recent, evidenced work. Use it when the user needs to create, review, clean up, merge, enrich, or progress relationship records and deals. It does not rebuild source worksheets (list-building does), run outreach (outreach does), or replace a workflow with record cleanup (workflows does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # CRM
9
9
 
@@ -47,6 +47,8 @@ Keeping a CRM in step with the workspace usually has a blueprint: HubSpot, Attio
47
47
  8. **Run weekly hygiene pass.** Read first: review newly created records, suspected duplicate pairs, fields with conflicting or stale evidence, open deals with no activity in 21+ days, deals without next step or owner, and recently changed stages. Fix low-risk, evidence-backed field gaps; show evidence and exact change for merges and consequential stage changes, then act when the user asked or confirms; then read back sampled records and headline counts.
48
48
  9. **Find stale deals in one read.** Read open deals with stale cutoff and continue global pages until complete. Request meaningful activity only, so automated tasks, record creation, field history, and stage events cannot make deal look healthy. Do not read one timeline per deal. For every stale deal, prepare one follow-up task with deal link, owner, due date, and priority. Create them as draft tasks so nobody is notified until the user reviews them; reopening a draft makes it open work and notifies the assignee.
49
49
 
50
+ 10. **Use billing and product truth from Stripe and PostHog.** Whether a company is a customer, its plan, MRR and lifetime value come from Stripe through `provider.stripe.customer_lookup`, never from a guess or an enrichment. Use it before creating a deal (an existing customer is expansion, not new business) and before any cold list or sequence touches a company (customers are excluded unless the user asked for an expansion play). MRR and lifetime value total only within one currency; a company that pays in several currencies reads currency `mixed` with per-currency totals, so never add those numbers together. Product usage, such as last seen and recent event counts, comes from `provider.posthog.person_lookup` and is evidence for a stage change or a next step, not a field to overwrite human judgement. Stripe data is read-only here: nothing in this skill changes a customer, subscription or person in Stripe or PostHog.
51
+
50
52
  ## Credit posture and sensitive effects
51
53
 
52
54
  Reads, duplicate review, and timeline inspection are free and come before enrichment. For paid enrichment, state target records, fields sought, expected coverage, credit estimate, and how result will be reviewed, then run it under the paid-run consent rule. Do not enrich records merely to fill blanks.
@@ -3,7 +3,7 @@ name: diagnostics
3
3
  description: "Answer one operational question with evidence, such as where a cell value came from or why it is empty, which runs failed and which are safe to retry, why a sequence has not sent, or where credits went and how to spend less. Use it when something in a worksheet, sequence or workflow looks wrong, stuck, missing or expensive. It reads before it changes anything. It does not redesign lists, sequences or workflows, or tidy worksheet structure (worksheet-tidy does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Diagnostics
9
9
 
@@ -33,7 +33,7 @@ Read first, change second. Pending, queued, paced, capped and unknown are not fa
33
33
  | Where did this value come from, or why is this cell empty? | The cell, its column, the run that settled it |
34
34
  | Which rows or runs failed, and which are safe to retry? | Run history, then one run's events |
35
35
  | Why has this sequence not sent? | Sequence state, enrollment, sender, sending hours, caps |
36
- | Why did this worksheet cost so much, and how do I spend less? | `tables.worksheet.credit_summary`, then individual charged runs |
36
+ | Why did this worksheet cost so much, and how do I spend less? | The worksheet credit summary, then individual charged runs |
37
37
 
38
38
  ## Evidence order
39
39
 
@@ -46,7 +46,7 @@ Read first, change second. Pending, queued, paced, capped and unknown are not fa
46
46
 
47
47
  Search the tool for the read you need. The search returns runnable schemas for its top hits; read any other ids together in one tools_get, then run.
48
48
 
49
- For worksheet costs, read `tables.worksheet.credit_summary` before drilling into
49
+ For worksheet costs, discover and read the worksheet credit summary before drilling into
50
50
  runs. Its decimal total and per-column breakdown cover the entire worksheet,
51
51
  including historical executions. Check completeness and pending attempts: a
52
52
  partial recorded total does not prove the remaining work was free. Current cell
@@ -78,3 +78,11 @@ values and the visible grid window do not represent cumulative spend.
78
78
  Done means checked, not built. Before you report, read back everything you made or changed, and run, test or preview it where that is offered; publish or send only when the user asked. An empty, failed or wrong result means an input or setting is wrong: find which from the error or the output, correct it and check again, until it is right or a real blocker stops it. Report what you checked and what it showed.
79
79
 
80
80
  Paid and outward runs follow the paid-run consent rule.
81
+
82
+ ## Sequence evidence
83
+
84
+ Read audience matches, eligible, duplicates, blocked rows, staged candidates, admitted people and actual sends as different measures. An unavailable count is not zero. An incomplete row sample or analytics read cannot establish a full-population total. A failed analytics request needs an explicit error and retry; cached totals need a freshness marker.
85
+
86
+ Separate invitation requests from DMs waiting for acceptance. A waiting-connection timestamp is the acceptance deadline, not an earliest send time: acceptance can wake the DM sooner. Distinguish a schedule window, a daily or rolling-week limit, reservations owned by existing obligations, a provider restriction, missing identity, a disconnected sender and a service failure. Future invitation commitments can reserve weekly room even if they use no daily room today. Preserve configured limits.
87
+
88
+ For a person, read the current step, pinned source and version, pause/stop reason, next check or deadline, attempt and receipt evidence before suggesting a repair. Unknown delivery requires reconciliation; proven absence is a different outcome. Resume only the system pause that the evidence allows to recover. Never resume manual stops, replies, unsubscribes or other recipient stops. Archived personalization sources and OOO without a reliable structured return date require visible review. Do not infer return dates from keywords or elapsed time.
@@ -21,6 +21,6 @@ Lists, finds, enrichments and signals happen only inside a workbook worksheet. R
21
21
 
22
22
  For writes, credit spend or external effects: dry_run first, review the row count and credit estimate, then run live with the quote_hash that dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. Supply max_rows or max_live_sends only when the fetched capability schema declares them; when an external send accepts max_live_sends, cover at least the dry_run recipient_count. Sequence lifecycle and enrollment calls have no lifetime send ceiling. A quote returned by a refused live call is only a price, never a confirmation.
23
23
 
24
- A paid run above the server's row or provider-spend limit, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply.
24
+ A paid run above the server's row or provider-spend limit, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply.
25
25
 
26
26
  `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices.
@@ -3,7 +3,7 @@ name: facebook-posts
3
3
  description: "Write and revise Facebook posts: conversational copy up to 63,206 characters, and where a link sits so the opening still reads as a person. Use it for the copy of any post going to Facebook. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Facebook posts
9
9
 
@@ -3,7 +3,7 @@ name: first-win
3
3
  description: "Run a short first session in a new workspace that confirms the user and workspace, builds or reads Company Context, creates one small sampled worksheet from the ideal customer, and suggests three next plays. Use it on a fresh workspace, when the user says \"get me started\", or when nothing has been built yet. It does not launch outreach, publish content or run anything at scale."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # First Win
9
9
 
@@ -3,7 +3,7 @@ name: inbox-replies
3
3
  description: "Triage and answer existing LinkedIn and email conversations, classify the latest inbound message, confirm the sequence stopped, and draft a reply grounded in the real thread and Company Context. Use it when someone replied, when the user wants to work through unanswered threads, or when a positive reply should move toward a meeting. It does not start new conversations with people who have not been contacted (the outreach skill does) or build automated reply handling (the workflows skill does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Inbox Replies
9
9
 
@@ -3,7 +3,7 @@ name: instagram-posts
3
3
  description: "Write and revise Instagram captions, carousel outlines, and Reels scripts: the first 125 characters, line breaks, 3 to 8 hashtags, and a comment, save, or link-in-bio close. Use it for the copy of any post going to Instagram. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Instagram posts
9
9
 
@@ -3,7 +3,7 @@ name: knowledge
3
3
  description: "Read and update what the workspace knows, across the knowledge digest, the workspace wiki, cited claims, and conflict-aware revisions."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Knowledge
9
9
 
@@ -3,7 +3,7 @@ name: linkedin-posts
3
3
  description: "Write and revise LinkedIn posts that earn the click and the reply: the 210 character hook, structure and formatting, length by post type (story, list, case study, belief disruption, short, paragraph), specificity, the CTA close, and phrases to avoid. Use it for the copy of any post going to LinkedIn. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # LinkedIn posts
9
9
 
@@ -3,7 +3,7 @@ name: linkedin-warm-signals
3
3
  description: "Warm people come from worksheet sources such as post engagers, followers, profile viewers and website visits. Judge worksheet rows against Required criteria, then build a capped warm sequence while protecting sender account. Use when user wants leads from LinkedIn presence or network-first motion. Does not cover cold lists from search (list-building does), writing posts (social does) or replying in existing threads (inbox-replies does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # LinkedIn Warm Signals
9
9
 
@@ -31,9 +31,10 @@ Signals land in a workbook worksheet as a row source, with criterion columns mar
31
31
  - Engagers on the account's own posts: highest intent, reference the post.
32
32
  - Profile viewers and new followers: warm but softer; lead with relevance.
33
33
  - Engagers on a competitor or peer post: public research, on its own worksheet.
34
+ - Product users from a PostHog cohort, or trial and recently active Stripe customers: the warmest signal of all, because they already use the product. Build them with `source.posthog_cohort` or `source.stripe_customers` (list-building skill) and name the product action, never the tracking.
34
35
  - Sort pasted LinkedIn URLs first: person profiles (/in/) and company pages (/company/) are different sources. Build one source per kind on its own worksheet and say which went where.
35
36
  3. **Build the worksheet** (list-building skill). One signal source per worksheet. Columns: the signal (which post, what they said), a column.ai_fit_score column against the ICP with the supporting quote as a Required criterion column (column.ai_fit_score is the way to score fit, ICP, or lead qualification, and it is the cheaper option; do not add a generic AI column for that score), then contact data gated on the Required criteria.
36
- 4. **Run a sample and read the rows.** Exclude the author's team, existing customers and open conversations with a Required criterion column and run conditions, not by hand.
37
+ 4. **Run a sample and read the rows.** Exclude the author's team, existing customers and open conversations with a Required criterion column and run conditions, not by hand. Decide "existing customer" with a `provider.stripe.customer_lookup` column on the email or company domain, not by name.
37
38
  5. **Draft the warm sequence** (outreach skill). The first LinkedIn message names the real signal in one line, adds one relevant point, and asks a light question. Three steps or fewer; warm people do not need a long cadence.
38
39
  6. **Show and start.** Show the final copy of each step, audience count, sender and expected pace in days, then enroll and start.
39
40
  7. **Recurring, if asked.** A workflow adds new signal rows on a schedule and enrolls those that pass every Required criterion.
@@ -3,7 +3,7 @@ name: list-building
3
3
  description: "Build a workbook of companies or people: as few sources as possible, people at companies through the employees enrichment fanned out to a second worksheet, one column per criterion marked Required or Nice to have, run conditions that skip rows already failing, an optional score, sample then scale, and honest coverage."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Workbook building
9
9
 
@@ -35,7 +35,19 @@ When asking for a blueprint recommendation, pass `required_filters` for every us
35
35
 
36
36
  For people engaging with competitor company posts, `signal-engaged-company-posts` exact match. Prefer it. It sets `max_posts_per_company=2`, `max_engagers_per_post=25`, `sample_size=25`, then excludes employees of selected companies in first paid qualification. Attach the company engager source directly only when a custom workbook is needed: send `company_urls` as literal string array, keep same caps, add employee-exclusion qualification before outreach.
37
37
 
38
- For incoming messages or booked meetings, read [Incoming people sources](incoming-people.md). Use `signal-received-dm` for Received DM plus AI fit score, or `signal-meeting-booked` for Meeting booked plus profile enrichment. Each installs exactly one people worksheet and two columns. Qualification follows the user's rubric, which may describe sales pitches, support requests, or another purpose. These sources do not require the general prospecting enrichment and email chain below.
38
+ For incoming messages or booked meetings, read Incoming people sources (`incoming-people.md`). Use `signal-received-dm` for Received DM plus AI fit score, or `signal-meeting-booked` for Meeting booked plus profile enrichment. Each installs exactly one people worksheet and two columns. Qualification follows the user's rubric, which may describe sales pitches, support requests, or another purpose. These sources do not require the general prospecting enrichment and email chain below.
39
+
40
+ ## Customer and product sources (Stripe, PostHog)
41
+
42
+ Your own customers and product users are lists too. Use them when the request is about expansion, upsell, win-back, product-qualified leads, or keeping customers out of a cold list.
43
+
44
+ - **Stripe customers.** `source.stripe_customers` lands one person row per Stripe customer from the workspace's Stripe copy, keyed by `stripe_customer_id`. Its filters are `statuses` (`active`, `trialing`, `past_due`, `canceled`, `unpaid`), `price_ids`, `plan_names`, `created_after`, `created_before`, `min_mrr` and `max_rows`; put every billing criterion there, not in a later column. Outputs include plan, subscription status, monthly MRR, lifetime value, first paid date, trial end and delinquent. Use it for expansion lists (active on a lower plan, MRR above a floor), trial conversion (trialing, trial ending soon) and win-back (canceled).
45
+ - **Stripe lookup column.** `provider.stripe.customer_lookup` answers "is this row already a customer" from an email or company domain column, with `is_customer`, plan, status, MRR, lifetime value, first paid and canceled dates. Add it to any cold list as an exclusion: a free column whose run condition is that the email or domain is set, then make `is_customer` `neq` true a Required criterion on the first paid column and on enrollment. A free-mail domain never matches a company.
46
+ - **PostHog cohort.** `source.posthog_cohort` lands the people in one PostHog cohort, keyed by `distinct_id`, with `signal_source_id`, `cohort_id` and `max_rows`. List the project's cohorts with `integrations.posthog.cohorts_list` and pick by name; never guess a cohort id. Use it for product-qualified lists when the cohort already states the behaviour the user means.
47
+ - **PostHog lookup column.** `provider.posthog.person_lookup` adds last seen, 30 day event count, top events, plan and properties to rows that have an email or company domain. Use its values in run conditions and in the fit score rubric as usage evidence (active in the last 7 days, used a named feature). For a one-off question about product data that no column answers, `integrations.posthog.query_run` reads it without changing the worksheet.
48
+ - Both sources are monitor sources: after the first landing, new Stripe or PostHog events for a person update that person's row in place, and its Stripe and PostHog lookup cells refresh. Paid columns on the row still follow their own run conditions.
49
+ - Money: MRR and lifetime value are in major units and monthly. When a customer or domain pays in more than one currency, MRR and lifetime value are empty, currency reads `mixed`, and `revenue_by_currency_json` holds the totals per currency. Treat `mixed` as unsure, never as zero.
50
+ - A Stripe or PostHog source or column needs that account connected in the integrations pack. A missing connection blocks running, never building.
39
51
 
40
52
  ## Free preview before build, complete chain before paid sample
41
53
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Choose the focused workbook
4
4
 
5
- - `signal-received-dm`: one Received DMs people worksheet, one `source.dm_received` source column, and one `column.ai_fit_score` column. Ask for the receiving account, qualification rubric, and minimum score only when they are not already known. The rubric is editable natural language. A high score means the message matches those criteria; it need not mean buying intent or ideal customer fit.
5
+ - `signal-received-dm`: one Received DMs people worksheet, one `source.dm_received` source column, and one `column.ai_fit_score` column. Ask which receiving accounts (one or more), qualification rubric, and minimum score only when they are not already known. `account_ids` accepts one or more receiving accounts. Event sources add every matching event, so `run_policy.exclude` and `limit_results` do not apply. The rubric is editable natural language. A high score means the message matches those criteria; it need not mean buying intent or ideal customer fit.
6
6
  - `signal-meeting-booked`: one Booked meetings people worksheet, one `source.meeting_booked` source column, and one `provider.enrich.linkedin.profile` column. Configure provider, connection, selected or all accessible event types, then optional per-event identity question mappings. Profile enrichment reads the current row's scalar `linkedin_url` and skips a missing or invalid URL.
7
7
 
8
8
  Install with empty answers when configuration is not available. Installation creates concrete source core outputs with disabled listeners and disabled paid columns, calls no provider, and spends nothing. Read the installed source and column receipts to identify what remains to configure. Source listening and downstream paid auto-update are separate settings; use the paid-run consent rule when enabling paid work.
@@ -3,7 +3,7 @@ name: outreach
3
3
  description: "Build a multi-channel sequence and enroll a workbook into it: preview one real message first, fixed scaffold with small personalized slots, channel steps with the wait inside each step, column filters decide who enrolls, paced sends."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Sequence building
9
9
 
@@ -27,7 +27,7 @@ When user says delete, delete permanently. Show impact first unless user already
27
27
 
28
28
  - Build a new sequence for each request. "Enroll in a sequence" means a new one. Use or edit an existing sequence only when the user names it or asks to change it; never ask the user to pick an existing sequence.
29
29
  - Read the ideal customer profile, the product and offer pages, and the message writing notes before asking anything. The value proposition comes from those pages; ask for it only when none of them states it. Ask one question only when a required fact is missing, then build.
30
- - Before writing any sequence copy, load the knowledge skill and read saved Company Context pages that govern it: Product Information and Offer for claims, Ideal Customer for audience fit, and Tone of Voice for register. Name pages used. Pass returned document ids as `context_document_ids` and returned revision ids as `context_revision_ids` on the create-from-worksheet call, so the draft receipt proves exact context lineage. Never reuse another workspace's product copy. If Company Context has no applicable page, say so and ask for the missing fact before writing prose.
30
+ - Before writing any sequence copy, load the knowledge skill and read saved Company Context pages that govern it: Product Information and Offer for claims, Ideal Customer for audience fit, and Tone of Voice for register. Name pages used. Pass returned document ids as `context_document_ids` and returned revision ids as `context_revision_ids` on the create-from-worksheet or blueprint-install call, then read the saved definition to verify those exact ids, so the draft proves context lineage. Never reuse another workspace's product copy. If Company Context has no applicable page, say so and ask for the missing fact before writing prose.
31
31
  - The kind of sequence is a required fact. Unless the request already says it, read selected saved view's structural channel reachability, then ask once, in one question, which reachable channel and goal (a reply, a meeting, a demo). Offer only channels with reachable rows and recommend channel most rows support.
32
32
  - Use only channels the rows can be reached on. A channel step needs the field it sends to; when that field is missing, find it first with an enrichment.
33
33
 
@@ -77,7 +77,7 @@ When the user asks to enroll a list:
77
77
  ## State
78
78
 
79
79
  - Building never waits on connections or rows. Build, preview, validate and bind anyway, then say what to connect or what will make rows land.
80
- - Publishing and enrolling never send. After enrolling, leave the sequence published and never started unless the user explicitly says start; that is paused. Staged contacts on an unstarted sequence are success. `max_live_sends` is a param of the external-send sequence capabilities (activating an audience, resuming a sequence, and the rest of that family), sent inside `params`, not a gating input of `tools_run`. Sending follows the paid-run consent rule.
80
+ - Publishing and enrolling never send. After enrolling, publish if readiness passes and leave it unstarted unless the user explicitly says start. An unstarted published sequence is distinct from a manual pause. Staged contacts on an unstarted sequence are success. `max_live_sends` is a param of the external-send sequence capabilities (activating an audience, resuming a sequence, and the rest of that family), sent inside `params`, not a gating input of `tools_run`. Sending follows the paid-run consent rule.
81
81
  - Drafted, validated, published, enrolled, started, delivered and replied are separate facts; report only what the last result proves. After an unknown outcome, read state before retrying, and never enroll or send twice.
82
82
 
83
83
  ## Done
@@ -2,11 +2,11 @@
2
2
 
3
3
  Default for "enroll this list in a sequence": `sequence.sequences.create_from_worksheet`.
4
4
 
5
- Order of work: preview one real personalized message in chat, dry run, then build the sequence with the worksheet bound as its audience. Building from the worksheet already validates, binds the trigger and stages the rows, so never enroll the same rows again after it. Then publish. Start only when the user explicitly says start.
5
+ Order of work: preview one real personalized message in chat, dry run, then build the sequence with the worksheet bound as its audience. Building from the worksheet already validates, binds the trigger and stages the rows, so never enroll the same rows again after it. Publish when the returned readiness checks pass. Start only when the user explicitly says start.
6
6
 
7
- When the user asked to enroll, do not stop at the draft: publishing is part of enrolling and sends nothing, so build from the worksheet and publish in the same turn, then report that nothing was sent. A published sequence that was never started sends nothing; that is the paused state the user asked for.
7
+ When the user asked to enroll, build and stage the requested audience, then publish when readiness passes. A disconnected sender or missing copy evidence can leave a useful draft with an exact repair; report that state honestly. A published sequence that was never started sends nothing. Published-but-unstarted and manually paused are distinct states.
8
8
 
9
- Enrollment reads leads straight from the worksheet rows; do not create or import contacts first. A rendered preview and a launch rehearsal use those row values even when no CRM person exists yet. On live enrollment, the system matches each usable row identity to one existing person or creates and binds the missing person automatically. A sequence takes one enrollment source: a workbook view, or one workflow, never both. A published sequence bound to a view keeps enrolling rows that later land in or start matching it. Filters on any worksheet column narrow who enrolls; with no filter every row enrolls. When the user said who should get the sequence, filter on the columns that hold it and report how many were held back. Enrollment is free and never sends. Starting is the moment real messages begin, paced over time.
9
+ Enrollment reads leads straight from the worksheet rows; do not create or import contacts first. A rendered preview and a launch rehearsal use those row values even when no CRM person exists yet. On live enrollment, the system matches each usable row identity to one existing person or creates and binds the missing person automatically. A sequence can have ordered worksheet audiences, each with its own saved view, filter, identity mapping, priority and cap, or a workflow source. Keep personalization provenance on its selected source; do not silently substitute another audience when a source is archived. A published sequence bound to a view keeps enrolling rows that later land in or start matching it. Filters on any worksheet column narrow who enrolls; with no filter every row enrolls. When the user said who should get the sequence, filter on the columns that hold it and report how many were held back. Enrollment is free and never sends. Starting is the moment real messages begin, paced over time.
10
10
 
11
11
  Do not turn a pending binding preview into a request to create CRM contacts. Report the returned blocker precisely: a row without usable channel identity, an ambiguous/conflicting identity, a permission refusal, or the named launch/readiness issue. The CRM-only operation that creates records for unbound rows remains available for intentional CRM cleanup or import, never as an outreach prerequisite.
12
12
 
@@ -16,6 +16,10 @@ Enrolling from a worksheet binds it as the sequence's trigger. Report the trigge
16
16
 
17
17
  "Enroll in a sequence" means the people worksheet of the workbook the user is looking at, or just built, into a new sequence built for it, even when a company worksheet is open. Use an existing sequence only when the user names it; never report another worksheet's enrollment as the answer.
18
18
 
19
- Publishing and enrolling can happen before any sender is connected. Only starting delivery needs a connected account, and then name exactly which one. Show a preview of real rows in chat as you build; it is not an approval gate. When the user asked to enroll, build and publish in the same turn and let them edit the copy after. Stop for review only when the user asked to approve copy first. There is no send cap to pass: every enrolled lead is worked through, paced by each account's daily limits and sending hours.
19
+ Draft creation and staging can happen with an empty qualified view or disconnected sender. Keep the saved view and filters unchanged; never widen the audience to make a count nonzero. Use top-level `identity_mapping` in `sequence.sequences.create_from_worksheet`, for example `{linkedin_url_column_key:"person.linkedin_url"}`; the service saves it on the audience source. Keys name worksheet columns or declared nested outputs. Do not pass the removed `linkedin_profile_column_id` override.
20
+
21
+ For an identity failure, inspect the current strict input schema and submit the exact returned identity_mapping repair on that audience without changing its worksheet, saved view or filter. Read back the saved mapping and render the intended recipient before reporting the repair complete.
22
+
23
+ Publishing and starting enforce their returned readiness checks; connect the named channel sender or repair the exact missing evidence. Publishing and enrolling never send. Show previews of rich, thin and missing-evidence rows as you build, labeling fallback copy or a hold explicitly. If a row sample is incomplete, report its sample size instead of calling it the full audience. Preserve configured sequence, audience and sender limits. Start only on the user's explicit instruction and the canonical paid-run consent rule.
20
24
 
21
25
  After a timeout or an unclear result, read the current enrollment and run state before trying again. Never enroll the same leads twice and never start a second copy of the same sequence.
@@ -4,9 +4,11 @@ Preview first. Draft one full message for one real qualified prospect, subject l
4
4
 
5
5
  Keep the scaffold fixed: greeting, the pitch paragraphs, the call to action, the sign-off and every paragraph break are the same for every lead. The personalized parts are short slots, such as first name, company, niche, target persona or one signal you can point to in the prospect's data.
6
6
 
7
- Ground every personalized claim in the prospect's row or the workspace knowledge. If the data is empty, use the fallback wording, never a guess. Use only variables the workspace offers. An unresolved variable in a preview means the copy is not ready.
7
+ Read the current Company Context before writing. Pass its document ids and revision ids unchanged in the creation contract so the saved definition records the claims' provenance. Ground every personalized claim in the prospect's row or that workspace knowledge. If the data is empty, use the fallback wording, never a guess. Use only variables the workspace offers, including declared nested outputs such as `{{research.summary}}`, formula/lookup projections and sender fields. A column label is not a token key. An unresolved variable in a preview means the copy is not ready.
8
8
 
9
- For each sending step, decide row variables first. Write fallback message before personalized message, for any empty row value. Put it in that step's `fallback_template` field; it is not its own step and not a branch. Fallback must not use row variables that can be empty, sender variables always present are allowed. Never publish a sending step with row variables and no fallback. Before publishing, render every step for at least three real rows, including one row with an empty value.
9
+ For large personalization reads, request referenced columns plus identity and filter dependencies, page within the returned row and cell limits, and continue until complete. A display limit or partial sample is not the full audience. Report completeness; never drop dependencies to fit a request.
10
+
11
+ For each sending step, decide row variables first. Write fallback message before personalized message, for any empty row value. Put it in that step's `fallback_template` field; it is not its own step and not a branch. Fallback is literal copy without template variables, including sender variables. It must not claim an observed signal, previous contact or promised resource when that evidence is absent. Never publish a sending step with row variables and no fallback. Before publishing, render every step for at least three real rows, including one row with an empty value.
10
12
 
11
13
  Merge fields are the enrolled worksheet's columns. Before copy greets someone by first name, check that the worksheet has a first name column. If it does not, add a visible `first_name` formula column with `FIRST_NAME({{name}})` through `tables.columns.add` (it runs no paid work), then write `{{first_name}}`. Derive any other short slot the copy needs the same way, as a visible formula column, before drafting.
12
14
 
@@ -38,4 +40,4 @@ If the rendered messages across rows read nearly identical apart from the name,
38
40
 
39
41
  ## A/B testing
40
42
 
41
- When a step writes with AI, it can test variants: vary either the angle (the overall approach) or the opener (only the first line), not both, and keep each variant a genuinely different idea rather than a paraphrase. Turn on automatic winner promotion when the user wants the sequence to keep the better variant on its own. Read the results per variant before changing copy, and change the losing variant, not the whole sequence.
43
+ When a step writes with AI, it can test variants: vary either the angle (the overall approach) or the opener (only the first line), not both, and keep each variant a genuinely different idea rather than a paraphrase. Keep assignment stable for a logical execution across retries. Use the existing variant report; do not promise automatic winner promotion or rebucket recipients after a retry. Separate human replies, positive replies and confirmed meetings, with explicit denominators and read completeness. An automatic response or OOO pause is not a human reply. Read the results per variant before changing copy, and change the losing variant, not the whole sequence.
@@ -3,7 +3,7 @@ name: plays
3
3
  description: "Recommend and run one named, proven go-to-market play when the user asks what to do next, picking by stage and what the workspace already has, and stating prerequisites, credit estimate and checkpoints before starting. Use it for \"what should I do\", \"how do I get leads\", \"help me start outbound or content\", or a weekly review. It does not replace the skills each step uses (knowledge, list-building, outreach, social, writing, visibility, workflows)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Plays
9
9
 
@@ -3,7 +3,7 @@ name: reddit-posts
3
3
  description: "Draft Reddit posts the user posts themselves: subreddit choice and rules, the title, a value first body, disclosure, post types (success story, guide, resource list, problem solving, behind the scenes, question), and what gets posts removed. Use it for the copy of any Reddit draft. It does not cover scheduling or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Reddit posts
9
9
 
@@ -3,7 +3,7 @@ name: skill-authoring
3
3
  description: "Read, edit and create this workspace's skills, the editable Markdown playbooks agents and people follow, keeping each one short, revision safe and in the workspace's own words. Use it when the user wants to change how a skill works, capture a repeatable practice as a new skill, or fix a skill that reports issues. It does not change what an agent is allowed to do (a skill grants nothing) and does not edit Company Context pages (knowledge does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Skill Authoring
9
9
 
@@ -3,7 +3,7 @@ name: social
3
3
  description: "Own a short-form social post for its whole life across connected channels. Read the channel registry and learned brand voice, draft and revise, submit for review, approve, schedule or reschedule, publish now, unschedule, and archive."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Social
9
9
 
@@ -38,6 +38,8 @@ Write with the channel skills: `linkedin-posts`, `x-posts` and `reddit-posts` ho
38
38
 
39
39
  Each request gets a new draft. Revise an existing draft only when the user names it or asks to change it.
40
40
 
41
+ When a post you changed comes back different, read its version history before explaining it. Each version names its writer: `agent_edit` with the surface (MCP, CLI, Architect) or `manual_edit` from the dashboard. Report what the history shows. Never tell the user to refresh, close or reload tabs as the fix: an open editor reports a conflict instead of overwriting newer copy.
42
+
41
43
  Drafting needs no review, approval or human step. Match the stored voice. No em dashes in post copy.
42
44
 
43
45
  Before scheduling, resolve every @mention for each channel. People and companies can be mentioned on LinkedIn and X. Never send unresolved mention text to a provider. It publishes broken public text and cannot be edited back on every channel.
@@ -50,7 +52,7 @@ For LinkedIn, the last line must open with an ask verb or be a question addresse
50
52
 
51
53
  Per-post auto-engagement lets the workspace's connected accounts like, comment or repost after the post publishes. When the user asks for it ("add all our accounts as auto engagers"), do it: list the connected accounts, bind every account they named (or all of them), pick sensible defaults and save. Defaults: likes from every account; one comment per account, written by you in that account's voice, specific to the post and different for each account, never generic praise; stagger each account a few minutes apart instead of all at once. The post's own author does not like or comment on its own post. Report the accounts, actions, delays and exact comment copy you saved, so the user can change any of it.
52
54
 
53
- Keyword auto-DM rules attach to a post. A comment containing the keyword gets a DM to the commenter and can get a public reply. Write the DM and reply copy yourself from the post and the offer; keep the DM short and deliver what the post promised.
55
+ Keyword auto-DM (comment-to-DM) rules attach to a post. Discover the rule read and replacement capabilities through the social pack, then read the current rules and replace them directly; there is no separate follow-up tool. The editor's "private follow-up" switch is `dm_enabled` with `dm_message`. On LinkedIn the DM reaches only 1st-degree connections: with the DM on, a connection gets the DM (and `comment_reply_sent` after it, when enabled) and anyone else gets `comment_reply_not_connected`, when enabled. With the DM off, every matching commenter gets `comment_reply_sent` when it is enabled, and the not-connected reply is not used. A rule that reaches nobody is refused. Make the post's CTA promise what the rule delivers: "I'll DM you" only with the DM on. Write the DM and reply copy yourself from the post and the offer; keep the DM short and deliver what the post promised. Report the keywords and what a connected and a not-connected commenter will each receive.
54
56
 
55
57
  Amplification is a standing workspace policy that engages from other people's real accounts and spends credits. Create it disabled, and arm it separately after scope, participant accounts, actions and credit ceiling are set.
56
58
 
@@ -3,7 +3,7 @@ name: tiktok-posts
3
3
  description: "Write and revise TikTok video scripts and captions: the first two seconds, on-screen text, a caption up to 2,200 characters, and 3 to 5 hashtags. Use it for the copy of any post going to TikTok. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # TikTok posts
9
9
 
@@ -3,7 +3,7 @@ name: visibility
3
3
  description: "Get found by search engines and answer engines. Pick the query set, gather crawl, index, mention and citation evidence, fix pages, then measure the change."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Visibility
9
9
 
@@ -3,7 +3,7 @@ name: workflows
3
3
  description: "Best practices for building and running automations that are not outreach sequences: frame the job, smallest graph, validate after every change, runtime inputs, safe recovery of failed runs."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Workflows
9
9
 
@@ -33,6 +33,8 @@ Social account post and AI answer worksheets hold content rows, never an audienc
33
33
  8a. Building never waits on rows. A worksheet trigger on an empty or still-filling worksheet is still a valid enrollment: build, validate and turn it on, and rows enroll as they land. Say it is waiting for rows, never stop because the worksheet is empty.
34
34
  8b. Use the row-created trigger when each new worksheet row must enter once. It watches future row arrivals on one worksheet, carries that row identity through the graph, and does not reuse or freeze a saved selection. Use the table trigger only when user wants a selected saved-view audience.
35
35
  8c. To tag or mark a triggering row, add the worksheet-row update step. Choose its column and either replace its value or append a value to its existing list. Do not ask user to export, reimport, or manually tag rows when workflow already has triggering row identity.
36
+ 8d. Stripe and PostHog events start workflows through a product event trigger on that provider's signal source. Stripe events arrive named `stripe.<event type>`, for example `stripe.invoice.payment_failed`, `stripe.customer.subscription.trial_will_end`, `stripe.customer.subscription.deleted` and `stripe.invoice.paid`. PostHog events arrive with the event name captured in PostHog. Read the signal source list for the source id and use the exact event name; never invent one. Each event enrolls the person once, and a duplicate delivery of the same event never enrolls twice. To act on the person's worksheet row, the row is already updated in place by its Stripe or PostHog source; add a worksheet-row update step only for a value the event itself does not set.
37
+ 8e. Event weights decide how much each product or billing event moves a lead's signal score. Read them with `integrations.signal_sources.event_weights_get` and change them with `integrations.signal_sources.event_weights_set` for one signal source. Every event starts at weight 0, which records the event but does not move the score, and older events count less over time. Set a weight only for events the user named as buying signals, and read the weights back after writing them.
36
38
  9. Activating something that sends or spends follows the paid-run consent rule.
37
39
  10. Draft, published, active, running and finished are separate facts. Report only what the last result proves.
38
40
 
@@ -3,7 +3,7 @@ name: worksheet-tidy
3
3
  description: "Review a workbook worksheet's structure and values, including duplicate or overlapping columns, column order, types and formatting, columns to hide, criteria and run conditions that never vary, and suspicious values, then apply reversible fixes. Use it when a worksheet has grown messy, before sharing it, or before enrolling it into a sequence. It does not merge CRM records across the workspace, rebuild the list's source (list-building does) or explain failed runs (diagnostics does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Worksheet Tidy
9
9
 
@@ -3,7 +3,7 @@ name: writing
3
3
  description: "Draft, revise and publish articles and landing copy grounded in workspace context and a target query."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # Writing
9
9
 
@@ -3,7 +3,7 @@ name: x-posts
3
3
  description: "Write and revise X posts and threads: the first line, single post versus thread, weighted length and Premium limits, thread structure, post types, replies and links, and phrases to avoid. Use it for the copy of any post going to X. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # X posts
9
9
 
@@ -3,7 +3,7 @@ name: youtube-posts
3
3
  description: "Write and revise YouTube titles, descriptions, and tags: a title of at most 100 characters, a description with chapters, and a tag list. Use it for the copy of any video going to YouTube. It does not cover scheduling, publishing or automations (social does)."
4
4
  ---
5
5
 
6
- Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
6
+ Run this through the Dreamstate MCP tools: `packs_get` for the pack's capabilities, `tools_get` for the exact input schema, then `tools_run`. Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply. `max_rows` is a param of `tables.columns.run` and `tables.table_sources.run`, not of `tools_run`. `max_live_sends` goes inside `params` only when the fetched capability schema declares it (for example, a one-contact workflow run). Sequence start, resume, launch and enrollment do not accept it; they have no lifetime send ceiling. The paid-run consent rule is one sentence in the MCP server instructions, rendered from consentRule.json and PAID_RUN_APPROVAL_THRESHOLDS: rows and credits, with no provider prices. If the server asks you to sign in, approve it in the browser.
7
7
 
8
8
  # YouTube posts
9
9
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "generated_by": "packages/cli/scripts/build-agent-plugin.mjs from apps/backend/src/services/mcp/consentRule.json; do not edit by hand",
3
3
  "consent": {
4
- "summary": "Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply.",
4
+ "summary": "Anything that writes, spends credits or reaches a person: dry_run first, then live with the quote_hash the dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. A larger paid run, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply.",
5
5
  "paid_run": "For writes, credit spend or external effects: dry_run first, review the row count and credit estimate, then run live with the quote_hash that dry_run returned, a max_credits ceiling and an idempotency_key. max_credits 0 is valid only when that quote is 0. Supply max_rows or max_live_sends only when the fetched capability schema declares them; when an external send accepts max_live_sends, cover at least the dry_run recipient_count. Sequence lifecycle and enrollment calls have no lifetime send ceiling. A quote returned by a refused live call is only a price, never a confirmation.",
6
- "human_approval": "A paid run above the server's row or provider-spend limit, a live external send above the server's recipient threshold, or a run that turns on a recurring trigger, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply."
6
+ "human_approval": "A paid run above the server's row or provider-spend limit, or a live external send above the server's recipient threshold, also needs approved: true with the same quote_hash, after reviewing the preview. Free formulas need no paid-run approval; row execution caps still apply."
7
7
  },
8
8
  "router_steps": [
9
9
  {
package/dist/client.d.ts CHANGED
@@ -152,7 +152,7 @@ export declare class DreamstateClient {
152
152
  * server-directed rate-limit retry, cannot outlive the command that asked
153
153
  * for it. Other callers retain the normal run limit.
154
154
  */
155
- getRun(id: string, timeoutMs?: number): Promise<unknown>;
155
+ getRun(id: string, timeoutMs?: number, waitSeconds?: number): Promise<unknown>;
156
156
  listRuns(query?: Record<string, unknown>): Promise<unknown>;
157
157
  getRunEvents(id: string, query?: Record<string, unknown>): Promise<unknown>;
158
158
  cancelRun(id: string, body: Record<string, unknown>, idempotencyKey?: string): Promise<unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,EAAE,MAA2C,CAAC;AAEtE,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,6CAA6C,CAAC;AAE7E;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;I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G,OAAO,CAAC,OAAO,CAAC;IAOpF,aAAa,CACX,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,iBAAiB,EACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAC7B,OAAO,CAAC,OAAO,CAAC;IAYnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAU9E,QAAQ,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAG/D,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAG/E,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAW/F,OAAO,CAAC,cAAc;YAUR,OAAO;CA0HtB"}
package/dist/client.js CHANGED
@@ -376,8 +376,9 @@ class DreamstateClient {
376
376
  * server-directed rate-limit retry, cannot outlive the command that asked
377
377
  * for it. Other callers retain the normal run limit.
378
378
  */
379
- getRun(id, timeoutMs) {
380
- return this.request(`/runs/${encodeURIComponent(id)}`, {}, exports.TOOL_AND_RUN_REQUEST_TIMEOUT_MS, false, timeoutMs);
379
+ getRun(id, timeoutMs, waitSeconds) {
380
+ const query = waitSeconds && waitSeconds > 0 ? `?wait_seconds=${waitSeconds}` : '';
381
+ return this.request(`/runs/${encodeURIComponent(id)}${query}`, {}, exports.TOOL_AND_RUN_REQUEST_TIMEOUT_MS, false, timeoutMs);
381
382
  }
382
383
  listRuns(query = {}) {
383
384
  return this.request(`/runs${queryString(query)}`, {}, exports.TOOL_AND_RUN_REQUEST_TIMEOUT_MS);
@@ -40,7 +40,6 @@ export interface GatedRunContext {
40
40
  idempotencyPath?: string;
41
41
  workspace?: string;
42
42
  stderr: NodeJS.WritableStream;
43
- sleep: (milliseconds: number) => Promise<void>;
44
43
  }
45
44
  export interface GatedRunInput {
46
45
  capabilityId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gatedRun.d.ts","sourceRoot":"","sources":["../src/gatedRun.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA0B,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEnF,OAAO,EAA4F,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAoBnJ,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIvD;AAUD,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAKjF;AAgBD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,CAKrI;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAKzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAazF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAMrE;AAqLD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,mGAAmG;IACnG,OAAO,EAAE,MAAM,CAAC;IAChB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EAAE,OAAO,CAAC,EAC/B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC,CAGlB"}
package/dist/gatedRun.js CHANGED
@@ -519,7 +519,7 @@ async function runGated(context, input) {
519
519
  }
520
520
  let timedOut = false;
521
521
  if (!input.noWait && !posture?.returnsRunId) {
522
- const waited = await (0, runWait_1.waitForRun)(client, result, input.waitTimeout, context.sleep);
522
+ const waited = await (0, runWait_1.waitForRun)(client, result, input.waitTimeout);
523
523
  result = waited.value;
524
524
  timedOut = waited.timedOut;
525
525
  }
@@ -528,7 +528,7 @@ async function runGated(context, input) {
528
528
  await refreshCapabilityAfterDigestStale();
529
529
  result = await run();
530
530
  if (!input.noWait && !posture?.returnsRunId) {
531
- const waited = await (0, runWait_1.waitForRun)(client, result, input.waitTimeout, context.sleep);
531
+ const waited = await (0, runWait_1.waitForRun)(client, result, input.waitTimeout);
532
532
  result = waited.value;
533
533
  timedOut = waited.timedOut;
534
534
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "generated_by": "packages/cli/scripts/generate-pack-verbs.mjs from apps/backend/src/services/v1/capabilityRegistry/catalog.snapshot.json; do not edit by hand",
3
- "registry_hash": "0993264bdfa458810d82958d2539803b6d1652a7afd97b2cc7cd7533d6743d7f",
3
+ "registry_hash": "323739aca8463c96716435db301f58b9a683038c573c54876580d7c5fcf7ccde",
4
4
  "verbs": [
5
5
  {
6
6
  "command": "knowledge compose-document",
package/dist/index.d.ts CHANGED
@@ -107,6 +107,7 @@ export type CliCommand = {
107
107
  } | {
108
108
  command: 'tools_get';
109
109
  capabilityId: string;
110
+ detail?: 'full' | 'compact';
110
111
  jsonOutput?: boolean;
111
112
  } | {
112
113
  command: 'tools_run';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA8BA,OAAO,EAA0F,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKnK,OAAO,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D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAkB3F;AAwBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmB7G;AAiHD,wBAAsB,MAAM,CAAC,IAAI,GAAE,MAAM,EAA0B,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAka5G"}
package/dist/index.js CHANGED
@@ -60,7 +60,7 @@ Usage:
60
60
  dreamstate skills doctor [--agents <codex claude-code cursor>] [--project] [--json-output|--json]
61
61
  dreamstate commands search <term> [--json-output|--json]
62
62
  dreamstate tools search --goal <goal> [--terms <csv>] [--limit <n>] [--cursor <cursor>] [--toolset <pack_id>] [--json-output|--json]
63
- dreamstate tools get <capability_id> [--json-output|--json]
63
+ dreamstate tools get <capability_id> [--detail full|compact] [--json-output|--json]
64
64
  dreamstate tools run <capability_id> [--params <object>|--json <body>] [--turn-token <token>] (--live | --dry-run | --mode <smoke_test|dry_run|live>) [--approved] [--approval-id <uuid>] [--approved-effect-unknown] [--max-credits <n>] [--max-live-sends <n>] [--quote-hash <sha256:...>] [--idempotency-key <key>] [--wait-timeout <seconds>] [--no-wait] [--open] [--json-output]
65
65
  dreamstate sequences <verb> [args] [flags]
66
66
  dreamstate workflows <verb> [args] [flags]
@@ -262,7 +262,7 @@ function toolsRunMode(values) {
262
262
  function parseTools(argv) {
263
263
  const { values, positionals } = (0, node_util_1.parseArgs)({ args: argv, options: {
264
264
  json: { type: 'string' }, params: { type: 'string' }, goal: { type: 'string' }, terms: { type: 'string' },
265
- limit: { type: 'string' }, cursor: { type: 'string' }, toolset: { type: 'string' },
265
+ limit: { type: 'string' }, cursor: { type: 'string' }, toolset: { type: 'string' }, detail: { type: 'string' },
266
266
  'idempotency-key': { type: 'string' }, 'json-output': { type: 'boolean' }, open: { type: 'boolean' },
267
267
  'dry-run': { type: 'boolean' }, live: { type: 'boolean' }, mode: { type: 'string' },
268
268
  approved: { type: 'boolean' }, 'approved-effect-unknown': { type: 'boolean' },
@@ -272,6 +272,8 @@ function parseTools(argv) {
272
272
  if (values.help)
273
273
  return { command: 'help' };
274
274
  const output = outputOption(values);
275
+ if (values.detail !== undefined && positionals[0] !== 'get')
276
+ throw new errors_1.CliUsageError('--detail is only valid on tools get');
275
277
  if (positionals.length === 1 && positionals[0] === 'search') {
276
278
  const query = values.json ? parseJsonObject(values.json) : {};
277
279
  if (values.goal)
@@ -294,8 +296,11 @@ function parseTools(argv) {
294
296
  }
295
297
  if (values.cursor !== undefined)
296
298
  throw new errors_1.CliUsageError('--cursor is only valid on tools search');
297
- if (positionals[0] === 'get')
298
- return { command: 'tools_get', capabilityId: requireOne(positionals, 'dreamstate tools get <capability_id>'), ...output };
299
+ if (positionals[0] === 'get') {
300
+ if (values.detail !== undefined && values.detail !== 'full' && values.detail !== 'compact')
301
+ throw new errors_1.CliUsageError('--detail must be full or compact');
302
+ return { command: 'tools_get', capabilityId: requireOne(positionals, 'dreamstate tools get <capability_id>'), ...(values.detail ? { detail: values.detail } : {}), ...output };
303
+ }
299
304
  if (positionals[0] === 'run') {
300
305
  const capabilityId = requireOne(positionals, 'dreamstate tools run <capability_id> [--params <object>|--json <body>]');
301
306
  if (values.json && values.params)
@@ -1354,7 +1359,6 @@ async function runCli(argv = process.argv.slice(2), runtime = {}) {
1354
1359
  idempotencyPath,
1355
1360
  ...(workspace ? { workspace } : {}),
1356
1361
  stderr,
1357
- sleep: runtime.sleep ?? wait,
1358
1362
  });
1359
1363
  let result;
1360
1364
  switch (command.command) {
@@ -1442,7 +1446,7 @@ async function runCli(argv = process.argv.slice(2), runtime = {}) {
1442
1446
  // search ranking can omit a valid exact capability, which made standalone
1443
1447
  // CLI contract reads fail despite the capability being runnable.
1444
1448
  case 'tools_get':
1445
- result = await client.getTool(command.capabilityId);
1449
+ result = await client.getTool(command.capabilityId, command.detail ? { detail: command.detail } : {});
1446
1450
  break;
1447
1451
  case 'tools_run': {
1448
1452
  const outcome = await (0, gatedRun_1.runGated)(gatedContext(), {
@@ -1479,7 +1483,7 @@ async function runCli(argv = process.argv.slice(2), runtime = {}) {
1479
1483
  break;
1480
1484
  case 'runs_wait': {
1481
1485
  const initial = await client.getRun(command.runId);
1482
- const waited = await (0, runWait_1.waitForRun)(client, initial, command.waitTimeout, runtime.sleep ?? wait);
1486
+ const waited = await (0, runWait_1.waitForRun)(client, initial, command.waitTimeout);
1483
1487
  const blocked = (0, gatedRun_1.refusalFromRunResult)(waited.value);
1484
1488
  if (blocked)
1485
1489
  throw blocked;
@@ -0,0 +1,4 @@
1
+ /** Translate vault skill directories to installed names, using the parser's
2
+ * destination spans so labels, code examples and escaped URLs remain sound. */
3
+ export declare function installedSkillLinks(markdown: string, skillId: string, file: string, installedName: (id: string) => string): Promise<string>;
4
+ //# sourceMappingURL=installedSkillLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installedSkillLinks.d.ts","sourceRoot":"","sources":["../src/installedSkillLinks.ts"],"names":[],"mappings":"AAMA;+EAC+E;AAC/E,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EACvF,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BxD"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.installedSkillLinks = installedSkillLinks;
4
+ const node_path_1 = require("node:path");
5
+ let parser;
6
+ /** Translate vault skill directories to installed names, using the parser's
7
+ * destination spans so labels, code examples and escaped URLs remain sound. */
8
+ async function installedSkillLinks(markdown, skillId, file, installedName) {
9
+ parser ??= import('mdast-util-from-markdown');
10
+ const edits = [];
11
+ // This is the standard destination exit handler, extended with an edit for
12
+ // the exact resource/definition destination token rather than its whole node.
13
+ const destination = function (token) {
14
+ const url = this.resume();
15
+ const node = this.stack.at(-1);
16
+ if (!node || !('url' in node))
17
+ throw Error('Markdown destination has no owner');
18
+ node.url = url;
19
+ if (!url || /^[/#?]/.test(url) || /^[a-z][a-z\d+.-]*:/i.test(url))
20
+ return;
21
+ const separator = url.search(/[?#]/);
22
+ const path = separator < 0 ? url : url.slice(0, separator);
23
+ const suffix = separator < 0 ? '' : url.slice(separator);
24
+ const resolved = node_path_1.posix.normalize(node_path_1.posix.join(skillId, node_path_1.posix.dirname(file), path));
25
+ const [targetId, ...segments] = resolved.split('/');
26
+ if (!segments.length || !/^[a-z0-9][a-z0-9_-]*$/i.test(targetId))
27
+ return;
28
+ const translated = node_path_1.posix.relative(node_path_1.posix.dirname(node_path_1.posix.join(installedName(skillId), file)), node_path_1.posix.join(installedName(targetId), ...segments)) + suffix;
29
+ if (translated !== url)
30
+ edits.push({ start: token.start.offset, end: token.end.offset,
31
+ text: translated.replace(/[()<>\s\\]/g, character => `%${character.charCodeAt(0).toString(16).toUpperCase()}`) });
32
+ };
33
+ (await parser).fromMarkdown(markdown, { mdastExtensions: [{ exit: {
34
+ resourceDestinationString: destination, definitionDestinationString: destination,
35
+ } }] });
36
+ for (const edit of edits.sort((a, b) => b.start - a.start)) {
37
+ markdown = markdown.slice(0, edit.start) + edit.text + markdown.slice(edit.end);
38
+ }
39
+ return markdown;
40
+ }
package/dist/runWait.d.ts CHANGED
@@ -5,5 +5,5 @@ export interface RunWaitResult {
5
5
  value: unknown;
6
6
  timedOut: boolean;
7
7
  }
8
- export declare function waitForRun(client: DreamstateClient, initial: unknown, timeoutSeconds: number, sleep: (milliseconds: number) => Promise<void>): Promise<RunWaitResult>;
8
+ export declare function waitForRun(client: DreamstateClient, initial: unknown, timeoutSeconds: number): Promise<RunWaitResult>;
9
9
  //# sourceMappingURL=runWait.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runWait.d.ts","sourceRoot":"","sources":["../src/runWait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAU3D,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,EAAE,MAAyB,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAmDD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
1
+ {"version":3,"file":"runWait.d.ts","sourceRoot":"","sources":["../src/runWait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAY3D,sFAAsF;AACtF,eAAO,MAAM,0BAA0B,EAAE,MAAyB,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB;AAuDD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
package/dist/runWait.js CHANGED
@@ -9,6 +9,8 @@ const TERMINAL_STATUSES = new Set([
9
9
  'timed_out', 'rejected', 'awaiting_approval', 'awaiting_input', 'waiting', 'waiting_approval', 'approval_required',
10
10
  // A rehearsal already finished. Polling it as if it were still running times the command out.
11
11
  'dry_run_rehearsed', 'smoke_test_passed',
12
+ // A credit or row ceiling stopped the run with a continuation; nothing more happens until a new run.
13
+ 'cap_reached',
12
14
  ]);
13
15
  /** The wait ran out with the run still active; the latest run envelope is printed. */
14
16
  exports.RUN_WAIT_TIMEOUT_EXIT_CODE = errors_1.CLI_EXIT.TIMEOUT;
@@ -23,7 +25,12 @@ function runFromEnvelope(value) {
23
25
  return null;
24
26
  const { id, run_id: runId, status } = run;
25
27
  const resolvedId = typeof id === 'string' ? id : typeof runId === 'string' ? runId : null;
26
- return resolvedId && typeof status === 'string' ? { id: resolvedId, status } : null;
28
+ if (!resolvedId || typeof status !== 'string')
29
+ return null;
30
+ // The server's own terminal flag wins over the local status list, so a new
31
+ // terminal status never makes the CLI wait out its whole timeout.
32
+ const terminal = data.terminal === true || TERMINAL_STATUSES.has(status);
33
+ return { id: resolvedId, status, terminal };
27
34
  }
28
35
  function timedOutEnvelope(value, timeoutSeconds) {
29
36
  if (!value || typeof value !== 'object' || Array.isArray(value))
@@ -63,23 +70,24 @@ function pollingFailureWithReceipt(error, receipt) {
63
70
  ...(error.meta === undefined ? {} : { meta: error.meta }),
64
71
  });
65
72
  }
66
- async function waitForRun(client, initial, timeoutSeconds, sleep) {
73
+ async function waitForRun(client, initial, timeoutSeconds) {
67
74
  let value = initial;
68
75
  let run = runFromEnvelope(value);
69
- if (!run || TERMINAL_STATUSES.has(run.status))
76
+ if (!run || run.terminal)
70
77
  return { value, timedOut: false };
71
78
  const deadline = Date.now() + timeoutSeconds * 1_000;
72
- let delay = 500;
73
79
  while (Date.now() < deadline) {
74
- const remainingBeforeSleep = deadline - Date.now();
75
80
  try {
76
- await sleep(Math.min(delay, remainingBeforeSleep));
77
81
  const remainingBeforeRead = deadline - Date.now();
78
- // Sleeping may consume the whole budget. Do not start a read that the
79
- // command has no time left to receive.
80
82
  if (remainingBeforeRead <= 0)
81
83
  break;
82
- value = await client.getRun(run.id, remainingBeforeRead);
84
+ // Use the canonical bounded wait. The request itself is constrained by
85
+ // the command's remaining deadline, so a server wait can never extend
86
+ // this CLI invocation. Twenty seconds stays beneath the ordinary HTTP
87
+ // proxy ceiling and cuts idle polling from roughly twenty reads/minute
88
+ // to three.
89
+ const waitSeconds = Math.max(1, Math.min(20, Math.floor(remainingBeforeRead / 1_000)));
90
+ value = await client.getRun(run.id, remainingBeforeRead, waitSeconds);
83
91
  }
84
92
  catch (error) {
85
93
  // The deliberately deadline-bounded read can be aborted at the deadline.
@@ -91,9 +99,8 @@ async function waitForRun(client, initial, timeoutSeconds, sleep) {
91
99
  throw pollingFailureWithReceipt(error, value);
92
100
  }
93
101
  run = runFromEnvelope(value);
94
- if (!run || TERMINAL_STATUSES.has(run.status))
102
+ if (!run || run.terminal)
95
103
  return { value, timedOut: false };
96
- delay = Math.min(delay * 2, 3_000);
97
104
  }
98
105
  return { value: timedOutEnvelope(value, timeoutSeconds), timedOut: true };
99
106
  }
@@ -42,7 +42,7 @@ export declare function skillIndexVersion(skills: readonly HostedSkill[]): strin
42
42
  export declare function renderSkillMarkdown(skill: HostedSkill, provenance: {
43
43
  workspaceId: string;
44
44
  indexVersion: string;
45
- }): string;
45
+ }, body?: string): string;
46
46
  export declare function installSkills(skills: readonly HostedSkill[], options: SkillInstallOptions): Promise<{
47
47
  files: string[];
48
48
  lockSkills: Record<string, {
@@ -1 +1 @@
1
- {"version":3,"file":"skillInstaller.d.ts","sourceRoot":"","sources":["../src/skillInstaller.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB,+EAAgF,CAAC;AAClH,MAAM,MAAM,iBAAiB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC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E,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAAC,CAkC1W;AAED,MAAM,WAAW,UAAU;IACzB,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,0EAA0E;IAC1E,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAC;CACzB;AAID;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,SAAS,WAAW,EAAE,EAC5B,aAAa,SAAY,EACzB,OAAO,UAAQ,EACf,GAAG,SAAgB,GAClB,OAAO,CAAC,UAAU,CAAC,CA6BrB"}
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
@@ -53,6 +20,7 @@ const node_crypto_1 = require("node:crypto");
53
20
  const node_os_1 = require("node:os");
54
21
  const node_path_1 = require("node:path");
55
22
  const agentGuidance_generated_json_1 = __importDefault(require("./agentGuidance.generated.json"));
23
+ const installedSkillLinks_1 = require("./installedSkillLinks");
56
24
  const errors_1 = require("./errors");
57
25
  const idempotency_1 = require("./idempotency");
58
26
  exports.SKILL_INSTALL_AGENTS = ['codex', 'claude-code', 'cursor', 'opencode', 'hermes', 'openclaw'];
@@ -153,7 +121,7 @@ function packs(frontmatter) {
153
121
  const value = frontmatter.packs;
154
122
  return Array.isArray(value) ? value : typeof value === 'string' ? value.split(',').map((item) => item.trim()).filter(Boolean) : [];
155
123
  }
156
- function renderSkillMarkdown(skill, provenance) {
124
+ function renderSkillMarkdown(skill, provenance, body = skill.body) {
157
125
  const name = skillName(skill.id);
158
126
  const { name: _name, description: _description, 'allowed-tools': _tools, ...source } = skill.frontmatter ?? {};
159
127
  // name and description lead, as agent hosts read them first.
@@ -166,7 +134,7 @@ function renderSkillMarkdown(skill, provenance) {
166
134
  const lines = Object.entries(frontmatter).flatMap(([key, value]) => Array.isArray(value)
167
135
  ? [`${key}: [${value.map(yamlValue).join(', ')}]`]
168
136
  : [`${key}: ${yamlValue(value)}`]);
169
- return `---\n${lines.join('\n')}\n---\n\n${commandGuide(packs(frontmatter))}\n\n${skill.body.trim()}\n\n<!-- dreamstate provenance: workspace=${provenance.workspaceId} issued=${new Date().toISOString()} skills=${provenance.indexVersion} content=${skillContentHash(skill)} -->\n`;
137
+ return `---\n${lines.join('\n')}\n---\n\n${commandGuide(packs(frontmatter))}\n\n${body.trim()}\n\n<!-- dreamstate provenance: workspace=${provenance.workspaceId} issued=${new Date().toISOString()} skills=${provenance.indexVersion} content=${skillContentHash(skill)} -->\n`;
170
138
  }
171
139
  /**
172
140
  * A supporting page's path under its skill directory, or null when it is not a plain
@@ -187,7 +155,7 @@ function hash(value) { return (0, node_crypto_1.createHash)('sha256').update(val
187
155
  async function writeHostedSkill(root, skill, provenance) {
188
156
  const name = skillName(skill.id);
189
157
  const directory = (0, node_path_1.join)(root, name);
190
- const markdown = renderSkillMarkdown(skill, provenance);
158
+ const markdown = renderSkillMarkdown(skill, provenance, await (0, installedSkillLinks_1.installedSkillLinks)(skill.body, skill.id, 'SKILL.md', skillName));
191
159
  // A page removed upstream must not linger: clear a directory this CLI wrote before rewriting it.
192
160
  if ((await (0, promises_1.readFile)((0, node_path_1.join)(directory, 'SKILL.md'), 'utf8').catch(() => '')).includes(PROVENANCE_MARKER)) {
193
161
  await (0, promises_1.rm)(directory, { recursive: true, force: true });
@@ -200,7 +168,7 @@ async function writeHostedSkill(root, skill, provenance) {
200
168
  if (!target)
201
169
  continue;
202
170
  await (0, promises_1.mkdir)((0, node_path_1.dirname)(target), { recursive: true, mode: 0o700 });
203
- await (0, promises_1.writeFile)(target, document.content, { encoding: 'utf8', mode: 0o600 });
171
+ await (0, promises_1.writeFile)(target, await (0, installedSkillLinks_1.installedSkillLinks)(document.content, skill.id, document.name, skillName), { encoding: 'utf8', mode: 0o600 });
204
172
  }
205
173
  return { file, name, computedHash: hash(markdown) };
206
174
  }
@@ -269,11 +237,11 @@ async function inspectSkillInstallers(agents, homeDirectory = (0, node_os_1.home
269
237
  const symlinks = [];
270
238
  if (linksIntoCanonical(agent)) {
271
239
  try {
272
- for (const name of await (await Promise.resolve().then(() => __importStar(require('node:fs/promises')))).readdir(directory)) {
240
+ for (const name of await (await import('node:fs/promises')).readdir(directory)) {
273
241
  const path = (0, node_path_1.join)(directory, name);
274
242
  const state = await (0, promises_1.lstat)(path);
275
243
  if (state.isSymbolicLink()) {
276
- const target = await (await Promise.resolve().then(() => __importStar(require('node:fs/promises')))).readlink(path);
244
+ const target = await (await import('node:fs/promises')).readlink(path);
277
245
  symlinks.push({ name, target, correct: (0, node_path_1.join)(directory, target) === (0, node_path_1.join)(canonical, name) });
278
246
  }
279
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trydreamstate/cli",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Live command-line client for the Dreamstate v1 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "scripts": {
22
22
  "build": "node scripts/generate-pack-verbs.mjs --check && node scripts/generate-run-contract.mjs --check && node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && node scripts/build-agent-plugin.mjs && tsc",
23
23
  "pretest": "npm run build --workspace=@dreamstate/types",
24
- "test": "node scripts/build-agent-plugin.mjs --check && npm run build && jest --config jest.config.cjs --runInBand",
24
+ "test": "node scripts/build-agent-plugin.mjs --check && npm run build && node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --config jest.config.cjs --runInBand",
25
25
  "type-check": "tsc --noEmit",
26
26
  "pack:check": "npm pack --dry-run",
27
27
  "pack:smoke": "npm run build && node scripts/pack-smoke.mjs",
@@ -48,7 +48,9 @@
48
48
  "url": "https://github.com/luisfigueroavale/influence/issues"
49
49
  },
50
50
  "homepage": "https://trydreamstate.com",
51
- "dependencies": {},
51
+ "dependencies": {
52
+ "mdast-util-from-markdown": "^2.0.3"
53
+ },
52
54
  "devDependencies": {
53
55
  "@types/jest": "^29.5.14",
54
56
  "@types/node": "^22.19.19",