chainlesschain 0.162.101 → 0.162.102
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/package.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-NeD6mA1O.js → AIOps-C1k00Gsz.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-Bhp7A7vO.js → ActionButton-BinI6ZDq.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DgdI84Jy.js → Analytics-Cg0jo_cd.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-Qw29caa7.js → AppLayout-CClMs_AA.js} +5 -5
- package/src/assets/web-panel/assets/{Audit-DgkzhBjz.js → Audit-BtQgvFdM.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CiWEQoW5.js → Backup-43FRi7ZI.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BWNbkeDF.js → BaseInput-Cfza-FZU.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-CUcj4Vyd.js → Chat-7AjHSiSC.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-bAMNCgEj.js → ChatBubbleRenderer-Bh1YNdtx.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-B0uZTW8f.js → Checkbox-DgjfqlWW.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BPk7b-Xa.js → Codegen-CkwOBThj.js} +1 -1
- package/src/assets/web-panel/assets/{Col-C2cV_dw4.js → Col-Cohk5WYM.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CDN6Yggb.js → Community-D3LMGh3F.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-C4WPtW_V.js → Compact-DqoMJmh0.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-BGUfeH-3.js → Compliance-BVjWZlEj.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CsnVgF-o.js → Cowork-C0lqQPqu.js} +2 -2
- package/src/assets/web-panel/assets/{Cron--rGanASk.js → Cron-DHd_PJZS.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-D_CLrd-0.js → Crosschain-BphK2Q9u.js} +1 -1
- package/src/assets/web-panel/assets/{DID-iYkbVc8W.js → DID-CWIw0aG4.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-CuFMU98t.js → Dashboard-CKgDU9U6.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-BPSjv_Ye.js → Dropdown-DkIlDUXF.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-DBmk7czO.js → EmailListRenderer-5sXA9hwZ.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-BaCArN11.js → FamilyGuardDashboard-CgcdJLH7.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DsTV-8Ca.js → Federation-DPOcJISA.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-C6fRr_6F.js → FormItemContext-DxOutBMJ.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-AfuZCfyv.js → GenericCardRenderer-BYVNtkcd.js} +1 -1
- package/src/assets/web-panel/assets/{Git-CAFIrGhb.js → Git-B37LKxOu.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-C-NaxDs4.js → Governance-CnKcx5un.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BPfeNZP7.js → Inference-CbRAWN3_.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DDUBte_m.js → KnowledgeGraph-D0w6RfE_.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DWysA6JP.js → Logs-DxBDKpzq.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-CAK68hXc.js → Marketplace-DNLi6O_3.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-CNmmoDAk.js → McpTools-s0sBCPXw.js} +4 -4
- package/src/assets/web-panel/assets/{Memory-D_KmFoui.js → Memory-BdSEgpmP.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-CaY-6kjj.js → MobileBridge-Dz7nz4K9.js} +2 -2
- package/src/assets/web-panel/assets/MobileProjects-DakdA2PC.js +1 -0
- package/src/assets/web-panel/assets/{Mtc-YnLrtuXT.js → Mtc-Be9OBypk.js} +6 -6
- package/src/assets/web-panel/assets/{MtcAudit-D38v836u.js → MtcAudit-KI2ih4Tl.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-Dv3ad9S4.js → Multisig-Cg3jHFjL.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-MYTh2eWC.js → NLProgramming-BepHx8fU.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DYO-0Hva.js → Notes-2f05HyqN.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-D39gOb3h.js → NotificationSettings-Blwio_G5.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-CXdO0z3I.js → OrderTableRenderer-D7HJfvo_.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-DOYTwQwt.js → Organization-Uihlz1cI.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-Cm-go0yU.js → Overflow-gZx8kADL.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CakGtorw.js → P2P-DqEEGqba.js} +2 -2
- package/src/assets/web-panel/assets/PdhVaultBrowser-BHUi1nb5.js +7 -0
- package/src/assets/web-panel/assets/{Permissions-C_podo04.js → Permissions-ERF2ZQ3G.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-nBbehIKp.js → PersonalDataHub-CzDy9CFB.js} +3 -3
- package/src/assets/web-panel/assets/{Pipeline-CGzQUoKv.js → Pipeline-Dy4x9Ejw.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-BuD-Dd9m.js → Privacy-C6UJys52.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CLcFmGXU.js → ProjectInit-Bmi027fa.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-BxXTR0dH.js → ProjectSettings-NinSZmGA.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-DkpBjAfd.js → Projects-DeW-p-hT.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-DwHK42ht.js → Providers-4hxrBTLo.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-idJPKErk.js → QuickAsk-B5inZlW8.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BvJj0Nu2.js → Recommend-7lpBm00-.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-BK9l4Rcf.js → Reputation-QfdGZxYO.js} +1 -1
- package/src/assets/web-panel/assets/{Row-rLxg7xk5.js → Row-DqHC7BCT.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cw6ZcHBY.js → RssFeed-B3F1aGP6.js} +3 -3
- package/src/assets/web-panel/assets/{Search-D8mKp506.js → Search-BXtjuoYO.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CXunojmQ.js → Security-Iy0MOV-A.js} +4 -4
- package/src/assets/web-panel/assets/{Services-BE5DgmPl.js → Services-C_puMp_6.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CssL5wmE.js → Skeleton-Bg6mTVZU.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-zyS_1YrT.js → Skills-D4wXhanR.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DIVn2Roa.js → Sla-Cgr2B9R6.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CjNdZWdj.js → SpeechSettings-ctYqZEY5.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-BCbu5WQT.js → SyncSettings-C3qWh9y4.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-BjFrgXge.js → Tasks-D3AAgUx1.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-Cl4Y3lKN.js → Templates-Bm_Dyz8T.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-k1T0F_eH.js → Tenant-DOSrOw9X.js} +1 -1
- package/src/assets/web-panel/assets/Terminal-DrG0bEOS.js +3 -0
- package/src/assets/web-panel/assets/TimelineRenderer-BB8Qq6Cx.js +1 -0
- package/src/assets/web-panel/assets/{Tokens-BUWEiyab.js → Tokens-DqyF_Flh.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-9srMXwpo.js → Trigger-ClwQC2hP.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-hmGor_R2.js → Trust-DGQSLPQ0.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Dst7K10a.js → UkeySign-BAkeYsUO.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-D_utUv1u.js → VideoEditing-WyUxS65Y.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-BpYTTseI.js → Wallet-Br7GdjEg.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-CEIw8QrF.js → WebAuthn-bKs1dahj.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-Bkb4bUZ_.js → WorkflowEditor-CVqAALYe.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CTqDgGRH.js → chat-BDGDRbab.js} +1 -1
- package/src/assets/web-panel/assets/{colors-CnJHVFLk.js → colors-DIUxZwT8.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-D4-v0ahl.js → compact-item-C2iM4GmN.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CYDbnHZX.js → createContext-D27NeHwO.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-Daz0PHhS.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-CbYwlEz5.js → hasIn-D1lXdsFj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR4facv0.js → index-B5ZB5lsV.js} +1 -1
- package/src/assets/web-panel/assets/{index-DMKNVIqJ.js → index-B6kc4-nD.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cl7-mbsb.js → index-B8POWlbO.js} +1 -1
- package/src/assets/web-panel/assets/{index-CVc_5aBF.js → index-BE9bNvdn.js} +1 -1
- package/src/assets/web-panel/assets/{index-BCQ4kcL3.js → index-BIVYPlpl.js} +1 -1
- package/src/assets/web-panel/assets/{index-B8uhiRML.js → index-BTUFhfHs.js} +1 -1
- package/src/assets/web-panel/assets/{index-qNwkSspX.js → index-BTedVe_v.js} +1 -1
- package/src/assets/web-panel/assets/{index-OqmUv5QO.js → index-Bi8u5GsP.js} +1 -1
- package/src/assets/web-panel/assets/{index-CP-UKwu8.js → index-Bil9t91t.js} +1 -1
- package/src/assets/web-panel/assets/{index-CfshMjFN.js → index-BqbjsJcS.js} +1 -1
- package/src/assets/web-panel/assets/{index-tmNsJzQU.js → index-CAnMUhHO.js} +1 -1
- package/src/assets/web-panel/assets/{index-BOUSaCsn.js → index-CDzSUTpa.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dl_NdY39.js → index-CEO9vhv7.js} +3 -3
- package/src/assets/web-panel/assets/{index-DxvFrsxl.js → index-CFEwtE3q.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2fICr5d.js → index-CFY1KjB1.js} +1 -1
- package/src/assets/web-panel/assets/{index-5NXdAIZK.js → index-CKMDgjfh.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR0FfrCL.js → index-CNk98bb1.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaCCLe7i.js → index-Ca8n97h9.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGUOVPjO.js → index-Cb9u9MMo.js} +1 -1
- package/src/assets/web-panel/assets/index-Cbe_eJAR.js +1 -0
- package/src/assets/web-panel/assets/{index-CxKdSB-p.js → index-Cbqr8kW6.js} +1 -1
- package/src/assets/web-panel/assets/{index-CY971z_9.js → index-CfR3Pvsu.js} +1 -1
- package/src/assets/web-panel/assets/{index-DVKfa-z4.js → index-Cgf3zMwq.js} +1 -1
- package/src/assets/web-panel/assets/{index-4767GEls.js → index-CiA-L5ld.js} +1 -1
- package/src/assets/web-panel/assets/{index-CK8nROWH.js → index-CoygRreE.js} +1 -1
- package/src/assets/web-panel/assets/{index-B-hiXmVK.js → index-CsIw-YQF.js} +1 -1
- package/src/assets/web-panel/assets/{index-wxz2s6uW.js → index-DFhdJm7M.js} +1 -1
- package/src/assets/web-panel/assets/{index-8cmtr1jC.js → index-DK0jgmJg.js} +1 -1
- package/src/assets/web-panel/assets/{index-BygyTsjr.js → index-Dc4k4V1u.js} +1 -1
- package/src/assets/web-panel/assets/{index-D8MYVsVB.js → index-DfSav-yQ.js} +1 -1
- package/src/assets/web-panel/assets/index-DgcPjW1c.js +1 -0
- package/src/assets/web-panel/assets/{index-xDe5BkjU.js → index-DkOu8er7.js} +1 -1
- package/src/assets/web-panel/assets/{index-C4chfOjw.js → index-DnCVI295.js} +1 -1
- package/src/assets/web-panel/assets/{index-BNz3yht2.js → index-Do13fQ5W.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdRtpQFq.js → index-DrS-Mrm-.js} +1 -1
- package/src/assets/web-panel/assets/{index-B78d_-pR.js → index-ET5LYk9B.js} +1 -1
- package/src/assets/web-panel/assets/{index-YuO8gxKb.js → index-HZGu1woY.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjFQuno4.js → index-Y1rkRas5.js} +1 -1
- package/src/assets/web-panel/assets/{index-dKpwhR5x.js → index-yIM-KxVm.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-qCQgpAty.js → initDefaultProps-C0Yrc6yY.js} +1 -1
- package/src/assets/web-panel/assets/{motion-SkVSGdwu.js → motion-DnOI85ek.js} +1 -1
- package/src/assets/web-panel/assets/{move-BpWxaW_x.js → move-DT9zQPZp.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DlZWM2H4.js → omit-DFtDi5Wd.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-DobtUnVe.js → pickAttrs-Cobkb_rd.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-CD6mYRZi.js → placementArrow-DWQDu4i-.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DvIIMTD_.js → responsiveObserve-daoQcWcX.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CVgyUfaA.js → slide-BLkzd2OV.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DrUDnjy_.js → statusUtils-Uyxi81M0.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-BNYQS60m.js → styleChecker-Dtw5lUcs.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DYv7Tvk0.js → useFlexGapSupport-_JpMgpdt.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-DmAD2atJ.js → useFs-huwAlPD-.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DbLVKA3I.js → usePersonalDataHub-7cafj8_f.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-C3WEt6_P.js → vnode-DYUSfRt7.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-CRoSX_oZ.js → zoom-B-tjvmer.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/a2a.js +2 -1
- package/src/commands/bi.js +4 -3
- package/src/commands/browse.js +3 -2
- package/src/commands/codegen.js +7 -6
- package/src/commands/collab.js +2 -1
- package/src/commands/crosschain.js +5 -4
- package/src/commands/dao.js +10 -10
- package/src/commands/dbevo.js +3 -2
- package/src/commands/economy.js +8 -6
- package/src/commands/evolution.js +10 -8
- package/src/commands/export.js +2 -1
- package/src/commands/federation.js +8 -7
- package/src/commands/fusion.js +4 -3
- package/src/commands/git.js +2 -1
- package/src/commands/governance.js +6 -5
- package/src/commands/hardening.js +3 -2
- package/src/commands/hmemory.js +2 -1
- package/src/commands/inference.js +9 -8
- package/src/commands/infra.js +9 -8
- package/src/commands/instinct.js +66 -0
- package/src/commands/learning.js +66 -0
- package/src/commands/marketplace.js +5 -4
- package/src/commands/matrix.js +2 -1
- package/src/commands/memory.js +66 -0
- package/src/commands/nlprog.js +4 -3
- package/src/commands/nostr.js +4 -3
- package/src/commands/note.js +2 -1
- package/src/commands/ops.js +3 -2
- package/src/commands/perception.js +6 -5
- package/src/commands/privacy.js +13 -12
- package/src/commands/quantization.js +3 -2
- package/src/commands/recommend.js +8 -7
- package/src/commands/reputation.js +4 -3
- package/src/commands/runtime.js +6 -5
- package/src/commands/sandbox.js +5 -4
- package/src/commands/session.js +2 -1
- package/src/commands/sla.js +6 -5
- package/src/commands/social.js +6 -5
- package/src/commands/stress.js +7 -6
- package/src/commands/sync.js +2 -1
- package/src/commands/tenant.js +3 -2
- package/src/commands/trust.js +7 -6
- package/src/commands/wallet.js +2 -1
- package/src/lib/__tests__/agents.test.js +225 -0
- package/src/lib/__tests__/cowork-observe-html.test.js +141 -0
- package/src/lib/__tests__/logger.test.js +110 -0
- package/src/lib/__tests__/project-inventory.test.js +280 -0
- package/src/lib/__tests__/project-root.test.js +96 -0
- package/src/lib/__tests__/provider-stream.test.js +190 -0
- package/src/lib/cli-arg.js +41 -0
- package/src/lib/cli-numeric.js +12 -3
- package/src/lib/instinct-manager.js +64 -0
- package/src/lib/learning/learning-tables.js +83 -0
- package/src/lib/mcp-oauth.js +10 -2
- package/src/lib/memory-manager.js +67 -0
- package/src/lib/plan-mode.js +3 -2
- package/src/repl/__tests__/mcp-prompt.test.js +155 -0
- package/src/repl/__tests__/slash-macro.test.js +81 -0
- package/src/runtime/__tests__/coding-agent-contract-shared.test.js +136 -0
- package/src/runtime/__tests__/coding-agent-events.test.js +263 -0
- package/src/assets/web-panel/assets/MobileProjects-DhDxrWze.js +0 -1
- package/src/assets/web-panel/assets/PdhVaultBrowser-BlmbHJnb.js +0 -7
- package/src/assets/web-panel/assets/Terminal-i0tHF8fy.js +0 -3
- package/src/assets/web-panel/assets/TimelineRenderer-FmPaNyqK.js +0 -1
- package/src/assets/web-panel/assets/devWarning-OhxeajH6.js +0 -1
- package/src/assets/web-panel/assets/index-Bbtoi_47.js +0 -1
- package/src/assets/web-panel/assets/index-Cb8RWwaB.js +0 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
NODE_STATUS,
|
|
@@ -95,7 +96,7 @@ export function registerInferenceCommand(program) {
|
|
|
95
96
|
.description("Register inference node")
|
|
96
97
|
.option("-e, --endpoint <url>", "Node endpoint URL")
|
|
97
98
|
.option("-c, --capabilities <list>", "Comma-separated capabilities")
|
|
98
|
-
.option("-g, --gpu <mb>", "GPU memory in MB",
|
|
99
|
+
.option("-g, --gpu <mb>", "GPU memory in MB", intArg("--gpu"))
|
|
99
100
|
.option("--json", "JSON output")
|
|
100
101
|
.action((nodeId, opts) => {
|
|
101
102
|
const db = _dbFromCtx(inf);
|
|
@@ -176,7 +177,7 @@ export function registerInferenceCommand(program) {
|
|
|
176
177
|
.description("List inference nodes")
|
|
177
178
|
.option("-s, --status <status>", "Filter by status")
|
|
178
179
|
.option("-c, --capability <cap>", "Filter by capability")
|
|
179
|
-
.option("--limit <n>", "Max results",
|
|
180
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
180
181
|
.option("--json", "JSON output")
|
|
181
182
|
.action((opts) => {
|
|
182
183
|
const db = _dbFromCtx(inf);
|
|
@@ -200,7 +201,7 @@ export function registerInferenceCommand(program) {
|
|
|
200
201
|
.command("submit <model>")
|
|
201
202
|
.description("Submit inference task")
|
|
202
203
|
.option("-i, --input <text>", "Input data")
|
|
203
|
-
.option("-p, --priority <n>", "Priority (1-10)",
|
|
204
|
+
.option("-p, --priority <n>", "Priority (1-10)", intArg("--priority"))
|
|
204
205
|
.option("-m, --mode <mode>", "Privacy mode (standard/encrypted/federated)")
|
|
205
206
|
.option("--json", "JSON output")
|
|
206
207
|
.action((model, opts) => {
|
|
@@ -223,7 +224,7 @@ export function registerInferenceCommand(program) {
|
|
|
223
224
|
.command("complete <task-id>")
|
|
224
225
|
.description("Mark task as complete")
|
|
225
226
|
.option("-o, --output <text>", "Task output")
|
|
226
|
-
.option("-d, --duration <ms>", "Duration in ms",
|
|
227
|
+
.option("-d, --duration <ms>", "Duration in ms", intArg("--duration"))
|
|
227
228
|
.option("--json", "JSON output")
|
|
228
229
|
.action((taskId, opts) => {
|
|
229
230
|
const db = _dbFromCtx(inf);
|
|
@@ -279,7 +280,7 @@ export function registerInferenceCommand(program) {
|
|
|
279
280
|
.option("-s, --status <status>", "Filter by status")
|
|
280
281
|
.option("-m, --model <model>", "Filter by model")
|
|
281
282
|
.option("-p, --privacy <mode>", "Filter by privacy mode")
|
|
282
|
-
.option("--limit <n>", "Max results",
|
|
283
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
283
284
|
.option("--json", "JSON output")
|
|
284
285
|
.action((opts) => {
|
|
285
286
|
const db = _dbFromCtx(inf);
|
|
@@ -437,7 +438,7 @@ export function registerInferenceCommand(program) {
|
|
|
437
438
|
.command("submit-v2 <model>")
|
|
438
439
|
.description("Submit task (V2, creates queued no assignment)")
|
|
439
440
|
.option("-i, --input <text>", "Input data")
|
|
440
|
-
.option("-p, --priority <n>", "Priority (1-10)",
|
|
441
|
+
.option("-p, --priority <n>", "Priority (1-10)", intArg("--priority"))
|
|
441
442
|
.option("-m, --mode <mode>", "Privacy mode")
|
|
442
443
|
.option("--json", "JSON output")
|
|
443
444
|
.action((model, opts) => {
|
|
@@ -501,7 +502,7 @@ export function registerInferenceCommand(program) {
|
|
|
501
502
|
.command("complete-v2 <task-id>")
|
|
502
503
|
.description("Complete running task (running → complete)")
|
|
503
504
|
.option("-o, --output <text>", "Task output")
|
|
504
|
-
.option("-d, --duration <ms>", "Duration in ms",
|
|
505
|
+
.option("-d, --duration <ms>", "Duration in ms", intArg("--duration"))
|
|
505
506
|
.option("--json", "JSON output")
|
|
506
507
|
.action((taskId, opts) => {
|
|
507
508
|
const db = _dbFromCtx(inf);
|
|
@@ -543,7 +544,7 @@ export function registerInferenceCommand(program) {
|
|
|
543
544
|
.command("set-task-status <task-id> <status>")
|
|
544
545
|
.description("Generic state-machine-guarded task status setter")
|
|
545
546
|
.option("-o, --output <text>", "Patch: output")
|
|
546
|
-
.option("-d, --duration <ms>", "Patch: durationMs",
|
|
547
|
+
.option("-d, --duration <ms>", "Patch: durationMs", intArg("--duration"))
|
|
547
548
|
.option("-e, --error <text>", "Patch: errorMessage")
|
|
548
549
|
.option("--json", "JSON output")
|
|
549
550
|
.action((taskId, status, opts) => {
|
package/src/commands/infra.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
DEAL_STATUS,
|
|
@@ -115,8 +116,8 @@ export function registerInfraCommand(program) {
|
|
|
115
116
|
.requiredOption("-c, --cid <cid>", "Content CID")
|
|
116
117
|
.requiredOption("-s, --size <bytes>", "Size in bytes", parseInt)
|
|
117
118
|
.option("-m, --miner <id>", "Miner ID")
|
|
118
|
-
.option("-p, --price <fil>", "Price in FIL",
|
|
119
|
-
.option("-d, --duration <epochs>", "Duration in epochs",
|
|
119
|
+
.option("-p, --price <fil>", "Price in FIL", floatArg("--price"))
|
|
120
|
+
.option("-d, --duration <epochs>", "Duration in epochs", intArg("--duration"))
|
|
120
121
|
.option("--json", "JSON output")
|
|
121
122
|
.action((opts) => {
|
|
122
123
|
const db = _dbFromCtx(inf);
|
|
@@ -180,7 +181,7 @@ export function registerInfraCommand(program) {
|
|
|
180
181
|
.command("deals")
|
|
181
182
|
.description("List storage deals")
|
|
182
183
|
.option("-s, --status <status>", "Filter by status")
|
|
183
|
-
.option("--limit <n>", "Max results",
|
|
184
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
184
185
|
.option("--json", "JSON output")
|
|
185
186
|
.action((opts) => {
|
|
186
187
|
const db = _dbFromCtx(inf);
|
|
@@ -205,7 +206,7 @@ export function registerInfraCommand(program) {
|
|
|
205
206
|
.requiredOption("-c, --cid <cid>", "Content CID")
|
|
206
207
|
.option("-p, --parent <cid>", "Parent CID")
|
|
207
208
|
.option("-d, --dag <json>", "DAG structure")
|
|
208
|
-
.option("-n, --peers <n>", "Peer count",
|
|
209
|
+
.option("-n, --peers <n>", "Peer count", intArg("--peers"))
|
|
209
210
|
.option("--json", "JSON output")
|
|
210
211
|
.action((opts) => {
|
|
211
212
|
const db = _dbFromCtx(inf);
|
|
@@ -242,7 +243,7 @@ export function registerInfraCommand(program) {
|
|
|
242
243
|
.command("versions")
|
|
243
244
|
.description("List content versions")
|
|
244
245
|
.option("-c, --cid <cid>", "Filter by content CID")
|
|
245
|
-
.option("--limit <n>", "Max results",
|
|
246
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
246
247
|
.option("--json", "JSON output")
|
|
247
248
|
.action((opts) => {
|
|
248
249
|
const db = _dbFromCtx(inf);
|
|
@@ -282,8 +283,8 @@ export function registerInfraCommand(program) {
|
|
|
282
283
|
"Route type (tor/domain_front/mesh_ble/mesh_wifi/direct)",
|
|
283
284
|
)
|
|
284
285
|
.option("-e, --endpoint <url>", "Endpoint URL")
|
|
285
|
-
.option("-l, --latency <ms>", "Latency in ms",
|
|
286
|
-
.option("-r, --reliability <0-1>", "Reliability score",
|
|
286
|
+
.option("-l, --latency <ms>", "Latency in ms", intArg("--latency"))
|
|
287
|
+
.option("-r, --reliability <0-1>", "Reliability score", floatArg("--reliability"))
|
|
287
288
|
.option("--json", "JSON output")
|
|
288
289
|
.action((opts) => {
|
|
289
290
|
const db = _dbFromCtx(inf);
|
|
@@ -346,7 +347,7 @@ export function registerInfraCommand(program) {
|
|
|
346
347
|
.description("List anti-censorship routes")
|
|
347
348
|
.option("-t, --type <type>", "Filter by route type")
|
|
348
349
|
.option("-s, --status <status>", "Filter by status")
|
|
349
|
-
.option("--limit <n>", "Max results",
|
|
350
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
350
351
|
.option("--json", "JSON output")
|
|
351
352
|
.action((opts) => {
|
|
352
353
|
const db = _dbFromCtx(inf);
|
package/src/commands/instinct.js
CHANGED
|
@@ -9,6 +9,8 @@ import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
|
9
9
|
import {
|
|
10
10
|
getInstincts,
|
|
11
11
|
getStrongInstincts,
|
|
12
|
+
exportInstincts,
|
|
13
|
+
importInstincts,
|
|
12
14
|
resetInstincts,
|
|
13
15
|
deleteInstinct,
|
|
14
16
|
decayInstincts,
|
|
@@ -104,6 +106,70 @@ export function registerInstinctCommand(program) {
|
|
|
104
106
|
}
|
|
105
107
|
});
|
|
106
108
|
|
|
109
|
+
// instinct export — §8.3 cross-device backup: full dump of the instincts table
|
|
110
|
+
instinct
|
|
111
|
+
.command("export")
|
|
112
|
+
.description("Export all instincts as JSON (module 101 §8.3 backup)")
|
|
113
|
+
.option("--output <file>", "Write JSON array to file (default: stdout)")
|
|
114
|
+
.option("--json", "Output JSON ({ok,count} with --output; array otherwise)")
|
|
115
|
+
.action(async (options) => {
|
|
116
|
+
try {
|
|
117
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
118
|
+
if (!ctx.db) {
|
|
119
|
+
logger.error("Database not available");
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
const rows = exportInstincts(ctx.db.getDatabase());
|
|
123
|
+
if (options.output) {
|
|
124
|
+
const fs = await import("fs");
|
|
125
|
+
fs.writeFileSync(options.output, JSON.stringify(rows), "utf-8");
|
|
126
|
+
if (options.json) {
|
|
127
|
+
console.log(JSON.stringify({ ok: true, count: rows.length, output: options.output }));
|
|
128
|
+
} else {
|
|
129
|
+
logger.log(`exported ${rows.length} instincts → ${options.output}`);
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
console.log(JSON.stringify(rows));
|
|
133
|
+
}
|
|
134
|
+
await shutdown();
|
|
135
|
+
} catch (err) {
|
|
136
|
+
logger.error(`instinct export failed: ${err.message}`);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// instinct import — §8.3 restore: idempotent upsert by id from a JSON-array file
|
|
142
|
+
instinct
|
|
143
|
+
.command("import")
|
|
144
|
+
.description("Import instincts from a JSON array file (idempotent upsert by id; §8.3)")
|
|
145
|
+
.requiredOption("--input <file>", "JSON array of instincts to import")
|
|
146
|
+
.option("--json", "Output JSON result")
|
|
147
|
+
.action(async (options) => {
|
|
148
|
+
try {
|
|
149
|
+
const fs = await import("fs");
|
|
150
|
+
const rows = JSON.parse(fs.readFileSync(options.input, "utf-8"));
|
|
151
|
+
if (!Array.isArray(rows)) {
|
|
152
|
+
throw new Error("import: expected a JSON array of instincts");
|
|
153
|
+
}
|
|
154
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
155
|
+
if (!ctx.db) {
|
|
156
|
+
logger.error("Database not available");
|
|
157
|
+
process.exit(1);
|
|
158
|
+
}
|
|
159
|
+
const result = importInstincts(ctx.db.getDatabase(), rows);
|
|
160
|
+
if (options.json) {
|
|
161
|
+
console.log(JSON.stringify(result));
|
|
162
|
+
} else {
|
|
163
|
+
logger.log(`imported ${result.imported}, failed ${result.failed}`);
|
|
164
|
+
}
|
|
165
|
+
await shutdown();
|
|
166
|
+
if (!result.ok) process.exitCode = 1;
|
|
167
|
+
} catch (err) {
|
|
168
|
+
logger.error(`instinct import failed: ${err.message}`);
|
|
169
|
+
process.exit(1);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
107
173
|
// instinct categories
|
|
108
174
|
instinct
|
|
109
175
|
.command("categories")
|
package/src/commands/learning.js
CHANGED
|
@@ -109,6 +109,72 @@ export function registerLearningCommand(program) {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
+
// learning export — §8.3 cross-device backup: full dump of learning_trajectories
|
|
113
|
+
learning
|
|
114
|
+
.command("export")
|
|
115
|
+
.description("Export all learning trajectories as JSON (module 101 §8.3 backup)")
|
|
116
|
+
.option("--output <file>", "Write JSON array to file (default: stdout)")
|
|
117
|
+
.option("--json", "Output JSON ({ok,count} with --output; array otherwise)")
|
|
118
|
+
.action(async (options) => {
|
|
119
|
+
try {
|
|
120
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
121
|
+
if (!ctx.db) {
|
|
122
|
+
logger.error("Database not available");
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
const { exportTrajectories } = await import("../lib/learning/learning-tables.js");
|
|
126
|
+
const rows = exportTrajectories(ctx.db.getDatabase());
|
|
127
|
+
if (options.output) {
|
|
128
|
+
const fs = await import("fs");
|
|
129
|
+
fs.writeFileSync(options.output, JSON.stringify(rows), "utf-8");
|
|
130
|
+
if (options.json) {
|
|
131
|
+
console.log(JSON.stringify({ ok: true, count: rows.length, output: options.output }));
|
|
132
|
+
} else {
|
|
133
|
+
logger.log(`exported ${rows.length} trajectories → ${options.output}`);
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
console.log(JSON.stringify(rows));
|
|
137
|
+
}
|
|
138
|
+
await shutdown();
|
|
139
|
+
} catch (err) {
|
|
140
|
+
logger.error(`learning export failed: ${err.message}`);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// learning import — §8.3 restore: idempotent upsert by id from a JSON-array file
|
|
146
|
+
learning
|
|
147
|
+
.command("import")
|
|
148
|
+
.description("Import learning trajectories from a JSON array file (idempotent upsert by id; §8.3)")
|
|
149
|
+
.requiredOption("--input <file>", "JSON array of trajectories to import")
|
|
150
|
+
.option("--json", "Output JSON result")
|
|
151
|
+
.action(async (options) => {
|
|
152
|
+
try {
|
|
153
|
+
const fs = await import("fs");
|
|
154
|
+
const rows = JSON.parse(fs.readFileSync(options.input, "utf-8"));
|
|
155
|
+
if (!Array.isArray(rows)) {
|
|
156
|
+
throw new Error("import: expected a JSON array of trajectories");
|
|
157
|
+
}
|
|
158
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
159
|
+
if (!ctx.db) {
|
|
160
|
+
logger.error("Database not available");
|
|
161
|
+
process.exit(1);
|
|
162
|
+
}
|
|
163
|
+
const { importTrajectories } = await import("../lib/learning/learning-tables.js");
|
|
164
|
+
const result = importTrajectories(ctx.db.getDatabase(), rows);
|
|
165
|
+
if (options.json) {
|
|
166
|
+
console.log(JSON.stringify(result));
|
|
167
|
+
} else {
|
|
168
|
+
logger.log(`imported ${result.imported}, failed ${result.failed}`);
|
|
169
|
+
}
|
|
170
|
+
await shutdown();
|
|
171
|
+
if (!result.ok) process.exitCode = 1;
|
|
172
|
+
} catch (err) {
|
|
173
|
+
logger.error(`learning import failed: ${err.message}`);
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
112
178
|
// learning reflect
|
|
113
179
|
learning
|
|
114
180
|
.command("reflect")
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import chalk from "chalk";
|
|
8
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
8
9
|
import { logger } from "../lib/logger.js";
|
|
9
10
|
import { parseJsonOption } from "../lib/parse-json-option.js";
|
|
10
11
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
@@ -240,7 +241,7 @@ export function registerMarketplaceCommand(program) {
|
|
|
240
241
|
"Status (pending|running|success|failed|timeout)",
|
|
241
242
|
"success",
|
|
242
243
|
)
|
|
243
|
-
.option("-d, --duration-ms <n>", "Duration in ms",
|
|
244
|
+
.option("-d, --duration-ms <n>", "Duration in ms", intArg("--duration-ms"))
|
|
244
245
|
.option("-e, --error <text>", "Error message when failed")
|
|
245
246
|
.option("--json", "Output as JSON")
|
|
246
247
|
.action(async (serviceId, options) => {
|
|
@@ -466,7 +467,7 @@ export function registerMarketplaceCommand(program) {
|
|
|
466
467
|
mp.command("complete-invocation <invocation-id>")
|
|
467
468
|
.description("Complete a V2 invocation (RUNNING → SUCCESS)")
|
|
468
469
|
.option("-o, --output <json>", "JSON-encoded output")
|
|
469
|
-
.option("-d, --duration-ms <n>", "Duration in milliseconds",
|
|
470
|
+
.option("-d, --duration-ms <n>", "Duration in milliseconds", intArg("--duration-ms"))
|
|
470
471
|
.option("--json", "Output as JSON")
|
|
471
472
|
.action(async (invocationId, options) => {
|
|
472
473
|
try {
|
|
@@ -496,7 +497,7 @@ export function registerMarketplaceCommand(program) {
|
|
|
496
497
|
mp.command("fail-invocation <invocation-id>")
|
|
497
498
|
.description("Fail a V2 invocation")
|
|
498
499
|
.option("-m, --message <msg>", "Error message")
|
|
499
|
-
.option("-d, --duration-ms <n>", "Duration in milliseconds",
|
|
500
|
+
.option("-d, --duration-ms <n>", "Duration in milliseconds", intArg("--duration-ms"))
|
|
500
501
|
.action(async (invocationId, options) => {
|
|
501
502
|
try {
|
|
502
503
|
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
@@ -515,7 +516,7 @@ export function registerMarketplaceCommand(program) {
|
|
|
515
516
|
|
|
516
517
|
mp.command("timeout-invocation <invocation-id>")
|
|
517
518
|
.description("Timeout a V2 invocation")
|
|
518
|
-
.option("-d, --duration-ms <n>", "Duration in milliseconds",
|
|
519
|
+
.option("-d, --duration-ms <n>", "Duration in milliseconds", intArg("--duration-ms"))
|
|
519
520
|
.action(async (invocationId, options) => {
|
|
520
521
|
try {
|
|
521
522
|
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
package/src/commands/matrix.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { numericOption } from "../lib/cli-numeric.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -134,7 +135,7 @@ export function registerMatrixCommand(program) {
|
|
|
134
135
|
ensureMatrixTables(db);
|
|
135
136
|
|
|
136
137
|
const messages = getMessages(roomId, {
|
|
137
|
-
limit:
|
|
138
|
+
limit: numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 50 }),
|
|
138
139
|
});
|
|
139
140
|
if (options.json) {
|
|
140
141
|
console.log(JSON.stringify(messages, null, 2));
|
package/src/commands/memory.js
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
addMemory,
|
|
12
12
|
searchMemory,
|
|
13
13
|
listMemory,
|
|
14
|
+
exportMemory,
|
|
15
|
+
importMemory,
|
|
14
16
|
deleteMemory,
|
|
15
17
|
appendDailyNote,
|
|
16
18
|
getDailyNote,
|
|
@@ -160,6 +162,70 @@ export function registerMemoryCommand(program) {
|
|
|
160
162
|
}
|
|
161
163
|
});
|
|
162
164
|
|
|
165
|
+
// memory export — §8.3 cross-device backup: full dump of memory_entries
|
|
166
|
+
memory
|
|
167
|
+
.command("export")
|
|
168
|
+
.description("Export all memory entries as JSON (module 101 §8.3 backup)")
|
|
169
|
+
.option("--output <file>", "Write JSON array to file (default: stdout)")
|
|
170
|
+
.option("--json", "Output JSON ({ok,count} with --output; array otherwise)")
|
|
171
|
+
.action(async (options) => {
|
|
172
|
+
try {
|
|
173
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
174
|
+
if (!ctx.db) {
|
|
175
|
+
logger.error("Database not available");
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
const entries = exportMemory(ctx.db.getDatabase());
|
|
179
|
+
if (options.output) {
|
|
180
|
+
const fs = await import("fs");
|
|
181
|
+
fs.writeFileSync(options.output, JSON.stringify(entries), "utf-8");
|
|
182
|
+
if (options.json) {
|
|
183
|
+
console.log(JSON.stringify({ ok: true, count: entries.length, output: options.output }));
|
|
184
|
+
} else {
|
|
185
|
+
logger.log(`exported ${entries.length} memory entries → ${options.output}`);
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
console.log(JSON.stringify(entries)); // data command: emit the array
|
|
189
|
+
}
|
|
190
|
+
await shutdown();
|
|
191
|
+
} catch (err) {
|
|
192
|
+
logger.error(`memory export failed: ${err.message}`);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// memory import — §8.3 restore: idempotent upsert by id from a JSON-array file
|
|
198
|
+
memory
|
|
199
|
+
.command("import")
|
|
200
|
+
.description("Import memory entries from a JSON array file (idempotent upsert by id; §8.3)")
|
|
201
|
+
.requiredOption("--input <file>", "JSON array of memory entries to import")
|
|
202
|
+
.option("--json", "Output JSON result")
|
|
203
|
+
.action(async (options) => {
|
|
204
|
+
try {
|
|
205
|
+
const fs = await import("fs");
|
|
206
|
+
const entries = JSON.parse(fs.readFileSync(options.input, "utf-8"));
|
|
207
|
+
if (!Array.isArray(entries)) {
|
|
208
|
+
throw new Error("import: expected a JSON array of memory entries");
|
|
209
|
+
}
|
|
210
|
+
const ctx = await bootstrap({ verbose: program.opts().verbose });
|
|
211
|
+
if (!ctx.db) {
|
|
212
|
+
logger.error("Database not available");
|
|
213
|
+
process.exit(1);
|
|
214
|
+
}
|
|
215
|
+
const result = importMemory(ctx.db.getDatabase(), entries);
|
|
216
|
+
if (options.json) {
|
|
217
|
+
console.log(JSON.stringify(result));
|
|
218
|
+
} else {
|
|
219
|
+
logger.log(`imported ${result.imported}, failed ${result.failed}`);
|
|
220
|
+
}
|
|
221
|
+
await shutdown();
|
|
222
|
+
if (!result.ok) process.exitCode = 1;
|
|
223
|
+
} catch (err) {
|
|
224
|
+
logger.error(`memory import failed: ${err.message}`);
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
163
229
|
// memory add
|
|
164
230
|
memory
|
|
165
231
|
.command("add")
|
package/src/commands/nlprog.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
INTENT,
|
|
@@ -214,7 +215,7 @@ export function registerNlProgCommand(program) {
|
|
|
214
215
|
.description("List translations")
|
|
215
216
|
.option("-i, --intent <intent>", "Filter by intent")
|
|
216
217
|
.option("-s, --status <status>", "Filter by status")
|
|
217
|
-
.option("--limit <n>", "Max results",
|
|
218
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
218
219
|
.option("--json", "JSON output")
|
|
219
220
|
.action((opts) => {
|
|
220
221
|
const db = _requireDb(nlp);
|
|
@@ -289,7 +290,7 @@ export function registerNlProgCommand(program) {
|
|
|
289
290
|
)
|
|
290
291
|
.requiredOption("-p, --pattern <text>", "Pattern description")
|
|
291
292
|
.option("-e, --examples <json>", "Examples JSON")
|
|
292
|
-
.option("-f, --confidence <n>", "Confidence (0-1)",
|
|
293
|
+
.option("-f, --confidence <n>", "Confidence (0-1)", floatArg("--confidence"))
|
|
293
294
|
.option("-s, --source-files <json>", "Source files JSON")
|
|
294
295
|
.option("--json", "JSON output")
|
|
295
296
|
.action((opts) => {
|
|
@@ -326,7 +327,7 @@ export function registerNlProgCommand(program) {
|
|
|
326
327
|
.command("conventions")
|
|
327
328
|
.description("List project conventions")
|
|
328
329
|
.option("-c, --category <cat>", "Filter by category")
|
|
329
|
-
.option("--limit <n>", "Max results",
|
|
330
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
330
331
|
.option("--json", "JSON output")
|
|
331
332
|
.action((opts) => {
|
|
332
333
|
const db = _requireDb(nlp);
|
package/src/commands/nostr.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { numericOption } from "../lib/cli-numeric.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -103,7 +104,7 @@ export function registerNostrCommand(program) {
|
|
|
103
104
|
|
|
104
105
|
const result = publishEvent(
|
|
105
106
|
db,
|
|
106
|
-
|
|
107
|
+
numericOption(options.kind, { name: "--kind", integer: true, min: 0 }),
|
|
107
108
|
content,
|
|
108
109
|
options.pubkey,
|
|
109
110
|
[],
|
|
@@ -140,8 +141,8 @@ export function registerNostrCommand(program) {
|
|
|
140
141
|
const db = ctx.db.getDatabase();
|
|
141
142
|
ensureNostrTables(db);
|
|
142
143
|
|
|
143
|
-
const filter = { limit:
|
|
144
|
-
if (options.kind) filter.kinds = [
|
|
144
|
+
const filter = { limit: numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 50 }) };
|
|
145
|
+
if (options.kind) filter.kinds = [numericOption(options.kind, { name: "--kind", integer: true, min: 0 })];
|
|
145
146
|
const events = getEvents(filter);
|
|
146
147
|
if (options.json) {
|
|
147
148
|
console.log(JSON.stringify(events, null, 2));
|
package/src/commands/note.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { numericOption } from "../lib/cli-numeric.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -151,7 +152,7 @@ export function registerNoteCommand(program) {
|
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
sql += " ORDER BY created_at DESC LIMIT ?";
|
|
154
|
-
params.push(
|
|
155
|
+
params.push(numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 20 }));
|
|
155
156
|
|
|
156
157
|
let notes = rawDb.prepare(sql).all(...params);
|
|
157
158
|
|
package/src/commands/ops.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
SEVERITY,
|
|
@@ -288,7 +289,7 @@ export function registerOpsCommand(program) {
|
|
|
288
289
|
.description("List incidents")
|
|
289
290
|
.option("-s, --severity <P0-P3>", "Filter by severity")
|
|
290
291
|
.option("-S, --status <status>", "Filter by status")
|
|
291
|
-
.option("--limit <n>", "Max results",
|
|
292
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
292
293
|
.option("--json", "JSON output")
|
|
293
294
|
.action((opts) => {
|
|
294
295
|
const db = _dbFromCtx(ops);
|
|
@@ -380,7 +381,7 @@ export function registerOpsCommand(program) {
|
|
|
380
381
|
.description("List playbooks")
|
|
381
382
|
.option("-e, --enabled", "Only enabled")
|
|
382
383
|
.option("-d, --disabled", "Only disabled")
|
|
383
|
-
.option("--limit <n>", "Max results",
|
|
384
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
384
385
|
.option("--json", "JSON output")
|
|
385
386
|
.action((opts) => {
|
|
386
387
|
const db = _dbFromCtx(ops);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { Command } from "commander";
|
|
6
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
MODALITY,
|
|
@@ -131,7 +132,7 @@ export function registerPerceptionCommand(program) {
|
|
|
131
132
|
)
|
|
132
133
|
.option("-i, --input <source>", "Input source (file path or session id)")
|
|
133
134
|
.option("-r, --result <json>", "Result data JSON")
|
|
134
|
-
.option("-c, --confidence <n>", "Confidence score (0-1)",
|
|
135
|
+
.option("-c, --confidence <n>", "Confidence score (0-1)", floatArg("--confidence"))
|
|
135
136
|
.option("--metadata <json>", "Metadata JSON")
|
|
136
137
|
.option("--json", "JSON output")
|
|
137
138
|
.action((opts) => {
|
|
@@ -173,7 +174,7 @@ export function registerPerceptionCommand(program) {
|
|
|
173
174
|
.description("List perception results")
|
|
174
175
|
.option("-m, --modality <type>", "Filter by modality")
|
|
175
176
|
.option("-a, --analysis <type>", "Filter by analysis type")
|
|
176
|
-
.option("--limit <n>", "Max results",
|
|
177
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
177
178
|
.option("--json", "JSON output")
|
|
178
179
|
.action((opts) => {
|
|
179
180
|
const db = _dbFromCtx(perc);
|
|
@@ -262,7 +263,7 @@ export function registerPerceptionCommand(program) {
|
|
|
262
263
|
.description("List voice sessions")
|
|
263
264
|
.option("-s, --status <status>", "Filter by status")
|
|
264
265
|
.option("-l, --language <lang>", "Filter by language")
|
|
265
|
-
.option("--limit <n>", "Max results",
|
|
266
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
266
267
|
.option("--json", "JSON output")
|
|
267
268
|
.action((opts) => {
|
|
268
269
|
const db = _dbFromCtx(perc);
|
|
@@ -329,7 +330,7 @@ export function registerPerceptionCommand(program) {
|
|
|
329
330
|
.command("index-list")
|
|
330
331
|
.description("List index entries")
|
|
331
332
|
.option("-m, --modality <type>", "Filter by modality")
|
|
332
|
-
.option("--limit <n>", "Max results",
|
|
333
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
333
334
|
.option("--json", "JSON output")
|
|
334
335
|
.action((opts) => {
|
|
335
336
|
const db = _dbFromCtx(perc);
|
|
@@ -365,7 +366,7 @@ export function registerPerceptionCommand(program) {
|
|
|
365
366
|
.command("query <text>")
|
|
366
367
|
.description("Cross-modal search across index entries")
|
|
367
368
|
.option("-m, --modalities <csv>", "Filter modalities (comma-separated)")
|
|
368
|
-
.option("--limit <n>", "Max results",
|
|
369
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
369
370
|
.option("--json", "JSON output")
|
|
370
371
|
.action((text, opts) => {
|
|
371
372
|
const db = _dbFromCtx(perc);
|