chainlesschain 0.166.149 → 0.166.150
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 +19 -5
- package/package.json +1 -1
- package/src/assets/linux-subreaper/linux-arm64/manifest.json +1 -1
- package/src/assets/linux-subreaper/linux-x64/manifest.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-BjBY1txq.js → AIOps-bYMRw36k.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-CS2ov4iK.js → ActionButton-xprOFj7C.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-C9LS7ahG.js → Analytics-BRZ6F3vk.js} +1 -1
- package/src/assets/web-panel/assets/{AppLayout-4_s9gBVg.js → AppLayout-C_volo3Y.js} +1 -1
- package/src/assets/web-panel/assets/{Artifacts-CwS17ayg.js → Artifacts-Db0iD_H2.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-D3QMRsd-.js → Audit-Bzp7NOA9.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-Bxau9H9Q.js → BackgroundAgents-CPa5KqjU.js} +1 -1
- package/src/assets/web-panel/assets/{Backup--YSJyAuP.js → Backup-BraBbkcd.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DZolkmdu.js → BaseInput-D8LlXxCM.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-DA-7fNKq.js → Chat-FWtdQ7HW.js} +1 -1
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-DniEWT5j.js → ChatBubbleRenderer-DtxhjGV3.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-B4hgbnOB.js → Checkbox-BoCeVuib.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BQ3HSq9S.js → Codegen-C58CW3JB.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DJwxq_Wu.js → Col-BlkVpYfD.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DZYVM_iz.js → Community-BmQ95FuI.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-1Yq5o53N.js → Compact-BzWphLgo.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-52Per8mR.js → Compliance-CG1Plf7v.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-BaCNxzo7.js → Cowork-CS8_XrAS.js} +1 -1
- package/src/assets/web-panel/assets/{Cron-DADTMPPr.js → Cron-C1m-mGo0.js} +1 -1
- package/src/assets/web-panel/assets/{Crosschain-CS3rx96X.js → Crosschain-TU1UPo_V.js} +1 -1
- package/src/assets/web-panel/assets/{DID-B8eatIvd.js → DID-bhbIsq__.js} +1 -1
- package/src/assets/web-panel/assets/{Dashboard-0vsurC1X.js → Dashboard-B0wCsqTw.js} +1 -1
- package/src/assets/web-panel/assets/{Dropdown-BULy3ccq.js → Dropdown-CVokY3lt.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-CcwgCUpu.js → EmailListRenderer-CfatTKx0.js} +1 -1
- package/src/assets/web-panel/assets/{EvolutionSettings-DLs_6II3.js → EvolutionSettings-DnT_Uiag.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DpUpWwQP.js → FamilyGuardDashboard-Dyahx8jQ.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-6hx8MMYA.js → Federation-DuJ39hyj.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CsdE-ZR5.js → FormItemContext-V4Ic5oQ_.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-DzXneQPV.js → GenericCardRenderer-UlZdAl_W.js} +1 -1
- package/src/assets/web-panel/assets/{Git-D_ThKL1Q.js → Git-B_363OIs.js} +1 -1
- package/src/assets/web-panel/assets/{Governance-BFBSlr-9.js → Governance-C61_SW_q.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BAI0b1Jl.js → Inference-CU80t_tb.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-CpO6Bdtr.js → KnowledgeGraph-BEtPQz8C.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-BcRaS_HC.js → Logs-CXqWvdFk.js} +1 -1
- package/src/assets/web-panel/assets/{MarkdownRenderer-CmZaA7Ct.js → MarkdownRenderer-BFgkiBfA.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-BpHBn0Nw.js → Marketplace-oKgzevz2.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-auVxEYSE.js → McpTools-DHcNKyfb.js} +1 -1
- package/src/assets/web-panel/assets/{Memory-DpCyb656.js → Memory-DEVpDL-x.js} +1 -1
- package/src/assets/web-panel/assets/{MobileBridge-CEIGi769.js → MobileBridge-D92T6ztp.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-pphH0a8n.js → MobileProjects-B2Y7xpPw.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-CMJXBEp1.js → Mtc-VOiGefD2.js} +1 -1
- package/src/assets/web-panel/assets/{MtcAudit-BI25yvzM.js → MtcAudit-CAnmf1Im.js} +1 -1
- package/src/assets/web-panel/assets/{Multisig-BhMDExsQ.js → Multisig-BCPOmJxC.js} +1 -1
- package/src/assets/web-panel/assets/{NLProgramming-CatOR9Ez.js → NLProgramming-DYFqTLhe.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BHG6SBpu.js → Notes--N-8WbHM.js} +1 -1
- package/src/assets/web-panel/assets/{NotificationSettings-BB-m0AbL.js → NotificationSettings-Dka_XX0P.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-W-WReAih.js → OrderTableRenderer-CIVkknQY.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-BkQCgon_.js → Organization-MToqvn2N.js} +1 -1
- package/src/assets/web-panel/assets/{Overflow-kCTwPrIc.js → Overflow-DgYLr6Hh.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CvOF8whc.js → P2P-DiRHC93-.js} +1 -1
- package/src/assets/web-panel/assets/{PdhVaultBrowser-DYkTzn6u.js → PdhVaultBrowser-Cw8MYDt-.js} +2 -2
- package/src/assets/web-panel/assets/{Permissions-F-UzeWVt.js → Permissions-JhxdHQqC.js} +1 -1
- package/src/assets/web-panel/assets/{PersonalDataHub-BURpZBb6.js → PersonalDataHub-CcEeur_W.js} +1 -1
- package/src/assets/web-panel/assets/{Pipeline-lZYx_7qc.js → Pipeline-Dau0R1tw.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DdfYgt1_.js → Privacy-UF1HoZ-q.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-DbMBCojn.js → ProjectInit-DyPmrkmp.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectSettings-DPGbzkyi.js → ProjectSettings-DZ4DQBbI.js} +1 -1
- package/src/assets/web-panel/assets/{Projects-B9-t2ofM.js → Projects-BRhaPrL4.js} +1 -1
- package/src/assets/web-panel/assets/Providers-DVyNl0mO.css +1 -0
- package/src/assets/web-panel/assets/Providers-TFpSkyej.js +1 -0
- package/src/assets/web-panel/assets/{QrScannerModal-BIth1Lij.js → QrScannerModal-Dgvs6EGu.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-C928WbdK.js → QuickAsk-DqKybfXf.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CzDNsNPZ.js → Recommend-BGQDw5cu.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-CedjOslI.js → RemoteSession-KE-6VZN0.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-B8ggKVtj.js → Reputation-Ifxvbk7U.js} +1 -1
- package/src/assets/web-panel/assets/{Row-Cx167nF6.js → Row-DoD3nauz.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cj8hwiLP.js → RssFeed-BlMKhrqt.js} +1 -1
- package/src/assets/web-panel/assets/{Search-Dsyrkogu.js → Search-D4MaHzRS.js} +1 -1
- package/src/assets/web-panel/assets/{Security-DfOcWFt-.js → Security-DMpqDgSc.js} +1 -1
- package/src/assets/web-panel/assets/{Services-CSyv-JgS.js → Services-C9yzBSd8.js} +1 -1
- package/src/assets/web-panel/assets/{Skeleton-B0chhFP5.js → Skeleton-h8kJILZh.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-B_jrR_AF.js → Skills-jXdYN4vu.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-krP10aUI.js → Sla-Cuk7apSe.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-Cm_Cjvf2.js → SpeechSettings-B5hPI4N_.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-Cmb-KoqG.js → SyncSettings-MGyaOfUD.js} +1 -1
- package/src/assets/web-panel/assets/{Tasks-DUOiwTxY.js → Tasks-BSqf89Jx.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-DcEPspsP.js → Templates-BYjHba7u.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-Dw93LtrE.js → Tenant-CEkhV7yX.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-B04i0AIG.js → Terminal-D2deCxuf.js} +1 -1
- package/src/assets/web-panel/assets/{TimelineRenderer-C-aAORNK.js → TimelineRenderer-C8YVFoC3.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-W1RBfDKb.js → Tokens-DN-S9EsT.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-BuuH9sMn.js → Trigger-F6LwAuyn.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-Bma-Vz-f.js → Trust-Cx8jhn1i.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CqWw3_ha.js → UkeySign-BN--f0JV.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-6NYmQRUe.js → VideoEditing-i32OtN88.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-CTUuBxsr.js → Wallet-DQImHu1X.js} +1 -1
- package/src/assets/web-panel/assets/{WebAuthn-D8mN5UQU.js → WebAuthn-5waEqMup.js} +1 -1
- package/src/assets/web-panel/assets/{WorkflowEditor-DOB46XMH.js → WorkflowEditor-Bh0xyyOO.js} +1 -1
- package/src/assets/web-panel/assets/{chat-BPNlNLwi.js → chat-EXJ3Usf5.js} +1 -1
- package/src/assets/web-panel/assets/{colors-D-LNng0Q.js → colors-Cdoap8Z7.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-Vkl3KOAb.js → compact-item-QPjKEhW_.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CFsJ9Bmp.js → createContext-BOGUY650.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-C1v7eiIB.js → hasIn-DRN_I25i.js} +1 -1
- package/src/assets/web-panel/assets/{index-CD8egQCF.js → index-15P436aq.js} +1 -1
- package/src/assets/web-panel/assets/{index-CfVl0Oqt.js → index-6KPTDWDG.js} +1 -1
- package/src/assets/web-panel/assets/{index-BPwv3l6X.js → index-6nTP4-QK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DbmhJVc3.js → index-9hwjpOFE.js} +1 -1
- package/src/assets/web-panel/assets/{index-0oRhV07J.js → index-BFXhCqpm.js} +1 -1
- package/src/assets/web-panel/assets/index-BFYVw5aJ.js +1 -0
- package/src/assets/web-panel/assets/{index-Cjxxw-1P.js → index-BFh62a_Z.js} +1 -1
- package/src/assets/web-panel/assets/{index-hBzgHVea.js → index-BRo2j8Jz.js} +1 -1
- package/src/assets/web-panel/assets/{index-BefXafSw.js → index-B_J_PUwW.js} +1 -1
- package/src/assets/web-panel/assets/{index-CmkppTkH.js → index-B_pCKR-k.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dq9SDl82.js → index-BeRxNc4x.js} +1 -1
- package/src/assets/web-panel/assets/{index-BMcTUbpz.js → index-BmVIyCgf.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGyhWFpc.js → index-BoDNVZfc.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFErisPY.js → index-BvX72fLD.js} +1 -1
- package/src/assets/web-panel/assets/{index-PCe8NA3J.js → index-C33cfAQE.js} +1 -1
- package/src/assets/web-panel/assets/{index-DVfUt2bK.js → index-CKfdYM3I.js} +1 -1
- package/src/assets/web-panel/assets/{index-5oK4ICcR.js → index-CVJG_i6e.js} +1 -1
- package/src/assets/web-panel/assets/{index-BoZnaD3Q.js → index-CXP_MepL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVHaJNpn.js → index-CafxYv7t.js} +1 -1
- package/src/assets/web-panel/assets/{index-BQr5mmyc.js → index-DAuglUM-.js} +1 -1
- package/src/assets/web-panel/assets/{index-BgvrlrtJ.js → index-DBb3W3bA.js} +1 -1
- package/src/assets/web-panel/assets/{index-DZ16Oxcu.js → index-DID83zEQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BiPmMm38.js → index-DISFHFjT.js} +1 -1
- package/src/assets/web-panel/assets/{index-uDSUo2y2.js → index-DNpnprSx.js} +1 -1
- package/src/assets/web-panel/assets/{index-CaJvbmCw.js → index-DULwfIin.js} +1 -1
- package/src/assets/web-panel/assets/{index-ChGe005u.js → index-D_pIGWDh.js} +1 -1
- package/src/assets/web-panel/assets/{index-DgYmI2pD.js → index-DfXsHnc0.js} +1 -1
- package/src/assets/web-panel/assets/{index-9JeeBF92.js → index-Dusibyek.js} +1 -1
- package/src/assets/web-panel/assets/{index-PiL6D-FC.js → index-DzUL46rU.js} +1 -1
- package/src/assets/web-panel/assets/{index-DmUZGqe2.js → index-FBoQQHLy.js} +1 -1
- package/src/assets/web-panel/assets/{index-BxJC59QT.js → index-L3zdSmTh.js} +1 -1
- package/src/assets/web-panel/assets/{index-DuIfomtv.js → index-Lwktngzr.js} +1 -1
- package/src/assets/web-panel/assets/{index-a_H30VZX.js → index-_fW5KelD.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dd0OgZmt.js → index-hmILMYKF.js} +3 -3
- package/src/assets/web-panel/assets/{index-BMsRfvkp.js → index-iYCp3otx.js} +1 -1
- package/src/assets/web-panel/assets/{index-MGJzHAw_.js → index-jo9saD-R.js} +1 -1
- package/src/assets/web-panel/assets/{index-BH5PxoVq.js → index-kc4lgpMy.js} +1 -1
- package/src/assets/web-panel/assets/{index-BObyCZ2w.js → index-shByGhT7.js} +1 -1
- package/src/assets/web-panel/assets/index-wtySft9h.js +1 -0
- package/src/assets/web-panel/assets/{initDefaultProps-CCYgHcTH.js → initDefaultProps-Bno49hyl.js} +1 -1
- package/src/assets/web-panel/assets/{motion-4Yr4ZkjE.js → motion-Cs9KpFRZ.js} +1 -1
- package/src/assets/web-panel/assets/{move-ZP90E-ji.js → move-DN2kt6Fk.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-s0N3WyRA.js → mtc-parser-IXnfFKcF.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BZ6gx9Kf.js → omit-ULuXK3m0.js} +1 -1
- package/src/assets/web-panel/assets/parsers-DftYMnlk.js +3 -0
- package/src/assets/web-panel/assets/{pickAttrs-DxUtFOOQ.js → pickAttrs-B3f1sg_2.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-Btzjn1hK.js → placementArrow-CB3ISXbH.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DYcoe1XJ.js → responsiveObserve-BhRD48Wz.js} +1 -1
- package/src/assets/web-panel/assets/{slide-BiBewdr4.js → slide-B4qkLP8K.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-D9vt0dkG.js → statusUtils-KfItOu2F.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-BXsm_vG0.js → styleChecker-BeLQUf-Z.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-CIG8zET4.js → useFlexGapSupport-CPIJfd28.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-ChFPF8GI.js → useFs-CUBjOVdy.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-D4CzWJhY.js → usePersonalDataHub-DEKScTxs.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-6V5tphk5.js → vnode-DhNnfLeH.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-B2H_VwfU.js → zoom-D5rdpCyb.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +1 -1
- package/src/commands/llm.js +45 -0
- package/src/commands/setup.js +100 -47
- package/src/data/changelog.json +13 -0
- package/src/gateways/ws/message-dispatcher.js +68 -0
- package/src/lib/config-manager.js +23 -5
- package/src/lib/config-schema.js +10 -5
- package/src/lib/evolution/evolution-file-witness.js +65 -2
- package/src/lib/evolution/evolution-ledger-file-backend.js +18 -1
- package/src/lib/evolution/evolution-ledger-manifest-witness-adapter.js +22 -0
- package/src/lib/evolution/evolution-ledger-v2-journal.js +11 -0
- package/src/lib/evolution/evolution-ledger-v2-manifest-backend.js +19 -1
- package/src/lib/evolution/rrsi-observed-text-index.js +45 -3
- package/src/lib/evolution/rrsi-tenant-index-anchor-history.js +10 -0
- package/src/lib/lk-account-api.cjs +233 -0
- package/src/lib/lk-account.js +20 -0
- package/src/lib/lk-model-catalog.json +1388 -0
- package/src/lib/llm-channel-presets.js +92 -0
- package/src/lib/llm-connection-config.js +105 -19
- package/src/assets/web-panel/assets/Providers-CpAXh_6c.css +0 -1
- package/src/assets/web-panel/assets/Providers-q9dSBLsP.js +0 -1
- package/src/assets/web-panel/assets/index-CLafGdQC.js +0 -1
- package/src/assets/web-panel/assets/index-DYHw3Xoi.js +0 -1
- package/src/assets/web-panel/assets/parsers-YNLm7sQ0.js +0 -4
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"itbudget": "Usage: chainlesschain itbudget [options] [command]\n\nIteration Budget V2 governance\n\nOptions:\n -h, --help display help for command\n\nCommands:\n enums-v2\n config-v2\n set-max-active-v2 <n>\n set-max-pending-v2 <n>\n set-idle-ms-v2 <n>\n set-stuck-ms-v2 <n>\n register-profile-v2 [options] <id> <owner>\n activate-profile-v2 <id>\n pause-profile-v2 <id>\n exhaust-profile-v2 <id>\n touch-profile-v2 <id>\n get-profile-v2 <id>\n list-profiles-v2\n create-run-v2 [options] <id> <profileId>\n start-run-v2 <id>\n complete-run-v2 <id>\n fail-run-v2 <id> [reason]\n cancel-run-v2 <id> [reason]\n get-run-v2 <id>\n list-runs-v2\n auto-pause-idle-v2\n auto-fail-stuck-v2\n gov-stats-v2\n reset-state-v2\n help [command] display help for command\n",
|
|
83
83
|
"kg": "Usage: chainlesschain kg [options] [command]\n\nKnowledge graph — entities, relations, multi-hop reasoning, stats\n\nOptions:\n -h, --help display help for command\n\nCommands:\n entity-types [options] List recommended entity types\n add [options] <name> <type> Add an entity\n list [options] List entities\n show [options] <entity-id> Show entity details\n remove <entity-id> Remove entity (cascades to relations)\n add-relation [options] <source-id> <target-id> <relation-type> Add a directed relation between two entities\n relations [options] List relations\n reason [options] <start-id> BFS multi-hop reasoning from a start entity\n stats [options] Graph statistics — counts, type distribution, density\n export [output-file] Export entire graph as JSON (stdout if no file)\n import [options] <input-file> Import graph from JSON file ({entities[], relations[]})\n entity-statuses-v2 [options] List V2 entity maturity statuses\n relation-statuses-v2 [options] List V2 relation statuses\n default-max-active-entities-per-owner Show default V2 per-owner active-entity cap\n max-active-entities-per-owner Show current V2 per-owner active-entity cap\n set-max-active-entities-per-owner <n> Set V2 per-owner active-entity cap\n default-max-relations-per-entity Show default V2 per-entity active-relation cap\n max-relations-per-entity Show current V2 per-entity active-relation cap\n set-max-relations-per-entity <n> Set V2 per-entity active-relation cap\n default-entity-stale-ms Show default V2 entity staleness threshold (ms)\n entity-stale-ms Show current V2 entity staleness threshold (ms)\n set-entity-stale-ms <ms> Set V2 entity staleness threshold (ms)\n default-relation-stale-ms Show default V2 relation staleness threshold (ms)\n relation-stale-ms Show current V2 relation staleness threshold (ms)\n set-relation-stale-ms <ms> Set V2 relation staleness threshold (ms)\n active-entity-count [options] Active V2 entity count (scoped by owner)\n active-relation-count [options] Active V2 relation count (scoped by source entity)\n register-entity-v2 [options] <entity-id> Register a V2 entity\n entity-v2 [options] <entity-id> Show V2 entity lifecycle state\n set-entity-status-v2 [options] <entity-id> <status> Transition a V2 entity status\n deprecate-entity [options] <entity-id> Deprecate a V2 entity (grace period)\n archive-entity-v2 [options] <entity-id> Archive a V2 entity\n remove-entity-v2 [options] <entity-id> Remove a V2 entity (terminal)\n revive-entity [options] <entity-id> Restore a V2 entity to active\n touch-entity-activity <entity-id> Bump lastActivityAt on a V2 entity\n register-relation-v2 [options] <relation-id> Register a V2 relation\n relation-v2 [options] <relation-id> Show V2 relation lifecycle state\n set-relation-status-v2 [options] <relation-id> <status> Transition a V2 relation status\n deprecate-relation [options] <relation-id> Deprecate a V2 relation\n remove-relation-v2 [options] <relation-id> Remove a V2 relation (terminal)\n revive-relation [options] <relation-id> Restore a V2 relation to active\n auto-archive-stale-entities [options] Bulk-flip stale V2 entities → archived\n auto-remove-stale-relations [options] Bulk-flip stale V2 relations → removed\n stats-v2 [options] V2 knowledge graph stats (all-enum-key zero-init)\n help [command] display help for command\n",
|
|
84
84
|
"learning": "Usage: chainlesschain learning [options] [command]\n\nLearning records — trajectories, reflection, and governed candidate attempts\n\nOptions:\n -h, --help display help for command\n\nCommands:\n stats [options] Show learning loop statistics\n trajectories [options] List recent trajectories\n export [options] Export all learning trajectories as JSON (module 101\n §8.3 backup)\n import [options] Import learning trajectories from a JSON array file\n (idempotent upsert by id; §8.3)\n reflect [options] Run a reflection cycle and generate report\n synthesize [options] Attempt a governed Skill candidate from eligible\n trajectories\n cleanup [options] Delete old trajectories beyond retention period\n help [command] display help for command\n",
|
|
85
|
-
"llm": "Usage: chainlesschain llm [options] [command]\n\nLLM provider management\n\nOptions:\n -h, --help display help for command\n\nCommands:\n capabilities [options] Inspect a static model capability\n profile without network or runtime\n verification\n configure [options] Atomically save an LLM connection from\n stdin JSON (secrets never enter argv)\n models [options] List available models from the current\n provider\n test [options] Test LLM provider connectivity\n (defaults to configured provider)\n providers [options] List all available LLM providers\n add-provider [options] <name> Add a custom LLM provider\n switch [options] <name> Switch the active LLM provider\n provider-maturities-v2 List V2 provider maturity states\n request-lifecycles-v2 List V2 request lifecycle states\n stats-v2 V2 llm-providers stats\n get-max-active-profiles-v2 Get max active profiles per owner (V2)\n set-max-active-profiles-v2 <n> Set max active profiles per owner (V2)\n get-max-pending-requests-v2 Get max pending requests per profile\n (V2)\n set-max-pending-requests-v2 <n> Set max pending requests per profile\n (V2)\n get-profile-idle-ms-v2 Get profile idle threshold (V2)\n set-profile-idle-ms-v2 <ms> Set profile idle threshold (V2)\n get-request-stuck-ms-v2 Get request stuck threshold (V2)\n set-request-stuck-ms-v2 <ms> Set request stuck threshold (V2)\n active-profile-count-v2 <ownerId> Active profile count for owner (V2)\n pending-request-count-v2 <profileId> Pending request count for profile (V2)\n register-profile-v2 [options] <id> Register a V2 profile\n get-profile-v2 <id> Get a V2 profile\n list-profiles-v2 [options] List V2 profiles\n set-profile-status-v2 <id> <next> Set V2 profile status\n activate-profile-v2 <id> Activate a V2 profile\n suspend-profile-v2 <id> Suspend a V2 profile\n retire-profile-v2 <id> Retire a V2 profile\n touch-profile-v2 <id> Touch a V2 profile\n create-request-v2 [options] <id> Create a V2 request\n get-request-v2 <id> Get a V2 request\n list-requests-v2 [options] List V2 requests\n set-request-status-v2 <id> <next> Set V2 request status\n start-request-v2 <id> Start a V2 request\n complete-request-v2 <id> Complete a V2 request\n fail-request-v2 <id> Fail a V2 request\n cancel-request-v2 <id> Cancel a V2 request\n auto-suspend-idle-profiles-v2 Auto-suspend idle V2 profiles\n auto-fail-stuck-requests-v2 Auto-fail stuck V2 requests\n help [command] display help for command\n",
|
|
85
|
+
"llm": "Usage: chainlesschain llm [options] [command]\n\nLLM provider management\n\nOptions:\n -h, --help display help for command\n\nCommands:\n connections [options] Read saved connection metadata without\n credentials\n account [options] Query fresh LK prices, account balance,\n Key quota and actual API charges\n capabilities [options] Inspect a static model capability\n profile without network or runtime\n verification\n configure [options] Atomically save an LLM connection from\n stdin JSON (secrets never enter argv)\n models [options] List available models from the current\n provider\n test [options] Test LLM provider connectivity\n (defaults to configured provider)\n providers [options] List all available LLM providers\n add-provider [options] <name> Add a custom LLM provider\n switch [options] <name> Switch the active LLM provider\n provider-maturities-v2 List V2 provider maturity states\n request-lifecycles-v2 List V2 request lifecycle states\n stats-v2 V2 llm-providers stats\n get-max-active-profiles-v2 Get max active profiles per owner (V2)\n set-max-active-profiles-v2 <n> Set max active profiles per owner (V2)\n get-max-pending-requests-v2 Get max pending requests per profile\n (V2)\n set-max-pending-requests-v2 <n> Set max pending requests per profile\n (V2)\n get-profile-idle-ms-v2 Get profile idle threshold (V2)\n set-profile-idle-ms-v2 <ms> Set profile idle threshold (V2)\n get-request-stuck-ms-v2 Get request stuck threshold (V2)\n set-request-stuck-ms-v2 <ms> Set request stuck threshold (V2)\n active-profile-count-v2 <ownerId> Active profile count for owner (V2)\n pending-request-count-v2 <profileId> Pending request count for profile (V2)\n register-profile-v2 [options] <id> Register a V2 profile\n get-profile-v2 <id> Get a V2 profile\n list-profiles-v2 [options] List V2 profiles\n set-profile-status-v2 <id> <next> Set V2 profile status\n activate-profile-v2 <id> Activate a V2 profile\n suspend-profile-v2 <id> Suspend a V2 profile\n retire-profile-v2 <id> Retire a V2 profile\n touch-profile-v2 <id> Touch a V2 profile\n create-request-v2 [options] <id> Create a V2 request\n get-request-v2 <id> Get a V2 request\n list-requests-v2 [options] List V2 requests\n set-request-status-v2 <id> <next> Set V2 request status\n start-request-v2 <id> Start a V2 request\n complete-request-v2 <id> Complete a V2 request\n fail-request-v2 <id> Fail a V2 request\n cancel-request-v2 <id> Cancel a V2 request\n auto-suspend-idle-profiles-v2 Auto-suspend idle V2 profiles\n auto-fail-stuck-requests-v2 Auto-fail stuck V2 requests\n help [command] display help for command\n",
|
|
86
86
|
"logs": "Usage: chainlesschain logs [options] <id>\n\nPrint recent output from a background agent\n\nOptions:\n -n, --lines <n> Number of lines (default: \"100\")\n -h, --help display help for command\n",
|
|
87
87
|
"loop": "Usage: chainlesschain loop [options] [parts...]\n\nRepeatedly run an agent prompt or `-- <command>` on a fixed interval\n\nOptions:\n --every <dur> Interval between iterations (e.g. 30s, 5m, 1.5h;\n bare number = seconds) (default: \"5m\")\n -n, --max-iterations <n> Stop after N iterations\n --until-exit-zero Stop once an iteration exits with code 0 (e.g.\n tests pass)\n --until <regex> Stop once an iteration's output matches this JS\n regex\n --dynamic Let each iteration self-pace via [[loop:next\n <dur>]] / [[loop:stop]] directives (prompt mode\n augments the prompt)\n --save [id] Persist this loop to a resumable session\n (auto-generates an id if omitted)\n --resume <id> Continue a previously --save'd loop session\n --json Print a JSON summary when the loop ends\n -h, --help display help for command\n",
|
|
88
88
|
"lowcode": "Usage: chainlesschain lowcode [options] [command]\n\nLow-code application platform\n\nOptions:\n -h, --help display help for command\n\nCommands:\n create [options] <name> Create a new low-code application\n list [options] List all low-code applications\n preview <app-id> Preview application info\n publish <app-id> Publish an application\n components [options] List available built-in components\n datasource [options] <app-id> <name> <type> Add a data source to an application\n versions [options] <app-id> Show version history for an application\n rollback <app-id> <version> Rollback application to a previous version\n export [options] <app-id> Export application definition\n categories [options] List component categories (V2)\n datasource-types [options] List supported data source types (V2)\n statuses [options] List canonical app statuses (V2)\n components-v2 [options] List built-in components with category filter (V2)\n datasource-v2 [options] <app-id> <name> <type> Register a validated data source (V2)\n test-connection [options] <datasource-id> Heuristic connection check for a data source (V2)\n set-status <app-id> <status> Update app status with validated transition (V2)\n archive <app-id> Archive an application (V2)\n status-history [options] <app-id> Show status transition history for an app (V2)\n clone [options] <source-id> Clone an application (V2)\n export-json [options] <app-id> Export an app as canonical JSON (V2)\n import-json <file> Import an app from a canonical JSON file (V2)\n stats-v2 [options] Low-code platform statistics (V2)\n deploy [options] <app-id> Deploy application as static HTML bundle\n enums-v2 Show V2 enums (app maturity + build lifecycle)\n config-v2 Show V2 config thresholds\n set-max-active-apps-v2 <n> Set max active apps per owner\n set-max-pending-builds-v2 <n> Set max pending builds per app\n set-app-idle-ms-v2 <n> Set app idle threshold (ms)\n set-build-stuck-ms-v2 <n> Set build stuck threshold (ms)\n register-app-v2 [options] <id> <owner> Register V2 app\n activate-app-v2 <id> Activate app\n pause-app-v2 <id> Pause app\n archive-app-v2 <id> Archive app (terminal)\n touch-app-v2 <id> Touch app lastTouchedAt\n get-app-v2 <id> Get V2 app\n list-apps-v2 List V2 apps\n create-build-v2 [options] <id> <appId> Create V2 app build (queued)\n start-build-v2 <id> Start build\n succeed-build-v2 <id> Succeed build\n fail-build-v2 <id> [reason] Fail build\n cancel-build-v2 <id> [reason] Cancel build\n get-build-v2 <id> Get V2 build\n list-builds-v2 List V2 builds\n auto-pause-idle-v2 Auto-pause idle active apps\n auto-fail-stuck-v2 Auto-fail stuck building builds\n gov-stats-v2 V2 governance aggregate stats\n help [command] display help for command\n",
|
package/src/commands/llm.js
CHANGED
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
import { normalizeOllamaBaseUrl } from "../lib/ollama-base-url.js";
|
|
47
47
|
import {
|
|
48
48
|
readLlmConnectionInput,
|
|
49
|
+
readLlmConnection,
|
|
49
50
|
saveLlmConnection,
|
|
50
51
|
} from "../lib/llm-connection-config.js";
|
|
51
52
|
import {
|
|
@@ -54,6 +55,7 @@ import {
|
|
|
54
55
|
} from "../lib/llm-connection-probe.js";
|
|
55
56
|
import { resolveModelCapabilityProfile } from "../lib/model-capabilities.js";
|
|
56
57
|
import { resolveLlmConnection } from "../lib/llm-connection-resolution.js";
|
|
58
|
+
import { queryLkAccount, formatLkAccount } from "../lib/lk-account.js";
|
|
57
59
|
|
|
58
60
|
/**
|
|
59
61
|
* Resolve the effective `cc llm test` target from CLI flags + persisted config.
|
|
@@ -157,6 +159,49 @@ export function formatLlmCapabilities(profile) {
|
|
|
157
159
|
|
|
158
160
|
export function registerLlmCommand(program) {
|
|
159
161
|
const llm = program.command("llm").description("LLM provider management");
|
|
162
|
+
llm
|
|
163
|
+
.command("connections")
|
|
164
|
+
.description("Read saved connection metadata without credentials")
|
|
165
|
+
.option("--json", "Output structured metadata")
|
|
166
|
+
.action(() => {
|
|
167
|
+
try {
|
|
168
|
+
console.log(JSON.stringify(readLlmConnection()));
|
|
169
|
+
} catch {
|
|
170
|
+
logger.error("Could not read saved LLM connections");
|
|
171
|
+
process.exitCode = 1;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
llm
|
|
176
|
+
.command("account")
|
|
177
|
+
.description(
|
|
178
|
+
"Query fresh LK prices, account balance, Key quota and actual API charges",
|
|
179
|
+
)
|
|
180
|
+
.option("--days <days>", "Usage window, 1–30 days", "1")
|
|
181
|
+
.option("--scope <scope>", "Usage scope: key or user (all API keys)", "key")
|
|
182
|
+
.option(
|
|
183
|
+
"--model <model>",
|
|
184
|
+
"Model for dynamic pricing (default: saved model)",
|
|
185
|
+
)
|
|
186
|
+
.option("--limit <limit>", "Billing records per page, 1–200", "20")
|
|
187
|
+
.option("--offset <offset>", "Billing record offset", "0")
|
|
188
|
+
.option("--json", "Output structured account data without credentials")
|
|
189
|
+
.action(async (options) => {
|
|
190
|
+
try {
|
|
191
|
+
const result = await queryLkAccount(options);
|
|
192
|
+
console.log(
|
|
193
|
+
options.json
|
|
194
|
+
? JSON.stringify(result, null, 2)
|
|
195
|
+
: formatLkAccount(result),
|
|
196
|
+
);
|
|
197
|
+
if (Object.keys(result.errors).length === 4) process.exitCode = 1;
|
|
198
|
+
} catch {
|
|
199
|
+
logger.error(
|
|
200
|
+
"Could not query LK account. Save an LK connection with its own API key; check days, scope and pagination.",
|
|
201
|
+
);
|
|
202
|
+
process.exitCode = 1;
|
|
203
|
+
}
|
|
204
|
+
});
|
|
160
205
|
|
|
161
206
|
llm
|
|
162
207
|
.command("capabilities")
|
package/src/commands/setup.js
CHANGED
|
@@ -8,11 +8,7 @@ import {
|
|
|
8
8
|
VERSION,
|
|
9
9
|
} from "../constants.js";
|
|
10
10
|
import { ensureHomeDir, getConfigPath } from "../lib/paths.js";
|
|
11
|
-
import {
|
|
12
|
-
loadConfig,
|
|
13
|
-
setSecretConfigValue,
|
|
14
|
-
updateConfigAtomically,
|
|
15
|
-
} from "../lib/config-manager.js";
|
|
11
|
+
import { loadConfig } from "../lib/config-manager.js";
|
|
16
12
|
import {
|
|
17
13
|
isDockerAvailable,
|
|
18
14
|
isDockerComposeAvailable,
|
|
@@ -27,7 +23,16 @@ import {
|
|
|
27
23
|
askPassword,
|
|
28
24
|
} from "../lib/prompts.js";
|
|
29
25
|
import logger from "../lib/logger.js";
|
|
30
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
saveLlmConnection,
|
|
28
|
+
llmConnectionIdentity,
|
|
29
|
+
readLlmConnection,
|
|
30
|
+
} from "../lib/llm-connection-config.js";
|
|
31
|
+
import {
|
|
32
|
+
LK_CHANNEL,
|
|
33
|
+
LK_MODELS,
|
|
34
|
+
resolveLkConnection,
|
|
35
|
+
} from "../lib/llm-channel-presets.js";
|
|
31
36
|
import {
|
|
32
37
|
assessEvolutionDeploymentReadiness,
|
|
33
38
|
getEvolutionDeploymentStatus,
|
|
@@ -141,24 +146,62 @@ async function runSetup(options) {
|
|
|
141
146
|
name: info.name,
|
|
142
147
|
value: key,
|
|
143
148
|
}));
|
|
144
|
-
|
|
149
|
+
providerChoices.push({ name: "LK API (聚合平台 / 主备渠道)", value: "lk" });
|
|
150
|
+
const savedConnections = readLlmConnection().savedConnections;
|
|
151
|
+
savedConnections.forEach((row, index) =>
|
|
152
|
+
providerChoices.push({
|
|
153
|
+
name: `已保存:${row.channel === "lk" ? "LK API" : row.provider} · ${row.baseUrl} · ${row.model}`,
|
|
154
|
+
value: `saved:${index}`,
|
|
155
|
+
}),
|
|
156
|
+
);
|
|
157
|
+
let provider = await askSelect("Select LLM provider:", providerChoices);
|
|
158
|
+
let channelConnection;
|
|
159
|
+
if (provider.startsWith("saved:")) {
|
|
160
|
+
channelConnection = savedConnections[Number(provider.slice(6))];
|
|
161
|
+
provider = channelConnection.provider;
|
|
162
|
+
}
|
|
163
|
+
if (provider === "lk") {
|
|
164
|
+
const protocol = await askSelect(
|
|
165
|
+
"Select LK protocol (FB-5.2 requires Anthropic):",
|
|
166
|
+
["anthropic", "openai", "gemini"].map((id) => ({
|
|
167
|
+
name: LK_CHANNEL.protocols[id].label,
|
|
168
|
+
value: id,
|
|
169
|
+
})),
|
|
170
|
+
);
|
|
171
|
+
const address = await askSelect(
|
|
172
|
+
"Select LK address (same service; switch manually if unreachable):",
|
|
173
|
+
Object.entries(LK_CHANNEL.addresses).map(([id, url]) => ({
|
|
174
|
+
name: `${id}: ${url}`,
|
|
175
|
+
value: id,
|
|
176
|
+
})),
|
|
177
|
+
);
|
|
178
|
+
const selectedModel = await askSelect("Select LK model:", [
|
|
179
|
+
...LK_MODELS.filter(
|
|
180
|
+
(entry) =>
|
|
181
|
+
entry.type === "chat" && entry.compatibleProtocols.includes(protocol),
|
|
182
|
+
).map((entry) => ({
|
|
183
|
+
name: `${entry.label} (${entry.id})`,
|
|
184
|
+
value: entry.id,
|
|
185
|
+
})),
|
|
186
|
+
{ name: "Other model (enter exact ID)", value: "__custom__" },
|
|
187
|
+
]);
|
|
188
|
+
const model =
|
|
189
|
+
selectedModel === "__custom__"
|
|
190
|
+
? await askInput("Enter LK model name:")
|
|
191
|
+
: selectedModel;
|
|
192
|
+
if (!model?.trim()) throw new Error("An LK model name is required");
|
|
193
|
+
channelConnection = resolveLkConnection(protocol, address, { model });
|
|
194
|
+
provider = channelConnection.provider;
|
|
195
|
+
}
|
|
145
196
|
const providerInfo = LLM_PROVIDERS[provider];
|
|
146
197
|
|
|
147
198
|
let apiKey = null;
|
|
148
199
|
let { baseUrl, model } = resolveSetupLlmDefaults(provider, existingLlm);
|
|
149
200
|
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
assertRequiredProviderCredential(providerInfo, apiKey);
|
|
155
|
-
} else if (provider === "custom") {
|
|
156
|
-
apiKey = await askPassword(
|
|
157
|
-
"Enter the platform API key (optional; leave blank if not required):",
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (provider === "custom" || providerInfo.isProxy) {
|
|
201
|
+
if (channelConnection) {
|
|
202
|
+
baseUrl = channelConnection.baseUrl;
|
|
203
|
+
model = channelConnection.model;
|
|
204
|
+
} else if (provider === "custom" || providerInfo.isProxy) {
|
|
162
205
|
baseUrl = await askInput("Enter API base URL:", baseUrl || "");
|
|
163
206
|
model = await askInput("Enter model name:", model || "");
|
|
164
207
|
} else {
|
|
@@ -171,6 +214,33 @@ async function runSetup(options) {
|
|
|
171
214
|
}
|
|
172
215
|
}
|
|
173
216
|
|
|
217
|
+
const saved = readLlmConnection().savedConnections.find(
|
|
218
|
+
(row) =>
|
|
219
|
+
row.hasKey &&
|
|
220
|
+
llmConnectionIdentity(row) ===
|
|
221
|
+
llmConnectionIdentity({ provider, baseUrl }),
|
|
222
|
+
);
|
|
223
|
+
if (
|
|
224
|
+
channelConnection ||
|
|
225
|
+
providerInfo.requiresApiKey ||
|
|
226
|
+
provider === "custom"
|
|
227
|
+
) {
|
|
228
|
+
apiKey = await askPassword(
|
|
229
|
+
saved
|
|
230
|
+
? "API key already saved for this channel (leave blank to restore):"
|
|
231
|
+
: `Enter ${channelConnection ? LK_CHANNEL.name : providerInfo.name} API key:`,
|
|
232
|
+
);
|
|
233
|
+
if (!saved)
|
|
234
|
+
assertRequiredProviderCredential(
|
|
235
|
+
{
|
|
236
|
+
requiresApiKey: Boolean(
|
|
237
|
+
channelConnection || providerInfo.requiresApiKey,
|
|
238
|
+
),
|
|
239
|
+
},
|
|
240
|
+
apiKey,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
174
244
|
// Step 6: Download binary
|
|
175
245
|
if (!options.skipDownload) {
|
|
176
246
|
logger.newline();
|
|
@@ -192,38 +262,21 @@ async function runSetup(options) {
|
|
|
192
262
|
|
|
193
263
|
// Step 7: Save config
|
|
194
264
|
const applySetupValues = (config) => {
|
|
195
|
-
const previous = config.llm || {};
|
|
196
|
-
const sameTarget =
|
|
197
|
-
previous.provider === provider &&
|
|
198
|
-
normalizeLlmEndpoint(
|
|
199
|
-
provider,
|
|
200
|
-
previous.baseUrl || providerInfo.defaultBaseUrl,
|
|
201
|
-
) === normalizeLlmEndpoint(provider, baseUrl);
|
|
202
|
-
if (provider === "custom" && !apiKey && !sameTarget) {
|
|
203
|
-
delete previous.apiKey;
|
|
204
|
-
delete previous.apiKeyHelper;
|
|
205
|
-
}
|
|
206
|
-
config.llm = previous;
|
|
207
265
|
config.setupCompleted = true;
|
|
208
266
|
config.completedAt = new Date().toISOString();
|
|
209
267
|
config.edition = edition;
|
|
210
|
-
config.llm.provider = provider;
|
|
211
|
-
config.llm.baseUrl = baseUrl;
|
|
212
|
-
config.llm.model = model;
|
|
213
268
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
updateConfigAtomically(applySetupValues);
|
|
226
|
-
}
|
|
269
|
+
saveLlmConnection(
|
|
270
|
+
{
|
|
271
|
+
provider,
|
|
272
|
+
baseUrl,
|
|
273
|
+
model,
|
|
274
|
+
apiKey: apiKey || "",
|
|
275
|
+
visionModel: saved?.visionModel || "",
|
|
276
|
+
allowHttp: true,
|
|
277
|
+
},
|
|
278
|
+
{ configMutator: applySetupValues },
|
|
279
|
+
);
|
|
227
280
|
logger.success("Configuration saved");
|
|
228
281
|
|
|
229
282
|
// Saving a provider setting does not itself authorize a content-bearing
|
package/src/data/changelog.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "CHANGELOG.md",
|
|
3
3
|
"releases": [
|
|
4
|
+
{
|
|
5
|
+
"productVersion": null,
|
|
6
|
+
"cliVersion": "0.166.150",
|
|
7
|
+
"cliVersions": ["0.166.150"],
|
|
8
|
+
"date": "2026-11-15",
|
|
9
|
+
"title": "",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"heading": "Added - cc CLI 0.166.150: LK channel, dynamic billing and saved credentials (candidate, 2026-11-15)",
|
|
13
|
+
"body": "- Add the LK aggregator with documented primary/backup addresses, exact model aliases and protocol-aware selection. The shared catalog contains 83 chat models plus 114 media entries; media task execution is not included. Preserve saved aliases and keep credentials scoped to the selected endpoint. Three tiny live protocol probes and authenticated pricing queries succeeded; this does not certify the whole model catalog.\n- Add fresh authenticated LK prices, account balance, Key quota and actual API charges; keep platform credits separate from local Token estimates. Preserve endpoint-scoped credentials across Volcengine and all other channels, with a shared LK key across hosts/protocols. Support CLI, Web, IDE configuration and desktop encrypted history.\n- Add LK selection to the `cc ui` Web panel with protocol-filtered models, primary/backup addresses and saved aliases. Persist endpoint and credential atomically through authenticated structured messages, return only a non-secret snapshot, and confirm saves by readback.\n- Pair with VS Code/Open VSX 0.37.189 and JetBrains 0.4.204; child npm packages remain unchanged. Require complete exact-source CLI CI and Strict Sandbox matrices, then OIDC publication and public package readback before IDE publication."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
4
17
|
{
|
|
5
18
|
"productVersion": null,
|
|
6
19
|
"cliVersion": "0.166.149",
|
|
@@ -132,6 +132,71 @@ export async function handleConfigSetSecret(server, id, ws, message) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
export async function handleLlmConnection(server, id, ws, message) {
|
|
136
|
+
const reading = message.type === "llm-config-get";
|
|
137
|
+
try {
|
|
138
|
+
const configApi = await import("../../lib/llm-connection-config.js");
|
|
139
|
+
const result = reading
|
|
140
|
+
? await (server._readLlmConnection || configApi.readLlmConnection)()
|
|
141
|
+
: await (server._saveLlmConnection || configApi.saveLlmConnection)(
|
|
142
|
+
message.connection,
|
|
143
|
+
);
|
|
144
|
+
// Select fields explicitly: injected storage backends cannot echo secrets.
|
|
145
|
+
const config = {};
|
|
146
|
+
for (const key of [
|
|
147
|
+
"provider",
|
|
148
|
+
"model",
|
|
149
|
+
"baseUrl",
|
|
150
|
+
"visionModel",
|
|
151
|
+
"hasKey",
|
|
152
|
+
"temperature",
|
|
153
|
+
"maxTokens",
|
|
154
|
+
])
|
|
155
|
+
if (Object.hasOwn(result, key)) config[key] = result[key];
|
|
156
|
+
config.savedConnections = (result.savedConnections || []).map((row) => ({
|
|
157
|
+
provider: row.provider,
|
|
158
|
+
model: row.model,
|
|
159
|
+
baseUrl: row.baseUrl,
|
|
160
|
+
visionModel: row.visionModel,
|
|
161
|
+
hasKey: row.hasKey === true,
|
|
162
|
+
channel: row.channel === "lk" ? "lk" : null,
|
|
163
|
+
}));
|
|
164
|
+
server._send(ws, { id, type: "llm-config-result", success: true, config });
|
|
165
|
+
} catch {
|
|
166
|
+
server._send(ws, {
|
|
167
|
+
id,
|
|
168
|
+
type: "error",
|
|
169
|
+
code: reading ? "LLM_CONFIG_READ_FAILED" : "LLM_CONFIG_SAVE_FAILED",
|
|
170
|
+
message: reading
|
|
171
|
+
? "Could not read LLM configuration"
|
|
172
|
+
: "Could not save LLM connection; check protocol, endpoint, model and channel key",
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export async function handleLlmAccount(server, id, ws, message) {
|
|
178
|
+
try {
|
|
179
|
+
const { queryLkAccount } = await import("../../lib/lk-account.js");
|
|
180
|
+
const options = {};
|
|
181
|
+
for (const key of ["days", "scope", "model", "limit", "offset"])
|
|
182
|
+
if (message[key] !== undefined) options[key] = message[key];
|
|
183
|
+
const account = await queryLkAccount(options);
|
|
184
|
+
server._send(ws, {
|
|
185
|
+
id,
|
|
186
|
+
type: "llm-account-result",
|
|
187
|
+
success: true,
|
|
188
|
+
account,
|
|
189
|
+
});
|
|
190
|
+
} catch {
|
|
191
|
+
server._send(ws, {
|
|
192
|
+
id,
|
|
193
|
+
type: "error",
|
|
194
|
+
code: "LLM_ACCOUNT_FAILED",
|
|
195
|
+
message: "请先保存 LK 连接及 Key,并检查查询参数",
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
135
200
|
export function createWsMessageDispatcher(server) {
|
|
136
201
|
return {
|
|
137
202
|
async dispatch(clientId, ws, message) {
|
|
@@ -181,6 +246,9 @@ export function createWsMessageDispatcher(server) {
|
|
|
181
246
|
server._handlePermissionRulesSet(id, ws, message),
|
|
182
247
|
"config-set-secret": () =>
|
|
183
248
|
handleConfigSetSecret(server, id, ws, message),
|
|
249
|
+
"llm-config-get": () => handleLlmConnection(server, id, ws, message),
|
|
250
|
+
"llm-configure": () => handleLlmConnection(server, id, ws, message),
|
|
251
|
+
"llm-account": () => handleLlmAccount(server, id, ws, message),
|
|
184
252
|
"slash-command": () => server._handleSlashCommand(id, ws, message),
|
|
185
253
|
"session-answer": () => server._handleSessionAnswer(id, ws, message),
|
|
186
254
|
"approval-grants-list": () =>
|
|
@@ -454,14 +454,17 @@ export function withConfigLock(callback) {
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
/** Serialize an arbitrary in-process config mutation under the config lock. */
|
|
457
|
-
export function updateConfigAtomically(
|
|
457
|
+
export function updateConfigAtomically(
|
|
458
|
+
mutator,
|
|
459
|
+
{ resolveSecrets = true } = {},
|
|
460
|
+
) {
|
|
458
461
|
if (typeof mutator !== "function") {
|
|
459
462
|
throw new TypeError("Config mutator must be a function");
|
|
460
463
|
}
|
|
461
464
|
return withConfigLock(() => {
|
|
462
|
-
const config = loadConfig({ failIfUnavailable: true });
|
|
465
|
+
const config = loadConfig({ failIfUnavailable: true, resolveSecrets });
|
|
463
466
|
mutator(config);
|
|
464
|
-
saveConfig(config);
|
|
467
|
+
saveConfig(config, { preserveSecretRefs: resolveSecrets });
|
|
465
468
|
return config;
|
|
466
469
|
});
|
|
467
470
|
}
|
|
@@ -531,6 +534,7 @@ export function setSecretConfigValue(key, value, options = {}) {
|
|
|
531
534
|
// secret to plaintext configuration.
|
|
532
535
|
setNestedValue(config, key, secretRef(ref));
|
|
533
536
|
try {
|
|
537
|
+
options.storedValueMutator?.(config, secretRef(ref));
|
|
534
538
|
// This load kept every secret as its persisted reference, so bypass
|
|
535
539
|
// the resolved-value restoration cache and persist this exact raw
|
|
536
540
|
// document.
|
|
@@ -547,7 +551,11 @@ export function setSecretConfigValue(key, value, options = {}) {
|
|
|
547
551
|
ref,
|
|
548
552
|
resolved: String(value),
|
|
549
553
|
});
|
|
550
|
-
if (
|
|
554
|
+
if (
|
|
555
|
+
previousRef &&
|
|
556
|
+
previousRef !== ref &&
|
|
557
|
+
!containsSecretReference(config, previousRef)
|
|
558
|
+
) {
|
|
551
559
|
deleteSecretRefBestEffort(
|
|
552
560
|
store,
|
|
553
561
|
previousRef,
|
|
@@ -558,8 +566,9 @@ export function setSecretConfigValue(key, value, options = {}) {
|
|
|
558
566
|
}
|
|
559
567
|
}
|
|
560
568
|
setNestedValue(config, key, String(value));
|
|
569
|
+
options.storedValueMutator?.(config, String(value));
|
|
561
570
|
saveConfig(config, { preserveSecretRefs: false });
|
|
562
|
-
if (previousRef) {
|
|
571
|
+
if (previousRef && !containsSecretReference(config, previousRef)) {
|
|
563
572
|
let previousStore = options.secretStore || null;
|
|
564
573
|
if (!previousStore) {
|
|
565
574
|
try {
|
|
@@ -580,6 +589,15 @@ export function setSecretConfigValue(key, value, options = {}) {
|
|
|
580
589
|
);
|
|
581
590
|
}
|
|
582
591
|
|
|
592
|
+
function containsSecretReference(value, ref) {
|
|
593
|
+
if (isSecretRef(value)) return value.__cc_secret_ref === ref;
|
|
594
|
+
return (
|
|
595
|
+
value &&
|
|
596
|
+
typeof value === "object" &&
|
|
597
|
+
Object.values(value).some((child) => containsSecretReference(child, ref))
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
|
|
583
601
|
export function resetConfig() {
|
|
584
602
|
const configPath = getConfigPath();
|
|
585
603
|
ensurePrivateDirectory(dirname(configPath), {
|
package/src/lib/config-schema.js
CHANGED
|
@@ -66,6 +66,11 @@ const DESCRIPTORS = [
|
|
|
66
66
|
descriptor("llm.apiKeyHelper", ["string", "null"], {
|
|
67
67
|
description: "Command that prints an API key to stdout",
|
|
68
68
|
}),
|
|
69
|
+
descriptor("llm.savedConnections", "object", {
|
|
70
|
+
open: true,
|
|
71
|
+
description:
|
|
72
|
+
"Endpoint-scoped saved LLM connections; API keys remain secret",
|
|
73
|
+
}),
|
|
69
74
|
descriptor("llm.baseUrl", "string", {
|
|
70
75
|
default: DEFAULT_CONFIG.llm.baseUrl,
|
|
71
76
|
description: "LLM provider API endpoint",
|
|
@@ -520,11 +525,11 @@ function valueIssue(key, code, message) {
|
|
|
520
525
|
function isPersistedSecretRef(value) {
|
|
521
526
|
return Boolean(
|
|
522
527
|
value &&
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
+
typeof value === "object" &&
|
|
529
|
+
!Array.isArray(value) &&
|
|
530
|
+
Object.keys(value).length === 1 &&
|
|
531
|
+
typeof value.__cc_secret_ref === "string" &&
|
|
532
|
+
value.__cc_secret_ref.length > 0,
|
|
528
533
|
);
|
|
529
534
|
}
|
|
530
535
|
|
|
@@ -5,7 +5,10 @@ import { types } from "node:util";
|
|
|
5
5
|
import { ensurePrivateDirectory, ensurePrivateFile } from "../secure-fs.js";
|
|
6
6
|
import { withFileLock } from "../with-file-lock.js";
|
|
7
7
|
import { evolutionPrivateStorageOptions } from "./evolution-private-storage.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
createEvolutionPhysicalStateReader,
|
|
10
|
+
captureEvolutionPhysicalStateReaderDirectoryBoundary,
|
|
11
|
+
} from "./evolution-physical-state-reader.js";
|
|
9
12
|
import {
|
|
10
13
|
createEvolutionWitnessSegments,
|
|
11
14
|
EVOLUTION_SEGMENTED_WITNESS_SCHEMA,
|
|
@@ -31,6 +34,7 @@ const MAXIMUM_CACHED_RECORDS = 1024;
|
|
|
31
34
|
const MAXIMUM_CACHED_TEXT_BYTES = 16 * 1024 * 1024;
|
|
32
35
|
const MAXIMUM_TRUST_EPOCH_CHARS = 256;
|
|
33
36
|
const MAXIMUM_TRUST_EPOCH_RETRIES = 2;
|
|
37
|
+
const DIRECTORY_BOUNDARIES = new WeakMap();
|
|
34
38
|
const STORE_KEYS = new Set([
|
|
35
39
|
"current",
|
|
36
40
|
"discardedAnchors",
|
|
@@ -918,5 +922,64 @@ export function createEvolutionFileWitness({
|
|
|
918
922
|
"evolution-ledger-witness-ancestry",
|
|
919
923
|
);
|
|
920
924
|
};
|
|
921
|
-
|
|
925
|
+
const witness = Object.freeze(port);
|
|
926
|
+
const stateBoundary =
|
|
927
|
+
captureEvolutionPhysicalStateReaderDirectoryBoundary(rootReader);
|
|
928
|
+
let capturedSegmentReader;
|
|
929
|
+
let directoryBoundary;
|
|
930
|
+
const captureDirectories = () => {
|
|
931
|
+
if (!directoryBoundary || capturedSegmentReader !== segmentReader) {
|
|
932
|
+
// A legacy witness need not have segmented storage. Only the reader
|
|
933
|
+
// already owned by this witness may supply that role: capture never
|
|
934
|
+
// creates a directory or adopts a caller-created pathname.
|
|
935
|
+
const segmentBoundary = segmentReader
|
|
936
|
+
? captureEvolutionPhysicalStateReaderDirectoryBoundary(segmentReader)
|
|
937
|
+
: null;
|
|
938
|
+
const descriptor = Object.freeze({
|
|
939
|
+
schema: "chainlesschain.evolution-file-witness-directory-boundaries/v1",
|
|
940
|
+
scope: segmentBoundary
|
|
941
|
+
? "original-witness-state-and-segment-directories"
|
|
942
|
+
: "original-witness-state-directory",
|
|
943
|
+
state: stateBoundary.descriptor,
|
|
944
|
+
segments: segmentBoundary?.descriptor ?? null,
|
|
945
|
+
fileContentsVerified: false,
|
|
946
|
+
storageInventoryVerified: false,
|
|
947
|
+
retentionStorageVerified: false,
|
|
948
|
+
fullPhysicalStorageGraphVerified: false,
|
|
949
|
+
grantsMutationOrPromotionAuthority: false,
|
|
950
|
+
});
|
|
951
|
+
const recheck = (...args) => {
|
|
952
|
+
if (args.length)
|
|
953
|
+
throw new TypeError("witness directory boundary takes no context");
|
|
954
|
+
stateBoundary.recheck();
|
|
955
|
+
segmentBoundary?.recheck();
|
|
956
|
+
stateBoundary.recheck();
|
|
957
|
+
return descriptor;
|
|
958
|
+
};
|
|
959
|
+
directoryBoundary = Object.freeze({
|
|
960
|
+
descriptor,
|
|
961
|
+
recheck: Object.freeze(recheck),
|
|
962
|
+
});
|
|
963
|
+
capturedSegmentReader = segmentReader;
|
|
964
|
+
}
|
|
965
|
+
directoryBoundary.recheck();
|
|
966
|
+
return directoryBoundary;
|
|
967
|
+
};
|
|
968
|
+
captureDirectories();
|
|
969
|
+
DIRECTORY_BOUNDARIES.set(witness, captureDirectories);
|
|
970
|
+
return witness;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/** Original readers only; no leaf reads, lock, repair or lazy segment capture. */
|
|
974
|
+
export function captureEvolutionFileWitnessDirectoryBoundaries(witness) {
|
|
975
|
+
if (arguments.length !== 1)
|
|
976
|
+
throw new TypeError("witness directory capture takes one original witness");
|
|
977
|
+
const capture = DIRECTORY_BOUNDARIES.get(witness);
|
|
978
|
+
if (!capture) throw new TypeError("an original file witness is required");
|
|
979
|
+
return capture();
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/** Pure ownership probe: never inspects caller methods, getters or proxies. */
|
|
983
|
+
export function hasEvolutionFileWitnessDirectoryBoundaries(witness) {
|
|
984
|
+
return DIRECTORY_BOUNDARIES.has(witness);
|
|
922
985
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createEvolutionFileWitness,
|
|
5
|
+
captureEvolutionFileWitnessDirectoryBoundaries,
|
|
6
|
+
} from "./evolution-file-witness.js";
|
|
4
7
|
import {
|
|
5
8
|
EvolutionLedger,
|
|
6
9
|
captureEvolutionLedgerMigrationSource,
|
|
@@ -14,6 +17,7 @@ export const EVOLUTION_LEDGER_FILE_BACKEND_SCHEMA =
|
|
|
14
17
|
const BACKENDS = new WeakSet();
|
|
15
18
|
const BACKEND_BINDINGS = new WeakMap();
|
|
16
19
|
const SOURCE_DIRECTORY_BOUNDARIES = new WeakMap();
|
|
20
|
+
const ORIGINAL_WITNESSES = new WeakMap();
|
|
17
21
|
|
|
18
22
|
function requiredString(value, label) {
|
|
19
23
|
if (typeof value !== "string" || value.trim() === "") {
|
|
@@ -209,7 +213,9 @@ export function createEvolutionLedgerFileBackend({
|
|
|
209
213
|
});
|
|
210
214
|
const sourceDirectoryBoundary =
|
|
211
215
|
captureEvolutionLedgerDirectoryBoundary(sourceLedger);
|
|
216
|
+
captureEvolutionFileWitnessDirectoryBoundaries(witness);
|
|
212
217
|
BACKENDS.add(backend);
|
|
218
|
+
ORIGINAL_WITNESSES.set(backend, witness);
|
|
213
219
|
SOURCE_DIRECTORY_BOUNDARIES.set(backend, sourceDirectoryBoundary);
|
|
214
220
|
BACKEND_BINDINGS.set(
|
|
215
221
|
backend,
|
|
@@ -256,3 +262,14 @@ export function captureEvolutionLedgerFileBackendSourceDirectoryBoundary(
|
|
|
256
262
|
boundary.recheck();
|
|
257
263
|
return boundary;
|
|
258
264
|
}
|
|
265
|
+
|
|
266
|
+
/** Resolve the actual factory witness, never the public descriptor or methods. */
|
|
267
|
+
export function captureEvolutionLedgerFileBackendWitnessDirectoryBoundaries(
|
|
268
|
+
value,
|
|
269
|
+
) {
|
|
270
|
+
if (arguments.length !== 1)
|
|
271
|
+
throw new TypeError("witness directory capture takes one original backend");
|
|
272
|
+
const witness = ORIGINAL_WITNESSES.get(value);
|
|
273
|
+
if (!witness) throw new TypeError("an original file backend is required");
|
|
274
|
+
return captureEvolutionFileWitnessDirectoryBoundaries(witness);
|
|
275
|
+
}
|