@solidnumber/cli 2.22.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/commands/agent.d.ts.map +1 -1
  2. package/dist/commands/agent.js +119 -0
  3. package/dist/commands/agent.js.map +1 -1
  4. package/dist/commands/find.d.ts.map +1 -1
  5. package/dist/commands/find.js +18 -2
  6. package/dist/commands/find.js.map +1 -1
  7. package/dist/commands/how-to.d.ts +12 -1
  8. package/dist/commands/how-to.d.ts.map +1 -1
  9. package/dist/commands/how-to.js +69 -11
  10. package/dist/commands/how-to.js.map +1 -1
  11. package/dist/commands/mcp.js +1 -1
  12. package/dist/commands/mcp.js.map +1 -1
  13. package/dist/commands/switch.js +1 -1
  14. package/dist/commands/switch.js.map +1 -1
  15. package/dist/commands/verbs.js +4 -0
  16. package/dist/commands/verbs.js.map +1 -1
  17. package/dist/commands/visual.js +1 -1
  18. package/dist/commands/visual.js.map +1 -1
  19. package/dist/index.js +80 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/api-client.d.ts.map +1 -1
  22. package/dist/lib/api-client.js +3 -1
  23. package/dist/lib/api-client.js.map +1 -1
  24. package/dist/lib/apply/registry.js +1 -1
  25. package/dist/lib/apply/registry.js.map +1 -1
  26. package/dist/lib/command-kit.d.ts +16 -17
  27. package/dist/lib/command-kit.d.ts.map +1 -1
  28. package/dist/lib/command-kit.js +53 -1
  29. package/dist/lib/command-kit.js.map +1 -1
  30. package/dist/lib/list-envelope.d.ts +20 -5
  31. package/dist/lib/list-envelope.d.ts.map +1 -1
  32. package/dist/lib/list-envelope.js +53 -5
  33. package/dist/lib/list-envelope.js.map +1 -1
  34. package/dist/lib/schema-validate.d.ts +30 -4
  35. package/dist/lib/schema-validate.d.ts.map +1 -1
  36. package/dist/lib/schema-validate.js +46 -0
  37. package/dist/lib/schema-validate.js.map +1 -1
  38. package/dist/lib/skills/index.d.ts +34 -0
  39. package/dist/lib/skills/index.d.ts.map +1 -0
  40. package/dist/lib/skills/index.js +218 -0
  41. package/dist/lib/skills/index.js.map +1 -0
  42. package/dist/lib/skills/plugin.d.ts +106 -0
  43. package/dist/lib/skills/plugin.d.ts.map +1 -0
  44. package/dist/lib/skills/plugin.js +187 -0
  45. package/dist/lib/skills/plugin.js.map +1 -0
  46. package/dist/lib/telemetry.d.ts +1 -1
  47. package/dist/lib/telemetry.d.ts.map +1 -1
  48. package/dist/lib/telemetry.js.map +1 -1
  49. package/dist/lib/verb-example.d.ts.map +1 -1
  50. package/dist/lib/verb-example.js +34 -15
  51. package/dist/lib/verb-example.js.map +1 -1
  52. package/dist/lib/verb-search.d.ts +56 -1
  53. package/dist/lib/verb-search.d.ts.map +1 -1
  54. package/dist/lib/verb-search.js +391 -6
  55. package/dist/lib/verb-search.js.map +1 -1
  56. package/package.json +7 -3
  57. package/platform-docs/ai.txt +53 -30
  58. package/platform-docs/llms.txt +53 -12
