chainlesschain 0.162.100 → 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 +2 -2
- package/src/assets/web-panel/assets/{AIOps-C4AUvxsD.js → AIOps-C1k00Gsz.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-CQx5g40U.js → ActionButton-BinI6ZDq.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-Cj8kniQB.js → Analytics-Cg0jo_cd.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-uksktrtP.js → AppLayout-CClMs_AA.js} +4 -4
- package/src/assets/web-panel/assets/{Audit-Ddw1D-Sa.js → Audit-BtQgvFdM.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-FY6UxY3D.js → Backup-43FRi7ZI.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-Dyy3sgKP.js → BaseInput-Cfza-FZU.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-tiAnsEKt.js → Chat-7AjHSiSC.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-DdrOqOOC.js → ChatBubbleRenderer-Bh1YNdtx.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-BNcfTk-N.js → Checkbox-DgjfqlWW.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-pRCacnwB.js → Codegen-CkwOBThj.js} +1 -1
- package/src/assets/web-panel/assets/{Col-B6YlZPJZ.js → Col-Cohk5WYM.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CVxyOMmk.js → Community-D3LMGh3F.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DUcI72Cz.js → Compact-DqoMJmh0.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-Jwoo1gAe.js → Compliance-BVjWZlEj.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-Dy4KE7GI.js → Cowork-C0lqQPqu.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-CuK2QRSM.js → Cron-DHd_PJZS.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-CLVhl9qA.js → Crosschain-BphK2Q9u.js} +1 -1
- package/src/assets/web-panel/assets/{DID-CbbeulSb.js → DID-CWIw0aG4.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-B5mZKvMY.js → Dashboard-CKgDU9U6.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-R_QKvEks.js → Dropdown-DkIlDUXF.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-MLN19CuX.js → EmailListRenderer-5sXA9hwZ.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-Da6P7Opx.js → FamilyGuardDashboard-CgcdJLH7.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DSIDBZjI.js → Federation-DPOcJISA.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-Tg9XUdYt.js → FormItemContext-DxOutBMJ.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-D6BoiR4f.js → GenericCardRenderer-BYVNtkcd.js} +1 -1
- package/src/assets/web-panel/assets/{Git-BwKxt-az.js → Git-B37LKxOu.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CZ6acDLS.js → Governance-CnKcx5un.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-FpwqxLVZ.js → Inference-CbRAWN3_.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-BptTOYDC.js → KnowledgeGraph-D0w6RfE_.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-BqqAJttN.js → Logs-DxBDKpzq.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-BBWAUKbG.js → Marketplace-DNLi6O_3.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-B3SbHbb2.js → McpTools-s0sBCPXw.js} +4 -4
- package/src/assets/web-panel/assets/{Memory-B2TeOSG3.js → Memory-BdSEgpmP.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-Cc23XCoy.js → MobileBridge-Dz7nz4K9.js} +2 -2
- package/src/assets/web-panel/assets/{MobileProjects-BNVM6ZVt.js → MobileProjects-DakdA2PC.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-BpCkBS7F.js → Mtc-Be9OBypk.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-CVGrJf70.js → MtcAudit-KI2ih4Tl.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-CDjGMJeY.js → Multisig-Cg3jHFjL.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-CzQV0HBf.js → NLProgramming-BepHx8fU.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-opsvQMjX.js → Notes-2f05HyqN.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-YcsTplJb.js → NotificationSettings-Blwio_G5.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-D5nRE_x6.js → OrderTableRenderer-D7HJfvo_.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-WjorRlbN.js → Organization-Uihlz1cI.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-Bp5-oTQ9.js → Overflow-gZx8kADL.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-OkFf348U.js → P2P-DqEEGqba.js} +2 -2
- package/src/assets/web-panel/assets/PdhVaultBrowser-BHUi1nb5.js +7 -0
- package/src/assets/web-panel/assets/{Permissions-cKThyS90.js → Permissions-ERF2ZQ3G.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-_GrM7ozt.js → PersonalDataHub-CzDy9CFB.js} +2 -2
- package/src/assets/web-panel/assets/{Pipeline-CkY3lGDl.js → Pipeline-Dy4x9Ejw.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-CnS_dd_g.js → Privacy-C6UJys52.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CUcPk9vr.js → ProjectInit-Bmi027fa.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-i2i7Ykz7.js → ProjectSettings-NinSZmGA.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-DB8eQuaI.js → Projects-DeW-p-hT.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-C_c6uhkR.js → Providers-4hxrBTLo.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-CzGlGrW2.js → QuickAsk-B5inZlW8.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BgubzHgA.js → Recommend-7lpBm00-.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-CJm5qyVb.js → Reputation-QfdGZxYO.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DTo8pzXo.js → Row-DqHC7BCT.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-D9dBFFbB.js → RssFeed-B3F1aGP6.js} +3 -3
- package/src/assets/web-panel/assets/{Search-CdtKcva0.js → Search-BXtjuoYO.js} +1 -1
- package/src/assets/web-panel/assets/{Security-I_w7dCJB.js → Security-Iy0MOV-A.js} +4 -4
- package/src/assets/web-panel/assets/{Services-BNkH7gB_.js → Services-C_puMp_6.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CmjuiQ-X.js → Skeleton-Bg6mTVZU.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-DwWRjcC9.js → Skills-D4wXhanR.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-reA2nX1r.js → Sla-Cgr2B9R6.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-29sZleYf.js → SpeechSettings-ctYqZEY5.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-DpREiryw.js → SyncSettings-C3qWh9y4.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-DSFhXmqt.js → Tasks-D3AAgUx1.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-ocxFfRbU.js → Templates-Bm_Dyz8T.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-CB8ceTRF.js → Tenant-DOSrOw9X.js} +1 -1
- package/src/assets/web-panel/assets/Terminal-DrG0bEOS.js +3 -0
- package/src/assets/web-panel/assets/{TimelineRenderer-5gi8YyK8.js → TimelineRenderer-BB8Qq6Cx.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-5ei6T7Fr.js → Tokens-DqyF_Flh.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-CCCK4AdU.js → Trigger-ClwQC2hP.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-u_Ai2JnF.js → Trust-DGQSLPQ0.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-DOYAKABP.js → UkeySign-BAkeYsUO.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-BCijqxrL.js → VideoEditing-WyUxS65Y.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-B3DYN-Zc.js → Wallet-Br7GdjEg.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-DtUm68s2.js → WebAuthn-bKs1dahj.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-DLeKMTsN.js → WorkflowEditor-CVqAALYe.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CQaZBF2-.js → chat-BDGDRbab.js} +1 -1
- package/src/assets/web-panel/assets/{colors-FgoJ2BwA.js → colors-DIUxZwT8.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-eO7813ss.js → compact-item-C2iM4GmN.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-Dmmz4MHV.js → createContext-D27NeHwO.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-Daz0PHhS.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-Dsqq2vZS.js → hasIn-D1lXdsFj.js} +1 -1
- package/src/assets/web-panel/assets/{index-iQRQbgks.js → index-B5ZB5lsV.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdQeoRb5.js → index-B6kc4-nD.js} +1 -1
- package/src/assets/web-panel/assets/{index-BPTR7Mec.js → index-B8POWlbO.js} +1 -1
- package/src/assets/web-panel/assets/{index-amwzyKGM.js → index-BE9bNvdn.js} +1 -1
- package/src/assets/web-panel/assets/{index-PQCrkiem.js → index-BIVYPlpl.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bc9ttIaX.js → index-BTUFhfHs.js} +1 -1
- package/src/assets/web-panel/assets/{index-DXoO_gOa.js → index-BTedVe_v.js} +1 -1
- package/src/assets/web-panel/assets/{index-CzmnOjxM.js → index-Bi8u5GsP.js} +1 -1
- package/src/assets/web-panel/assets/{index-D5R74AU3.js → index-Bil9t91t.js} +1 -1
- package/src/assets/web-panel/assets/{index-ZGiG2FFd.js → index-BqbjsJcS.js} +1 -1
- package/src/assets/web-panel/assets/{index-uVTBfxr4.js → index-CAnMUhHO.js} +1 -1
- package/src/assets/web-panel/assets/{index-D9EiKGCp.js → index-CDzSUTpa.js} +1 -1
- package/src/assets/web-panel/assets/{index-tvGjyRJX.js → index-CEO9vhv7.js} +3 -3
- package/src/assets/web-panel/assets/{index-FxdLXcjM.js → index-CFEwtE3q.js} +1 -1
- package/src/assets/web-panel/assets/{index-zfGbhmH7.js → index-CFY1KjB1.js} +1 -1
- package/src/assets/web-panel/assets/{index-BNoEuwKO.js → index-CKMDgjfh.js} +1 -1
- package/src/assets/web-panel/assets/{index-DHiXX4Vs.js → index-CNk98bb1.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGivPnGs.js → index-Ca8n97h9.js} +1 -1
- package/src/assets/web-panel/assets/{index-FmwguCzK.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-CjH-1YTY.js → index-Cbqr8kW6.js} +1 -1
- package/src/assets/web-panel/assets/{index-DqmgVJGi.js → index-CfR3Pvsu.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ds1EXfXm.js → index-Cgf3zMwq.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dt5foqaR.js → index-CiA-L5ld.js} +1 -1
- package/src/assets/web-panel/assets/{index-DhJPhaFo.js → index-CoygRreE.js} +1 -1
- package/src/assets/web-panel/assets/{index-BNRSfhkU.js → index-CsIw-YQF.js} +1 -1
- package/src/assets/web-panel/assets/{index-DYX4azu5.js → index-DFhdJm7M.js} +1 -1
- package/src/assets/web-panel/assets/{index-BOmxCZDa.js → index-DK0jgmJg.js} +1 -1
- package/src/assets/web-panel/assets/{index-CWKCFa8f.js → index-Dc4k4V1u.js} +1 -1
- package/src/assets/web-panel/assets/{index-laG9PnzA.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-CoCyHNT3.js → index-DkOu8er7.js} +1 -1
- package/src/assets/web-panel/assets/{index-BbY4e6os.js → index-DnCVI295.js} +1 -1
- package/src/assets/web-panel/assets/{index-D0wmbnlR.js → index-Do13fQ5W.js} +1 -1
- package/src/assets/web-panel/assets/{index-RbLIx9Bf.js → index-DrS-Mrm-.js} +1 -1
- package/src/assets/web-panel/assets/{index-DAsxek9K.js → index-ET5LYk9B.js} +1 -1
- package/src/assets/web-panel/assets/{index-0QR3T83p.js → index-HZGu1woY.js} +1 -1
- package/src/assets/web-panel/assets/{index-3j2RiDPG.js → index-Y1rkRas5.js} +1 -1
- package/src/assets/web-panel/assets/{index-G_MQzt5R.js → index-yIM-KxVm.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-C3uZWt9M.js → initDefaultProps-C0Yrc6yY.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Br29X6q6.js → motion-DnOI85ek.js} +1 -1
- package/src/assets/web-panel/assets/{move-B2uHAfsg.js → move-DT9zQPZp.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DY4JQnIP.js → omit-DFtDi5Wd.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-DUANwwrT.js → pickAttrs-Cobkb_rd.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-ClrBK_Je.js → placementArrow-DWQDu4i-.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-FzBdoJrD.js → responsiveObserve-daoQcWcX.js} +1 -1
- package/src/assets/web-panel/assets/{slide-Bn6of40H.js → slide-BLkzd2OV.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-By0_n-TE.js → statusUtils-Uyxi81M0.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-Rj-gDlgS.js → styleChecker-Dtw5lUcs.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-mAGJOuoi.js → useFlexGapSupport-_JpMgpdt.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-CUheuma1.js → useFs-huwAlPD-.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DRIdZ3Xz.js → usePersonalDataHub-7cafj8_f.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-0B469T9A.js → vnode-DYUSfRt7.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-yAup1syc.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/hub.js +107 -0
- 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/PdhVaultBrowser-ue3TxFAw.js +0 -7
- package/src/assets/web-panel/assets/Terminal-Zx-Q7Yq2.js +0 -3
- package/src/assets/web-panel/assets/devWarning-UPy4WDBL.js +0 -1
- package/src/assets/web-panel/assets/index-B3QyuL3m.js +0 -1
- package/src/assets/web-panel/assets/index-CCeQm4U9.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
|
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);
|
package/src/commands/privacy.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
|
FL_STATUS,
|
|
@@ -117,9 +118,9 @@ export function registerPrivacyCommand(program) {
|
|
|
117
118
|
.description("Create federated learning model")
|
|
118
119
|
.option("-t, --type <type>", "Model type", "neural_network")
|
|
119
120
|
.option("-a, --arch <architecture>", "Architecture", "mlp")
|
|
120
|
-
.option("-r, --rounds <n>", "Total training rounds",
|
|
121
|
-
.option("-l, --lr <rate>", "Learning rate",
|
|
122
|
-
.option("-p, --participants <n>", "Participant count",
|
|
121
|
+
.option("-r, --rounds <n>", "Total training rounds", intArg("--rounds"))
|
|
122
|
+
.option("-l, --lr <rate>", "Learning rate", floatArg("--lr"))
|
|
123
|
+
.option("-p, --participants <n>", "Participant count", intArg("--participants"))
|
|
123
124
|
.option("--json", "JSON output")
|
|
124
125
|
.action((name, opts) => {
|
|
125
126
|
const db = _dbFromCtx(pc);
|
|
@@ -183,7 +184,7 @@ export function registerPrivacyCommand(program) {
|
|
|
183
184
|
pc.command("models")
|
|
184
185
|
.description("List federated learning models")
|
|
185
186
|
.option("-s, --status <status>", "Filter by status")
|
|
186
|
-
.option("--limit <n>", "Max results",
|
|
187
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
187
188
|
.option("--json", "JSON output")
|
|
188
189
|
.action((opts) => {
|
|
189
190
|
const db = _dbFromCtx(pc);
|
|
@@ -206,7 +207,7 @@ export function registerPrivacyCommand(program) {
|
|
|
206
207
|
.description("Create MPC computation")
|
|
207
208
|
.option("-p, --protocol <proto>", "Protocol (shamir/beaver/gmw)", "shamir")
|
|
208
209
|
.option("-i, --participants <ids>", "Comma-separated participant IDs")
|
|
209
|
-
.option("-t, --threshold <n>", "Shares required",
|
|
210
|
+
.option("-t, --threshold <n>", "Shares required", intArg("--threshold"))
|
|
210
211
|
.option("--json", "JSON output")
|
|
211
212
|
.action((type, opts) => {
|
|
212
213
|
const db = _dbFromCtx(pc);
|
|
@@ -258,7 +259,7 @@ export function registerPrivacyCommand(program) {
|
|
|
258
259
|
.description("List MPC computations")
|
|
259
260
|
.option("-p, --protocol <proto>", "Filter by protocol")
|
|
260
261
|
.option("-s, --status <status>", "Filter by status")
|
|
261
|
-
.option("--limit <n>", "Max results",
|
|
262
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
262
263
|
.option("--json", "JSON output")
|
|
263
264
|
.action((opts) => {
|
|
264
265
|
const db = _dbFromCtx(pc);
|
|
@@ -281,13 +282,13 @@ export function registerPrivacyCommand(program) {
|
|
|
281
282
|
pc.command("dp-publish")
|
|
282
283
|
.description("Publish data with differential privacy noise")
|
|
283
284
|
.option("-d, --data <json>", "Data (number or JSON array)")
|
|
284
|
-
.option("-e, --epsilon <n>", "Privacy parameter epsilon",
|
|
285
|
-
.option("--delta <n>", "Privacy parameter delta",
|
|
285
|
+
.option("-e, --epsilon <n>", "Privacy parameter epsilon", floatArg("--epsilon"))
|
|
286
|
+
.option("--delta <n>", "Privacy parameter delta", floatArg("--delta"))
|
|
286
287
|
.option(
|
|
287
288
|
"-m, --mechanism <type>",
|
|
288
289
|
"Noise mechanism (laplace/gaussian/exponential)",
|
|
289
290
|
)
|
|
290
|
-
.option("-s, --sensitivity <n>", "Sensitivity",
|
|
291
|
+
.option("-s, --sensitivity <n>", "Sensitivity", floatArg("--sensitivity"))
|
|
291
292
|
.option("--json", "JSON output")
|
|
292
293
|
.action((opts) => {
|
|
293
294
|
const db = _dbFromCtx(pc);
|
|
@@ -598,10 +599,10 @@ export function registerPrivacyCommand(program) {
|
|
|
598
599
|
pc.command("dp-publish-v2")
|
|
599
600
|
.description("V2 DP publish (throws on invalid input / exceeded budget)")
|
|
600
601
|
.requiredOption("-d, --data <n>", "Data value", Number)
|
|
601
|
-
.option("-e, --epsilon <n>", "Epsilon",
|
|
602
|
-
.option("--delta <n>", "Delta",
|
|
602
|
+
.option("-e, --epsilon <n>", "Epsilon", floatArg("--epsilon"))
|
|
603
|
+
.option("--delta <n>", "Delta", floatArg("--delta"))
|
|
603
604
|
.option("-m, --mechanism <mech>", "Mechanism")
|
|
604
|
-
.option("-s, --sensitivity <n>", "Sensitivity",
|
|
605
|
+
.option("-s, --sensitivity <n>", "Sensitivity", floatArg("--sensitivity"))
|
|
605
606
|
.option("--json", "JSON output")
|
|
606
607
|
.action((opts) => {
|
|
607
608
|
const db = _dbFromCtx(pc);
|
|
@@ -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
|
JOB_STATUS,
|
|
@@ -190,7 +191,7 @@ export function registerQuantizationCommand(program) {
|
|
|
190
191
|
.command("complete <id>")
|
|
191
192
|
.description("Mark a running job as completed")
|
|
192
193
|
.option("-o, --output <path>", "Output file path")
|
|
193
|
-
.option("-s, --size <bytes>", "Output file size in bytes",
|
|
194
|
+
.option("-s, --size <bytes>", "Output file size in bytes", intArg("--size"))
|
|
194
195
|
.option("--json", "JSON output")
|
|
195
196
|
.action((id, opts) => {
|
|
196
197
|
const db = _dbFromCtx(quant);
|
|
@@ -271,7 +272,7 @@ export function registerQuantizationCommand(program) {
|
|
|
271
272
|
.description("List quantization jobs")
|
|
272
273
|
.option("-s, --status <status>", "Filter by status")
|
|
273
274
|
.option("-t, --type <type>", "Filter by quant type (gguf/gptq)")
|
|
274
|
-
.option("--limit <n>", "Max results",
|
|
275
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
275
276
|
.option("--json", "JSON output")
|
|
276
277
|
.action((opts) => {
|
|
277
278
|
const db = _dbFromCtx(quant);
|
|
@@ -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
|
CONTENT_TYPES,
|
|
@@ -154,7 +155,7 @@ export function registerRecommendCommand(program) {
|
|
|
154
155
|
.description("Update interest profile")
|
|
155
156
|
.option("-t, --topics <json>", "Topic weights JSON")
|
|
156
157
|
.option("-w, --weights <json>", "Interaction weights JSON")
|
|
157
|
-
.option("-d, --decay <factor>", "Decay factor",
|
|
158
|
+
.option("-d, --decay <factor>", "Decay factor", floatArg("--decay"))
|
|
158
159
|
.option("--json", "JSON output")
|
|
159
160
|
.action((userId, opts) => {
|
|
160
161
|
const db = _dbFromCtx(rec);
|
|
@@ -186,7 +187,7 @@ export function registerRecommendCommand(program) {
|
|
|
186
187
|
rec
|
|
187
188
|
.command("profiles")
|
|
188
189
|
.description("List all interest profiles")
|
|
189
|
-
.option("--limit <n>", "Max results",
|
|
190
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
190
191
|
.option("--json", "JSON output")
|
|
191
192
|
.action((opts) => {
|
|
192
193
|
const db = _dbFromCtx(rec);
|
|
@@ -222,8 +223,8 @@ export function registerRecommendCommand(program) {
|
|
|
222
223
|
"Generate recommendations from content pool (JSON stdin or --pool)",
|
|
223
224
|
)
|
|
224
225
|
.option("-p, --pool <json>", "Content pool as JSON array")
|
|
225
|
-
.option("-l, --limit <n>", "Max recommendations",
|
|
226
|
-
.option("-m, --min-score <n>", "Minimum score",
|
|
226
|
+
.option("-l, --limit <n>", "Max recommendations", intArg("--limit"))
|
|
227
|
+
.option("-m, --min-score <n>", "Minimum score", floatArg("--min-score"))
|
|
227
228
|
.option("--json", "JSON output")
|
|
228
229
|
.action((userId, opts) => {
|
|
229
230
|
const db = _dbFromCtx(rec);
|
|
@@ -266,8 +267,8 @@ export function registerRecommendCommand(program) {
|
|
|
266
267
|
.description("List recommendations for a user")
|
|
267
268
|
.option("-s, --status <status>", "Filter by status")
|
|
268
269
|
.option("-t, --type <type>", "Filter by content type")
|
|
269
|
-
.option("-m, --min-score <n>", "Minimum score",
|
|
270
|
-
.option("--limit <n>", "Max results",
|
|
270
|
+
.option("-m, --min-score <n>", "Minimum score", floatArg("--min-score"))
|
|
271
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
271
272
|
.option("--json", "JSON output")
|
|
272
273
|
.action((userId, opts) => {
|
|
273
274
|
const db = _dbFromCtx(rec);
|
|
@@ -347,7 +348,7 @@ export function registerRecommendCommand(program) {
|
|
|
347
348
|
rec
|
|
348
349
|
.command("top-interests <user-id>")
|
|
349
350
|
.description("Show top interests from profile")
|
|
350
|
-
.option("--limit <n>", "Max results",
|
|
351
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
351
352
|
.option("--json", "JSON output")
|
|
352
353
|
.action((userId, opts) => {
|
|
353
354
|
const db = _dbFromCtx(rec);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -95,8 +96,8 @@ export function registerReputationCommand(program) {
|
|
|
95
96
|
"Decay model (none|exponential|linear|step)",
|
|
96
97
|
"none",
|
|
97
98
|
)
|
|
98
|
-
.option("--lambda <n>", "Exponential decay lambda",
|
|
99
|
-
.option("--alpha <n>", "Linear decay alpha",
|
|
99
|
+
.option("--lambda <n>", "Exponential decay lambda", floatArg("--lambda"))
|
|
100
|
+
.option("--alpha <n>", "Linear decay alpha", floatArg("--alpha"))
|
|
100
101
|
.option("--json", "Output as JSON")
|
|
101
102
|
.action(async (did, options) => {
|
|
102
103
|
try {
|
|
@@ -164,7 +165,7 @@ export function registerReputationCommand(program) {
|
|
|
164
165
|
"Detection method (z_score|iqr)",
|
|
165
166
|
"z_score",
|
|
166
167
|
)
|
|
167
|
-
.option("-t, --threshold <n>", "Detection threshold",
|
|
168
|
+
.option("-t, --threshold <n>", "Detection threshold", floatArg("--threshold"))
|
|
168
169
|
.option(
|
|
169
170
|
"-d, --decay <model>",
|
|
170
171
|
"Decay model applied before detection",
|
package/src/commands/runtime.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Command } from "commander";
|
|
9
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
PLUGIN_STATUS,
|
|
@@ -222,7 +223,7 @@ export function registerRuntimeCommand(program) {
|
|
|
222
223
|
.command("plugins")
|
|
223
224
|
.description("List plugins")
|
|
224
225
|
.option("-s, --status <status>", "Filter by status")
|
|
225
|
-
.option("--limit <n>", "Max results",
|
|
226
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
226
227
|
.option("--json", "JSON output")
|
|
227
228
|
.action((opts) => {
|
|
228
229
|
const db = _dbFromCtx(runtime);
|
|
@@ -282,7 +283,7 @@ export function registerRuntimeCommand(program) {
|
|
|
282
283
|
.command("updates")
|
|
283
284
|
.description("List updates")
|
|
284
285
|
.option("-p, --plugin <id>", "Filter by plugin id")
|
|
285
|
-
.option("--limit <n>", "Max results",
|
|
286
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
286
287
|
.option("--json", "JSON output")
|
|
287
288
|
.action((opts) => {
|
|
288
289
|
const db = _dbFromCtx(runtime);
|
|
@@ -305,7 +306,7 @@ export function registerRuntimeCommand(program) {
|
|
|
305
306
|
.command("profile")
|
|
306
307
|
.description("Take a runtime profile sample")
|
|
307
308
|
.option("-t, --type <type>", "Profile type (cpu/memory/flamegraph)", "cpu")
|
|
308
|
-
.option("-d, --duration <ms>", "Duration in ms",
|
|
309
|
+
.option("-d, --duration <ms>", "Duration in ms", intArg("--duration"))
|
|
309
310
|
.option("--json", "JSON output")
|
|
310
311
|
.action((opts) => {
|
|
311
312
|
const db = _dbFromCtx(runtime);
|
|
@@ -344,7 +345,7 @@ export function registerRuntimeCommand(program) {
|
|
|
344
345
|
.command("profiles")
|
|
345
346
|
.description("List profiles")
|
|
346
347
|
.option("-t, --type <type>", "Filter by profile type")
|
|
347
|
-
.option("--limit <n>", "Max results",
|
|
348
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
348
349
|
.option("--json", "JSON output")
|
|
349
350
|
.action((opts) => {
|
|
350
351
|
const db = _dbFromCtx(runtime);
|
|
@@ -391,7 +392,7 @@ export function registerRuntimeCommand(program) {
|
|
|
391
392
|
runtime
|
|
392
393
|
.command("state-list")
|
|
393
394
|
.description("List synced state keys")
|
|
394
|
-
.option("--limit <n>", "Max results",
|
|
395
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
395
396
|
.option("--json", "JSON output")
|
|
396
397
|
.action((opts) => {
|
|
397
398
|
const db = _dbFromCtx(runtime);
|
package/src/commands/sandbox.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
7
8
|
import ora from "ora";
|
|
8
9
|
import { logger } from "../lib/logger.js";
|
|
9
10
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
@@ -252,7 +253,7 @@ export function registerSandboxCommand(program) {
|
|
|
252
253
|
.description("Show audit log for sandboxes")
|
|
253
254
|
.argument("[sandbox-id]", "Optional sandbox ID to filter")
|
|
254
255
|
.option("--action <name>", "Filter by action type")
|
|
255
|
-
.option("--limit <n>", "Limit entries",
|
|
256
|
+
.option("--limit <n>", "Limit entries", intArg("--limit"))
|
|
256
257
|
.option("--json", "Output as JSON")
|
|
257
258
|
.action(async (sandboxId, options) => {
|
|
258
259
|
try {
|
|
@@ -293,8 +294,8 @@ export function registerSandboxCommand(program) {
|
|
|
293
294
|
.command("quota")
|
|
294
295
|
.description("Show or set sandbox quota")
|
|
295
296
|
.argument("<sandbox-id>", "Sandbox ID")
|
|
296
|
-
.option("--cpu <n>", "Set CPU quota",
|
|
297
|
-
.option("--memory <n>", "Set memory quota in MB",
|
|
297
|
+
.option("--cpu <n>", "Set CPU quota", intArg("--cpu"))
|
|
298
|
+
.option("--memory <n>", "Set memory quota in MB", intArg("--memory"))
|
|
298
299
|
.option("--json", "Output as JSON")
|
|
299
300
|
.action(async (sandboxId, options) => {
|
|
300
301
|
try {
|
|
@@ -780,7 +781,7 @@ export function registerSandboxCommand(program) {
|
|
|
780
781
|
.option("-e, --events <types>", "Comma-separated event types")
|
|
781
782
|
.option("--from <iso>", "ISO timestamp lower bound")
|
|
782
783
|
.option("--to <iso>", "ISO timestamp upper bound")
|
|
783
|
-
.option("-l, --limit <n>", "Max entries to return",
|
|
784
|
+
.option("-l, --limit <n>", "Max entries to return", intArg("--limit"))
|
|
784
785
|
.option("--json", "Output as JSON")
|
|
785
786
|
.action(async (id, options) => {
|
|
786
787
|
try {
|
package/src/commands/session.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import fs from "fs";
|
|
7
|
+
import { numericOption } from "../lib/cli-numeric.js";
|
|
7
8
|
import path from "path";
|
|
8
9
|
import chalk from "chalk";
|
|
9
10
|
import { logger } from "../lib/logger.js";
|
|
@@ -187,7 +188,7 @@ export function registerSessionCommand(program) {
|
|
|
187
188
|
|
|
188
189
|
let messages = sess.messages;
|
|
189
190
|
if (options.limit) {
|
|
190
|
-
messages = messages.slice(-
|
|
191
|
+
messages = messages.slice(-numericOption(options.limit, { name: "--limit", integer: true, min: 1 }));
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
for (const msg of messages) {
|
package/src/commands/sla.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -80,7 +81,7 @@ export function registerSlaCommand(program) {
|
|
|
80
81
|
.command("create <org-id>")
|
|
81
82
|
.description("Create a new SLA contract")
|
|
82
83
|
.option("-t, --tier <tier>", "SLA tier (gold|silver|bronze)", "silver")
|
|
83
|
-
.option("-d, --duration <ms>", "Contract duration in ms",
|
|
84
|
+
.option("-d, --duration <ms>", "Contract duration in ms", intArg("--duration"))
|
|
84
85
|
.option("-f, --fee <amount>", "Monthly fee", parseFloat, 0)
|
|
85
86
|
.option("--json", "Output as JSON")
|
|
86
87
|
.action(async (orgId, options) => {
|
|
@@ -336,8 +337,8 @@ export function registerSlaCommand(program) {
|
|
|
336
337
|
sla
|
|
337
338
|
.command("report <sla-id>")
|
|
338
339
|
.description("Generate an SLA compliance report")
|
|
339
|
-
.option("--start <ms>", "Start of window (ms since epoch)",
|
|
340
|
-
.option("--end <ms>", "End of window (ms since epoch)",
|
|
340
|
+
.option("--start <ms>", "Start of window (ms since epoch)", intArg("--start"))
|
|
341
|
+
.option("--end <ms>", "End of window (ms since epoch)", intArg("--end"))
|
|
341
342
|
.option("--json", "Output as JSON")
|
|
342
343
|
.action(async (slaId, options) => {
|
|
343
344
|
try {
|
|
@@ -460,8 +461,8 @@ export function registerSlaCommand(program) {
|
|
|
460
461
|
.command("create-v2 <org-id>")
|
|
461
462
|
.description("Create a V2 SLA contract (enforces per-org active cap)")
|
|
462
463
|
.option("-t, --tier <tier>", "gold|silver|bronze", "silver")
|
|
463
|
-
.option("-d, --duration <ms>", "Contract duration in ms",
|
|
464
|
-
.option("-f, --fee <amount>", "Monthly fee",
|
|
464
|
+
.option("-d, --duration <ms>", "Contract duration in ms", intArg("--duration"))
|
|
465
|
+
.option("-f, --fee <amount>", "Monthly fee", floatArg("--fee"))
|
|
465
466
|
.option("--json", "Output as JSON")
|
|
466
467
|
.action(async (orgId, options) => {
|
|
467
468
|
try {
|
package/src/commands/social.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 { parseJsonOption } from "../lib/parse-json-option.js";
|
|
9
10
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
@@ -475,7 +476,7 @@ export function registerSocialCommand(program) {
|
|
|
475
476
|
ensureSocialTables(db);
|
|
476
477
|
|
|
477
478
|
const messages = getChatMessages(threadId, {
|
|
478
|
-
limit:
|
|
479
|
+
limit: numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 50 }),
|
|
479
480
|
});
|
|
480
481
|
if (options.json) {
|
|
481
482
|
console.log(JSON.stringify(messages, null, 2));
|
|
@@ -966,10 +967,10 @@ export function registerSocialCommand(program) {
|
|
|
966
967
|
directed: !!options.directed,
|
|
967
968
|
edgeTypes: _splitEdgeTypes(options.edgeTypes),
|
|
968
969
|
weights: {
|
|
969
|
-
degree:
|
|
970
|
-
closeness:
|
|
971
|
-
betweenness:
|
|
972
|
-
eigenvector:
|
|
970
|
+
degree: numericOption(options.wDegree, { name: "--w-degree", fallback: 0.25 }),
|
|
971
|
+
closeness: numericOption(options.wCloseness, { name: "--w-closeness", fallback: 0.25 }),
|
|
972
|
+
betweenness: numericOption(options.wBetweenness, { name: "--w-betweenness", fallback: 0.25 }),
|
|
973
|
+
eigenvector: numericOption(options.wEigenvector, { name: "--w-eigenvector", fallback: 0.25 }),
|
|
973
974
|
},
|
|
974
975
|
});
|
|
975
976
|
if (options.json) console.log(JSON.stringify(scores, null, 2));
|
package/src/commands/stress.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
7
8
|
import { logger } from "../lib/logger.js";
|
|
8
9
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
9
10
|
import {
|
|
@@ -58,9 +59,9 @@ export function registerStressCommand(program) {
|
|
|
58
59
|
"Load level (light|medium|heavy|extreme)",
|
|
59
60
|
"medium",
|
|
60
61
|
)
|
|
61
|
-
.option("-c, --concurrency <n>", "Override concurrency",
|
|
62
|
-
.option("-r, --rps <n>", "Override requests per second",
|
|
63
|
-
.option("-d, --duration <ms>", "Override duration in ms",
|
|
62
|
+
.option("-c, --concurrency <n>", "Override concurrency", intArg("--concurrency"))
|
|
63
|
+
.option("-r, --rps <n>", "Override requests per second", intArg("--rps"))
|
|
64
|
+
.option("-d, --duration <ms>", "Override duration in ms", intArg("--duration"))
|
|
64
65
|
.option("--json", "Output as JSON")
|
|
65
66
|
.action(async (options) => {
|
|
66
67
|
try {
|
|
@@ -354,9 +355,9 @@ export function registerStressCommand(program) {
|
|
|
354
355
|
"Load level (light|medium|heavy|extreme)",
|
|
355
356
|
"medium",
|
|
356
357
|
)
|
|
357
|
-
.option("-c, --concurrency <n>", "Override concurrency",
|
|
358
|
-
.option("-r, --rps <n>", "Override requests per second",
|
|
359
|
-
.option("-d, --duration <ms>", "Override duration in ms",
|
|
358
|
+
.option("-c, --concurrency <n>", "Override concurrency", intArg("--concurrency"))
|
|
359
|
+
.option("-r, --rps <n>", "Override requests per second", intArg("--rps"))
|
|
360
|
+
.option("-d, --duration <ms>", "Override duration in ms", intArg("--duration"))
|
|
360
361
|
.option("--json", "Output as JSON")
|
|
361
362
|
.action(async (options) => {
|
|
362
363
|
try {
|
package/src/commands/sync.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 { parseJsonOption } from "../lib/parse-json-option.js";
|
|
9
10
|
import { bootstrap, shutdown } from "../runtime/bootstrap.js";
|
|
@@ -220,7 +221,7 @@ export function registerSyncCommand(program) {
|
|
|
220
221
|
process.exit(1);
|
|
221
222
|
}
|
|
222
223
|
const db = ctx.db.getDatabase();
|
|
223
|
-
const entries = getSyncLog(db, { limit:
|
|
224
|
+
const entries = getSyncLog(db, { limit: numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 20 }) });
|
|
224
225
|
|
|
225
226
|
if (options.json) {
|
|
226
227
|
console.log(JSON.stringify(entries, null, 2));
|
package/src/commands/tenant.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import fs from "fs";
|
|
9
|
+
import { intArg, floatArg } from "../lib/cli-arg.js";
|
|
9
10
|
import chalk from "chalk";
|
|
10
11
|
import { logger } from "../lib/logger.js";
|
|
11
12
|
import { parseJsonOption } from "../lib/parse-json-option.js";
|
|
@@ -380,8 +381,8 @@ export function registerTenantCommand(program) {
|
|
|
380
381
|
.command("subscribe <tenant-id>")
|
|
381
382
|
.description("Start a new subscription (cancels any prior active one)")
|
|
382
383
|
.requiredOption("-p, --plan <plan>", "Plan id")
|
|
383
|
-
.option("-a, --amount <n>", "Override amount",
|
|
384
|
-
.option("-d, --duration-ms <ms>", "Duration in ms (default 30d)",
|
|
384
|
+
.option("-a, --amount <n>", "Override amount", floatArg("--amount"))
|
|
385
|
+
.option("-d, --duration-ms <ms>", "Duration in ms (default 30d)", intArg("--duration-ms"))
|
|
385
386
|
.option("--json", "Output as JSON")
|
|
386
387
|
.action(async (tenantId, options) => {
|
|
387
388
|
try {
|
package/src/commands/trust.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
|
TRUST_ANCHOR,
|
|
@@ -163,7 +164,7 @@ export function registerTrustCommand(program) {
|
|
|
163
164
|
.description("List attestations")
|
|
164
165
|
.option("-a, --anchor <type>", "Filter by anchor")
|
|
165
166
|
.option("-s, --status <status>", "Filter by status")
|
|
166
|
-
.option("--limit <n>", "Max results",
|
|
167
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
167
168
|
.option("--json", "JSON output")
|
|
168
169
|
.action((opts) => {
|
|
169
170
|
const db = _dbFromCtx(tr);
|
|
@@ -186,7 +187,7 @@ export function registerTrustCommand(program) {
|
|
|
186
187
|
tr.command("interop-test <algorithm>")
|
|
187
188
|
.description("Run PQC interoperability test")
|
|
188
189
|
.option("-p, --peer <id>", "Peer identifier")
|
|
189
|
-
.option("-l, --latency <ms>", "Latency in ms",
|
|
190
|
+
.option("-l, --latency <ms>", "Latency in ms", intArg("--latency"))
|
|
190
191
|
.option("--json", "JSON output")
|
|
191
192
|
.action((algorithm, opts) => {
|
|
192
193
|
const db = _dbFromCtx(tr);
|
|
@@ -207,7 +208,7 @@ export function registerTrustCommand(program) {
|
|
|
207
208
|
tr.command("interop-tests")
|
|
208
209
|
.description("List PQC interop tests")
|
|
209
210
|
.option("-a, --algorithm <algo>", "Filter by algorithm")
|
|
210
|
-
.option("--limit <n>", "Max results",
|
|
211
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
211
212
|
.option("--json", "JSON output")
|
|
212
213
|
.action((opts) => {
|
|
213
214
|
const db = _dbFromCtx(tr);
|
|
@@ -229,7 +230,7 @@ export function registerTrustCommand(program) {
|
|
|
229
230
|
tr.command("sat-send <payload>")
|
|
230
231
|
.description("Send satellite message")
|
|
231
232
|
.option("-p, --provider <name>", "Provider (iridium/starlink/beidou)")
|
|
232
|
-
.option("-r, --priority <n>", "Priority (1-10)",
|
|
233
|
+
.option("-r, --priority <n>", "Priority (1-10)", intArg("--priority"))
|
|
233
234
|
.option("--json", "JSON output")
|
|
234
235
|
.action((payload, opts) => {
|
|
235
236
|
const db = _dbFromCtx(tr);
|
|
@@ -277,7 +278,7 @@ export function registerTrustCommand(program) {
|
|
|
277
278
|
.description("List satellite messages")
|
|
278
279
|
.option("-p, --provider <name>", "Filter by provider")
|
|
279
280
|
.option("-s, --status <status>", "Filter by status")
|
|
280
|
-
.option("--limit <n>", "Max results",
|
|
281
|
+
.option("--limit <n>", "Max results", intArg("--limit"))
|
|
281
282
|
.option("--json", "JSON output")
|
|
282
283
|
.action((opts) => {
|
|
283
284
|
const db = _dbFromCtx(tr);
|
|
@@ -346,7 +347,7 @@ export function registerTrustCommand(program) {
|
|
|
346
347
|
tr.command("hsm-devices")
|
|
347
348
|
.description("List HSM devices")
|
|
348
349
|
.option("-v, --vendor <name>", "Filter by vendor")
|
|
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(tr);
|
package/src/commands/wallet.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 {
|
|
@@ -386,7 +387,7 @@ export function registerWalletCommand(program) {
|
|
|
386
387
|
const db = ctx.db.getDatabase();
|
|
387
388
|
const txns = getTransactions(db, {
|
|
388
389
|
address: options.address,
|
|
389
|
-
limit:
|
|
390
|
+
limit: numericOption(options.limit, { name: "--limit", integer: true, min: 1, fallback: 20 }),
|
|
390
391
|
});
|
|
391
392
|
|
|
392
393
|
if (options.json) {
|