tenjin-cli 0.1.0-alpha.3 → 0.1.0-alpha.4
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 +156 -188
- package/dist/{_esm-FEASBWRP.js → _esm-N4KAVXQR.js} +9 -9
- package/dist/buy-OOOLUDND.js +41 -0
- package/dist/candidate-TWCWTFGA.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-XJIW7USF.js → chunk-333FOTUJ.js} +5 -5
- package/dist/{chunk-YALGASEU.js → chunk-47PP7TAG.js} +1610 -1610
- package/dist/chunk-47PP7TAG.js.map +1 -0
- package/dist/{buy-EE6SEXP6.js → chunk-4GR7DGD6.js} +23 -41
- package/dist/{buy-EE6SEXP6.js.map → chunk-4GR7DGD6.js.map} +1 -1
- package/dist/{chunk-DXTQ3CSI.js → chunk-5JH7ZB6Z.js} +7 -7
- package/dist/{chunk-DXTQ3CSI.js.map → chunk-5JH7ZB6Z.js.map} +1 -1
- package/dist/{chunk-OYMYCW7J.js → chunk-6WWVYYSB.js} +32 -2
- package/dist/{chunk-OYMYCW7J.js.map → chunk-6WWVYYSB.js.map} +1 -1
- 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-ESPNTPQ2.js → chunk-BXUS5UCT.js} +9 -4
- package/dist/{chunk-ESPNTPQ2.js.map → chunk-BXUS5UCT.js.map} +1 -1
- package/dist/{chunk-4ONXEEQL.js → chunk-C4TIWOAM.js} +2 -2
- package/dist/{chunk-4ONXEEQL.js.map → chunk-C4TIWOAM.js.map} +1 -1
- package/dist/{chunk-AWPAWHNX.js → chunk-CJU555P5.js} +24 -24
- package/dist/{chunk-AWPAWHNX.js.map → chunk-CJU555P5.js.map} +1 -1
- package/dist/{chunk-YN5SHIXQ.js → chunk-DPET3TW5.js} +2 -2
- package/dist/{chunk-TLCMMYLY.js → chunk-DPUMEMGM.js} +5 -5
- package/dist/chunk-DPUMEMGM.js.map +1 -0
- package/dist/{chunk-XHC6FCGZ.js → chunk-EUQN3L5X.js} +9 -9
- package/dist/{chunk-XHC6FCGZ.js.map → chunk-EUQN3L5X.js.map} +1 -1
- package/dist/{chunk-GO75V3NZ.js → chunk-FHB3VKZW.js} +6 -6
- package/dist/{chunk-GO75V3NZ.js.map → chunk-FHB3VKZW.js.map} +1 -1
- package/dist/{chunk-S3IGX57D.js → chunk-FU6MCSLG.js} +9 -9
- package/dist/{lookup-ZPN2Q67N.js → chunk-H5ETJRQD.js} +40 -31
- package/dist/chunk-H5ETJRQD.js.map +1 -0
- package/dist/chunk-KXIX7YDV.js +59 -0
- package/dist/chunk-KXIX7YDV.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-NCE5NSN6.js → chunk-M2O56UK7.js} +158 -158
- package/dist/chunk-M2O56UK7.js.map +1 -0
- package/dist/{chunk-7KUW4MJD.js → chunk-MM4TGTST.js} +6 -6
- package/dist/{chunk-7KUW4MJD.js.map → chunk-MM4TGTST.js.map} +1 -1
- package/dist/{chunk-662MSGZB.js → chunk-NXCJN2FJ.js} +55 -28
- package/dist/chunk-NXCJN2FJ.js.map +1 -0
- package/dist/{candidate-ERMSYYQZ.js → chunk-OJD54DIU.js} +15 -19
- package/dist/{candidate-ERMSYYQZ.js.map → chunk-OJD54DIU.js.map} +1 -1
- package/dist/{chunk-ZABPQJ3M.js → chunk-POJRB2AE.js} +2 -2
- package/dist/{chunk-FJPLRISB.js → chunk-QH6677FJ.js} +5 -4
- package/dist/chunk-QH6677FJ.js.map +1 -0
- package/dist/{wallet-CWEMYVIH.js → chunk-R7BMDJZM.js} +15 -27
- package/dist/{wallet-CWEMYVIH.js.map → chunk-R7BMDJZM.js.map} +1 -1
- package/dist/{chunk-Z6MFJV5Z.js → chunk-S3KZ3PPK.js} +15 -11
- package/dist/{chunk-Z6MFJV5Z.js.map → chunk-S3KZ3PPK.js.map} +1 -1
- package/dist/{chunk-CYOF7ROH.js → chunk-S5RYMCV6.js} +3 -3
- package/dist/{chunk-ZMHYXMO6.js → chunk-U5S527PP.js} +3 -3
- package/dist/{chunk-RY4XKNV3.js → chunk-UHTVXQ2O.js} +3 -3
- package/dist/{publish-BKBQQAW4.js → chunk-ULLWHHIT.js} +19 -34
- package/dist/{publish-BKBQQAW4.js.map → chunk-ULLWHHIT.js.map} +1 -1
- package/dist/{chunk-Z52RA3NC.js → chunk-VV4P5RVK.js} +47 -20
- package/dist/chunk-VV4P5RVK.js.map +1 -0
- 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-JPHG2JW3.js → chunk-XNNOR7F7.js} +25 -25
- package/dist/chunk-XNNOR7F7.js.map +1 -0
- package/dist/{inspect-LMKOXE4Y.js → chunk-YFREUEUI.js} +8 -26
- package/dist/{inspect-LMKOXE4Y.js.map → chunk-YFREUEUI.js.map} +1 -1
- package/dist/{chunk-HSDCI7OV.js → chunk-YLYINX2H.js} +3 -3
- package/dist/{cli-SBXI5AMS.js → cli-AFSLAKR6.js} +47 -36
- package/dist/{cli-SBXI5AMS.js.map → cli-AFSLAKR6.js.map} +1 -1
- package/dist/{config-VELDKLHY.js → config-DBEEM3UA.js} +5 -5
- package/dist/{doctor-T3KWNNP2.js → doctor-XDA3YU6H.js} +7 -7
- package/dist/{ethersCompat-Df4a6QIZ-3YZIAXDK.js → ethersCompat-Df4a6QIZ-WHYKB6HA.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/inspect-YBGDAG47.js +33 -0
- package/dist/{install-LEX3ENQ6.js → install-7J6KKEEP.js} +240 -85
- package/dist/install-7J6KKEEP.js.map +1 -0
- package/dist/outcome-ZFGHX2XW.js +20 -0
- package/dist/publish-IH7RJXGB.js +36 -0
- package/dist/publish-IH7RJXGB.js.map +1 -0
- package/dist/run-DCZFEW2C.js +16806 -0
- package/dist/run-DCZFEW2C.js.map +1 -0
- package/dist/search-R6NIQFXI.js +24 -0
- package/dist/search-R6NIQFXI.js.map +1 -0
- package/dist/{secp256k1-N3ZHU7LB.js → secp256k1-XRPVBC6V.js} +3 -3
- package/dist/secp256k1-XRPVBC6V.js.map +1 -0
- package/dist/usdc-AU6ZIKA6.js +22 -0
- package/dist/usdc-AU6ZIKA6.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-PA54CRBL.js → wallet-HKG3GSTX.js} +10 -10
- package/dist/wallet-HKG3GSTX.js.map +1 -0
- package/dist/wallet-UWHSHWC6.js +31 -0
- package/dist/wallet-UWHSHWC6.js.map +1 -0
- package/package.json +4 -3
- package/skills/tenjin/SKILL.md +56 -13
- package/skills/tenjin-publish/SKILL.md +21 -6
- package/skills/tenjin-search/SKILL.md +35 -20
- package/dist/chunk-662MSGZB.js.map +0 -1
- package/dist/chunk-FJPLRISB.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-YALGASEU.js.map +0 -1
- package/dist/chunk-Z52RA3NC.js.map +0 -1
- 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/usdc-JIAJW4SV.js +0 -22
- /package/dist/{_esm-FEASBWRP.js.map → _esm-N4KAVXQR.js.map} +0 -0
- /package/dist/{ccip-NQXCEK2U.js.map → buy-OOOLUDND.js.map} +0 -0
- /package/dist/{ccip-XR5NE5QK.js.map → candidate-TWCWTFGA.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-XJIW7USF.js.map → chunk-333FOTUJ.js.map} +0 -0
- /package/dist/{chunk-YN5SHIXQ.js.map → chunk-DPET3TW5.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-DBEEM3UA.js.map} +0 -0
- /package/dist/{secp256k1-N3ZHU7LB.js.map → doctor-XDA3YU6H.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-YBGDAG47.js.map} +0 -0
- /package/dist/{wallet-PA54CRBL.js.map → outcome-ZFGHX2XW.js.map} +0 -0
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
defaultIo,
|
|
4
4
|
emitFailure,
|
|
5
5
|
emitSuccess
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VV4P5RVK.js";
|
|
7
7
|
import {
|
|
8
8
|
package_default
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QH6677FJ.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError,
|
|
12
12
|
dataDir,
|
|
13
13
|
external_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6WWVYYSB.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-7J6KKEEP.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-XDA3YU6H.js");
|
|
3546
3549
|
return runDoctor(ctx);
|
|
3547
3550
|
});
|
|
3548
3551
|
});
|
|
@@ -3551,19 +3554,19 @@ 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-DBEEM3UA.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-DBEEM3UA.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-DBEEM3UA.js");
|
|
3567
3570
|
return runConfigSet({ key, value }, ctx);
|
|
3568
3571
|
});
|
|
3569
3572
|
});
|
|
@@ -3572,29 +3575,29 @@ function buildProgram(io, setExit) {
|
|
|
3572
3575
|
);
|
|
3573
3576
|
addGlobalFlags(wallet.command("create")).description("Create a new local wallet").action(async function() {
|
|
3574
3577
|
await runCommand("wallet.create", this, async (ctx) => {
|
|
3575
|
-
const { runWalletCreate } = await import("./wallet-
|
|
3578
|
+
const { runWalletCreate } = await import("./wallet-UWHSHWC6.js");
|
|
3576
3579
|
return runWalletCreate(ctx);
|
|
3577
3580
|
});
|
|
3578
3581
|
});
|
|
3579
3582
|
addGlobalFlags(wallet.command("show")).description("Show the wallet address and key source (never the key)").action(async function() {
|
|
3580
3583
|
await runCommand("wallet.show", this, async (ctx) => {
|
|
3581
|
-
const { runWalletShow } = await import("./wallet-
|
|
3584
|
+
const { runWalletShow } = await import("./wallet-UWHSHWC6.js");
|
|
3582
3585
|
return runWalletShow(ctx);
|
|
3583
3586
|
});
|
|
3584
3587
|
});
|
|
3585
3588
|
addGlobalFlags(wallet.command("balance")).description("Show the wallet USDC balance on Base").action(async function() {
|
|
3586
3589
|
await runCommand("wallet.balance", this, async (ctx) => {
|
|
3587
|
-
const { runWalletBalance } = await import("./wallet-
|
|
3590
|
+
const { runWalletBalance } = await import("./wallet-UWHSHWC6.js");
|
|
3588
3591
|
return runWalletBalance(ctx);
|
|
3589
3592
|
});
|
|
3590
3593
|
});
|
|
3591
|
-
addGlobalFlags(program2.command("
|
|
3594
|
+
addGlobalFlags(program2.command("search <question>")).description(
|
|
3592
3595
|
"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
3596
|
).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("
|
|
3597
|
+
await runCommand("search", this, async (ctx) => {
|
|
3595
3598
|
const o = this.opts();
|
|
3596
|
-
const {
|
|
3597
|
-
return
|
|
3599
|
+
const { runSearch } = await import("./search-R6NIQFXI.js");
|
|
3600
|
+
return runSearch(
|
|
3598
3601
|
{
|
|
3599
3602
|
question,
|
|
3600
3603
|
...typeof o.maxPrice === "string" ? { maxPrice: o.maxPrice } : {},
|
|
@@ -3607,10 +3610,10 @@ function buildProgram(io, setExit) {
|
|
|
3607
3610
|
});
|
|
3608
3611
|
});
|
|
3609
3612
|
addGlobalFlags(program2.command("inspect <resource>")).description(
|
|
3610
|
-
"Show a candidate's pre-purchase card / preview. Use after
|
|
3613
|
+
"Show a candidate's pre-purchase card / preview. Use after search, before buy, to check price, scope, and freshness; it never pays"
|
|
3611
3614
|
).action(async function(resource) {
|
|
3612
3615
|
await runCommand("inspect", this, async (ctx) => {
|
|
3613
|
-
const { runInspect } = await import("./inspect-
|
|
3616
|
+
const { runInspect } = await import("./inspect-YBGDAG47.js");
|
|
3614
3617
|
return runInspect({ ref: resource }, ctx);
|
|
3615
3618
|
});
|
|
3616
3619
|
});
|
|
@@ -3622,7 +3625,7 @@ function buildProgram(io, setExit) {
|
|
|
3622
3625
|
).action(async function(resource) {
|
|
3623
3626
|
await runCommand("buy", this, async (ctx) => {
|
|
3624
3627
|
const o = this.opts();
|
|
3625
|
-
const { runBuy } = await import("./buy-
|
|
3628
|
+
const { runBuy } = await import("./buy-OOOLUDND.js");
|
|
3626
3629
|
return runBuy(
|
|
3627
3630
|
{
|
|
3628
3631
|
ref: resource,
|
|
@@ -3643,7 +3646,7 @@ function buildProgram(io, setExit) {
|
|
|
3643
3646
|
).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
3647
|
await runCommand("publish", this, async (ctx) => {
|
|
3645
3648
|
const o = this.opts();
|
|
3646
|
-
const { runPublish } = await import("./publish-
|
|
3649
|
+
const { runPublish } = await import("./publish-IH7RJXGB.js");
|
|
3647
3650
|
return runPublish(
|
|
3648
3651
|
{
|
|
3649
3652
|
...typeof file === "string" ? { file } : {},
|
|
@@ -3669,18 +3672,18 @@ function buildProgram(io, setExit) {
|
|
|
3669
3672
|
});
|
|
3670
3673
|
});
|
|
3671
3674
|
addGlobalFlags(program2.command("outcome")).description(
|
|
3672
|
-
"Report how a
|
|
3673
|
-
).option("--
|
|
3675
|
+
"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"
|
|
3676
|
+
).option("--search-id <id>", "the search to report against").option("--last", "target the most recent local search").requiredOption(
|
|
3674
3677
|
"--status <status>",
|
|
3675
3678
|
"used | partially_used | rejected | regenerated | purchase_declined"
|
|
3676
3679
|
).option("--resource <id>", "the resourceId the outcome concerns").option("--content-hash <hash>", "sha256:<64hex> of the exact body read").action(async function() {
|
|
3677
3680
|
await runCommand("outcome", this, async (ctx) => {
|
|
3678
3681
|
const o = this.opts();
|
|
3679
|
-
const { runOutcome } = await import("./outcome-
|
|
3682
|
+
const { runOutcome } = await import("./outcome-ZFGHX2XW.js");
|
|
3680
3683
|
return runOutcome(
|
|
3681
3684
|
{
|
|
3682
3685
|
status: String(o.status),
|
|
3683
|
-
...typeof o.
|
|
3686
|
+
...typeof o.searchId === "string" ? { searchId: o.searchId } : {},
|
|
3684
3687
|
...o.last === true ? { last: true } : {},
|
|
3685
3688
|
...typeof o.resource === "string" ? { resource: o.resource } : {},
|
|
3686
3689
|
...typeof o.contentHash === "string" ? { contentHash: o.contentHash } : {}
|
|
@@ -3694,14 +3697,14 @@ function buildProgram(io, setExit) {
|
|
|
3694
3697
|
"Manage local publish candidates (parked drafts; nothing uploads until publish)"
|
|
3695
3698
|
)
|
|
3696
3699
|
);
|
|
3697
|
-
addGlobalFlags(candidate.command("add <file>")).description("Park a Markdown draft as a publish candidate, tied to a
|
|
3700
|
+
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
3701
|
await runCommand("candidate.add", this, async (ctx) => {
|
|
3699
3702
|
const o = this.opts();
|
|
3700
|
-
const { runCandidateAdd } = await import("./candidate-
|
|
3703
|
+
const { runCandidateAdd } = await import("./candidate-TWCWTFGA.js");
|
|
3701
3704
|
return runCandidateAdd(
|
|
3702
3705
|
{
|
|
3703
3706
|
file,
|
|
3704
|
-
|
|
3707
|
+
searchId: String(o.searchId),
|
|
3705
3708
|
...typeof o.question === "string" ? { question: o.question } : {}
|
|
3706
3709
|
},
|
|
3707
3710
|
ctx
|
|
@@ -3710,16 +3713,21 @@ function buildProgram(io, setExit) {
|
|
|
3710
3713
|
});
|
|
3711
3714
|
addGlobalFlags(candidate.command("list")).description("List pending candidates, newest first").action(async function() {
|
|
3712
3715
|
await runCommand("candidate.list", this, async (ctx) => {
|
|
3713
|
-
const { runCandidateList } = await import("./candidate-
|
|
3716
|
+
const { runCandidateList } = await import("./candidate-TWCWTFGA.js");
|
|
3714
3717
|
return runCandidateList(ctx);
|
|
3715
3718
|
});
|
|
3716
3719
|
});
|
|
3717
3720
|
addGlobalFlags(candidate.command("drop <id>")).description("Discard a pending candidate (never auto-deleted)").action(async function(id) {
|
|
3718
3721
|
await runCommand("candidate.drop", this, async (ctx) => {
|
|
3719
|
-
const { runCandidateDrop } = await import("./candidate-
|
|
3722
|
+
const { runCandidateDrop } = await import("./candidate-TWCWTFGA.js");
|
|
3720
3723
|
return runCandidateDrop({ id }, ctx);
|
|
3721
3724
|
});
|
|
3722
3725
|
});
|
|
3726
|
+
addGlobalFlags(program2.command("mcp")).description("Run a local stdio MCP server exposing the Tenjin command cores to an MCP client").action(async function() {
|
|
3727
|
+
const ctx = buildContext(this, io);
|
|
3728
|
+
const { runMcpServer } = await import("./run-DCZFEW2C.js");
|
|
3729
|
+
await runMcpServer({ dataDir: ctx.dataDir, flags: ctx.flags });
|
|
3730
|
+
});
|
|
3723
3731
|
return program2;
|
|
3724
3732
|
}
|
|
3725
3733
|
function collect(value, previous) {
|
|
@@ -3739,15 +3747,18 @@ async function main(argv, io = defaultIo()) {
|
|
|
3739
3747
|
}
|
|
3740
3748
|
function handleParseError(err, io, program2) {
|
|
3741
3749
|
const json = program2.opts().json === true;
|
|
3750
|
+
const humanFirst = io.isTTY && !json;
|
|
3742
3751
|
if (err instanceof CommanderError) {
|
|
3743
3752
|
if (err.code === "commander.version" || err.code === "commander.helpDisplayed") {
|
|
3744
3753
|
return 0;
|
|
3745
3754
|
}
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3755
|
+
if (!humanFirst) {
|
|
3756
|
+
const message = err.code === "commander.help" ? "No command specified" : err.message.replace(/^error:\s*/i, "");
|
|
3757
|
+
const usageErr = new CliError("USAGE", message, {
|
|
3758
|
+
fix: "Run `tenjin --help` for available commands."
|
|
3759
|
+
});
|
|
3760
|
+
emitFailure(io, "tenjin", usageErr, { json: true });
|
|
3761
|
+
}
|
|
3751
3762
|
return 2;
|
|
3752
3763
|
}
|
|
3753
3764
|
return emitFailure(io, "tenjin", err, { json }).exitCode;
|
|
@@ -3756,4 +3767,4 @@ export {
|
|
|
3756
3767
|
buildProgram,
|
|
3757
3768
|
main
|
|
3758
3769
|
};
|
|
3759
|
-
//# sourceMappingURL=cli-
|
|
3770
|
+
//# sourceMappingURL=cli-AFSLAKR6.js.map
|