@solidnumber/cli 1.9.30 → 1.10.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.
- package/dist/commands/doctor.js +94 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/mcp.d.ts +17 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +261 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/schema.d.ts.map +1 -1
- package/dist/commands/schema.js +60 -0
- package/dist/commands/schema.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +1 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +41 -7
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/dry-run.d.ts +11 -0
- package/dist/lib/dry-run.d.ts.map +1 -1
- package/dist/lib/dry-run.js +90 -0
- package/dist/lib/dry-run.js.map +1 -1
- package/dist/lib/list-envelope.d.ts +67 -0
- package/dist/lib/list-envelope.d.ts.map +1 -0
- package/dist/lib/list-envelope.js +170 -0
- package/dist/lib/list-envelope.js.map +1 -0
- package/dist/lib/mcp-client-config.d.ts +57 -0
- package/dist/lib/mcp-client-config.d.ts.map +1 -0
- package/dist/lib/mcp-client-config.js +166 -0
- package/dist/lib/mcp-client-config.js.map +1 -0
- package/dist/lib/program-registry.d.ts +19 -0
- package/dist/lib/program-registry.d.ts.map +1 -0
- package/dist/lib/program-registry.js +17 -0
- package/dist/lib/program-registry.js.map +1 -0
- package/dist/lib/scope-diagnostic.d.ts +42 -0
- package/dist/lib/scope-diagnostic.d.ts.map +1 -0
- package/dist/lib/scope-diagnostic.js +104 -0
- package/dist/lib/scope-diagnostic.js.map +1 -0
- package/dist/lib/verb-manifest.d.ts +66 -0
- package/dist/lib/verb-manifest.d.ts.map +1 -0
- package/dist/lib/verb-manifest.js +104 -0
- package/dist/lib/verb-manifest.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Scope/feature-gap diagnostic (Sprint 1 T1.6).
|
|
4
|
+
*
|
|
5
|
+
* Compares the scopes currently granted on an API key against the scopes
|
|
6
|
+
* the tenant's enabled features *should* grant (per backend service
|
|
7
|
+
* services/scope_expansion.py, Sprint 0 T0.5). Surfaces mismatches so
|
|
8
|
+
* `solid doctor` can tell the operator: "your key is missing agents:read
|
|
9
|
+
* because your tenant enabled the agents feature after the key was
|
|
10
|
+
* issued — rotate the key and you'll pick up the new scopes."
|
|
11
|
+
*
|
|
12
|
+
* Pure — takes primitives, returns primitives. No HTTP, no fs. The
|
|
13
|
+
* backend has the same map in services/scope_expansion.py; this is a
|
|
14
|
+
* narrow client-side mirror so operators see drift without a round-trip.
|
|
15
|
+
* Kept small on purpose: if it diverges from the backend map, the only
|
|
16
|
+
* impact is a diagnostic miss — enforcement is still server-side.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.FEATURE_TO_SCOPES = void 0;
|
|
20
|
+
exports.computeScopeGap = computeScopeGap;
|
|
21
|
+
exports.diagnoseScopeGap = diagnoseScopeGap;
|
|
22
|
+
/**
|
|
23
|
+
* Feature key → scopes it should grant on issuance.
|
|
24
|
+
* MUST stay in lock-step with solid-backend/services/scope_expansion.py
|
|
25
|
+
* FEATURE_TO_SCOPES. Keep small — every entry is a permission decision.
|
|
26
|
+
*/
|
|
27
|
+
exports.FEATURE_TO_SCOPES = {
|
|
28
|
+
agents: ['agents:read', 'agents:write', 'agents:data', 'agents:converse'],
|
|
29
|
+
'ai-agents-platform': ['agents:read', 'agents:write', 'agents:data', 'agents:converse'],
|
|
30
|
+
};
|
|
31
|
+
function isTruthy(v) {
|
|
32
|
+
if (typeof v === 'boolean')
|
|
33
|
+
return v;
|
|
34
|
+
if (typeof v === 'number')
|
|
35
|
+
return v !== 0;
|
|
36
|
+
if (typeof v === 'string')
|
|
37
|
+
return /^(1|true|yes|on)$/i.test(v.trim());
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Given the key's current scopes and the tenant's feature flags, return
|
|
42
|
+
* a sorted list of scopes that SHOULD be granted but aren't.
|
|
43
|
+
*
|
|
44
|
+
* Pure — no I/O.
|
|
45
|
+
*/
|
|
46
|
+
function computeScopeGap(currentScopes, featureSettings, featureToScopes = exports.FEATURE_TO_SCOPES) {
|
|
47
|
+
const current = new Set(currentScopes ?? []);
|
|
48
|
+
const implied = new Set();
|
|
49
|
+
if (featureSettings) {
|
|
50
|
+
for (const [feature, scopes] of Object.entries(featureToScopes)) {
|
|
51
|
+
if (isTruthy(featureSettings[feature])) {
|
|
52
|
+
for (const s of scopes)
|
|
53
|
+
implied.add(s);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const gap = [];
|
|
58
|
+
for (const s of implied) {
|
|
59
|
+
if (!current.has(s))
|
|
60
|
+
gap.push(s);
|
|
61
|
+
}
|
|
62
|
+
gap.sort();
|
|
63
|
+
return gap;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Wrap computeScopeGap with a pre-canned diagnostic payload — the shape
|
|
67
|
+
* `solid doctor` surfaces to the operator. Pure.
|
|
68
|
+
*/
|
|
69
|
+
function diagnoseScopeGap(currentScopes, featureSettings) {
|
|
70
|
+
if (!featureSettings || Object.keys(featureSettings).length === 0) {
|
|
71
|
+
return {
|
|
72
|
+
severity: 'warn',
|
|
73
|
+
code: 'NO_FEATURES',
|
|
74
|
+
message: 'Tenant feature flags not available; cannot check scope gap.',
|
|
75
|
+
missing_scopes: [],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const gap = computeScopeGap(currentScopes, featureSettings);
|
|
79
|
+
if (gap.length === 0) {
|
|
80
|
+
return {
|
|
81
|
+
severity: 'ok',
|
|
82
|
+
code: 'ALL_GRANTED',
|
|
83
|
+
message: 'Key scopes match tenant features.',
|
|
84
|
+
missing_scopes: [],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (!currentScopes || currentScopes.length === 0) {
|
|
88
|
+
return {
|
|
89
|
+
severity: 'fail',
|
|
90
|
+
code: 'NO_SCOPES',
|
|
91
|
+
message: 'Current API key has no scopes — every tenant feature is under-privileged.',
|
|
92
|
+
missing_scopes: gap,
|
|
93
|
+
hint: 'Rotate with: solid keys rotate --scopes "' + gap.join(',') + '"',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
severity: 'fail',
|
|
98
|
+
code: 'SCOPE_GAP',
|
|
99
|
+
message: `API key is missing ${gap.length} scope(s) that tenant features imply.`,
|
|
100
|
+
missing_scopes: gap,
|
|
101
|
+
hint: 'Rotate with: solid keys rotate --add-scope ' + gap.join(' --add-scope '),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=scope-diagnostic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-diagnostic.js","sourceRoot":"","sources":["../../src/lib/scope-diagnostic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAyBH,0CAoBC;AAcD,4CAqCC;AA9FD;;;;GAIG;AACU,QAAA,iBAAiB,GAAgD;IAC5E,MAAM,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC;IACzE,oBAAoB,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,CAAC;CACxF,CAAC;AAEF,SAAS,QAAQ,CAAC,CAAU;IAC1B,IAAI,OAAO,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IACrC,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,oBAAoB,CAAC,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AAC,CAAC;IAC5D,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,mCAAmC;YAC5C,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjD,OAAO;YACL,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,2EAA2E;YACpF,cAAc,EAAE,GAAG;YACnB,IAAI,EAAE,2CAA2C,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG;SACxE,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,sBAAsB,GAAG,CAAC,MAAM,uCAAuC;QAChF,cAAc,EAAE,GAAG;QACnB,IAAI,EAAE,6CAA6C,GAAG,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;KAChF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure verb-manifest walker.
|
|
3
|
+
*
|
|
4
|
+
* Walks a Commander tree and emits a flat list of {path, description,
|
|
5
|
+
* options, args, subcommands} entries. Used by `solid schema verbs
|
|
6
|
+
* --json` so agents (Claude Code, Cursor) can discover every verb the
|
|
7
|
+
* CLI exposes without scraping --help.
|
|
8
|
+
*
|
|
9
|
+
* No I/O, no commander parsing — just tree traversal + field
|
|
10
|
+
* extraction. Unit-tested in src/__tests__/verb-manifest.test.ts.
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from 'commander';
|
|
13
|
+
export interface VerbOption {
|
|
14
|
+
flags: string;
|
|
15
|
+
description: string;
|
|
16
|
+
required: boolean;
|
|
17
|
+
default?: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface VerbArg {
|
|
20
|
+
name: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
description?: string;
|
|
23
|
+
variadic?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface VerbEntry {
|
|
26
|
+
/** Short name — e.g. "pages". */
|
|
27
|
+
verb: string;
|
|
28
|
+
/** Full invocation path — e.g. "solid schema pages". */
|
|
29
|
+
path: string;
|
|
30
|
+
/** One-line description from .description(). */
|
|
31
|
+
description: string;
|
|
32
|
+
/** How deep in the tree (0 = root children, 1 = grandchildren, ...). */
|
|
33
|
+
depth: number;
|
|
34
|
+
/** Options on this command (NOT inherited). */
|
|
35
|
+
options: VerbOption[];
|
|
36
|
+
/** Positional args declared on this command. */
|
|
37
|
+
args: VerbArg[];
|
|
38
|
+
/** Subcommand names (not full paths). */
|
|
39
|
+
subcommands: string[];
|
|
40
|
+
/** True when this command has no subcommands and can be invoked directly. */
|
|
41
|
+
is_leaf: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface WalkOptions {
|
|
44
|
+
/** Prefix prepended to every path. Defaults to "solid". */
|
|
45
|
+
prefix?: string;
|
|
46
|
+
/** Skip the root cmd itself — emit only its descendants. Default true. */
|
|
47
|
+
skipRoot?: boolean;
|
|
48
|
+
/** Include hidden commands (commander hides some with .hidden()). Default false. */
|
|
49
|
+
includeHidden?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Recursively walk a Commander tree and return a flat manifest.
|
|
53
|
+
*
|
|
54
|
+
* Pure — depends only on properties accessible through Commander's public
|
|
55
|
+
* surface plus tolerant fallbacks for its internal fields.
|
|
56
|
+
*/
|
|
57
|
+
export declare function walkVerbs(root: Command, opts?: WalkOptions): VerbEntry[];
|
|
58
|
+
/** Build the wire payload for `solid schema verbs --json`. */
|
|
59
|
+
export interface VerbManifest {
|
|
60
|
+
version: '1.0';
|
|
61
|
+
cli_version: string;
|
|
62
|
+
count: number;
|
|
63
|
+
verbs: VerbEntry[];
|
|
64
|
+
}
|
|
65
|
+
export declare function buildVerbManifest(root: Command, cliVersion: string, opts?: WalkOptions): VerbManifest;
|
|
66
|
+
//# sourceMappingURL=verb-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verb-manifest.d.ts","sourceRoot":"","sources":["../../src/lib/verb-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,gDAAgD;IAChD,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,yCAAyC;IACzC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAC;CAClB;AAwDD,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oFAAoF;IACpF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,GAAE,WAAgB,GAAG,SAAS,EAAE,CAgD5E;AAED,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,WAAW,GACjB,YAAY,CAQd"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.walkVerbs = walkVerbs;
|
|
4
|
+
exports.buildVerbManifest = buildVerbManifest;
|
|
5
|
+
/** Safely extract option metadata, tolerant of both commander v7 and v10 shapes. */
|
|
6
|
+
function toOption(o) {
|
|
7
|
+
const entry = {
|
|
8
|
+
flags: o.flags ?? '',
|
|
9
|
+
description: o.description ?? '',
|
|
10
|
+
required: Boolean(o.required ?? o.mandatory ?? false),
|
|
11
|
+
};
|
|
12
|
+
if (o.defaultValue !== undefined) {
|
|
13
|
+
entry.default = o.defaultValue;
|
|
14
|
+
}
|
|
15
|
+
return entry;
|
|
16
|
+
}
|
|
17
|
+
/** Safely extract arg metadata from commander's Argument class. */
|
|
18
|
+
function toArg(a) {
|
|
19
|
+
// commander v7 stores args as { _name, required, description, variadic }
|
|
20
|
+
// commander v10 Argument class has a .name() method
|
|
21
|
+
let name = '';
|
|
22
|
+
if (typeof a.name === 'function') {
|
|
23
|
+
try {
|
|
24
|
+
name = a.name();
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
name = '';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else if (typeof a.name === 'string') {
|
|
31
|
+
name = a.name;
|
|
32
|
+
}
|
|
33
|
+
else if (a._name) {
|
|
34
|
+
name = a._name;
|
|
35
|
+
}
|
|
36
|
+
const entry = {
|
|
37
|
+
name,
|
|
38
|
+
required: Boolean(a.required ?? false),
|
|
39
|
+
};
|
|
40
|
+
if (a.description)
|
|
41
|
+
entry.description = a.description;
|
|
42
|
+
if (a.variadic)
|
|
43
|
+
entry.variadic = true;
|
|
44
|
+
return entry;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Recursively walk a Commander tree and return a flat manifest.
|
|
48
|
+
*
|
|
49
|
+
* Pure — depends only on properties accessible through Commander's public
|
|
50
|
+
* surface plus tolerant fallbacks for its internal fields.
|
|
51
|
+
*/
|
|
52
|
+
function walkVerbs(root, opts = {}) {
|
|
53
|
+
const prefix = opts.prefix ?? 'solid';
|
|
54
|
+
const skipRoot = opts.skipRoot ?? true;
|
|
55
|
+
const includeHidden = opts.includeHidden ?? false;
|
|
56
|
+
const out = [];
|
|
57
|
+
function visit(cmd, pathPrefix, depth) {
|
|
58
|
+
// commander exposes _hidden (v7) or cmd._hidden — tolerant access.
|
|
59
|
+
const hidden = Boolean(cmd._hidden);
|
|
60
|
+
if (hidden && !includeHidden)
|
|
61
|
+
return;
|
|
62
|
+
const name = cmd.name();
|
|
63
|
+
const thisPath = pathPrefix ? `${pathPrefix} ${name}` : name;
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
const rawArgs = cmd._args ?? cmd.registeredArguments ?? [];
|
|
66
|
+
const options = (cmd.options || []).map(toOption);
|
|
67
|
+
const args = rawArgs.map(toArg);
|
|
68
|
+
const subcommands = (cmd.commands || []).map((sc) => sc.name());
|
|
69
|
+
out.push({
|
|
70
|
+
verb: name,
|
|
71
|
+
path: thisPath,
|
|
72
|
+
description: cmd.description() || '',
|
|
73
|
+
depth,
|
|
74
|
+
options,
|
|
75
|
+
args,
|
|
76
|
+
subcommands,
|
|
77
|
+
is_leaf: subcommands.length === 0,
|
|
78
|
+
});
|
|
79
|
+
for (const sc of cmd.commands || []) {
|
|
80
|
+
visit(sc, thisPath, depth + 1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (skipRoot) {
|
|
84
|
+
// Emit the root's children only — typical for a CLI where the root IS
|
|
85
|
+
// the program name and has no verb of its own.
|
|
86
|
+
for (const sc of root.commands || []) {
|
|
87
|
+
visit(sc, prefix, 0);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
visit(root, '', 0);
|
|
92
|
+
}
|
|
93
|
+
return out;
|
|
94
|
+
}
|
|
95
|
+
function buildVerbManifest(root, cliVersion, opts) {
|
|
96
|
+
const verbs = walkVerbs(root, opts);
|
|
97
|
+
return {
|
|
98
|
+
version: '1.0',
|
|
99
|
+
cli_version: cliVersion,
|
|
100
|
+
count: verbs.length,
|
|
101
|
+
verbs,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=verb-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verb-manifest.js","sourceRoot":"","sources":["../../src/lib/verb-manifest.ts"],"names":[],"mappings":";;AAmHA,8BAgDC;AAUD,8CAYC;AA3HD,oFAAoF;AACpF,SAAS,QAAQ,CAAC,CAAgB;IAChC,MAAM,KAAK,GAAe;QACxB,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;QACpB,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,EAAE;QAChC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACjC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC;IACjC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,mEAAmE;AACnE,SAAS,KAAK,CAAC,CAAa;IAC1B,yEAAyE;IACzE,oDAAoD;IAC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C;QACN,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAUD,SAAgB,iBAAiB,CAC/B,IAAa,EACb,UAAkB,EAClB,IAAkB;IAElB,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,OAAO;QACL,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,UAAU;QACvB,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidnumber/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "AI business infrastructure from the terminal — CRM, payments, voice AI, 116 agents, 52 industry templates. solid clone plumber → instant business. Also: programmatic TS SDK via @solidnumber/cli/sdk.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|