@@ -0,0 +1,106 @@
1
+ import type { Skill } from './index';
2
+ /** The Agent Plugins version this package targets. */
3
+ export declare const AGENT_PLUGINS_VERSION = "1.1.0";
4
+ export declare const PLUGIN_SCHEMA_URL = "https://agent-plugins.org/schemas/1.1.0/plugin.schema.json";
5
+ export declare const MCP_SCHEMA_URL = "https://agent-plugins.org/schemas/1.1.0/mcp.schema.json";
6
+ /**
7
+ * Plugin root, relative to a tenant directory.
8
+ *
9
+ * Under `.solid/` because that is the directory `requireTenantManifest`
10
+ * already governs: the plugin describes ONE company, and putting it anywhere
11
+ * the guard does not cover would be a way to write tenant content outside the
12
+ * boundary. `.claude/skills/` is still written alongside it — that is what
13
+ * Claude Code reads today, and removing it to avoid duplicating two-kilobyte
14
+ * files would break the client most likely to be pointed at this directory.
15
+ */
16
+ export declare const PLUGIN_DIR: string;
17
+ /**
18
+ * Manifest `name` constraints, transcribed from plugin.schema.json §5.5.
19
+ * Lowercase alphanumeric with dots and hyphens inside, 1-64 characters,
20
+ * alphanumeric at both ends, and no `--` or `..` anywhere.
21
+ */
22
+ export declare const PLUGIN_NAME_RE: RegExp;
23
+ export declare function isValidPluginName(name: string): boolean;
24
+ export interface PluginManifest {
25
+ $schema: string;
26
+ name: string;
27
+ version?: string;
28
+ description?: string;
29
+ author?: {
30
+ name?: string;
31
+ email?: string;
32
+ url?: string;
33
+ };
34
+ homepage?: string;
35
+ repository?: string;
36
+ license?: string;
37
+ keywords?: string[];
38
+ extensions?: Record<string, Record<string, unknown>>;
39
+ }
40
+ export interface BuildManifestInput {
41
+ /** Plugin name. Must satisfy isValidPluginName. */
42
+ name?: string;
43
+ /** Usually the CLI version that generated it. */
44
+ version?: string;
45
+ description?: string;
46
+ homepage?: string;
47
+ }
48
+ /**
49
+ * Build `plugin.json`. Pure.
50
+ *
51
+ * Optional fields are OMITTED rather than set to empty strings: the schema
52
+ * types them as strings, so `""` validates and then shows up in a client's
53
+ * plugin list as a blank description. Absent is the honest encoding of
54
+ * "we do not know this".
55
+ */
56
+ export declare function buildPluginManifest(input?: BuildManifestInput): PluginManifest;
57
+ export interface StdioServer {
58
+ type: 'stdio';
59
+ command: string;
60
+ args?: string[];
61
+ env?: Record<string, string>;
62
+ cwd?: string;
63
+ }
64
+ export interface McpConfig {
65
+ $schema: string;
66
+ mcpServers: Record<string, StdioServer>;
67
+ }
68
+ export interface BuildMcpInput {
69
+ /** Backend base URL. Omitted when it is the default. */
70
+ apiUrl?: string;
71
+ /** Tenant pin. Not a secret; the plugin is tenant-bound by construction. */
72
+ companyId?: number | string;
73
+ /** Npm package that ships the stdio server. */
74
+ packageName?: string;
75
+ }
76
+ /** Default package that ships the stdio MCP server. Mirrors mcp-client-config. */
77
+ export declare const DEFAULT_MCP_PACKAGE = "@solidnumber/mcp";
78
+ /**
79
+ * Build `mcp.json`. Pure.
80
+ *
81
+ * ⛔ `type` IS REQUIRED HERE AND IS NOT IN OUR OWN CLIENT CONFIGS. The
82
+ * Agent Plugins server object is a `oneOf` over stdio / streamable-http / sse
83
+ * discriminated on `type`, so omitting it — which the native Claude/Cursor
84
+ * formats tolerate — fails the schema outright. This is exactly the kind of
85
+ * difference that makes copying `buildServerEntry` the wrong move.
86
+ */
87
+ export declare function buildMcpConfig(input?: BuildMcpInput): McpConfig;
88
+ export interface WrittenFile {
89
+ /** Path relative to the plugin root, as the spec names it. */
90
+ rel: string;
91
+ path: string;
92
+ state: 'written' | 'unchanged';
93
+ }
94
+ export interface WritePluginInput {
95
+ manifest?: BuildManifestInput;
96
+ mcp?: BuildMcpInput;
97
+ }
98
+ /**
99
+ * Write the Agent Plugins package under `<baseDir>/.solid/plugin/`.
100
+ *
101
+ * ⛔ The caller owns the tenant guard, exactly as `installSkills` documents.
102
+ * This writes tenant-describing content and must never be reachable without a
103
+ * verified `.solid/manifest.json`.
104
+ */
105
+ export declare function writePlugin(baseDir: string, skills: readonly Skill[], input?: WritePluginInput): WrittenFile[];
106
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/plugin.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAE7C,eAAO,MAAM,iBAAiB,+DACmD,CAAC;AAClF,eAAO,MAAM,cAAc,4DACmD,CAAC;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAgC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAwD,CAAC;AAEpF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QAAE,IAAI,C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mBAAmB,qBAAqB,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,GAAE,aAAkB,GAAG,SAAS,CAenE;AAED,MAAM,WAAW,WAAW;IAC1B,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,GAAG,WAAW,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAgBD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,KAAK,GAAE,gBAAqB,GAC3B,WAAW,EAAE,CA2Bf"}
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.DEFAULT_MCP_PACKAGE = exports.PLUGIN_NAME_RE = exports.PLUGIN_DIR = exports.MCP_SCHEMA_URL = exports.PLUGIN_SCHEMA_URL = exports.AGENT_PLUGINS_VERSION = void 0;
37
+ exports.isValidPluginName = isValidPluginName;
38
+ exports.buildPluginManifest = buildPluginManifest;
39
+ exports.buildMcpConfig = buildMcpConfig;
40
+ exports.writePlugin = writePlugin;
41
+ /**
42
+ * Agent Plugins 1.1.0 packaging — the same skills, portable off Claude Code.
43
+ *
44
+ * ⛔ WHY THIS EXISTS. `installSkills` writes `.claude/skills/<name>/SKILL.md`,
45
+ * which is the layout Claude Code reads and nothing else does. Agent Plugins
46
+ * (Amazon, Cursor, Microsoft, OpenAI, Vercel; 1.0.0 published 2026-08-06)
47
+ * standardises the OUTER packaging — a directory with a `plugin.json`
48
+ * manifest, a `skills/` folder of exactly the SKILL.md files we already
49
+ * generate, and an `mcp.json` naming the servers. Emitting that costs two
50
+ * small JSON files and makes the identical content loadable by every client
51
+ * that implements the standard.
52
+ *
53
+ * We are not inventing a format here and must not drift from one. The field
54
+ * sets below are transcribed from the normative schemas at
55
+ * https://agent-plugins.org/schemas/1.1.0/ — `plugin.schema.json` and
56
+ * `mcp.schema.json` — both of which are CLOSED (`additionalProperties: false`)
57
+ * with `$schema` and one other field required. A stray key is a validation
58
+ * failure, not a hint, so every builder here emits exactly the permitted set.
59
+ *
60
+ * ⛔ NO CREDENTIAL EVER ENTERS mcp.json. A plugin directory is a DISTRIBUTABLE
61
+ * artifact — that is its entire purpose — and `buildServerEntry` in
62
+ * lib/mcp-client-config.ts puts `SOLID_API_KEY` into the env block because a
63
+ * client config is a private file on one machine. The two look alike and are
64
+ * opposites. This writer pins the tenant (`SOLID_COMPANY_ID`, not a secret,
65
+ * and the plugin is already tenant-bound) and leaves the key to the
66
+ * environment, so a shared plugin carries no way to act as anybody.
67
+ *
68
+ * ⛔ 1.1.0, NOT 1.0.0. The two plugin schemas are byte-identical apart from
69
+ * the `$schema` constant, so there is no compatibility argument for pinning
70
+ * the older one — and §5.2.1 requires the value to match the version targeted
71
+ * exactly. Clients MUST reject a version they do not recognise, so this is the
72
+ * one field that cannot be approximated.
73
+ */
74
+ const fs = __importStar(require("fs"));
75
+ const path = __importStar(require("path"));
76
+ /** The Agent Plugins version this package targets. */
77
+ exports.AGENT_PLUGINS_VERSION = '1.1.0';
78
+ exports.PLUGIN_SCHEMA_URL = `https://agent-plugins.org/schemas/${exports.AGENT_PLUGINS_VERSION}/plugin.schema.json`;
79
+ exports.MCP_SCHEMA_URL = `https://agent-plugins.org/schemas/${exports.AGENT_PLUGINS_VERSION}/mcp.schema.json`;
80
+ /**
81
+ * Plugin root, relative to a tenant directory.
82
+ *
83
+ * Under `.solid/` because that is the directory `requireTenantManifest`
84
+ * already governs: the plugin describes ONE company, and putting it anywhere
85
+ * the guard does not cover would be a way to write tenant content outside the
86
+ * boundary. `.claude/skills/` is still written alongside it — that is what
87
+ * Claude Code reads today, and removing it to avoid duplicating two-kilobyte
88
+ * files would break the client most likely to be pointed at this directory.
89
+ */
90
+ exports.PLUGIN_DIR = path.join('.solid', 'plugin');
91
+ /**
92
+ * Manifest `name` constraints, transcribed from plugin.schema.json §5.5.
93
+ * Lowercase alphanumeric with dots and hyphens inside, 1-64 characters,
94
+ * alphanumeric at both ends, and no `--` or `..` anywhere.
95
+ */
96
+ exports.PLUGIN_NAME_RE = /^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/;
97
+ function isValidPluginName(name) {
98
+ return name.length >= 1 && name.length <= 64 && exports.PLUGIN_NAME_RE.test(name);
99
+ }
100
+ /**
101
+ * Build `plugin.json`. Pure.
102
+ *
103
+ * Optional fields are OMITTED rather than set to empty strings: the schema
104
+ * types them as strings, so `""` validates and then shows up in a client's
105
+ * plugin list as a blank description. Absent is the honest encoding of
106
+ * "we do not know this".
107
+ */
108
+ function buildPluginManifest(input = {}) {
109
+ const name = input.name ?? 'solid';
110
+ if (!isValidPluginName(name)) {
111
+ throw new Error(`plugin name "${name}" violates Agent Plugins ${exports.AGENT_PLUGINS_VERSION} §5.5 ` +
112
+ '(1-64 chars, lowercase alphanumeric with . or -, alphanumeric at both ends, no -- or ..)');
113
+ }
114
+ const manifest = { $schema: exports.PLUGIN_SCHEMA_URL, name };
115
+ if (input.version)
116
+ manifest.version = input.version;
117
+ if (input.description)
118
+ manifest.description = input.description;
119
+ if (input.homepage)
120
+ manifest.homepage = input.homepage;
121
+ manifest.license = 'BUSL-1.1';
122
+ manifest.keywords = ['solid', 'business-operations', 'crm', 'mcp'];
123
+ return manifest;
124
+ }
125
+ /** Default package that ships the stdio MCP server. Mirrors mcp-client-config. */
126
+ exports.DEFAULT_MCP_PACKAGE = '@solidnumber/mcp';
127
+ /**
128
+ * Build `mcp.json`. Pure.
129
+ *
130
+ * ⛔ `type` IS REQUIRED HERE AND IS NOT IN OUR OWN CLIENT CONFIGS. The
131
+ * Agent Plugins server object is a `oneOf` over stdio / streamable-http / sse
132
+ * discriminated on `type`, so omitting it — which the native Claude/Cursor
133
+ * formats tolerate — fails the schema outright. This is exactly the kind of
134
+ * difference that makes copying `buildServerEntry` the wrong move.
135
+ */
136
+ function buildMcpConfig(input = {}) {
137
+ const env = {};
138
+ if (input.apiUrl)
139
+ env.SOLID_API_URL = input.apiUrl;
140
+ if (input.companyId !== undefined && input.companyId !== null && input.companyId !== '') {
141
+ env.SOLID_COMPANY_ID = String(input.companyId);
142
+ }
143
+ const server = {
144
+ type: 'stdio',
145
+ command: 'npx',
146
+ args: ['-y', input.packageName ?? exports.DEFAULT_MCP_PACKAGE],
147
+ };
148
+ if (Object.keys(env).length > 0)
149
+ server.env = env;
150
+ return { $schema: exports.MCP_SCHEMA_URL, mcpServers: { solid: server } };
151
+ }
152
+ /** Write `file` only when its bytes would change. Keeps re-runs quiet. */
153
+ function writeIfChanged(file, content, rel) {
154
+ if (fs.existsSync(file)) {
155
+ try {
156
+ if (fs.readFileSync(file, 'utf8') === content)
157
+ return { rel, path: file, state: 'unchanged' };
158
+ }
159
+ catch {
160
+ /* unreadable — fall through and rewrite */
161
+ }
162
+ }
163
+ fs.mkdirSync(path.dirname(file), { recursive: true });
164
+ fs.writeFileSync(file, content);
165
+ return { rel, path: file, state: 'written' };
166
+ }
167
+ /**
168
+ * Write the Agent Plugins package under `<baseDir>/.solid/plugin/`.
169
+ *
170
+ * ⛔ The caller owns the tenant guard, exactly as `installSkills` documents.
171
+ * This writes tenant-describing content and must never be reachable without a
172
+ * verified `.solid/manifest.json`.
173
+ */
174
+ function writePlugin(baseDir, skills, input = {}) {
175
+ const root = path.join(baseDir, exports.PLUGIN_DIR);
176
+ const out = [];
177
+ // Trailing newline on both: these are files a human may open in an editor,
178
+ // and every other JSON this CLI writes ends in one.
179
+ out.push(writeIfChanged(path.join(root, 'plugin.json'), `${JSON.stringify(buildPluginManifest(input.manifest), null, 2)}\n`, 'plugin.json'));
180
+ out.push(writeIfChanged(path.join(root, 'mcp.json'), `${JSON.stringify(buildMcpConfig(input.mcp), null, 2)}\n`, 'mcp.json'));
181
+ for (const skill of skills) {
182
+ const rel = path.join('skills', skill.dirname, 'SKILL.md');
183
+ out.push(writeIfChanged(path.join(root, rel), skill.content, rel));
184
+ }
185
+ return out;
186
+ }
187
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/lib/skills/plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,8CAEC;AAgCD,kDAeC;AAoCD,wCAeC;AAmCD,kCA+BC;AAvOD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * See: SPRINT-CLI-MONETIZATION.md §"Layer 2 — Behavior-triggered outreach"
11
11
  */
