chainlesschain 0.162.101 → 0.162.103
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 +1 -1
- package/package.json +2 -2
- package/scripts/postinstall.mjs +33 -3
- package/src/assets/web-panel/assets/{AIOps-NeD6mA1O.js → AIOps-BpJ5yCcV.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-Bhp7A7vO.js → ActionButton-B1uBfxnA.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DgdI84Jy.js → Analytics-0ubw5quf.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-Qw29caa7.js → AppLayout-go-GyyM_.js} +4 -4
- package/src/assets/web-panel/assets/{Audit-DgkzhBjz.js → Audit-CdUfoUnM.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CiWEQoW5.js → Backup-CBn0xtsa.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BWNbkeDF.js → BaseInput-a9fqTkvL.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-CUcj4Vyd.js → Chat-D-d_IatD.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-bAMNCgEj.js → ChatBubbleRenderer-Co9h0SbA.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-B0uZTW8f.js → Checkbox-CiKEjtXm.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BPk7b-Xa.js → Codegen-OQxW_9Z2.js} +1 -1
- package/src/assets/web-panel/assets/{Col-C2cV_dw4.js → Col-BZHXUEnZ.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CDN6Yggb.js → Community-D3xno9fj.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-C4WPtW_V.js → Compact-D62jpZk_.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-BGUfeH-3.js → Compliance-D4jFTAcQ.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CsnVgF-o.js → Cowork-BOU_wir4.js} +3 -3
- package/src/assets/web-panel/assets/{Cron--rGanASk.js → Cron-Cr9BlJA7.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-D_CLrd-0.js → Crosschain-L9M--CXb.js} +1 -1
- package/src/assets/web-panel/assets/{DID-iYkbVc8W.js → DID-xFu3-VWT.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-CuFMU98t.js → Dashboard--ax48T3j.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-BPSjv_Ye.js → Dropdown-CTOS8daR.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-DBmk7czO.js → EmailListRenderer-CNLSX81U.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-BaCArN11.js → FamilyGuardDashboard-5EjFynBc.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DsTV-8Ca.js → Federation-CoPyIWIu.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-C6fRr_6F.js → FormItemContext-BbzCNbYy.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-AfuZCfyv.js → GenericCardRenderer-8_9_uXY0.js} +1 -1
- package/src/assets/web-panel/assets/{Git-CAFIrGhb.js → Git-Bz_qlVPg.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-C-NaxDs4.js → Governance-7eepNCeD.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BPfeNZP7.js → Inference-DlBx5l1g.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DDUBte_m.js → KnowledgeGraph-BPkc--rM.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DWysA6JP.js → Logs-BQw4nPvS.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-CAK68hXc.js → Marketplace-Cil3SdgN.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-CNmmoDAk.js → McpTools-Bnch7KrG.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-D_KmFoui.js → Memory-assQ3Suc.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-CaY-6kjj.js → MobileBridge-D5mE8c-z.js} +2 -2
- package/src/assets/web-panel/assets/MobileProjects-C4MiDXw1.js +1 -0
- package/src/assets/web-panel/assets/{Mtc-YnLrtuXT.js → Mtc-CumojeLk.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-D38v836u.js → MtcAudit-3tTBc_fw.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-Dv3ad9S4.js → Multisig-Dl4IJBsl.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-MYTh2eWC.js → NLProgramming-DHN_cV9x.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DYO-0Hva.js → Notes-DeyTvwYk.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-D39gOb3h.js → NotificationSettings-BUkj8mTj.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-CXdO0z3I.js → OrderTableRenderer-BMpEXTki.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-DOYTwQwt.js → Organization-B6Ogmkpz.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-Cm-go0yU.js → Overflow-DRUE-2Wz.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CakGtorw.js → P2P-CnMUkd64.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-BlmbHJnb.js → PdhVaultBrowser-B3nFxT3b.js} +4 -4
- package/src/assets/web-panel/assets/{Permissions-C_podo04.js → Permissions-CyG1FR7v.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-nBbehIKp.js → PersonalDataHub-BmN6YMb5.js} +3 -3
- package/src/assets/web-panel/assets/{Pipeline-CGzQUoKv.js → Pipeline-BZcamAnH.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-BuD-Dd9m.js → Privacy-D7_zsaY3.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CLcFmGXU.js → ProjectInit-DNa7XQjg.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-BxXTR0dH.js → ProjectSettings-KH2Dm09G.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-DkpBjAfd.js → Projects-T-WqR3D6.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-DwHK42ht.js → Providers-8GtQ6GgR.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-idJPKErk.js → QuickAsk-BuBM5Zpg.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BvJj0Nu2.js → Recommend-DvH95W1b.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-BK9l4Rcf.js → Reputation-BHCpMEP6.js} +1 -1
- package/src/assets/web-panel/assets/{Row-rLxg7xk5.js → Row-BnMPysBm.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Cw6ZcHBY.js → RssFeed-C-T8B5VU.js} +3 -3
- package/src/assets/web-panel/assets/{Search-D8mKp506.js → Search-CioiZGkX.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CXunojmQ.js → Security-zSApKqdd.js} +4 -4
- package/src/assets/web-panel/assets/{Services-BE5DgmPl.js → Services-CQh0UDXC.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CssL5wmE.js → Skeleton-C0dRaEVG.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-zyS_1YrT.js → Skills-BgQRArsa.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DIVn2Roa.js → Sla-BNn7F3jc.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CjNdZWdj.js → SpeechSettings-kvVfKfqv.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-BCbu5WQT.js → SyncSettings-BwIkkX1E.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-BjFrgXge.js → Tasks-BkcvhBZw.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-Cl4Y3lKN.js → Templates-COK0o2pL.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-k1T0F_eH.js → Tenant-DpK87fqo.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-i0tHF8fy.js → Terminal-2g2-XPT_.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-FmPaNyqK.js → TimelineRenderer-B4SJqyqf.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-BUWEiyab.js → Tokens-C3iSR8fH.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-9srMXwpo.js → Trigger-D1Oo58Yo.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-hmGor_R2.js → Trust-CUhy4DDc.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Dst7K10a.js → UkeySign-r-kTqSw8.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-D_utUv1u.js → VideoEditing-B8MyBfCX.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-BpYTTseI.js → Wallet-CquTfSv0.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-CEIw8QrF.js → WebAuthn-BC7TP1H3.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-Bkb4bUZ_.js → WorkflowEditor-CELBSNbP.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CTqDgGRH.js → chat-d66mbO2i.js} +1 -1
- package/src/assets/web-panel/assets/{colors-CnJHVFLk.js → colors-D0WRCg20.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-D4-v0ahl.js → compact-item-4__-8TIi.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CYDbnHZX.js → createContext-Dqsf52js.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-DUAmX0aE.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-CbYwlEz5.js → hasIn-ClTZOS8I.js} +1 -1
- package/src/assets/web-panel/assets/{index-DVKfa-z4.js → index-0Axwx1nN.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cl7-mbsb.js → index-81SaeU6t.js} +1 -1
- package/src/assets/web-panel/assets/{index-CK8nROWH.js → index-B1TGSkBt.js} +1 -1
- package/src/assets/web-panel/assets/{index-BygyTsjr.js → index-B3vrmn5v.js} +1 -1
- package/src/assets/web-panel/assets/{index-B78d_-pR.js → index-BCOpbfAH.js} +1 -1
- package/src/assets/web-panel/assets/index-BLCwqv8j.js +1 -0
- package/src/assets/web-panel/assets/{index-YuO8gxKb.js → index-BNKECBZm.js} +1 -1
- package/src/assets/web-panel/assets/{index-tmNsJzQU.js → index-BwozLU75.js} +1 -1
- package/src/assets/web-panel/assets/{index-dKpwhR5x.js → index-C4_XhCJS.js} +1 -1
- package/src/assets/web-panel/assets/{index-BNz3yht2.js → index-C5l6tSky.js} +1 -1
- package/src/assets/web-panel/assets/{index-4767GEls.js → index-CFwkeSun.js} +1 -1
- package/src/assets/web-panel/assets/{index-BCQ4kcL3.js → index-CGf3oqM0.js} +1 -1
- package/src/assets/web-panel/assets/{index-xDe5BkjU.js → index-CJKyF-y8.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjFQuno4.js → index-Cg8Qw3Jw.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dl_NdY39.js → index-Cops66s2.js} +3 -3
- package/src/assets/web-panel/assets/{index-D8MYVsVB.js → index-Ct5SJenr.js} +1 -1
- package/src/assets/web-panel/assets/{index-CY971z_9.js → index-CxoWS8hl.js} +1 -1
- package/src/assets/web-panel/assets/{index-CVc_5aBF.js → index-D-ya3Ohe.js} +1 -1
- package/src/assets/web-panel/assets/{index-C4chfOjw.js → index-D68tyHYa.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR4facv0.js → index-D9x6i7iV.js} +1 -1
- package/src/assets/web-panel/assets/{index-CxKdSB-p.js → index-DDLjwgva.js} +1 -1
- package/src/assets/web-panel/assets/{index-B-hiXmVK.js → index-DORg0Hps.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR0FfrCL.js → index-DQaGurrQ.js} +1 -1
- package/src/assets/web-panel/assets/index-Db5JRQ6E.js +1 -0
- package/src/assets/web-panel/assets/{index-5NXdAIZK.js → index-DbY1lv1z.js} +1 -1
- package/src/assets/web-panel/assets/{index-BOUSaCsn.js → index-Dm7CYK3j.js} +1 -1
- package/src/assets/web-panel/assets/{index-DxvFrsxl.js → index-DpLhC0nx.js} +1 -1
- package/src/assets/web-panel/assets/{index-qNwkSspX.js → index-P4X9zSF2.js} +1 -1
- package/src/assets/web-panel/assets/{index-OqmUv5QO.js → index-PAiWA2un.js} +1 -1
- package/src/assets/web-panel/assets/{index-B8uhiRML.js → index-PMJ4tBAA.js} +1 -1
- package/src/assets/web-panel/assets/{index-CfshMjFN.js → index-Yi5Lr63I.js} +1 -1
- package/src/assets/web-panel/assets/{index-wxz2s6uW.js → index-ZZpfHd4J.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdRtpQFq.js → index-b7a5aEX9.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2fICr5d.js → index-e5zJLrJQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGUOVPjO.js → index-fi2ikHoc.js} +1 -1
- package/src/assets/web-panel/assets/{index-8cmtr1jC.js → index-jAPphbJL.js} +1 -1
- package/src/assets/web-panel/assets/{index-DMKNVIqJ.js → index-leuwRsbf.js} +1 -1
- package/src/assets/web-panel/assets/{index-CP-UKwu8.js → index-luisYDBz.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaCCLe7i.js → index-we9-1IbF.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-qCQgpAty.js → initDefaultProps-zqDf7qWv.js} +1 -1
- package/src/assets/web-panel/assets/{motion-SkVSGdwu.js → motion-DRqTooll.js} +1 -1
- package/src/assets/web-panel/assets/{move-BpWxaW_x.js → move-N8tkRqS4.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DlZWM2H4.js → omit-Cy01f2vw.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-DobtUnVe.js → pickAttrs-C2ycNXNi.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-CD6mYRZi.js → placementArrow-D60Xb1j9.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DvIIMTD_.js → responsiveObserve-BF8Y-1HQ.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CVgyUfaA.js → slide-DDi6zYZf.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DrUDnjy_.js → statusUtils-CWPq6UzA.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-BNYQS60m.js → styleChecker-D4zVyb4w.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DYv7Tvk0.js → useFlexGapSupport-BEMNO3oR.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-DmAD2atJ.js → useFs-DBLO8VR7.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DbLVKA3I.js → usePersonalDataHub-C83ZIrPY.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-C3WEt6_P.js → vnode-Dcfyve-7.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-CRoSX_oZ.js → zoom-Dg6uoWSc.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/__tests__/hub-health.test.js +105 -0
- package/src/commands/__tests__/hub-stats.test.js +106 -0
- 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 +111 -32
- 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/gateways/ws/personal-data-hub-protocol.js +16 -3
- 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/personal-data-hub-wiring.js +135 -7
- package/src/lib/plan-mode.js +3 -2
- package/src/repl/__tests__/mcp-prompt.test.js +155 -0
- package/src/repl/__tests__/slash-macro.test.js +81 -0
- package/src/runtime/__tests__/coding-agent-contract-shared.test.js +136 -0
- package/src/runtime/__tests__/coding-agent-events.test.js +263 -0
- package/src/assets/web-panel/assets/MobileProjects-DhDxrWze.js +0 -1
- package/src/assets/web-panel/assets/devWarning-OhxeajH6.js +0 -1
- package/src/assets/web-panel/assets/index-Bbtoi_47.js +0 -1
- package/src/assets/web-panel/assets/index-Cb8RWwaB.js +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* resolveSlashMacro tests (previously untested) — the REPL's user-command-macro
|
|
5
|
+
* wire (.claude/commands/*.md). The routing safety matters: a leading `/name`
|
|
6
|
+
* that resolves to a macro is expanded, but plain text or an unknown `/...`
|
|
7
|
+
* (e.g. asking about "/etc/hosts") must pass through verbatim to the LLM and
|
|
8
|
+
* never be swallowed. Deps (getCommand/expandCommand) are injected; no I/O.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { describe, it, expect, vi } from "vitest";
|
|
12
|
+
import { resolveSlashMacro } from "../slash-macro.js";
|
|
13
|
+
|
|
14
|
+
const deps = (macro, expand = { prompt: "EXPANDED", warnings: [] }) => ({
|
|
15
|
+
getCommand: vi.fn(() => macro),
|
|
16
|
+
expandCommand: vi.fn(() => expand),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
describe("resolveSlashMacro", () => {
|
|
20
|
+
it("returns plain text unchanged (no slash)", async () => {
|
|
21
|
+
const r = await resolveSlashMacro(" just a question ", {
|
|
22
|
+
deps: deps(null),
|
|
23
|
+
});
|
|
24
|
+
expect(r.matched).toBe(false);
|
|
25
|
+
expect(r.promptText).toBe("just a question"); // trimmed
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("passes an unknown /... through verbatim (does not swallow /etc/hosts)", async () => {
|
|
29
|
+
const d = deps(null);
|
|
30
|
+
const r = await resolveSlashMacro("/etc/hosts is interesting", { deps: d });
|
|
31
|
+
expect(r.matched).toBe(false);
|
|
32
|
+
expect(r.promptText).toBe("/etc/hosts is interesting");
|
|
33
|
+
// first token after the slash was probed, but no macro matched
|
|
34
|
+
expect(d.getCommand).toHaveBeenCalledWith("etc/hosts", expect.any(String));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("expands a resolved macro and reports its name/scope", async () => {
|
|
38
|
+
const macro = { name: "deploy", scope: "project" };
|
|
39
|
+
const d = deps(macro);
|
|
40
|
+
const r = await resolveSlashMacro("/deploy prod fast", {
|
|
41
|
+
deps: d,
|
|
42
|
+
cwd: "/proj",
|
|
43
|
+
});
|
|
44
|
+
expect(r.matched).toBe(true);
|
|
45
|
+
expect(r.promptText).toBe("EXPANDED");
|
|
46
|
+
expect(r.name).toBe("deploy");
|
|
47
|
+
expect(r.scope).toBe("project");
|
|
48
|
+
expect(d.getCommand).toHaveBeenCalledWith("deploy", "/proj");
|
|
49
|
+
expect(d.expandCommand).toHaveBeenCalledWith(macro, ["prod", "fast"], {
|
|
50
|
+
cwd: "/proj",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("propagates warnings from expandCommand", async () => {
|
|
55
|
+
const d = deps(
|
|
56
|
+
{ name: "x", scope: "personal" },
|
|
57
|
+
{
|
|
58
|
+
prompt: "P",
|
|
59
|
+
warnings: ["missing $2"],
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
const r = await resolveSlashMacro("/x a", { deps: d });
|
|
63
|
+
expect(r.warnings).toEqual(["missing $2"]);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("does not treat a bare '/' as a command", async () => {
|
|
67
|
+
const d = deps({ name: "should-not-fire", scope: "project" });
|
|
68
|
+
const r = await resolveSlashMacro("/", { deps: d });
|
|
69
|
+
expect(r.matched).toBe(false);
|
|
70
|
+
expect(d.getCommand).not.toHaveBeenCalled(); // empty head → never probed
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("handles empty/nullish input", async () => {
|
|
74
|
+
expect((await resolveSlashMacro("", { deps: deps(null) })).matched).toBe(
|
|
75
|
+
false,
|
|
76
|
+
);
|
|
77
|
+
expect(
|
|
78
|
+
(await resolveSlashMacro(null, { deps: deps(null) })).promptText,
|
|
79
|
+
).toBe("");
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* coding-agent-contract-shared tests (previously untested) — the single source
|
|
5
|
+
* of truth for the coding agent's tool surface (the function-calling contracts
|
|
6
|
+
* the LLM sees). Rather than hardcode the whole table, this pins the accessor
|
|
7
|
+
* contracts + cross-table invariants: every listed name resolves to a contract
|
|
8
|
+
* AND a function definition, lookups return defensive clones, unknown -> null,
|
|
9
|
+
* the OpenAI function-tool shape, names/tier filtering, MVP/extension membership
|
|
10
|
+
* and the policy projection. Anchored on the stable `read_file` tool. No I/O.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, it, expect } from "vitest";
|
|
14
|
+
import { createRequire } from "module";
|
|
15
|
+
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const {
|
|
18
|
+
CODING_AGENT_MVP_TOOL_NAMES,
|
|
19
|
+
CODING_AGENT_EXTENSION_TOOL_NAMES,
|
|
20
|
+
getCodingAgentFunctionToolDefinition,
|
|
21
|
+
getCodingAgentFunctionToolDefinitions,
|
|
22
|
+
getCodingAgentToolContract,
|
|
23
|
+
getCodingAgentToolContracts,
|
|
24
|
+
getCodingAgentToolPolicy,
|
|
25
|
+
isCodingAgentMvpTool,
|
|
26
|
+
listCodingAgentToolNames,
|
|
27
|
+
} = require("../coding-agent-contract-shared.cjs");
|
|
28
|
+
|
|
29
|
+
describe("listCodingAgentToolNames + consistency", () => {
|
|
30
|
+
it("returns a non-empty list of unique names including read_file", () => {
|
|
31
|
+
const names = listCodingAgentToolNames();
|
|
32
|
+
expect(names.length).toBeGreaterThan(0);
|
|
33
|
+
expect(new Set(names).size).toBe(names.length);
|
|
34
|
+
expect(names).toContain("read_file");
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("every listed name resolves to both a contract and a function definition", () => {
|
|
38
|
+
for (const n of listCodingAgentToolNames()) {
|
|
39
|
+
expect(getCodingAgentToolContract(n)).toBeTruthy();
|
|
40
|
+
expect(getCodingAgentFunctionToolDefinition(n)).toBeTruthy();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe("getCodingAgentToolContract", () => {
|
|
46
|
+
it("returns the contract for a known tool", () => {
|
|
47
|
+
const c = getCodingAgentToolContract("read_file");
|
|
48
|
+
expect(c.name).toBe("read_file");
|
|
49
|
+
expect(c.tier).toBe("mvp");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("returns null for an unknown tool", () => {
|
|
53
|
+
expect(getCodingAgentToolContract("__nope__")).toBe(null);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("returns a defensive clone (mutation does not leak back)", () => {
|
|
57
|
+
const a = getCodingAgentToolContract("read_file");
|
|
58
|
+
a.name = "MUTATED";
|
|
59
|
+
expect(getCodingAgentToolContract("read_file").name).toBe("read_file");
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
describe("getCodingAgentFunctionToolDefinition", () => {
|
|
64
|
+
it("emits an OpenAI function-tool definition for a known tool", () => {
|
|
65
|
+
const def = getCodingAgentFunctionToolDefinition("read_file");
|
|
66
|
+
expect(def.type).toBe("function");
|
|
67
|
+
expect(def.function.name).toBe("read_file");
|
|
68
|
+
expect(typeof def.function.description).toBe("string");
|
|
69
|
+
expect(def.function.parameters.type).toBe("object");
|
|
70
|
+
expect(def.function.parameters.required).toContain("path");
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("returns null for an unknown tool", () => {
|
|
74
|
+
expect(getCodingAgentFunctionToolDefinition("__nope__")).toBe(null);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
describe("getCodingAgentFunctionToolDefinitions filtering", () => {
|
|
79
|
+
it("filters by an explicit names allow-list", () => {
|
|
80
|
+
const defs = getCodingAgentFunctionToolDefinitions({
|
|
81
|
+
names: ["read_file"],
|
|
82
|
+
});
|
|
83
|
+
expect(defs).toHaveLength(1);
|
|
84
|
+
expect(defs[0].function.name).toBe("read_file");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("treats an empty names array as no filter (returns all)", () => {
|
|
88
|
+
const all = getCodingAgentFunctionToolDefinitions();
|
|
89
|
+
expect(getCodingAgentFunctionToolDefinitions({ names: [] })).toHaveLength(
|
|
90
|
+
all.length,
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it("returns [] for unknown names", () => {
|
|
95
|
+
expect(
|
|
96
|
+
getCodingAgentFunctionToolDefinitions({ names: ["__nope__"] }),
|
|
97
|
+
).toHaveLength(0);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
describe("tier filtering", () => {
|
|
102
|
+
it("getCodingAgentToolContracts({tier}) returns only that tier", () => {
|
|
103
|
+
const mvp = getCodingAgentToolContracts({ tier: "mvp" });
|
|
104
|
+
expect(mvp.length).toBeGreaterThan(0);
|
|
105
|
+
expect(mvp.every((t) => t.tier === "mvp")).toBe(true);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
describe("isCodingAgentMvpTool + membership", () => {
|
|
110
|
+
it("is true for every MVP name and false for unknown", () => {
|
|
111
|
+
for (const n of CODING_AGENT_MVP_TOOL_NAMES)
|
|
112
|
+
expect(isCodingAgentMvpTool(n)).toBe(true);
|
|
113
|
+
expect(isCodingAgentMvpTool("__nope__")).toBe(false);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("MVP and extension names are all valid tool names", () => {
|
|
117
|
+
const all = new Set(listCodingAgentToolNames());
|
|
118
|
+
for (const n of CODING_AGENT_MVP_TOOL_NAMES) expect(all.has(n)).toBe(true);
|
|
119
|
+
for (const n of CODING_AGENT_EXTENSION_TOOL_NAMES)
|
|
120
|
+
expect(all.has(n)).toBe(true);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
describe("getCodingAgentToolPolicy", () => {
|
|
125
|
+
it("projects the policy fields for a known tool", () => {
|
|
126
|
+
const p = getCodingAgentToolPolicy("read_file");
|
|
127
|
+
expect(p).toHaveProperty("tier");
|
|
128
|
+
expect(p).toHaveProperty("riskLevel");
|
|
129
|
+
expect(p).toHaveProperty("permissions");
|
|
130
|
+
expect(typeof p.planModeBehavior).toBe("string"); // defaults to "standard"
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("returns null for an unknown tool", () => {
|
|
134
|
+
expect(getCodingAgentToolPolicy("__nope__")).toBe(null);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* coding-agent-events tests (previously untested) — the unified event protocol
|
|
5
|
+
* shared by the CLI runtime, Desktop Main and the Renderer. Pins the contract:
|
|
6
|
+
* mapLegacyType normalization, the per-requestId monotonic SequenceTracker,
|
|
7
|
+
* createCodingAgentEvent envelope shaping (type normalize, id/eventId alias,
|
|
8
|
+
* sessionId/requestId resolution, sequence rules, meta sanitization, source
|
|
9
|
+
* default), wrapLegacyMessage, and validateCodingAgentEvent (version/type/
|
|
10
|
+
* eventId/payload checks). A fresh tracker is injected per test to avoid the
|
|
11
|
+
* module-global default tracker leaking state. No I/O.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { describe, it, expect } from "vitest";
|
|
15
|
+
import { createRequire } from "module";
|
|
16
|
+
|
|
17
|
+
const require = createRequire(import.meta.url);
|
|
18
|
+
const {
|
|
19
|
+
CODING_AGENT_EVENT_VERSION,
|
|
20
|
+
CODING_AGENT_EVENT_TYPES,
|
|
21
|
+
LEGACY_TO_UNIFIED_TYPE,
|
|
22
|
+
CodingAgentSequenceTracker,
|
|
23
|
+
createCodingAgentEvent,
|
|
24
|
+
wrapLegacyMessage,
|
|
25
|
+
validateCodingAgentEvent,
|
|
26
|
+
mapLegacyType,
|
|
27
|
+
} = require("../coding-agent-events.cjs");
|
|
28
|
+
|
|
29
|
+
const VALID_TYPE = Object.values(CODING_AGENT_EVENT_TYPES)[0];
|
|
30
|
+
const newTracker = () => new CodingAgentSequenceTracker();
|
|
31
|
+
|
|
32
|
+
describe("mapLegacyType", () => {
|
|
33
|
+
it("returns null for falsy input", () => {
|
|
34
|
+
expect(mapLegacyType(null)).toBe(null);
|
|
35
|
+
expect(mapLegacyType("")).toBe(null);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("maps a known legacy type to its canonical form", () => {
|
|
39
|
+
const entries = Object.entries(LEGACY_TO_UNIFIED_TYPE);
|
|
40
|
+
expect(entries.length).toBeGreaterThan(0);
|
|
41
|
+
const [legacy, unified] = entries[0];
|
|
42
|
+
expect(mapLegacyType(legacy)).toBe(unified);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("passes an unknown type through unchanged", () => {
|
|
46
|
+
expect(mapLegacyType("totally.unknown.type")).toBe("totally.unknown.type");
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
describe("CodingAgentSequenceTracker", () => {
|
|
51
|
+
it("increments strictly per requestId", () => {
|
|
52
|
+
const t = newTracker();
|
|
53
|
+
expect(t.next("r1")).toBe(1);
|
|
54
|
+
expect(t.next("r1")).toBe(2);
|
|
55
|
+
expect(t.next("r1")).toBe(3);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("keeps separate requestIds independent", () => {
|
|
59
|
+
const t = newTracker();
|
|
60
|
+
expect(t.next("a")).toBe(1);
|
|
61
|
+
expect(t.next("b")).toBe(1);
|
|
62
|
+
expect(t.next("a")).toBe(2);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("returns 0 for a falsy requestId without advancing", () => {
|
|
66
|
+
const t = newTracker();
|
|
67
|
+
expect(t.next(null)).toBe(0);
|
|
68
|
+
expect(t.next(null)).toBe(0);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("peek reads without advancing; reset clears", () => {
|
|
72
|
+
const t = newTracker();
|
|
73
|
+
t.next("r");
|
|
74
|
+
expect(t.peek("r")).toBe(1);
|
|
75
|
+
expect(t.peek("r")).toBe(1);
|
|
76
|
+
t.reset("r");
|
|
77
|
+
expect(t.next("r")).toBe(1); // back to start
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
describe("createCodingAgentEvent", () => {
|
|
82
|
+
it("throws on a non-object payload", () => {
|
|
83
|
+
expect(() => createCodingAgentEvent(VALID_TYPE, "nope")).toThrow(TypeError);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("produces a versioned envelope with eventId/id alias and defaults", () => {
|
|
87
|
+
const ev = createCodingAgentEvent(
|
|
88
|
+
VALID_TYPE,
|
|
89
|
+
{ x: 1 },
|
|
90
|
+
{ tracker: newTracker() },
|
|
91
|
+
);
|
|
92
|
+
expect(ev.version).toBe(CODING_AGENT_EVENT_VERSION);
|
|
93
|
+
expect(ev.type).toBe(VALID_TYPE);
|
|
94
|
+
expect(ev.eventId).toBeTruthy();
|
|
95
|
+
expect(ev.id).toBe(ev.eventId); // legacy alias
|
|
96
|
+
expect(ev.source).toBe("desktop-main"); // default source
|
|
97
|
+
expect(ev.payload).toEqual({ x: 1 });
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("normalizes a legacy type alias", () => {
|
|
101
|
+
const [legacy, unified] = Object.entries(LEGACY_TO_UNIFIED_TYPE)[0];
|
|
102
|
+
expect(
|
|
103
|
+
createCodingAgentEvent(legacy, {}, { tracker: newTracker() }).type,
|
|
104
|
+
).toBe(unified);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it("resolves sessionId/requestId from context, falling back to payload", () => {
|
|
108
|
+
const fromCtx = createCodingAgentEvent(
|
|
109
|
+
VALID_TYPE,
|
|
110
|
+
{},
|
|
111
|
+
{
|
|
112
|
+
sessionId: "s1",
|
|
113
|
+
requestId: "r1",
|
|
114
|
+
tracker: newTracker(),
|
|
115
|
+
},
|
|
116
|
+
);
|
|
117
|
+
expect(fromCtx.sessionId).toBe("s1");
|
|
118
|
+
expect(fromCtx.requestId).toBe("r1");
|
|
119
|
+
|
|
120
|
+
const fromPayload = createCodingAgentEvent(
|
|
121
|
+
VALID_TYPE,
|
|
122
|
+
{ sessionId: "sp", id: "rp" },
|
|
123
|
+
{
|
|
124
|
+
tracker: newTracker(),
|
|
125
|
+
},
|
|
126
|
+
);
|
|
127
|
+
expect(fromPayload.sessionId).toBe("sp");
|
|
128
|
+
expect(fromPayload.requestId).toBe("rp");
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it("uses an explicit integer sequence when provided", () => {
|
|
132
|
+
const ev = createCodingAgentEvent(
|
|
133
|
+
VALID_TYPE,
|
|
134
|
+
{},
|
|
135
|
+
{ sequence: 7, tracker: newTracker() },
|
|
136
|
+
);
|
|
137
|
+
expect(ev.sequence).toBe(7);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("auto-increments sequence via the tracker for a requestId", () => {
|
|
141
|
+
const tracker = newTracker();
|
|
142
|
+
const a = createCodingAgentEvent(
|
|
143
|
+
VALID_TYPE,
|
|
144
|
+
{},
|
|
145
|
+
{ requestId: "r", tracker },
|
|
146
|
+
);
|
|
147
|
+
const b = createCodingAgentEvent(
|
|
148
|
+
VALID_TYPE,
|
|
149
|
+
{},
|
|
150
|
+
{ requestId: "r", tracker },
|
|
151
|
+
);
|
|
152
|
+
expect(a.sequence).toBe(1);
|
|
153
|
+
expect(b.sequence).toBe(2);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it("leaves sequence null when there is no requestId and no explicit value", () => {
|
|
157
|
+
const ev = createCodingAgentEvent(
|
|
158
|
+
VALID_TYPE,
|
|
159
|
+
{},
|
|
160
|
+
{ tracker: newTracker() },
|
|
161
|
+
);
|
|
162
|
+
expect(ev.sequence).toBe(null);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("honors an explicit eventId and timestamp", () => {
|
|
166
|
+
const ev = createCodingAgentEvent(
|
|
167
|
+
VALID_TYPE,
|
|
168
|
+
{},
|
|
169
|
+
{
|
|
170
|
+
eventId: "fixed-id",
|
|
171
|
+
timestamp: 1234,
|
|
172
|
+
tracker: newTracker(),
|
|
173
|
+
},
|
|
174
|
+
);
|
|
175
|
+
expect(ev.eventId).toBe("fixed-id");
|
|
176
|
+
expect(ev.timestamp).toBe(1234);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it("strips envelope fields accidentally placed in meta", () => {
|
|
180
|
+
const ev = createCodingAgentEvent(
|
|
181
|
+
VALID_TYPE,
|
|
182
|
+
{},
|
|
183
|
+
{
|
|
184
|
+
meta: {
|
|
185
|
+
sessionId: "x",
|
|
186
|
+
requestId: "y",
|
|
187
|
+
sequence: 9,
|
|
188
|
+
source: "z",
|
|
189
|
+
eventId: "e",
|
|
190
|
+
keep: "ok",
|
|
191
|
+
},
|
|
192
|
+
tracker: newTracker(),
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
expect(ev.meta).toEqual({ keep: "ok" });
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
describe("wrapLegacyMessage", () => {
|
|
200
|
+
it("throws for a non-object message", () => {
|
|
201
|
+
expect(() => wrapLegacyMessage(null)).toThrow(TypeError);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it("splits {type, ...payload} and resolves requestId from message.id", () => {
|
|
205
|
+
const ev = wrapLegacyMessage(
|
|
206
|
+
{ type: VALID_TYPE, id: "req-9", foo: "bar" },
|
|
207
|
+
{ tracker: newTracker() },
|
|
208
|
+
);
|
|
209
|
+
expect(ev.type).toBe(VALID_TYPE);
|
|
210
|
+
expect(ev.requestId).toBe("req-9");
|
|
211
|
+
expect(ev.payload.foo).toBe("bar");
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
describe("validateCodingAgentEvent", () => {
|
|
216
|
+
const valid = () =>
|
|
217
|
+
createCodingAgentEvent(VALID_TYPE, {}, { tracker: newTracker() });
|
|
218
|
+
|
|
219
|
+
it("accepts a freshly created envelope", () => {
|
|
220
|
+
expect(validateCodingAgentEvent(valid())).toEqual({
|
|
221
|
+
valid: true,
|
|
222
|
+
errors: [],
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it("rejects a non-object", () => {
|
|
227
|
+
const r = validateCodingAgentEvent(null);
|
|
228
|
+
expect(r.valid).toBe(false);
|
|
229
|
+
expect(r.errors[0]).toMatch(/object/);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
it("flags a wrong version", () => {
|
|
233
|
+
const r = validateCodingAgentEvent({ ...valid(), version: "v0" });
|
|
234
|
+
expect(r.valid).toBe(false);
|
|
235
|
+
expect(r.errors.some((e) => /version/.test(e))).toBe(true);
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
it("flags a missing or non-whitelisted type", () => {
|
|
239
|
+
expect(
|
|
240
|
+
validateCodingAgentEvent({ ...valid(), type: undefined }).errors.some(
|
|
241
|
+
(e) => /type is required/.test(e),
|
|
242
|
+
),
|
|
243
|
+
).toBe(true);
|
|
244
|
+
expect(
|
|
245
|
+
validateCodingAgentEvent({ ...valid(), type: "bogus.type" }).errors.some(
|
|
246
|
+
(e) => /whitelist/.test(e),
|
|
247
|
+
),
|
|
248
|
+
).toBe(true);
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
it("flags a missing eventId and a non-object payload", () => {
|
|
252
|
+
expect(
|
|
253
|
+
validateCodingAgentEvent({ ...valid(), eventId: undefined }).errors.some(
|
|
254
|
+
(e) => /eventId/.test(e),
|
|
255
|
+
),
|
|
256
|
+
).toBe(true);
|
|
257
|
+
expect(
|
|
258
|
+
validateCodingAgentEvent({ ...valid(), payload: "x" }).errors.some((e) =>
|
|
259
|
+
/payload/.test(e),
|
|
260
|
+
),
|
|
261
|
+
).toBe(true);
|
|
262
|
+
});
|
|
263
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as n,J as g,c as l,K as r,N as u,P as h,U as o,R as t,Q as b}from"./vendor-BvqAck49.js";import{_ as v,b as m}from"./index-Dl_NdY39.js";import{a7 as M,M as y}from"./icons-DP3uiYxy.js";const B={__name:"MobileProjects",setup(p,{expose:i}){i();const c=u(),{t:e}=m();function a(){c.push("/projects")}function _(){c.push("/mobile-bridge")}const s={router:c,t:e,goToProjects:a,goToMobileBridge:_,get useRouter(){return u},get useI18n(){return m},get MobileOutlined(){return y},get FolderOutlined(){return M}};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}},x={class:"mobile-projects-placeholder"},O={class:"title"},k={class:"subtitle"},w={class:"explainer"};function T(p,i,c,e,a,_){const s=n("a-alert"),d=n("a-button"),f=n("a-space"),P=n("a-empty"),j=n("a-card");return h(),g("div",x,[l(j,null,{default:r(()=>[l(P,{description:!1},{image:r(()=>[l(e.MobileOutlined,{style:{fontSize:"64px",color:"#bfbfbf"}})]),default:r(()=>[o("h2",O,t(e.t("mobileProjects.title")),1),o("p",k,t(e.t("mobileProjects.subtitle")),1),l(s,{message:e.t("mobileProjects.v02Banner"),type:"info","show-icon":"",class:"banner"},null,8,["message"]),o("div",w,[o("h3",null,t(e.t("mobileProjects.currentDirection")),1),o("p",null,t(e.t("mobileProjects.currentDirectionBody")),1),o("ul",null,[o("li",null,t(e.t("mobileProjects.stepPhone")),1),o("li",null,t(e.t("mobileProjects.stepTap")),1),o("li",null,t(e.t("mobileProjects.stepPull")),1)]),o("h3",null,t(e.t("mobileProjects.reverseDirection")),1),o("p",null,t(e.t("mobileProjects.reverseDirectionBody")),1)]),l(f,{class:"actions"},{default:r(()=>[l(d,{type:"primary",onClick:e.goToProjects},{default:r(()=>[l(e.FolderOutlined),b(" "+t(e.t("mobileProjects.viewLocalProjects")),1)]),_:1}),l(d,{onClick:e.goToMobileBridge},{default:r(()=>[l(e.MobileOutlined),b(" "+t(e.t("mobileProjects.checkBridge")),1)]),_:1})]),_:1})]),_:1})]),_:1})])}const N=v(B,[["render",T],["__scopeId","data-v-9262cc45"],["__file","/tmp/cc-web-panel-aMJ4KB/repo/packages/web-panel/src/views/MobileProjects.vue"]]);export{N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as r}from"./index-Dl_NdY39.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./Row-rLxg7xk5.js";import{U as t}from"./index-Dl_NdY39.js";import"./vendor-BvqAck49.js";import"./responsiveObserve-DvIIMTD_.js";import"./useFlexGapSupport-DYv7Tvk0.js";import"./styleChecker-BNYQS60m.js";import"./index-CxKdSB-p.js";import"./icons-DP3uiYxy.js";const l=t(o);export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./Col-C2cV_dw4.js";import{U as t}from"./index-Dl_NdY39.js";import"./vendor-BvqAck49.js";import"./index-CxKdSB-p.js";import"./icons-DP3uiYxy.js";const s=t(o);export{s as default};
|