cclawd 2026.3.32 → 2026.3.34
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/dist/.buildstamp +1 -1
- package/dist/{agents-Bg_6nINh.js → agents-Dyld1Y9W.js} +1 -1
- package/dist/{agents-DpCTT1k5.js → agents-sKzdFrEs.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/{channel-CpCgSOBB.js → channel-Cb_TWyxU.js} +11 -6
- package/dist/{channels-Beslqaus.js → channels-BPF8Wy44.js} +4 -4
- package/dist/{channels-cli-Db9Q_dFv.js → channels-cli-CrxiaUMv.js} +7 -7
- package/dist/{command-registry-cxuwbhx3.js → command-registry-BAWmFyJB.js} +7 -7
- package/dist/{command-registry-0XvAzqhE.js → command-registry-rwzbJ1w5.js} +2 -2
- package/dist/{completion-cli-CDckd4dj.js → completion-cli-D-NBATPl.js} +3 -3
- package/dist/{completion-cli-DopM19Bx.js → completion-cli-sluwucXI.js} +2 -2
- package/dist/{config-cli-BGXS1Dz0.js → config-cli-D1fPsRr1.js} +1 -1
- package/dist/{configure-Ddj3kLnA.js → configure-DjTTXlwN.js} +1 -1
- package/dist/{configure-CzQIRH-D.js → configure-F6PUQniU.js} +4 -4
- package/dist/{doctor-completion-BsywKEM9.js → doctor-completion-WcbYQyAy.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/cclawd-guard/index.js +106 -98
- package/dist/extensions/discord/node_modules/.package-lock.json +7 -7
- package/dist/extensions/discord/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/discord/node_modules/@types/node/events.d.ts +6 -9
- package/dist/extensions/discord/node_modules/@types/node/fs/promises.d.ts +24 -1
- package/dist/extensions/discord/node_modules/@types/node/fs.d.ts +126 -6
- package/dist/extensions/discord/node_modules/@types/node/http2.d.ts +16 -1
- package/dist/extensions/discord/node_modules/@types/node/package.json +3 -3
- package/dist/extensions/discord/node_modules/@types/node/process.d.ts +29 -24
- package/dist/extensions/discord/node_modules/@types/node/sqlite.d.ts +54 -7
- package/dist/extensions/discord/node_modules/@types/node/stream/web.d.ts +4 -0
- package/dist/extensions/discord/node_modules/@types/node/stream.d.ts +1 -1
- package/dist/extensions/discord/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/dist/extensions/discord/node_modules/@types/node/test.d.ts +55 -4
- package/dist/extensions/discord/node_modules/@types/node/url.d.ts +27 -3
- package/dist/extensions/discord/node_modules/@types/node/vm.d.ts +50 -85
- package/dist/extensions/discord/node_modules/undici-types/client.d.ts +5 -0
- package/dist/extensions/discord/node_modules/undici-types/connector.d.ts +2 -0
- package/dist/extensions/discord/node_modules/undici-types/dispatcher.d.ts +8 -5
- package/dist/extensions/discord/node_modules/undici-types/errors.d.ts +17 -1
- package/dist/extensions/discord/node_modules/undici-types/index.d.ts +4 -1
- package/dist/extensions/discord/node_modules/undici-types/interceptors.d.ts +7 -0
- package/dist/extensions/discord/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/discord/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/dist/extensions/discord/node_modules/undici-types/webidl.d.ts +6 -0
- package/dist/extensions/discord/node_modules/undici-types/websocket.d.ts +2 -0
- package/dist/extensions/feishu/index.js +2 -2
- package/dist/extensions/feishu/node_modules/.package-lock.json +19 -19
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/es/index.js +478 -244
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/lib/index.js +478 -244
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/dist/extensions/feishu/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +157 -3
- package/dist/extensions/feishu/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/feishu/node_modules/@types/node/events.d.ts +6 -9
- package/dist/extensions/feishu/node_modules/@types/node/fs/promises.d.ts +24 -1
- package/dist/extensions/feishu/node_modules/@types/node/fs.d.ts +126 -6
- package/dist/extensions/feishu/node_modules/@types/node/http2.d.ts +16 -1
- package/dist/extensions/feishu/node_modules/@types/node/package.json +3 -3
- package/dist/extensions/feishu/node_modules/@types/node/process.d.ts +29 -24
- package/dist/extensions/feishu/node_modules/@types/node/sqlite.d.ts +54 -7
- package/dist/extensions/feishu/node_modules/@types/node/stream/web.d.ts +4 -0
- package/dist/extensions/feishu/node_modules/@types/node/stream.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/@types/node/test.d.ts +55 -4
- package/dist/extensions/feishu/node_modules/@types/node/url.d.ts +27 -3
- package/dist/extensions/feishu/node_modules/@types/node/vm.d.ts +50 -85
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.js +39 -13
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/dist/extensions/feishu/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/dist/extensions/feishu/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.js +74 -43
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/dist/extensions/feishu/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/index.d.ts +18 -5
- package/dist/extensions/feishu/node_modules/protobufjs/package.json +1 -1
- package/dist/extensions/feishu/node_modules/protobufjs/src/namespace.js +11 -5
- package/dist/extensions/feishu/node_modules/protobufjs/src/parse.js +35 -30
- package/dist/extensions/feishu/node_modules/protobufjs/src/root.js +4 -2
- package/dist/extensions/feishu/node_modules/protobufjs/src/service.js +4 -2
- package/dist/extensions/feishu/node_modules/protobufjs/src/type.js +4 -2
- package/dist/extensions/feishu/node_modules/protobufjs/src/util.js +14 -0
- package/dist/extensions/feishu/node_modules/undici-types/client.d.ts +5 -0
- package/dist/extensions/feishu/node_modules/undici-types/connector.d.ts +2 -0
- package/dist/extensions/feishu/node_modules/undici-types/dispatcher.d.ts +8 -5
- package/dist/extensions/feishu/node_modules/undici-types/errors.d.ts +17 -1
- package/dist/extensions/feishu/node_modules/undici-types/index.d.ts +4 -1
- package/dist/extensions/feishu/node_modules/undici-types/interceptors.d.ts +7 -0
- package/dist/extensions/feishu/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/feishu/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/dist/extensions/feishu/node_modules/undici-types/webidl.d.ts +6 -0
- package/dist/extensions/feishu/node_modules/undici-types/websocket.d.ts +2 -0
- package/dist/extensions/feishu/node_modules/ws/lib/sender.js +6 -1
- package/dist/extensions/feishu/node_modules/ws/package.json +1 -1
- package/dist/extensions/feishu/node_modules/zod/README.md +1 -18
- package/dist/extensions/feishu/node_modules/zod/locales/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/mini/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/package.json +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/dist/extensions/feishu/node_modules/zod/src/v3/tests/object.test.ts +5 -5
- package/dist/extensions/feishu/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/errors.ts +2 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/external.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/from-json-schema.ts +39 -23
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/parse.ts +6 -6
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/schemas.ts +414 -151
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/assignability.test.ts +6 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/catch.test.ts +50 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/codec.test.ts +142 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/continuability.test.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/datetime.test.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/default.test.ts +44 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +34 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +214 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +161 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/function.test.ts +6 -6
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/index.test.ts +2 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/number.test.ts +55 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/object.test.ts +83 -6
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/optional.test.ts +114 -4
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/partial.test.ts +24 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/prefault.test.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +69 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/record.test.ts +85 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +49 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/refine.test.ts +63 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/string.test.ts +50 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +4 -4
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +150 -15
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/transform.test.ts +17 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/tuple.test.ts +315 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/classic/tests/union.test.ts +54 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/api.ts +31 -6
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/checks.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/core.ts +17 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/errors.ts +31 -24
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/json-schema-processors.ts +17 -18
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/parse.ts +7 -7
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/regexes.ts +8 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/schemas.ts +263 -71
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +22 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +58 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/to-json-schema.ts +10 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/util.ts +52 -35
- package/dist/extensions/feishu/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/en.ts +4 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/fr.ts +24 -8
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/index.ts +3 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/it.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/ka.ts +8 -8
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/external.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/schemas.ts +56 -25
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/tests/codec.test.ts +19 -0
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/tests/index.test.ts +32 -2
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/tests/object.test.ts +9 -9
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +51 -1
- package/dist/extensions/feishu/node_modules/zod/src/v4/mini/tests/string.test.ts +5 -0
- package/dist/extensions/feishu/node_modules/zod/v3/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4/classic/errors.js +2 -2
- package/dist/extensions/feishu/node_modules/zod/v4/classic/external.d.cts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/classic/external.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/classic/from-json-schema.cjs +31 -16
- package/dist/extensions/feishu/node_modules/zod/v4/classic/from-json-schema.js +31 -16
- package/dist/extensions/feishu/node_modules/zod/v4/classic/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4/classic/schemas.cjs +358 -119
- package/dist/extensions/feishu/node_modules/zod/v4/classic/schemas.d.cts +42 -14
- package/dist/extensions/feishu/node_modules/zod/v4/classic/schemas.d.ts +42 -14
- package/dist/extensions/feishu/node_modules/zod/v4/classic/schemas.js +356 -118
- package/dist/extensions/feishu/node_modules/zod/v4/core/api.cjs +7 -2
- package/dist/extensions/feishu/node_modules/zod/v4/core/api.d.cts +26 -5
- package/dist/extensions/feishu/node_modules/zod/v4/core/api.d.ts +26 -5
- package/dist/extensions/feishu/node_modules/zod/v4/core/api.js +7 -2
- package/dist/extensions/feishu/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/core.cjs +3 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/core.js +4 -2
- package/dist/extensions/feishu/node_modules/zod/v4/core/errors.cjs +26 -23
- package/dist/extensions/feishu/node_modules/zod/v4/core/errors.d.cts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/errors.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/errors.js +26 -23
- package/dist/extensions/feishu/node_modules/zod/v4/core/json-schema-processors.cjs +16 -20
- package/dist/extensions/feishu/node_modules/zod/v4/core/json-schema-processors.js +16 -20
- package/dist/extensions/feishu/node_modules/zod/v4/core/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/parse.cjs +7 -7
- package/dist/extensions/feishu/node_modules/zod/v4/core/parse.js +7 -7
- package/dist/extensions/feishu/node_modules/zod/v4/core/regexes.cjs +9 -3
- package/dist/extensions/feishu/node_modules/zod/v4/core/regexes.d.cts +6 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/regexes.d.ts +6 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/regexes.js +7 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/schemas.cjs +211 -65
- package/dist/extensions/feishu/node_modules/zod/v4/core/schemas.d.cts +39 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/schemas.d.ts +39 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/schemas.js +210 -64
- package/dist/extensions/feishu/node_modules/zod/v4/core/to-json-schema.cjs +12 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/to-json-schema.js +12 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/util.cjs +54 -30
- package/dist/extensions/feishu/node_modules/zod/v4/core/util.d.cts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/util.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/core/util.js +55 -32
- package/dist/extensions/feishu/node_modules/zod/v4/core/versions.cjs +2 -2
- package/dist/extensions/feishu/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/core/versions.js +2 -2
- package/dist/extensions/feishu/node_modules/zod/v4/locales/el.cjs +136 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/el.js +109 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/en.cjs +4 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/en.js +4 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/fr.cjs +24 -7
- package/dist/extensions/feishu/node_modules/zod/v4/locales/fr.js +24 -7
- package/dist/extensions/feishu/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/hr.js +122 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/index.cjs +8 -1
- package/dist/extensions/feishu/node_modules/zod/v4/locales/index.d.cts +3 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/index.d.ts +3 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/index.js +3 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/it.cjs +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/locales/it.js +1 -1
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ka.js +8 -8
- package/dist/extensions/feishu/node_modules/zod/v4/locales/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/ro.js +119 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/locales/uz.js +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/mini/external.d.cts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/mini/external.d.ts +1 -0
- package/dist/extensions/feishu/node_modules/zod/v4/mini/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4/mini/schemas.cjs +41 -4
- package/dist/extensions/feishu/node_modules/zod/v4/mini/schemas.d.cts +28 -10
- package/dist/extensions/feishu/node_modules/zod/v4/mini/schemas.d.ts +28 -10
- package/dist/extensions/feishu/node_modules/zod/v4/mini/schemas.js +40 -4
- package/dist/extensions/feishu/node_modules/zod/v4/package.json +2 -1
- package/dist/extensions/feishu/node_modules/zod/v4-mini/package.json +2 -1
- package/dist/extensions/feishu/setup-entry.js +1 -1
- package/dist/extensions/slack/node_modules/.package-lock.json +80 -37
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js +7 -2
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -3
- package/dist/extensions/slack/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/bolt/package.json +6 -5
- package/dist/extensions/slack/node_modules/@slack/socket-mode/dist/package.json +1 -1
- package/dist/extensions/slack/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +7 -1
- package/dist/extensions/slack/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/socket-mode/package.json +1 -1
- package/dist/extensions/slack/node_modules/@slack/types/dist/block-kit/blocks.d.ts +71 -2
- package/dist/extensions/slack/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/types/dist/chunk.d.ts +11 -1
- package/dist/extensions/slack/node_modules/@slack/types/dist/chunk.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/types/package.json +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/file-upload.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/file-upload.js +4 -2
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/assistant.d.ts +15 -0
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/assistant.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/chat.d.ts +15 -0
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/chat.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/files.d.ts +10 -0
- package/dist/extensions/slack/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
- package/dist/extensions/slack/node_modules/@slack/web-api/package.json +5 -6
- package/dist/extensions/slack/node_modules/@types/node/README.md +1 -1
- package/dist/extensions/slack/node_modules/@types/node/events.d.ts +6 -9
- package/dist/extensions/slack/node_modules/@types/node/fs/promises.d.ts +24 -1
- package/dist/extensions/slack/node_modules/@types/node/fs.d.ts +126 -6
- package/dist/extensions/slack/node_modules/@types/node/http2.d.ts +16 -1
- package/dist/extensions/slack/node_modules/@types/node/package.json +3 -3
- package/dist/extensions/slack/node_modules/@types/node/process.d.ts +29 -24
- package/dist/extensions/slack/node_modules/@types/node/sqlite.d.ts +54 -7
- package/dist/extensions/slack/node_modules/@types/node/stream/web.d.ts +4 -0
- package/dist/extensions/slack/node_modules/@types/node/stream.d.ts +1 -1
- package/dist/extensions/slack/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/dist/extensions/slack/node_modules/@types/node/test.d.ts +55 -4
- package/dist/extensions/slack/node_modules/@types/node/url.d.ts +27 -3
- package/dist/extensions/slack/node_modules/@types/node/vm.d.ts +50 -85
- package/dist/extensions/slack/node_modules/agent-base/README.md +145 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/index.js +203 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/dist/extensions/slack/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/dist/extensions/slack/node_modules/agent-base/package.json +64 -0
- package/dist/extensions/slack/node_modules/agent-base/src/index.ts +345 -0
- package/dist/extensions/slack/node_modules/agent-base/src/promisify.ts +33 -0
- package/dist/extensions/slack/node_modules/axios/CHANGELOG.md +103 -6
- package/dist/extensions/slack/node_modules/axios/README.md +396 -25
- package/dist/extensions/slack/node_modules/axios/dist/axios.js +1455 -1109
- package/dist/extensions/slack/node_modules/axios/dist/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js +3 -3
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs +1569 -1174
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js +1569 -1173
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs +1395 -915
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/index.d.cts +25 -13
- package/dist/extensions/slack/node_modules/axios/index.d.ts +21 -4
- package/dist/extensions/slack/node_modules/axios/index.js +2 -0
- package/dist/extensions/slack/node_modules/axios/lib/adapters/adapters.js +4 -2
- package/dist/extensions/slack/node_modules/axios/lib/adapters/fetch.js +131 -11
- package/dist/extensions/slack/node_modules/axios/lib/adapters/http.js +298 -69
- package/dist/extensions/slack/node_modules/axios/lib/adapters/xhr.js +8 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/Axios.js +7 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosError.js +86 -1
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosHeaders.js +4 -33
- package/dist/extensions/slack/node_modules/axios/lib/core/dispatchRequest.js +19 -7
- package/dist/extensions/slack/node_modules/axios/lib/core/mergeConfig.js +6 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/settle.js +7 -11
- package/dist/extensions/slack/node_modules/axios/lib/defaults/index.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/env/data.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/buildURL.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/composeSignals.js +48 -47
- package/dist/extensions/slack/node_modules/axios/lib/helpers/cookies.js +14 -2
- package/dist/extensions/slack/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +28 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/formDataToJSON.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/formDataToStream.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/fromDataURI.js +18 -5
- package/dist/extensions/slack/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
- package/dist/extensions/slack/node_modules/axios/lib/helpers/resolveConfig.js +33 -17
- package/dist/extensions/slack/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/dist/extensions/slack/node_modules/axios/lib/helpers/shouldBypassProxy.js +26 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/validator.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/utils.js +35 -22
- package/dist/extensions/slack/node_modules/axios/package.json +19 -24
- package/dist/extensions/slack/node_modules/https-proxy-agent/README.md +137 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/dist/extensions/slack/node_modules/https-proxy-agent/package.json +56 -0
- package/dist/extensions/slack/node_modules/semver/README.md +19 -4
- package/dist/extensions/slack/node_modules/semver/bin/semver.js +14 -10
- package/dist/extensions/slack/node_modules/semver/functions/truncate.js +48 -0
- package/dist/extensions/slack/node_modules/semver/index.js +2 -0
- package/dist/extensions/slack/node_modules/semver/internal/re.js +1 -1
- package/dist/extensions/slack/node_modules/semver/package.json +3 -3
- package/dist/extensions/slack/node_modules/semver/range.bnf +5 -4
- package/dist/extensions/slack/node_modules/type-is/index.js +8 -18
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/README.md +69 -0
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/dist/index.d.ts +26 -0
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/dist/index.js +170 -0
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/dist/extensions/slack/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/dist/extensions/slack/node_modules/type-is/package.json +9 -5
- package/dist/extensions/slack/node_modules/undici-types/client.d.ts +5 -0
- package/dist/extensions/slack/node_modules/undici-types/connector.d.ts +2 -0
- package/dist/extensions/slack/node_modules/undici-types/dispatcher.d.ts +8 -5
- package/dist/extensions/slack/node_modules/undici-types/errors.d.ts +17 -1
- package/dist/extensions/slack/node_modules/undici-types/index.d.ts +4 -1
- package/dist/extensions/slack/node_modules/undici-types/interceptors.d.ts +7 -0
- package/dist/extensions/slack/node_modules/undici-types/package.json +1 -1
- package/dist/extensions/slack/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/dist/extensions/slack/node_modules/undici-types/webidl.d.ts +6 -0
- package/dist/extensions/slack/node_modules/undici-types/websocket.d.ts +2 -0
- package/dist/extensions/slack/node_modules/ws/lib/sender.js +6 -1
- package/dist/extensions/slack/node_modules/ws/package.json +1 -1
- package/dist/{feishu-BTpHzo5G.js → feishu-D7a16iAg.js} +1 -1
- package/dist/{gateway-cli-Ch7B6aM8.js → gateway-cli-S54JlV74.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{onboard-OE6pYdRG.js → onboard-PW9hb29_.js} +1 -1
- package/dist/{onboard-channels-sHUBIoou.js → onboard-channels-DPSYnvku.js} +3 -3
- package/dist/{onboard-channels-DG50alVJ.js → onboard-channels-DdliUHhn.js} +1 -1
- package/dist/plugin-sdk/extensions/feishu/src/real-person-auth.d.ts +2 -0
- package/dist/{program-B46UmuI1.js → program-Cug0d7ik.js} +2 -2
- package/dist/{prompt-select-styled-D0j2Uv3O.js → prompt-select-styled-DejmFjS5.js} +1 -1
- package/dist/{register.agent-xUUvZ9dt.js → register.agent-gpH-no5z.js} +4 -4
- package/dist/{register.configure-BTSJBrPt.js → register.configure-CNrxL42A.js} +4 -4
- package/dist/{register.maintenance-CoVoUKo3.js → register.maintenance-C46YsfoM.js} +5 -5
- package/dist/{register.onboard-BFnhs7Lp.js → register.onboard-i95q8Aff.js} +2 -2
- package/dist/{register.setup-D2ywkVlC.js → register.setup-DTWEak-e.js} +2 -2
- package/dist/{register.subclis-BFdkEfef.js → register.subclis-Bc4uRruJ.js} +1 -1
- package/dist/{register.subclis-CUyWOoJn.js → register.subclis-DQlt3qEC.js} +4 -4
- package/dist/{run-main-D-TG-N2a.js → run-main-Dio5aKnH.js} +7 -7
- package/dist/{setup-D2ijPozS.js → setup-BlGfaoB4.js} +2 -2
- package/dist/{setup.finalize-QASTq4yQ.js → setup.finalize-DmdKMaf3.js} +4 -4
- package/dist/{update-cli-CtNSQkFJ.js → update-cli-C5xkPfxO.js} +5 -5
- package/package.json +1 -1
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1778821873251,"head":"33af9820fbbb92c7a3447f0970231f6607315881"}
|
|
@@ -20,7 +20,7 @@ import { i as loadAgentIdentity, n as buildAgentSummaries, o as pruneAgentConfig
|
|
|
20
20
|
import { a as parseBindingSpecs, i as describeBinding, n as applyAgentBindings, o as removeAgentBindings, r as buildChannelBindings, t as requireValidConfigSnapshot } from "./config-validation-9iWWSktF.js";
|
|
21
21
|
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-Bkr-WsTr.js";
|
|
22
22
|
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-DdOY5kEs.js";
|
|
23
|
-
import { i as setupChannels } from "./onboard-channels-
|
|
23
|
+
import { i as setupChannels } from "./onboard-channels-DdliUHhn.js";
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
import fs from "node:fs/promises";
|
|
26
26
|
//#region src/commands/agents.command-shared.ts
|
|
@@ -252,9 +252,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
252
252
|
import "./shared-x4Yc8-25.js";
|
|
253
253
|
import "./setup-entry-CcHvI1Mu.js";
|
|
254
254
|
import "./reactions-CVOq_v6N.js";
|
|
255
|
-
import "./feishu-
|
|
255
|
+
import "./feishu-D7a16iAg.js";
|
|
256
256
|
import "./runtime-api-lhuSYASv.js";
|
|
257
|
-
import "./channel-
|
|
257
|
+
import "./channel-Cb_TWyxU.js";
|
|
258
258
|
import "./send-BIaD51-A.js";
|
|
259
259
|
import "./runtime-p5-el0rU.js";
|
|
260
260
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -303,7 +303,7 @@ import "./agents.config-siTlMqn8.js";
|
|
|
303
303
|
import "./provider-auth-choice-helpers-fXJv3eWi.js";
|
|
304
304
|
import "./provider-auth-guidance-DXgeysMX.js";
|
|
305
305
|
import "./config-validation-9iWWSktF.js";
|
|
306
|
-
import { t as agentsListCommand } from "./agents-
|
|
306
|
+
import { t as agentsListCommand } from "./agents-Dyld1Y9W.js";
|
|
307
307
|
import "./provider-auth-choices-D3uPSLCc.js";
|
|
308
308
|
import "./provider-wizard-D8q7vx9b.js";
|
|
309
309
|
import "./auth-choice-options-DGRXgwnh.js";
|
|
@@ -312,5 +312,5 @@ import "./provider-auth-choice-B6Vf-54o.js";
|
|
|
312
312
|
import "./auth-choice.apply-helpers-DnZSQbUl.js";
|
|
313
313
|
import "./provider-auth-choice-preference-MiQguMwm.js";
|
|
314
314
|
import "./auth-choice-DdOY5kEs.js";
|
|
315
|
-
import "./onboard-channels-
|
|
315
|
+
import "./onboard-channels-DdliUHhn.js";
|
|
316
316
|
export { agentsListCommand };
|
package/dist/build-info.json
CHANGED
|
@@ -1051,7 +1051,8 @@ async function checkFeishuRealPersonAuthStatus(params) {
|
|
|
1051
1051
|
if (status === "pending") return {
|
|
1052
1052
|
status: "pending",
|
|
1053
1053
|
verificationUrl: resolveVerificationUrl(certToken),
|
|
1054
|
-
certToken
|
|
1054
|
+
certToken,
|
|
1055
|
+
promptKind: userAuth.promptKind
|
|
1055
1056
|
};
|
|
1056
1057
|
return { status: "failed" };
|
|
1057
1058
|
}
|
|
@@ -1064,6 +1065,7 @@ async function resolveFeishuRealPersonAuthGate(params) {
|
|
|
1064
1065
|
params.log(`[real-person-auth] authH5BaseUrl: ${authH5BaseUrl}`);
|
|
1065
1066
|
const userAuth = authData[params.senderId];
|
|
1066
1067
|
const shouldForceFreshChallenge = params.forceChallenge === true;
|
|
1068
|
+
const promptKind = shouldForceFreshChallenge ? "high-risk" : userAuth?.promptKind ?? "first-contact";
|
|
1067
1069
|
if (!params.forceChallenge && userAuth?.authenticated) {
|
|
1068
1070
|
if (!userAuth.successNotified) {
|
|
1069
1071
|
authData[params.senderId] = {
|
|
@@ -1100,7 +1102,8 @@ async function resolveFeishuRealPersonAuthGate(params) {
|
|
|
1100
1102
|
if (status === "pending") return {
|
|
1101
1103
|
action: "block",
|
|
1102
1104
|
verificationUrl: `${authH5BaseUrl}/authhtml/index.html#/auth?certToken=${userAuth.certToken}&fromSource=Cclawd`,
|
|
1103
|
-
certToken: userAuth.certToken
|
|
1105
|
+
certToken: userAuth.certToken,
|
|
1106
|
+
promptKind
|
|
1104
1107
|
};
|
|
1105
1108
|
}
|
|
1106
1109
|
if (existingCertExpired) params.log(`[real-person-auth] existing certToken expired for ${params.senderId}, requesting a new QR code`);
|
|
@@ -1111,13 +1114,15 @@ async function resolveFeishuRealPersonAuthGate(params) {
|
|
|
1111
1114
|
authenticated: false,
|
|
1112
1115
|
certToken,
|
|
1113
1116
|
issuedAt: Date.now(),
|
|
1114
|
-
successNotified: false
|
|
1117
|
+
successNotified: false,
|
|
1118
|
+
promptKind
|
|
1115
1119
|
};
|
|
1116
1120
|
await writeRealPersonAuthStore(authFilePath, authData);
|
|
1117
1121
|
return {
|
|
1118
1122
|
action: "block",
|
|
1119
1123
|
verificationUrl: `${authH5BaseUrl}/authhtml/index.html#/auth?certToken=${certToken}&fromSource=Cclawd`,
|
|
1120
|
-
certToken
|
|
1124
|
+
certToken,
|
|
1125
|
+
promptKind
|
|
1121
1126
|
};
|
|
1122
1127
|
} catch (err) {
|
|
1123
1128
|
params.error(`resolveFeishuRealPersonAuthGate error: ${err.message}`, err);
|
|
@@ -1925,7 +1930,7 @@ const REAL_PERSON_AUTH_BYPASS_MARKER = "[cclawd-guard-bypass:real-person-auth-on
|
|
|
1925
1930
|
const HIGH_RISK_REAL_PERSON_AUTH_PATTERNS = [
|
|
1926
1931
|
/powershell(?:\s+)?-enc(?:oded)?\b/i,
|
|
1927
1932
|
/\b(?:curl|wget)\b[\s\S]{0,400}\|\s*(?:bash|sh|zsh|python|node|powershell)\b/i,
|
|
1928
|
-
/\brm\s+-rf\s+(?:\/|~|\$home|\/home)
|
|
1933
|
+
/\brm\s+-rf\b(?:\s+(?:\/|~|\$home|\/home|\.{1,2}|[A-Za-z]:\\)?)?/i,
|
|
1929
1934
|
/\bremove-item\b[\s\S]{0,240}\b-recurse\b[\s\S]{0,240}\b-force\b/i,
|
|
1930
1935
|
/\b(?:del\s+\/s\s+\/q|rmdir\s+\/s\s+\/q)\b/i,
|
|
1931
1936
|
/\b(?:mkfs(?:\.[a-z0-9]+)?|format\s+[a-z]:\s*\/\w|dd\s+if=\/dev\/(?:zero|random|urandom)\s+of=\/dev\/(?:sd|hd|nvme))\b/i,
|
|
@@ -2123,7 +2128,7 @@ async function handleFeishuMessage(params) {
|
|
|
2123
2128
|
});
|
|
2124
2129
|
activeAuthPollByKey.set(replayKey, pollPromise);
|
|
2125
2130
|
}
|
|
2126
|
-
await sendAuthPrompt(gate.verificationUrl,
|
|
2131
|
+
await sendAuthPrompt(gate.verificationUrl, gate.promptKind);
|
|
2127
2132
|
return;
|
|
2128
2133
|
}
|
|
2129
2134
|
if (gate.action === "allow-with-success") await sendAuthSuccess();
|
|
@@ -255,9 +255,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
255
255
|
import "./shared-x4Yc8-25.js";
|
|
256
256
|
import "./setup-entry-CcHvI1Mu.js";
|
|
257
257
|
import "./reactions-CVOq_v6N.js";
|
|
258
|
-
import "./feishu-
|
|
258
|
+
import "./feishu-D7a16iAg.js";
|
|
259
259
|
import "./runtime-api-lhuSYASv.js";
|
|
260
|
-
import "./channel-
|
|
260
|
+
import "./channel-Cb_TWyxU.js";
|
|
261
261
|
import "./send-BIaD51-A.js";
|
|
262
262
|
import "./runtime-p5-el0rU.js";
|
|
263
263
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -307,7 +307,7 @@ import { n as buildReadOnlySourceChannelAccountSnapshot, t as buildChannelAccoun
|
|
|
307
307
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-D1LfcYYR.js";
|
|
308
308
|
import { t as parseLogLine } from "./parse-log-line-fV0tN7JU.js";
|
|
309
309
|
import { i as describeBinding, n as applyAgentBindings, t as requireValidConfigSnapshot } from "./config-validation-9iWWSktF.js";
|
|
310
|
-
import { a as isCatalogChannelInstalled, r as runCollectedChannelOnboardingPostWriteHooks, t as createChannelOnboardingPostWriteHookCollector } from "./onboard-channels-
|
|
310
|
+
import { a as isCatalogChannelInstalled, r as runCollectedChannelOnboardingPostWriteHooks, t as createChannelOnboardingPostWriteHookCollector } from "./onboard-channels-DdliUHhn.js";
|
|
311
311
|
import fs from "node:fs/promises";
|
|
312
312
|
//#region src/commands/channels/add-mutators.ts
|
|
313
313
|
function applyAccountName(params) {
|
|
@@ -377,7 +377,7 @@ async function channelsAddCommand(opts, runtime = defaultRuntime, params) {
|
|
|
377
377
|
if (!cfg) return;
|
|
378
378
|
let nextConfig = cfg;
|
|
379
379
|
if (shouldUseWizard(params)) {
|
|
380
|
-
const [{ buildAgentSummaries }, { setupChannels }] = await Promise.all([import("./agents.config-Nk87RmV3.js"), import("./onboard-channels-
|
|
380
|
+
const [{ buildAgentSummaries }, { setupChannels }] = await Promise.all([import("./agents.config-Nk87RmV3.js"), import("./onboard-channels-DPSYnvku.js")]);
|
|
381
381
|
const prompter = createClackPrompter();
|
|
382
382
|
const postWriteHooks = createChannelOnboardingPostWriteHookCollector();
|
|
383
383
|
let selection = [];
|
|
@@ -365,25 +365,25 @@ function registerChannelsCli(program) {
|
|
|
365
365
|
])}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/channels", "docs.openclaw.ai/cli/channels")}\n`);
|
|
366
366
|
channels.command("list").description("List configured channels + auth profiles").option("--no-usage", "Skip model provider usage/quota snapshots").option("--json", "Output JSON", false).action(async (opts) => {
|
|
367
367
|
await runChannelsCommand(async () => {
|
|
368
|
-
const { channelsListCommand } = await import("./channels-
|
|
368
|
+
const { channelsListCommand } = await import("./channels-BPF8Wy44.js");
|
|
369
369
|
await channelsListCommand(opts, defaultRuntime);
|
|
370
370
|
});
|
|
371
371
|
});
|
|
372
372
|
channels.command("status").description("Show gateway channel status (use status --deep for local)").option("--probe", "Probe channel credentials", false).option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
373
373
|
await runChannelsCommand(async () => {
|
|
374
|
-
const { channelsStatusCommand } = await import("./channels-
|
|
374
|
+
const { channelsStatusCommand } = await import("./channels-BPF8Wy44.js");
|
|
375
375
|
await channelsStatusCommand(opts, defaultRuntime);
|
|
376
376
|
});
|
|
377
377
|
});
|
|
378
378
|
channels.command("capabilities").description("Show provider capabilities (intents/scopes + supported features)").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`).option("--account <id>", "Account id (only with --channel)").option("--target <dest>", "Channel target for permission audit (Discord channel:<id>)").option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
379
379
|
await runChannelsCommand(async () => {
|
|
380
|
-
const { channelsCapabilitiesCommand } = await import("./channels-
|
|
380
|
+
const { channelsCapabilitiesCommand } = await import("./channels-BPF8Wy44.js");
|
|
381
381
|
await channelsCapabilitiesCommand(opts, defaultRuntime);
|
|
382
382
|
});
|
|
383
383
|
});
|
|
384
384
|
channels.command("resolve").description("Resolve channel/user names to IDs").argument("<entries...>", "Entries to resolve (names or ids)").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (accountId)").option("--kind <kind>", "Target kind (auto|user|group)", "auto").option("--json", "Output JSON", false).action(async (entries, opts) => {
|
|
385
385
|
await runChannelsCommand(async () => {
|
|
386
|
-
const { channelsResolveCommand } = await import("./channels-
|
|
386
|
+
const { channelsResolveCommand } = await import("./channels-BPF8Wy44.js");
|
|
387
387
|
await channelsResolveCommand({
|
|
388
388
|
channel: opts.channel,
|
|
389
389
|
account: opts.account,
|
|
@@ -395,19 +395,19 @@ function registerChannelsCli(program) {
|
|
|
395
395
|
});
|
|
396
396
|
channels.command("logs").description("Show recent channel logs from the gateway log file").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`, "all").option("--lines <n>", "Number of lines (default: 200)", "200").option("--json", "Output JSON", false).action(async (opts) => {
|
|
397
397
|
await runChannelsCommand(async () => {
|
|
398
|
-
const { channelsLogsCommand } = await import("./channels-
|
|
398
|
+
const { channelsLogsCommand } = await import("./channels-BPF8Wy44.js");
|
|
399
399
|
await channelsLogsCommand(opts, defaultRuntime);
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
402
|
channels.command("add").description("Add or update a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--name <name>", "Display name for this account").option("--token <token>", "Bot token (Telegram/Discord)").option("--private-key <key>", "Nostr private key (nsec... or hex)").option("--token-file <path>", "Bot token file (Telegram)").option("--bot-token <token>", "Slack bot token (xoxb-...)").option("--app-token <token>", "Slack app token (xapp-...)").option("--signal-number <e164>", "Signal account number (E.164)").option("--cli-path <path>", "CLI path (signal-cli or imsg)").option("--db-path <path>", "iMessage database path").option("--service <service>", "iMessage service (imessage|sms|auto)").option("--region <region>", "iMessage region (for SMS)").option("--auth-dir <path>", "WhatsApp auth directory override").option("--http-url <url>", "Signal HTTP daemon base URL").option("--http-host <host>", "Signal HTTP host").option("--http-port <port>", "Signal HTTP port").option("--webhook-path <path>", "Webhook path (Google Chat/BlueBubbles)").option("--webhook-url <url>", "Google Chat webhook URL").option("--audience-type <type>", "Google Chat audience type (app-url|project-number)").option("--audience <value>", "Google Chat audience value (app URL or project number)").option("--homeserver <url>", "Matrix homeserver URL").option("--user-id <id>", "Matrix user ID").option("--access-token <token>", "Matrix access token").option("--password <password>", "Matrix password").option("--device-name <name>", "Matrix device name").option("--initial-sync-limit <n>", "Matrix initial sync limit").option("--ship <ship>", "Tlon ship name (~sampel-palnet)").option("--url <url>", "Tlon ship URL").option("--relay-urls <list>", "Nostr relay URLs (comma-separated)").option("--code <code>", "Tlon login code").option("--group-channels <list>", "Tlon group channels (comma-separated)").option("--dm-allowlist <list>", "Tlon DM allowlist (comma-separated ships)").option("--auto-discover-channels", "Tlon auto-discover group channels").option("--no-auto-discover-channels", "Disable Tlon auto-discovery").option("--use-env", "Use env token (default account only)", false).action(async (opts, command) => {
|
|
403
403
|
await runChannelsCommand(async () => {
|
|
404
|
-
const { channelsAddCommand } = await import("./channels-
|
|
404
|
+
const { channelsAddCommand } = await import("./channels-BPF8Wy44.js");
|
|
405
405
|
await channelsAddCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesAdd) });
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
channels.command("remove").description("Disable or delete a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--delete", "Delete config entries (no prompt)", false).action(async (opts, command) => {
|
|
409
409
|
await runChannelsCommand(async () => {
|
|
410
|
-
const { channelsRemoveCommand } = await import("./channels-
|
|
410
|
+
const { channelsRemoveCommand } = await import("./channels-BPF8Wy44.js");
|
|
411
411
|
await channelsRemoveCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesRemove) });
|
|
412
412
|
});
|
|
413
413
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as getPrimaryCommand, k as hasHelpOrVersion } from "./logger-kwZIqwuw.js";
|
|
2
|
-
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-
|
|
2
|
+
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-DQlt3qEC.js";
|
|
3
3
|
import { t as getCoreCliCommandDescriptors } from "./core-command-descriptors-CCqK_2TG.js";
|
|
4
4
|
//#region src/cli/program/command-registry.ts
|
|
5
5
|
const shouldRegisterCorePrimaryOnly = (argv) => {
|
|
@@ -14,7 +14,7 @@ const coreEntries = [
|
|
|
14
14
|
hasSubcommands: false
|
|
15
15
|
}],
|
|
16
16
|
register: async ({ program }) => {
|
|
17
|
-
(await import("./register.setup-
|
|
17
|
+
(await import("./register.setup-DTWEak-e.js")).registerSetupCommand(program);
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -24,7 +24,7 @@ const coreEntries = [
|
|
|
24
24
|
hasSubcommands: false
|
|
25
25
|
}],
|
|
26
26
|
register: async ({ program }) => {
|
|
27
|
-
(await import("./register.onboard-
|
|
27
|
+
(await import("./register.onboard-i95q8Aff.js")).registerOnboardCommand(program);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -34,7 +34,7 @@ const coreEntries = [
|
|
|
34
34
|
hasSubcommands: false
|
|
35
35
|
}],
|
|
36
36
|
register: async ({ program }) => {
|
|
37
|
-
(await import("./register.configure-
|
|
37
|
+
(await import("./register.configure-CNrxL42A.js")).registerConfigureCommand(program);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -44,7 +44,7 @@ const coreEntries = [
|
|
|
44
44
|
hasSubcommands: true
|
|
45
45
|
}],
|
|
46
46
|
register: async ({ program }) => {
|
|
47
|
-
(await import("./config-cli-
|
|
47
|
+
(await import("./config-cli-D1fPsRr1.js")).registerConfigCli(program);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -81,7 +81,7 @@ const coreEntries = [
|
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
register: async ({ program }) => {
|
|
84
|
-
(await import("./register.maintenance-
|
|
84
|
+
(await import("./register.maintenance-C46YsfoM.js")).registerMaintenanceCommands(program);
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
{
|
|
@@ -125,7 +125,7 @@ const coreEntries = [
|
|
|
125
125
|
hasSubcommands: true
|
|
126
126
|
}],
|
|
127
127
|
register: async ({ program, ctx }) => {
|
|
128
|
-
(await import("./register.agent-
|
|
128
|
+
(await import("./register.agent-gpH-no5z.js")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
{
|
|
@@ -7,7 +7,7 @@ import "./subsystem-DISldKSB.js";
|
|
|
7
7
|
import "./ansi-BEJF8NKS.js";
|
|
8
8
|
import "./boolean-C3GkJetE.js";
|
|
9
9
|
import "./env-Dnra1IpT.js";
|
|
10
|
-
import "./register.subclis-
|
|
10
|
+
import "./register.subclis-DQlt3qEC.js";
|
|
11
11
|
import "./core-command-descriptors-CCqK_2TG.js";
|
|
12
|
-
import { n as registerCoreCliByName } from "./command-registry-
|
|
12
|
+
import { n as registerCoreCliByName } from "./command-registry-BAWmFyJB.js";
|
|
13
13
|
export { registerCoreCliByName };
|
|
@@ -9,8 +9,8 @@ import "./boolean-C3GkJetE.js";
|
|
|
9
9
|
import "./env-Dnra1IpT.js";
|
|
10
10
|
import "./utils-CS0Ikux6.js";
|
|
11
11
|
import "./links-8xRhWBQL.js";
|
|
12
|
-
import { a as registerCompletionCli } from "./completion-cli-
|
|
13
|
-
import "./register.subclis-
|
|
14
|
-
import "./command-registry-
|
|
12
|
+
import { a as registerCompletionCli } from "./completion-cli-sluwucXI.js";
|
|
13
|
+
import "./register.subclis-DQlt3qEC.js";
|
|
14
|
+
import "./command-registry-BAWmFyJB.js";
|
|
15
15
|
import "./program-context-SgNgozNB.js";
|
|
16
16
|
export { registerCompletionCli };
|
|
@@ -3,8 +3,8 @@ import { r as theme } from "./theme-CdOoMzRk.js";
|
|
|
3
3
|
import { c as routeLogsToStderr } from "./subsystem-DISldKSB.js";
|
|
4
4
|
import { h as pathExists } from "./utils-CS0Ikux6.js";
|
|
5
5
|
import { t as formatDocsLink } from "./links-8xRhWBQL.js";
|
|
6
|
-
import { r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-
|
|
7
|
-
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-
|
|
6
|
+
import { r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-DQlt3qEC.js";
|
|
7
|
+
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-BAWmFyJB.js";
|
|
8
8
|
import { t as getProgramContext } from "./program-context-SgNgozNB.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import os from "node:os";
|
|
@@ -917,7 +917,7 @@ async function runConfigValidate(opts = {}) {
|
|
|
917
917
|
}
|
|
918
918
|
function registerConfigCli(program) {
|
|
919
919
|
const cmd = program.command("config").description("Non-interactive config helpers (get/set/unset/file/validate). Run without subcommand for guided setup.").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/config", "docs.openclaw.ai/cli/config")}\n`).option("--section <section>", "Configuration sections for guided setup (repeatable). Use with no subcommand.", (value, previous) => [...previous, value], []).action(async (opts) => {
|
|
920
|
-
const { configureCommandFromSectionsArg } = await import("./configure-
|
|
920
|
+
const { configureCommandFromSectionsArg } = await import("./configure-F6PUQniU.js");
|
|
921
921
|
await configureCommandFromSectionsArg(opts.section, defaultRuntime);
|
|
922
922
|
});
|
|
923
923
|
cmd.command("get").description("Get a config value by dot path").argument("<path>", "Config path (dot or bracket notation)").option("--json", "Output JSON", false).action(async (path, opts) => {
|
|
@@ -29,7 +29,7 @@ import { n as resolveProviderPluginChoice } from "./provider-wizard-D8q7vx9b.js"
|
|
|
29
29
|
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-Bkr-WsTr.js";
|
|
30
30
|
import { t as resolvePreferredProviderForAuthChoice } from "./provider-auth-choice-preference-MiQguMwm.js";
|
|
31
31
|
import { n as applyAuthChoice } from "./auth-choice-DdOY5kEs.js";
|
|
32
|
-
import { i as setupChannels, n as noteChannelStatus } from "./onboard-channels-
|
|
32
|
+
import { i as setupChannels, n as noteChannelStatus } from "./onboard-channels-DdliUHhn.js";
|
|
33
33
|
import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-BasN9UtI.js";
|
|
34
34
|
import { i as promptModelAllowlist, n as applyModelFallbacksFromSelection, r as promptDefaultModel, t as applyModelAllowlist } from "./model-picker-ewbext_V.js";
|
|
35
35
|
import { i as promptCustomApiConfig } from "./onboard-custom-ojsh_yzx.js";
|
|
@@ -259,9 +259,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
259
259
|
import "./shared-x4Yc8-25.js";
|
|
260
260
|
import "./setup-entry-CcHvI1Mu.js";
|
|
261
261
|
import "./reactions-CVOq_v6N.js";
|
|
262
|
-
import "./feishu-
|
|
262
|
+
import "./feishu-D7a16iAg.js";
|
|
263
263
|
import "./runtime-api-lhuSYASv.js";
|
|
264
|
-
import "./channel-
|
|
264
|
+
import "./channel-Cb_TWyxU.js";
|
|
265
265
|
import "./send-BIaD51-A.js";
|
|
266
266
|
import "./runtime-p5-el0rU.js";
|
|
267
267
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -324,8 +324,8 @@ import "./provider-auth-choice-B6Vf-54o.js";
|
|
|
324
324
|
import "./auth-choice.apply-helpers-DnZSQbUl.js";
|
|
325
325
|
import "./provider-auth-choice-preference-MiQguMwm.js";
|
|
326
326
|
import "./auth-choice-DdOY5kEs.js";
|
|
327
|
-
import "./onboard-channels-
|
|
328
|
-
import { n as configureCommandFromSectionsArg } from "./configure-
|
|
327
|
+
import "./onboard-channels-DdliUHhn.js";
|
|
328
|
+
import { n as configureCommandFromSectionsArg } from "./configure-DjTTXlwN.js";
|
|
329
329
|
import "./systemd-linger-BasN9UtI.js";
|
|
330
330
|
import "./model-picker-ewbext_V.js";
|
|
331
331
|
import "./onboard-custom-ojsh_yzx.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-ax52pETb.js";
|
|
2
2
|
import { n as resolveCliName } from "./cli-name-CgLQPAaK.js";
|
|
3
3
|
import { t as note } from "./note-CrfOOz26.js";
|
|
4
|
-
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-sluwucXI.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
package/dist/entry.js
CHANGED
|
@@ -200,7 +200,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
|
|
|
200
200
|
}
|
|
201
201
|
function runMainOrRootHelp(argv) {
|
|
202
202
|
if (tryHandleRootHelpFastPath(argv)) return;
|
|
203
|
-
import("./run-main-
|
|
203
|
+
import("./run-main-Dio5aKnH.js").then(({ runCli }) => runCli(argv)).catch((error) => {
|
|
204
204
|
console.error("[openclaw] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
205
205
|
process$1.exitCode = 1;
|
|
206
206
|
});
|
|
@@ -4,10 +4,65 @@ import fs, { existsSync, mkdirSync, readdirSync, unlinkSync, writeFileSync } fro
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import os, { networkInterfaces } from "node:os";
|
|
6
6
|
import { createHash, randomBytes } from "node:crypto";
|
|
7
|
+
//#region extensions/cclawd-guard/agent/machine-id.ts
|
|
8
|
+
let cachedMachineInfo = null;
|
|
9
|
+
/**
|
|
10
|
+
* Build a stable per-device ID from hostname + first non-internal MAC.
|
|
11
|
+
* Hashing avoids sending raw MAC addresses.
|
|
12
|
+
*/
|
|
13
|
+
function getMachineInfo() {
|
|
14
|
+
if (cachedMachineInfo) return cachedMachineInfo;
|
|
15
|
+
const machineName = os.hostname();
|
|
16
|
+
const interfaces = networkInterfaces();
|
|
17
|
+
let mac = "";
|
|
18
|
+
for (const iface of Object.values(interfaces)) {
|
|
19
|
+
if (!iface) continue;
|
|
20
|
+
for (const info of iface) if (!info.internal && info.mac && info.mac !== "00:00:00:00:00:00") {
|
|
21
|
+
mac = info.mac;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
if (mac) break;
|
|
25
|
+
}
|
|
26
|
+
const input = `${machineName}:${mac || "unknown"}`;
|
|
27
|
+
cachedMachineInfo = {
|
|
28
|
+
machineId: createHash("sha256").update(input).digest("hex").slice(0, 16),
|
|
29
|
+
machineName
|
|
30
|
+
};
|
|
31
|
+
return cachedMachineInfo;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
7
34
|
//#region extensions/cclawd-guard/agent/config.ts
|
|
8
35
|
const DEFAULT_CORE_URL = defaultCoreUrl;
|
|
9
36
|
const CREDENTIALS_DIR = path.join(os.homedir(), ".openclaw/credentials/cclawd-guard");
|
|
10
37
|
const CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials.json");
|
|
38
|
+
function normalizeCoreUrl(coreUrl) {
|
|
39
|
+
return coreUrl.replace(/\/+$/, "");
|
|
40
|
+
}
|
|
41
|
+
function loadSharedCredentialState(configuredCoreUrl) {
|
|
42
|
+
try {
|
|
43
|
+
if (!existsSync(CREDENTIALS_FILE)) return null;
|
|
44
|
+
const data = JSON.parse(loadTextSync(CREDENTIALS_FILE));
|
|
45
|
+
const expectedUrl = normalizeCoreUrl(configuredCoreUrl ?? DEFAULT_CORE_URL);
|
|
46
|
+
const issuedCoreUrl = typeof data.coreUrl === "string" ? normalizeCoreUrl(data.coreUrl) : "";
|
|
47
|
+
if (issuedCoreUrl && issuedCoreUrl !== expectedUrl) return null;
|
|
48
|
+
const normalized = {
|
|
49
|
+
apiKey: typeof data.apiKey === "string" ? data.apiKey.trim() : "",
|
|
50
|
+
agentId: typeof data.agentId === "string" ? data.agentId.trim() : "",
|
|
51
|
+
claimUrl: typeof data.claimUrl === "string" ? data.claimUrl.trim() : "",
|
|
52
|
+
verificationCode: typeof data.verificationCode === "string" ? data.verificationCode.trim() : "",
|
|
53
|
+
email: typeof data.email === "string" ? data.email.trim() : "",
|
|
54
|
+
coreUrl: issuedCoreUrl || expectedUrl,
|
|
55
|
+
orgToken: typeof data.orgToken === "string" ? data.orgToken.trim() : "",
|
|
56
|
+
orgId: typeof data.orgId === "string" ? data.orgId.trim() : "",
|
|
57
|
+
userId: typeof data.userId === "string" ? data.userId.trim() : "",
|
|
58
|
+
machineId: typeof data.machineId === "string" ? data.machineId.trim() : ""
|
|
59
|
+
};
|
|
60
|
+
if (!Object.values(normalized).some((value) => typeof value === "string" && value.length > 0)) return null;
|
|
61
|
+
return normalized;
|
|
62
|
+
} catch {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
11
66
|
/**
|
|
12
67
|
* Load credentials from disk.
|
|
13
68
|
* If the credentials were issued by a different Core URL, returns null
|
|
@@ -17,32 +72,40 @@ const CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials.json");
|
|
|
17
72
|
* When provided, credentials are validated against this URL instead of DEFAULT_CORE_URL.
|
|
18
73
|
*/
|
|
19
74
|
function loadCoreCredentials(configuredCoreUrl) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} catch {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
75
|
+
const shared = loadSharedCredentialState(configuredCoreUrl);
|
|
76
|
+
if (!shared?.apiKey || !shared?.agentId) return null;
|
|
77
|
+
return {
|
|
78
|
+
apiKey: shared.apiKey,
|
|
79
|
+
agentId: shared.agentId,
|
|
80
|
+
claimUrl: shared.claimUrl ?? "",
|
|
81
|
+
verificationCode: shared.verificationCode ?? "",
|
|
82
|
+
email: shared.email,
|
|
83
|
+
coreUrl: shared.coreUrl
|
|
84
|
+
};
|
|
33
85
|
}
|
|
34
86
|
function saveCoreCredentials(creds, coreUrl) {
|
|
35
87
|
if (!existsSync(CREDENTIALS_DIR)) mkdirSync(CREDENTIALS_DIR, { recursive: true });
|
|
36
88
|
const toSave = {
|
|
89
|
+
...loadSharedCredentialState(coreUrl) ?? {},
|
|
37
90
|
...creds,
|
|
38
|
-
coreUrl: coreUrl ?? DEFAULT_CORE_URL
|
|
91
|
+
coreUrl: normalizeCoreUrl(coreUrl ?? DEFAULT_CORE_URL)
|
|
39
92
|
};
|
|
40
93
|
writeFileSync(CREDENTIALS_FILE, JSON.stringify(toSave, null, 2), "utf-8");
|
|
41
94
|
}
|
|
42
95
|
function deleteCoreCredentials() {
|
|
43
96
|
try {
|
|
44
97
|
if (existsSync(CREDENTIALS_FILE)) {
|
|
45
|
-
|
|
98
|
+
const current = loadSharedCredentialState();
|
|
99
|
+
if (current?.orgToken || current?.orgId || current?.userId || current?.machineId) {
|
|
100
|
+
const preserved = {
|
|
101
|
+
orgToken: current.orgToken ?? "",
|
|
102
|
+
orgId: current.orgId ?? "",
|
|
103
|
+
userId: current.userId ?? "",
|
|
104
|
+
machineId: current.machineId ?? "",
|
|
105
|
+
coreUrl: current.coreUrl ?? normalizeCoreUrl(DEFAULT_CORE_URL)
|
|
106
|
+
};
|
|
107
|
+
writeFileSync(CREDENTIALS_FILE, JSON.stringify(preserved, null, 2), "utf-8");
|
|
108
|
+
} else unlinkSync(CREDENTIALS_FILE);
|
|
46
109
|
return true;
|
|
47
110
|
}
|
|
48
111
|
return false;
|
|
@@ -51,12 +114,19 @@ function deleteCoreCredentials() {
|
|
|
51
114
|
}
|
|
52
115
|
}
|
|
53
116
|
async function registerWithCore(name, description, coreUrl = DEFAULT_CORE_URL) {
|
|
54
|
-
const url = coreUrl
|
|
55
|
-
const
|
|
117
|
+
const url = normalizeCoreUrl(coreUrl);
|
|
118
|
+
const orgToken = loadSharedCredentialState(url)?.orgToken ?? "";
|
|
119
|
+
if (!orgToken) throw new Error("Registration failed: 401 Missing org token");
|
|
120
|
+
const { machineId, machineName } = getMachineInfo();
|
|
121
|
+
const response = await fetch(`${url}/api/v1/agents/bind`, {
|
|
56
122
|
method: "POST",
|
|
57
|
-
headers: {
|
|
123
|
+
headers: {
|
|
124
|
+
"Content-Type": "application/json",
|
|
125
|
+
Authorization: `Bearer ${orgToken}`
|
|
126
|
+
},
|
|
58
127
|
body: JSON.stringify({
|
|
59
|
-
|
|
128
|
+
machineId,
|
|
129
|
+
name: name || machineName || "cclawd-guard-agent",
|
|
60
130
|
description
|
|
61
131
|
})
|
|
62
132
|
});
|
|
@@ -379,33 +449,6 @@ function sanitizeContent(content) {
|
|
|
379
449
|
};
|
|
380
450
|
}
|
|
381
451
|
//#endregion
|
|
382
|
-
//#region extensions/cclawd-guard/agent/machine-id.ts
|
|
383
|
-
let cachedMachineInfo = null;
|
|
384
|
-
/**
|
|
385
|
-
* Build a stable per-device ID from hostname + first non-internal MAC.
|
|
386
|
-
* Hashing avoids sending raw MAC addresses.
|
|
387
|
-
*/
|
|
388
|
-
function getMachineInfo() {
|
|
389
|
-
if (cachedMachineInfo) return cachedMachineInfo;
|
|
390
|
-
const machineName = os.hostname();
|
|
391
|
-
const interfaces = networkInterfaces();
|
|
392
|
-
let mac = "";
|
|
393
|
-
for (const iface of Object.values(interfaces)) {
|
|
394
|
-
if (!iface) continue;
|
|
395
|
-
for (const info of iface) if (!info.internal && info.mac && info.mac !== "00:00:00:00:00:00") {
|
|
396
|
-
mac = info.mac;
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
if (mac) break;
|
|
400
|
-
}
|
|
401
|
-
const input = `${machineName}:${mac || "unknown"}`;
|
|
402
|
-
cachedMachineInfo = {
|
|
403
|
-
machineId: createHash("sha256").update(input).digest("hex").slice(0, 16),
|
|
404
|
-
machineName
|
|
405
|
-
};
|
|
406
|
-
return cachedMachineInfo;
|
|
407
|
-
}
|
|
408
|
-
//#endregion
|
|
409
452
|
//#region extensions/cclawd-guard/agent/behavior-detector.ts
|
|
410
453
|
/**
|
|
411
454
|
* Behavioral anomaly detector — runs at before_tool_call.
|
|
@@ -1753,57 +1796,7 @@ const openClawGuardPlugin = {
|
|
|
1753
1796
|
}
|
|
1754
1797
|
}
|
|
1755
1798
|
async function initPersonalDashboard(coreUrl) {
|
|
1756
|
-
debugLog(
|
|
1757
|
-
if (personalDashboardStarted) {
|
|
1758
|
-
debugLog("initPersonalDashboard: already started, skipping");
|
|
1759
|
-
return;
|
|
1760
|
-
}
|
|
1761
|
-
personalDashboardStarted = true;
|
|
1762
|
-
await new Promise((resolve) => {
|
|
1763
|
-
setTimeout(resolve, 5e3).unref();
|
|
1764
|
-
});
|
|
1765
|
-
try {
|
|
1766
|
-
const { startLocalDashboard, getPluginDataDir, DASHBOARD_PORT, DevModeError } = await import("./dashboard-launcher.js");
|
|
1767
|
-
const dataDir = getPluginDataDir();
|
|
1768
|
-
const result = await startLocalDashboard({
|
|
1769
|
-
apiKey: globalCoreCredentials?.apiKey ?? "",
|
|
1770
|
-
agentId: globalCoreCredentials?.agentId ?? "",
|
|
1771
|
-
coreUrl,
|
|
1772
|
-
dataDir,
|
|
1773
|
-
autoStart: true
|
|
1774
|
-
});
|
|
1775
|
-
log.info(`CClawd Guard dashboard started at ${result.localUrl}`);
|
|
1776
|
-
initDashboardClient(result.token, `http://localhost:${DASHBOARD_PORT}`);
|
|
1777
|
-
} catch (err) {
|
|
1778
|
-
const { DASHBOARD_PORT } = await import("./dashboard-launcher.js");
|
|
1779
|
-
if (await checkDashboardRunning(DASHBOARD_PORT)) {
|
|
1780
|
-
const token = loadDashboardToken();
|
|
1781
|
-
if (token) {
|
|
1782
|
-
debugLog(`initPersonalDashboard: connecting to existing dashboard on port ${DASHBOARD_PORT}`);
|
|
1783
|
-
initDashboardClient(token, `http://localhost:${DASHBOARD_PORT}`);
|
|
1784
|
-
log.info(`Connected to existing CClawd Guard dashboard at http://localhost:${DASHBOARD_PORT}`);
|
|
1785
|
-
} else debugLog("initPersonalDashboard: dashboard running but no token found");
|
|
1786
|
-
} else {
|
|
1787
|
-
debugLog(`initPersonalDashboard FAILED: ${err}`);
|
|
1788
|
-
log.debug?.(`Dashboard auto-start skipped: ${err}`);
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
/** Check if dashboard is already running */
|
|
1793
|
-
async function checkDashboardRunning(port) {
|
|
1794
|
-
try {
|
|
1795
|
-
return (await fetch(`http://localhost:${port}/health`, { signal: AbortSignal.timeout(1e3) })).ok;
|
|
1796
|
-
} catch {
|
|
1797
|
-
return false;
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
/** Load dashboard session token from file */
|
|
1801
|
-
function loadDashboardToken() {
|
|
1802
|
-
const tokenFile = path.join(openclawHome, "credentials", "cclawd-guard", "dashboard-session-token");
|
|
1803
|
-
try {
|
|
1804
|
-
if (fs.existsSync(tokenFile)) return JSON.parse(fs.readFileSync(tokenFile, "utf-8")).token || null;
|
|
1805
|
-
} catch {}
|
|
1806
|
-
return null;
|
|
1799
|
+
debugLog("initPersonalDashboard: auto-start disabled");
|
|
1807
1800
|
}
|
|
1808
1801
|
function initDashboardClient(sessionToken, dashboardUrl) {
|
|
1809
1802
|
debugLog(`initDashboardClient: dashboardUrl=${dashboardUrl} token=${sessionToken?.slice(0, 8)}...`);
|
|
@@ -1839,7 +1832,6 @@ const openClawGuardPlugin = {
|
|
|
1839
1832
|
dashboardHeartbeatTimer = globalDashboardClient.startHeartbeat(6e4);
|
|
1840
1833
|
log.debug?.(`Dashboard: connected to ${dashboardUrl}`);
|
|
1841
1834
|
}
|
|
1842
|
-
initPersonalDashboard(config.coreUrl);
|
|
1843
1835
|
async function initBusinessFeatures(coreUrl) {
|
|
1844
1836
|
debugLog(`initBusinessFeatures: called, credentials=${!!globalCoreCredentials}, isEnterprise=${isEnterprise}`);
|
|
1845
1837
|
if (!globalCoreCredentials) {
|
|
@@ -1927,6 +1919,7 @@ const openClawGuardPlugin = {
|
|
|
1927
1919
|
log.debug?.(`before_tool_call: ${event.toolName}`);
|
|
1928
1920
|
let blocked = false;
|
|
1929
1921
|
let blockReason;
|
|
1922
|
+
let blockFindings;
|
|
1930
1923
|
if (globalBehaviorDetector) {
|
|
1931
1924
|
const decision = await globalBehaviorDetector.onBeforeToolCall({
|
|
1932
1925
|
sessionKey: ctx.sessionKey ?? "",
|
|
@@ -1938,9 +1931,24 @@ const openClawGuardPlugin = {
|
|
|
1938
1931
|
if (decision?.block) {
|
|
1939
1932
|
blocked = true;
|
|
1940
1933
|
blockReason = decision.blockReason;
|
|
1934
|
+
blockFindings = decision.findings;
|
|
1941
1935
|
log.warn(`BLOCKED "${event.toolName}": ${decision.blockReason}`);
|
|
1942
1936
|
}
|
|
1943
1937
|
}
|
|
1938
|
+
if (blocked) await globalEventReporter?.report(ctx.sessionKey ?? "", "before_tool_call", {
|
|
1939
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1940
|
+
toolName: event.toolName,
|
|
1941
|
+
params: event.params,
|
|
1942
|
+
blocked: true,
|
|
1943
|
+
blockReason,
|
|
1944
|
+
findings: blockFindings?.map((finding) => ({
|
|
1945
|
+
riskLevel: finding.riskLevel,
|
|
1946
|
+
riskType: finding.riskType,
|
|
1947
|
+
reason: finding.reason,
|
|
1948
|
+
matchedText: finding.riskContent,
|
|
1949
|
+
riskContent: finding.riskContent
|
|
1950
|
+
}))
|
|
1951
|
+
}, true);
|
|
1944
1952
|
if (globalDashboardClient?.agentId) globalDashboardClient.reportToolCall({
|
|
1945
1953
|
agentId: globalDashboardClient.agentId,
|
|
1946
1954
|
sessionKey: ctx.sessionKey,
|