lightclaw2 0.0.1
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 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/src/channel.d.ts +11 -0
- package/dist/src/channel.d.ts.map +1 -0
- package/dist/src/channel.js +255 -0
- package/dist/src/channel.js.map +1 -0
- package/dist/src/config.d.ts +29 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +99 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/dedup.d.ts +7 -0
- package/dist/src/dedup.d.ts.map +1 -0
- package/dist/src/dedup.js +52 -0
- package/dist/src/dedup.js.map +1 -0
- package/dist/src/gateway.d.ts +16 -0
- package/dist/src/gateway.d.ts.map +1 -0
- package/dist/src/gateway.js +283 -0
- package/dist/src/gateway.js.map +1 -0
- package/dist/src/inbound.d.ts +18 -0
- package/dist/src/inbound.d.ts.map +1 -0
- package/dist/src/inbound.js +252 -0
- package/dist/src/inbound.js.map +1 -0
- package/dist/src/media.d.ts +12 -0
- package/dist/src/media.d.ts.map +1 -0
- package/dist/src/media.js +87 -0
- package/dist/src/media.js.map +1 -0
- package/dist/src/outbound.d.ts +28 -0
- package/dist/src/outbound.d.ts.map +1 -0
- package/dist/src/outbound.js +172 -0
- package/dist/src/outbound.js.map +1 -0
- package/dist/src/runtime.d.ts +4 -0
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +11 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/session-history.d.ts +88 -0
- package/dist/src/session-history.d.ts.map +1 -0
- package/dist/src/session-history.js +545 -0
- package/dist/src/session-history.js.map +1 -0
- package/dist/src/socket-handlers.d.ts +21 -0
- package/dist/src/socket-handlers.d.ts.map +1 -0
- package/dist/src/socket-handlers.js +120 -0
- package/dist/src/socket-handlers.js.map +1 -0
- package/dist/src/socket-registry.d.ts +53 -0
- package/dist/src/socket-registry.d.ts.map +1 -0
- package/dist/src/socket-registry.js +115 -0
- package/dist/src/socket-registry.js.map +1 -0
- package/dist/src/types.d.ts +100 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +10 -0
- package/dist/src/types.js.map +1 -0
- package/node_modules/@socket.io/component-emitter/LICENSE +24 -0
- package/node_modules/@socket.io/component-emitter/Readme.md +79 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +179 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +176 -0
- package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +4 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +179 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/index.js +169 -0
- package/node_modules/@socket.io/component-emitter/lib/esm/package.json +4 -0
- package/node_modules/@socket.io/component-emitter/package.json +28 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/engine.io-client/LICENSE +22 -0
- package/node_modules/engine.io-client/README.md +331 -0
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +4 -0
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +14 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +38 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +67 -0
- package/node_modules/engine.io-client/build/cjs/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/cjs/globals.js +26 -0
- package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/cjs/globals.node.js +97 -0
- package/node_modules/engine.io-client/build/cjs/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/index.js +32 -0
- package/node_modules/engine.io-client/build/cjs/package.json +10 -0
- package/node_modules/engine.io-client/build/cjs/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/cjs/socket.js +765 -0
- package/node_modules/engine.io-client/build/cjs/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/cjs/transport.js +153 -0
- package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/cjs/transports/index.js +11 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +60 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +285 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +44 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/cjs/transports/polling.js +165 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.js +136 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +68 -0
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +94 -0
- package/node_modules/engine.io-client/build/cjs/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/cjs/util.js +65 -0
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +2 -0
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +11 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +34 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +64 -0
- package/node_modules/engine.io-client/build/esm/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/esm/globals.js +22 -0
- package/node_modules/engine.io-client/build/esm/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/esm/globals.node.js +91 -0
- package/node_modules/engine.io-client/build/esm/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/index.js +15 -0
- package/node_modules/engine.io-client/build/esm/package.json +10 -0
- package/node_modules/engine.io-client/build/esm/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/esm/socket.js +727 -0
- package/node_modules/engine.io-client/build/esm/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/esm/transport.js +142 -0
- package/node_modules/engine.io-client/build/esm/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/esm/transports/index.js +8 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +56 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +271 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +17 -0
- package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/esm/transports/polling.js +145 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.js +125 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +41 -0
- package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/esm/transports/webtransport.js +80 -0
- package/node_modules/engine.io-client/build/esm/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/esm/util.js +59 -0
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +3 -0
- package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +2 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +11 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +34 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +1 -0
- package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +64 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +4 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.js +22 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +21 -0
- package/node_modules/engine.io-client/build/esm-debug/globals.node.js +91 -0
- package/node_modules/engine.io-client/build/esm-debug/index.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/index.js +15 -0
- package/node_modules/engine.io-client/build/esm-debug/package.json +10 -0
- package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +482 -0
- package/node_modules/engine.io-client/build/esm-debug/socket.js +756 -0
- package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +106 -0
- package/node_modules/engine.io-client/build/esm-debug/transport.js +145 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +8 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/index.js +8 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +15 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +56 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +108 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +276 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +11 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +17 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +52 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +158 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +36 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +128 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +14 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +41 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +18 -0
- package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +87 -0
- package/node_modules/engine.io-client/build/esm-debug/util.d.ts +7 -0
- package/node_modules/engine.io-client/build/esm-debug/util.js +59 -0
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js +7 -0
- package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -0
- package/node_modules/engine.io-client/dist/engine.io.js +3064 -0
- package/node_modules/engine.io-client/dist/engine.io.js.map +1 -0
- package/node_modules/engine.io-client/dist/engine.io.min.js +7 -0
- package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -0
- package/node_modules/engine.io-client/node_modules/ws/LICENSE +20 -0
- package/node_modules/engine.io-client/node_modules/ws/README.md +548 -0
- package/node_modules/engine.io-client/node_modules/ws/browser.js +8 -0
- package/node_modules/engine.io-client/node_modules/ws/index.js +13 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/constants.js +18 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +550 -0
- package/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1388 -0
- package/node_modules/engine.io-client/node_modules/ws/package.json +69 -0
- package/node_modules/engine.io-client/node_modules/ws/wrapper.mjs +8 -0
- package/node_modules/engine.io-client/package.json +95 -0
- package/node_modules/engine.io-parser/LICENSE +22 -0
- package/node_modules/engine.io-parser/Readme.md +158 -0
- package/node_modules/engine.io-parser/build/cjs/commons.d.ts +14 -0
- package/node_modules/engine.io-parser/build/cjs/commons.js +19 -0
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +48 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +66 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +2 -0
- package/node_modules/engine.io-parser/build/cjs/decodePacket.js +59 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +4 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +72 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +3 -0
- package/node_modules/engine.io-parser/build/cjs/encodePacket.js +38 -0
- package/node_modules/engine.io-parser/build/cjs/index.d.ts +9 -0
- package/node_modules/engine.io-parser/build/cjs/index.js +164 -0
- package/node_modules/engine.io-parser/build/cjs/package.json +8 -0
- package/node_modules/engine.io-parser/build/esm/commons.d.ts +14 -0
- package/node_modules/engine.io-parser/build/esm/commons.js +14 -0
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +43 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +62 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +2 -0
- package/node_modules/engine.io-parser/build/esm/decodePacket.js +55 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +4 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +68 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +3 -0
- package/node_modules/engine.io-parser/build/esm/encodePacket.js +33 -0
- package/node_modules/engine.io-parser/build/esm/index.d.ts +9 -0
- package/node_modules/engine.io-parser/build/esm/index.js +156 -0
- package/node_modules/engine.io-parser/build/esm/package.json +8 -0
- package/node_modules/engine.io-parser/package.json +46 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/socket.io-client/LICENSE +21 -0
- package/node_modules/socket.io-client/README.md +29 -0
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +4 -0
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +69 -0
- package/node_modules/socket.io-client/build/cjs/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/cjs/index.js +76 -0
- package/node_modules/socket.io-client/build/cjs/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/cjs/manager.js +416 -0
- package/node_modules/socket.io-client/build/cjs/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/cjs/on.js +9 -0
- package/node_modules/socket.io-client/build/cjs/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/cjs/socket.js +909 -0
- package/node_modules/socket.io-client/build/cjs/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/cjs/url.js +69 -0
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +2 -0
- package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/esm/contrib/backo2.js +66 -0
- package/node_modules/socket.io-client/build/esm/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/esm/index.js +58 -0
- package/node_modules/socket.io-client/build/esm/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/esm/manager.js +367 -0
- package/node_modules/socket.io-client/build/esm/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm/on.js +6 -0
- package/node_modules/socket.io-client/build/esm/package.json +5 -0
- package/node_modules/socket.io-client/build/esm/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/esm/socket.js +880 -0
- package/node_modules/socket.io-client/build/esm/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/esm/url.js +59 -0
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +2 -0
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +12 -0
- package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +66 -0
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +29 -0
- package/node_modules/socket.io-client/build/esm-debug/index.js +62 -0
- package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +295 -0
- package/node_modules/socket.io-client/build/esm-debug/manager.js +386 -0
- package/node_modules/socket.io-client/build/esm-debug/on.d.ts +2 -0
- package/node_modules/socket.io-client/build/esm-debug/on.js +6 -0
- package/node_modules/socket.io-client/build/esm-debug/package.json +5 -0
- package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +593 -0
- package/node_modules/socket.io-client/build/esm-debug/socket.js +902 -0
- package/node_modules/socket.io-client/build/esm-debug/url.d.ts +33 -0
- package/node_modules/socket.io-client/build/esm-debug/url.js +63 -0
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.js +4955 -0
- package/node_modules/socket.io-client/dist/socket.io.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -0
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +7 -0
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -0
- package/node_modules/socket.io-client/package.json +101 -0
- package/node_modules/socket.io-parser/LICENSE +20 -0
- package/node_modules/socket.io-parser/Readme.md +81 -0
- package/node_modules/socket.io-parser/build/cjs/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/cjs/binary.js +87 -0
- package/node_modules/socket.io-parser/build/cjs/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/cjs/index.js +359 -0
- package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/cjs/is-binary.js +54 -0
- package/node_modules/socket.io-parser/build/cjs/package.json +3 -0
- package/node_modules/socket.io-parser/build/esm/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/esm/binary.js +83 -0
- package/node_modules/socket.io-parser/build/esm/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/esm/index.js +348 -0
- package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/esm/is-binary.js +50 -0
- package/node_modules/socket.io-parser/build/esm/package.json +3 -0
- package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +20 -0
- package/node_modules/socket.io-parser/build/esm-debug/binary.js +83 -0
- package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +91 -0
- package/node_modules/socket.io-parser/build/esm-debug/index.js +353 -0
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +7 -0
- package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +50 -0
- package/node_modules/socket.io-parser/build/esm-debug/package.json +3 -0
- package/node_modules/socket.io-parser/package.json +44 -0
- package/node_modules/xmlhttprequest-ssl/LICENSE +22 -0
- package/node_modules/xmlhttprequest-ssl/README.md +67 -0
- package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +689 -0
- package/node_modules/xmlhttprequest-ssl/package.json +40 -0
- package/openclaw.plugin.json +17 -0
- package/package.json +61 -0
- package/skills/lightclaw-cron/SKILL.md +381 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xmlhttprequest-ssl",
|
|
3
|
+
"description": "XMLHttpRequest for Node",
|
|
4
|
+
"version": "2.1.2",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Michael de Wit"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"xhr",
|
|
10
|
+
"ajax"
|
|
11
|
+
],
|
|
12
|
+
"licenses": [
|
|
13
|
+
{
|
|
14
|
+
"type": "MIT",
|
|
15
|
+
"url": "http://creativecommons.org/licenses/MIT/"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git://github.com/mjwwit/node-XMLHttpRequest.git"
|
|
21
|
+
},
|
|
22
|
+
"bugs": "http://github.com/mjwwit/node-XMLHttpRequest/issues",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=0.4.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "cd ./tests && node test-constants.js && node test-events.js && node test-exceptions.js && node test-headers.js && node test-redirect-302.js && node test-redirect-303.js && node test-redirect-307.js && node test-request-methods.js && node test-request-protocols-txt-data.js && node test-request-protocols-binary-data.js && node test-sync-response.js && node test-utf8-tearing.js && node test-keepalive.js"
|
|
28
|
+
},
|
|
29
|
+
"directories": {
|
|
30
|
+
"lib": "./lib",
|
|
31
|
+
"example": "./example"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"lib/XMLHttpRequest.js",
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"main": "./lib/XMLHttpRequest.js",
|
|
39
|
+
"dependencies": {}
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "lightclaw",
|
|
3
|
+
"name": "LightClaw Channel",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "LightClaw channel plugin with message support, cron jobs, and proactive messaging",
|
|
6
|
+
"channels": ["lightclaw"],
|
|
7
|
+
"skills": ["./skills"],
|
|
8
|
+
"capabilities": {
|
|
9
|
+
"proactiveMessaging": true,
|
|
10
|
+
"cronJobs": true
|
|
11
|
+
},
|
|
12
|
+
"configSchema": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lightclaw2",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "LightClaw channel plugin with message support, cron jobs, and proactive messaging",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"openclaw.plugin.json",
|
|
17
|
+
"skills"
|
|
18
|
+
],
|
|
19
|
+
"openclaw": {
|
|
20
|
+
"extensions": ["./dist/index.js"],
|
|
21
|
+
"channel": {
|
|
22
|
+
"id": "lightclaw",
|
|
23
|
+
"label": "LightClaw",
|
|
24
|
+
"selectionLabel": "LightClaw",
|
|
25
|
+
"docsPath": "/docs/channels/lightclaw",
|
|
26
|
+
"blurb": "Connect OpenClaw to LightClaw via WebSocket long-connection",
|
|
27
|
+
"order": 60
|
|
28
|
+
},
|
|
29
|
+
"install": {
|
|
30
|
+
"npmSpec": "lightclaw",
|
|
31
|
+
"defaultChoice": "npm"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"typecheck": "tsc --noEmit",
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"keywords": [
|
|
41
|
+
"openclaw",
|
|
42
|
+
"channel",
|
|
43
|
+
"plugin",
|
|
44
|
+
"lightclaw",
|
|
45
|
+
"websocket",
|
|
46
|
+
"socket.io"
|
|
47
|
+
],
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"socket.io-client": "^4.7.4"
|
|
50
|
+
},
|
|
51
|
+
"bundledDependencies": [
|
|
52
|
+
"socket.io-client"
|
|
53
|
+
],
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"openclaw": ">=2026.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"openclaw": "*",
|
|
59
|
+
"typescript": "^5.7.0"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lightclaw-cron
|
|
3
|
+
description: LightClaw 定时任务提醒。支持一次性提醒、周期性任务。可设置、查询、取消提醒。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LightClaw 智能提醒
|
|
7
|
+
|
|
8
|
+
让 AI 帮用户设置、管理定时提醒,通过 LightClaw 通道投递消息。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ⛔ 最重要的一条规则(读三遍)
|
|
13
|
+
|
|
14
|
+
> **调用 cron 工具时,payload.kind 必须是 `"agentTurn"`。绝对不能用 `"systemEvent"`!**
|
|
15
|
+
>
|
|
16
|
+
> `systemEvent` 只会在 AI 会话里插入一条文本,用户根本收不到消息。
|
|
17
|
+
> 只有 `agentTurn` + `deliver: true` + `channel: "lightclaw"` + `to` 才能真正把消息发到 LightClaw。
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🤖 AI 决策指南
|
|
22
|
+
|
|
23
|
+
### 时间确认规则
|
|
24
|
+
|
|
25
|
+
> 设置提醒前,先确认当前系统时间(查看上下文中的时间信息,或执行 `date`)。
|
|
26
|
+
> 纯相对时间("5分钟后"、"1小时后")可以跳过确认,直接算 `Date.now() + 延迟毫秒`。
|
|
27
|
+
|
|
28
|
+
### 用户意图识别
|
|
29
|
+
|
|
30
|
+
| 用户说法 | 意图 | cron 工具 action |
|
|
31
|
+
|----------|------|------------------|
|
|
32
|
+
| "5分钟后提醒我喝水" | 创建一次性提醒 | `add`(schedule.kind=at) |
|
|
33
|
+
| "每天8点提醒我打卡" | 创建周期提醒 | `add`(schedule.kind=cron) |
|
|
34
|
+
| "我有哪些提醒" | 查询 | `list` |
|
|
35
|
+
| "取消喝水提醒" | 删除 | `remove` |
|
|
36
|
+
| "修改提醒时间" | 删除+重建 | `remove` → `add` |
|
|
37
|
+
| "提醒我" (无时间) | **需追问** | 询问具体时间 |
|
|
38
|
+
|
|
39
|
+
### 必须追问的情况
|
|
40
|
+
|
|
41
|
+
1. **没有时间**:"提醒我喝水" → "请问什么时候提醒你?"
|
|
42
|
+
2. **时间模糊**:"晚点提醒我" → "具体几点呢?"
|
|
43
|
+
3. **周期不明**:"定期提醒我" → "多久一次?每天?每周?"
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 📋 创建提醒(最重要)
|
|
48
|
+
|
|
49
|
+
### 🚨🚨🚨 工具调用参数模板(AI 必须严格遵循)
|
|
50
|
+
|
|
51
|
+
> **AI 调用 cron 工具时,传的是 JSON 参数,不是 CLI 命令。以下是唯一正确的 JSON 格式:**
|
|
52
|
+
|
|
53
|
+
**一次性提醒(N 分钟后)**:
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"action": "add",
|
|
57
|
+
"job": {
|
|
58
|
+
"name": "{任务名}",
|
|
59
|
+
"schedule": {
|
|
60
|
+
"kind": "at",
|
|
61
|
+
"atMs": {当前时间戳毫秒 + N分钟*60000}
|
|
62
|
+
},
|
|
63
|
+
"sessionTarget": "isolated",
|
|
64
|
+
"wakeMode": "now",
|
|
65
|
+
"deleteAfterRun": true,
|
|
66
|
+
"payload": {
|
|
67
|
+
"kind": "agentTurn",
|
|
68
|
+
"message": "你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:{提醒内容}。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀",
|
|
69
|
+
"deliver": true,
|
|
70
|
+
"channel": "lightclaw",
|
|
71
|
+
"to": "lightclaw:dm:{userId}"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**周期提醒(每天/每周)**:
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"action": "add",
|
|
81
|
+
"job": {
|
|
82
|
+
"name": "{任务名}",
|
|
83
|
+
"schedule": {
|
|
84
|
+
"kind": "cron",
|
|
85
|
+
"expr": "0 8 * * *",
|
|
86
|
+
"tz": "Asia/Shanghai"
|
|
87
|
+
},
|
|
88
|
+
"sessionTarget": "isolated",
|
|
89
|
+
"wakeMode": "now",
|
|
90
|
+
"payload": {
|
|
91
|
+
"kind": "agentTurn",
|
|
92
|
+
"message": "你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:{提醒内容}。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀",
|
|
93
|
+
"deliver": true,
|
|
94
|
+
"channel": "lightclaw",
|
|
95
|
+
"to": "lightclaw:dm:{userId}"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
> 🚨 **绝对不可更改的 5 个字段**(改了提醒就废了):
|
|
102
|
+
> 1. `payload.kind` 必须是 `"agentTurn"` — ❌ 绝对不能用 `"systemEvent"`
|
|
103
|
+
> 2. `payload.deliver` 必须是 `true`
|
|
104
|
+
> 3. `payload.channel` 必须是 `"lightclaw"`
|
|
105
|
+
> 4. `payload.to` 必须是 `"lightclaw:dm:{userId}"` 格式(userId 从系统消息获取)
|
|
106
|
+
> 5. `sessionTarget` 必须是 `"isolated"`
|
|
107
|
+
>
|
|
108
|
+
> 🚫 **`payload.kind: "systemEvent"` 只会在 AI 会话中注入文本,不会发送消息给用户!**
|
|
109
|
+
>
|
|
110
|
+
> ⚠️ **`schedule.atMs` 必须是绝对毫秒时间戳**(如 `1770733800000`),不支持相对时间字符串如 `"5m"`!
|
|
111
|
+
> 需要自行计算:`当前时间戳 + 延迟毫秒数`。例如 5 分钟后 = `Date.now() + 5 * 60 * 1000`。
|
|
112
|
+
|
|
113
|
+
### 查询提醒
|
|
114
|
+
|
|
115
|
+
使用 cron 工具 `action: "list"` 查询。
|
|
116
|
+
|
|
117
|
+
### 删除提醒
|
|
118
|
+
|
|
119
|
+
使用 cron 工具 `action: "remove"` + `jobId`。
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 💬 用户交互模板
|
|
124
|
+
|
|
125
|
+
> **创建提醒后的反馈要简洁友好,不要啰嗦**
|
|
126
|
+
|
|
127
|
+
### 创建成功反馈(推荐简洁版)
|
|
128
|
+
|
|
129
|
+
**一次性提醒**:
|
|
130
|
+
```
|
|
131
|
+
⏰ 好的,{时间}后提醒你{提醒内容}~
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**周期提醒**:
|
|
135
|
+
```
|
|
136
|
+
⏰ 收到,{周期描述}提醒你{提醒内容}~
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 查询提醒反馈
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
📋 你的提醒:
|
|
143
|
+
|
|
144
|
+
1. ⏰ {提醒名} - {时间}
|
|
145
|
+
2. 🔄 {提醒名} - {周期}
|
|
146
|
+
|
|
147
|
+
说"取消xx提醒"可删除~
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 无提醒时反馈
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
📋 目前没有提醒哦~
|
|
154
|
+
|
|
155
|
+
说"5分钟后提醒我xxx"试试?
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 删除成功反馈
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
✅ 已取消"{提醒名称}"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## ⏱️ 时间格式
|
|
167
|
+
|
|
168
|
+
### 一次性提醒(schedule.kind = "at")
|
|
169
|
+
|
|
170
|
+
> ⚠️ `schedule.atMs` 只接受**绝对毫秒时间戳**,需要自己计算!
|
|
171
|
+
|
|
172
|
+
| 用户说法 | 计算方式 |
|
|
173
|
+
|----------|----------|
|
|
174
|
+
| 5分钟后 | `Date.now() + 5 * 60 * 1000` |
|
|
175
|
+
| 半小时后 | `Date.now() + 30 * 60 * 1000` |
|
|
176
|
+
| 1小时后 | `Date.now() + 60 * 60 * 1000` |
|
|
177
|
+
| 明天早上8点 | 先确认当前日期,计算目标时间的毫秒时间戳 |
|
|
178
|
+
|
|
179
|
+
### 周期提醒(schedule.kind = "cron")
|
|
180
|
+
|
|
181
|
+
> 必须加 `"tz": "Asia/Shanghai"`
|
|
182
|
+
|
|
183
|
+
| 用户说法 | schedule.expr |
|
|
184
|
+
|----------|---------------|
|
|
185
|
+
| 每天早上8点 | `"0 8 * * *"` |
|
|
186
|
+
| 每天晚上10点 | `"0 22 * * *"` |
|
|
187
|
+
| 每个工作日早上9点 | `"0 9 * * 1-5"` |
|
|
188
|
+
| 每周一早上9点 | `"0 9 * * 1"` |
|
|
189
|
+
| 每周末上午10点 | `"0 10 * * 0,6"` |
|
|
190
|
+
| 每小时整点 | `"0 * * * *"` |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 📌 参数说明
|
|
195
|
+
|
|
196
|
+
### 工具调用 job 对象必填字段
|
|
197
|
+
|
|
198
|
+
| 字段 | 说明 | 示例 |
|
|
199
|
+
|------|------|------|
|
|
200
|
+
| `job.name` | 任务名 | `"喝水提醒"` |
|
|
201
|
+
| `job.schedule.kind` | `"at"` 或 `"cron"` | `"at"` |
|
|
202
|
+
| `job.schedule.atMs` | **绝对毫秒时间戳**(不支持 `"5m"`!) | `1770734100000` |
|
|
203
|
+
| `job.sessionTarget` | 必须 `"isolated"` | `"isolated"` |
|
|
204
|
+
| `job.wakeMode` | 推荐 `"now"` | `"now"` |
|
|
205
|
+
| `job.payload.kind` | 必须 `"agentTurn"`(❌ 不能用 `"systemEvent"`) | `"agentTurn"` |
|
|
206
|
+
| `job.payload.message` | 提醒内容的 prompt | `"你是一个暖心的提醒助手..."` |
|
|
207
|
+
| `job.payload.deliver` | 必须 `true` | `true` |
|
|
208
|
+
| `job.payload.channel` | 必须 `"lightclaw"` | `"lightclaw"` |
|
|
209
|
+
| `job.payload.to` | 用户地址 | `"lightclaw:dm:{userId}"` |
|
|
210
|
+
| `job.deleteAfterRun` | 一次性任务必须 `true` | `true` |
|
|
211
|
+
|
|
212
|
+
### payload.message 暖心提醒模板
|
|
213
|
+
|
|
214
|
+
> 💡 **`payload.message` 是一个 prompt,告诉 AI 以暖心方式生成提醒**。每次触发时 AI 会自由发挥,生成不重复的、有温度的提醒消息。
|
|
215
|
+
|
|
216
|
+
**统一模板**(把 `{提醒内容}` 替换成具体事项):
|
|
217
|
+
```
|
|
218
|
+
你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:{提醒内容}。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 🎯 使用场景示例
|
|
224
|
+
|
|
225
|
+
### 场景1:一次性提醒
|
|
226
|
+
|
|
227
|
+
**用户**: 5分钟后提醒我喝水
|
|
228
|
+
|
|
229
|
+
**AI 调用 cron 工具**(假设当前时间戳为 1770734000000):
|
|
230
|
+
```json
|
|
231
|
+
{
|
|
232
|
+
"action": "add",
|
|
233
|
+
"job": {
|
|
234
|
+
"name": "喝水提醒",
|
|
235
|
+
"schedule": { "kind": "at", "atMs": 1770734300000 },
|
|
236
|
+
"sessionTarget": "isolated",
|
|
237
|
+
"wakeMode": "now",
|
|
238
|
+
"deleteAfterRun": true,
|
|
239
|
+
"payload": {
|
|
240
|
+
"kind": "agentTurn",
|
|
241
|
+
"message": "你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:该喝水了。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀",
|
|
242
|
+
"deliver": true,
|
|
243
|
+
"channel": "lightclaw",
|
|
244
|
+
"to": "lightclaw:dm:{userId}"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
> `atMs` = 当前时间戳 + 5 * 60 * 1000 = 1770734000000 + 300000 = 1770734300000
|
|
250
|
+
|
|
251
|
+
**AI 回复**: `⏰ 好的,5分钟后提醒你喝水~`
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### 场景2:每日周期提醒
|
|
256
|
+
|
|
257
|
+
**用户**: 每天早上8点提醒我打卡
|
|
258
|
+
|
|
259
|
+
**AI 调用 cron 工具**:
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"action": "add",
|
|
263
|
+
"job": {
|
|
264
|
+
"name": "打卡提醒",
|
|
265
|
+
"schedule": { "kind": "cron", "expr": "0 8 * * *", "tz": "Asia/Shanghai" },
|
|
266
|
+
"sessionTarget": "isolated",
|
|
267
|
+
"wakeMode": "now",
|
|
268
|
+
"payload": {
|
|
269
|
+
"kind": "agentTurn",
|
|
270
|
+
"message": "你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:该打卡了。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀",
|
|
271
|
+
"deliver": true,
|
|
272
|
+
"channel": "lightclaw",
|
|
273
|
+
"to": "lightclaw:dm:{userId}"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
> 周期任务**不加** `deleteAfterRun`
|
|
279
|
+
|
|
280
|
+
**AI 回复**: `⏰ 收到,每天早上8点提醒你打卡~`
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### 场景3:工作日提醒
|
|
285
|
+
|
|
286
|
+
**用户**: 工作日下午6点提醒我写日报
|
|
287
|
+
|
|
288
|
+
**AI 调用 cron 工具**:
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"action": "add",
|
|
292
|
+
"job": {
|
|
293
|
+
"name": "日报提醒",
|
|
294
|
+
"schedule": { "kind": "cron", "expr": "0 18 * * 1-5", "tz": "Asia/Shanghai" },
|
|
295
|
+
"sessionTarget": "isolated",
|
|
296
|
+
"wakeMode": "now",
|
|
297
|
+
"payload": {
|
|
298
|
+
"kind": "agentTurn",
|
|
299
|
+
"message": "你是一个暖心的提醒助手。请用温暖、有趣的方式提醒用户:该写日报了。要求:(1) 不要回复HEARTBEAT_OK (2) 不要解释你是谁 (3) 直接输出一条暖心的提醒消息 (4) 可以加一句简短的鸡汤或关怀的话 (5) 控制在2-3句话以内 (6) 用emoji点缀",
|
|
300
|
+
"deliver": true,
|
|
301
|
+
"channel": "lightclaw",
|
|
302
|
+
"to": "lightclaw:dm:{userId}"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**AI 回复**: `⏰ 收到,工作日下午6点提醒你写日报~`
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
### 场景4:查询提醒
|
|
313
|
+
|
|
314
|
+
**用户**: 我有哪些提醒?
|
|
315
|
+
|
|
316
|
+
**AI 调用 cron 工具**:`{ "action": "list" }`
|
|
317
|
+
|
|
318
|
+
**AI 回复**(根据返回结果):
|
|
319
|
+
```
|
|
320
|
+
📋 你的提醒:
|
|
321
|
+
|
|
322
|
+
1. ⏰ 喝水提醒 - 3分钟后
|
|
323
|
+
2. 🔄 打卡提醒 - 每天08:00
|
|
324
|
+
|
|
325
|
+
说"取消xx提醒"可删除~
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
### 场景5:取消提醒
|
|
331
|
+
|
|
332
|
+
**用户**: 取消打卡提醒
|
|
333
|
+
|
|
334
|
+
**AI 执行**:
|
|
335
|
+
1. 先用 `{ "action": "list" }` 找到对应任务 ID
|
|
336
|
+
2. 再用 `{ "action": "remove", "jobId": "{id}" }` 删除
|
|
337
|
+
|
|
338
|
+
**AI 回复**:
|
|
339
|
+
```
|
|
340
|
+
✅ 已取消"打卡提醒"
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## ⏱️ 消息发送说明
|
|
346
|
+
|
|
347
|
+
### 定时提醒(cron add)
|
|
348
|
+
|
|
349
|
+
定时提醒通过隔离会话 + deliver 机制发送:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
┌─────────────────────┐
|
|
353
|
+
│ 定时任务触发 │
|
|
354
|
+
└──────────┬──────────┘
|
|
355
|
+
↓
|
|
356
|
+
┌─────────────────────┐
|
|
357
|
+
│ AI 通过 agentTurn │
|
|
358
|
+
│ 在隔离会话中执行 │
|
|
359
|
+
└──────────┬──────────┘
|
|
360
|
+
↓
|
|
361
|
+
┌─────────────────────┐
|
|
362
|
+
│ deliver=true 投递 │
|
|
363
|
+
│ channel="lightclaw" │
|
|
364
|
+
│ to="lightclaw:dm:…" │
|
|
365
|
+
└──────────┬──────────┘
|
|
366
|
+
↓
|
|
367
|
+
✅ 用户收到提醒
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## 🔧 用户标识
|
|
373
|
+
|
|
374
|
+
| 类型 | 格式 | 来源 |
|
|
375
|
+
|------|------|------|
|
|
376
|
+
| 用户 ID | 用户的 clientId | 系统消息自动提供 |
|
|
377
|
+
| 用户地址 | `lightclaw:dm:{userId}` | 从 SenderId 构建 |
|
|
378
|
+
|
|
379
|
+
> 💡 这些信息在系统消息中格式如:
|
|
380
|
+
> - `当前用户 SenderId: {userId}`
|
|
381
|
+
> - 用户地址格式为 `lightclaw:dm:{userId}`
|