@xano/developer-mcp 2.3.0-beta.1 → 2.3.0-beta.10

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 (46) hide show
  1. package/README.md +4 -14
  2. package/dist/cli_docs/index.js +0 -4
  3. package/dist/cli_docs/topics/function.js +0 -2
  4. package/dist/cli_docs/topics/knowledge.js +1 -2
  5. package/dist/cli_docs/topics/workspace.js +23 -12
  6. package/dist/meta_api_docs/index.js +0 -2
  7. package/dist/meta_api_docs/topics/api.js +6 -6
  8. package/dist/meta_api_docs/topics/apigroup.js +2 -2
  9. package/dist/meta_api_docs/topics/authentication.js +1 -1
  10. package/dist/meta_api_docs/topics/history.js +42 -11
  11. package/dist/meta_api_docs/topics/mcp_server.js +6 -6
  12. package/dist/meta_api_docs/topics/middleware.js +1 -1
  13. package/dist/meta_api_docs/topics/table.js +2 -2
  14. package/dist/meta_api_docs/topics/workflows.js +1 -1
  15. package/dist/meta_api_docs/topics/workspace.js +1 -1
  16. package/dist/tools/validate_xanoscript.js +6 -9
  17. package/dist/xanoscript.js +0 -1
  18. package/dist/xanoscript_docs/README.md +25 -8
  19. package/dist/xanoscript_docs/agents.md +14 -5
  20. package/dist/xanoscript_docs/ai.md +820 -0
  21. package/dist/xanoscript_docs/branch.md +109 -29
  22. package/dist/xanoscript_docs/database.md +7 -5
  23. package/dist/xanoscript_docs/docs_index.json +36 -22
  24. package/dist/xanoscript_docs/essentials.md +53 -19
  25. package/dist/xanoscript_docs/file-uploads.md +4 -4
  26. package/dist/xanoscript_docs/mcp-servers.md +2 -2
  27. package/dist/xanoscript_docs/prompts.md +4 -2
  28. package/dist/xanoscript_docs/realtime-v2.md +4 -2
  29. package/dist/xanoscript_docs/resources.md +3 -1
  30. package/dist/xanoscript_docs/survival.md +1 -5
  31. package/dist/xanoscript_docs/tables.md +58 -0
  32. package/dist/xanoscript_docs/tools.md +1 -1
  33. package/dist/xanoscript_docs/triggers.md +133 -3
  34. package/dist/xanoscript_docs/types.md +14 -1
  35. package/dist/xanoscript_docs/unit-testing.md +29 -2
  36. package/dist/xanoscript_docs/version.json +2 -2
  37. package/dist/xanoscript_docs/workflow-tests.md +18 -0
  38. package/dist/xanoscript_docs/working.md +39 -15
  39. package/package.json +2 -3
  40. package/dist/cli_docs/topics/policy.d.ts +0 -2
  41. package/dist/cli_docs/topics/policy.js +0 -91
  42. package/dist/cli_docs/topics/skills.d.ts +0 -2
  43. package/dist/cli_docs/topics/skills.js +0 -57
  44. package/dist/meta_api_docs/topics/policy.d.ts +0 -3
  45. package/dist/meta_api_docs/topics/policy.js +0 -135
  46. package/dist/xanoscript_docs/policies.md +0 -308
