clawnify 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TR3GJVCX.js → chunk-ZVNDFSTR.js} +2 -2
- package/dist/{cli-UFC2VLJT.js → cli-I6PEAOPC.js} +6 -6
- package/dist/cli-I6PEAOPC.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{mcp-FQ7VFFFF.js → mcp-QVEHXGBP.js} +2 -2
- package/package.json +1 -1
- package/dist/cli-UFC2VLJT.js.map +0 -1
- /package/dist/{chunk-TR3GJVCX.js.map → chunk-ZVNDFSTR.js.map} +0 -0
- /package/dist/{mcp-FQ7VFFFF.js.map → mcp-QVEHXGBP.js.map} +0 -0
|
@@ -593,7 +593,7 @@ async function pollUntilReady(resourceId, options = {}) {
|
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
// src/version.ts
|
|
596
|
-
var VERSION = "0.12.
|
|
596
|
+
var VERSION = "0.12.1";
|
|
597
597
|
|
|
598
598
|
export {
|
|
599
599
|
OAUTH_CLIENT_ID,
|
|
@@ -617,4 +617,4 @@ export {
|
|
|
617
617
|
pollUntilReady,
|
|
618
618
|
VERSION
|
|
619
619
|
};
|
|
620
|
-
//# sourceMappingURL=chunk-
|
|
620
|
+
//# sourceMappingURL=chunk-ZVNDFSTR.js.map
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveOrgContext,
|
|
21
21
|
saveAuth,
|
|
22
22
|
saveProject
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZVNDFSTR.js";
|
|
24
24
|
|
|
25
25
|
// src/cli.ts
|
|
26
26
|
import { Command } from "commander";
|
|
@@ -1402,7 +1402,7 @@ function agentByName(name) {
|
|
|
1402
1402
|
var ALL_AGENTS = DETECTORS.map((d) => d.agent);
|
|
1403
1403
|
|
|
1404
1404
|
// src/lib/skills/content.gen.ts
|
|
1405
|
-
var CLI_VERSION = "0.12.
|
|
1405
|
+
var CLI_VERSION = "0.12.1";
|
|
1406
1406
|
var BUNDLED_SKILLS = [
|
|
1407
1407
|
{
|
|
1408
1408
|
name: "build-a-clawnify-app",
|
|
@@ -1412,12 +1412,12 @@ var BUNDLED_SKILLS = [
|
|
|
1412
1412
|
{
|
|
1413
1413
|
name: "use-the-clawnify-cli",
|
|
1414
1414
|
description: "Use the Clawnify CLI end-to-end \u2014 authenticate, scaffold, run locally, deploy apps and websites, link projects, manage orgs, and inspect deployed apps. Use when deploying to Clawnify from a terminal or wiring the CLI into scripts and coding agents.",
|
|
1415
|
-
content: "# Use the Clawnify CLI\n\nCanonical skill: how to drive the `clawnify` CLI. Same content for\nhumans and for AI coding agents operating a terminal.\n\nFor **authoring app code** (stack, schema, tRPC patterns), use the\n`build-a-clawnify-app` skill \u2014 this one covers the tooling around it.\n\n## TL;DR\n\n```bash\nnpm i -g clawnify # or: npx clawnify@latest <command>\nclawnify login # browser sign-in, paste-code fallback\nclawnify init my-app # scaffold an app or website\ncd my-app && clawnify dev\nclawnify deploy # \u2192 https://<slug>.apps.clawnify.com\n```\n\n- **Auth once, org lazily.** `login` only signs you in; the first\n command that needs an organization asks once and remembers it.\n- **A directory links to one app.** `deploy` from a linked directory\n updates that app; `clawnify link <id-or-slug>` adopts an existing one.\n- **Non-interactive flags exist for every prompt** \u2014 use them in\n scripts and CI (`-y`, `--update-existing`, `--create-new`, `--org`).\n\n## Authenticate\n\n```bash\nclawnify login # opens the browser; also prints the sign-in URL\nclawnify whoami # current user, active org (if linked)\n```\n\n`login` works from any browser: if the browser runs on the same\nmachine, sign-in completes automatically; otherwise the page shows a\ncode to paste back at the `Paste code here if prompted >` prompt\n(useful over SSH \u2014 no port forwarding needed).\n\n**Headless / CI / agents \u2014 skip `login` entirely.** Set `CLAWNIFY_TOKEN` (a\nSupabase access token) and it wins over any stored session, reading/writing no\nfiles; `CLAWNIFY_ORG_ID` (or a per-command `--org`) pins the org. This is how a\ncoding agent runs the CLI without a browser.\n\n### Organizations\n\nYou belong to one or more orgs; apps live inside an org.\n\n```bash\nclawnify org list # orgs you belong to (* marks active)\nclawnify org use <slug-or-id> # switch the active org\n```\n\nNo need to pick one up front \u2014 the first org-scoped command prompts\nonce and persists the choice. Any single command can override with\n`--org <slug-or-id>`.\n\n## Create and run locally\n\n```bash\nclawnify init [dir] # interactive: app or website\nclawnify init my-app -y # non-interactive defaults (blank app)\nclawnify init --type app --template crud --name my-app\nclawnify init --type website --name my-site\nclawnify dev [dir] [--port 8787] # local dev server\n```\n\n`init` also installs AI files (rules + skills + MCP config) for any\ncoding agents detected in the project; skip with `--no-ai-files`.\n\n## Deploy\n\n```bash\nclawnify deploy # deploy the current directory\nclawnify deploy path/to/app\nclawnify deploy --from owner/repo # deploy straight from GitHub\nclawnify deploy --from owner/repo --path apps/web # monorepo subdir\nclawnify deploy --dry-run # list files that would upload\n```\n\nFirst deploy creates the app and links the directory (writes a local\nproject file); later deploys update the same app. On a slug conflict\nyou'll be asked \u2014 or decide up front:\n\n```bash\nclawnify deploy -y # reuse/update the existing app\nclawnify deploy --update-existing # same, explicit\nclawnify deploy --create-new # take the suggested new slug\n```\n\nLink an existing deployed app to the current directory instead of\ncreating a new one:\n\n```bash\nclawnify link <app-id-or-slug>\n```\n\n## Inspect and manage deployed apps\n\n```bash\nclawnify ls # list deployed apps in the active org\nclawnify logs <app-id> # build logs\nclawnify open <slug> # open the live app in the browser\nclawnify rm <app-id> # delete an app\nclawnify pull schema --from <app-id-or-slug> # fetch live schema.sql\nclawnify docs [slug] # usage README for an app (org index if omitted)\n```\n\n`pull schema` refuses to clobber local uncommitted changes unless you\npass `--force`.\n\n## Manage agents (the FDE surface)\n\nDrive an org's AI agents from the terminal \u2014 observe them and fix them. See the\n`fix-a-clawnify-agent` skill for the workflow; this is the command list. All\norg-scoped and **repo-independent** (reads session data + the box, never a\nGitHub repo). Add `--server <id>` when the org has more than one server.\n\n```bash\nclawnify servers list # the org's servers (an org can have several)\nclawnify agents list # agents on a server (main + specialists)\nclawnify agents skills [agent] # what an agent can ACTUALLY run (not just its workspace)\nclawnify sessions --agent <slug> --json # stored sessions + token counters (contextTokens = bloat)\nclawnify sessions history <key> --json # one session's transcript \u2014 where it veered\nclawnify agents pull [dir] --agent <slug> # fetch AGENTS.md + skills/ to edit (flows/ come with main only \u2014 flows
|
|
1415
|
+
content: "# Use the Clawnify CLI\n\nCanonical skill: how to drive the `clawnify` CLI. Same content for\nhumans and for AI coding agents operating a terminal.\n\nFor **authoring app code** (stack, schema, tRPC patterns), use the\n`build-a-clawnify-app` skill \u2014 this one covers the tooling around it.\n\n## TL;DR\n\n```bash\nnpm i -g clawnify # or: npx clawnify@latest <command>\nclawnify login # browser sign-in, paste-code fallback\nclawnify init my-app # scaffold an app or website\ncd my-app && clawnify dev\nclawnify deploy # \u2192 https://<slug>.apps.clawnify.com\n```\n\n- **Auth once, org lazily.** `login` only signs you in; the first\n command that needs an organization asks once and remembers it.\n- **A directory links to one app.** `deploy` from a linked directory\n updates that app; `clawnify link <id-or-slug>` adopts an existing one.\n- **Non-interactive flags exist for every prompt** \u2014 use them in\n scripts and CI (`-y`, `--update-existing`, `--create-new`, `--org`).\n\n## Authenticate\n\n```bash\nclawnify login # opens the browser; also prints the sign-in URL\nclawnify whoami # current user, active org (if linked)\n```\n\n`login` works from any browser: if the browser runs on the same\nmachine, sign-in completes automatically; otherwise the page shows a\ncode to paste back at the `Paste code here if prompted >` prompt\n(useful over SSH \u2014 no port forwarding needed).\n\n**Headless / CI / agents \u2014 skip `login` entirely.** Set `CLAWNIFY_TOKEN` (a\nSupabase access token) and it wins over any stored session, reading/writing no\nfiles; `CLAWNIFY_ORG_ID` (or a per-command `--org`) pins the org. This is how a\ncoding agent runs the CLI without a browser.\n\n### Organizations\n\nYou belong to one or more orgs; apps live inside an org.\n\n```bash\nclawnify org list # orgs you belong to (* marks active)\nclawnify org use <slug-or-id> # switch the active org\n```\n\nNo need to pick one up front \u2014 the first org-scoped command prompts\nonce and persists the choice. Any single command can override with\n`--org <slug-or-id>`.\n\n## Create and run locally\n\n```bash\nclawnify init [dir] # interactive: app or website\nclawnify init my-app -y # non-interactive defaults (blank app)\nclawnify init --type app --template crud --name my-app\nclawnify init --type website --name my-site\nclawnify dev [dir] [--port 8787] # local dev server\n```\n\n`init` also installs AI files (rules + skills + MCP config) for any\ncoding agents detected in the project; skip with `--no-ai-files`.\n\n## Deploy\n\n```bash\nclawnify deploy # deploy the current directory\nclawnify deploy path/to/app\nclawnify deploy --from owner/repo # deploy straight from GitHub\nclawnify deploy --from owner/repo --path apps/web # monorepo subdir\nclawnify deploy --dry-run # list files that would upload\n```\n\nFirst deploy creates the app and links the directory (writes a local\nproject file); later deploys update the same app. On a slug conflict\nyou'll be asked \u2014 or decide up front:\n\n```bash\nclawnify deploy -y # reuse/update the existing app\nclawnify deploy --update-existing # same, explicit\nclawnify deploy --create-new # take the suggested new slug\n```\n\nLink an existing deployed app to the current directory instead of\ncreating a new one:\n\n```bash\nclawnify link <app-id-or-slug>\n```\n\n## Inspect and manage deployed apps\n\n```bash\nclawnify ls # list deployed apps in the active org\nclawnify logs <app-id> # build logs\nclawnify open <slug> # open the live app in the browser\nclawnify rm <app-id> # delete an app\nclawnify pull schema --from <app-id-or-slug> # fetch live schema.sql\nclawnify docs [slug] # usage README for an app (org index if omitted)\n```\n\n`pull schema` refuses to clobber local uncommitted changes unless you\npass `--force`.\n\n## Manage agents (the FDE surface)\n\nDrive an org's AI agents from the terminal \u2014 observe them and fix them. See the\n`fix-a-clawnify-agent` skill for the workflow; this is the command list. All\norg-scoped and **repo-independent** (reads session data + the box, never a\nGitHub repo). Add `--server <id>` when the org has more than one server.\n\n```bash\nclawnify servers list # the org's servers (an org can have several)\nclawnify agents list # agents on a server (main + specialists)\nclawnify agents skills [agent] # what an agent can ACTUALLY run (not just its workspace)\nclawnify sessions --agent <slug> --json # stored sessions + token counters (contextTokens = bloat)\nclawnify sessions history <key> --json # one session's transcript \u2014 where it veered\nclawnify agents pull [dir] --agent <slug> # fetch AGENTS.md + skills/ to edit (flows/ come with main only \u2014 flows belong to the main agent)\nclawnify agents push [dir] # push edits back (additive; next session, no restart)\nclawnify agents grant-skill <s> --to <a> # share a main-authored skill (or --all for every agent)\nclawnify agents create <slug> --yes # new specialist (RESTARTS the gateway)\nclawnify env set <KEY> <VALUE> # org custom env \u2014 NON-SECRET only (restarts gateway)\nclawnify connections connect <id> # how to connect an integration (dashboard OAuth; you can't)\nclawnify flows list # the main agent's flows + latest published version\nclawnify flows read <name> # print a flow's draft\nclawnify flows create <name> --file f.json # new draft (validated on save)\nclawnify flows edit <name> # edit the draft ($EDITOR, or --file to replace)\nclawnify flows publish <name> # cut the next numbered live version\n```\n\n**Flows:** drafts never change what's live \u2014 runs and triggers use the latest\n**published** version. `create`/`edit`/`publish` validate automatically and\nreport per-node errors; fix and re-save. Prefer these verbs over pushing raw\n`flows/*.json` edits (which skip validation and versioning).\n\n**Boundary:** everything above is autonomous *except* the human-auth actions \u2014\nconnecting an integration (OAuth) and handing over a secret/API key. For those,\nexplain the dashboard steps; never fake them. `agents create` / `env set`\nrestart the gateway, so confirm before running them on a busy box.\n\n## Connections & env names\n\n```bash\nclawnify connections list # the org's naming catalog (\u25CF connected / \u25CB not)\nclawnify connections connect <id> # how to connect one \u2014 dashboard OAuth; the CLI/agent can't do it for you\n```\n\nLists the active org's integrations (canonical ids + connected state),\nprovider API keys (fixed names + set state), and custom env vars. Read\nit before declaring `credentials` or env names in `clawnify.json` and\nreuse the exact identifiers it shows \u2014 a misspelled id or key name\ndoesn't fail the build, it silently resolves to nothing at runtime.\n\n## Workspaces (one repo, one org's apps)\n\n```bash\nclawnify workspace init [dir] [--org <slug-or-id>]\n```\n\nScaffolds a monorepo bound to an org; apps scaffolded inside land\nunder `apps/` and inherit the org on deploy.\n\n## Wire up coding agents\n\n```bash\nclawnify ai-files install # rules + skills + MCP server in one step\nclawnify skills list # bundled skills\nclawnify skills add <name> # install one into detected agents\nclawnify mcp # stdio MCP bridge (Claude Desktop, etc.)\n```\n\n`ai-files install` detects agent config dirs in the project (Claude\nCode, Cursor, OpenClaw, Codex, Aider) and writes the always-on rules\nblock, installs bundled skills, and adds the Clawnify MCP server to\n`.mcp.json`. Target one agent with `--agent <name>`; undo with\n`clawnify ai-files uninstall`.\n\n## The raw escape hatch\n\n```bash\nclawnify api /servers # any GET\nclawnify api /servers/<id>/agents -X POST -d '{\u2026}' # any method + JSON body\n```\n\n`clawnify api <path>` makes an authenticated request to any Clawnify API path \u2014\nsame auth and org scoping as every other command (it can only do what you can).\nUse it for anything the porcelain doesn't wrap; the curated commands stay small\nbecause this is always there.\n\n## Tips\n\n- `npx clawnify@latest <command>` always runs the newest release.\n- Every org-scoped command accepts `--org` \u2014 prefer it in scripts over\n relying on the saved active org.\n- If sign-in ever fails mid-flow, just run `clawnify login` again; it\n is safe to repeat.\n"
|
|
1416
1416
|
},
|
|
1417
1417
|
{
|
|
1418
1418
|
name: "fix-a-clawnify-agent",
|
|
1419
1419
|
description: `Diagnose and fix a Clawnify AI agent that veers off its instructions, ignores specific rules, forgets things, repeats the same mistake, or burns a lot of API credits. Use when someone says their agent (e.g. "Ash") won't follow instructions, keeps going off-path, or is expensive \u2014 read the agent's own sessions, find the real cause, and fix the instructions / sessions / flow instead of patching blind.`,
|
|
1420
|
-
content: "# Fix a misbehaving Clawnify agent\n\nYou are the planner and thinker. The Clawnify agent \u2014 the customer's\nWhatsApp / Telegram / Slack / email \"AI employee\", running OpenClaw on their\nserver \u2014 is the executor. When it misbehaves your job is to **read what it\nactually did, find the real cause, and change the durable inputs.** Not to\npatch instructions blind, and not to burn the agent's own (expensive) model\ntokens on trial-and-error.\n\nThe person you're helping is often **not** an AI specialist. So: diagnose\nfirst, then **explain the cause in plain language and correct the\nmisconception** before you change anything.\n\n## The one rule: don't debug blind\n\n\"Veers off / ignores instructions\" has **three different causes with three\ndifferent fixes.** You can only tell which one by reading the agent's actual\nsession. Patching instructions without looking is exactly why it \"isn't\nheading in the right direction\" \u2014 and every blind test run costs model tokens.\n\n| Cause | What you'll see in the session | Fix |\n|---|---|---|\n| **1. Session bloat** | Was fine early, degrades over a long-running chat; forgets/repeats; high `contextTokens`; compaction/truncation in the transcript; the rule is simply *absent* from recent context | Scope a **fresh session per task**; reset/retire the bloated one |\n| **2. Instruction patchwork** | The rule *was* in context but a **contradicting or older** rule won, or it's buried in a wall of text | **Restructure** `AGENTS.md` (don't add another patch) |\n| **3. Wrong structure** | A repeatable multi-step task the agent improvises differently each time | Move it to a **flow** (deterministic rails) |\n\nBloat and patchwork also explain most **surprise API costs**: a bloated\nsession re-sends a huge context on *every* turn, and the patch-and-rerun loop\nitself burns tokens. Measure it \u2014 don't guess (Step 1).\n\n## Step 1 \u2014 Observe (read what actually happened)\n\n```bash\nclawnify sessions # every agent's sessions on the server, newest first\nclawnify sessions --agent ash --json # ash only, with token counters (contextTokens = bloat signal)\nclawnify sessions history <key> --json # the transcript of one run \u2014 where it actually veered\nclawnify agents skills ash # what ash can ACTUALLY run (workspace + shared skills)\n```\n\nLook for, in order:\n- **Which failure mode** (table above): was the instruction *present and\n ignored* (\u2192 patchwork/structure) or *compacted away / absent* (\u2192 bloat)?\n- **`contextTokens`** on the session \u2014 large and growing = bloat.\n- **A missing skill** \u2014 if the instruction says \"use skill X\" but `agents\n skills` doesn't list it, the agent literally can't. The fix is to grant it\n (`clawnify agents grant-skill X --to ash`, or `--all` for every agent) if it's\n already authored in main, else author it first (`agents pull main` \u2192 add\n `skills/X/SKILL.md` \u2192 `agents push`) \u2014 not to reword the instruction. (Note:\n what's in the agent's *workspace* is only part of it \u2014 `agents skills` shows\n the effective set incl. shared managed-root skills.)\n- **Where the tokens go** \u2014 one giant session, or repeated retries after a\n veer? That's your cost answer, from data, not a hypothesis.\n\n> If `clawnify sessions` isn't available yet in this org, fall back: ask the\n> person to describe (or paste) one failing run, and read the current\n> `AGENTS.md` from the org's synced repo. You still diagnose before you fix.\n\n## Step 2 \u2014 Explain, then fix\n\nTell the person, plainly, which of the three it is and why. Then:\n\n**Bloat \u2192** don't reuse one ever-growing chat for the same task. Start a fresh\nsession per task/topic (or `/reset` the runaway one). This fixes the veer\n*and* the cost.\n\n**Patchwork \u2192** rewrite `AGENTS.md`, don't append to it. Structure it: **role\n\u2192 a short list of hard rules up front \u2192 the steps \u2192 one example of right vs\nwrong.** Delete contradictions. A tight, prioritized instruction set is\nfollowed far better than a long patched one.\n\n**Structure \u2192** author a **flow** for the repeatable task: deterministic steps,\neach with a narrow instruction, and the heavy/deterministic parts (fetch data,\nfill a template, render the deck) run *without* the model \u2014 less veer, less cost.\n\nWhere instructions live and how edits land:\n- Edit **`AGENTS.md`** (and `skills
|
|
1420
|
+
content: "# Fix a misbehaving Clawnify agent\n\nYou are the planner and thinker. The Clawnify agent \u2014 the customer's\nWhatsApp / Telegram / Slack / email \"AI employee\", running OpenClaw on their\nserver \u2014 is the executor. When it misbehaves your job is to **read what it\nactually did, find the real cause, and change the durable inputs.** Not to\npatch instructions blind, and not to burn the agent's own (expensive) model\ntokens on trial-and-error.\n\nThe person you're helping is often **not** an AI specialist. So: diagnose\nfirst, then **explain the cause in plain language and correct the\nmisconception** before you change anything.\n\n## The one rule: don't debug blind\n\n\"Veers off / ignores instructions\" has **three different causes with three\ndifferent fixes.** You can only tell which one by reading the agent's actual\nsession. Patching instructions without looking is exactly why it \"isn't\nheading in the right direction\" \u2014 and every blind test run costs model tokens.\n\n| Cause | What you'll see in the session | Fix |\n|---|---|---|\n| **1. Session bloat** | Was fine early, degrades over a long-running chat; forgets/repeats; high `contextTokens`; compaction/truncation in the transcript; the rule is simply *absent* from recent context | Scope a **fresh session per task**; reset/retire the bloated one |\n| **2. Instruction patchwork** | The rule *was* in context but a **contradicting or older** rule won, or it's buried in a wall of text | **Restructure** `AGENTS.md` (don't add another patch) |\n| **3. Wrong structure** | A repeatable multi-step task the agent improvises differently each time | Move it to a **flow** (deterministic rails) |\n\nBloat and patchwork also explain most **surprise API costs**: a bloated\nsession re-sends a huge context on *every* turn, and the patch-and-rerun loop\nitself burns tokens. Measure it \u2014 don't guess (Step 1).\n\n## Step 1 \u2014 Observe (read what actually happened)\n\n```bash\nclawnify sessions # every agent's sessions on the server, newest first\nclawnify sessions --agent ash --json # ash only, with token counters (contextTokens = bloat signal)\nclawnify sessions history <key> --json # the transcript of one run \u2014 where it actually veered\nclawnify agents skills ash # what ash can ACTUALLY run (workspace + shared skills)\n```\n\nLook for, in order:\n- **Which failure mode** (table above): was the instruction *present and\n ignored* (\u2192 patchwork/structure) or *compacted away / absent* (\u2192 bloat)?\n- **`contextTokens`** on the session \u2014 large and growing = bloat.\n- **A missing skill** \u2014 if the instruction says \"use skill X\" but `agents\n skills` doesn't list it, the agent literally can't. The fix is to grant it\n (`clawnify agents grant-skill X --to ash`, or `--all` for every agent) if it's\n already authored in main, else author it first (`agents pull main` \u2192 add\n `skills/X/SKILL.md` \u2192 `agents push`) \u2014 not to reword the instruction. (Note:\n what's in the agent's *workspace* is only part of it \u2014 `agents skills` shows\n the effective set incl. shared managed-root skills.)\n- **Where the tokens go** \u2014 one giant session, or repeated retries after a\n veer? That's your cost answer, from data, not a hypothesis.\n\n> If `clawnify sessions` isn't available yet in this org, fall back: ask the\n> person to describe (or paste) one failing run, and read the current\n> `AGENTS.md` from the org's synced repo. You still diagnose before you fix.\n\n## Step 2 \u2014 Explain, then fix\n\nTell the person, plainly, which of the three it is and why. Then:\n\n**Bloat \u2192** don't reuse one ever-growing chat for the same task. Start a fresh\nsession per task/topic (or `/reset` the runaway one). This fixes the veer\n*and* the cost.\n\n**Patchwork \u2192** rewrite `AGENTS.md`, don't append to it. Structure it: **role\n\u2192 a short list of hard rules up front \u2192 the steps \u2192 one example of right vs\nwrong.** Delete contradictions. A tight, prioritized instruction set is\nfollowed far better than a long patched one.\n\n**Structure \u2192** author a **flow** for the repeatable task: deterministic steps,\neach with a narrow instruction, and the heavy/deterministic parts (fetch data,\nfill a template, render the deck) run *without* the model \u2014 less veer, less cost.\n\nWhere instructions live and how edits land:\n- Edit **`AGENTS.md`** (and `skills/`). Push via the org's **GitHub\n sync repo** (auto-deploys to the box) or `clawnify deploy`. See the\n `use-the-clawnify-cli` skill for the commands.\n- Edit **flows** with `clawnify flows edit <name>` then `clawnify flows\n publish <name>` \u2014 validated on save, and drafts aren't live until published\n (runs and triggers keep using the last published version). Raw `flows/*.json`\n edits via the repo also land, but skip validation and versioning.\n- **No gateway restart needed** \u2014 the agent picks up new `AGENTS.md` / skills /\n flows on its **next session**.\n- **Never edit any `CLAWNIFY-*.md`** file (`CLAWNIFY-SOUL/AGENTS/TOOLS.md`) \u2014\n those are platform-owned and Clawnify overwrites them on every sync. Your\n edits there vanish.\n\n## How Clawnify agents actually work (what people get wrong)\n\nPreempt these \u2014 they cause \"I set it up but the agent ignores it\":\n\n- **Adding a document to Knowledge does NOT mean the agent reads it.**\n (1) A doc must be **published by a human** \u2014 an agent \"proposing\" it only\n creates a draft. (2) Once published, the agent only *automatically* sees its\n **title + one-line description** (a capped, ~30-item index); the **actual\n content is fetched only when the agent chooses to search** it\n (`company_knowledge_search`). So if the agent ignores a doc, check: is it\n published? not hidden? still in the index? does its `AGENTS.md` tell it to\n search? \u2014 **re-uploading won't help.** Depth: the `organize-company-knowledge` skill.\n- **Memory** is written by the agent via a tool (`memory_write`) and surfaced\n as an index + per-turn recall \u2014 it is **not** a file/folder you drop notes\n into.\n- **The dashboard \"recurring skill\" cards are manual-click only** \u2014 the\n cron/every/at schedule shown is **not wired to a scheduler.** For real\n scheduled or event-driven work use a **cron job or a flow/webhook**, not a\n recurring-skill card.\n- **Native channels** (WhatsApp/Telegram/Slack) receive messages \"for free\"\n via the allowlist \u2014 there is **no trigger/webhook to set up** for incoming\n messages. (Only Clawnify *integrations* have dashboard triggers.)\n\n## Answering \"would a different agent / a flow help?\"\n\n- **Same agent for the same task \u2192 confusion?** The agent identity isn't the\n problem; a reused, ever-growing **session** is (bloat, above). A second agent\n doesn't fix the mechanism and doubles what you manage. Fresh sessions do.\n- **Would a flow be better?** Yes *if* the task is repeatable and structured \u2014\n it constrains the agent and moves deterministic work off-model (less veer,\n less cost). No if the underlying step instructions are vague \u2014 a flow\n structures, it doesn't clarify.\n\n## Guardrails\n\n- **Diagnose before you change anything.** One transcript read beats five blind\n patches.\n- **Never** edit `CLAWNIFY-*.md` (overwritten) \u2014 edit `AGENTS.md`.\n- **Confirm with the human before anything irreversible or outward-facing:**\n sending messages on the agent's live channels, deleting an agent or app,\n billing/plan changes, rotating credentials. Self-service is not unattended\n autonomy.\n- **Connecting an integration is a hard stop, not a confirm.** If a fix needs a\n Clawnify integration that `clawnify connections list` shows as not connected\n (\u25CB), you *cannot* connect it \u2014 that needs the user's OAuth sign-in in a\n browser. Run `clawnify connections connect <id>` and relay the steps to the\n user; never attempt it yourself or ask for their password.\n- **Never put a secret through `clawnify env set`** \u2014 it exposes the value in\n the command and your context. Secrets and API keys go in the dashboard\n (Settings \u2192 Environment Variables / API Keys); guide the user there. Use\n `env set` only for non-secret config. And remember `agents create` / `env set`\n **restart the gateway** \u2014 confirm with the user before you run them on a live,\n busy box.\n- Prefer the **smallest durable fix** (a session habit, a tightened `AGENTS.md`,\n one flow) over more instructions.\n"
|
|
1421
1421
|
}
|
|
1422
1422
|
];
|
|
1423
1423
|
var RULES_CONTENT = "You are working inside a **Clawnify app** \u2014 a full-stack project that deploys to\nCloudflare through the Clawnify platform. Follow these rules.\n\n## Stack (fixed \u2014 do not swap)\n\n- **Frontend:** React 19 + Tailwind v4, built with Vite.\n- **API:** Hono (`@hono/zod-openapi`) running on Cloudflare Workers.\n- **Database:** D1 (SQLite at the edge) via `@clawnify/db` (Drizzle).\n\nOne app = one `clawnify.json` manifest at the repo root. Don't introduce other\nframeworks, ORMs, or hosting targets.\n\n## The schema lives in `src/server/schema.ts`\n\n- Define tables with the Drizzle DSL there \u2014 it is the single source of truth.\n- **Never** hand-write SQL migrations or edit a `schema.sql` by hand. `clawnify\n dev` and `clawnify deploy` run `drizzle-kit generate` for you.\n- Every user-facing table needs an `org_id` column, and every query must filter\n by the `X-Clawnify-Org-Id` request header. This is how multi-tenancy works \u2014\n there are no exceptions.\n\n## Identity comes from request headers, never the client\n\nThe platform injects identity headers the client cannot forge:\n`X-Clawnify-User-Id`, `X-Clawnify-Org-Id`, `X-Clawnify-User-Email`,\n`X-Clawnify-Caller`. Read them server-side. Never trust a client-supplied user\nor org id.\n\n## Integrations: use `@clawnify/connections`\n\nDon't store per-service API keys or OAuth secrets in the app. Declare what the\napp needs under `app.credentials` in `clawnify.json`, then call\n`connect(service, env)` and `secret(name, env)` from the SDK. Off-platform\n(local dev, scripts), put a `clw_` org service token in `.dev.vars` as\n`CLAWNIFY_TOKEN` \u2014 the SDK then resolves your **real** org connections over HTTP\nwith no per-service secrets.\n\n## Commands\n\n- `clawnify dev` \u2014 local dev server. D1 runs as local SQLite, identical to\n production. Leave it running in a separate terminal so generated types stay\n fresh.\n- `clawnify deploy` \u2014 ships the app live at `https://<slug>.apps.clawnify.com`.\n- Don't invoke raw `wrangler` or `drizzle-kit` \u2014 the CLI wraps them. Editing\n `schema.ts` and running `clawnify dev`/`deploy` is the whole workflow.\n\n## Going deeper\n\nFor the full gold-standard structure \u2014 routing, OpenAPI route definitions,\nclient data-fetching patterns, file uploads \u2014 read the **build-a-clawnify-app**\nskill installed alongside these rules.\n";
|
|
@@ -3924,7 +3924,7 @@ async function runCli() {
|
|
|
3924
3924
|
agents.command("skills [agent]").description("Show an agent's effective skill inventory (what it can actually run, not just its workspace)").option("--server <id>", "Target server (default: the org's server)").action(agentsSkillsCommand);
|
|
3925
3925
|
agents.command("grant-skill <skill>").description("Grant an existing (main-authored) skill to one agent (--to) or every agent (--all)").option("--server <id>", "Target server (default: the org's server)").option("--to <agent>", "Grant to one specialist agent").option("--all", "Grant to every agent (shared managed root; includes future agents)").action(agentsGrantSkillCommand);
|
|
3926
3926
|
agents.command("create <slug>").description("Create a new specialist agent (RESTARTS the gateway \u2014 needs --yes)").option("--server <id>", "Target server (default: the org's server)").option("--name <name>", "Display name (default: the slug)").option("--description <role>", "The agent's role/specialization (seeded into its AGENTS.md)").option("--yes", "Confirm \u2014 proceed with the gateway restart").action(agentsCreateCommand);
|
|
3927
|
-
const flows = program.command("flows").description("Manage ClawFlows: create/edit drafts, publish versions");
|
|
3927
|
+
const flows = program.command("flows").description("Manage the main agent's ClawFlows: create/edit drafts, publish versions");
|
|
3928
3928
|
flows.command("list", { isDefault: true }).description("List flow drafts and their latest published version").option("--server <id>", "Target server (default: the org's server)").option("--json", "Print the raw JSON payload").action(flowsListCommand);
|
|
3929
3929
|
flows.command("read <name>").description("Print a flow's current draft definition").option("--server <id>", "Target server (default: the org's server)").action(flowsReadCommand);
|
|
3930
3930
|
flows.command("create <name>").description("Create a flow draft from a local JSON definition").option("--file <path>", "Flow definition JSON (required)").option("--server <id>", "Target server (default: the org's server)").action(flowsCreateCommand);
|
|
@@ -3963,4 +3963,4 @@ async function runCli() {
|
|
|
3963
3963
|
export {
|
|
3964
3964
|
runCli
|
|
3965
3965
|
};
|
|
3966
|
-
//# sourceMappingURL=cli-
|
|
3966
|
+
//# sourceMappingURL=cli-I6PEAOPC.js.map
|