12
- export type TelemetryEventName = 'installed' | 'first_command' | 'first_run_welcome_shown' | 'first_run_email_captured' | 'first_run_email_skipped' | 'auth_started' | 'auth_success' | 'auth_failed' | 'demo_created' | 'demo_email_captured' | 'demo_failed' | 'clone_created' | 'clone_failed' | 'company_created' | 'company_create_for_client' | 'page_published' | 'deploy_preview' | 'context_claude' | 'context_cursor' | 'template_publish' | 'agent_onboard' | 'api_key_created' | 'billing_invoice_sent' | 'billing_checkout_link_created' | 'subscription_started' | 'command_error' | 'help_shown' | 'bare_invocation' | 'feedback_sent' | 'unknown_command';
12
+ export type TelemetryEventName = 'installed' | 'first_command' | 'first_run_welcome_shown' | 'first_run_email_captured' | 'first_run_email_skipped' | 'auth_started' | 'auth_success' | 'auth_failed' | 'demo_created' | 'demo_email_captured' | 'demo_failed' | 'clone_created' | 'clone_failed' | 'company_created' | 'company_create_for_client' | 'page_published' | 'deploy_preview' | 'context_claude' | 'context_cursor' | 'template_publish' | 'agent_onboard' | 'api_key_created' | 'billing_invoice_sent' | 'billing_checkout_link_created' | 'subscription_started' | 'command_error' | 'help_shown' | 'bare_invocation' | 'feedback_sent' | 'unknown_command' | 'option_error';
13
13
  /**
14
14
  * Append an entry to the local command-history file (used by `solid feedback`
15
15
  * to include context). Safe to call from every command. Best-effort.
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,eAAe,GACf,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,GACzB,cAAc,GACd,cAAc,GACd,aAAa,GACb,cAAc,GACd,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,2BAA2B,GAC3B,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,+BAA+B,GAC/B,sBAAsB,GACtB,eAAe,GACf,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,iBAAiB,CAAC;AAsCtB;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAmBnD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,kBAAkB,EACzB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAO,GAC/D,IAAI,CA0BN"}
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,eAAe,GACf,yBAAyB,GACzB,0BAA0B,GAC1B,yBAAyB,GACzB,cAAc,GACd,cAAc,GACd,aAAa,GACb,cAAc,GACd,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,2BAA2B,GAC3B,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,+BAA+B,GAC/B,sBAAsB,GACtB,eAAe,GACf,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GAKjB,cAAc,CAAC;AAsCnB;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAA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sC5E;AAED;2CAC2C;AAC3C,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,UAAU,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;CAAO,EACzE,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAClC,WAAW,CA+Eb"}
@@ -47,13 +47,18 @@ function placeholderFor(name, p = {}) {
47
47
  switch (firstType(p.type)) {
48
48
  case 'integer':
49
49
  case 'number':
50
- return 0;
50
+ // ⛔ NOT 0. `{"site_id": 0}` is a plausible integer, and the payload is
51
+ // the part that gets copied — nothing in it signals "substitute me".
52
+ // A string placeholder is angle-bracketed and obviously fake; a numeric
53
+ // one has to earn that the same way, and -1 is the only value that is
54
+ // both a legal JSON number and never a real id, limit or count.
55
+ return -1;
51
56
  case 'boolean':
52
57
  return false;
53
58
  case 'array': {
54
59
  const inner = firstType(p.items?.type);
55
60
  if (inner === 'integer' || inner === 'number')
56
- return [0];
61
+ return [-1]; // same reason as the scalar case above
57
62
  if (inner === 'object')
58
63
  return [{}];
59
64
  return inner === undefined ? [] : [`<${name}>`];
@@ -93,8 +98,8 @@ function buildExample(verbName, schema = {}, opts = {}) {
93
98
  payload[field] = value;
94
99
  // A `0` or a `false` reads as a decision, not a blank. Say so, once per
95
100
  // field, rather than trusting the reader to infer it from the type.
96
- if (value === 0)
97
- notes.push(`${field} is a placeholder 0 — replace it with a real ${firstType(prop.type) ?? 'number'}`);
101
+ if (value === -1)
102
+ notes.push(`${field} is a placeholder -1 — replace it with a real ${firstType(prop.type) ?? 'number'}`);
98
103
  else if (value === false)
99
104
  notes.push(`${field} defaults to false here — set it deliberately`);
100
105
  }
@@ -117,20 +122,34 @@ function buildExample(verbName, schema = {}, opts = {}) {
117
122
  //
118
123
  // Containers are skipped: `{}` or `[]` in an example teaches nothing about
119
124
  // what belongs inside them.
125
+ // ⛔ DO NOT PUT OPTIONAL FIELDS IN THE PAYLOAD. This block used to seed up to
126
+ // three of them so the example never looked empty, and the note said the
127
+ // result was "a call you can run". It was the opposite: measured 2026-09-13,
128
+ //
129
+ // solid verbs example workflow.list -> {"status":"<status>","limit":0}
130
+ // that payload -> 400 BAD_REQUEST
131
+ // {} -> ok:true
132
+ //
133
+ // The same for invoice.summary and report_transactions. Three working verbs
134
+ // were pinned into the eval baseline as broken, because the example handed
135
+ // out values the caller never asked for and the server will not take —
136
+ // `limit: 0` and a literal `"<status>"`. The verbs were fine; the example
137
+ // broke them, and then certified the break with --dry-run.
138
+ //
139
+ // The intent was sound: a bare {} looks useless and teaches nothing. The
140
+ // answer is to NAME the optional fields, which `optional` already does, and
141
+ // leave the payload as the call that actually works.
120
142
  const seeded = [];
121
143
  if (callerRequired.length === 0) {
122
- const candidates = Object.keys(properties).filter((f) => {
123
- if (required.includes(f) || schema_validate_1.AUTH_INJECTED.has(f))
124
- return false;
125
- const t = firstType(properties[f]?.type);
126
- return t !== 'object' && t !== 'array';
127
- });
128
- for (const field of candidates.slice(0, 3)) {
129
- payload[field] = placeholderFor(field, properties[field] ?? {});
130
- seeded.push(field);
144
+ const namable = Object.keys(properties).filter((f) => !required.includes(f) && !schema_validate_1.AUTH_INJECTED.has(f));
145
+ if (namable.length) {
146
+ notes.push(`no field is required beyond auth — send {} as it stands. ` +
147
+ `Optional: ${namable.slice(0, 8).join(', ')}` +
148
+ `${namable.length > 8 ? `, +${namable.length - 8} more` : ''} ` +
149
+ `(see \`solid verbs describe ${verbName}\` for each one's type).`);
131
150
  }
132
- if (seeded.length) {
133
- notes.push(`no field is required beyond auth — ${seeded.join(', ')} are optional, seeded so this is a call you can run`);
151
+ else {
152
+ notes.push('no field is required beyond auth — send {} as it stands.');
134
153
  }
135
154
  }
136
155
  const writes = opts.sideEffects !== undefined && opts.sideEffects !== 'read';
@@ -1 +1 @@
1
- {"version":3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
16
  * Pure. No I/O, no env, no clock — the ranking is unit-testable on its own.
17
17
  */
