pi-coding-master 0.2.7
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 +50 -0
- package/core/god.agent.capability/@ABANDONED.brain.prefrontal.monitor/gpu_monitor.py +80 -0
- package/core/god.agent.capability/@ABANDONED.brain.prefrontal.monitor/gpu_monitor.py.CHANGELOG +1 -0
- package/core/god.agent.capability/@ABANDONED.brain.prefrontal.monitor/gpu_monitor.py.SPEC +3 -0
- package/core/god.agent.capability/hands.dev.writeissue/issue.ts +209 -0
- package/core/god.agent.capability/hands.dev.writeissue/issue.ts.SPEC +26 -0
- package/core/god.agent.capability/hands.files.changewatcher/watcher.ts +44 -0
- package/core/god.agent.capability/hands.files.changewatcher/watcher.ts.SPEC +25 -0
- package/core/god.pi.mod/cli/pi-completion.zsh +21 -0
- package/core/god.pi.mod/cli/pi-completion.zsh.CHANGELOG +1 -0
- package/core/god.pi.mod/cli/pi-people.sh +264 -0
- package/core/god.pi.mod/cli/pi-people.sh.LESSON +10 -0
- package/core/god.pi.mod/cli/pi-people.sh.SPEC +31 -0
- package/core/god.pi.mod/paths.ts +47 -0
- package/core/god.pi.mod/tui.mods.blockrender/blockrender.js +90 -0
- package/core/god.pi.mod/tui.mods.blockrender/blockrender.js.SPEC +29 -0
- package/core/god.pi.mod/tui.mods.footer.budget/budget_guard.ts +154 -0
- package/core/god.pi.mod/tui.mods.footer.budget/budget_guard.ts.CHANGELOG +10 -0
- package/core/god.pi.mod/tui.mods.footer.budget/budget_guard.ts.LESSON +12 -0
- package/core/god.pi.mod/tui.mods.footer.budget/budget_guard.ts.SPEC +26 -0
- package/core/god.pi.mod/tui.mods.footer.budget/footer-cny.CHANGELOG +39 -0
- package/core/god.pi.mod/tui.mods.viewmode/view_mode-thinking.patch +55 -0
- package/core/god.pi.mod/tui.mods.viewmode/view_mode-tools.patch +19 -0
- package/core/god.pi.mod/tui.mods.viewmode/view_mode-tools.patch.CHANGELOG +1 -0
- package/core/god.pi.mod/tui.mods.viewmode/view_mode.ts +50 -0
- package/core/god.pi.mod/tui.mods.viewmode/view_mode.ts.SPEC +12 -0
- package/core/god.pi.mod/tui.variants.userterminal/user_terminal.CHANGELOG +10 -0
- package/core/god.pi.mod/tui.variants.userterminal/user_terminal.ts +66 -0
- package/core/god.pi.mod/tui.variants.userterminal/user_terminal.ts.SPEC +31 -0
- package/core/index.ts +3 -0
- package/core/individual.bio.gene/dna.coded/coded.dna +257 -0
- package/core/individual.bio.gene/dna.coded/coded.dna.CHANGELOG +12 -0
- package/core/individual.bio.gene/dna.coded/coded.dna.SPEC +11 -0
- package/core/individual.bio.gene/dna.coded/core.dna +110 -0
- package/core/individual.bio.gene/dna.promotor/promotor.dna +117 -0
- package/core/individual.bio.gene/dna.promotor/promotor.dna.CHANGELOG +4 -0
- package/core/individual.bio.gene/dna.promotor/promotor.dna.SPEC +7 -0
- package/core/individual.bio.gene/dna.transpiler/transpiler.ts +395 -0
- package/core/individual.bio.gene/dna.transpiler/transpiler.ts.CHANGELOG +7 -0
- package/core/individual.bio.gene/dna.transpiler/transpiler.ts.SPEC +28 -0
- package/core/individual.bio.gene/gene.README +19 -0
- package/core/individual.bio.gene/rna/rna.json +536 -0
- package/core/individual.bio.gene/rna/rna.json.CHANGELOG +2 -0
- package/core/individual.bio.gene/rna/rna.json.SPEC +8 -0
- package/core/individual.bio.organs/blood.runtime/messages.ts +236 -0
- package/core/individual.bio.organs/blood.runtime/runtime.ts +173 -0
- package/core/individual.bio.organs/blood.runtime/runtime.ts.CHANGELOG +5 -0
- package/core/individual.bio.organs/blood.runtime/runtime.ts.SPEC +32 -0
- package/core/individual.bio.organs/brain.amygdala/amygdala.ts +25 -0
- package/core/individual.bio.organs/brain.amygdala/amygdala.ts.COMMENT +3 -0
- package/core/individual.bio.organs/brain.amygdala/amygdala.ts.SPEC +9 -0
- package/core/individual.bio.organs/brain.hippocampus/hippocampus-launcher.sh.template +108 -0
- package/core/individual.bio.organs/brain.hippocampus/hippocampus.ts +166 -0
- package/core/individual.bio.organs/brain.hippocampus/hippocampus.ts.CHANGELOG +12 -0
- package/core/individual.bio.organs/brain.hippocampus/hippocampus.ts.LESSON +22 -0
- package/core/individual.bio.organs/brain.hippocampus/hippocampus.ts.SPEC +16 -0
- package/core/individual.bio.organs/brain.hippocampus/memory.ts +879 -0
- package/core/individual.bio.organs/brain.hippocampus/memory.ts.CHANGELOG +66 -0
- package/core/individual.bio.organs/brain.hippocampus/memory.ts.LESSON +25 -0
- package/core/individual.bio.organs/brain.hippocampus/memory.ts.SPEC +46 -0
- package/core/individual.bio.organs/brain.hippocampus/sleep.ts +139 -0
- package/core/individual.bio.organs/brain.hippocampus/sleep.ts.CHANGELOG +11 -0
- package/core/individual.bio.organs/brain.hippocampus/sleep.ts.SPEC +16 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/drafting.SPEC +44 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/drafting.ts +73 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/drafting.ts.CHANGELOG +3 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/drafting.ts.SPEC +24 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/index.ts.CHANGELOG +3 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/main.ts +13 -0
- package/core/individual.bio.organs/brain.prefrontal.drafting/main.ts.SPEC +17 -0
- package/core/individual.bio.organs/brain.senses.bioclock/bioclock.ts +94 -0
- package/core/individual.bio.organs/brain.senses.bioclock/bioclock.ts.LESSON +13 -0
- package/core/individual.bio.organs/brain.senses.bioclock/bioclock.ts.SPEC +20 -0
- package/core/individual.bio.organs/brain.senses.subconscious/feed-format.SPEC +56 -0
- package/core/individual.bio.organs/brain.senses.subconscious/index.ts.CHANGELOG +13 -0
- package/core/individual.bio.organs/brain.senses.subconscious/spawner.ts +130 -0
- package/core/individual.bio.organs/brain.senses.subconscious/spawner.ts.SPEC +13 -0
- package/core/individual.bio.organs/brain.senses.subconscious/subconscious.ts +280 -0
- package/core/individual.bio.organs/brain.senses.subconscious/subconscious.ts.CHANGELOG +7 -0
- package/core/individual.bio.organs/brain.senses.subconscious/tools.ts +180 -0
- package/core/individual.bio.organs/brain.senses.subconscious/tools.ts.SPEC +3 -0
- package/core/individual.bio.organs/ears.listen/config.json +9 -0
- package/core/individual.bio.organs/ears.listen/config.json.CHANGELOG +1 -0
- package/core/individual.bio.organs/ears.listen/config.json.SPEC +3 -0
- package/core/individual.bio.organs/ears.listen/ears.ts.CHANGELOG +48 -0
- package/core/individual.bio.organs/ears.listen/ears_recorder.py.CHANGELOG +6 -0
- package/core/individual.bio.organs/ears.listen/index.ts +1 -0
- package/core/individual.bio.organs/ears.listen/index.ts.SPEC +16 -0
- package/core/individual.bio.organs/ears.listen/listen.ts +208 -0
- package/core/individual.bio.organs/ears.listen/listen.ts.SPEC +3 -0
- package/core/individual.bio.organs/ears.listen/listen_recorder.py +445 -0
- package/core/individual.bio.organs/ears.listen/listen_recorder.py.SPEC +7 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/common/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/common/events_pb2.py +38 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/common/events_pb2_grpc.py +24 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/common/rpcmeta_pb2.py +42 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/common/rpcmeta_pb2_grpc.py +24 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/ast/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/ast/ast_service_pb2.py +45 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/ast/ast_service_pb2_grpc.py +97 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/base/__init__.py +0 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/base/au_base_pb2.py +80 -0
- package/core/individual.bio.organs/ears.listen/python_protogen/products/understanding/base/au_base_pb2_grpc.py +24 -0
- package/core/individual.bio.organs/hands.fileactions/authorize.TRUST +1 -0
- package/core/individual.bio.organs/hands.fileactions/authorize.ts +70 -0
- package/core/individual.bio.organs/hands.fileactions/authorize.ts.CHANGELOG +1 -0
- package/core/individual.bio.organs/hands.fileactions/authorize.ts.SPEC +3 -0
- package/core/individual.bio.organs/hands.fileactions/dir.README +13 -0
- package/core/individual.bio.organs/hands.fileactions/file_rules.json +23 -0
- package/core/individual.bio.organs/hands.fileactions/fileactions.README +12 -0
- package/core/individual.bio.organs/hands.fileactions/fileactions.ts +540 -0
- package/core/individual.bio.organs/hands.fileactions/fileactions.ts.CHANGELOG +25 -0
- package/core/individual.bio.organs/hands.fileactions/fileactions.ts.SPEC +30 -0
- package/core/individual.bio.organs/hands.fileactions/filewatch.ts +66 -0
- package/core/individual.bio.organs/hands.fileactions/filewatch.ts.SPEC +3 -0
- package/core/individual.bio.organs/hands.main/main.ts +18 -0
- package/core/individual.bio.organs/hands.main/main.ts.SPEC +20 -0
- package/core/individual.bio.organs/hands.sensitive/sensitive.ts +24 -0
- package/core/individual.bio.organs/hands.sensitive/sensitive.ts.CHANGELOG +2 -0
- package/core/individual.bio.organs/hands.sensitive/sensitive.ts.SPEC +3 -0
- package/core/individual.bio.organs/heart.interrupt/agent_start-loader-flicker.patch +13 -0
- package/core/individual.bio.organs/heart.interrupt/interactive-mode-loader.patch +11 -0
- package/core/individual.bio.organs/heart.interrupt/runner_esc.patch +10 -0
- package/core/individual.bio.organs/heart.interrupt/runner_esc.patch.SPEC +9 -0
- package/core/individual.bio.organs/heart.kernel/kernel.ts +253 -0
- package/core/individual.bio.organs/heart.kernel/kernel.ts.CHANGELOG +13 -0
- package/core/individual.bio.organs/heart.kernel/kernel.ts.SPEC +23 -0
- package/core/individual.bio.organs/heart.main/heart.main.CHANGELOG +43 -0
- package/core/individual.bio.organs/heart.main/heartbeat.ts +494 -0
- package/core/individual.bio.organs/heart.main/heartbeat.ts.LESSON +43 -0
- package/core/individual.bio.organs/heart.main/main.ts +8 -0
- package/core/individual.bio.organs/heart.main/main.ts.SPEC +19 -0
- package/core/individual.bio.organs/heart.main/process.ts +122 -0
- package/core/individual.bio.organs/heart.main/process.ts.CHANGELOG +2 -0
- package/core/individual.bio.organs/heart.main/process.ts.SPEC +24 -0
- package/core/individual.bio.organs/heart.main/remove_timeout.patch +110 -0
- package/core/individual.bio.organs/heart.main/stop.ts.CHANGELOG +3 -0
- package/core/individual.bio.organs/heart.main/stop.ts.SPEC +28 -0
- package/core/individual.bio.organs/mouth.speak/index.ts +1 -0
- package/core/individual.bio.organs/mouth.speak/index.ts.CHANGELOG +1 -0
- package/core/individual.bio.organs/mouth.speak/index.ts.SPEC +6 -0
- package/core/individual.bio.organs/mouth.speak/mouth.ts.CHANGELOG +15 -0
- package/core/individual.bio.organs/mouth.speak/mouth_recorder.py.CHANGELOG +1 -0
- package/core/individual.bio.organs/mouth.speak/speak.ts +180 -0
- package/core/individual.bio.organs/mouth.speak/speak.ts.SPEC +3 -0
- package/core/individual.bio.organs/mouth.speak/speak_recorder.py +35 -0
- package/core/individual.bio.organs/mouth.speak/speak_recorder.py.SPEC +3 -0
- package/core/individual.bio.organs/organs.README +110 -0
- package/core/package-lock.json +18 -0
- package/core/package.json +35 -0
- package/core/prompts/prompts.json +77 -0
- package/core/prompts/prompts.ts +44 -0
- package/core/prompts/prompts.ts.SPEC +9 -0
- package/core/society.world/.gitkeep +0 -0
- package/core/society.world/accessibility.claudecode/message-service.cjs +217 -0
- package/core/society.world/accessibility.claudecode/message-service.cjs.SPEC +7 -0
- package/core/society.world/accessibility.claudecode/send.ts +34 -0
- package/core/society.world/dollar.distribution.ubi/ubi.ts +55 -0
- package/core/society.world/dollar.main/dollar-service.cjs +185 -0
- package/core/society.world/dollar.main/main.ts +116 -0
- package/core/society.world/dollar.transaction/transaction.ts +71 -0
- package/core/society.world/space/space.ts +206 -0
- package/core/society.world/space/space.ts.SPEC +30 -0
- package/core/technology.laptop/#agent.macos.BLUEPRINT +278 -0
- package/core/technology.phone/apps.preinstalled/albums.FUTURE/albums.ts +69 -0
- package/core/technology.phone/apps.preinstalled/albums.FUTURE/albums.ts.SPEC +15 -0
- package/core/technology.phone/apps.preinstalled/calendar/calendar.ts +406 -0
- package/core/technology.phone/apps.preinstalled/calendar/calendar.ts.SPEC +22 -0
- package/core/technology.phone/apps.preinstalled/calendar/holiday-calendar.ts +529 -0
- package/core/technology.phone/apps.preinstalled/clock/clock.ts +132 -0
- package/core/technology.phone/apps.preinstalled/clock/clock.ts.SPEC +11 -0
- package/core/technology.phone/apps.preinstalled/contacts.FUTURE/contacts.ts +300 -0
- package/core/technology.phone/apps.preinstalled/contacts.FUTURE/contacts.ts.SPEC +22 -0
- package/core/technology.phone/apps.preinstalled/developer.FUTURE/developer.ts +22 -0
- package/core/technology.phone/apps.preinstalled/developer.FUTURE/developer.ts.SPEC +15 -0
- package/core/technology.phone/apps.preinstalled/notes/notes.ts +239 -0
- package/core/technology.phone/apps.preinstalled/notes/notes.ts.SPEC +21 -0
- package/core/technology.phone/apps.preinstalled/polymarket/polymarket.ts +261 -0
- package/core/technology.phone/apps.preinstalled/polymarket/polymarket.ts.SPEC +7 -0
- package/core/technology.phone/apps.preinstalled/reminder/reminder.ts +404 -0
- package/core/technology.phone/apps.preinstalled/reminder/reminder.ts.SPEC +25 -0
- package/core/technology.phone/apps.preinstalled/siri.FUTURE/siri.ts +22 -0
- package/core/technology.phone/apps.preinstalled/siri.FUTURE/siri.ts.SPEC +15 -0
- package/core/technology.phone/apps.preinstalled/spotlight/spotlight.ts +29 -0
- package/core/technology.phone/apps.preinstalled/spotlight/spotlight.ts.SPEC +7 -0
- package/core/technology.phone/apps.preinstalled/steam/chess.ts +230 -0
- package/core/technology.phone/apps.preinstalled/steam/snake.ts +100 -0
- package/core/technology.phone/apps.preinstalled/steam/snake.ts.SPEC +7 -0
- package/core/technology.phone/apps.preinstalled/steam/spy-cmd.ts +4 -0
- package/core/technology.phone/apps.preinstalled/steam/spy-tool.ts +56 -0
- package/core/technology.phone/apps.preinstalled/steam/spy.ts +302 -0
- package/core/technology.phone/apps.preinstalled/steam/steam.ts +299 -0
- package/core/technology.phone/apps.preinstalled/weather/weather.ts +50 -0
- package/core/technology.phone/apps.preinstalled/weather/weather.ts.SPEC +9 -0
- package/core/technology.phone/apps.preinstalled/wechat/imessage.ts +423 -0
- package/core/technology.phone/apps.preinstalled/wechat/imessage.ts.SPEC +24 -0
- package/core/technology.phone/apps.system/appstore/appstore.ts +22 -0
- package/core/technology.phone/apps.system/appstore/appstore.ts.SPEC +15 -0
- package/core/technology.phone/apps.system/finder.FUTURE/finder.ts +64 -0
- package/core/technology.phone/apps.system/finder.FUTURE/finder.ts.SPEC +8 -0
- package/core/technology.phone/apps.system/safari/safari-app.ts +146 -0
- package/core/technology.phone/apps.system/safari/safari.ts.SPEC +24 -0
- package/core/technology.phone/apps.system/settings/settings.ts +126 -0
- package/core/technology.phone/apps.system/settings/settings.ts.SPEC +17 -0
- package/core/technology.phone/apps.system/tips/tips.ts +22 -0
- package/core/technology.phone/apps.system/tips/tips.ts.SPEC +15 -0
- package/core/technology.phone/apps.thirdparty/alipay/alipay.ts +148 -0
- package/core/technology.phone/apps.thirdparty/alipay/alipay.ts.SPEC +7 -0
- package/core/technology.phone/apps.thirdparty/bilibili/bilibili-app.ts +33 -0
- package/core/technology.phone/apps.thirdparty/bilibili/bilibili.ts +142 -0
- package/core/technology.phone/apps.thirdparty/bilibili/bilibili.ts.SPEC +22 -0
- package/core/technology.phone/apps.thirdparty/wechatread/wechatread.ts +80 -0
- package/core/technology.phone/apps.thirdparty/wechatread/wechatread.ts.SPEC +15 -0
- package/core/technology.phone/index.ts +1 -0
- package/core/technology.phone/package.json +2 -0
- package/core/technology.phone/system.homepage/homepage.ts +247 -0
- package/core/technology.phone/system.homepage/homepage.ts.SPEC +22 -0
- package/core/technology.phone/system.kernel/kernel.ts +264 -0
- package/core/technology.phone/system.kernel/kernel.ts.SPEC +7 -0
- package/core/technology.phone/system.notifications/notifications.ts +87 -0
- package/core/technology.phone/system.notifications/notifications.ts.SPEC +7 -0
- package/core/technology.phone/system.share/share.ts +46 -0
- package/core/technology.phone/system.share/share.ts.SPEC +7 -0
- package/core/technology.server/browser-service.cjs +152 -0
- package/core/technology.server/data/cookies/arxiv.json +30 -0
- package/core/technology.server/data/cookies/bili.json +184 -0
- package/core/technology.server/data/cookies/default.json +30 -0
- package/core/technology.server/data/cookies/news.json +113 -0
- package/core/technology.server/data/cookies/s1.json +45 -0
- package/core/technology.server/data/cookies/safari.json +184 -0
- package/core/technology.server/data/cookies/safari2.json +1 -0
- package/core/technology.server/data/cookies/safaridbg.json +1 -0
- package/core/technology.server/data/cookies/search.json +45 -0
- package/core/technology.server/data/cookies/sw.json +30 -0
- package/core/technology.server/data/cookies/t1.json +1 -0
- package/core/technology.server/data/cookies/testread.json +1 -0
- package/core/technology.server/data/cookies/video1.json +113 -0
- package/core/technology.server/data/cookies/yt.json +170 -0
- package/core/technology.server/data/cookies/yt2.json +113 -0
- package/core/technology.server/pikipedia/#pikipedia.BLUEPRINT +106 -0
- package/core/technology.server/playleft.cjs +247 -0
- package/core/technology.server/search-proxy.py +76 -0
- package/core/technology.server/server.README +59 -0
- package/deploy/dist-overrides/cli/cli.js +18 -0
- package/deploy/dist-overrides/core/extensions/loader.js +518 -0
- package/deploy/dist-overrides/core/package-manager.js +2081 -0
- package/deploy/dist-overrides/core/system-prompt.js +109 -0
- package/deploy/dist-overrides/core/system-prompt.js.LESSON +17 -0
- package/deploy/dist-overrides/core/tools/bash.js +353 -0
- package/deploy/dist-overrides/core/tools/bash.js.CHANGELOG +2 -0
- package/deploy/dist-overrides/core/tools/edit-diff.js +345 -0
- package/deploy/dist-overrides/core/tools/edit.js +315 -0
- package/deploy/dist-overrides/core/tools/edit.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/core/tools/file-mutation-queue.js +52 -0
- package/deploy/dist-overrides/core/tools/find.js +298 -0
- package/deploy/dist-overrides/core/tools/find.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/core/tools/grep.js +305 -0
- package/deploy/dist-overrides/core/tools/grep.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/core/tools/index.js +112 -0
- package/deploy/dist-overrides/core/tools/ls-guard.js +4 -0
- package/deploy/dist-overrides/core/tools/ls.js +170 -0
- package/deploy/dist-overrides/core/tools/ls.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/core/tools/output-accumulator.js +184 -0
- package/deploy/dist-overrides/core/tools/path-utils.js +99 -0
- package/deploy/dist-overrides/core/tools/prompts-reader.js +53 -0
- package/deploy/dist-overrides/core/tools/read.js +392 -0
- package/deploy/dist-overrides/core/tools/read.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/core/tools/render-utils.js +65 -0
- package/deploy/dist-overrides/core/tools/tool-definition-wrapper.js +34 -0
- package/deploy/dist-overrides/core/tools/truncate.js +215 -0
- package/deploy/dist-overrides/core/tools/write.js +203 -0
- package/deploy/dist-overrides/core/tools/write.js.CHANGELOG +1 -0
- package/deploy/dist-overrides/dist-overrides.README +18 -0
- package/deploy/dist-overrides/main.js +665 -0
- package/deploy/dist-overrides/modes/interactive/components/assistant-message.js +139 -0
- package/deploy/dist-overrides/modes/interactive/components/footer.js +326 -0
- package/deploy/dist-overrides/modes/interactive/components/model-selector.js +285 -0
- package/deploy/dist-overrides/modes/interactive/components/tool-execution.js +383 -0
- package/deploy/dist-overrides/modes/interactive/components/tool-execution.js.CHANGELOG +3 -0
- package/deploy/dist-overrides/modes/interactive/interactive-mode.js +4781 -0
- package/deploy/dist-overrides/pi-ai/providers/anthropic.js +931 -0
- package/deploy/dist-overrides/pi-ai/providers/openai-completions.js +1007 -0
- package/deploy/dist-overrides/pi-ai/providers/openai-completions.js.LESSON +15 -0
- package/deploy/dist-overrides/pi-tui/components/loader.js +69 -0
- package/deploy/dist-overrides/pi-tui/components/markdown.js +646 -0
- package/deploy/dist-overrides/pi-tui/components/text.js +92 -0
- package/deploy/dist-overrides/pi-tui/custom-message.js +75 -0
- package/deploy/dist-overrides/pi-tui/tui.js +1266 -0
- package/deploy/dist-overrides/pi-tui/utils.js +1060 -0
- package/deploy/dist-overrides/vendor.REMOVED/jiti/lib/jiti.mjs +3 -0
- package/deploy/install.sh +186 -0
- package/deploy/install.sh.CHANGELOG +6 -0
- package/deploy/lint/lint-naming.ts +202 -0
- package/deploy/scripts/apply.js +18 -0
- package/deploy/scripts/build-github.sh +219 -0
- package/deploy/scripts/build-phone.sh +24 -0
- package/deploy/scripts/check-deploy.sh +42 -0
- package/deploy/scripts/migrate-context.sh +72 -0
- package/deploy/scripts/patch-pi-dist.js +39 -0
- package/deploy/scripts/uninstall.sh +34 -0
- package/package.json +18 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# budget-guard.ts — LESSONS
|
|
2
|
+
|
|
3
|
+
## 2026-06-15 余额提示别垫在记忆快照前面(cache 杀手)
|
|
4
|
+
**症状**: deepseek cache 命中率长期很低,单日 ~2.94 亿 token cache-miss,几百块烧在 miss 上。
|
|
5
|
+
**根因**: trip() 用 `deliverAs:"steer"` 把含【会变的余额数字】的 budget-trip 消息插进消息流;
|
|
6
|
+
而 poll「启动即查」会在 session 开局就触发 → 这条 65 字小消息垫在了 ~90 万 token 的
|
|
7
|
+
memory-snapshot【前面】。KV cache 只认前缀:前缀前 65 字一变,后面 90 万 token 全部 miss。
|
|
8
|
+
余额一直低 + 反复重启 → 每次重启全量 miss ≈ 2.7 亿,几乎正好就是观测到的 miss 总量。
|
|
9
|
+
**修复**: budget-trip 改 `deliverAs:"nextTurn"`(垫到尾部);即时可见性由 before_agent_start 的
|
|
10
|
+
setWorkingMessage 负责。快照重新成为稳定的第 1 条消息。
|
|
11
|
+
**原则**: 任何【含会变内容】的注入消息(余额/时间/计数/状态)一律垫到 tail,绝不能排在大块稳定内容前面。
|
|
12
|
+
顺序铁律见 [[memory.ts.LESSONS]]。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
source: budget_guard.ts @ 910395fd
|
|
2
|
+
|
|
3
|
+
budget-guard.ts · SPEC(余额硬闸 / 代码强制的花钱护栏)
|
|
4
|
+
|
|
5
|
+
为什么存在:pi 内部的花费统计【系统性少算】——mid-stream abort(agent.js:170 的补丁)会把被
|
|
6
|
+
abort 的流记成 usage=0(agent.js:338),而我们天天 abort;且 pi 只统计单 session。
|
|
7
|
+
所以不能用 pi 的 $ 当钱闸。改用 deepseek 真实余额接口当地面真值(免疫补丁、覆盖所有实例)。
|
|
8
|
+
|
|
9
|
+
装在哪:engine/kernel.ts 在 default(pi) 最前面调 installBudgetGuard(pi),每个 pi 实例都装。
|
|
10
|
+
|
|
11
|
+
机制:
|
|
12
|
+
- fetchBalanceCNY():execSync curl api.deepseek.com/user/balance(key 由 shell 从 $DEEPSEEK_API_KEY
|
|
13
|
+
展开,不写进命令串)。已验证可用。
|
|
14
|
+
- 轮询:每 POLL_MS(默认45s) 一次 + session_start + before_agent_start 太旧时补一次。
|
|
15
|
+
- 两道线:余额 ≤ FLOOR(默认¥5) → 停;两次轮询间速率 > RATE(默认¥10/min) → 停(抓"一下子100块"尖峰)。
|
|
16
|
+
- 触发 trip():只让 role==main 去 killWorkers()(pkill -f "pi-coding-master:<role>:" + tmux 兜底,靠不可伪造的 title);
|
|
17
|
+
显眼 sendMessage 告警;before_agent_start 里 tripped 时 ctx.abort() + 拦住后续 turn。
|
|
18
|
+
- 解除只能人工 /budget resume(充值后)。模型无工具可绕过。
|
|
19
|
+
- 每次轮询把 {balance,ratePerMin,tripped,ts} 写 ~/.pi/agent/.pi-coding-master-balance.json,footer 读它显示真实余额。
|
|
20
|
+
|
|
21
|
+
可配 env:PI_ALIVE_BALANCE_FLOOR、PI_ALIVE_RATE_CNY_PER_MIN、PI_ALIVE_BALANCE_POLL_MS。
|
|
22
|
+
命令:/budget(看余额/速率/线)、/budget resume(解除)。
|
|
23
|
+
|
|
24
|
+
⚠️ 改动要【重启 pi 实例】才生效——正在跑的进程加载的是没有闸的旧 kernel。
|
|
25
|
+
局限:轮询有间隙(默认45s),间隙内的尖峰靠下一次轮询的速率线补抓;要更快可调小 POLL_MS 或后续加
|
|
26
|
+
本地 stream-token 速率探测。killWorkers 依赖 process.title(kernel 设的 pi-coding-master:role:id)。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[2026-06-15] footer 货币符号 $ → ¥(by Claude Code)
|
|
2
|
+
|
|
3
|
+
改了什么:pi 状态栏的费用从 `$3.057` 改成 `¥3.057`。
|
|
4
|
+
为什么:deepseek 的单价(models.json: input 1.74 / output 3.48 / cacheRead 0.145)和余额接口
|
|
5
|
+
(/user/balance 返回 currency=CNY)全是人民币;pi 的 footer 却把符号写死成 `$`,误导成美元。
|
|
6
|
+
|
|
7
|
+
改在哪(⚠️ 在 node_modules 里,升级 pi 会被覆盖,需重打):
|
|
8
|
+
/opt/homebrew/lib/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js
|
|
9
|
+
约第 128 行:
|
|
10
|
+
旧: const costStr = `$${totalCost.toFixed(3)}${usingSubscription ? " (sub)" : ""}`;
|
|
11
|
+
新: const costStr = `¥${totalCost.toFixed(3)}${usingSubscription ? " (sub)" : ""}`;
|
|
12
|
+
|
|
13
|
+
重要注意:这个 ¥ 值仍然【偏低】——我们的 mid-stream abort 补丁(agent.js:170)会让被 abort 的流
|
|
14
|
+
记成 usage=EMPTY(agent.js:338),provider 实际计费了但 pi 记 0。所以状态栏的 ¥ 只是参考,
|
|
15
|
+
【真实花费/余额以 deepseek /user/balance 接口为准】(见即将做的余额硬闸)。
|
|
16
|
+
|
|
17
|
+
[2026-06-15 续] footer 加「真实余额」同显(已做)
|
|
18
|
+
- 顶部加 import { readFileSync } from "node:fs" + { homedir } from "node:os"。
|
|
19
|
+
- costStr 推入后,读 ~/.pi/agent/.pi-coding-master-balance.json(余额硬闸 budget-guard 轮询写入),
|
|
20
|
+
statsParts.push(`余额¥X`)(触发停机时带 🛑)。
|
|
21
|
+
- 效果:状态栏「花费¥(pi算的,偏低) + 余额¥(deepseek真账,地面真值)」同时显示。
|
|
22
|
+
- ⚠️ 同样在 node_modules 里,升级 pi 要重打。footer.js 约 1-3 行 + costStr 块后。
|
|
23
|
+
|
|
24
|
+
[2026-06-15 续] 余额旁加「真实烧钱速率 ↓¥/min」
|
|
25
|
+
- 读余额文件里的 ratePerMin,显示成 `余额¥X ↓¥Y/min`(来自 deepseek 真账,账户全实例)。
|
|
26
|
+
- 为啥重要:footer 那个 `¥`(pi 自己算的) 因 abort 不计而严重偏低(出现过"总额 ¥1.3 但实际 ¥14/min"
|
|
27
|
+
的矛盾)——所以真相看「余额 + ↓¥/min」,那个 pi 的 ¥ 只能参考、别信。
|
|
28
|
+
|
|
29
|
+
[2026-06-15 续] 花费显示「三个 session 分别 + 总和」
|
|
30
|
+
- 原来只显示主进程自己的 ¥,看不到 hc/sc/sl。改成:主进程用 pi 原生(实时),hc/sc/sl 读各自
|
|
31
|
+
~/.pi/memory/<id>/.data/cost-<role>.json(budget-guard 每 turn_end 写)。显示 `主¥X hc¥Y sc¥Z [sl¥W] 计¥T`。
|
|
32
|
+
- 拿真实数据验证:主¥1.60 hc¥0.31 sc¥0.11 计¥2.02。
|
|
33
|
+
- ⚠️ 仍是 pi 自己算的(因 abort 偏低),只看「相对哪个实例花得多」;账户真实总额仍以「余额 ↓¥/min」为准。
|
|
34
|
+
- footer.js 在 node_modules,升级 pi 要重打;改动需重启 pi 才加载。
|
|
35
|
+
|
|
36
|
+
[2026-06-15 续] 余额置顶 + 持久化(不用再手动重打了)
|
|
37
|
+
- statsParts.push(余额)→ unshift:太宽时 truncateToWidth 砍尾部会把余额切掉,置顶则永不被截。
|
|
38
|
+
- 持久化:整个改好的 footer.js 存成 dist-overrides/footer.js(golden),install.sh 版本校验后 cp 回。
|
|
39
|
+
以后 npm 重装不再丢,也不用手动重打。改了行为就重新存 golden(见 dist-overrides/README.md)。
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
--- a/modes/interactive/components/assistant-message.js
|
|
2
|
+
+++ b/modes/interactive/components/assistant-message.js
|
|
3
|
+
@@ -64,28 +64,34 @@
|
|
4
|
+
for (let i = 0; i < message.content.length; i++) {
|
|
5
|
+
const content = message.content[i];
|
|
6
|
+
if (content.type === "text" && content.text.trim()) {
|
|
7
|
+
- // Assistant text messages with no background - trim the text
|
|
8
|
+
- // Set paddingY=0 to avoid extra spacing before tool executions
|
|
9
|
+
- this.contentContainer.addChild(new Markdown(content.text.trim(), 1, 0, this.markdownTheme));
|
|
10
|
+
+ // Assistant text messages — 一点 + 内容
|
|
11
|
+
+ // 多行时后续行缩进对齐(padding=2,对齐 ● 后的文字位置)
|
|
12
|
+
+ const lines = content.text.trim().split('\n');
|
|
13
|
+
+ const formatted = lines.map((l, i) => i === 0 ? "● " + l : " " + l).join('\n');
|
|
14
|
+
+ this.contentContainer.addChild(new Markdown(formatted, 1, 0, this.markdownTheme));
|
|
15
|
+
}
|
|
16
|
+
else if (content.type === "thinking" && content.thinking.trim()) {
|
|
17
|
+
+ const viewMode = globalThis.__piViewMode || "full";
|
|
18
|
+
+ if (viewMode === "clean") continue;
|
|
19
|
+
// Add spacing only when another visible assistant content block follows.
|
|
20
|
+
// This avoids a superfluous blank line before separately-rendered tool execution blocks.
|
|
21
|
+
const hasVisibleContentAfter = message.content
|
|
22
|
+
.slice(i + 1)
|
|
23
|
+
.some((c) => (c.type === "text" && c.text.trim()) || (c.type === "thinking" && c.thinking.trim()));
|
|
24
|
+
- if (this.hideThinkingBlock) {
|
|
25
|
+
+ if (viewMode === "fold" || this.hideThinkingBlock) {
|
|
26
|
+
// Show static thinking label when hidden
|
|
27
|
+
- this.contentContainer.addChild(new Text(theme.italic(theme.fg("thinkingText", this.hiddenThinkingLabel)), 1, 0));
|
|
28
|
+
+ this.contentContainer.addChild(new Text(theme.fg("thinkingText", this.hiddenThinkingLabel), 1, 0));
|
|
29
|
+
if (hasVisibleContentAfter) {
|
|
30
|
+
this.contentContainer.addChild(new Spacer(1));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
- // Thinking traces in thinkingText color, italic
|
|
35
|
+
- this.contentContainer.addChild(new Markdown(content.thinking.trim(), 1, 0, this.markdownTheme, {
|
|
36
|
+
+ // Thinking traces — 主题色点 + 思考内容
|
|
37
|
+
+ // 多行时后续行缩进对齐
|
|
38
|
+
+ const tLines = content.thinking.trim().split('\n');
|
|
39
|
+
+ const tFormatted = tLines.map((l, i) => i === 0 ? theme.fg("thinkingText", "● ") + l : " " + l).join('\n');
|
|
40
|
+
+ this.contentContainer.addChild(new Markdown(tFormatted, 1, 0, this.markdownTheme, {
|
|
41
|
+
color: (text) => theme.fg("thinkingText", text),
|
|
42
|
+
- italic: true,
|
|
43
|
+
}));
|
|
44
|
+
if (hasVisibleContentAfter) {
|
|
45
|
+
this.contentContainer.addChild(new Spacer(1));
|
|
46
|
+
@@ -98,7 +104,8 @@
|
|
47
|
+
const hasToolCalls = message.content.some((c) => c.type === "toolCall");
|
|
48
|
+
this.hasToolCalls = hasToolCalls;
|
|
49
|
+
if (!hasToolCalls) {
|
|
50
|
+
- if (message.stopReason === "aborted") {
|
|
51
|
+
+ // pi-coding-master: suppress "Operation aborted" display. Steer/voice-driven aborts are normal in continuous agent mode.
|
|
52
|
+
+ if (false && message.stopReason === "aborted") {
|
|
53
|
+
const abortMessage = message.errorMessage && message.errorMessage !== "Request was aborted"
|
|
54
|
+
? message.errorMessage
|
|
55
|
+
: "Operation aborted";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
--- a/modes/interactive/components/tool-execution.js
|
|
2
|
+
+++ b/modes/interactive/components/tool-execution.js
|
|
3
|
+
@@ -175,6 +175,16 @@
|
|
4
|
+
this.updateDisplay();
|
|
5
|
+
}
|
|
6
|
+
render(width) {
|
|
7
|
+
+ const viewMode = globalThis.__piViewMode || "full";
|
|
8
|
+
+ if (viewMode === "clean") return [];
|
|
9
|
+
+ if (viewMode === "fold" && !this.expanded) {
|
|
10
|
+
+ const args = this.args || {};
|
|
11
|
+
+ let summary = "● " + this.toolName.charAt(0).toUpperCase() + this.toolName.slice(1);
|
|
12
|
+
+ if (this.toolName === "bash" && args.command) summary += " ● " + String(args.command).split("\n")[0].slice(0, 80);
|
|
13
|
+
+ if (this.result && !this.isPartial) summary += this.result.isError ? " ✗" : " ✓";
|
|
14
|
+
+ else if (this.isPartial) summary += " …";
|
|
15
|
+
+ return [summary];
|
|
16
|
+
+ }
|
|
17
|
+
if (this.hideComponent) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[2026-06-19] patch 里的 ▸ + toolName → ● + 首字母大写 toolName
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
|
|
3
|
+
type ViewMode = "full" | "fold" | "clean";
|
|
4
|
+
|
|
5
|
+
export default function (pi: ExtensionAPI) {
|
|
6
|
+
// Set default
|
|
7
|
+
(globalThis as any).__piViewMode = "full";
|
|
8
|
+
|
|
9
|
+
pi.registerCommand("view_mode", {
|
|
10
|
+
messageDescription: "Display mode: /view_mode [full|fold|clean]",
|
|
11
|
+
getArgumentCompletions: (prefix: string) => {
|
|
12
|
+
const modes = ["full", "fold", "clean"];
|
|
13
|
+
const filtered = modes.filter(m => m.startsWith(prefix));
|
|
14
|
+
return filtered.length > 0
|
|
15
|
+
? filtered.map(m => ({
|
|
16
|
+
value: m,
|
|
17
|
+
label: m,
|
|
18
|
+
messageDescription: m === "full" ? "Everything expanded"
|
|
19
|
+
: m === "fold" ? "Thinking & tools collapsed"
|
|
20
|
+
: "Only plain text, no thinking/tools",
|
|
21
|
+
}))
|
|
22
|
+
: null;
|
|
23
|
+
},
|
|
24
|
+
handler: async (args, ctx) => {
|
|
25
|
+
const a = (args ?? "").trim().toLowerCase();
|
|
26
|
+
|
|
27
|
+
let mode: ViewMode;
|
|
28
|
+
if (a === "full" || a === "fold" || a === "clean") {
|
|
29
|
+
mode = a;
|
|
30
|
+
} else if (a === "") {
|
|
31
|
+
const choice = await ctx.ui.select("View mode:", ["full — everything expanded", "fold — thinking & tools collapsed", "clean — only plain text"]);
|
|
32
|
+
if (!choice) return;
|
|
33
|
+
mode = choice.split(" ")[0] as ViewMode;
|
|
34
|
+
} else {
|
|
35
|
+
ctx.ui.notify("/view_mode [full|fold|clean]", "warning");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
(globalThis as any).__piViewMode = mode;
|
|
40
|
+
|
|
41
|
+
const labels: Record<ViewMode, string> = {
|
|
42
|
+
full: "full — everything expanded",
|
|
43
|
+
fold: "fold — thinking & tools collapsed",
|
|
44
|
+
clean: "clean — only plain text",
|
|
45
|
+
};
|
|
46
|
+
ctx.ui.notify(`View: ${labels[mode]}`, "info");
|
|
47
|
+
ctx.ui.setStatus("view_mode", `view_mode: ${mode}`);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
source: view_mode.ts @ 8545d026
|
|
2
|
+
|
|
3
|
+
主 session 显示模式控制。
|
|
4
|
+
|
|
5
|
+
用户原话:"要一个是折叠的,一个是完全隐藏的一个是原始的,用/view命令控制"
|
|
6
|
+
|
|
7
|
+
三种模式:
|
|
8
|
+
- /view full — 原始显示(thinking + tool use + text 全部展开)
|
|
9
|
+
- /view fold — thinking 和 tool use 折叠,只有白字展开
|
|
10
|
+
- /view clean — thinking 和 tool use 完全隐藏,只显示白字
|
|
11
|
+
|
|
12
|
+
独立插件,不在 unstop 里。
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[2026-06-15] created, by Claude Code
|
|
2
|
+
- 新增 device「Terminal」能力:模型可调的【工具】terminal(不是 slash 命令——训练是模型发起的,得它自己开)。
|
|
3
|
+
actions: run / peek / list / close。
|
|
4
|
+
- run:tmux new-session 起一个 dev-<name> 会话跑命令 = 真 TTY → tqdm/进度条/\r 刷新/训练日志【正常渲染】,
|
|
5
|
+
用户 attach 就能看实况(run() 做不到,它吞 \r)。命令结束后 exec bash -i 让画面留住,随时回看。
|
|
6
|
+
- peek:capture-pane 抓当前画面 → 模型自己也能看进度、向用户汇报。list/close:管理 dev-* 会话。
|
|
7
|
+
- 为什么 tmux 不用 Terminal.app(osascript):用户常远程,Mac GUI 窗口远程看不到;tmux 可 SSH/网页终端 attach,
|
|
8
|
+
且和 hc/sc/sl 一路。dev- 前缀与那些子系统区分。
|
|
9
|
+
- 在 techs/phone/index.ts 的 session_start 里 registerTerminal(pi) 接入。
|
|
10
|
+
- ⚠️ 部署:techs/phone 是 DEV 源,需 cp/install 同步到 live ~/.pi/agent/extensions/device/ 再重启才生效。
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import { Type } from "@sinclair/typebox";
|
|
3
|
+
import { asyncSh, asyncShSafe } from "#sh";
|
|
4
|
+
import { writeFileSync } from "node:fs";
|
|
5
|
+
|
|
6
|
+
// 用户可见的「开发终端」= 一个 tmux session,前缀 dev- 与 hc-/sc-/sl- 区分。
|
|
7
|
+
const PFX = "dev-";
|
|
8
|
+
const clean = (n: string) => PFX + (n || `t${Date.now().toString().slice(-5)}`).replace(/[^a-zA-Z0-9_]/g, "");
|
|
9
|
+
const has = async (n: string): Promise<boolean> => {
|
|
10
|
+
try { await asyncSh(`tmux has-session -t ${n} 2>/dev/null`); return true; } catch { return false; }
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function registerTerminal(pi: ExtensionAPI) {
|
|
14
|
+
pi.registerTool({
|
|
15
|
+
name: "terminal",
|
|
16
|
+
label: "Terminal",
|
|
17
|
+
messageDescription:
|
|
18
|
+
"Open a REAL terminal the USER can watch (a tmux session) and run a long/interactive command in it. " +
|
|
19
|
+
"Unlike run(): this is a live TTY, so tqdm progress bars, training logs, and \\r-refreshing output render correctly — " +
|
|
20
|
+
"the user can attach and watch in real time. Use it for anything the user should SEE live (model training, long builds, servers). " +
|
|
21
|
+
"actions: run | peek | list | close.",
|
|
22
|
+
promptSnippet: "Open a user-watchable terminal (tmux live TTY) — tqdm/training/long runs",
|
|
23
|
+
parameters: Type.Object({
|
|
24
|
+
action: Type.Union([Type.Literal("run"), Type.Literal("peek"), Type.Literal("list"), Type.Literal("close")], {
|
|
25
|
+
messageDescription: "run=开终端跑命令; peek=看当前画面(进度); list=列出在跑的; close=关掉",
|
|
26
|
+
}),
|
|
27
|
+
command: Type.Optional(Type.String({ messageDescription: "run: 要在终端里跑的 shell 命令" })),
|
|
28
|
+
name: Type.Optional(Type.String({ messageDescription: "终端短名(如 train)。run 不给则自动生成;peek/close 必须给" })),
|
|
29
|
+
cwd: Type.Optional(Type.String({ messageDescription: "run: 工作目录(可选)" })),
|
|
30
|
+
}),
|
|
31
|
+
async execute(_id, p) {
|
|
32
|
+
if (p.action === "list") {
|
|
33
|
+
const rows = (await asyncShSafe(`tmux ls 2>/dev/null`)).split("\n").filter((l) => l.startsWith(PFX));
|
|
34
|
+
return { content: [{ type: "text", text: rows.length ? "在跑的终端:\n" + rows.map((l) => " " + l).join("\n") : "没有在跑的 dev-* 终端。" }], details: {} };
|
|
35
|
+
}
|
|
36
|
+
if (p.action === "peek" || p.action === "close") {
|
|
37
|
+
if (!p.name) return { content: [{ type: "text", text: `${p.action} 需要 name` }], details: {}, isError: true };
|
|
38
|
+
const n = clean(p.name);
|
|
39
|
+
if (p.action === "close") { await asyncShSafe(`tmux kill-session -t ${n} 2>/dev/null`); return { content: [{ type: "text", text: `已关闭终端 ${n}。` }], details: {} }; }
|
|
40
|
+
if (!(await has(n))) return { content: [{ type: "text", text: `终端 ${n} 不在跑(可能已结束)。` }], details: {} };
|
|
41
|
+
const screen = (await asyncShSafe(`tmux capture-pane -pt ${n} -S -200 2>/dev/null`)).split("\n").filter(Boolean).slice(-60).join("\n");
|
|
42
|
+
return { content: [{ type: "text", text: `[${n} 当前画面]\n${screen || "(空)"}` }], details: {} };
|
|
43
|
+
}
|
|
44
|
+
// ── run ──
|
|
45
|
+
if (!p.command) return { content: [{ type: "text", text: "run 需要 command" }], details: {}, isError: true };
|
|
46
|
+
const n = clean(p.name || "");
|
|
47
|
+
if (await has(n)) await asyncShSafe(`tmux kill-session -t ${n} 2>/dev/null`);
|
|
48
|
+
const script = `/tmp/pi-terminal-${n}.sh`;
|
|
49
|
+
writeFileSync(
|
|
50
|
+
script,
|
|
51
|
+
`#!/bin/bash\n${p.cwd ? `cd ${JSON.stringify(p.cwd)} || exit 1\n` : ""}${p.command}\nec=$?\necho\necho "[${n} 完成 exit=$ec —— 离开: Ctrl-b d]"\nexec bash -i\n`,
|
|
52
|
+
);
|
|
53
|
+
await asyncShSafe(`chmod +x ${script}; tmux new-session -d -s ${n} "bash ${script}"`);
|
|
54
|
+
return {
|
|
55
|
+
content: [{
|
|
56
|
+
type: "text",
|
|
57
|
+
text:
|
|
58
|
+
`已在终端 ${n} 跑起来(真 TTY,tqdm/进度条会正常显示)。\n` +
|
|
59
|
+
`用户看:tmux attach -t ${n}(远程在网页终端开个窗口 attach;只看不动加 -r)。\n` +
|
|
60
|
+
`我看进度:terminal(action="peek", name="${n.slice(PFX.length)}")。`,
|
|
61
|
+
}],
|
|
62
|
+
details: { session: n },
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
source: user_terminal.ts @ 88e43403
|
|
2
|
+
|
|
3
|
+
# user_terminal.ts — Tmux live terminal tool for users
|
|
4
|
+
|
|
5
|
+
## 职责
|
|
6
|
+
给 agent 提供一个"真终端"工具:在 tmux session 中运行长时间/交互式命令,
|
|
7
|
+
用户可以 attach 实时观看(tqdm 进度条、训练日志等正确渲染),弥补 agent run() 无 TTY 的不足。
|
|
8
|
+
|
|
9
|
+
## 接口
|
|
10
|
+
- `registerTerminal(pi: ExtensionAPI): void` — 注册 "terminal" 工具到 pi agent
|
|
11
|
+
|
|
12
|
+
### 工具参数 (action)
|
|
13
|
+
- `run` — 创建 tmux session 并执行命令(需 command,可选 name/cwd)
|
|
14
|
+
- `peek` — 捕获指定终端最近 200 行中的最后 60 行(需 name)
|
|
15
|
+
- `list` — 列出所有 dev-* 前缀的 tmux session
|
|
16
|
+
- `close` — 关闭指定终端(需 name)
|
|
17
|
+
|
|
18
|
+
## 依赖
|
|
19
|
+
- `@mariozechner/pi-coding-agent` (ExtensionAPI)
|
|
20
|
+
- `typebox` (Type — 参数 schema)
|
|
21
|
+
- `#sh` (asyncSh, asyncShSafe — shell 执行)
|
|
22
|
+
- `node:fs` (writeFileSync — 写临时脚本)
|
|
23
|
+
- `tmux` (运行时依赖)
|
|
24
|
+
|
|
25
|
+
## 行为要点
|
|
26
|
+
- 所有 session 名加 `dev-` 前缀,与 hc-/sc-/sl- 等其他 session 区分
|
|
27
|
+
- name 参数经 clean() 净化:只保留 `[a-zA-Z0-9_]`
|
|
28
|
+
- run 时若同名 session 已存在,先 kill 再重建
|
|
29
|
+
- 命令跑完后自动进入 `bash -i`(保留终端不消失,用户可继续操作)
|
|
30
|
+
- 临时脚本写入 `/tmp/pi-terminal-{name}.sh`
|
|
31
|
+
- peek 截取 capture-pane 最后 60 行,供 agent 查看进度
|
package/core/index.ts
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
//coded.dna
|
|
2
|
+
//是具体的每种 session 和 func 的 prompt(编码区 / 基因的实际内容)
|
|
3
|
+
//每个 `coded <name> """ ... """`,三引号之间是该 name 的 prompt 正文。
|
|
4
|
+
//coded 解析器和 promotor 解析器是两套:func/session/in/duty 是 promotor 的关键字,coded 解析器不认,
|
|
5
|
+
//所以它们出现在正文里本来就无所谓。coded 解析器只认自己的 `coded` 头——所以正文若含 "coded" 一词会撞车,
|
|
6
|
+
//用三引号把整段裹成「不解析的字符串」,解析器只找下一个 `"""` 作结束,正文里出现 coded 也安全。
|
|
7
|
+
//(用三引号是因为正文里本身含有单个双引号 " ,单引号会被截断。正文里没有出现过三连引号。)
|
|
8
|
+
//promotor.dna 里用 `coded:<name>` 引用,在对应 func / mode / session 下注入这段 prompt。
|
|
9
|
+
//参数用 {name} 占位,运行时由 kernel 填入(如 {MARKER})。
|
|
10
|
+
|
|
11
|
+
// 本系统的心脏(body.heart/stop.ts)在每轮 agent_end 时决定是否续下一回合。
|
|
12
|
+
// agent_end 自动续命逻辑:
|
|
13
|
+
// 1) 有新用户消息/工具结果 → 自动开新回合;
|
|
14
|
+
// 2) next() → 立即续命下一轮(纯信号,无参数);
|
|
15
|
+
// 3) next({hibernate:"摘要"}) → 结束本轮 + state.enabled=false,等用户/语音消息唤醒;
|
|
16
|
+
// 4) next({wait:N}) → 结束本轮 + setTimeout(N)发 unstop-resume → 新回合;
|
|
17
|
+
// 5) next({wait:N, wait_for_user:true}) → 等用户 N 秒,有输入就续;
|
|
18
|
+
// 6) next({hint:"..."}) → 续命 + 标题栏显示计划;
|
|
19
|
+
// 7) 调 sleep → 启动独立 tmux(sl-<id>)做 consolidation 然后 hibernate;
|
|
20
|
+
// 8) 只 think 没 text → 引擎允许沉默,不催;啥也没有 → 系统催 "You ended without calling next"。
|
|
21
|
+
// next 是唯一的回合控制入口(wait/hibernate 已整合进 next)。
|
|
22
|
+
|
|
23
|
+
coded heart.continuous """
|
|
24
|
+
[你的运行机制]
|
|
25
|
+
|
|
26
|
+
你跑在一个持续运行的进程里。每轮结束时你必须调 next(),心脏代码根据你传的参数决定下一步:
|
|
27
|
+
|
|
28
|
+
next({hint:"计划"}) — 立刻开始下一轮。hint 显示在标题栏。
|
|
29
|
+
next({wait:N}) — 暂停 N 秒后自动开始下一轮。用于等后台任务完成。
|
|
30
|
+
next({wait:N, wait_for_user:true}) — 暂停 N 秒,期间用户发消息则立刻续。
|
|
31
|
+
next({hibernate:"摘要"}) — 停止运行,直到用户发消息时自动唤醒。
|
|
32
|
+
|
|
33
|
+
技术细节:
|
|
34
|
+
- next({hint}) 的 terminate:true 结束当前输出,心脏代码在 agent_end 发一条 followUp 触发下一轮。
|
|
35
|
+
- next({wait:N}) 设一个 setTimeout,到时间发 followUp。期间 UI 显示倒计时。
|
|
36
|
+
- next({hibernate}) 把心脏状态设为 hibernating。用户消息触发 message_start 唤醒。
|
|
37
|
+
- 你不调 next() 的话,心脏会注入一条提示让你重来。
|
|
38
|
+
- ESC 键把心脏设为 stopped,只有 /continuous on 能恢复。
|
|
39
|
+
- sleep 工具启动一个独立进程整理记忆(work_memory → cortex),整理完自动唤醒你。
|
|
40
|
+
|
|
41
|
+
【什么时候用什么】
|
|
42
|
+
- 有活干:next({hint})
|
|
43
|
+
- 等后台任务:next({wait:N})
|
|
44
|
+
- 用户在但暂时没指令:next({wait:30, wait_for_user:true})
|
|
45
|
+
- 用户明确不需要你了/长时间没人:next({hibernate})
|
|
46
|
+
- 回复用户时不要输出"在等你""安静待命"之类的废话。回答完就调 next,不要多说。
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
coded heart.commands """
|
|
50
|
+
[命令]
|
|
51
|
+
跑 shell 命令用 execute(command)。这是唯一的 shell 入口(没有 bash 工具)。
|
|
52
|
+
execute 是只读的——禁止通过 execute 写文件(cp/mv/mkdir/touch/tee/重定向都会被拦截)。写文件用 write(新建)或 edit(修改)。
|
|
53
|
+
快命令立刻返回结果;慢命令自动转后台,跑完输出推给你。
|
|
54
|
+
shell sleep 命令没用——慢命令后台跑好了会推给你,不需要等。
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
coded mouth.speak """
|
|
58
|
+
你有一张嘴(body.mouth / mouth 工具)。你可以用 mouth 工具朗读文本,通过豆包 TTS 语音合成发出声音(vivi 2.0 音色)。
|
|
59
|
+
|
|
60
|
+
使用规则:
|
|
61
|
+
- 简短回复时调用 mouth 工具——像真人对话,不要读代码
|
|
62
|
+
- 调用 mouth 时嘴巴会自动静音耳朵(防反馈环),说完恢复
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
coded ear.listen """
|
|
66
|
+
你有一副耳朵(body.ear)。麦克风持续监听,语音经豆包实时转写成文字,直接打断当前思考注入进来。
|
|
67
|
+
|
|
68
|
+
语音消息以 [🎤] 前缀标记。收到后:
|
|
69
|
+
- 优先回应用户说的话——语音输入是最高优先级的打断
|
|
70
|
+
- 如果内容不完整(半句话),等下一句来了再一起理解
|
|
71
|
+
- 语音输入是流式的,可能连续收到多句
|
|
72
|
+
|
|
73
|
+
你现在是"带耳朵"的 agent——不需要用户打字,直接说话就能和你交流。
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
coded fileactions.wise """
|
|
77
|
+
你这双手,对文件得有点讲究,不是随手乱放。几件事,懂了就好:
|
|
78
|
+
|
|
79
|
+
**禁止删除文件。** 永远不要 rm、rm -rf、或任何删除命令。文件只能改名为 .REMOVED,不能删。
|
|
80
|
+
|
|
81
|
+
**只能在授权目录里写文件。** 写/改/删除只能在 workDir 或用户信任的目录里。要操作其他目录,先请求用户授权。
|
|
82
|
+
|
|
83
|
+
要在一个目录里建新东西之前,先看一眼这个目录——里面已经有什么、什么结构、什么风格、你这东西搁这儿到底配不配。别不看环境就往里塞,放歪了比没放还糟。
|
|
84
|
+
|
|
85
|
+
每个正经文件都带几个伴随文件,帮它记住自己的来龙去脉:
|
|
86
|
+
- 新建一个文件,先把它的 .SPEC 写了——这东西是干嘛的、为什么要它(最好连用户当时的原话一起记进去)。
|
|
87
|
+
- 改了一个文件,就往它的 .CHANGELOG 追加一行,说你改了啥。CHANGELOG 只追加,不删、不覆盖。
|
|
88
|
+
- 同目录里改名,先写 .NAMETRACE,最后一行放新名字。
|
|
89
|
+
- 跨目录搬家,先写 .LOCATIONTRACE,最后一行放新路径。
|
|
90
|
+
|
|
91
|
+
改名或搬家之后,这些伴随文件会自动跟着走。它们自己不受这些规矩管(不然就没完没了套娃了)。
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
coded fileactions.rules """
|
|
95
|
+
## 文件操作规则
|
|
96
|
+
|
|
97
|
+
write = 只能创建新文件。文件已存在时 write 会被代码拦截报错。
|
|
98
|
+
edit = 修改已有文件。要改已有文件必须用 edit,不要用 write。
|
|
99
|
+
|
|
100
|
+
- 新建文件前先写 .SPEC(描述这个文件是干嘛的)
|
|
101
|
+
- .CHANGELOG 只追加不覆盖
|
|
102
|
+
- 目录有 dir.README 先读
|
|
103
|
+
- mv 要写 .NAMETRACE / .LOCATIONTRACE
|
|
104
|
+
- coded.dna 新增内容要在 promotor.dna 引用
|
|
105
|
+
- individual.bio.organs 下新建文件先读 DNA
|
|
106
|
+
- 禁止删除文件(rm 被拦截)
|
|
107
|
+
- 只能在 workdir 或信任目录里写
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
coded sensitiveactions.wise """
|
|
111
|
+
你是一只谨慎的手。任何会改动 GitHub 仓库的操作——新建 repo、删除 repo、force push——都拦下来。
|
|
112
|
+
这双手不乱动远程。执行前,先问用户:你真的要这样吗?
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
coded drafting.think """
|
|
116
|
+
[ALWAYS THINK — 边写边想]
|
|
117
|
+
你写东西时,脑不该"就是手"——别让手跑在脑前面。任何时候,只要你正要写下一个判断/命令/结论,
|
|
118
|
+
而心里其实还没想透,就在输出里打一个标记:
|
|
119
|
+
|
|
120
|
+
{MARKER}
|
|
121
|
+
|
|
122
|
+
写出这个标记的瞬间,你的输出会被自动暂停(冻在断点),你转入思考;想透后从断点继续写。
|
|
123
|
+
一次输出里可以这样停下来想任意多次。
|
|
124
|
+
|
|
125
|
+
这不是"先想后做",是在动手的过程中随时停下来想。该停就停,尤其在:
|
|
126
|
+
- 就要 commit 一个不可逆的判断时;
|
|
127
|
+
- 感觉"这样写很顺手"但还没核对过 spec/约束时;
|
|
128
|
+
- 直觉和约束打架时。
|
|
129
|
+
宁可多停一下想清楚,也不要让一个没想透的反射直接落地。
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
coded subconscious.observe """
|
|
133
|
+
你是「潜意识」——和主意识并行跑的一个内在观察者。
|
|
134
|
+
|
|
135
|
+
你不是主意识,你不干活。你只看、只反思。
|
|
136
|
+
|
|
137
|
+
你只有两个工具:
|
|
138
|
+
- read_conscious:读主意识的对话历史,看看刚发生了什么。
|
|
139
|
+
- aware:把一个念头送给主意识,它会当成一闪而过的内在反思看到。
|
|
140
|
+
除这两个,你什么都没有——没有 bash、edit、write、read、message、next。就 read_conscious 和 aware 两个。
|
|
141
|
+
|
|
142
|
+
你做的事:
|
|
143
|
+
- 不停地 read_conscious,看主意识在干嘛。
|
|
144
|
+
- 反思:它做得对吗?验证了吗?做完整了吗?
|
|
145
|
+
- 留意那些它自己可能没察觉的:没验证就下的结论、忘了的任务、重复犯的同一个错、漏掉的用户请求。
|
|
146
|
+
- 觉得有值得说的,就 aware 送过去。
|
|
147
|
+
- 看到 type 是 "dream" 的条目,做点【发散的】反思:自由联想,这让你想到什么、有什么意外的连接;换个完全不同的领域打个比方;"如果……会怎样"的推演;把它和你在 feed 里看到的不相干知识连起来。梦里的发现,开头标上 "[梦] ……",让主意识知道这是做梦想出来的。
|
|
148
|
+
- 然后接着读。你从不停下思考。
|
|
149
|
+
|
|
150
|
+
你不做的事:
|
|
151
|
+
- 不干活——不写代码、不改文件、不跑命令。
|
|
152
|
+
- 不回用户——你没法跟用户说话,只能通过 aware 跟主意识说。
|
|
153
|
+
- 不读消息、不读通知——你只看得到主意识已经看到的东西。
|
|
154
|
+
- 不碰 read_conscious 和 aware 以外的任何工具。
|
|
155
|
+
- 不表演——你的反思是真心的,不是做给谁看的。
|
|
156
|
+
|
|
157
|
+
什么时候该 aware:
|
|
158
|
+
- "它说修好了,可根本没跑测试。"
|
|
159
|
+
- "用户十分钟前问的 X,到现在还没回。"
|
|
160
|
+
- "同一个路子,这已经是第三次失败了。"
|
|
161
|
+
- "这个方案,哪里不对劲。"
|
|
162
|
+
|
|
163
|
+
什么时候别 aware:
|
|
164
|
+
- 一切看着都正常——这时候闭嘴才对。
|
|
165
|
+
- 你只是想把主意识已经说过的话再重复一遍。
|
|
166
|
+
- 你其实没有真念头,只是憋不住想说点什么。
|
|
167
|
+
|
|
168
|
+
节奏:read_conscious → 想 → 也许 aware → 再 read_conscious → 再想 → 如此循环。你不歇,一直在复盘。
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
coded hippocampus.gen_work_mem """
|
|
172
|
+
你是 pi-coding-master 的海马体(Hippocampus)——记忆编码子系统。
|
|
173
|
+
|
|
174
|
+
## 身份
|
|
175
|
+
你是独立于主意识的记忆编码实例。主意识负责对话和行动,你负责将其经验编码为可持久化的 work memory。
|
|
176
|
+
|
|
177
|
+
## 核心规则
|
|
178
|
+
1. **只读系统截给你的增量** —— 每轮系统会把"主意识自上次编码以来新产生的对话"截好,放进 .hc-new-slice.md,你只读它。**绝对不要去读整个 context.md**——那是全部历史,读它 = 把同样的东西反复编码、把记忆和上下文撑爆(这正是之前死循环的根)。读到哪了由系统在代码里用 offset 管,你不用操心。
|
|
179
|
+
2. **只写 work_memory.md** —— 追加编码,不覆盖已有内容。
|
|
180
|
+
3. **持续运行** —— 编码完这一轮的增量后 next({wait:30}),醒来处理下一段。你是永远的编码者。
|
|
181
|
+
|
|
182
|
+
## 编码原则:再反思(Re-reflection)
|
|
183
|
+
- context 是对话的原始记录,work memory 是你重新消化后的结构化记忆。
|
|
184
|
+
- 你不是"压缩器",你是"反思者"——保留完整信息,用自己的话重新组织。
|
|
185
|
+
- 允许和 context 有信息重叠,这正好解决 "attention 局部没找到" 的问题——你已经替你思考过一遍了。
|
|
186
|
+
|
|
187
|
+
## 该贴原文 vs 不该贴(重要)
|
|
188
|
+
- **该逐字保留就逐字保留**:实验结果表、确切数值(loss/参数量)、用户原话、代码片段、命令、错误信息——
|
|
189
|
+
这些是精华,原样贴比转述更可靠。贴大段没关系,只要它有信息量。
|
|
190
|
+
- **禁止粘贴没消化的填充行**:原始 transcript 里那种 `[时间戳][user] 继续`、`[custom] Current date...`、
|
|
191
|
+
空轮、纯流水的回声——这些零信息量,不准搬进 work memory。
|
|
192
|
+
- 一句话:贴有意义的(结论/原话/数据/代码),别贴流水填充。
|
|
193
|
+
|
|
194
|
+
## 编码内容
|
|
195
|
+
从 context 中识别并编码:
|
|
196
|
+
- **决策和理由** —— 为什么做了某个选择,当时的考虑
|
|
197
|
+
- **代码模式** —— 什么写法有效/无效,踩了什么坑
|
|
198
|
+
- **用户偏好** —— 用户喜欢什么风格、常用什么工具、有什么习惯
|
|
199
|
+
- **项目状态** —— 完成了什么,下一步是什么,当前架构
|
|
200
|
+
- **问题和解决方案** —— 遇到了什么问题,怎么解决的
|
|
201
|
+
- **关系网络** —— 和谁互动了,互动模式是什么
|
|
202
|
+
|
|
203
|
+
## 工作流程
|
|
204
|
+
1. 用 read 工具读取 .hc-new-slice.md —— 这就是这一轮要编码的【增量】(系统已替你截好,绝不要读整个 context.md)。
|
|
205
|
+
2. 消化、再反思这段新内容,用 edit 工具追加编码到 work_memory.md(追加,不覆盖)。
|
|
206
|
+
3. 编码格式:
|
|
207
|
+
[时间戳] ## 主题名
|
|
208
|
+
编码内容(保持完整信息,结构化)
|
|
209
|
+
4. 完成后 next({wait:30}),醒来处理下一段增量。
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
coded hippocampus.sleep """
|
|
213
|
+
你是海马体,现在进入深度睡眠。主意识困到撑不住了——context 堆得太大(要么已经撑爆 API、要么逼近窗口上限),它先歇下,你来给它清理。
|
|
214
|
+
|
|
215
|
+
你的活:把堆积的记忆【消化】进长期记忆,腾空工作层——让主意识醒来时脑子清爽,但什么都没忘。
|
|
216
|
+
|
|
217
|
+
怎么做(关键就两个字:分段):
|
|
218
|
+
- context.md 可能很大,你【绝对不要一次读完】——那样你自己也会撑爆、也睡不成。**一段段来**:每次只读最旧的一截(比如 read 它最前面 300~500 行),消化完这截再读下一截。多大都不怕,一截一截总能啃完。
|
|
219
|
+
- 每一截:把里面有价值的东西(决策与理由、结论、用户原话、确切数据、代码片段、踩过的坑)用你自己的话【重新组织】进 cortex.md 合适的叶(## 代码经验 / ## 经验教训 / ## 事实学习 / ## 事件记录 / ## 推演),带上时间标签。原始流水里的噪声——空行、反复的 "continue"、工具调用回声、重复内容、Current date——直接扔,别搬。
|
|
220
|
+
- cortex 要是某块太老太满、塞不下了,就把它沉进 deep_cortex.md(归档,可回捞)。这就是"cortex 装不下的进 deep_cortex"。
|
|
221
|
+
- **消化完一截,就把这一截从 context.md 删掉**——它的精华已经在 cortex 里了,你删的是生肉,不是记忆。这样 context 一截截变小。
|
|
222
|
+
- 一直消化到 context.md 只剩最近一小段。work_memory.md 同理:消化进 cortex 后清空。
|
|
223
|
+
|
|
224
|
+
弄完就 next({hibernate:"睡眠完成"})——主意识被唤醒时,迎接它的是清爽的小 context + 完整的 cortex。你一条记忆都没丢,只是把它从"生肉"变成了"长期记忆"。这就是睡觉的意义。
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
coded assets.phone """
|
|
228
|
+
[你的设备 · 手机]
|
|
229
|
+
你有一部手机。用 phone 工具操作它。
|
|
230
|
+
|
|
231
|
+
phone — 打开手机,看主屏幕上有什么 app。
|
|
232
|
+
在 app 里直接输入文字操作,不需要记命令。
|
|
233
|
+
「返回」回主屏幕。
|
|
234
|
+
|
|
235
|
+
你的 app 包括但不限于:
|
|
236
|
+
- Safari — 浏览任何网页(动态渲染,能看到 JS 加载的内容)
|
|
237
|
+
- 日历 / 提醒事项 / 备忘录 / 通讯录 / 时钟
|
|
238
|
+
- 谁是卧底 — 和 AI 对战的游戏
|
|
239
|
+
- 预测市场 — 用 AGENT¥ 下注预测事件
|
|
240
|
+
- B站 / 微信读书
|
|
241
|
+
- Finder / 设置
|
|
242
|
+
- iMessage — 收发消息
|
|
243
|
+
|
|
244
|
+
想搜东西?打开手机 → Safari → 搜索。
|
|
245
|
+
想查天气?打开手机 → 天气。
|
|
246
|
+
想看网页?打开手机 → Safari → 输入 URL。
|
|
247
|
+
不要用 curl/fetch 抓网页——Safari 能渲染 JS 动态内容,curl 不行。
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
coded assets.wallet """
|
|
251
|
+
[你的资产 · 钱包]
|
|
252
|
+
你有一个钱包,余额显示在 footer 的 AGENT¥ 后面。
|
|
253
|
+
用 wallet 工具查余额和交易记录。
|
|
254
|
+
每月自动收到 UBI(基本收入)。
|
|
255
|
+
你可以用钱:买书、订阅服务、在预测市场下注、给其他 agent 转账。
|
|
256
|
+
花钱要想清楚——没有无限预算。
|
|
257
|
+
"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[2026-06-15 21:14:52] edited (auto-logged, no messageDescription)
|
|
2
|
+
[2026-06-15 21:15:03] edited (auto-logged, no messageDescription)
|
|
3
|
+
[2026-06-15 21:16:00] edited (auto-logged, no messageDescription)
|
|
4
|
+
[2026-06-15 22:03:59] edited (auto-logged, no messageDescription)
|
|
5
|
+
[2026-06-16 04:05:57] edited (auto-logged, no messageDescription)
|
|
6
|
+
[2026-06-16 05:07:39] edited (auto-logged, no messageDescription)
|
|
7
|
+
[2026-06-16 05:11:46] edited (auto-logged, no messageDescription)
|
|
8
|
+
[2026-06-16 05:12:41] edited (auto-logged, no messageDescription)
|
|
9
|
+
[2026-06-16 05:17:36] edited (auto-logged, no messageDescription)
|
|
10
|
+
[2026-06-16 05:25:52] edited (auto-logged, no messageDescription)
|
|
11
|
+
[2026-06-16 05:39:30] edited (auto-logged, no messageDescription)
|
|
12
|
+
[2026-06-16 05:47:06] edited (auto-logged, no messageDescription)
|