@spfunctions/cli 1.5.2 → 1.5.3
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/signal.d.ts +1 -0
- package/dist/commands/signal.js +4 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/commands/signal.js
CHANGED
|
@@ -7,6 +7,10 @@ async function signalCommand(id, content, opts) {
|
|
|
7
7
|
const client = new client_js_1.SFClient(opts.apiKey, opts.apiUrl);
|
|
8
8
|
const type = opts.type || 'user_note';
|
|
9
9
|
const result = await client.injectSignal(id, type, content, 'cli');
|
|
10
|
+
if (opts.json) {
|
|
11
|
+
console.log(JSON.stringify({ signalId: result.signalId || null, type, source: 'cli', content }, null, 2));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
10
14
|
console.log(`${utils_js_1.c.green}✓${utils_js_1.c.reset} Signal injected`);
|
|
11
15
|
console.log(` ${utils_js_1.c.bold}Type:${utils_js_1.c.reset} ${type}`);
|
|
12
16
|
console.log(` ${utils_js_1.c.bold}Source:${utils_js_1.c.reset} cli`);
|
|
@@ -14,7 +18,6 @@ async function signalCommand(id, content, opts) {
|
|
|
14
18
|
if (result.signalId) {
|
|
15
19
|
console.log(` ${utils_js_1.c.bold}ID:${utils_js_1.c.reset} ${result.signalId}`);
|
|
16
20
|
}
|
|
17
|
-
// Calculate minutes until next 15-min cron cycle (runs at :00, :15, :30, :45)
|
|
18
21
|
const now = new Date();
|
|
19
22
|
const minute = now.getMinutes();
|
|
20
23
|
const nextCycleMin = Math.ceil((minute + 1) / 15) * 15;
|
package/dist/index.js
CHANGED
|
@@ -203,9 +203,10 @@ program
|
|
|
203
203
|
.command('signal <id> <content>')
|
|
204
204
|
.description('Inject a signal into the thesis queue')
|
|
205
205
|
.option('--type <type>', 'Signal type: news | user_note | external', 'user_note')
|
|
206
|
+
.option('--json', 'JSON output')
|
|
206
207
|
.action(async (id, content, opts, cmd) => {
|
|
207
208
|
const g = cmd.optsWithGlobals();
|
|
208
|
-
await run(() => (0, signal_js_1.signalCommand)(id, content, { type: opts.type, apiKey: g.apiKey, apiUrl: g.apiUrl }));
|
|
209
|
+
await run(() => (0, signal_js_1.signalCommand)(id, content, { type: opts.type, json: opts.json, apiKey: g.apiKey, apiUrl: g.apiUrl }));
|
|
209
210
|
});
|
|
210
211
|
// ── sf evaluate <id> ──────────────────────────────────────────────────────────
|
|
211
212
|
program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spfunctions/cli",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Prediction market intelligence CLI. Causal thesis model, 24/7 Kalshi/Polymarket scan, live orderbook, edge detection. Interactive agent mode with tool calling.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sf": "./dist/index.js"
|