@@ -1,91 +0,0 @@
1
- const flags = [
2
- { name: "workspace", short: "w", type: "string", description: "Workspace ID; defaults to the selected official CLI profile" },
3
- { name: "branch", short: "b", type: "string", description: "Branch label; use the same branch for publishing and evaluating" },
4
- { name: "profile", short: "p", type: "string", description: "Official CLI profile name" },
5
- { name: "output", short: "o", type: "string", default: "summary", description: "summary or json" },
6
- { name: "verbose", short: "v", type: "boolean", default: "false", description: "Print the request the CLI makes and the raw platform response beside the normal output; useful when a refusal or a finding needs to be traced to the route that produced it" },
7
- ];
8
- const messageFlag = { name: "message", short: "m", type: "string", description: "Short label for the Version History entry this publish creates; ignored when the definition is unchanged" };
9
- const sourceFlags = [
10
- { name: "file", short: "f", type: "string", description: "Path to one policy XanoScript document; use this or --stdin. policy parse also accepts the path as a positional argument" },
11
- { name: "stdin", type: "boolean", description: "Read one policy document from standard input" },
12
- ];
13
- export const policyDoc = {
14
- topic: "policy",
15
- title: "Xano CLI - Workspace Policies",
16
- description: `Policy support in the official @xano/cli uses the existing profile and Metadata API client. Requires policy-enabled builds of the CLI and instance. A policy combines its human description with deterministic check rules and lives as workspace XanoScript. The policy language - syntax, fields, rules, refusal messages and versioning - is documented once, in xano_xanoscript_docs({topic: "policies"}) (mode: "quick_reference" for the short form; the full topic carries every check's description); this topic covers the commands.
17
-
18
- Use the authenticated Xano MCP tools for live tool calls, or these CLI commands for local workspace files. The standalone developer MCP serves this documentation; it does not itself authenticate to your workspace.`,
19
- ai_hints: `Discover exact check parameters with policy catalogue; each entry carries a human label beside its check id. Native policy parse is the validation authority. The developer MCP's language server checks policy syntax locally, and checks rules only as warnings against its bundled copy of the catalogue, which may be older than the instance. An unknown check id is refused by parse, publish and workspace push with payload.code policy_unknown_check, naming the nearest ids, and the CLI adds a pointer to xano policy catalogue. Do not invent a local policy parser. policy parse prints canonical source, which is sparse and orders params the catalogue's way, so do not read a shorter file as a lost setting.
20
-
21
- Reads, parsing and evaluation need the workspace:policy permission at read level; creating, updating and deleting need it at create, update or delete level. A refused request prints the platform's message and what to do about it, keyed on the refusal's code: the feature is off, the role lacks the permission (an instance admin grants it; a new token does not help), or the token was created without the scope (create one that has it). workspace push lets unchanged policy files through for any reader; a changed policy file from a caller whose permission does not allow the change refuses the whole push, so exclude them with -e "policies/*" or pull again.
22
-
23
- Policy source uses active = true or active = false before enforcement. The retired lifecycle field is refused. policy list labels rows Active, Mandatory; Active, Advisory; or Inactive. Inactive policies are saved directly, skipped by branch checks, and reported with status inactive.
24
-
25
- A parse or validation error in summary output is located at line N, col M, with line 1 the first line, followed by the offending text; -o json keeps the platform payload untouched, whose line and col count from 1 too. Every policy command run with -o json reports its own failure as one object on stdout rather than as prose on stderr: {"error": {"message": "...", "exit": 1}}, and exits 1. Exit 2 is never an error object: it is reserved for blocking findings, which are ordinary results.
26
-
27
- policy evaluate and workspace push print the platform's policy_check verdict (see the Metadata API policy topic for the statuses). Their exit code follows the import and the blocking policies only: 1 when the import or the request fails, 2 whenever policy_check.blocking is true (an active mandatory policy has findings; an inactive policy never blocks), and 0 otherwise. A pass, a fail and not_applicable (no active policy on the branch) print a headline with the platform's message; disabled, forbidden, unavailable, error or no feedback at all print one warning line on stderr with the platform's status and message, and leave the exit code alone. For CI, key on policy_check.blocking in -o json rather than on status: advisory findings arrive as status fail with blocking false. A policy finding never rolls back imported code on a branch that is not live. A push to the live branch is gated before it commits: a 403 policy_gate refusal exits 2, says nothing was imported, lists the blocking findings and introduced/changed counts, and under -o json prints {imported: false, refused: <payload>}; --policy-override "<reason>" sends an audited override (workspace:policy update), and --no-transaction to live is refused (exit 1). A create past the plan's per-branch cap is refused with policy_plan_limit, naming the plan. Releases carry policies: release create, push and import print the release's stored policy check; tenant deploy_release --check prints the deploy gate's verdict and --override-reason overrides it; tenant_deploy_request set_status and bypass take --override-policy; a refused deploy exits 2. release deploy --set_live and branch set_live exit 2 when the set-live gate refuses (a refused release deploy keeps the new branch and names it), and function create and function edit exit 2 when the live-branch publish gate refuses the save (nothing is saved); each takes --policy-override "<reason>" (workspace:policy update; only with the user's own reason), a blank one is refused before any request, and any other failure exits 1. A workspace push (its --dry-run too), branch set_live, release deploy --set_live or policy delete (of an active mandatory policy) that weakens a mandatory policy without workspace:policy update is refused with policy_weakening_permission_required and exits 1, a permission refusal rather than a blocking finding: the CLI prints the platform's sentence and how to go on (leave the policy files out with -e "policies/*"; a deployed release's branch stays and is named), and --policy-override does not lift it. policy parse and policy publish print rule warnings on stderr.
28
-
29
- A rule with zero objects checked and no findings has status no_objects and message no objects checked. Older stored runs keep pass with checked: 0; readers accept both. The run and policy_check stay pass when nothing failed, and policy_check.message names the unchecked rules. Merge, publish and deploy gates read findings and are unaffected. The CLI summary renders both as no objects checked, never as an error; policy status keeps its no_objects_checked row status.
30
-
31
- A run can hold tens of thousands of findings, so large ones are read a page at a time. The policy_check a workspace push answers lists the first 100 findings and blocking findings, beside counts {findings, blocking, errors}, total and truncated; when the lists were cut the push prints the counts, heads each list "first 100 of N" and ends with Listed: the first 100 of N; \`xano policy runs <run_id>\` has them all. policy runs <id> reads a run's summary and one page of its findings (--offset, --limit up to 500, and filters), or every page with --all, and policy status reads the latest run's summary; policy evaluate --summary answers the run summary with its first 50 findings; policy evaluate without it still answers the whole run.
32
-
33
- Publishing an identical definition writes nothing and prints No changes; JSON output carries unchanged: true. Do not add a cosmetic edit to force a version. Version history is listed, diffed and restored in the Xano dashboard only; there is no CLI command for it. policy status reads the platform's latest_run for each policy: a policy is stale when it changed after the branch's newest run, so that run's findings no longer describe it.
34
-
35
- workspace pull writes policies to policies/<KEY>.xs when the credential can read them (without workspace:policy read the pull succeeds and omits them) and prints one hint after a pull that included them: Run \`xano skills pull\` to install the policies skill for your coding agent (see the skills topic). workspace push includes policies in the normal multidoc import and reports policy_check afterward; the workspace topic covers its -m/--message. sandbox push and ephemeral push (and their --dry-run) and release push carry policy files while the instance's Policies feature is on: a sandbox or ephemeral push lands them without evaluating them (no policy_check), and release push sends policies/*.xs with the rest and prints the release's stored policy check. A release built by release push carries those files only for a caller holding workspace:policy create and update; for anyone else it carries the workspace's live-branch policies instead, and the push prints the platform's policies_skipped message naming the files when they differ from the live ones. release import of an archive that carries policies needs the same workspace:policy create and update: without them the platform refuses it, nothing is stored, and the CLI prints the platform's message and the remedy for the role or the token. A push to a remote tenant, a push to a tenant created before policies (it has no policy table until its next platform update), or any push while the feature is off leaves them out, and the push prints the platform's policies_skipped message once, as a warning naming the files and why. While the instance's Policies feature is off, workspace pull carries no policies (and prints no skills hint) and workspace push leaves its policy files out, printing the platform's one line instead of a policy count. Existing workspace push deletion/sync behavior remains governed by its normal flags.`,
36
- related_topics: ["workspace", "profile", "branch", "skills"],
37
- commands: [
38
- { name: "policy catalogue", description: "List built-in checks, their schemas and analysis limitations from the instance. The full catalogue is long; --check narrows it to one check id in either output mode, and an unknown id names the closest matches.", usage: "xano policy catalogue [options]", flags: [...flags, { name: "check", type: "string", description: "Show only this check id" }], examples: ["xano policy catalogue -o json", "xano policy catalogue --check object.auth_required"] },
39
- { name: "policy list", description: "List policies on the selected branch, each with its active state, id and current version.", usage: "xano policy list [options]", flags, examples: ["xano policy list -b dev -o json"] },
40
- {
41
- name: "policy create",
42
- description: "Create an independent Active, Advisory policy from a platform goal (the goals in policy catalogue -o json). Copies the goal's sparse settings; every needs path must be filled with --param. Parsed natively before saving. A taken goal key gets a free numeric suffix (case-insensitive); a taken explicit --key is refused. Never updates an existing policy and stores no link to the goal. Rule warnings go to stderr; -o json prints the saved policy.",
43
- usage: "xano policy create --goal <id> [--key KEY] [--param N.path=JSON ...] [options]",
44
- flags: [...flags, messageFlag, { name: "goal", type: "string", required: true, description: "Goal id from the catalogue's goals" }, { name: "key", type: "string", description: "Policy key; defaults to the goal's suggested key" }, { name: "param", type: "string", description: "Repeatable N.path=JSON override; rule numbers start at 1, and the N. prefix is optional for a single-rule goal" }],
45
- examples: ["xano policy create --goal endpoints_need_login -b dev", "xano policy create --goal no_pii_in_responses --key DATA-020 --param 'fields=[\"email\",\"ssn\"]'"],
46
- },
47
- {
48
- name: "policy parse",
49
- description: "Parse and format source on the instance without saving. Summary output is canonical XanoScript; JSON includes {policy, source}. The file may be given as a positional argument or with --file - they are the same input, and --stdin is unchanged.",
50
- usage: "xano policy parse [file] [options]",
51
- args: [{ name: "file", required: false, description: "Path to one policy XanoScript document, the positional form of --file. Omit it and pass --stdin to read the document from standard input" }],
52
- flags: [...flags, ...sourceFlags],
53
- examples: ["xano policy parse policies/AUTH-EXAMPLE.xs", "xano policy parse --file policies/AUTH-EXAMPLE.xs", "cat policies/AUTH-EXAMPLE.xs | xano policy parse --stdin -o json"],
54
- },
55
- { name: "policy publish", description: "Parse one policy, then create or update by its stable key on the selected branch using canonical source. Prints Published KEY (Version N), or No changes to KEY (Version N) when the definition already matches what is stored. Use workspace push for an atomic multi-policy import.", usage: "xano policy publish --file <path> [options]", flags: [...flags, ...sourceFlags, messageFlag], examples: ["xano policy publish --file policies/AUTH-EXAMPLE.xs -b dev", "xano policy publish --file policies/AUTH-EXAMPLE.xs -m \"Tightened the scope\""] },
56
- { name: "policy evaluate", description: "Evaluate active policies and store a new run, then print the platform's verdict and the run's findings. Exits 2 when policy_check.blocking is true, and 0 for every other verdict; not_applicable (no active policy) prints a headline with the platform's message and is no run: nothing is stored, so there is no Not stored line and nothing new in policy runs. Only a disabled, forbidden, unavailable or errored verdict prints one warning line. A credential that may read but not write gets its findings with nothing stored, and the CLI says Not stored. --policy KEY tries that one policy alone, even if inactive: nothing is stored or audited, the latest run is untouched, nothing is gated, and each rule's clear objects are named; an inactive trial never exits 2, and a blank key is refused before any request.", usage: "xano policy evaluate [options]", flags: [...flags, { name: "policy", type: "string", description: "Try this one policy key alone (a trial: never stored or audited)" }, { name: "run-detail", type: "boolean", default: "false", description: "Also print what this run recorded: each policy's statement and each rule's name and resolved settings" }, { name: "summary", type: "boolean", default: "false", description: "Send answer: summary: answer the run summary (counts, each policy's verdict, rule results) and its first 50 findings instead of the whole run, and say which run has the rest. -o json passes that answer through" }], examples: ["xano policy evaluate -b dev -o json", "xano policy evaluate --run-detail", "xano policy evaluate --summary -o json", "xano policy evaluate --policy AUTH-001"] },
57
- {
58
- name: "policy runs",
59
- description: "List the runs the branch retains (only the newest twenty exist), newest first, with status, finding count, objects checked, trigger and start time. With a run id, read that one run, including one older than the latest, which policy status cannot reach: its summary (counts, each policy's verdict, rule results) and one page of its findings in the platform's order, blocking first, 100 unless --limit says otherwise; a page that is not every finding is marked (one page) and names the next page's --offset. --all reads every page instead (500 a request, saying so on stderr when there are more) and prints or returns every matching finding. The filter flags narrow the findings on the instance; a repeated flag matches any of its values. JSON output is the platform's own body: the run summaries for a list, and for one id the run summary with findings, the page's findings as an array (every one with --all), and findings_page {total, offset, limit, next_offset}, next_offset null after the last. The finding flags need a run id. --release <name> reads a release's policy check (stored when it was cut) the same way, plus its shipped policies; --release-id <id> reads it by id (exclusive with --release and --branch); --recheck checks the release again from its archive and stores the run. Needs the workspace:policy permission at read level.",
60
- usage: "xano policy runs [run_id] [options]",
61
- flags: [
62
- ...flags,
63
- { name: "release", type: "string", description: "Read this release's policy check instead of a branch run" },
64
- { name: "release-id", type: "number", description: "Read a release's policy check by release id" },
65
- { name: "recheck", type: "boolean", default: "false", description: "With --release or --release-id, check the release again and store the run" },
66
- { name: "limit", type: "number", description: "Without a run id, the newest N runs (1-20, default 20); with one, how many findings to print (1-500, default 100)" },
67
- { name: "offset", type: "number", default: "0", description: "With a run id, how many findings to skip" },
68
- { name: "all", type: "boolean", default: "false", description: "With a run id, read every page and print or return every matching finding; not with --offset or --limit" },
69
- { name: "blocking", type: "boolean", default: "false", description: "With a run id, only the blocking findings" },
70
- { name: "advisory", type: "boolean", default: "false", description: "With a run id, only the advisory findings" },
71
- { name: "policy", type: "string", description: "With a run id, only this policy key's findings; repeatable" },
72
- { name: "rule", type: "string", description: "With a run id, only this rule id's findings (AUTH-001.R1); repeatable" },
73
- { name: "severity", type: "string", description: "With a run id, only findings of this severity (critical, high, medium, low); repeatable" },
74
- { name: "kind", type: "string", description: "With a run id, only findings on this object kind; repeatable" },
75
- { name: "object", type: "string", description: "With a run id, only findings on this object, written type:id (query:18); repeatable" },
76
- { name: "tag", type: "string", description: "With a run id, only findings whose policy or object carries this tag; repeatable" },
77
- { name: "search", type: "string", description: "With a run id, only findings whose policy key or title, rule title, object name or message contains this text" },
78
- { name: "run-detail", type: "boolean", default: "false", description: "With a run id, also print the policy statements and rule settings that run recorded" },
79
- ],
80
- examples: ["xano policy runs", "xano policy runs --limit 5", "xano policy runs 1674 --run-detail -o json", "xano policy runs 1674 --offset 100 --limit 100", "xano policy runs 1674 --all -o json", "xano policy runs 1674 --blocking --policy AUTH-001 --severity critical", "xano policy runs --release v1.2", "xano policy runs --release-id 12 --recheck"],
81
- },
82
- { name: "policy delete", description: "Delete a policy from the selected branch, by policy key or by id; its Version History is kept. An unresolved name is refused naming the policies the branch does have. Prompts before deleting; --force skips the prompt. The delete sends the updated_at it listed, so a policy changed after that (for example while the prompt waited) is refused with policy_stale and nothing is deleted: run the command again. This is the only way to remove a policy from the CLI: workspace push is additive, so deleting policies/KEY.xs and pushing leaves the policy in place. Needs the workspace:policy permission at delete level.", usage: "xano policy delete <key-or-id> [options]", flags: [...flags, { name: "force", short: "f", type: "boolean", default: "false", description: "Skip the confirmation prompt; only with the user's explicit confirmation" }], examples: ["xano policy delete TMP-DX-001", "xano policy delete 922 --force -o json"] },
83
- {
84
- name: "policy status",
85
- description: "Inspect stored policy/run state without evaluating. The Enforcement column reads Mandatory or Advisory, and a finding count reads (blocking) when the latest run judged it blocking: the run evaluated the policy in its current version as active and mandatory. A policy is stale when it changed after the branch's newest run (the platform's latest_run), so that run's findings no longer describe it. Informational (exit 0) by default; with --fail-on-findings it exits 2 when the latest run has blocking findings, else 1 for stale, missing or errored evaluation evidence (advisory findings still exit 0), and a nonzero exit is always explained by one line naming the reason. A blocking reason is a prediction: the merge gate evaluates the branch again before a merge. In -o json each row's status is one of pass, fail, error, stale, not_evaluated, no_checks, no_objects_checked or inactive, with blocking, rules_unchecked (a pass whose rules checked no objects) and counted (whether its findings come from the latest run's evidence); --fail-on-findings adds fail_on_findings: {exit, reason}. It reads the latest run's summary, not the whole run, so in -o json run carries each policy's finding count and verdict rather than the findings; xano policy runs <id> lists them.",
86
- usage: "xano policy status [options]",
87
- flags: [...flags, { name: "fail-on-findings", type: "boolean", default: "false", description: "Exit 2 when the latest run has blocking findings; otherwise exit 1 for stale, missing or errored evaluation evidence" }, { name: "run-detail", type: "boolean", default: "false", description: "Also print what the latest run recorded: each policy's statement and each rule's name and resolved settings. Summary output only" }],
88
- examples: ["xano policy status -b dev -o json", "xano policy status --fail-on-findings -o json", "xano policy status --run-detail"],
89
- },
90
- ],
91
- };
@@ -1,2 +0,0 @@
1
- import type { TopicDoc } from "../types.js";
2
- export declare const skillsDoc: TopicDoc;
@@ -1,57 +0,0 @@
1
- const flags = [
2
- { name: "workspace", short: "w", type: "string", description: "Workspace ID; defaults to the selected official CLI profile" },
3
- { name: "branch", short: "b", type: "string", description: "Branch label; defaults to the profile's branch, else live. The platform skill is the same on every branch; the branch only decides which workspace knowledge record named xano-policies, if any, replaces it" },
4
- { name: "profile", short: "p", type: "string", description: "Official CLI profile name" },
5
- { name: "directory", short: "d", type: "string", default: ".", description: "Project directory to install into (default: current directory). The file is written under its .claude/skills/, not to a positional argument" },
6
- { name: "output", short: "o", type: "string", default: "summary", description: "summary or json; summary prints the path written, json prints {branch, bytes, name, path, source, workspace}, where source is platform, or workspace when the workspace's own xano-policies record was installed" },
7
- { name: "verbose", short: "v", type: "boolean", default: "false", description: "Print the request the CLI makes and the raw platform response beside the normal output" },
8
- ];
9
- export const skillsDoc = {
10
- topic: "skills",
11
- title: "Xano CLI - Agent Skills",
12
- description: `\`xano skills pull\` installs the agent skill your Xano instance generates for your coding agent. Today that is one skill, \`xano-policies\`: the workspace policy file format, the authoring and honesty rules, and the instance's own check catalogue, generated from the live registry at request time so it can never describe a check the instance does not have.
13
-
14
- The skill is fetched from \`GET /api:meta/workspace/{workspace_id}/agent-skills?surface=cli&branch=<label>\` and written to \`.claude/skills/xano-policies/SKILL.md\` under the project directory; nothing else in the project is touched. That replaces the published stub only when the stub was installed into the project for Claude Code (\`npx skills add xano-inc/xano-developer-mcp -s xano-policies -a claude-code\`, without \`-g\`). A stub installed globally (\`-g\`) or for another agent lives where that agent reads it and stays there, so remove it after pulling.
15
-
16
- The route is one of the policy routes, gated like the others; the \`policy\` topic says what each refusal means. When the workspace has its own enabled knowledge record named \`xano-policies\`, the route serves that record instead of the platform skill, and the command says so.
17
-
18
- The same generator serves three surfaces. \`surface=studio\` (the default on the route) is the variant Xano's own Studio agent loads; \`surface=mcp\` is the one the authenticated MCP's \`xano_get_policy_skill\` serves; \`surface=cli\` is the variant this command writes, and it is the only one the CLI asks for.
19
-
20
- This is not workspace knowledge. The generated policy skill is produced by the platform, not stored as a workspace knowledge record, so it does not appear in \`knowledge list\` and it is not written under \`knowledge/\` by \`workspace pull\`.`,
21
- ai_hints: `Run \`xano skills pull\` once per project, and again after the instance is upgraded, because the skill is generated from the instance's check catalogue, not from the workspace's policies. The command is idempotent: re-running it rewrites the file and prints the path it wrote. \`xano workspace pull\` prints a hint after a pull that included policies: "Run \`xano skills pull\` to install the policies skill for your coding agent."
22
-
23
- Treat the pulled file as authoritative over any stub: if \`.claude/skills/xano-policies/SKILL.md\` contains a check catalogue section, it came from the instance. Never edit the pulled file by hand - the next pull overwrites it - and never invent check ids or parameters from a stub; \`xano policy catalogue\` and the pulled skill are the only sources of truth for what this instance can check.
24
-
25
- A profile has to be selected first (\`xano profile use <name> -w <workspace_id> -b <branch>\`), or the workspace and branch given with -w/-b, because the route is addressed by workspace and branch.`,
26
- related_topics: ["policy", "knowledge", "workspace"],
27
- commands: [
28
- {
29
- name: "skills pull",
30
- description: "Fetch the CLI variant of the generated xano-policies skill for the selected workspace and branch and write it to .claude/skills/xano-policies/SKILL.md under the project directory. Idempotent: it overwrites whatever is there and prints the path written, and says so when the workspace's own xano-policies record was installed instead of the platform skill. Needs the workspace:policy permission at read level.",
31
- usage: "xano skills pull [options]",
32
- flags,
33
- examples: [
34
- "xano skills pull",
35
- "xano skills pull -d ./my-app -b dev",
36
- "xano skills pull -w 1 -b v1 -o json",
37
- ],
38
- },
39
- ],
40
- workflows: [
41
- {
42
- name: "Give a coding agent the live policy skill",
43
- description: "Replace the published stub skill with the skill generated from this instance's check catalogue",
44
- steps: [
45
- "Select the workspace and branch: `xano profile use local -w 1 -b v1`",
46
- "Pull the skill: `xano skills pull -d ./my-app`",
47
- "The command writes `./my-app/.claude/skills/xano-policies/SKILL.md` and prints that path",
48
- "Start a new agent session in that directory so the skill manifest is re-read",
49
- "Remove a stub installed globally or for another agent",
50
- "Re-run the pull after the instance is upgraded",
51
- ],
52
- example: `xano profile use local -w 1 -b v1
53
- xano workspace pull -d ./my-app
54
- xano skills pull -d ./my-app`,
55
- },
56
- ],
57
- };
@@ -1,3 +0,0 @@
1
- import type { TopicDoc } from "../types.js";
2
- export declare const policyExample = "policy \"AUTH-EXAMPLE\" {\n title = \"Require authentication\"\n statement = \"Endpoints require authentication unless the endpoint or its API group is tagged public.\"\n severity = \"high\"\n active = true\n enforcement = \"advisory\"\n\n rule {\n check = \"object.auth_required\"\n params = {except_tags: [\"public\", \"xano:quick-start\"]}\n }\n}";
3
- export declare const policyDoc: TopicDoc;
@@ -1,135 +0,0 @@
1
- const workspace = {
2
- name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID",
3
- };
4
- const branch = {
5
- name: "branch", type: "string", in: "query", default: "", description: "Branch label; empty selects the live branch. Use the same label for every operation in a workflow.",
6
- };
7
- const policyId = {
8
- name: "policy_id", type: "integer", required: true, in: "path", description: "Stored policy ID on the selected branch",
9
- };
10
- const prefix = "/workspace/{workspace_id}/policy";
11
- const runId = { name: "run_id", type: "integer", required: true, in: "path", description: "Run ID" };
12
- // Canonical source exactly as POST /policy/parse returns it: quoted key, the platform's
13
- // field order (title, statement, severity, active, enforcement), a blank line before the
14
- // first rule, and a one-key params map inline with no padding inside the braces.
15
- export const policyExample = `policy "AUTH-EXAMPLE" {
16
- title = "Require authentication"
17
- statement = "Endpoints require authentication unless the endpoint or its API group is tagged public."
18
- severity = "high"
19
- active = true
20
- enforcement = "advisory"
21
-
22
- rule {
23
- check = "object.auth_required"
24
- params = {except_tags: ["public", "xano:quick-start"]}
25
- }
26
- }`;
27
- const aiModified = {
28
- name: "ai_modified", type: "boolean", in: "query", default: false, description: "true marks a change an AI agent made (the authenticated MCP sends it): the audit entry gains the agent label and stays attributed to the authenticated user",
29
- };
30
- export const policyDoc = {
31
- topic: "policy",
32
- title: "Workspace Policies",
33
- description: `Policies are branch-scoped workspace XanoScript objects combining a human description and deterministic check rules. These endpoints require a platform build with policy support. Discover supported checks and their exact parameter schemas from the instance; do not invent checks or parameters. The policy language - syntax, fields, rules, refusal messages and versioning - is documented once, in xano_xanoscript_docs({topic: "policies"}) (mode: "quick_reference" for the short form; the full topic carries every check's description); this topic covers the routes.
34
-
35
- Every route needs the workspace:policy permission: read for the reads, parse, the object lookup and evaluate; create, update or delete for the writes. An OAuth token is also capped by its workspace:read or workspace:write ceiling. A refusal is a 403 whose payload.code names the gate: policy_feature_disabled, policy_permission_required or policy_scope_required (both with permission and level). The OAuth ceiling answers insufficient_scope without a code, and a write from a read-only session (a read-only Studio session or a read-only impersonation) is refused without a code too: This is a read-only session. Enable editing to modify this resource. The policies topic's Permissions section says what each one needs.
36
-
37
- The native platform parses and formats policy source. Send source alone inside data, or structured fields without source; never both. Canonical source is server-owned. A write answers the policy as GET serves it, plus unchanged: an unchanged save writes nothing and answers unchanged: true. PUT and DELETE take an optional last_updated_at, the updated_at you last read: a write or delete over a newer change is refused with HTTP 400 and payload.code policy_stale, and nothing changes. A source error is a 400 whose payload.line and payload.col count from 1, like the message. A rule naming a check id the instance does not have is refused on parse, save and push with HTTP 400 and payload {code: "policy_unknown_check", check} (the id as written); the message names the nearest ids and the catalogue route, and a client keys its own pointer to the catalogue on the code.
38
-
39
- Every policy the list, a GET and a write serve carries latest_run {run_id, included, version, enforcement, stale}: its place in the branch's newest run. stale: true means the policy changed after that run, so its findings no longer describe it; included: false means that run did not evaluate it. The platform decides this once; do not compare versions or timestamps yourself.
40
-
41
- A rule with zero objects checked and no findings has status no_objects and message no objects checked. Older stored runs keep pass with checked: 0; readers accept both. The run and policy_check stay pass when nothing failed, and policy_check.message names the unchecked rules. Merge, publish and deploy gates read findings and are unaffected.
42
-
43
- A policy_check block reports an evaluation. status is one of: pass ("No policy findings."), fail ("Policies reported findings."), error ("A policy check could not run; its result is marked error."), not_applicable ("No active policies on this branch; nothing was evaluated."), disabled ("Policies are not enabled on this instance; nothing was evaluated."), forbidden ("This credential cannot read this workspace's policies (workspace:policy read); nothing was evaluated.") or unavailable ("Policy evaluation is unavailable; the import itself completed."), and message carries that sentence. blocking is true when an active mandatory policy has findings, and status is then fail even if a check errored. not_applicable, disabled and forbidden load, store and audit nothing. Evaluate answers pass, fail, error or not_applicable; the feature gate and the permission refuse it with a 403 instead. A not_applicable evaluate is no run: id 0, stored: false, the run's own status not_applicable too, and empty policies, results and findings. The workspace multidoc import answers all seven. Its findings and blocking_findings list the first 100 each, in the platform's order, beside counts {findings, blocking, errors}, total (every finding) and truncated (whether either list was cut); the stored run (run_id) has them all, and its results are whole; a draft import answers no policy_check. A tier1 tenant, ephemeral or sandbox push and its dry run, and a release built from a multidoc (release push), carry policy files while the feature is on; a tenant or sandbox push carries them without evaluating them and answers no policy_check, and a release built from a multidoc carries its files only for a caller holding workspace:policy create and update (for anyone else it carries the workspace's live-branch policies instead, and names the files in policies_skipped when they differ from the live ones). A remote tenant push, a push to a tenant without a policy table (one created before policies, until its next platform update), or any push while the feature is off leaves them out and names them once in policies_skipped {message, keys}, whose message says why ("N policy files were left out (KEY, KEY): <reason>."). With the policies feature off a workspace push and its dry run leave them out too (policy_check disabled), exports omit policies, and an archive import leaves its policies out and keeps the workspace's own, except that a replace deletes the policies of the branches it removes.
44
-
45
- Gates: a merge, a set-live, an archive import with mode=merge, and a save or a non-draft push to the workspace's live branch are refused with HTTP 403 and payload.code policy_gate when they introduce a blocking finding or leave one on an object they change; existing findings elsewhere never block. The payload is {gate, status, total, introduced, changed, existing, run_id, can_override, findings (first 100, policy readers only), truncated}. A tenant release deploy is refused the same way when the release's own policy check has any blocking finding, existing debt included: it judges the release alone, never against the tenant's current release, so a release gets the same verdict on every tenant (ephemeral and sandbox tenants get it with gated false and are never refused). Its payload is {gate, status, total, run_id, can_override, gated, release {id, name, run_id, status, counts, carried}, message, findings, truncated}. A caller with workspace:policy update may proceed by resending with override_reason (the create and save routes of the gated objects, the multidoc, upload, import and branch live routes, a release deploy with set_live and import-schema with setlive; override_policy with the reason on tenant deploys), which is audited. A release deploy with set_live and an import-schema with setlive land the new branch first and then run the set-live gate, so a refusal keeps that branch and names it in payload.branch {id, label}. Gates are decided by the policies the branch will have after the change (a merge's carried policies, a push's policy files, the set-live candidate's own policies), so a merge, a push to the live branch or a set-live that weakens a policy active and mandatory on the branch (demotes, deactivates or deletes it, or loosens a rule) needs workspace:policy update: otherwise it is refused before anything is written with 403 policy_weakening_permission_required and {gate, permission, level, policies}, which override_reason does not lift, and the push dry run is refused the same way. A set-live of a branch that landed no policy (an import-schema with setlive always leaves the archive's policies out; a release may carry none) is judged by the live branch's policies, with no weakening check. A set-live check that cannot read the policies fails closed (only update proceeds; the refusal carries unavailable: true). Deleting an active mandatory policy needs workspace:policy update as well as delete (the same 403, gate delete), and so does an archive import with mode=replace or delete=true that would remove one from the branch it writes (gate archive_import). The publish gate covers the draftable kinds (function, query, task, middleware, addon, tool, workflow test, trigger and realtime message), agents, MCP servers and realtime channels: tables, API groups, environment variables, workspace and branch settings, realtime servers, and MCP prompts and resources are saved without it, even on the live branch, and the next run reports what they break while a set-live or tenant deploy that carries it is gated. Adding a prompt or resource to an MCP server, or removing one, changes the server, so that save is gated. A push to the live branch needs its transaction (400 policy_gate_transaction_required). Pushes to other branches are not gated: they answer policy_check after the import. A create past the plan's per-branch policy cap (lower plans cap the policies on each branch; Pro and above are unlimited) is refused with 403 policy_plan_limit; a create whose rules exactly match a live policy on the branch with 400 policy_duplicate (with existing_key, existing_id and policies); a draft import carrying a changed policy with 400 policy_draft_import (Policies are saved directly, not drafted.).
46
-
47
- Releases carry their branch's policies and store a policy check when cut. An uploaded release archive (release/import) that says it carries policies needs workspace:policy create and update, or is refused with 403 policy_permission_required and nothing is stored. Routes: GET /workspace/{workspace_id}/release/{release_id}/policy_run (POST re-checks it), .../policy_run/findings, and GET /workspace/{workspace_id}/release/policy_check?release_id[]= for several (at most 200 ids). GET /workspace/{workspace_id}/tenant/{tenant_name}/policy_gate?release_name= previews a tenant deploy's gate, and GET /workspace/{workspace_id}/tenant/{tenant_name}/policy lists a tenant's policies; both need tenant_center read besides workspace:policy read.
48
-
49
- Policies expose active as a boolean (default true). Source always writes active = true or active = false before enforcement. Authored lifecycle is refused: policy: "lifecycle" was replaced by "active"; write active = true or active = false. Source refusals include line and column. An inactive policy may have no rules. Policies are saved directly, not drafted.
50
-
51
- An evaluation stores a run and its findings; it does not modify the policy. Findings arrive in one order: blocking first, then by severity, policy key, rule position (R2 before R10) and object. A run can hold tens of thousands of findings (85,855 findings is a 44 MB run), so read a large one in parts: GET run/{run_id}/summary serves it without its findings, with its counts, each policy's verdict and the facets, and GET run/{run_id}/findings serves its findings a page at a time, filtered on the instance. Evaluate with answer: "summary" answers the same way, with the first 50 findings. Checks are static: they inspect stored definitions and nothing runs at request time. A check passing is not proof of runtime behavior or compliance.`,
52
- ai_hints: `Use the authenticated Xano MCP policy tools when available. Their workspace and instance come from the authenticated request, not tool arguments. The standalone developer MCP offers documentation and local language-server validation; it does not carry a workspace credential. Validate policy source with the native policy/parse endpoint before saving; the developer MCP's local validation is a preview against its bundled catalogue. Key refusals on payload.code, never on the message wording. Read latest_run.stale to know whether a run still describes a policy. Evaluate with answer: "summary" and page a run's findings with GET run/{run_id}/findings rather than reading a large run whole. Re-sending an identical definition is safe: the platform answers unchanged: true and writes nothing, so do not add a cosmetic edit to force a new version.`,
53
- related_topics: ["workspace", "branch", "authentication"],
54
- endpoints: [
55
- { method: "GET", path: prefix + "/check", description: "The check catalogue: items (each check's id, label, description, keywords, supported object kinds and full parameter schema) and goals (the outcomes a new policy can start from, each with the title, statement, key, severity and rules it seeds, the needs the author fills and a limits note on what its rules cannot see; see the policies topic).", parameters: [workspace] },
56
- { method: "GET", path: prefix, description: "List policies on a branch, 1000 a page (nextPage says whether there are more). Each item is served as GET serves one policy, with latest_run.", parameters: [workspace, branch, { name: "page", type: "integer", in: "query", default: 1, description: "Page number" }] },
57
- { method: "GET", path: prefix + "/{policy_id}", description: "Read one policy on the selected branch, with latest_run. source is canonical, so it can be sent back to PUT unchanged (a no-op) or edited. A policy that is not live on the branch answers 404 Policy not found on this branch of the workspace., as PUT and DELETE do.", parameters: [workspace, policyId, branch] },
58
- {
59
- method: "GET", path: prefix + "/object", description: "The active policies whose rules reach one object, why each rule applies, and that object's findings in the branch's newest run. An unknown type is a 400 naming the known types; an object the branch does not have is a 404.",
60
- parameters: [workspace, branch, { name: "type", type: "string", required: true, in: "query", description: "Object kind as findings name it: query, function, table, task, trigger, message and the other kinds the catalogue lists" }, { name: "id", type: "integer", required: true, in: "query", description: "Object ID on the selected branch" }],
61
- response: { type: "object", description: "{object, policies: [{id, key, title, statement, severity, active, enforcement, tag, rules: [{id, title, check, label, reason, warnings}], latest_run}], run: {id, started_at, status, policies: [{key, blocking}]} | null, findings}. policies come from the policies as they are now; findings come from the newest stored run, and run.policies names each policy whose findings are listed, with blocking from the run's snapshot." },
62
- },
63
- {
64
- method: "POST", path: prefix + "/parse", description: "Parse and format one policy with the native platform parser, without saving it. Send exactly one of source or data.", parameters: [workspace],
65
- request_body: { type: "object", properties: { source: { type: "string", description: "One complete policy XanoScript document" }, data: { type: "object", description: "Structured policy fields instead of source" }, branch: { type: "string", description: "Optional branch label to check rule warnings against" } }, example: { source: policyExample } },
66
- response: { type: "object", description: "Parsed policy definition, canonical source and rule warnings: {policy, source, rule_warnings: [{rule, rule_id, warnings}]} (only rules with warnings). A source error is a 400 whose payload.line and payload.col count from 1." },
67
- },
68
- ...["POST", "PUT"].map(method => ({
69
- method, path: prefix + (method === "PUT" ? "/{policy_id}" : ""),
70
- description: method === "POST"
71
- ? "Create a policy on the selected branch. A key the branch already has is refused, naming the policy id that holds it. A policy whose rules exactly match a live policy on the branch (the same checks and normalized params, as a set; key, title, severity, enforcement, active and tags ignored) is refused with 400 payload.code policy_duplicate: A policy with exactly these rules already exists: KEY. Change a parameter or scope to add another., with existing_key, existing_id and policies."
72
- : "Update the selected branch's existing policy. A definition identical to the stored one is a no-op and answers unchanged: true with the same version.",
73
- parameters: method === "POST" ? [workspace] : [workspace, policyId],
74
- request_body: { type: "object", properties: {
75
- branch: { type: "string", description: "Branch label; empty selects live" },
76
- data: { type: "object", required: true, description: "{source: canonical XanoScript}; omit all structured fields when supplying source" },
77
- message: { type: "string", description: "Optional short label for the Version History entry this save creates; ignored when the save changes nothing" },
78
- description: { type: "string", description: "Optional longer note stored beside message on that same entry" },
79
- ai_modified: { type: "boolean", description: "Optional, default false. " + aiModified.description },
80
- ...(method === "PUT" ? { last_updated_at: { type: "string", description: "Optional: the updated_at you last read. A write over a newer change is refused with HTTP 400, payload.code policy_stale; omit, null or empty means no check" } } : {}),
81
- }, example: { branch: "dev", data: { source: policyExample }, message: "Tightened the scope" } },
82
- response: { type: "object", description: "The policy as GET serves it, with latest_run, plus unchanged" },
83
- })),
84
- { method: "DELETE", path: prefix + "/{policy_id}", description: "Soft-delete a policy on the selected branch; its Version History is kept. Answers {}. With last_updated_at, a policy changed since that read is refused with HTTP 400, payload.code policy_stale, and nothing is deleted.", parameters: [workspace, policyId, branch, aiModified, { name: "last_updated_at", type: "string", in: "query", description: "Optional: the updated_at you last read. Omit, null or empty means no check" }] },
85
- {
86
- method: "POST", path: prefix + "/evaluate", description: "Evaluate the active policies on the selected branch and store the run. Every run it stores is a manual run.", parameters: [workspace],
87
- request_body: { type: "object", properties: {
88
- branch: { type: "string", description: "Branch label; empty selects live" },
89
- ai_modified: { type: "boolean", description: "Optional, default false. true records the run as made by an AI agent acting for the authenticated user" },
90
- policy: { type: "string", description: "Optional policy key (case-insensitive): a single-policy trial of that policy alone, even if inactive. Never stored or audited (stored: false, id 0), never the latest run, gates nothing; answers clear [{policy_key, rule_id, total, items}], each rule's first 100 objects examined without a finding. An unknown key is 404, a blank one is refused." },
91
- answer: { type: "string", description: "Optional: run (the default) or summary. summary answers the run as GET run/{run_id}/summary serves it instead, plus findings (its first 50, in the platform's order), total, truncated and stored, and a policy_check whose blocking_finding_ids name the blocking findings listed and whose blocking_total counts them all; the rest are on GET run/{run_id}/findings" },
92
- }, example: { branch: "dev", answer: "summary" } },
93
- response: { type: "object", description: "The run exactly as GET run/{run_id} serves it, plus stored and policy_check {status, message, blocking, run_id, blocking_finding_ids}; with answer: \"summary\", the run summary and its first 50 findings instead (see answer). stored: false with id 0 means no run was kept: nothing was active, or the caller is a read-only session or an OAuth token without workspace:write. With nothing active the answer is status not_applicable in policy_check and in the run itself, with no policies, results or findings; nothing is read, stored or audited." },
94
- },
95
- {
96
- method: "GET", path: prefix + "/run", description: "List the retained runs newest first, as summaries: the findings, per-rule results and policy snapshots are on the single run. Only a branch's newest twenty runs are retained.",
97
- parameters: [workspace, branch, { name: "limit", type: "integer", in: "query", default: 20, description: "How many runs to return, 1-20" }],
98
- response: { type: "object", description: "{items, curPage, nextPage, prevPage}; each item is {id, created_at, trigger, actor, started_at, finished_at, status, objects_checked, counts: {findings, blocking, errors}, policies: [{id, key, version, enforcement, status, findings, blocking, objects_checked}], branch}: each policy with its verdict in that run" },
99
- },
100
- { method: "GET", path: prefix + "/run/{run_id}", description: "Read one retained run in full: findings, per-rule results and the policies[] snapshot of what it checked (each policy's statement and, per rule, its label and resolved params). A run is served whole, all its findings included, so read a large one through its summary and findings pages below. An evicted run or another branch's answers 404 Policy run not found on this branch of the workspace, as its summary and findings do. Only a branch's newest runs are retained.", parameters: [workspace, branch, runId] },
101
- {
102
- method: "GET", path: prefix + "/run/{run_id}/summary", description: "Read one retained run without its findings: what it adds up to, stored with the run when it was kept (a run kept before summaries is summarised on read).",
103
- parameters: [workspace, branch, runId, { name: "object_limit", type: "integer", in: "query", default: 100, description: "The most objects the object facet names, 1-1000; facets.object.total counts them all" }],
104
- response: { type: "object", description: "{id, created_at, updated_at, trigger, actor, started_at, finished_at, status, objects_checked, branch, counts: {findings, blocking, advisory, errors}, policy_check, policies, results, zero_object_rules, facets}. policies is the snapshot, each policy with its verdict {status, findings, blocking, objects_checked}; each result carries its finding count (findings); zero_object_rules lists {policy_key, rule_id} for the rules with no_objects (or older pass with checked: 0); facets {policy, severity, kind, object: {items, total}, tag, object_tags_from} count the findings by each, split into blocking and advisory. policy_check is the verdict a Run checks run kept, with blocking_total in place of blocking_finding_ids, and null for other runs." },
105
- },
106
- {
107
- method: "GET", path: prefix + "/run/{run_id}/findings", description: "Read one page of a retained run's findings, in the platform's order, filtered and searched on the instance. A list filter matches a finding when any of its values does, and a page holds the findings that match every filter given. Send a list with indexed keys: policy[0]=A&policy[1]=B.",
108
- parameters: [
109
- workspace, branch, runId,
110
- { name: "offset", type: "integer", in: "query", default: 0, description: "How many matching findings to skip" },
111
- { name: "limit", type: "integer", in: "query", default: 100, description: "How many findings to return, 1-500" },
112
- { name: "blocking", type: "boolean", in: "query", description: "Optional: true keeps the blocking findings, false the advisory ones" },
113
- { name: "policy", type: "string[]", in: "query", description: "Policy keys" },
114
- { name: "rule", type: "string[]", in: "query", description: "Rule ids, such as AUTH-001.R1" },
115
- { name: "severity", type: "string[]", in: "query", description: "Severities: critical, high, medium, low" },
116
- { name: "kind", type: "string[]", in: "query", description: "Object kinds: query, function, table and the other kinds findings name" },
117
- { name: "object", type: "string[]", in: "query", description: "Objects, each written type:id, such as query:18" },
118
- { name: "tag", type: "string[]", in: "query", description: "Tags of the finding's policy (from the run's snapshot) or of its object (as the run read it)" },
119
- { name: "q", type: "string", in: "query", description: "Case-insensitive text in the policy key or title, rule title, object name or message" },
120
- ],
121
- response: { type: "object", description: "{items, total, objects, offset, limit}: items are the findings as the run stored them; total counts every finding that matches, and objects counts the distinct objects the matching findings name." },
122
- },
123
- {
124
- method: "GET", path: prefix + "/run/{run_id}/clear", description: "Page one rule's clear objects in a retained run: the objects it examined without a finding of its own. policy and rule are required (400 without them).",
125
- parameters: [workspace, branch, runId, { name: "policy", type: "string", required: true, in: "query", description: "Policy key" }, { name: "rule", type: "string", required: true, in: "query", description: "Rule id, such as AUTH-001.R1" }, { name: "offset", type: "integer", in: "query", default: 0, description: "How many to skip" }, { name: "limit", type: "integer", in: "query", default: 100, description: "How many to return, 1-500" }, { name: "q", type: "string", in: "query", description: "Case-insensitive text in the object name" }],
126
- response: { type: "object", description: "{items, total, offset, limit, recorded}; recorded is false for a run stored before clear objects were kept." },
127
- },
128
- {
129
- method: "GET", path: "/workspace/{workspace_id}/agent-skills",
130
- description: "Serve the generated xano-policies agent skill. One generator, three surfaces: studio (the default, the variant the Studio agent loads), cli (the variant xano skills pull writes) and mcp (the variant the authenticated MCP's xano_get_policy_skill serves). With digest=true and surface studio or mcp it also answers xano-active-policies, a budgeted digest of the branch's active policies (mandatory first, one line per rule) when the branch has one. Each surface has its own description. The check catalogue inside it is generated from the live registry at request time, so it can never document a check this instance does not have. A workspace knowledge record named xano-policies replaces the platform skill and is served instead. Needs the workspace:policy permission at read level, like the other policy routes.",
131
- parameters: [workspace, branch, { name: "surface", type: "string", in: "query", default: "studio", enum: ["studio", "cli", "mcp"], description: "Which variant of the generated skill to return" }, { name: "digest", type: "boolean", in: "query", default: false, description: "Also answer the xano-active-policies digest item" }],
132
- response: { type: "object", description: "{knowledge: [...]}: the same envelope as workspace knowledge, with one item named xano-policies whose knowledge_type is skill and whose content is the skill markdown. The platform's own item has id -101." },
133
- },
134
- ],
135
- };