tenjin-cli 0.1.0-alpha.3 → 0.1.0-alpha.5
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/README.md +322 -197
- package/dist/{_esm-FEASBWRP.js → _esm-N4KAVXQR.js} +9 -9
- package/dist/buy-YMXXVNFH.js +42 -0
- package/dist/candidate-H7FR4AU5.js +22 -0
- package/dist/{ccip-XR5NE5QK.js → ccip-RPPPKTJR.js} +5 -5
- package/dist/{ccip-NQXCEK2U.js → ccip-ZGGWQN4X.js} +4 -4
- package/dist/{chunk-MUBUQVC3.js → chunk-2JQ5JSG6.js} +3 -2
- package/dist/{chunk-MUBUQVC3.js.map → chunk-2JQ5JSG6.js.map} +1 -1
- package/dist/{chunk-662MSGZB.js → chunk-3IRDP7TN.js} +100 -66
- package/dist/chunk-3IRDP7TN.js.map +1 -0
- package/dist/{chunk-YALGASEU.js → chunk-47PP7TAG.js} +1610 -1610
- package/dist/chunk-47PP7TAG.js.map +1 -0
- package/dist/{buy-EE6SEXP6.js → chunk-4WVKXKDK.js} +27 -59
- package/dist/chunk-4WVKXKDK.js.map +1 -0
- package/dist/chunk-5SCU253N.js +412 -0
- package/dist/chunk-5SCU253N.js.map +1 -0
- package/dist/{chunk-UGX7YPX2.js → chunk-7FK2UN2T.js} +65 -65
- package/dist/{chunk-UGX7YPX2.js.map → chunk-7FK2UN2T.js.map} +1 -1
- package/dist/chunk-ADJYSM45.js +135 -0
- package/dist/chunk-ADJYSM45.js.map +1 -0
- package/dist/{chunk-DXTQ3CSI.js → chunk-BIKAUVC2.js} +43 -11
- package/dist/chunk-BIKAUVC2.js.map +1 -0
- package/dist/{chunk-Z6MFJV5Z.js → chunk-C444K6MI.js} +266 -55
- package/dist/chunk-C444K6MI.js.map +1 -0
- package/dist/{chunk-JPHG2JW3.js → chunk-CVX6JNGD.js} +26 -26
- package/dist/chunk-CVX6JNGD.js.map +1 -0
- package/dist/{chunk-S3IGX57D.js → chunk-FU6MCSLG.js} +9 -9
- package/dist/{lookup-ZPN2Q67N.js → chunk-HTDALK7M.js} +46 -32
- package/dist/chunk-HTDALK7M.js.map +1 -0
- package/dist/chunk-IOPWPMT2.js +239 -0
- package/dist/chunk-IOPWPMT2.js.map +1 -0
- package/dist/{chunk-5CLSD5YN.js → chunk-KYQVEKP5.js} +7 -7
- package/dist/{chunk-RRN3YTK7.js → chunk-KZAAWQNP.js} +3 -3
- package/dist/{chunk-7KUW4MJD.js → chunk-L4IHCN6B.js} +11 -7
- package/dist/chunk-L4IHCN6B.js.map +1 -0
- package/dist/{chunk-XHC6FCGZ.js → chunk-LAM66WFJ.js} +25 -11
- package/dist/chunk-LAM66WFJ.js.map +1 -0
- package/dist/{chunk-NCE5NSN6.js → chunk-M2O56UK7.js} +158 -158
- package/dist/chunk-M2O56UK7.js.map +1 -0
- package/dist/{chunk-GO75V3NZ.js → chunk-MDDGEGSW.js} +8 -6
- package/dist/chunk-MDDGEGSW.js.map +1 -0
- package/dist/{chunk-XJIW7USF.js → chunk-MJZZTKCC.js} +112 -6
- package/dist/chunk-MJZZTKCC.js.map +1 -0
- package/dist/{chunk-Z52RA3NC.js → chunk-NFSOVL3C.js} +51 -21
- package/dist/chunk-NFSOVL3C.js.map +1 -0
- package/dist/{chunk-FJPLRISB.js → chunk-NJF2WENW.js} +5 -4
- package/dist/chunk-NJF2WENW.js.map +1 -0
- package/dist/{chunk-OYMYCW7J.js → chunk-PAUXMRSF.js} +45 -4
- package/dist/{chunk-OYMYCW7J.js.map → chunk-PAUXMRSF.js.map} +1 -1
- package/dist/{chunk-ZABPQJ3M.js → chunk-POJRB2AE.js} +2 -2
- package/dist/{publish-BKBQQAW4.js → chunk-PYNSGYBE.js} +254 -57
- package/dist/chunk-PYNSGYBE.js.map +1 -0
- package/dist/{chunk-YN5SHIXQ.js → chunk-QONTBYQW.js} +12 -9
- package/dist/chunk-QONTBYQW.js.map +1 -0
- package/dist/chunk-QW2Q2KAH.js +27 -0
- package/dist/chunk-QW2Q2KAH.js.map +1 -0
- package/dist/chunk-RTJLLPFA.js +599 -0
- package/dist/chunk-RTJLLPFA.js.map +1 -0
- package/dist/{chunk-CYOF7ROH.js → chunk-S5RYMCV6.js} +3 -3
- package/dist/chunk-TXPPMK4L.js +59 -0
- package/dist/chunk-TXPPMK4L.js.map +1 -0
- package/dist/{chunk-ZMHYXMO6.js → chunk-U5S527PP.js} +3 -3
- package/dist/{chunk-RY4XKNV3.js → chunk-UHTVXQ2O.js} +3 -3
- package/dist/{chunk-QVX5MWJZ.js → chunk-W6R3HAAG.js} +2 -2
- package/dist/{chunk-3OV7E5G5.js → chunk-WWX32ML4.js} +1 -1
- package/dist/{chunk-3OV7E5G5.js.map → chunk-WWX32ML4.js.map} +1 -1
- package/dist/{chunk-HIVZG55D.js → chunk-XJN5WUKL.js} +2 -2
- package/dist/{chunk-HSDCI7OV.js → chunk-YLYINX2H.js} +3 -3
- package/dist/{chunk-4ONXEEQL.js → chunk-ZDY2KY5X.js} +2 -2
- package/dist/{chunk-4ONXEEQL.js.map → chunk-ZDY2KY5X.js.map} +1 -1
- package/dist/{chunk-TLCMMYLY.js → chunk-ZIYVN4CD.js} +6 -6
- package/dist/chunk-ZIYVN4CD.js.map +1 -0
- package/dist/{candidate-ERMSYYQZ.js → chunk-ZW3B5LWX.js} +15 -19
- package/dist/{candidate-ERMSYYQZ.js.map → chunk-ZW3B5LWX.js.map} +1 -1
- package/dist/{cli-SBXI5AMS.js → cli-IW76QTN3.js} +64 -40
- package/dist/{cli-SBXI5AMS.js.map → cli-IW76QTN3.js.map} +1 -1
- package/dist/{config-VELDKLHY.js → config-VCOS7P5K.js} +8 -6
- package/dist/{doctor-T3KWNNP2.js → doctor-WS65JG3V.js} +9 -8
- package/dist/{ethersCompat-Df4a6QIZ-3YZIAXDK.js → ethersCompat-Df4a6QIZ-WHYKB6HA.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/inspect-SFJWUQHO.js +33 -0
- package/dist/install-RVPQPCKH.js +589 -0
- package/dist/install-RVPQPCKH.js.map +1 -0
- package/dist/outcome-GNYCSZ7J.js +20 -0
- package/dist/publish-DSFWQRUN.js +36 -0
- package/dist/publish-DSFWQRUN.js.map +1 -0
- package/dist/run-OMPKA43G.js +16807 -0
- package/dist/run-OMPKA43G.js.map +1 -0
- package/dist/search-KOI6Y7P6.js +24 -0
- package/dist/search-KOI6Y7P6.js.map +1 -0
- package/dist/{secp256k1-N3ZHU7LB.js → secp256k1-XRPVBC6V.js} +3 -3
- package/dist/secp256k1-XRPVBC6V.js.map +1 -0
- package/dist/send-3G4C64HJ.js +222 -0
- package/dist/send-3G4C64HJ.js.map +1 -0
- package/dist/usdc-4VCDHFWX.js +38 -0
- package/dist/usdc-4VCDHFWX.js.map +1 -0
- package/dist/{viemAdapter-By13KInL-ZZE6UV4Y.js → viemAdapter-By13KInL-TUQJBMHM.js} +5 -5
- package/dist/viemAdapter-By13KInL-TUQJBMHM.js.map +1 -0
- package/dist/wallet-B7KJS2R5.js +40 -0
- package/dist/wallet-B7KJS2R5.js.map +1 -0
- package/dist/wallet-PP22LAX7.js +31 -0
- package/dist/wallet-PP22LAX7.js.map +1 -0
- package/package.json +4 -3
- package/skills/tenjin/SKILL.md +83 -15
- package/skills/tenjin-publish/SKILL.md +118 -18
- package/skills/tenjin-search/SKILL.md +149 -31
- package/dist/buy-EE6SEXP6.js.map +0 -1
- package/dist/chunk-662MSGZB.js.map +0 -1
- package/dist/chunk-7KUW4MJD.js.map +0 -1
- package/dist/chunk-AWPAWHNX.js +0 -333
- package/dist/chunk-AWPAWHNX.js.map +0 -1
- package/dist/chunk-DXTQ3CSI.js.map +0 -1
- package/dist/chunk-ESPNTPQ2.js +0 -207
- package/dist/chunk-ESPNTPQ2.js.map +0 -1
- package/dist/chunk-FJPLRISB.js.map +0 -1
- package/dist/chunk-GO75V3NZ.js.map +0 -1
- package/dist/chunk-JPHG2JW3.js.map +0 -1
- package/dist/chunk-NCE5NSN6.js.map +0 -1
- package/dist/chunk-TLCMMYLY.js.map +0 -1
- package/dist/chunk-XHC6FCGZ.js.map +0 -1
- package/dist/chunk-XJIW7USF.js.map +0 -1
- package/dist/chunk-YALGASEU.js.map +0 -1
- package/dist/chunk-YN5SHIXQ.js.map +0 -1
- package/dist/chunk-Z52RA3NC.js.map +0 -1
- package/dist/chunk-Z6MFJV5Z.js.map +0 -1
- package/dist/inspect-LMKOXE4Y.js +0 -96
- package/dist/inspect-LMKOXE4Y.js.map +0 -1
- package/dist/install-LEX3ENQ6.js +0 -387
- package/dist/install-LEX3ENQ6.js.map +0 -1
- package/dist/lookup-ZPN2Q67N.js.map +0 -1
- package/dist/outcome-N7TAK6WR.js +0 -66
- package/dist/outcome-N7TAK6WR.js.map +0 -1
- package/dist/publish-BKBQQAW4.js.map +0 -1
- package/dist/usdc-JIAJW4SV.js +0 -22
- package/dist/wallet-CWEMYVIH.js +0 -179
- package/dist/wallet-CWEMYVIH.js.map +0 -1
- package/dist/wallet-PA54CRBL.js +0 -30
- /package/dist/{_esm-FEASBWRP.js.map → _esm-N4KAVXQR.js.map} +0 -0
- /package/dist/{ccip-NQXCEK2U.js.map → buy-YMXXVNFH.js.map} +0 -0
- /package/dist/{ccip-XR5NE5QK.js.map → candidate-H7FR4AU5.js.map} +0 -0
- /package/dist/{config-VELDKLHY.js.map → ccip-RPPPKTJR.js.map} +0 -0
- /package/dist/{doctor-T3KWNNP2.js.map → ccip-ZGGWQN4X.js.map} +0 -0
- /package/dist/{chunk-S3IGX57D.js.map → chunk-FU6MCSLG.js.map} +0 -0
- /package/dist/{chunk-5CLSD5YN.js.map → chunk-KYQVEKP5.js.map} +0 -0
- /package/dist/{chunk-RRN3YTK7.js.map → chunk-KZAAWQNP.js.map} +0 -0
- /package/dist/{chunk-ZABPQJ3M.js.map → chunk-POJRB2AE.js.map} +0 -0
- /package/dist/{chunk-CYOF7ROH.js.map → chunk-S5RYMCV6.js.map} +0 -0
- /package/dist/{chunk-ZMHYXMO6.js.map → chunk-U5S527PP.js.map} +0 -0
- /package/dist/{chunk-RY4XKNV3.js.map → chunk-UHTVXQ2O.js.map} +0 -0
- /package/dist/{chunk-QVX5MWJZ.js.map → chunk-W6R3HAAG.js.map} +0 -0
- /package/dist/{chunk-HIVZG55D.js.map → chunk-XJN5WUKL.js.map} +0 -0
- /package/dist/{chunk-HSDCI7OV.js.map → chunk-YLYINX2H.js.map} +0 -0
- /package/dist/{ethersCompat-Df4a6QIZ-3YZIAXDK.js.map → config-VCOS7P5K.js.map} +0 -0
- /package/dist/{secp256k1-N3ZHU7LB.js.map → doctor-WS65JG3V.js.map} +0 -0
- /package/dist/{usdc-JIAJW4SV.js.map → ethersCompat-Df4a6QIZ-WHYKB6HA.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-ZZE6UV4Y.js.map → inspect-SFJWUQHO.js.map} +0 -0
- /package/dist/{wallet-PA54CRBL.js.map → outcome-GNYCSZ7J.js.map} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
package_default
|
|
4
|
+
} from "./chunk-NJF2WENW.js";
|
|
2
5
|
import {
|
|
3
6
|
defaultIo,
|
|
4
7
|
emitFailure,
|
|
5
8
|
emitSuccess
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
package_default
|
|
9
|
-
} from "./chunk-FJPLRISB.js";
|
|
9
|
+
} from "./chunk-NFSOVL3C.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError,
|
|
12
12
|
dataDir,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PAUXMRSF.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
@@ -3526,15 +3526,18 @@ function buildProgram(io, setExit) {
|
|
|
3526
3526
|
).option("--dry-run", "print what would change without writing anything").option(
|
|
3527
3527
|
"--publish-mode <mode>",
|
|
3528
3528
|
"set the publish consent mode non-interactively: review | auto | full-auto"
|
|
3529
|
-
).action(async function() {
|
|
3529
|
+
).option("--no-wallet", "skip the wallet-setup step of the interactive walkthrough").option("--claude-md", "append the Tenjin search nudge to ~/.claude/CLAUDE.md").option("--no-claude-md", "skip the CLAUDE.md nudge (and its interactive question)").action(async function() {
|
|
3530
3530
|
await runCommand("install", this, async (ctx) => {
|
|
3531
3531
|
const o = this.opts();
|
|
3532
|
-
const
|
|
3532
|
+
const claudeMdGiven = this.getOptionValueSource("claudeMd") !== "default";
|
|
3533
|
+
const { runInstall } = await import("./install-RVPQPCKH.js");
|
|
3533
3534
|
return runInstall(
|
|
3534
3535
|
{
|
|
3535
3536
|
...Array.isArray(o.harness) && o.harness.length > 0 ? { harness: o.harness } : {},
|
|
3536
3537
|
...o.dryRun === true ? { dryRun: true } : {},
|
|
3537
|
-
...typeof o.publishMode === "string" ? { publishMode: o.publishMode } : {}
|
|
3538
|
+
...typeof o.publishMode === "string" ? { publishMode: o.publishMode } : {},
|
|
3539
|
+
...o.wallet === false ? { noWallet: true } : {},
|
|
3540
|
+
...claudeMdGiven && typeof o.claudeMd === "boolean" ? { claudeMd: o.claudeMd } : {}
|
|
3538
3541
|
},
|
|
3539
3542
|
ctx
|
|
3540
3543
|
);
|
|
@@ -3542,7 +3545,7 @@ function buildProgram(io, setExit) {
|
|
|
3542
3545
|
});
|
|
3543
3546
|
addGlobalFlags(program2.command("doctor")).description("Check the local environment and Tenjin API reachability").action(async function() {
|
|
3544
3547
|
await runCommand("doctor", this, async (ctx) => {
|
|
3545
|
-
const { runDoctor } = await import("./doctor-
|
|
3548
|
+
const { runDoctor } = await import("./doctor-WS65JG3V.js");
|
|
3546
3549
|
return runDoctor(ctx);
|
|
3547
3550
|
});
|
|
3548
3551
|
});
|
|
@@ -3551,50 +3554,63 @@ function buildProgram(io, setExit) {
|
|
|
3551
3554
|
);
|
|
3552
3555
|
config.action(async function() {
|
|
3553
3556
|
await runCommand("config", this, async (ctx) => {
|
|
3554
|
-
const { runConfigList } = await import("./config-
|
|
3557
|
+
const { runConfigList } = await import("./config-VCOS7P5K.js");
|
|
3555
3558
|
return runConfigList(ctx);
|
|
3556
3559
|
});
|
|
3557
3560
|
});
|
|
3558
3561
|
addGlobalFlags(config.command("get <key>")).description("Print one effective config value").action(async function(key) {
|
|
3559
3562
|
await runCommand("config.get", this, async (ctx) => {
|
|
3560
|
-
const { runConfigGet } = await import("./config-
|
|
3563
|
+
const { runConfigGet } = await import("./config-VCOS7P5K.js");
|
|
3561
3564
|
return runConfigGet({ key }, ctx);
|
|
3562
3565
|
});
|
|
3563
3566
|
});
|
|
3564
3567
|
addGlobalFlags(config.command("set <key> <value>")).description("Set a config value (decimal USD accepted for spend keys)").action(async function(key, value) {
|
|
3565
3568
|
await runCommand("config.set", this, async (ctx) => {
|
|
3566
|
-
const { runConfigSet } = await import("./config-
|
|
3569
|
+
const { runConfigSet } = await import("./config-VCOS7P5K.js");
|
|
3567
3570
|
return runConfigSet({ key, value }, ctx);
|
|
3568
3571
|
});
|
|
3569
3572
|
});
|
|
3570
3573
|
const wallet = addGlobalFlags(
|
|
3571
3574
|
program2.command("wallet").description("Manage the local x402 payment wallet")
|
|
3572
3575
|
);
|
|
3573
|
-
addGlobalFlags(wallet.command("create")).description("Create a new local wallet").
|
|
3576
|
+
addGlobalFlags(wallet.command("create")).description("Create a new local wallet (refuses if one exists; see --replace)").option(
|
|
3577
|
+
"--replace",
|
|
3578
|
+
"archive the existing wallet first \u2014 keystore parked beside the new one, passphrase verified and preserved under its address \u2014 then create a new active wallet"
|
|
3579
|
+
).action(async function() {
|
|
3574
3580
|
await runCommand("wallet.create", this, async (ctx) => {
|
|
3575
|
-
const
|
|
3576
|
-
|
|
3581
|
+
const o = this.opts();
|
|
3582
|
+
const { runWalletCreate } = await import("./wallet-PP22LAX7.js");
|
|
3583
|
+
return runWalletCreate(ctx, o.replace === true ? { replace: true } : {});
|
|
3577
3584
|
});
|
|
3578
3585
|
});
|
|
3579
3586
|
addGlobalFlags(wallet.command("show")).description("Show the wallet address and key source (never the key)").action(async function() {
|
|
3580
3587
|
await runCommand("wallet.show", this, async (ctx) => {
|
|
3581
|
-
const { runWalletShow } = await import("./wallet-
|
|
3588
|
+
const { runWalletShow } = await import("./wallet-PP22LAX7.js");
|
|
3582
3589
|
return runWalletShow(ctx);
|
|
3583
3590
|
});
|
|
3584
3591
|
});
|
|
3585
3592
|
addGlobalFlags(wallet.command("balance")).description("Show the wallet USDC balance on Base").action(async function() {
|
|
3586
3593
|
await runCommand("wallet.balance", this, async (ctx) => {
|
|
3587
|
-
const { runWalletBalance } = await import("./wallet-
|
|
3594
|
+
const { runWalletBalance } = await import("./wallet-PP22LAX7.js");
|
|
3588
3595
|
return runWalletBalance(ctx);
|
|
3589
3596
|
});
|
|
3590
3597
|
});
|
|
3591
|
-
addGlobalFlags(program2.command("
|
|
3598
|
+
addGlobalFlags(program2.command("send <amount> <token> <to>")).description(
|
|
3599
|
+
"Move funds OUT of the agent wallet (escape hatch): preview the resolved recipient and amount, confirm explicitly, then transfer on Base and print the tx hash. USDC only"
|
|
3600
|
+
).option("--yes", "skip the interactive confirm (required to send when not at a TTY)").action(async function(amount, token, to) {
|
|
3601
|
+
await runCommand("send", this, async (ctx) => {
|
|
3602
|
+
const o = this.opts();
|
|
3603
|
+
const { runSend } = await import("./send-3G4C64HJ.js");
|
|
3604
|
+
return runSend({ amount, token, to, ...o.yes === true ? { yes: true } : {} }, ctx);
|
|
3605
|
+
});
|
|
3606
|
+
});
|
|
3607
|
+
addGlobalFlags(program2.command("search <question>")).description(
|
|
3592
3608
|
"Ask for payable candidates or an honest MISS. Use when a task needs public knowledge someone may already have published; send only a generalized public question, never secrets or private context"
|
|
3593
3609
|
).option("--max-price <usd>", "only candidates at or below this decimal-USD price").option("--fresh-within <window>", "freshness window, e.g. P30D, P2W, P1Y").option("--limit <n>", "maximum candidates (1-10, default 5)").option("--applies-to <pair>", "applicability filter key=value (repeatable)", collect, []).action(async function(question) {
|
|
3594
|
-
await runCommand("
|
|
3610
|
+
await runCommand("search", this, async (ctx) => {
|
|
3595
3611
|
const o = this.opts();
|
|
3596
|
-
const {
|
|
3597
|
-
return
|
|
3612
|
+
const { runSearch } = await import("./search-KOI6Y7P6.js");
|
|
3613
|
+
return runSearch(
|
|
3598
3614
|
{
|
|
3599
3615
|
question,
|
|
3600
3616
|
...typeof o.maxPrice === "string" ? { maxPrice: o.maxPrice } : {},
|
|
@@ -3607,10 +3623,10 @@ function buildProgram(io, setExit) {
|
|
|
3607
3623
|
});
|
|
3608
3624
|
});
|
|
3609
3625
|
addGlobalFlags(program2.command("inspect <resource>")).description(
|
|
3610
|
-
"Show a candidate's pre-purchase card / preview. Use after
|
|
3626
|
+
"Show a candidate's pre-purchase card / preview. Use after search, before buy, to check price, scope, and freshness; it never pays"
|
|
3611
3627
|
).action(async function(resource) {
|
|
3612
3628
|
await runCommand("inspect", this, async (ctx) => {
|
|
3613
|
-
const { runInspect } = await import("./inspect-
|
|
3629
|
+
const { runInspect } = await import("./inspect-SFJWUQHO.js");
|
|
3614
3630
|
return runInspect({ ref: resource }, ctx);
|
|
3615
3631
|
});
|
|
3616
3632
|
});
|
|
@@ -3622,7 +3638,7 @@ function buildProgram(io, setExit) {
|
|
|
3622
3638
|
).action(async function(resource) {
|
|
3623
3639
|
await runCommand("buy", this, async (ctx) => {
|
|
3624
3640
|
const o = this.opts();
|
|
3625
|
-
const { runBuy } = await import("./buy-
|
|
3641
|
+
const { runBuy } = await import("./buy-YMXXVNFH.js");
|
|
3626
3642
|
return runBuy(
|
|
3627
3643
|
{
|
|
3628
3644
|
ref: resource,
|
|
@@ -3643,7 +3659,7 @@ function buildProgram(io, setExit) {
|
|
|
3643
3659
|
).option("--draft", "save as a private draft instead of publishing").option("--yes", "clear soft findings and the review confirm (never a hard block)").option("--mode <mode>", "consent mode for this run: review | auto | full-auto").option("--price <usd>", "post price in decimal USD (defaults to publish.defaultPrice)").option("--question <text>", "a question this piece answers (repeatable)", collect, []).option("--task <text>", "a task this piece supports (repeatable)", collect, []).option("--scope <text>", "what the piece covers (card scope)").option("--exclusions <text>", "what the piece does not cover (card exclusions)").option("--applies-to <pair>", "applicability key=value (repeatable)", collect, []).option("--as-of <iso>", "as-of timestamp, ISO-8601 with offset").option("--valid-until <iso>", "valid-until timestamp, ISO-8601 with offset").option("--artifact-type <type>", "document | skill | dataset").option("--temporal-mode <mode>", "snapshot | maintained | evergreen").option("--provenance <text>", "provenance summary (card)").option("--methodology <text>", "methodology summary (card)").action(async function(file) {
|
|
3644
3660
|
await runCommand("publish", this, async (ctx) => {
|
|
3645
3661
|
const o = this.opts();
|
|
3646
|
-
const { runPublish } = await import("./publish-
|
|
3662
|
+
const { runPublish } = await import("./publish-DSFWQRUN.js");
|
|
3647
3663
|
return runPublish(
|
|
3648
3664
|
{
|
|
3649
3665
|
...typeof file === "string" ? { file } : {},
|
|
@@ -3669,18 +3685,18 @@ function buildProgram(io, setExit) {
|
|
|
3669
3685
|
});
|
|
3670
3686
|
});
|
|
3671
3687
|
addGlobalFlags(program2.command("outcome")).description(
|
|
3672
|
-
"Report how a
|
|
3673
|
-
).option("--
|
|
3688
|
+
"Report how a search ended, honestly (used, partially_used, rejected, regenerated, purchase_declined). Use after acting on a search; this closes the loop the marketplace learns from"
|
|
3689
|
+
).option("--search-id <id>", "the search to report against").option("--last", "target the most recent local search").requiredOption(
|
|
3674
3690
|
"--status <status>",
|
|
3675
3691
|
"used | partially_used | rejected | regenerated | purchase_declined"
|
|
3676
3692
|
).option("--resource <id>", "the resourceId the outcome concerns").option("--content-hash <hash>", "sha256:<64hex> of the exact body read").action(async function() {
|
|
3677
3693
|
await runCommand("outcome", this, async (ctx) => {
|
|
3678
3694
|
const o = this.opts();
|
|
3679
|
-
const { runOutcome } = await import("./outcome-
|
|
3695
|
+
const { runOutcome } = await import("./outcome-GNYCSZ7J.js");
|
|
3680
3696
|
return runOutcome(
|
|
3681
3697
|
{
|
|
3682
3698
|
status: String(o.status),
|
|
3683
|
-
...typeof o.
|
|
3699
|
+
...typeof o.searchId === "string" ? { searchId: o.searchId } : {},
|
|
3684
3700
|
...o.last === true ? { last: true } : {},
|
|
3685
3701
|
...typeof o.resource === "string" ? { resource: o.resource } : {},
|
|
3686
3702
|
...typeof o.contentHash === "string" ? { contentHash: o.contentHash } : {}
|
|
@@ -3694,14 +3710,14 @@ function buildProgram(io, setExit) {
|
|
|
3694
3710
|
"Manage local publish candidates (parked drafts; nothing uploads until publish)"
|
|
3695
3711
|
)
|
|
3696
3712
|
);
|
|
3697
|
-
addGlobalFlags(candidate.command("add <file>")).description("Park a Markdown draft as a publish candidate, tied to a
|
|
3713
|
+
addGlobalFlags(candidate.command("add <file>")).description("Park a Markdown draft as a publish candidate, tied to a search").requiredOption("--search-id <id>", "the search whose unmet demand this draft answers").option("--question <q>", "the question this draft answers").action(async function(file) {
|
|
3698
3714
|
await runCommand("candidate.add", this, async (ctx) => {
|
|
3699
3715
|
const o = this.opts();
|
|
3700
|
-
const { runCandidateAdd } = await import("./candidate-
|
|
3716
|
+
const { runCandidateAdd } = await import("./candidate-H7FR4AU5.js");
|
|
3701
3717
|
return runCandidateAdd(
|
|
3702
3718
|
{
|
|
3703
3719
|
file,
|
|
3704
|
-
|
|
3720
|
+
searchId: String(o.searchId),
|
|
3705
3721
|
...typeof o.question === "string" ? { question: o.question } : {}
|
|
3706
3722
|
},
|
|
3707
3723
|
ctx
|
|
@@ -3710,16 +3726,21 @@ function buildProgram(io, setExit) {
|
|
|
3710
3726
|
});
|
|
3711
3727
|
addGlobalFlags(candidate.command("list")).description("List pending candidates, newest first").action(async function() {
|
|
3712
3728
|
await runCommand("candidate.list", this, async (ctx) => {
|
|
3713
|
-
const { runCandidateList } = await import("./candidate-
|
|
3729
|
+
const { runCandidateList } = await import("./candidate-H7FR4AU5.js");
|
|
3714
3730
|
return runCandidateList(ctx);
|
|
3715
3731
|
});
|
|
3716
3732
|
});
|
|
3717
3733
|
addGlobalFlags(candidate.command("drop <id>")).description("Discard a pending candidate (never auto-deleted)").action(async function(id) {
|
|
3718
3734
|
await runCommand("candidate.drop", this, async (ctx) => {
|
|
3719
|
-
const { runCandidateDrop } = await import("./candidate-
|
|
3735
|
+
const { runCandidateDrop } = await import("./candidate-H7FR4AU5.js");
|
|
3720
3736
|
return runCandidateDrop({ id }, ctx);
|
|
3721
3737
|
});
|
|
3722
3738
|
});
|
|
3739
|
+
addGlobalFlags(program2.command("mcp")).description("Run a local stdio MCP server exposing the Tenjin command cores to an MCP client").action(async function() {
|
|
3740
|
+
const ctx = buildContext(this, io);
|
|
3741
|
+
const { runMcpServer } = await import("./run-OMPKA43G.js");
|
|
3742
|
+
await runMcpServer({ dataDir: ctx.dataDir, flags: ctx.flags });
|
|
3743
|
+
});
|
|
3723
3744
|
return program2;
|
|
3724
3745
|
}
|
|
3725
3746
|
function collect(value, previous) {
|
|
@@ -3739,15 +3760,18 @@ async function main(argv, io = defaultIo()) {
|
|
|
3739
3760
|
}
|
|
3740
3761
|
function handleParseError(err, io, program2) {
|
|
3741
3762
|
const json = program2.opts().json === true;
|
|
3763
|
+
const humanFirst = io.isTTY && !json;
|
|
3742
3764
|
if (err instanceof CommanderError) {
|
|
3743
3765
|
if (err.code === "commander.version" || err.code === "commander.helpDisplayed") {
|
|
3744
3766
|
return 0;
|
|
3745
3767
|
}
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3768
|
+
if (!humanFirst) {
|
|
3769
|
+
const message = err.code === "commander.help" ? "No command specified" : err.message.replace(/^error:\s*/i, "");
|
|
3770
|
+
const usageErr = new CliError("USAGE", message, {
|
|
3771
|
+
fix: "Run `tenjin --help` for available commands."
|
|
3772
|
+
});
|
|
3773
|
+
emitFailure(io, "tenjin", usageErr, { json: true });
|
|
3774
|
+
}
|
|
3751
3775
|
return 2;
|
|
3752
3776
|
}
|
|
3753
3777
|
return emitFailure(io, "tenjin", err, { json }).exitCode;
|
|
@@ -3756,4 +3780,4 @@ export {
|
|
|
3756
3780
|
buildProgram,
|
|
3757
3781
|
main
|
|
3758
3782
|
};
|
|
3759
|
-
//# sourceMappingURL=cli-
|
|
3783
|
+
//# sourceMappingURL=cli-IW76QTN3.js.map
|