18
+ /**
19
+ * Replace every idiom in a normalised query with the platform terms it means.
20
+ * Operates on a space-separated, punctuation-stripped string so that
21
+ * "what's it worth" and "on file?" match their keys.
22
+ */
23
+ export declare function applyPhrases(normalised: string): string;
24
+ /**
25
+ * Translate idioms and report WHICH terms an idiom put there.
26
+ *
27
+ * ⛔ AN IDIOM IS EVIDENCE ABOUT INTENT, NOT VOCABULARY, AND IS WEIGHTED AS
28
+ * SUCH. A word that merely appears in a query is weak evidence — the owner may
29
+ * be describing context ("I just got off the phone with Dana"). A word this
30
+ * map put there is different in kind: it is there because a phrase the owner
31
+ * actually said MEANS that platform thing. Measured 2026-09-14, without the
32
+ * distinction: "Make a note that she wants a quote" translated correctly to
33
+ * `notes` and still lost to `phone.pricing`, because `phone` and `quote` —
34
+ * both incidental narrative — covered two terms to `notes`' one, and coverage
35
+ * decides ties. The translation was right and got outvoted by the noise it
36
+ * was translated out of.
37
+ */
38
+ export declare function analyse(normalised: string): {
39
+ translated: string;
40
+ fromIdiom: Set<string>;
41
+ };
42
+ /**
43
+ * True when the caller OPENED with an instruction: "Text Dana…", "Book Dana…".
44
+ *
45
+ * ⛔ FIRST POSITION, AND ONLY FIRST. The same reasoning `isReadIntent` already
46
+ * relies on: an imperative LEADS its sentence, and the identical word in the
47
+ * middle is just a word. "Text Dana to say we're running late" names its
48
+ * action in the first word and then spends six words on the MESSAGE — content
49
+ * that belongs in the SMS, not in the search. Without this, `text` was one
50
+ * term among seven and `healthcare_escalate_urgent` won on prose overlap.
51
+ *
52
+ * Deliberately not a synonym boost: this is about WHERE the word sits, so it
53
+ * applies to the word the owner actually typed and to whatever it translates
54
+ * to, but never turns a mid-sentence noun into a command.
55
+ */
56
+ export declare function leadingAction(query: string): string | null;
18
57
  export interface SearchableVerb {
19
58
  name: string;
20
59
  description?: string;
@@ -30,8 +69,24 @@ export interface VerbMatch {
30
69
  /** Internal: the canonical twin, used to collapse duplicate pairs. */
31
70
  canonicalOf?: string | null;
32
71
  }
33
- /** Split a phrase into meaningful lowercase terms. */
72
+ /**
73
+ * Split a phrase into meaningful lowercase terms.
74
+ *
75
+ * Punctuation is flattened to spaces BEFORE idiom matching, so an apostrophe
76
+ * or a question mark cannot hide a phrase from its key ("on file?" is still
77
+ * "on file"). Idioms are translated first, then stopwords are dropped —
78
+ * in that order, because a phrase may legitimately contain a stopword
79
+ * ("make A note", "have left").
80
+ */
81
+ export declare function normalise(query: string): string;
34
82
  export declare function terms(query: string): string[];
83
+ /**
84
+ * True when the query reads as a QUESTION and contains no instruction to act.
85
+ *
86
+ * Both halves are required. "How do I delete a contact?" is interrogative but
87
+ * names the action, so the delete verb is exactly what was asked for.
88
+ */
89
+ export declare function isReadIntent(query: string): boolean;
35
90
  /**
36
91
  * Rank verbs against a plain-language query.
37
92
  *
@@ -1 +1 @@
1
- {"version":3,"file":"verb-search.d.ts","sourceRoot":"","sources":["../../src/lib/verb-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA+DH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,sDAAsD;AACtD,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAK7C;AAwCD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS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