@solidnumber/cli 1.2.0 → 1.4.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/auth.js +18 -23
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/connect.d.ts +8 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +632 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/context.d.ts +17 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +476 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/design.d.ts +23 -0
- package/dist/commands/design.d.ts.map +1 -0
- package/dist/commands/design.js +293 -0
- package/dist/commands/design.js.map +1 -0
- package/dist/commands/explore.d.ts +23 -0
- package/dist/commands/explore.d.ts.map +1 -0
- package/dist/commands/explore.js +224 -0
- package/dist/commands/explore.js.map +1 -0
- package/dist/commands/payment.d.ts +27 -0
- package/dist/commands/payment.d.ts.map +1 -0
- package/dist/commands/payment.js +305 -0
- package/dist/commands/payment.js.map +1 -0
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
- package/platform-docs/ai.txt +324 -0
- package/platform-docs/llms.txt +191 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ================================================================================
|
|
4
|
+
* solid design — Google Stitch Design Integration
|
|
5
|
+
* ================================================================================
|
|
6
|
+
*
|
|
7
|
+
* Optional design layer powered by Google Stitch AI.
|
|
8
|
+
* Generates UI designs from text prompts and converts them to
|
|
9
|
+
* Solid# layout_json blocks — the same format used by Alex, Visual Builder,
|
|
10
|
+
* and all CMS pages.
|
|
11
|
+
*
|
|
12
|
+
* This is a LAYER — if Stitch is unavailable, all other CMS tools work normally.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* solid design generate "modern plumbing homepage" # Generate from prompt
|
|
16
|
+
* solid design import --file design.html # Import HTML file
|
|
17
|
+
* solid design import --stdin # Import HTML from stdin
|
|
18
|
+
* solid design status # Check Stitch availability
|
|
19
|
+
* solid design pull --project <id> --screen <id> # Pull screen from Stitch
|
|
20
|
+
* ================================================================================
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
55
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
56
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
+
exports.designCommand = void 0;
|
|
60
|
+
const commander_1 = require("commander");
|
|
61
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
62
|
+
const ora_1 = __importDefault(require("ora"));
|
|
63
|
+
const fs = __importStar(require("fs"));
|
|
64
|
+
const path = __importStar(require("path"));
|
|
65
|
+
// ── API helpers ────────────────────────────────────────────────────
|
|
66
|
+
function getApiBase() {
|
|
67
|
+
return process.env.SOLID_API_URL || 'https://api.solidnumber.com';
|
|
68
|
+
}
|
|
69
|
+
function getToken() {
|
|
70
|
+
const configDir = path.join(process.env.HOME || process.env.USERPROFILE || '.', '.solid');
|
|
71
|
+
const tokenFile = path.join(configDir, 'token');
|
|
72
|
+
if (fs.existsSync(tokenFile)) {
|
|
73
|
+
return fs.readFileSync(tokenFile, 'utf-8').trim();
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
async function apiCall(method, endpoint, body) {
|
|
78
|
+
const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
|
|
79
|
+
const token = getToken();
|
|
80
|
+
const headers = {
|
|
81
|
+
'Content-Type': 'application/json',
|
|
82
|
+
};
|
|
83
|
+
if (token) {
|
|
84
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
85
|
+
}
|
|
86
|
+
const url = `${getApiBase()}/api/v1${endpoint}`;
|
|
87
|
+
const response = await axios({
|
|
88
|
+
method,
|
|
89
|
+
url,
|
|
90
|
+
data: body,
|
|
91
|
+
headers,
|
|
92
|
+
timeout: 60000,
|
|
93
|
+
});
|
|
94
|
+
return response.data;
|
|
95
|
+
}
|
|
96
|
+
// ── Commands ───────────────────────────────────────────────────────
|
|
97
|
+
exports.designCommand = new commander_1.Command('design')
|
|
98
|
+
.description('Design with Stitch AI — generate UI from text prompts')
|
|
99
|
+
.addHelpText('after', `
|
|
100
|
+
${chalk_1.default.dim(' This is an optional layer powered by Google Stitch AI.')}
|
|
101
|
+
${chalk_1.default.dim(' If Stitch is not configured, all other CMS tools work normally.')}
|
|
102
|
+
|
|
103
|
+
${chalk_1.default.bold('Examples:')}
|
|
104
|
+
${chalk_1.default.cyan('solid design status')} Check if Stitch is available
|
|
105
|
+
${chalk_1.default.cyan('solid design generate "plumbing homepage"')} Generate design from prompt
|
|
106
|
+
${chalk_1.default.cyan('solid design import --file page.html')} Import HTML to layout_json
|
|
107
|
+
${chalk_1.default.cyan('solid design pull --project abc --screen x')} Pull from Stitch project
|
|
108
|
+
`);
|
|
109
|
+
// ── solid design status ────────────────────────────────────────────
|
|
110
|
+
exports.designCommand
|
|
111
|
+
.command('status')
|
|
112
|
+
.description('Check Stitch integration status')
|
|
113
|
+
.action(async () => {
|
|
114
|
+
const spinner = (0, ora_1.default)('Checking Stitch status...').start();
|
|
115
|
+
try {
|
|
116
|
+
const data = await apiCall('GET', '/stitch/status');
|
|
117
|
+
spinner.stop();
|
|
118
|
+
console.log('');
|
|
119
|
+
console.log(chalk_1.default.bold(' Stitch Design Layer'));
|
|
120
|
+
console.log(chalk_1.default.dim(' ─────────────────────'));
|
|
121
|
+
console.log(` Enabled: ${data.enabled ? chalk_1.default.green('Yes') : chalk_1.default.red('No')}`);
|
|
122
|
+
console.log(` API Key: ${data.api_configured ? chalk_1.default.green('Configured') : chalk_1.default.yellow('Not set')}`);
|
|
123
|
+
if (data.connected !== undefined) {
|
|
124
|
+
console.log(` Connected: ${data.connected ? chalk_1.default.green('Yes') : chalk_1.default.red('No')}`);
|
|
125
|
+
}
|
|
126
|
+
if (data.project_count !== undefined) {
|
|
127
|
+
console.log(` Projects: ${chalk_1.default.cyan(data.project_count)}`);
|
|
128
|
+
}
|
|
129
|
+
if (data.error) {
|
|
130
|
+
console.log(` Error: ${chalk_1.default.red(data.error)}`);
|
|
131
|
+
}
|
|
132
|
+
console.log('');
|
|
133
|
+
if (!data.enabled) {
|
|
134
|
+
console.log(chalk_1.default.dim(' Set STITCH_API_KEY in your environment to enable Stitch design.'));
|
|
135
|
+
console.log(chalk_1.default.dim(' Get your key at: https://stitch.withgoogle.com'));
|
|
136
|
+
console.log('');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
spinner.fail('Could not check Stitch status');
|
|
141
|
+
if (err.response?.status === 401) {
|
|
142
|
+
console.log(chalk_1.default.yellow('\n Run `solid auth login` first.\n'));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
console.log(chalk_1.default.red(`\n ${err.message}\n`));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
// ── solid design generate ──────────────────────────────────────────
|
|
150
|
+
exports.designCommand
|
|
151
|
+
.command('generate')
|
|
152
|
+
.description('Generate a page design from a text prompt')
|
|
153
|
+
.argument('<prompt...>', 'Design description')
|
|
154
|
+
.option('-d, --device <type>', 'Device type: DESKTOP, MOBILE, TABLET', 'DESKTOP')
|
|
155
|
+
.option('-p, --project <id>', 'Stitch project ID', 'default')
|
|
156
|
+
.option('-o, --output <file>', 'Save layout_json to file')
|
|
157
|
+
.option('--page-id <id>', 'Apply to existing page ID')
|
|
158
|
+
.action(async (promptParts, options) => {
|
|
159
|
+
const prompt = promptParts.join(' ');
|
|
160
|
+
const spinner = (0, ora_1.default)(`Generating design: "${prompt.substring(0, 60)}..."`).start();
|
|
161
|
+
try {
|
|
162
|
+
const data = await apiCall('POST', '/stitch/generate', {
|
|
163
|
+
project_id: options.project,
|
|
164
|
+
prompt,
|
|
165
|
+
device_type: options.device.toUpperCase(),
|
|
166
|
+
page_id: options.pageId ? parseInt(options.pageId) : undefined,
|
|
167
|
+
});
|
|
168
|
+
spinner.succeed(`Generated ${chalk_1.default.cyan(data.sections.length)} sections`);
|
|
169
|
+
// Display sections summary
|
|
170
|
+
console.log('');
|
|
171
|
+
for (const section of data.sections) {
|
|
172
|
+
const label = section.type.replace(/_/g, ' ').replace(/-/g, ' ');
|
|
173
|
+
console.log(` ${chalk_1.default.blue('■')} ${chalk_1.default.bold(label.padEnd(20))} ${chalk_1.default.dim(section.title || '')}`);
|
|
174
|
+
}
|
|
175
|
+
console.log('');
|
|
176
|
+
if (data.screen_id) {
|
|
177
|
+
console.log(chalk_1.default.dim(` Screen ID: ${data.screen_id}`));
|
|
178
|
+
}
|
|
179
|
+
// Save to file if requested
|
|
180
|
+
if (options.output) {
|
|
181
|
+
const output = JSON.stringify({ sections: data.sections }, null, 2);
|
|
182
|
+
fs.writeFileSync(options.output, output, 'utf-8');
|
|
183
|
+
console.log(chalk_1.default.green(` Saved to ${options.output}`));
|
|
184
|
+
}
|
|
185
|
+
console.log('');
|
|
186
|
+
}
|
|
187
|
+
catch (err) {
|
|
188
|
+
spinner.fail('Design generation failed');
|
|
189
|
+
if (err.response?.status === 503) {
|
|
190
|
+
console.log(chalk_1.default.yellow('\n Stitch is not configured. Run `solid design status` for details.\n'));
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
console.log(chalk_1.default.red(`\n ${err.response?.data?.detail || err.message}\n`));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
// ── solid design import ────────────────────────────────────────────
|
|
198
|
+
exports.designCommand
|
|
199
|
+
.command('import')
|
|
200
|
+
.description('Import HTML and convert to layout_json blocks')
|
|
201
|
+
.option('-f, --file <path>', 'HTML file to import')
|
|
202
|
+
.option('--stdin', 'Read HTML from stdin')
|
|
203
|
+
.option('-o, --output <file>', 'Save layout_json to file')
|
|
204
|
+
.action(async (options) => {
|
|
205
|
+
let html = '';
|
|
206
|
+
if (options.file) {
|
|
207
|
+
const filePath = path.resolve(options.file);
|
|
208
|
+
if (!fs.existsSync(filePath)) {
|
|
209
|
+
console.log(chalk_1.default.red(`\n File not found: ${filePath}\n`));
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
212
|
+
html = fs.readFileSync(filePath, 'utf-8');
|
|
213
|
+
}
|
|
214
|
+
else if (options.stdin) {
|
|
215
|
+
// Read from stdin
|
|
216
|
+
const chunks = [];
|
|
217
|
+
for await (const chunk of process.stdin) {
|
|
218
|
+
chunks.push(chunk);
|
|
219
|
+
}
|
|
220
|
+
html = Buffer.concat(chunks).toString('utf-8');
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
console.log(chalk_1.default.yellow('\n Specify --file <path> or --stdin\n'));
|
|
224
|
+
process.exit(1);
|
|
225
|
+
}
|
|
226
|
+
const spinner = (0, ora_1.default)(`Importing HTML (${(html.length / 1024).toFixed(1)} KB)...`).start();
|
|
227
|
+
try {
|
|
228
|
+
const data = await apiCall('POST', '/stitch/import-html', { html });
|
|
229
|
+
spinner.succeed(`Converted to ${chalk_1.default.cyan(data.sections.length)} sections`);
|
|
230
|
+
// Display sections summary
|
|
231
|
+
console.log('');
|
|
232
|
+
for (const section of data.sections) {
|
|
233
|
+
const label = section.type.replace(/_/g, ' ').replace(/-/g, ' ');
|
|
234
|
+
console.log(` ${chalk_1.default.blue('■')} ${chalk_1.default.bold(label.padEnd(20))} ${chalk_1.default.dim(section.title || '')}`);
|
|
235
|
+
}
|
|
236
|
+
console.log('');
|
|
237
|
+
// Save to file if requested
|
|
238
|
+
if (options.output) {
|
|
239
|
+
const output = JSON.stringify({ sections: data.sections }, null, 2);
|
|
240
|
+
fs.writeFileSync(options.output, output, 'utf-8');
|
|
241
|
+
console.log(chalk_1.default.green(` Saved to ${options.output}`));
|
|
242
|
+
}
|
|
243
|
+
console.log('');
|
|
244
|
+
}
|
|
245
|
+
catch (err) {
|
|
246
|
+
spinner.fail('HTML import failed');
|
|
247
|
+
console.log(chalk_1.default.red(`\n ${err.response?.data?.detail || err.message}\n`));
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
// ── solid design pull ──────────────────────────────────────────────
|
|
251
|
+
exports.designCommand
|
|
252
|
+
.command('pull')
|
|
253
|
+
.description('Pull a screen from a Stitch project')
|
|
254
|
+
.requiredOption('-p, --project <id>', 'Stitch project ID')
|
|
255
|
+
.requiredOption('-s, --screen <id>', 'Stitch screen ID')
|
|
256
|
+
.option('-o, --output <file>', 'Save layout_json to file')
|
|
257
|
+
.action(async (options) => {
|
|
258
|
+
const spinner = (0, ora_1.default)(`Pulling screen ${options.screen} from project ${options.project}...`).start();
|
|
259
|
+
try {
|
|
260
|
+
// Use the generate endpoint with the screen's current state
|
|
261
|
+
// (effectively a re-import of an existing screen)
|
|
262
|
+
const data = await apiCall('POST', '/stitch/edit', {
|
|
263
|
+
project_id: options.project,
|
|
264
|
+
screen_id: options.screen,
|
|
265
|
+
prompt: 'Return the current design as-is',
|
|
266
|
+
});
|
|
267
|
+
spinner.succeed(`Pulled ${chalk_1.default.cyan(data.sections.length)} sections`);
|
|
268
|
+
// Display sections summary
|
|
269
|
+
console.log('');
|
|
270
|
+
for (const section of data.sections) {
|
|
271
|
+
const label = section.type.replace(/_/g, ' ').replace(/-/g, ' ');
|
|
272
|
+
console.log(` ${chalk_1.default.blue('■')} ${chalk_1.default.bold(label.padEnd(20))} ${chalk_1.default.dim(section.title || '')}`);
|
|
273
|
+
}
|
|
274
|
+
console.log('');
|
|
275
|
+
// Save to file if requested
|
|
276
|
+
if (options.output) {
|
|
277
|
+
const output = JSON.stringify({ sections: data.sections }, null, 2);
|
|
278
|
+
fs.writeFileSync(options.output, output, 'utf-8');
|
|
279
|
+
console.log(chalk_1.default.green(` Saved to ${options.output}`));
|
|
280
|
+
}
|
|
281
|
+
console.log('');
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
spinner.fail('Pull failed');
|
|
285
|
+
if (err.response?.status === 503) {
|
|
286
|
+
console.log(chalk_1.default.yellow('\n Stitch is not configured. Run `solid design status` for details.\n'));
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
console.log(chalk_1.default.red(`\n ${err.response?.data?.detail || err.message}\n`));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
//# sourceMappingURL=design.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design.js","sourceRoot":"","sources":["../../src/commands/design.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,kDAA0B;AAC1B,8CAAsB;AACtB,uCAAyB;AACzB,2CAA6B;AAE7B,sEAAsE;AAEtE,SAAS,UAAU;IACjB,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,6BAA6B,CAAC;AACpE,CAAC;AAED,SAAS,QAAQ;IACf,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,EAClD,QAAQ,CACT,CAAC;IACF,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAChD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,OAAO,CACpB,MAAc,EACd,QAAgB,EAChB,IAAU;IAEV,MAAM,KAAK,GAAG,CAAC,wDAAa,OAAO,GAAC,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,OAAO,GAA2B;QACtC,cAAc,EAAE,kBAAkB;KACnC,CAAC;IACF,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,KAAK,EAAE,CAAC;IAC/C,CAAC;IAED,MAAM,GAAG,GAAG,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CAAC,QAAQ,EAAE,EAC3B,IAAI,EACJ,CAAC,CACF,CAAC;YACF,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;YAClD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,cAAc,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5B,IAAI,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;YACjC,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,MAAM,CACV,wEAAwE,CACzE,CACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ================================================================================
|
|
3
|
+
* solid explore — Platform Intelligence Console
|
|
4
|
+
* ================================================================================
|
|
5
|
+
*
|
|
6
|
+
* Interactive AI-powered exploration of the Solid# platform.
|
|
7
|
+
* Designed for partners, evaluators, and potential acquirers.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Calls backend API (all intelligence lives server-side)
|
|
11
|
+
* - Premium models: Sonnet baseline, Opus for deep dives
|
|
12
|
+
* - P.I.T.C.H. personality: playful, adaptive, transparent, no BS
|
|
13
|
+
* - Deep curated knowledge base (not just marketing docs)
|
|
14
|
+
* - Two-tier rate limiting (burst + sustained)
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* solid explore # Interactive REPL
|
|
18
|
+
* solid explore "question here" # Single question
|
|
19
|
+
* ================================================================================
|
|
20
|
+
*/
|
|
21
|
+
import { Command } from 'commander';
|
|
22
|
+
export declare const exploreCommand: Command;
|
|
23
|
+
//# sourceMappingURL=explore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../src/commands/explore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0JpC,eAAO,MAAM,cAAc,SA4DvB,CAAC"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ================================================================================
|
|
4
|
+
* solid explore — Platform Intelligence Console
|
|
5
|
+
* ================================================================================
|
|
6
|
+
*
|
|
7
|
+
* Interactive AI-powered exploration of the Solid# platform.
|
|
8
|
+
* Designed for partners, evaluators, and potential acquirers.
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* - Calls backend API (all intelligence lives server-side)
|
|
12
|
+
* - Premium models: Sonnet baseline, Opus for deep dives
|
|
13
|
+
* - P.I.T.C.H. personality: playful, adaptive, transparent, no BS
|
|
14
|
+
* - Deep curated knowledge base (not just marketing docs)
|
|
15
|
+
* - Two-tier rate limiting (burst + sustained)
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* solid explore # Interactive REPL
|
|
19
|
+
* solid explore "question here" # Single question
|
|
20
|
+
* ================================================================================
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
55
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
56
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
+
exports.exploreCommand = void 0;
|
|
60
|
+
const commander_1 = require("commander");
|
|
61
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
62
|
+
const readline = __importStar(require("readline"));
|
|
63
|
+
const path = __importStar(require("path"));
|
|
64
|
+
const fs = __importStar(require("fs"));
|
|
65
|
+
// ── Platform Knowledge (bundled at build time) ──────────────────────
|
|
66
|
+
function loadBundledDocs() {
|
|
67
|
+
const docsDir = path.join(__dirname, '..', '..', 'platform-docs');
|
|
68
|
+
const files = ['llms.txt', 'ai.txt'];
|
|
69
|
+
const parts = [];
|
|
70
|
+
for (const file of files) {
|
|
71
|
+
const filePath = path.join(docsDir, file);
|
|
72
|
+
if (fs.existsSync(filePath)) {
|
|
73
|
+
parts.push(fs.readFileSync(filePath, 'utf-8'));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Fallback: try to fetch from solidnumber.com if not bundled
|
|
77
|
+
if (parts.length === 0) {
|
|
78
|
+
return ''; // Will fetch at runtime
|
|
79
|
+
}
|
|
80
|
+
return parts.join('\n\n---\n\n');
|
|
81
|
+
}
|
|
82
|
+
async function fetchDocsIfNeeded(bundled) {
|
|
83
|
+
if (bundled.length > 1000)
|
|
84
|
+
return bundled;
|
|
85
|
+
// Fetch from public URL as fallback
|
|
86
|
+
try {
|
|
87
|
+
const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
|
|
88
|
+
const [llmsRes, aiRes] = await Promise.all([
|
|
89
|
+
axios.get('https://solidnumber.com/llms.txt', { timeout: 5000 }),
|
|
90
|
+
axios.get('https://solidnumber.com/ai.txt', { timeout: 5000 }),
|
|
91
|
+
]);
|
|
92
|
+
return `${llmsRes.data}\n\n---\n\n${aiRes.data}`;
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return 'Solid# is AI business infrastructure with 116 agents, 608 MCP tools, 511 database tables, and 4M lines of code across 52 industries.';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// ── System Prompt (unused — backend handles all intelligence) ────────
|
|
99
|
+
// The backend at EXPLORE_API owns the system prompt, knowledge base,
|
|
100
|
+
// and model selection. This const is kept only as a fallback reference.
|
|
101
|
+
const SYSTEM_PROMPT = '';
|
|
102
|
+
// ── Brand Colors & Display ──────────────────────────────────────────
|
|
103
|
+
const BRAND = {
|
|
104
|
+
primary: '#818cf8',
|
|
105
|
+
secondary: '#6366f1',
|
|
106
|
+
accent: '#4f46e5',
|
|
107
|
+
dim: '#94a3b8',
|
|
108
|
+
success: '#22c55e',
|
|
109
|
+
warm: '#f59e0b',
|
|
110
|
+
};
|
|
111
|
+
function brandText(text) {
|
|
112
|
+
return chalk_1.default.hex(BRAND.primary)(text);
|
|
113
|
+
}
|
|
114
|
+
function displayWelcome() {
|
|
115
|
+
const logo = [
|
|
116
|
+
'',
|
|
117
|
+
chalk_1.default.hex(BRAND.primary)(' ███████╗ ██████╗ ██╗ ██╗██████╗ ██╗ ██╗'),
|
|
118
|
+
chalk_1.default.hex(BRAND.secondary)(' ██╔════╝██╔═══██╗██║ ██║██╔══██╗ ████████'),
|
|
119
|
+
chalk_1.default.hex(BRAND.accent)(' ███████╗██║ ██║██║ ██║██║ ██║ ██╔══██║'),
|
|
120
|
+
chalk_1.default.hex(BRAND.secondary)(' ╚════██║██║ ██║██║ ██║██║ ██║ ████████'),
|
|
121
|
+
chalk_1.default.hex(BRAND.primary)(' ███████║╚██████╔╝███████╗██║██████╔╝ ██║ ██║'),
|
|
122
|
+
chalk_1.default.hex(BRAND.accent)(' ╚══════╝ ╚═════╝ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝'),
|
|
123
|
+
'',
|
|
124
|
+
chalk_1.default.bold(' Platform Intelligence Console'),
|
|
125
|
+
chalk_1.default.hex(BRAND.dim)(' Ask anything about the platform. We\'ve got nothing to hide.'),
|
|
126
|
+
chalk_1.default.hex(BRAND.dim)(' (Except the source code. That costs extra.)'),
|
|
127
|
+
'',
|
|
128
|
+
chalk_1.default.hex(BRAND.dim)(' ╭─────────────────────────────────────────────────────╮'),
|
|
129
|
+
chalk_1.default.hex(BRAND.dim)(' │') + chalk_1.default.hex(BRAND.warm)(' 116 agents') + chalk_1.default.hex(BRAND.dim)(' · ') + chalk_1.default.hex(BRAND.warm)('608 MCP tools') + chalk_1.default.hex(BRAND.dim)(' · ') + chalk_1.default.hex(BRAND.warm)('511 tables') + chalk_1.default.hex(BRAND.dim)(' · ') + chalk_1.default.hex(BRAND.warm)('4M LOC') + chalk_1.default.hex(BRAND.dim)(' │'),
|
|
130
|
+
chalk_1.default.hex(BRAND.dim)(' ╰─────────────────────────────────────────────────────╯'),
|
|
131
|
+
'',
|
|
132
|
+
chalk_1.default.hex(BRAND.dim)(' Type your question and press Enter. Type "exit" to quit.'),
|
|
133
|
+
'',
|
|
134
|
+
];
|
|
135
|
+
console.log(logo.join('\n'));
|
|
136
|
+
}
|
|
137
|
+
const EXPLORE_API = 'https://api.solidnumber.com/api/v1/explore/chat';
|
|
138
|
+
async function askPlatform(messages, _systemPrompt, _platformDocs) {
|
|
139
|
+
const axios = (await Promise.resolve().then(() => __importStar(require('axios')))).default;
|
|
140
|
+
const ora = (await Promise.resolve().then(() => __importStar(require('ora')))).default;
|
|
141
|
+
const lastMessage = messages[messages.length - 1]?.content || '';
|
|
142
|
+
const history = messages.slice(0, -1);
|
|
143
|
+
const spinner = ora({
|
|
144
|
+
text: chalk_1.default.hex(BRAND.dim)(' thinking...'),
|
|
145
|
+
spinner: 'dots',
|
|
146
|
+
indent: 0,
|
|
147
|
+
}).start();
|
|
148
|
+
try {
|
|
149
|
+
const response = await axios.post(EXPLORE_API, {
|
|
150
|
+
message: lastMessage,
|
|
151
|
+
conversation_history: history,
|
|
152
|
+
}, {
|
|
153
|
+
headers: { 'content-type': 'application/json' },
|
|
154
|
+
timeout: 45000,
|
|
155
|
+
});
|
|
156
|
+
spinner.stop();
|
|
157
|
+
const text = response.data?.response || 'No response';
|
|
158
|
+
const model = response.data?.model_used || '';
|
|
159
|
+
const modelTag = model ? chalk_1.default.hex(BRAND.dim)(` [${model}]`) : '';
|
|
160
|
+
console.log(`\n ${chalk_1.default.hex(BRAND.success)('Solid#')} ${chalk_1.default.hex(BRAND.dim)('›')} ${text}${modelTag}\n`);
|
|
161
|
+
return text;
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
spinner.stop();
|
|
165
|
+
if (error.response?.status === 429) {
|
|
166
|
+
// Backend returns a friendly rate limit message — use it directly
|
|
167
|
+
const msg = error.response?.data?.detail || 'Taking a breather — try again in a couple minutes. Or hit up sales@solidnumber.com.';
|
|
168
|
+
console.log(`\n ${chalk_1.default.hex(BRAND.warm)('Solid#')} ${chalk_1.default.hex(BRAND.dim)('›')} ${msg}\n`);
|
|
169
|
+
return msg;
|
|
170
|
+
}
|
|
171
|
+
const errMsg = error.response?.data?.detail || error.message || 'Connection error';
|
|
172
|
+
console.log(`\n ${chalk_1.default.red('Error')} ${chalk_1.default.hex(BRAND.dim)('›')} ${errMsg}\n`);
|
|
173
|
+
return errMsg;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// ── Command Definition ──────────────────────────────────────────────
|
|
177
|
+
exports.exploreCommand = new commander_1.Command('explore')
|
|
178
|
+
.description('Platform Intelligence — ask anything about Solid#')
|
|
179
|
+
.argument('[question...]', 'Ask a single question (or omit for interactive mode)')
|
|
180
|
+
.option('--deep', 'Always use the deeper AI model')
|
|
181
|
+
.action(async (questionParts, options) => {
|
|
182
|
+
// Load platform docs
|
|
183
|
+
const bundled = loadBundledDocs();
|
|
184
|
+
const platformDocs = await fetchDocsIfNeeded(bundled);
|
|
185
|
+
const question = questionParts?.join(' ')?.trim();
|
|
186
|
+
if (question) {
|
|
187
|
+
// Single question mode
|
|
188
|
+
const messages = [{ role: 'user', content: question }];
|
|
189
|
+
await askPlatform(messages, SYSTEM_PROMPT, platformDocs);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
// Interactive mode
|
|
193
|
+
displayWelcome();
|
|
194
|
+
const conversationHistory = [];
|
|
195
|
+
const rl = readline.createInterface({
|
|
196
|
+
input: process.stdin,
|
|
197
|
+
output: process.stdout,
|
|
198
|
+
prompt: ` ${brandText('you')} ${chalk_1.default.hex(BRAND.dim)('›')} `,
|
|
199
|
+
});
|
|
200
|
+
rl.prompt();
|
|
201
|
+
rl.on('line', async (line) => {
|
|
202
|
+
const input = line.trim();
|
|
203
|
+
if (!input) {
|
|
204
|
+
rl.prompt();
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (['exit', 'quit', 'bye', 'q'].includes(input.toLowerCase())) {
|
|
208
|
+
console.log(`\n ${chalk_1.default.hex(BRAND.dim)('This was fun. sales@solidnumber.com if anything sparked. Or call +1 (801) 448-0807 and let Sarah show off.')}\n`);
|
|
209
|
+
rl.close();
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// Add to conversation
|
|
213
|
+
conversationHistory.push({ role: 'user', content: input });
|
|
214
|
+
// Keep conversation to last 10 turns to save tokens
|
|
215
|
+
const recentMessages = conversationHistory.slice(-20);
|
|
216
|
+
const response = await askPlatform(recentMessages, SYSTEM_PROMPT, platformDocs);
|
|
217
|
+
conversationHistory.push({ role: 'assistant', content: response });
|
|
218
|
+
rl.prompt();
|
|
219
|
+
});
|
|
220
|
+
rl.on('close', () => {
|
|
221
|
+
process.exit(0);
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
//# sourceMappingURL=explore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explore.js","sourceRoot":"","sources":["../../src/commands/explore.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,kDAA0B;AAC1B,mDAAqC;AACrC,2CAA6B;AAC7B,uCAAyB;AAEzB,uEAAuE;AAEvE,SAAS,eAAe;IACtB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IAClE,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACrC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB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I,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEnE,EAAE,CAAC,MAAM,EAAE,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ================================================================================
|
|
3
|
+
* solid payment — Level 3 Payment Processing & Interchange Optimization
|
|
4
|
+
* ================================================================================
|
|
5
|
+
*
|
|
6
|
+
* Manage payment processing, Level 3 data, interchange qualification,
|
|
7
|
+
* and product-to-MCC mapping for merchants.
|
|
8
|
+
*
|
|
9
|
+
* Key features:
|
|
10
|
+
* - L3 qualification status per product/order
|
|
11
|
+
* - MCC code verification
|
|
12
|
+
* - Product code validation (SKU, UPC, ISBN)
|
|
13
|
+
* - Interchange savings reporting
|
|
14
|
+
* - Processor-agnostic (Stripe, Square, etc.)
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* solid payment status # Payment processing status
|
|
18
|
+
* solid payment l3 status # Level 3 qualification overview
|
|
19
|
+
* solid payment l3 check <sku> # Check if a product qualifies for L3
|
|
20
|
+
* solid payment l3 report # Interchange savings report
|
|
21
|
+
* solid payment mcc # Show company MCC code mapping
|
|
22
|
+
* solid payment products # List products with L3-ready identifiers
|
|
23
|
+
* ================================================================================
|
|
24
|
+
*/
|
|
25
|
+
import { Command } from 'commander';
|
|
26
|
+
export declare const paymentCommand: Command;
|
|
27
|
+
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/commands/payment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,eAAO,MAAM,cAAc,SAC4C,CAAC"}
|