rovecode 0.3.2 → 0.4.0-beta.2
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/CHANGELOG.md +512 -0
- package/README.md +33 -45
- package/bin/rovecode.js +24 -0
- package/dist/cli/app-dybnr56b.js +2 -0
- package/dist/cli/ask-user-p8hq4xgj.js +2 -0
- package/dist/cli/auth-login-ewpgw5sm.js +2 -0
- package/dist/cli/auth-m8p9grty.js +2 -0
- package/dist/cli/bench-xv3ypwev.js +9 -0
- package/dist/cli/catalog-737wb2s0.js +2 -0
- package/dist/cli/cli-arhg40m0.js +2 -0
- package/dist/cli/client-cf2pxx8q.js +2 -0
- package/dist/cli/commands-3p7e4xxs.js +2 -0
- package/dist/cli/connect-3q93d7cb.js +2 -0
- package/dist/cli/context-cmd-eqxmxhzq.js +2 -0
- package/dist/cli/context-report-hbw9zfes.js +2 -0
- package/dist/cli/count-remote-mby98cd0.js +2 -0
- package/dist/cli/design-122y0axd.js +2 -0
- package/dist/cli/dispatch-b4egzvvh.js +2 -0
- package/dist/cli/doctor-x4jkv72e.js +3 -0
- package/dist/cli/executor-ftvg6tsy.js +2 -0
- package/dist/cli/export-pdgdhkch.js +2 -0
- package/dist/cli/files-cez9a96p.js +2 -0
- package/dist/cli/gauntlet-r3xxaszc.js +2 -0
- package/dist/cli/gauntlet-runner-r515m7kk.js +10 -0
- package/dist/cli/gauntlet-wave3-bnkjk2v2.js +5 -0
- package/dist/cli/gauntlet-wave4-acs9s60q.js +14 -0
- package/dist/cli/hashline-ewg5hbe3.js +2 -0
- package/dist/cli/http-n0kehsk8.js +5 -0
- package/dist/cli/index-z5qt1s76.js +2 -0
- package/dist/cli/install-80mp63kx.js +2 -0
- package/dist/cli/loop-12twjcat.js +2 -0
- package/dist/cli/main-01pv9206.js +4 -0
- package/dist/cli/main-0jys2ccn.js +3 -0
- package/dist/cli/main-1ztz6fkj.js +10 -0
- package/dist/cli/main-23q7cmww.js +9 -0
- package/dist/cli/main-2rzbexn2.js +3 -0
- package/dist/cli/main-2wyax8k9.js +9 -0
- package/dist/cli/main-2yeveeve.js +6 -0
- package/dist/cli/main-2z3dek0b.js +3 -0
- package/dist/cli/main-2zgsknth.js +3 -0
- package/dist/cli/main-45ejth3a.js +4 -0
- package/dist/cli/main-45rn3trk.js +22 -0
- package/dist/cli/main-4p4e2w7x.js +4 -0
- package/dist/cli/main-4y0tnfpa.js +16 -0
- package/dist/cli/main-5py0rkmc.js +4 -0
- package/dist/cli/main-6dtqmbt6.js +7 -0
- package/dist/cli/main-6h9x282m.js +4 -0
- package/dist/cli/main-6vjeds42.js +3 -0
- package/dist/cli/main-78gq4bt9.js +6 -0
- package/dist/cli/main-7jd5vh3x.js +4 -0
- package/dist/cli/main-7kt6r53y.js +4 -0
- package/dist/cli/main-8c1tbazx.js +58 -0
- package/dist/cli/main-9a9rnh47.js +19 -0
- package/dist/cli/main-9ht36z12.js +3 -0
- package/dist/cli/main-a2yfvcy9.js +7 -0
- package/dist/cli/main-a3f51n0x.js +5 -0
- package/dist/cli/main-b8zq261k.js +3 -0
- package/dist/cli/main-bxtvnf6d.js +13 -0
- package/dist/cli/main-edxc3yzt.js +4 -0
- package/dist/cli/main-evgz4mp5.js +21 -0
- package/dist/cli/main-f33fc5je.js +9 -0
- package/dist/cli/main-fvnpq46y.js +12 -0
- package/dist/cli/main-gbbty4d4.js +3 -0
- package/dist/cli/main-gth53dnt.js +25 -0
- package/dist/cli/main-hqbz10aw.js +9 -0
- package/dist/cli/main-hrrvcfan.js +38 -0
- package/dist/cli/main-hzwtsb2m.js +5 -0
- package/dist/cli/main-j7ttv0sd.js +34 -0
- package/dist/cli/main-jak598k9.js +5 -0
- package/dist/cli/main-kba6zeyd.js +6 -0
- package/dist/cli/main-kwwsz6rq.js +3 -0
- package/dist/cli/main-m8vm17zq.js +3 -0
- package/dist/cli/main-mg4f96e1.js +3 -0
- package/dist/cli/main-mg9b20ac.js +18 -0
- package/dist/cli/main-mgb9ccnx.js +3 -0
- package/dist/cli/main-mjt2p7aj.js +3 -0
- package/dist/cli/main-n6qrdbmy.js +3 -0
- package/dist/cli/main-na7wse0x.js +5 -0
- package/dist/cli/main-nqveez48.js +4 -0
- package/dist/cli/main-ntqef02r.js +10 -0
- package/dist/cli/main-nvc3yjay.js +136 -0
- package/dist/cli/main-p0cfn6nr.js +16 -0
- package/dist/cli/main-qj2djy17.js +19 -0
- package/dist/cli/main-qsevpgsv.js +3 -0
- package/dist/cli/main-qvarybsp.js +3 -0
- package/dist/cli/main-rebtt91r.js +5 -0
- package/dist/cli/main-rpg7h8mb.js +3 -0
- package/dist/cli/main-rsy72qmw.js +15 -0
- package/dist/cli/main-rvetps99.js +18 -0
- package/dist/cli/main-s4bb0jav.js +3 -0
- package/dist/cli/main-s9v8k74e.js +3 -0
- package/dist/cli/main-tjvwmscs.js +3 -0
- package/dist/cli/main-tkgarpjj.js +4 -0
- package/dist/cli/main-v8y60bb2.js +3 -0
- package/dist/cli/main-vhrrq337.js +3 -0
- package/dist/cli/main-vp2dfb7s.js +4 -0
- package/dist/cli/main-vqbr22sz.js +8 -0
- package/dist/cli/main-vxnwe5xx.js +18 -0
- package/dist/cli/main-wgph00xf.js +5 -0
- package/dist/cli/main-wk2csfnj.js +5 -0
- package/dist/cli/main-wm997zjx.js +3 -0
- package/dist/cli/main-wpkyraxh.js +3 -0
- package/dist/cli/main-wqt32p5x.js +4 -0
- package/dist/cli/main-x9ct6y1a.js +3 -0
- package/dist/cli/main-xfekqh9m.js +7 -0
- package/dist/cli/main-xt9zc3n6.js +7 -0
- package/dist/cli/main-xx2z3zh5.js +4 -0
- package/dist/cli/main-y5c82rxr.js +3 -0
- package/dist/cli/main-yrjt2sqt.js +14 -0
- package/dist/cli/main-ys6zj3yr.js +3 -0
- package/dist/cli/main-ywbxshqc.js +8 -0
- package/dist/cli/main-z13755t8.js +25 -0
- package/dist/cli/main-zc7pyrbj.js +4 -0
- package/dist/cli/main.js +279 -0
- package/dist/cli/market-cmd-bm5xvn9f.js +5 -0
- package/dist/cli/mcp-login-bthtfpt7.js +2 -0
- package/dist/cli/mcp-market-cmd-mbeshfyd.js +2 -0
- package/dist/cli/notify-54v5z9dz.js +2 -0
- package/dist/cli/oauth-g5gme95c.js +2 -0
- package/dist/cli/output-satndjap.js +16 -0
- package/dist/cli/profiles-sfhpbq3m.js +2 -0
- package/dist/cli/provider-config-hv3xtdt4.js +2 -0
- package/dist/cli/provider-kwzq6g84.js +2 -0
- package/dist/cli/registry-fh0hdnyn.js +2 -0
- package/dist/cli/registry-y1y8e94r.js +2 -0
- package/dist/cli/repl-t4z03mqq.js +11 -0
- package/dist/cli/resume-fqt4chg8.js +2 -0
- package/dist/cli/run-flags-rysbag9t.js +2 -0
- package/dist/cli/runtime-j19fjbsa.js +2 -0
- package/dist/cli/sandbox-config-g4qxd7y5.js +2 -0
- package/dist/cli/server-r0b6bksk.js +5 -0
- package/dist/cli/session-arg-txmn5g4x.js +2 -0
- package/dist/cli/session-ed250d9j.js +2 -0
- package/dist/cli/sessions-cmd-adw7svfn.js +7 -0
- package/dist/cli/settings-y9rzcqx8.js +2 -0
- package/dist/cli/setup-jmbr11j0.js +2 -0
- package/dist/cli/sextant-smoke-tcth0vea.js +5 -0
- package/dist/cli/skills-cmd-zbdy99v6.js +2 -0
- package/dist/cli/smoke-1bg937kx.js +8 -0
- package/dist/cli/start-chat-p01cdks3.js +12 -0
- package/dist/cli/stream-4wmyaypz.js +2 -0
- package/dist/cli/task-eg4s093s.js +2 -0
- package/dist/cli/tasks-12v9rr9k.js +2 -0
- package/dist/cli/thinking-a5ngvqyh.js +2 -0
- package/dist/cli/todo-1wxpcecx.js +2 -0
- package/dist/cli/tools-2ftsya7w.js +2 -0
- package/dist/cli/tools-x1tj4fxm.js +2 -0
- package/dist/cli/trust-cmd-hccxehzb.js +2 -0
- package/dist/cli/update-check-ygt3vd7m.js +2 -0
- package/dist/cli/update-cmd-v23qhr8c.js +2 -0
- package/dist/cli/voice-g1gtck92.js +2 -0
- package/dist/cli/webfetch-0nnrjgb5.js +2 -0
- package/dist/cli/websearch-f0vr2p7d.js +2 -0
- package/dist/cli/workspace-9rq1w4ta.js +2 -0
- package/dist/lib/index.js +62 -0
- package/dist/lib/models-index.json +1 -0
- package/dist/lib/plugins.js +6 -0
- package/dist/lib/providers.js +17 -0
- package/dist/lib/public-api.js +20 -0
- package/dist/rovecode.exe +4 -0
- package/package.json +38 -11
- package/bin/rovecode.ts +0 -21
- package/src/acp/server.ts +0 -374
- package/src/cli/auth-login.ts +0 -122
- package/src/cli/connect.ts +0 -244
- package/src/cli/context-cmd.ts +0 -199
- package/src/cli/dispatch.ts +0 -82
- package/src/cli/doctor.ts +0 -362
- package/src/cli/export.ts +0 -276
- package/src/cli/help.ts +0 -293
- package/src/cli/is-tui-invocation.ts +0 -8
- package/src/cli/main.ts +0 -583
- package/src/cli/market-cmd.ts +0 -658
- package/src/cli/mcp-login.ts +0 -141
- package/src/cli/mcp-market-cmd.ts +0 -302
- package/src/cli/output.ts +0 -382
- package/src/cli/repl.ts +0 -250
- package/src/cli/repomap-root.ts +0 -14
- package/src/cli/resume.ts +0 -57
- package/src/cli/run-flags.ts +0 -43
- package/src/cli/run-limits.ts +0 -78
- package/src/cli/runtime.ts +0 -931
- package/src/cli/session-arg.ts +0 -30
- package/src/cli/sessions-cmd.ts +0 -145
- package/src/cli/setup.ts +0 -153
- package/src/cli/skills-cmd.ts +0 -194
- package/src/cli/start-chat.ts +0 -65
- package/src/cli/trust-cmd.ts +0 -52
- package/src/coding/bash.ts +0 -148
- package/src/coding/checkpoints.ts +0 -327
- package/src/coding/diff.ts +0 -138
- package/src/coding/files.ts +0 -341
- package/src/coding/hashline.ts +0 -274
- package/src/coding/lsp-gate.ts +0 -254
- package/src/coding/lsp-servers.ts +0 -147
- package/src/coding/lsp.ts +0 -283
- package/src/coding/repomap-cache.ts +0 -99
- package/src/coding/repomap-files.ts +0 -192
- package/src/coding/repomap.ts +0 -481
- package/src/core/agents.ts +0 -255
- package/src/core/compaction.ts +0 -259
- package/src/core/config.ts +0 -289
- package/src/core/context-report.ts +0 -228
- package/src/core/context.ts +0 -60
- package/src/core/count-remote.ts +0 -107
- package/src/core/execpolicy-rules.ts +0 -196
- package/src/core/execpolicy.ts +0 -385
- package/src/core/executor.ts +0 -454
- package/src/core/guardrails.ts +0 -400
- package/src/core/hooks.ts +0 -411
- package/src/core/images.ts +0 -230
- package/src/core/intro.ts +0 -266
- package/src/core/loop.ts +0 -567
- package/src/core/modes.ts +0 -372
- package/src/core/orchestrator.ts +0 -245
- package/src/core/proc-group.ts +0 -48
- package/src/core/project-trust.ts +0 -98
- package/src/core/reflection.ts +0 -165
- package/src/core/sandbox-config.ts +0 -186
- package/src/core/session-id.ts +0 -24
- package/src/core/session-images.ts +0 -73
- package/src/core/session-ops.ts +0 -183
- package/src/core/session-text.ts +0 -29
- package/src/core/session.ts +0 -469
- package/src/core/settings.ts +0 -170
- package/src/core/tasks.ts +0 -646
- package/src/core/token-scale.ts +0 -108
- package/src/core/tools.ts +0 -309
- package/src/core/trust.ts +0 -104
- package/src/core/types.ts +0 -330
- package/src/core/update-check.ts +0 -171
- package/src/core/usage.ts +0 -204
- package/src/core/validate.ts +0 -121
- package/src/core/verify-gate.ts +0 -159
- package/src/core/verify.ts +0 -236
- package/src/core/voice.ts +0 -158
- package/src/core/win-job.ts +0 -183
- package/src/core/workspace.ts +0 -184
- package/src/design/audit.ts +0 -797
- package/src/design/direction.ts +0 -190
- package/src/design/rules.ts +0 -157
- package/src/eval/bench.ts +0 -150
- package/src/eval/gauntlet-runner.ts +0 -215
- package/src/eval/gauntlet-support.ts +0 -84
- package/src/eval/gauntlet-wave3.ts +0 -269
- package/src/eval/gauntlet-wave4.ts +0 -217
- package/src/eval/gauntlet.ts +0 -253
- package/src/index.ts +0 -17
- package/src/lanes/agy.ts +0 -95
- package/src/lanes/approval.ts +0 -24
- package/src/lanes/claude.ts +0 -129
- package/src/lanes/codex.ts +0 -127
- package/src/lanes/events.ts +0 -130
- package/src/lanes/job.ts +0 -142
- package/src/lanes/opencode.ts +0 -122
- package/src/lanes/process.ts +0 -184
- package/src/lanes/progress.ts +0 -183
- package/src/lanes/registry.ts +0 -178
- package/src/lanes/runner.ts +0 -124
- package/src/lanes/types.ts +0 -112
- package/src/market/catalogs/mcp-docs.json +0 -111
- package/src/market/catalogs/plugins.json +0 -111
- package/src/market/catalogs/skills.json +0 -478
- package/src/market/clone.ts +0 -72
- package/src/market/context-cost.ts +0 -121
- package/src/market/digest.ts +0 -106
- package/src/market/index.ts +0 -22
- package/src/market/install.ts +0 -578
- package/src/market/manifest.ts +0 -187
- package/src/market/prereq.ts +0 -145
- package/src/market/registry.ts +0 -363
- package/src/market/resolve.ts +0 -111
- package/src/market/types.ts +0 -236
- package/src/market/validate.ts +0 -227
- package/src/mcp/client.ts +0 -449
- package/src/mcp/config.ts +0 -252
- package/src/mcp/local-package.ts +0 -211
- package/src/mcp/market-catalog.ts +0 -84
- package/src/mcp/market-install.ts +0 -289
- package/src/mcp/market.ts +0 -362
- package/src/mcp/oauth.ts +0 -251
- package/src/mcp/prompts-resources.ts +0 -249
- package/src/mcp/shared.ts +0 -149
- package/src/mcp/status.ts +0 -67
- package/src/mcp/tools.ts +0 -275
- package/src/mcp/transport.ts +0 -122
- package/src/mcp/trust.ts +0 -25
- package/src/memory/blocks.ts +0 -278
- package/src/memory/recall.ts +0 -355
- package/src/memory/scope.ts +0 -182
- package/src/memory/store.ts +0 -105
- package/src/memory/tools.ts +0 -99
- package/src/plugins/cli.ts +0 -119
- package/src/plugins/discover.ts +0 -108
- package/src/plugins/index.ts +0 -50
- package/src/plugins/install.ts +0 -184
- package/src/plugins/load.ts +0 -124
- package/src/plugins/manifest.ts +0 -92
- package/src/plugins/state.ts +0 -83
- package/src/providers/auth.ts +0 -408
- package/src/providers/cache.ts +0 -223
- package/src/providers/catalog-local.ts +0 -160
- package/src/providers/catalog.ts +0 -421
- package/src/providers/middleware-context.ts +0 -86
- package/src/providers/middleware.ts +0 -373
- package/src/providers/model-list.ts +0 -23
- package/src/providers/oauth/common.ts +0 -105
- package/src/providers/oauth/device-code.ts +0 -107
- package/src/providers/oauth/github-copilot.ts +0 -146
- package/src/providers/oauth/loopback.ts +0 -158
- package/src/providers/oauth/openai.ts +0 -163
- package/src/providers/oauth/openrouter.ts +0 -89
- package/src/providers/oauth/pkce.ts +0 -45
- package/src/providers/oauth/registry.ts +0 -39
- package/src/providers/oauth/seam.ts +0 -89
- package/src/providers/profile-glm53.ts +0 -111
- package/src/providers/profile-sonnet5-persona.ts +0 -65
- package/src/providers/profile-sonnet5-voice.ts +0 -23
- package/src/providers/profiles.ts +0 -156
- package/src/providers/provider-config.ts +0 -311
- package/src/providers/registry.ts +0 -333
- package/src/providers/responses.ts +0 -209
- package/src/providers/retry.ts +0 -234
- package/src/providers/router.ts +0 -294
- package/src/providers/sse.ts +0 -26
- package/src/providers/stream-errors.ts +0 -117
- package/src/providers/stream.ts +0 -566
- package/src/providers/thinking.ts +0 -189
- package/src/providers/wire-messages.ts +0 -129
- package/src/providers/wire-responses.ts +0 -79
- package/src/providers/wire-select.ts +0 -53
- package/src/server/http.ts +0 -291
- package/src/server/openapi.ts +0 -246
- package/src/sextant/card-hits.ts +0 -102
- package/src/sextant/card-keys.ts +0 -55
- package/src/sextant/context-source.ts +0 -157
- package/src/sextant/crew-cards.ts +0 -350
- package/src/sextant/draw-agents.ts +0 -273
- package/src/sextant/draw-code.ts +0 -388
- package/src/sextant/draw-context.ts +0 -222
- package/src/sextant/draw-frame.ts +0 -164
- package/src/sextant/draw-market.ts +0 -573
- package/src/sextant/draw-messages.ts +0 -386
- package/src/sextant/draw-pet.ts +0 -230
- package/src/sextant/draw-plan.ts +0 -187
- package/src/sextant/draw-tabs.ts +0 -85
- package/src/sextant/draw-util.ts +0 -65
- package/src/sextant/draw-wizard.ts +0 -378
- package/src/sextant/engine.ts +0 -230
- package/src/sextant/frame-hits.ts +0 -25
- package/src/sextant/frame.ts +0 -101
- package/src/sextant/git-status.ts +0 -197
- package/src/sextant/grid.ts +0 -59
- package/src/sextant/input.ts +0 -119
- package/src/sextant/keys.ts +0 -521
- package/src/sextant/layout.ts +0 -86
- package/src/sextant/local-commands.ts +0 -169
- package/src/sextant/market-source.ts +0 -287
- package/src/sextant/mentions.ts +0 -200
- package/src/sextant/message-hits.ts +0 -26
- package/src/sextant/model.ts +0 -387
- package/src/sextant/overlays.ts +0 -456
- package/src/sextant/panel-hits.ts +0 -38
- package/src/sextant/pet.ts +0 -399
- package/src/sextant/screen.ts +0 -324
- package/src/sextant/scroll-hits.ts +0 -66
- package/src/sextant/scrollbar.ts +0 -82
- package/src/sextant/sextant-bridge.ts +0 -174
- package/src/sextant/sextant-cards.ts +0 -142
- package/src/sextant/sextant-diff-base.ts +0 -63
- package/src/sextant/sextant-files.ts +0 -154
- package/src/sextant/sextant-frame-loop.ts +0 -335
- package/src/sextant/sextant-renderer.ts +0 -574
- package/src/sextant/sextant-repo.ts +0 -140
- package/src/sextant/theme.ts +0 -66
- package/src/sextant/tool-rows.ts +0 -189
- package/src/sextant/types.ts +0 -493
- package/src/skills/index.ts +0 -387
- package/src/skills/pack.ts +0 -220
- package/src/skills/spec.ts +0 -162
- package/src/skills/tools.ts +0 -69
- package/src/skills/versioned.ts +0 -227
- package/src/telemetry/otel-export.ts +0 -122
- package/src/telemetry/otel-lanes.ts +0 -89
- package/src/telemetry/otel-logs.ts +0 -131
- package/src/telemetry/otel-metrics.ts +0 -136
- package/src/telemetry/otel.ts +0 -397
- package/src/telemetry/otlp.ts +0 -76
- package/src/tools/ask-user.ts +0 -156
- package/src/tools/bash-bg.ts +0 -94
- package/src/tools/bash-jobs.ts +0 -237
- package/src/tools/design.ts +0 -151
- package/src/tools/evalcell.ts +0 -338
- package/src/tools/html-text.ts +0 -139
- package/src/tools/provider.ts +0 -149
- package/src/tools/task.ts +0 -250
- package/src/tools/todo.ts +0 -320
- package/src/tools/webfetch.ts +0 -332
- package/src/tools/websearch.ts +0 -359
- package/src/tui/agents-cmd.ts +0 -41
- package/src/tui/app.ts +0 -749
- package/src/tui/attach.ts +0 -127
- package/src/tui/boot-notes.ts +0 -41
- package/src/tui/builtin-prompts.ts +0 -59
- package/src/tui/checkpoints-cmd.ts +0 -70
- package/src/tui/clipboard-image.ts +0 -81
- package/src/tui/clipboard.ts +0 -78
- package/src/tui/commands.ts +0 -283
- package/src/tui/config-view.ts +0 -53
- package/src/tui/context-cmds.ts +0 -282
- package/src/tui/cost.ts +0 -108
- package/src/tui/crash-guard.ts +0 -173
- package/src/tui/focus-terminal.ts +0 -34
- package/src/tui/git-cmds.ts +0 -273
- package/src/tui/git-plain.ts +0 -58
- package/src/tui/info-cmd.ts +0 -150
- package/src/tui/input-plain.ts +0 -76
- package/src/tui/mcp-cmd.ts +0 -128
- package/src/tui/memory-note.ts +0 -77
- package/src/tui/modes-cmd.ts +0 -45
- package/src/tui/notify-seq.ts +0 -100
- package/src/tui/notify.ts +0 -318
- package/src/tui/overlays.ts +0 -97
- package/src/tui/pi-renderer.ts +0 -428
- package/src/tui/providers-cmd.ts +0 -377
- package/src/tui/reasoning-view.ts +0 -56
- package/src/tui/renderer.ts +0 -128
- package/src/tui/replay-marker.ts +0 -29
- package/src/tui/session-cmd.ts +0 -148
- package/src/tui/session-manage.ts +0 -95
- package/src/tui/sextant-attach.ts +0 -102
- package/src/tui/sextant-io.ts +0 -202
- package/src/tui/sextant-smoke.ts +0 -110
- package/src/tui/shell-cmd.ts +0 -158
- package/src/tui/smoke.ts +0 -72
- package/src/tui/staged-terminal.ts +0 -50
- package/src/tui/startup.ts +0 -12
- package/src/tui/theme.ts +0 -59
- package/src/tui/todo-label.ts +0 -7
- package/src/tui/trust-card.ts +0 -107
- package/src/tui/tui-commands.ts +0 -87
- package/tsconfig.json +0 -30
- package/vendor/pi-tui/LICENSE +0 -21
- package/vendor/pi-tui/PATCHES.md +0 -12
- package/vendor/pi-tui/PROVENANCE.md +0 -12
- package/vendor/pi-tui/README.upstream.md +0 -854
- package/vendor/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/vendor/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/vendor/pi-tui/src/alt-screen-search.ts +0 -158
- package/vendor/pi-tui/src/autocomplete.ts +0 -827
- package/vendor/pi-tui/src/components/alt-screen-flash.ts +0 -52
- package/vendor/pi-tui/src/components/box.ts +0 -138
- package/vendor/pi-tui/src/components/cancellable-loader.ts +0 -41
- package/vendor/pi-tui/src/components/editor.ts +0 -2364
- package/vendor/pi-tui/src/components/h-stack.ts +0 -45
- package/vendor/pi-tui/src/components/image.ts +0 -128
- package/vendor/pi-tui/src/components/input.ts +0 -448
- package/vendor/pi-tui/src/components/loader.ts +0 -93
- package/vendor/pi-tui/src/components/markdown.ts +0 -1016
- package/vendor/pi-tui/src/components/scroll-view.ts +0 -217
- package/vendor/pi-tui/src/components/select-list.ts +0 -230
- package/vendor/pi-tui/src/components/settings-list.ts +0 -277
- package/vendor/pi-tui/src/components/spacer.ts +0 -29
- package/vendor/pi-tui/src/components/stack.ts +0 -155
- package/vendor/pi-tui/src/components/text.ts +0 -108
- package/vendor/pi-tui/src/components/truncated-text.ts +0 -66
- package/vendor/pi-tui/src/components/v-stack.ts +0 -34
- package/vendor/pi-tui/src/editor-component.ts +0 -75
- package/vendor/pi-tui/src/fuzzy.ts +0 -138
- package/vendor/pi-tui/src/index.ts +0 -149
- package/vendor/pi-tui/src/keybindings.ts +0 -321
- package/vendor/pi-tui/src/keys.ts +0 -1402
- package/vendor/pi-tui/src/kill-ring.ts +0 -47
- package/vendor/pi-tui/src/latex.ts +0 -1381
- package/vendor/pi-tui/src/layout-node.ts +0 -52
- package/vendor/pi-tui/src/layout.ts +0 -411
- package/vendor/pi-tui/src/native-modifiers.ts +0 -60
- package/vendor/pi-tui/src/native-module-path.ts +0 -32
- package/vendor/pi-tui/src/stdin-buffer.ts +0 -445
- package/vendor/pi-tui/src/terminal-colors.ts +0 -74
- package/vendor/pi-tui/src/terminal-image.ts +0 -701
- package/vendor/pi-tui/src/terminal.ts +0 -554
- package/vendor/pi-tui/src/tui-alt-screen.ts +0 -1379
- package/vendor/pi-tui/src/tui-main-screen.ts +0 -655
- package/vendor/pi-tui/src/tui.ts +0 -1264
- package/vendor/pi-tui/src/undo-stack.ts +0 -29
- package/vendor/pi-tui/src/utils.ts +0 -1327
- package/vendor/pi-tui/src/word-navigation.ts +0 -118
- package/vendor/pi-tui/test/test-themes.ts +0 -39
- package/vendor/pi-tui/test/virtual-terminal.ts +0 -219
- /package/{src/providers → dist/cli}/models-index.json +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as e,L as a,M as r,O as o,P as Vj,Q as n,R as f,T as R,U as L,V as b,_ as s,aa as t,da as P,ja as Yj}from"./main-hrrvcfan.js";import{Sa as q,Ua as Xj}from"./main-rsy72qmw.js";import{Sc as p,Tc as i}from"./main-nvc3yjay.js";import"./main-bxtvnf6d.js";import"./main-4p4e2w7x.js";import"./main-hqbz10aw.js";import"./main-n6qrdbmy.js";import"./main-evgz4mp5.js";import"./main-f33fc5je.js";import"./main-2zgsknth.js";import"./main-kwwsz6rq.js";import"./main-23q7cmww.js";import"./main-45rn3trk.js";import"./main-yrjt2sqt.js";import"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import{De as g}from"./main-9a9rnh47.js";import"./main-mg9b20ac.js";import"./main-p0cfn6nr.js";import"./main-xfekqh9m.js";import"./main-s4bb0jav.js";import"./main-wqt32p5x.js";import"./main-rvetps99.js";import{pg as u,sg as d,tg as Qj}from"./main-x9ct6y1a.js";import"./main-mg4f96e1.js";import"./main-wgph00xf.js";import"./main-7jd5vh3x.js";import{kh as l,lh as Wj}from"./main-4y0tnfpa.js";import"./main-xt9zc3n6.js";import"./main-ntqef02r.js";import"./main-mgb9ccnx.js";import"./main-kba6zeyd.js";import"./main-2wyax8k9.js";import"./main-01pv9206.js";import"./main-s9v8k74e.js";import"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import{Tj as S,Wj as Fj}from"./main-ywbxshqc.js";import"./main-gbbty4d4.js";import{Jk as c,Qk as Hj}from"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import{Al as x,Dl as Gj}from"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-wk2csfnj.js";import"./main-y5c82rxr.js";import"./main-ys6zj3yr.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";Hj();import Dj from"readline";Fj();Qj();Gj();Vj();function Kj(X,j){let z=(Y)=>Y.replace(/\n/g," \u23CE ");return{start(Y){},stop(){},setCommands(){},addUser(Y){j(Y)},addSystemNote(Y,K="info"){j(` ${K==="info"?"":`${K}: `}${Y}`)},beginAssistant(){return{append(){},done(){}}},toolStart(Y,K,J){j(`
|
|
3
|
+
\u2192 ${K} ${J}`)},toolUpdate(){},toolEnd(Y,K,J){j(` \u2190 ${K?"ok":"FAIL"} ${z(J)}`)},async askApproval(Y,K,J){if(j(`
|
|
4
|
+
approval needed: ${Y} ${K}`),J)for(let G of J.split(`
|
|
5
|
+
`))j(` ${G}`);let V=await X(" allow? [y]es / [n]o: ");return V==="y"||V==="yes"?"once":"deny"},async askQuestion(){return null},async pickOne(){return null},clearTranscript(){},prefillEditor(Y){j(` resubmit with: ${z(Y)}`)},setBusy(Y,K){},setStatus(Y){}}}async function k(X,j){let Y={renderer:Kj(X.ask,X.out??console.log),rt:X.rt,store:()=>X.rt.store,approve:()=>X.approve,yolo:()=>X.yolo,busy:X.busy??(()=>!1),setBusy(){},bindAbort:X.bindAbort??(()=>{})},K=j.trim();if(K==="/undo")await b(Y);else if(K==="/commit"||K.startsWith("/commit "))await L(Y,K.slice(7))}Wj();R();Xj();Yj();R();import{existsSync as Zj}from"fs";import{resolve as $j}from"path";var Bj=" allow? [y]es / [a]lways / [n]o: ",_=String.fromCharCode(10);async function E(X,j,z,Y,K=console.log){if(K(`${_} approval needed: ${j} ${z}`),Y)for(let V of Y.split(_))K(` ${V}`);let J=await X(Bj);return J==="a"?"always":J==="n"||J===""?"deny":"once"}function v(X,j){return{start(){},stop(){},setCommands(){},addUser(){},addSystemNote(z,Y="info"){j(` ${Y==="info"?"":`${Y}: `}${z}`)},beginAssistant(){return{append(){},done(){}}},toolStart(z,Y,K){j(`${_} \u2192 ${Y} ${K}`)},toolUpdate(){},toolEnd(z,Y,K){j(` \u2190 ${Y?"ok":"FAIL"} ${K.split(_).join(" \u23CE ")}`)},askApproval:(z,Y,K)=>E(X,z,Y,K,j),async askQuestion(){return null},async pickOne(){return null},clearTranscript(){},prefillEditor(){},setBusy(){},setStatus(){}}}async function h(X,j){let z=X.out??console.log,Y={renderer:v(X.ask,z),rt:X.rt,store:()=>X.rt.store,level:()=>X.yolo()?"auto":"ask",approve:()=>X.yolo()?void 0:(K)=>E(X.ask,K.tool,JSON.stringify(K.revisedArgs).slice(0,140),void 0,z),busy:()=>X.busy(),setBusy(){},bindAbort:(K)=>X.bindAbort(K)};await f(Y,j)}function m(X,j){let z=v(X.ask,X.out??console.log),Y={renderer:z,cwd:X.rt.cwd,store:()=>X.rt.store,modelRef:()=>X.modelRef()},K=q(j,{cwd:X.rt.cwd,roots:X.rt.roots.dirs,resolve:(J)=>Zj($j(X.rt.cwd,J))?J:null,attachImage:(J)=>P(Y,J)});for(let J of K.notes)z.addSystemNote(J,J.includes(": attached as an image (")?"info":"warn");if(K.attached.length>0)z.addSystemNote(`attached: ${K.attached.map((J)=>`${J.path} (${J.shown} lines${J.capped?", capped":""})`).join(" \xB7 ")}`);return K.text}function I(X,j,z){if(z?.aborted)return Promise.resolve("");return new Promise((Y)=>{let K=()=>{Y("")};z?.addEventListener("abort",K,{once:!0}),X.question(j,{signal:z},(J)=>{z?.removeEventListener("abort",K),Y(J.trim().toLowerCase())})})}function Uj(X,j=console.log){return(z,Y)=>new Promise((K)=>{let J=z.options??[],V=z.allowFreeText!==!1;j(`
|
|
6
|
+
question: ${z.question}`),J.forEach((D,H)=>j(` ${H+1}) ${D}`));let G=[J.length>0?`1-${J.length}`:"",V?"text":""].filter(Boolean).join(" or "),Q=()=>{K(null)};Y.addEventListener("abort",Q,{once:!0}),X.question(` answer [${G}; empty = decline]: `,{signal:Y},(D)=>{Y.removeEventListener("abort",Q);let H=D.trim(),W=Number(H);if(H==="")K(null);else if(Number.isInteger(W)&&W>=1&&W<=J.length)K({choice:W-1,label:J[W-1]});else if(V)K({text:H});else j(" (not one of the options \u2014 declined)"),K(null)})})}async function mj(X={}){let j=await i(X.addDirs!==void 0&&X.addDirs.length>0?{addDirs:X.addDirs}:{}).catch((F)=>{if(F instanceof u||F instanceof x)console.error(`error: ${F.message}`),process.exit(2);throw F}),z={yolo:X.yolo??process.env.ROVECODE_YOLO==="1",provider:"mock",model:X.model??process.env.ROVECODE_MODEL??"",turns:0,tokensIn:0,tokensOut:0},Y=j.stream??void 0,K=()=>{let F=j.providers.defaultRef();if(F!==null)z.provider=F.provider,z.model=z.model||F.model||"gpt-4o-mini"};if(K(),z.provider==="mock")console.log(p);j.hooks.onWarning((F)=>console.error(`hooks: ${F}`)),console.log(`\u25C6 rovecode here \u2014 plain chat with ${z.provider}/${z.model}`),console.log(`session ${j.sessionId.slice(0,8)} in ${j.cwd}`),console.log(S(z.yolo)),console.log("commands: /exit /new /yolo /model <provider/model> /status /skills /memory [--user] [text] /compact [focus] /copy [n] /init \xB7 #<text> remembers a line"),console.log("input: !cmd runs through the bash tool (same policy + approval, no model turn) \xB7 @path attaches files with read/edit anchors; images ride on the next message");let J=Dj.createInterface({input:process.stdin,output:process.stdout,prompt:"rovecode> "});j.setAskUser(Uj(J));let V=(F)=>E(($)=>I(J,$,G?.ac.signal),F.tool,JSON.stringify(F.revisedArgs).slice(0,140));J.prompt();let G=null,Q=null,D=!1,H=null,W=null,U=null,M=null,O=null,w=()=>Boolean(G||Q||H||W||U||M),T=()=>{if(w())return console.log("finish or interrupt the run first (Ctrl+C)"),!0;return!1},y={rt:j,yolo:()=>z.yolo,busy:w,bindAbort:(F)=>{H=F},ask:(F)=>I(J,F,H?.signal),modelRef:()=>({provider:z.provider,model:z.model})};J.on("SIGINT",()=>{if(Q){Q.abort(),console.log(`
|
|
7
|
+
[interrupted]`);return}if(G)G.ac.abort(),G.gen.return(void 0),console.log(`
|
|
8
|
+
[interrupted]`);else if(H||U)(H??U).abort(),console.log(`${String.fromCharCode(10)} [interrupted]`);else J.close()}),J.on("line",async(F)=>{let $=F.trim();if(!$){J.prompt();return}if(n($)!==null){if(!T()){W=h(y,$);try{await W}catch(Z){console.log(`error: ${Z instanceof Error?Z.message:String(Z)}`)}finally{W=null}}if(!D)J.prompt();return}if($==="/exit"||$==="/quit"){J.close();return}if(($==="/new"||$==="/compact"||$.startsWith("/compact ")||$==="/commit"||$.startsWith("/commit ")||$==="/undo")&&T()){J.prompt();return}if($==="/yolo"){z.yolo=!z.yolo,console.log(S(z.yolo)),J.prompt();return}if($==="/status"){console.log(`provider=${z.provider} model=${z.model} turns=${z.turns} tokens=${z.tokensIn}in/${z.tokensOut}out
|
|
9
|
+
sandbox: ${d(j.sandbox)}`),J.prompt();return}if($==="/skills"){for(let Z of j.skillStore.list())console.log(` ${Z.name.padEnd(20)} ${Z.description}`);J.prompt();return}if($==="/memory"||$.startsWith("/memory ")){console.log(o(j.blockStore,$.slice(7)).text),J.prompt();return}{let Z=a($);if(Z!==null){console.log(r(j.blockStore,"memory",Z).text),J.prompt();return}}if($.startsWith("/model ")){let Z=j.providers.resolveSelector($.slice(7),z.provider);if("error"in Z)console.log(Z.error);else z.provider=Z.provider,z.model=Z.model,console.log(`model \u2192 ${Z.provider}/${Z.model}`);J.prompt();return}if($==="/new"){j.store.branch(j.store.messages()[0]?.id??""),console.log("branched to session start"),J.prompt();return}if($==="/undo"||$==="/commit"||$.startsWith("/commit ")){U=new AbortController,M=k({rt:j,yolo:z.yolo,approve:z.yolo?void 0:V,ask:(Z)=>I(J,Z,U?.signal),busy:()=>Boolean(G||Q||H||W),bindAbort:(Z)=>{U=Z},out:(Z)=>console.log(Z)},$);try{await M}catch(Z){console.log(`error: ${Z instanceof Error?Z.message:String(Z)}`)}finally{M=null,U=null}if(!D)J.prompt();return}if($==="/compact"||$.startsWith("/compact ")){if(G||Q){console.log("finish or interrupt the run first (Ctrl+C)"),J.prompt();return}let Z=$.slice(8).trim();Q=new AbortController,O=s(j.store,j.buildCfg(z.yolo,V),{model:{provider:z.provider,model:z.model},signal:Q.signal}).then((B)=>{for(let Jj of e(B,Z))console.log(Jj)});try{await O}catch(B){console.log(`compaction failed: ${B instanceof Error?B.message:String(B)} \u2014 the session is unchanged`)}finally{Q=null,O=null}if(!D)J.prompt();return}if($==="/copy"||$.startsWith("/copy ")){let Z=$.slice(5).trim(),B=Z===""?1:/^[1-9]\d*$/.test(Z)?Number(Z):NaN;console.log(Number.isNaN(B)?"usage: /copy [n] \u2014 copies the last assistant message; n counts back from the latest":(await t(j.store.messages(),B)).text),J.prompt();return}if(T()){J.prompt();return}let A=j.noProviderReason();if(!Y||A!==null){console.log(A??"no provider stream"),J.prompt();return}if(z.provider==="mock")K();let jj=m(y,l($,j.cwd)??$),zj=j.buildDef({provider:z.provider,model:z.model}),C=new AbortController;j.tasks.bindRun(C.signal);let N=c(zj,jj,{},j.buildCfg(z.yolo,V),{stream:Y,registry:j.registry,store:j.store,tools:j.registry.list().map((Z)=>Z.schema),guard:j.guard,planReminder:j.planReminder,cwd:j.cwd,signal:C.signal,hooks:j.hooks},j.steering);G={ac:C,gen:N};try{let Z="";for await(let B of N){if(B.type==="turn_start")g(),z.turns++;if(B.type==="message_update")process.stdout.write(B.delta),Z+=B.delta;if(B.type==="tool_execution_start")console.log(`
|
|
10
|
+
\u2192 ${B.tool} ${JSON.stringify(B.args).slice(0,120)}`);if(B.type==="tool_execution_end")console.log(` \u2190 ${B.ok?"ok":"FAIL"} ${B.output.slice(0,160).replace(/\n/g," \u23CE ")}`);if(B.type==="run_end"){if(!Z.trim())console.log(B.summary);else console.log();if(B.status!=="done")console.log(` [${B.status}]`)}}for(let B of j.drainRouterNotes())console.log(` [${B}]`);for(let B of j.store.messages())if(B.usage)z.tokensIn+=B.usage.input,z.tokensOut+=B.usage.output}catch(Z){console.log(`error: ${Z instanceof Error?Z.message:String(Z)}`)}finally{G=null}J.prompt()}),J.on("close",async()=>{if(D=!0,G)G.ac.abort(),await G.gen.return(void 0).catch(()=>{});H?.abort(),U?.abort(),Q?.abort(),await Promise.all([W,M,O].map((F)=>F?.catch(()=>{}))),j.tasks.cancelAll(),await j.tasks.drain(2000),j.bashJobs.dispose(),await j.hooks.close().catch(()=>{}),j.mcp?.close().catch(()=>{}),console.log(`
|
|
11
|
+
bye \u2014 session ${j.sessionId.slice(0,8)} saved (${z.turns} turns, ${z.tokensIn}in/${z.tokensOut}out tokens)`),process.exit(0)})}export{mj as runRepl,Uj as readlineAsker};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{f as J}from"./main-tkgarpjj.js";import"./main-rpg7h8mb.js";import"./main-evgz4mp5.js";import{kl as F,ml as K}from"./main-6dtqmbt6.js";import"./main-qsevpgsv.js";K();function L(k){let j=k.indexOf("--resume"),q=j!==-1?k[j+1]:void 0,y=q!==void 0&&!q.startsWith("-")?q:void 0;return{...y!==void 0?{id:y}:{},newest:y===void 0&&(j!==-1||k.includes("--continue"))}}var M="nothing to continue from \u2014 this is a new session";function P(k,j,q){let y=L(k);if(y.id!==void 0)return{id:J("--resume",j,y.id,q)};if(!y.newest)return{};let z=F(j);return z?{id:z.id}:{note:M}}function W(k,j,q){return P(k,j,q).id}export{W as resolveResume,P as resolveBoot,L as parseResume,M as NOTHING_TO_CONTINUE};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Qc as a,Rc as b,Sc as c,Tc as d}from"./main-nvc3yjay.js";import"./main-bxtvnf6d.js";import"./main-4p4e2w7x.js";import"./main-hqbz10aw.js";import"./main-n6qrdbmy.js";import"./main-evgz4mp5.js";import"./main-f33fc5je.js";import"./main-2zgsknth.js";import"./main-kwwsz6rq.js";import"./main-23q7cmww.js";import"./main-45rn3trk.js";import"./main-yrjt2sqt.js";import"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-9a9rnh47.js";import"./main-mg9b20ac.js";import"./main-p0cfn6nr.js";import"./main-xfekqh9m.js";import"./main-s4bb0jav.js";import"./main-wqt32p5x.js";import"./main-rvetps99.js";import"./main-x9ct6y1a.js";import"./main-mg4f96e1.js";import"./main-wgph00xf.js";import"./main-7jd5vh3x.js";import"./main-xt9zc3n6.js";import"./main-ntqef02r.js";import"./main-mgb9ccnx.js";import"./main-kba6zeyd.js";import"./main-2wyax8k9.js";import"./main-01pv9206.js";import"./main-s9v8k74e.js";import"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import"./main-ywbxshqc.js";import"./main-gbbty4d4.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-wk2csfnj.js";import"./main-y5c82rxr.js";import"./main-ys6zj3yr.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{b as createRuntime,d as bootRuntime,c as NO_PROVIDER_HINT,a as MAX_OUTPUT_CAP};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{mg as a,ng as b,og as c,pg as d,qg as e,rg as f,sg as g,tg as h}from"./main-x9ct6y1a.js";import"./main-kba6zeyd.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";h();export{f as unavailableRungError,e as loadSandboxConfig,g as describeSandbox,d as SandboxConfigError,c as SANDBOX_IMAGE_ENV,a as SANDBOX_FILE,b as SANDBOX_ENV};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tc as _}from"./main-nvc3yjay.js";import"./main-bxtvnf6d.js";import"./main-4p4e2w7x.js";import"./main-hqbz10aw.js";import"./main-n6qrdbmy.js";import"./main-evgz4mp5.js";import"./main-f33fc5je.js";import"./main-2zgsknth.js";import"./main-kwwsz6rq.js";import"./main-23q7cmww.js";import"./main-45rn3trk.js";import"./main-yrjt2sqt.js";import"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-9a9rnh47.js";import"./main-mg9b20ac.js";import"./main-p0cfn6nr.js";import"./main-xfekqh9m.js";import"./main-s4bb0jav.js";import"./main-wqt32p5x.js";import"./main-rvetps99.js";import{pg as T,tg as q}from"./main-x9ct6y1a.js";import"./main-mg4f96e1.js";import"./main-wgph00xf.js";import"./main-7jd5vh3x.js";import"./main-xt9zc3n6.js";import"./main-ntqef02r.js";import"./main-mgb9ccnx.js";import"./main-kba6zeyd.js";import"./main-2wyax8k9.js";import"./main-01pv9206.js";import"./main-s9v8k74e.js";import"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import{Nj as W,Wj as k}from"./main-ywbxshqc.js";import"./main-gbbty4d4.js";import{Jk as N,Qk as C}from"./main-qj2djy17.js";import{Vk as h,Wk as w,bl as E}from"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-wk2csfnj.js";import"./main-y5c82rxr.js";import"./main-ys6zj3yr.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";k();C();import{AgentSideConnection as R,RequestError as $,PROTOCOL_VERSION as u,ndJsonStream as b}from"@zed-industries/agent-client-protocol";import{basename as d}from"path";import{Readable as l,Writable as c}from"stream";E();q();function L(y){let j=[],G=[],U;for(let Q of y)if(Q.type==="text")j.push(Q.text);else if(Q.type==="resource_link")j.push(`[resource: ${Q.uri}]`);else if(Q.type==="resource"&&"text"in Q.resource)j.push(`<context uri="${Q.resource.uri}">
|
|
3
|
+
${Q.resource.text}
|
|
4
|
+
</context>`);else if(Q.type==="image"){let Y=Q.uri&&!Q.uri.startsWith("data:")?d(Q.uri):void 0,z=h(Q.data,Q.mimeType,Y!==void 0?{name:Y}:{});if("error"in z)U??=z.error;else G.push(z)}else j.push(`[unsupported ${Q.type} content omitted]`);U??=w(G.length);let X=j.join(`
|
|
5
|
+
`);return U===void 0?{goal:X,images:G}:{goal:X,images:G,error:U}}function jj(y){return L(y).goal}var m={read:"read",edit:"edit",write:"edit",bash:"execute",skill_view:"read",skills_list:"search",mcp_list:"search",mcp_call:"other",memory_edit:"other",web_fetch:"fetch"};function S(y){return m[y]??"other"}function f(y,j){if(j&&typeof j==="object"){let G=j,U=G.path??G.command??G.name??G.url;if(U!==void 0)return`${y}: ${String(U).slice(0,120)}`}return y}function A(y){if(y&&typeof y==="object"&&!Array.isArray(y))return y;return y===void 0?{}:{value:y}}function J(y){return[{type:"content",content:{type:"text",text:y}}]}function p(y){switch(y.type){case"message_update":return{sessionUpdate:"agent_message_chunk",content:{type:"text",text:y.delta}};case"tool_execution_start":return{sessionUpdate:"tool_call",toolCallId:y.callId,title:f(y.tool,y.args),kind:S(y.tool),status:"in_progress",rawInput:A(y.args)};case"tool_execution_update":return{sessionUpdate:"tool_call_update",toolCallId:y.callId,content:J(y.note)};case"tool_execution_end":return{sessionUpdate:"tool_call_update",toolCallId:y.callId,status:y.ok?"completed":"failed",content:J(y.output),rawOutput:{output:y.output}};case"tool_call_failed":return{sessionUpdate:"tool_call",toolCallId:y.callId,title:`tool call failed (${y.reason})`,kind:"other",status:"failed",content:J(y.detail)};default:return null}}class F{conn;opts;sessions=new Map;constructor(y,j={}){this.conn=y;this.opts=j}async initialize(y){return{protocolVersion:u,agentCapabilities:{loadSession:!1,promptCapabilities:{image:!0,audio:!1,embeddedContext:!0}},authMethods:[]}}async authenticate(y){return{}}async newSession(y){let j;try{j=await _({cwd:y.cwd,stream:this.opts.stream})}catch(U){if(U instanceof T)throw $.invalidParams({cwd:y.cwd,error:U.message});throw U}let G=j.noProviderReason();if(!j.stream||G!==null)throw $.authRequired({details:G??W("cli")});return this.sessions.set(j.sessionId,{rt:j,steering:j.steering,active:null,permSeq:0}),{sessionId:j.sessionId}}async prompt(y){let j=this.sessions.get(y.sessionId);if(!j)throw $.invalidParams({sessionId:y.sessionId,error:"unknown session"});if(j.active)throw $.invalidRequest({error:"a prompt is already running for this session"});let G=j.rt.stream,U=j.rt.noProviderReason();if(!G||U!==null)throw $.authRequired(U!==null?{details:U}:void 0);let{goal:X,images:Q,error:Y}=L(y.prompt);if(Y!==void 0)throw $.invalidParams({error:Y});let z={provider:j.rt.provider?.id??"mock",model:j.rt.defaultModel||"default"},O=j.rt.buildDef(z),x=j.rt.buildCfg(this.opts.yolo??!1,this.approvalFor(y.sessionId,j)),D=new AbortController;j.rt.tasks.bindRun(D.signal);let I={stream:G,registry:j.rt.registry,store:j.rt.store,tools:j.rt.registry.list().map((Z)=>Z.schema),guard:j.rt.guard,hooks:j.rt.hooks,cwd:j.rt.cwd,signal:D.signal};if(Q.length>0)j.rt.store.stageAttachments(Q);let K=N(O,X,{},x,I,j.steering),M=()=>{},P=new Promise((Z)=>{M=()=>Z(null)}),H={gen:K,cancelled:!1,abort:D,onCancel:P,fireCancel:M};j.active=H;let B=null;try{for await(let Z of K){if(H.cancelled)break;if(Z.type==="run_end"){B={status:Z.status,summary:Z.summary};break}let V=p(Z);if(V)await this.conn.sessionUpdate({sessionId:y.sessionId,update:V})}}finally{j.active=null}if(H.cancelled||B===null)return{stopReason:"cancelled"};switch(B.status){case"done":return{stopReason:"end_turn"};case"budget":return{stopReason:"max_turn_requests"};case"stopped":return{stopReason:"cancelled"};case"error":throw $.internalError({details:B.summary})}}async cancel(y){let j=this.sessions.get(y.sessionId)?.active;if(!j)return;j.cancelled=!0,j.abort.abort(),j.fireCancel(),await j.gen.return(void 0).then(()=>{return},()=>{return})}async shutdown(){let y=[];for(let j of this.sessions.values())if(j.rt.tasks.cancelAll(),j.rt.bashJobs.dispose(),y.push(j.rt.hooks.close()),j.rt.mcp)y.push(j.rt.mcp.close().catch(()=>{}));await Promise.all(y)}approvalFor(y,j){return async(G)=>{let U=`perm-${++j.permSeq}`,X;try{let Q=this.conn.requestPermission({sessionId:y,toolCall:{toolCallId:U,title:f(G.tool,G.revisedArgs),kind:S(G.tool),status:"pending",rawInput:A(G.revisedArgs)},options:[{optionId:"allow-once",name:"Allow once",kind:"allow_once"},{optionId:"allow-always",name:"Allow always",kind:"allow_always"},{optionId:"reject-once",name:"Deny",kind:"reject_once"}]});Q.then(()=>{return},()=>{return});let Y=j.active?await Promise.race([Q,j.active.onCancel]):await Q;if(Y===null)return"deny";X=Y.outcome}catch{return"deny"}if(X.outcome!=="selected")return"deny";if(X.optionId==="allow-once")return"once";if(X.optionId==="allow-always")return"always";return"deny"}}}function g(y,j={}){let G;return{conn:new R((X)=>G=new F(X,j),y),agent:G}}function yj(y={}){let j=b(c.toWeb(process.stdout),l.toWeb(process.stdin)),{agent:G}=g(j,y);return new Promise((U)=>{let X=()=>{G.shutdown().then(()=>U(),()=>U())};process.stdin.once("end",X),process.stdin.once("close",X)})}export{p as updateForEvent,f as titleFor,g as serveAcp,yj as runAcpStdio,jj as promptText,L as promptParts,S as kindFor,F as RovecodeAcpAgent};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{lb as F,ob as U,pb as V,qb as W,rb as Y,sb as _,tb as k}from"./main-rpg7h8mb.js";import"./main-evgz4mp5.js";import{el as I,il as O,ml as P}from"./main-6dtqmbt6.js";import"./main-qsevpgsv.js";P();k();function y(z){let K=F(z),Q=O(K);return{rows:Q.sessions.map((M)=>({id:M.id,created:new Date(M.createdAt).toISOString(),updated:new Date(M.updatedAt).toISOString(),cwd:z,firstPrompt:M.preview,turns:M.turns,entries:M.entryCount,...M.title!==void 0?{title:M.title}:{}})),hollow:Q.hollow.length,root:K}}function S(z){return y(z).rows}function R(z,K){if(z===0)return;return`${z} empty session director${z===1?"y":"ies"} in ${K} \u2014 nothing was ever written to them`}function T(z,K){let{rows:Q,hollow:$,root:M}=z;if(K)return JSON.stringify(Q);let X=R($,M);if(Q.length===0)return[`no sessions in ${M} \u2014 a \`rovecode run\` or a TUI turn starts one`,...X?[X]:[]].join(`
|
|
3
|
+
`);let B=[`sessions in ${M} (newest first; --json for the full rows):`,`${"id".padEnd(36)} ${"created".padEnd(24)} turns first prompt`];for(let x of Q)B.push(`${x.id.padEnd(36)} ${x.created.padEnd(24)} ${String(x.turns).padStart(5)} ${x.title??(x.firstPrompt||"(empty session)")}`);if(X)B.push(X);return B.join(`
|
|
4
|
+
`)}function L(z){let K=z.entryId===""?"title":z.entryId.slice(0,8);return`${z.sessionId.slice(0,8)} ${new Date(z.timestamp).toISOString()} ${K.padEnd(8)} ${z.title!==void 0?`[${z.title}] `:""}${z.preview}`}var j="usage: rovecode sessions [--json] | rename <id|prefix> <title\u2026> | delete <id|prefix> [--yes] | fork <id|prefix> [--json] | search <terms\u2026> [--json]",q=new Set(["rename","delete","fork","search"]),h=(z)=>z.length>1&&z.startsWith("-");function p(z){let K=z.indexOf("sessions");return K===-1?[]:z.slice(K+1).filter((Q)=>!h(Q))}function v(z,K,Q={}){let $=Q.out??((J)=>console.log(J)),M=Q.err??((J)=>process.stderr.write(`${J}
|
|
5
|
+
`)),X=(J)=>{return M(`error: ${J} \u2014 ${j}`),2},B=z.includes("--json"),x=p(z),C=x[0];if(C===void 0)return $(T(y(K),B)),0;if(!q.has(C))return X(`unknown sessions verb "${C}"`);let D=F(K);if(C==="search"){let J=x.slice(1).join(" ").trim();if(J==="")return X("search needs at least one term");let A=_(D,J,10);if(B)$(JSON.stringify(A));else $(A.length===0?`no matches for "${J}" in ${D}`:A.map(L).join(`
|
|
6
|
+
`));return 0}let G=x[1];if(G===void 0)return X(`${C} needs a session id or prefix`);let Z=U(D,G);if(!Z.ok)return X(Z.error);if(C==="rename"){let J=I(x.slice(2).join(" "));if(J===void 0)return X("rename needs a non-empty title");return V(D,Z.id,J),$(`renamed ${Z.id} \u2192 "${J}"`),0}if(C==="fork"){let J;try{J=W(D,Z.summary)}catch(A){return X(A instanceof Error?A.message:String(A))}return $(B?JSON.stringify(J):`${J.id} fork of ${J.from.slice(0,8)} \xB7 "${J.title}"`),0}if(!z.includes("--yes")){if(!(Q.tty??process.stdin.isTTY===!0))return X(`delete ${Z.id.slice(0,8)} needs --yes when stdin is not a terminal`);let A=Z.summary.title??(Z.summary.preview||"(empty session)");if(!(Q.confirm??((N)=>confirm(N)))(`delete session ${Z.id} (${A}, ${Z.summary.entryCount} entries) and its checkpoints?`))return $("delete cancelled \u2014 nothing removed"),0}let{removed:H}=Y(K,D,Z.id);return $(H.length===0?`nothing to remove for ${Z.id}`:H.map((J)=>`removed ${J}`).join(`
|
|
7
|
+
`)),0}export{p as sessionWords,S as sessionRows,y as sessionListing,R as hollowLine,T as formatSessions,L as formatSearchHit,v as cmdSessions,j as SESSIONS_USAGE};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Il as a,Jl as b,Kl as c,Ll as d,Ml as e,Nl as f,Ol as g,Pl as h,Ql as i,Rl as j,Sl as k}from"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";k();export{f as settingsTrustNotes,b as settingsPath,g as saveSetting,h as resolvePermission,i as resolveEffort,c as readSettingsFile,d as loadSettingsScoped,e as loadSettings,j as autoUpdateEnabled,a as COMMAND_KEYS};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{a as v,b as y,c as C}from"./main-z13755t8.js";import{h as k}from"./main-j7ttv0sd.js";import"./main-vxnwe5xx.js";import"./main-8c1tbazx.js";import"./main-edxc3yzt.js";import"./main-na7wse0x.js";import"./main-hrrvcfan.js";import"./main-rsy72qmw.js";import"./main-rpg7h8mb.js";import"./main-zc7pyrbj.js";import"./main-45ejth3a.js";import"./main-jak598k9.js";import"./main-7kt6r53y.js";import"./main-9ht36z12.js";import"./main-nvc3yjay.js";import"./main-bxtvnf6d.js";import"./main-4p4e2w7x.js";import"./main-hqbz10aw.js";import"./main-n6qrdbmy.js";import"./main-evgz4mp5.js";import"./main-f33fc5je.js";import"./main-2zgsknth.js";import"./main-kwwsz6rq.js";import"./main-23q7cmww.js";import"./main-45rn3trk.js";import"./main-yrjt2sqt.js";import"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-9a9rnh47.js";import"./main-mg9b20ac.js";import"./main-p0cfn6nr.js";import"./main-xfekqh9m.js";import"./main-s4bb0jav.js";import"./main-wqt32p5x.js";import{$f as P,ag as g,lg as u}from"./main-rvetps99.js";import"./main-x9ct6y1a.js";import"./main-mg4f96e1.js";import"./main-wgph00xf.js";import"./main-7jd5vh3x.js";import"./main-fvnpq46y.js";import"./main-4y0tnfpa.js";import"./main-xt9zc3n6.js";import"./main-ntqef02r.js";import"./main-mgb9ccnx.js";import"./main-wm997zjx.js";import"./main-kba6zeyd.js";import{vi as q,wi as N,xi as H}from"./main-2wyax8k9.js";import"./main-01pv9206.js";import"./main-s9v8k74e.js";import"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import"./main-ywbxshqc.js";import"./main-gbbty4d4.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-wk2csfnj.js";import"./main-y5c82rxr.js";import"./main-ys6zj3yr.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";u();import{mkdtempSync as F,rmSync as T}from"fs";import{tmpdir as x}from"os";import{join as j}from"path";y();var $=(J)=>new Promise((X)=>setTimeout(X,J)),B=[/needs your permission\s+write\b/,/needs your permission\s+edit\b/],A=["\x1B[?1049l","\x1B[?25h","\x1B[?1006l","\x1B[?2004l"];async function w(J={}){let X=F(j(x(),"rovecode-sextant-smoke-")),U=new C(J.cols??160,J.rows??44,{COLORTERM:"truecolor"}),Q=new v({io:U,cwd:X,pet:"rovecode"}),I=j(X,"smoke.txt"),S=`smoke-ok
|
|
3
|
+
`,D=q({turns:[H([{id:"t1",tool:"write",args:{path:I,content:`smoke-ok
|
|
4
|
+
`}}]),H([{id:"t2",tool:"edit",args:{path:I,edits:[{tag:g(`smoke-ok
|
|
5
|
+
`),anchorLine:1,anchorHash:P("smoke-ok"),newLines:["smoke-edited"]}]}}]),N("Smoke OK \u2014 the sextant surface rendered a write, an anchored edit and this summary.")]}),K=[],L=k({renderer:Q,stream:D,cwd:X,permission:"ask",exitOnClose:!1,model:"scripted"});U.feed("hello rovecode\r");let b=Date.now()+(J.deadlineMs??15000),Y=[],G="",Z=!1;while(Date.now()<b){if(Q.tick(),G=Q.frameText(),Y.length===B.length&&G.includes("Smoke OK")&&!G.includes("needs your permission")){Z=!0;break}let z=B[Y.length];if(z!==void 0&&z.test(G)&&G.includes("allow"))Y.push(G),U.feed("\r");await $(25)}let M=["\u2500 files \u2500","\u2500 code \u2500","\u2500 messages \u2500","\u2500 plan \u2500","\u2500 usage \u2500","\u2500 rovecode \u2500"],O=(z)=>G.includes(z)||z==="\u2500 code \u2500"&&G.includes("\u2500 diff \u2500"),E=Date.now()+2000;while(Z&&Date.now()<E&&!M.every(O))await $(25),Q.tick(),G=Q.frameText();if(!Z)K.push(`final frame not reached (approval cards seen ${Y.length}/${B.length})`);if(!/~ edit\s+smoke\.txt/.test(G))K.push("no `~ edit smoke.txt` tool row in the messages panel");if(!/\+ write\s+smoke\.txt/.test(G))K.push("no `+ write smoke.txt` tool row in the messages panel");for(let z of M)if(!O(z))K.push(`panel ${z.trim()} missing at ${U.cols}\xD7${U.rows}`);let R=Q.active;U.feed("\x03"),await L;let V=U.output().slice(-400);for(let z of A)if(!V.includes(z))K.push(`the output tail lacks ${JSON.stringify(z)} \u2014 terminal not restored`);if(!R)K.push("the frame interval was not running before quit");if(Q.active)K.push("the frame interval survived quit");await Q.drain().catch(()=>{});for(let z=0;;z++)try{T(X,{recursive:!0,force:!0});break}catch(W){let _=W.code;if(_!=="EBUSY"&&_!=="EPERM"&&_!=="ENOTEMPTY"||z>=20)throw W;await $(25)}return{ok:K.length===0,reasons:K,cardFrame:Y[1]??Y[0]??"(no approval card rendered)",frame:G,tail:V}}async function n(){let J=await w();console.log("\u2500\u2500 sextant: approval card for the anchored edit (160x44) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log(J.cardFrame),console.log("\u2500\u2500 sextant: final frame (160x44) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log(J.frame),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log(J.ok?"smoke-tui --sextant: PASS (files \xB7 code \xB7 messages \xB7 plan \xB7 usage \xB7 rovecode + two approval cards through the full pipeline; terminal restored on quit)":`smoke-tui --sextant: FAIL \u2014 ${J.reasons.join("; ")}`),process.exit(J.ok?0:1)}export{w as sextantSmoke,n as runSextantSmoke};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ne as c,Pe as n,Qe as v,Re as d}from"./main-mg9b20ac.js";import{mh as S,nh as k,oh as Uq,ph as H,qh as D,rh as T,uh as M,vh as _}from"./main-xt9zc3n6.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";_();Uq();import{existsSync as Pq,readFileSync as a,statSync as Nq,writeFileSync as Yq}from"fs";import{basename as Bq,join as F,resolve as R}from"path";_();import{copyFileSync as s,existsSync as u,lstatSync as e,mkdirSync as x,readdirSync as i,readFileSync as r,renameSync as X,rmSync as I,writeFileSync as qq}from"fs";import{basename as Jq,dirname as h,join as B,resolve as Qq}from"path";import{gunzipSync as Wq}from"zlib";var L=2000,K=67108864,b=2*K,Zq=new Set([".git","node_modules"]);class U extends Error{code;constructor(J,Q){super(J);this.code=Q}}function C(J){let Q=[],G=(q,Z)=>{for(let O of i(q,{withFileTypes:!0})){let $=Z===""?O.name:`${Z}/${O.name}`,W=e(B(q,O.name));if(W.isSymbolicLink())throw new U(`symlink refused: ${$}`,1);if(W.isDirectory()){if(!Zq.has(O.name))G(B(q,O.name),$)}else if(W.isFile()&&!D(O.name))Q.push($)}};return G(J,""),Q.sort()}async function g(J,Q){let G={};for(let q of C(J))G[`${Q}/${q}`]=r(B(J,q));return new Bun.Archive(G,{compress:"gzip"}).bytes()}function $q(J){if(J.length===0)return"archive is empty";if(J.length>L)return`archive has ${J.length} entries (max ${L})`;let Q=new Set;for(let q of J){let Z=JSON.stringify(q);if(q.includes("\\"))return`unsafe entry ${Z}: backslash`;if(q.startsWith("/"))return`unsafe entry ${Z}: absolute path`;if(/^[A-Za-z]:/.test(q))return`unsafe entry ${Z}: drive letter`;let O=q.split("/");if(O.some(($)=>$===""))return`unsafe entry ${Z}: empty path segment`;if(O.some(($)=>$===".."||$==="."))return`unsafe entry ${Z}: relative segment`;if(O.length<2)return`entry ${Z} is not inside a top-level directory`;Q.add(O[0])}if(Q.size!==1)return`archive must hold exactly one top-level directory (found ${[...Q].sort().join(", ")})`;let G=[...Q][0];if(!J.includes(`${G}/${H}`))return`top-level directory ${JSON.stringify(G)} has no ${H}`;return null}var Gq={"1":"hard link","2":"symlink","3":"character device","4":"block device","6":"fifo"};function Oq(J){let Q=J;if(J[0]===31&&J[1]===139)try{Q=Wq(J,{maxOutputLength:b})}catch(q){return q.code==="ERR_BUFFER_TOO_LARGE"?`archive inflates past ${b} bytes`:null}let G=(q,Z)=>new TextDecoder().decode(Q.subarray(q,q+Z)).replace(/\0[\s\S]*$/,"");if(G(257,5)!=="ustar")return null;for(let q=0;q+512<=Q.length&&Q[q]!==0;){let Z=parseInt(G(q+124,12).trim()||"0",8);if(!Number.isFinite(Z))return null;let O=Gq[String.fromCharCode(Q[q+156])];if(O!==void 0){let $=G(q+345,155);return`unsafe entry ${JSON.stringify($===""?G(q,100):`${$}/${G(q,100)}`)}: ${O} member`}q+=512+Math.ceil(Z/512)*512}return null}async function zq(J,Q){for(let[G,q]of J){let Z=B(Q,G);x(h(Z),{recursive:!0}),qq(Z,new Uint8Array(await q.arrayBuffer()))}}var w=()=>Math.random().toString(36).slice(2,10);function p(J){x(J,{recursive:!0});let Q=B(J,`.install-${w()}`);return x(Q),Q}function j(J){for(let Q=1;;Q++)try{I(J,{recursive:!0,force:!0});return}catch(G){if(Q>=5)throw G;Bun.sleepSync(40*Q)}}function y(J,Q,G={}){let q=Qq(J);if(!u(B(q,H)))throw new U(`${q} has no ${H}`,2);let Z=C(q),O=p(Q);try{let $=B(O,Jq(q)),W=G.copyFile??s;for(let P of Z){let z=B($,P);x(h(z),{recursive:!0}),W(B(q,P),z)}return f(O,Q,G)}catch($){throw j(O),$}}async function A(J,Q,G={}){if(J.length>K)throw new U(`archive is ${J.length} bytes (max ${K})`,2);let q;try{q=await new Bun.Archive(J).files()}catch(W){throw new U(`not a tar.gz archive: ${W instanceof Error?W.message:String(W)}`,2)}let Z=$q([...q.keys()])??Oq(J);if(Z!==null)throw new U(Z,2);let O=0;for(let W of q.values())O+=W.size;if(O>K)throw new U(`archive unpacks to ${O} bytes (max ${K})`,2);let $=p(Q);try{return await zq(q,$),f($,Q,G)}catch(W){throw j($),W}}function f(J,Q,G){let q=new M(Q,{projectDir:J,globalDir:null}).scan();if(q.invalid.length>0)throw new U(`staged skill is invalid: ${q.invalid.map((W)=>W.reason).join("; ")}`,2);if(q.skills.length!==1)throw new U(`expected exactly one skill, found ${q.skills.length}`,2);let Z=q.skills[0];if(!/^[^/\\]+$/.test(Z.name)||Z.name==="."||Z.name===".."||Z.name.startsWith("."))throw new U(`refusing skill name ${JSON.stringify(Z.name)}`,2);let O=B(Q,Z.name),$=q.warnings.map((W)=>W.reason);if(u(O)){if(!G.force)throw new U(`${O} already exists (use --force to replace it)`,1);let W=B(Q,`.old-${w()}`);X(O,W);try{G.onSwap?.(),X(Z.dir,O)}catch(P){throw I(O,{recursive:!0,force:!0}),X(W,O),P}j(W)}else X(Z.dir,O);return j(J),{name:Z.name,version:Z.version,path:O,warnings:$}}var Hq={out:(J)=>console.log(J),err:(J)=>console.error(J)},Kq="usage: rovecode skills list [--json] | rovecode skills validate <dir> | rovecode skills pack <dir> [--out <file>] [--force] | rovecode skills install <dir|file.tar.gz|http(s)-url> [--user] [--force]",E=60000,m=5,Vq=new Set([301,302,303,307,308]),Xq=/^([a-z][a-z0-9+.-]*):\/\//i;async function gq(J,Q,G={}){let q=G.io??Hq,Z=J[0]??"",O=J.slice(1),$=new Set(O.filter((N)=>N.startsWith("--"))),W=O.indexOf("--out"),P=W!==-1?O[W+1]:void 0,z=O.filter((N,Y)=>!N.startsWith("--")&&O[Y-1]!=="--out"),V=G.globalDir??T(Q,"global");try{if(Z==="list")return xq(Q,V,$.has("--json"),q);if(Z==="validate"&&z[0]!==void 0)return jq(R(Q,z[0]),q);if(Z==="pack"&&z[0]!==void 0)return await Mq(R(Q,z[0]),P!==void 0?R(Q,P):void 0,$.has("--force"),Q,q);if(Z==="install"&&z[0]!==void 0){let N=$.has("--user")?V:T(Q,"project");return await Rq(z[0],Q,N,$.has("--force"),G.fetch??((Y,l)=>fetch(Y,l)),G.resolve??c,q)}}catch(N){return q.err(`error: ${N instanceof Error?N.message:String(N)}`),N instanceof U?N.code:2}return q.err(Kq),1}function xq(J,Q,G,q){let Z=new M(J,{globalDir:Q}).scan(),O=new Map;for(let W of Z.warnings)O.set(W.path,[...O.get(W.path)??[],W.reason]);let $=Z.skills.map((W)=>({name:W.name,version:W.version,scope:W.scope,path:W.path,dir:W.dir,description:W.fullDescription,license:W.license,compatibility:W.compatibility,metadata:W.metadata,allowedTools:W.allowedTools,warnings:O.get(W.path)??[]}));if(G)return q.out(JSON.stringify({skills:$,invalid:Z.invalid},null,2)),0;if($.length===0&&Z.invalid.length===0)return q.out(`no skills installed (${T(J,"project")} or ${Q}) \u2014 rovecode skills install <dir|file.tar.gz|url>`),0;for(let W of $)q.out(`${W.name.padEnd(24)} ${(W.version||"-").padEnd(10)} ${W.scope.padEnd(8)} ${W.path}`);for(let W of $)for(let P of W.warnings)q.err(`warning: ${W.path}: ${P}`);for(let W of Z.invalid)q.err(`warning: ${W.path}: not loaded \u2014 ${W.reason}`);return 0}function t(J){let Q=F(J,H),G;try{G=a(Q,"utf8")}catch(Z){throw new U(`cannot read ${Q}: ${Z instanceof Error?Z.message:String(Z)}`,2)}let q=S(G);if(q===null)throw new U(`${Q}: missing or unterminated frontmatter block`,1);return k(q,Bq(J),"strict")}function o(J,Q,G){for(let q of J.errors)G.err(`${F(Q,H)}: ${q}`);for(let q of J.notes)G.out(`note: ${q}`);return J.errors.length===0}function jq(J,Q){let G=t(J);if(!o(G,J,Q))return 1;return Q.out(`ok: ${G.meta.name}${G.meta.version?` (v${G.meta.version})`:""} \u2014 ${F(J,H)}`),0}async function Mq(J,Q,G,q,Z){let O=t(J);if(!o(O,J,Z))return 1;let $=Q??F(q,`${O.meta.name}.tar.gz`);if(Pq($)&&!G)return Z.err(`error: ${$} already exists (use --force to overwrite)`),1;let W=await g(J,O.meta.name);return Yq($,W),Z.out(`packed ${O.meta.name} \u2192 ${$} (${W.length} bytes)`),0}async function Rq(J,Q,G,q,Z,O,$){let W=Xq.exec(J)?.[1]?.toLowerCase(),P;if(W!==void 0){if(W!=="http"&&W!=="https")throw new U(`only http(s) URLs can be installed (got ${W}:)`,1);P=await A(await Tq(J,Z,O),G,{force:q})}else{let z=R(Q,J),V;try{V=Nq(z).isDirectory()}catch{throw new U(`${z}: no such file or directory`,2)}P=V?y(z,G,{force:q}):await A(a(z),G,{force:q})}$.out(`installed ${P.name}${P.version?` (v${P.version})`:""} \u2192 ${P.path}`);for(let z of P.warnings)$.err(`warning: ${z}`);return 0}async function Tq(J,Q,G){let q=new AbortController,Z=setTimeout(()=>q.abort(),E);Z.ref?.();let O=($)=>new U(`download failed: ${q.signal.aborted?`timed out after ${E}ms`:$ instanceof Error?$.message:String($)}`,2);try{let $=new URL(J),W=0;for(;;){if($.protocol!=="http:"&&$.protocol!=="https:")throw new U(`only http(s) URLs can be installed (got ${$.protocol})`,1);let P;try{P=await v(n($.hostname,G),q.signal)}catch(Y){throw O(Y)}if(P!==null)throw new U(`refused ${$.href}: ${P}`,1);let z;try{z=await v(Q($.href,{signal:q.signal,redirect:"manual"}),q.signal)}catch(Y){throw O(Y)}if(Vq.has(z.status)){let Y=z.headers.get("location");if(await z.body?.cancel().catch(()=>{}),!Y)throw new U(`download failed: HTTP ${z.status} from ${$.href} without a Location header`,2);if(++W>m)throw new U(`download failed: too many redirects (more than ${m}) starting from ${J}`,2);try{$=new URL(Y,$)}catch{throw new U(`download failed: invalid redirect target ${Y}`,2)}continue}if(!z.ok)throw new U(`download failed: HTTP ${z.status} for ${$.href}`,2);let{bytes:V,truncated:N}=await d(z,K);if(N)throw new U(`download exceeds ${K} bytes`,2);return V}}finally{clearTimeout(Z)}}export{gq as cmdSkills,Kq as SKILLS_USAGE,m as MAX_REDIRECTS,E as INSTALL_TIMEOUT_MS};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{h as $}from"./main-j7ttv0sd.js";import"./main-vxnwe5xx.js";import{B as j,z as _}from"./main-8c1tbazx.js";import"./main-edxc3yzt.js";import"./main-na7wse0x.js";import"./main-hrrvcfan.js";import"./main-rsy72qmw.js";import"./main-rpg7h8mb.js";import"./main-zc7pyrbj.js";import"./main-45ejth3a.js";import"./main-jak598k9.js";import"./main-7kt6r53y.js";import"./main-9ht36z12.js";import"./main-nvc3yjay.js";import"./main-bxtvnf6d.js";import"./main-4p4e2w7x.js";import"./main-hqbz10aw.js";import"./main-n6qrdbmy.js";import"./main-evgz4mp5.js";import"./main-f33fc5je.js";import"./main-2zgsknth.js";import"./main-kwwsz6rq.js";import"./main-23q7cmww.js";import"./main-45rn3trk.js";import"./main-yrjt2sqt.js";import"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-9a9rnh47.js";import"./main-mg9b20ac.js";import"./main-p0cfn6nr.js";import"./main-xfekqh9m.js";import"./main-s4bb0jav.js";import"./main-wqt32p5x.js";import{$f as Y,ag as Z,lg as g}from"./main-rvetps99.js";import"./main-x9ct6y1a.js";import"./main-mg4f96e1.js";import"./main-wgph00xf.js";import"./main-7jd5vh3x.js";import"./main-fvnpq46y.js";import"./main-4y0tnfpa.js";import"./main-xt9zc3n6.js";import"./main-ntqef02r.js";import"./main-mgb9ccnx.js";import"./main-wm997zjx.js";import"./main-kba6zeyd.js";import{vi as O,wi as Q,xi as L}from"./main-2wyax8k9.js";import"./main-01pv9206.js";import"./main-s9v8k74e.js";import"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import"./main-ywbxshqc.js";import"./main-gbbty4d4.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-wk2csfnj.js";import"./main-y5c82rxr.js";import"./main-ys6zj3yr.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";import W from"@xterm/headless";var X=W.Terminal;class K{xterm;inputHandler;resizeHandler;_columns;_rows;constructor(q=80,A=24){this._columns=q,this._rows=A,this.xterm=new X({cols:q,rows:A,disableStdin:!0,allowProposedApi:!0})}start(q,A){this.inputHandler=q,this.resizeHandler=A,this.xterm.write("\x1B[?2004h")}async drainInput(q,A){}stop(){this.xterm.write("\x1B[?2004l"),this.inputHandler=void 0,this.resizeHandler=void 0}write(q){this.xterm.write(q)}get columns(){return this._columns}get rows(){return this._rows}get kittyProtocolActive(){return!0}moveBy(q){if(q>0)this.xterm.write(`\x1B[${q}B`);else if(q<0)this.xterm.write(`\x1B[${-q}A`)}hideCursor(){this.xterm.write("\x1B[?25l")}showCursor(){this.xterm.write("\x1B[?25h")}clearLine(){this.xterm.write("\x1B[K")}clearFromCursor(){this.xterm.write("\x1B[J")}clearScreen(){this.xterm.write("\x1B[2J\x1B[H")}setTitle(q){this.xterm.write(`\x1B]0;${q}\x07`)}setProgress(q){}sendInput(q){if(this.inputHandler)this.inputHandler(q)}resize(q,A){if(this._columns=q,this._rows=A,this.xterm.resize(q,A),this.resizeHandler)this.resizeHandler()}async flush(){return new Promise((q)=>{this.xterm.write("",()=>q())})}async flushAndGetViewport(){return await this.flush(),this.getViewport()}getViewport(){let q=[],A=this.xterm.buffer.active;for(let B=0;B<this.xterm.rows;B++){let C=A.getLine(A.viewportY+B);if(C)q.push(C.translateToString(!0));else q.push("")}return q}getScrollBuffer(){let q=[],A=this.xterm.buffer.active;for(let B=0;B<A.length;B++){let C=A.getLine(B);if(C)q.push(C.translateToString(!0));else q.push("")}return q}clear(){this.xterm.clear()}reset(){this.xterm.reset()}getCursorPosition(){let q=this.xterm.buffer.active;return{x:q.cursorX,y:q.cursorY}}async waitForRender(){await new Promise((q)=>process.nextTick(q)),await new Promise((q)=>setTimeout(q,20)),await this.flush()}}j();g();import{mkdtempSync as y,rmSync as z}from"fs";import{tmpdir as I}from"os";import{join as N}from"path";async function u(){let q=y(N(I(),"rovecode-tui-smoke-")),A=new K(80,24),B=new _({terminal:A,cwd:q}),C=N(q,"smoke.txt"),R=`smoke-ok
|
|
3
|
+
`,H=O({turns:[L([{id:"t1",tool:"write",args:{path:C,content:`smoke-ok
|
|
4
|
+
`}}]),L([{id:"t2",tool:"edit",args:{path:C,edits:[{tag:Z(`smoke-ok
|
|
5
|
+
`),anchorLine:1,anchorHash:Y("smoke-ok"),newLines:["smoke-edited"]}]}}]),Q(`# Smoke OK
|
|
6
|
+
|
|
7
|
+
rendered **markdown**, a tool card, and the status line.`)]}),P=$({renderer:B,stream:H,cwd:q,permission:"ask",exitOnClose:!1,model:"scripted"});A.sendInput("hello rovecode"),A.sendInput("\r");let G=["+smoke-ok","-smoke-ok"],E=[],U=Date.now()+1e4,F=[],J=!1;while(Date.now()<U){F=await A.flushAndGetViewport();let D=F.join(`
|
|
8
|
+
`);if(D.includes("Smoke OK")&&D.includes("write")&&E.length===G.length){J=!0;break}let M=G[E.length];if(M!==void 0&&D.includes("allow once")&&D.includes(M))E.push(F),A.sendInput("\r");await new Promise((V)=>setTimeout(V,50))}A.sendInput("\x03"),await P,z(q,{recursive:!0,force:!0}),console.log("\u2500\u2500 approval overlay with diff card (edit) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let D of E[1]??["(diff card never rendered)"])console.log(D.trimEnd());console.log("\u2500\u2500 emulated 80x24 screen \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let D of F)console.log(D.trimEnd());console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log(J?"smoke-tui: PASS (markdown + tool card + diff card rendered through full pipeline)":`smoke-tui: FAIL (diff cards seen: ${E.length}/${G.length})`),process.exit(J?0:1)}export{u as runTuiSmoke};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{wm as Yq,xm as o}from"./main-ys6zj3yr.js";import{xn as W}from"./main-qsevpgsv.js";import{join as n}from"path";var A=["\u2591","\u2592","\u2593","\u2588"],O=[["\u2588\u2580\u2588","\u2588\u2580\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588 \u2588","\u2580\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588\u2580\u2584","\u2588\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"]],C=O.length*4-1;var b=C+8+(C+8)%2;var Gq=[" \u256D\u2500\u256E\u256D\u2500\u2500\u256E\u256D\u2500\u256E "," \u256D\u256F \u2570\u256F \u2570\u256F \u2570\u2500\u256E "," \u256D\u256F \u2570\u256E "," \u2502 \u2502 "," \u2570\u256E \u256D\u256F "," \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F "],M={EYE_L:6,EYE_R:12,MOUTH:9,EYE_ROW:3,MOUTH_ROW:4},U=Gq.map((q,J)=>{let G=[...q];if(J===M.EYE_ROW)G[M.EYE_L]="\u2022",G[M.EYE_R]="\u2022";if(J===M.MOUTH_ROW)G[M.MOUTH]="\u25E1";return G.join("")});var Jq=U.length-1,g=O.length+A.length-1,T=Math.ceil(b/2/3),p=U.length,h=[3,2,3],D=g+T+p+h.length;function Qq(q){let J=q-g-T-p,G=J>=0?h[Math.min(J,h.length-1)]:void 0,X=["",""];return O.forEach((j,V)=>{let $=G??Math.max(0,Math.min(A.length-1,q-V)),Y=A[$];for(let y of[0,1])X[y]+=(X[y].length>0?" ":"")+j[y].replaceAll("\u2588",Y)}),X}function a(q){return Math.max(0,Math.min(U.length,q-g-T))}function Vq(q){let J=a(q),G=U.slice(1,Math.max(0,J));return[...G,...Array.from({length:Jq-G.length},()=>"")]}function Xq(q,J){if(a(J)===0||q.length===0)return q;let G=Math.max(0,Math.floor((q.length-18)/2)),X=U[0],j=[...q];return[...X].forEach((V,$)=>{if(V!==" "&&G+$<j.length)j[G+$]=V}),j.join("")}function Zq(q){let J=q-g;if(J<0)return["",""];let G=Math.min(b/2,Math.max(0,J)*3);if(G===0)return["",""];let X="\u2500".repeat(Math.max(0,G-1)),j=Math.max(0,b-G*2),V=($,Y)=>`${$}${X}${" ".repeat(j)}${X}${Y}`;return[V("\u256D","\u256E"),V("\u2570","\u256F")]}var w=7+(U.length-1);function L(q,J){return q>=b+2&&J>=w+2}var u="\x1B[2J\x1B[H",c="\x1B[?25l",$q="\x1B[?25h";function l(q){let J=q.size??(()=>({columns:q.columns??80,rows:q.rows??24})),G=J();if(!q.tty||!L(G.columns,G.rows))return{status:()=>{},animationDone:Promise.resolve(),done:Promise.resolve(),finish:()=>{}};let X=q.setInterval??setInterval,j=q.clearInterval??((Q)=>clearInterval(Q)),V=0,$="",Y=!1,y=!1,x=0,Z=null,z=G,N,f=()=>{},F=new Promise((Q)=>{f=Q}),H=()=>{},I=new Promise((Q)=>{H=Q}),_=()=>$&&y&&!Y?`${$} ${"\xB7".repeat(x+1)}`:$,P=(Q,k)=>{let K=[...Q.replace(/\s+/g," ")].slice(0,Math.max(0,k-2)).join("");return" ".repeat(Math.max(0,Math.floor((k-K.length)/2)))+K},v=()=>{let{columns:Q,rows:k}=z=J();if(!L(Q,k)){q.write(u+c);return}let K=(B)=>" ".repeat(Math.max(0,Math.floor((Q-B)/2))),E=K(C),S=K(b),r=S+" ".repeat(Math.max(0,Math.floor((b-18)/2))),i=`
|
|
3
|
+
`.repeat(Math.max(0,Math.floor((k-w)/2))),[s,e]=Qq(V),[t,qq]=Zq(V),d=(B)=>B.length>0?`${S}${B}`:"";q.write([u,c,i,`${d(Xq(t,V))}
|
|
4
|
+
`,Vq(V).map((B)=>`${B.length>0?r+B:""}
|
|
5
|
+
`).join(""),`
|
|
6
|
+
`,`${E}${s}
|
|
7
|
+
${E}${e}
|
|
8
|
+
`,`${P(q.version??"",Q)}
|
|
9
|
+
`,`${P(_(),Q)}
|
|
10
|
+
`,`${d(qq)}
|
|
11
|
+
`].join(""))},m=()=>{if(Y)return;let Q=J();if(Q.columns!==z.columns||Q.rows!==z.rows){v();return}if(!L(Q.columns,Q.rows))return;let k=Math.max(0,Math.floor((Q.rows-w)/2))+w-1,K=String.fromCharCode(27);q.write(`${K}[${k};1H${K}[2K${P(_(),Q.columns)}`)},R=()=>{if(Y)return;Y=!0,j(Z),N?.(),V=D,$="",v(),q.write(`${$q}${u}`),H(),f()};return v(),N=q.onResize?.(()=>{if(!Y)v()}),Z=X(()=>{if(Y)return;if(V<D){if(V+=1,v(),V===D)H()}else if(!q.holdUntilReady)R();else j(Z),y=!0,m(),Z=X(()=>{x=(x+1)%3,m()},500)},q.frameMs??Math.round(1100/D)),{status:(Q)=>{if(!Y&&Q!==$)$=Q,m()},animationDone:I,done:F,finish:R}}Yq();async function Hq(q,J=process.argv){if(q.plain){let[{runRepl:Z},{parseAddDirs:z},{resolveBoot:N}]=await Promise.all([import("./repl-t4z03mqq.js"),import("./run-flags-rysbag9t.js"),import("./resume-fqt4chg8.js")]);N(J,n(process.cwd(),".rovecode","sessions")),await Z({yolo:q.yolo,addDirs:z(J)});return}let G=l({write:(Z)=>{process.stdout.write(Z)},tty:process.stdout.isTTY===!0&&!J.includes("--no-intro")&&process.env.ROVECODE_INTRO!=="0",version:o.version,holdUntilReady:!0,size:()=>({columns:process.stdout.columns||80,rows:process.stdout.rows||24}),onResize:(Z)=>{return process.stdout.on("resize",Z),()=>{process.stdout.off("resize",Z)}}}),X=new AbortController,j=130,V=()=>{j=130,X.abort(Error("startup interrupted"))},$=()=>{j=143,X.abort(Error("startup terminated"))},Y=()=>{G.finish(),process.off("SIGINT",V),process.off("SIGTERM",$)};process.once("exit",Y),process.once("SIGINT",V),process.once("SIGTERM",$);let y=Number(process.env._ROVECODE_BOOT_T0??-1),x=(Z)=>{if(y>=0)process.stderr.write(`[boot] +${Date.now()-y}ms ${Z}
|
|
12
|
+
`)};try{x("intro started"),G.status("loading modules");let[{runTui:Z},{interactiveRenderer:z},{parseAddDirs:N},{resolveBoot:f}]=await Promise.all([import("./app-dybnr56b.js"),import("./notify-54v5z9dz.js"),import("./run-flags-rysbag9t.js"),import("./resume-fqt4chg8.js")]);X.signal.throwIfAborted(),x("surface modules loaded"),G.status("opening session");let F=process.cwd(),H=f(J,n(F,".rovecode","sessions")),I=N(J);await Z({yolo:q.yolo,acceptEdits:q.acceptEdits,...q.effort!==void 0?{effort:q.effort}:{},sessionId:H.id,...H.note!==void 0?{bootNote:H.note}:{},renderer:z(q,process.env,process.stdout,process.stdin,F),...q.pet!==void 0?{pet:q.pet}:{},...I.length>0?{addDirs:I}:{},startup:{status:G.status,finish:Y,animationDone:G.animationDone,signal:X.signal}})}catch(Z){if(X.signal.aborted){process.exitCode=j;return}throw Z}finally{Y(),process.off("exit",Y)}}export{Hq as startChat};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ii as f,ji as g,ki as h,li as i,mi as j,ni as k,oi as l,pi as m,qi as n,ri as o,si as p,ti as q,ui as r,vi as s,wi as t,xi as u,yi as v,zi as w}from"./main-2wyax8k9.js";import{Bi as c,Di as d,Ei as e}from"./main-01pv9206.js";import"./main-s9v8k74e.js";import{Ki as a,Li as b}from"./main-6vjeds42.js";import"./main-xx2z3zh5.js";import"./main-1ztz6fkj.js";import"./main-2rzbexn2.js";import"./main-v8y60bb2.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-mjt2p7aj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{j as wantsStreaming,u as toolTurn,d as toOpenAiToolSchemas,c as toOpenAiMessages,e as toAnthropicMessages,a as thinkingBudget,t as textTurn,l as shapeKey,k as shapeByModel,v as resolveProvider,i as providerStreaming,h as providerStream,p as openaiCompatStreaming,o as openaiCompatStream,s as mockStream,w as listBuiltinProviders,f as fetchModels,g as clearModelsCache,b as anthropicThinking,q as anthropicStreaming,r as anthropicStream,n as anthropicShapeFor,m as anthropicMaxTokens};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{be as a,ce as b,de as c,ee as d}from"./main-a2yfvcy9.js";import"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-ntqef02r.js";import"./main-kba6zeyd.js";import"./main-gbbty4d4.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{c as createTaskTool,d as createTaskStatusTool,b as MAX_WAIT_MS,a as DEFAULT_WAIT_MS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ke as a,le as b,me as c,ne as d,oe as e,pe as f,qe as g,re as h,se as i,te as j}from"./main-gth53dnt.js";import"./main-2z3dek0b.js";import"./main-ntqef02r.js";import"./main-kba6zeyd.js";import"./main-gbbty4d4.js";import"./main-qj2djy17.js";import"./main-6dtqmbt6.js";import"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";j();export{b as tasksMaxFromEnv,d as taskNote,g as summariseBatch,c as isTerminal,e as formatTaskList,h as batchNote,i as TaskManager,a as DEFAULT_TASKS_MAX,f as BATCH_LABEL_MAX};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g}from"./main-6vjeds42.js";import"./main-1ztz6fkj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{e as thinkingTable,g as thinkingReport,d as thinkingPlan,f as thinkingLine,a as thinkingBudget,c as dialectFor,b as anthropicThinking};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Af as o,Bf as p,Cf as q,mf as a,nf as b,of as c,pf as d,qf as e,rf as f,sf as g,tf as h,uf as i,vf as j,wf as k,xf as l,yf as m,zf as n}from"./main-xfekqh9m.js";import"./main-qsevpgsv.js";q();export{g as validateTodos,n as todoWriteTool,p as todoTools,m as todoStatusLabel,o as todoReadTool,j as todoCounts,i as saveTodos,k as renderTodos,l as planReminder,h as loadTodos,a as TODO_STATUSES,b as TODO_PRIORITIES,f as TODOS_FILE,c as MAX_TODOS,d as MAX_ID_CHARS,e as MAX_CONTENT_CHARS};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{nl as a,ol as b,pl as c,ql as d,rl as e}from"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";e();export{b as evaluatePermissions,d as describeResource,c as ToolRegistry,a as ABORTED_TOOL_RESULT};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{C as O,D as F,E as P,F as Q}from"./main-edxc3yzt.js";import"./main-6h9x282m.js";import"./main-vhrrq337.js";import"./main-y5c82rxr.js";import{$m as Z,Lm as N}from"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";Z();var M=["usage: rovecode trust list this repo's gated files with what they would do, then approve them (asks on a TTY)"," rovecode trust --yes approve without asking (after reading `trust show`)"," rovecode trust show list only \u2014 nothing changes"," rovecode trust untrust withdraw the approval; the files contribute nothing again until trusted"," gated: .rovecode/settings.json (verify, lsp, notify_command) \xB7 .rovecode/hooks.ts|js \xB7 .rovecode/sandbox.json \xB7 .rovecode/mcp.json \xB7 .mcp.json"," the store is ~/.rovecode/plugins.json (path \u2192 sha256): any edit to a file asks again"];async function H(I,V=process.cwd(),D={}){let x=D.out??((k)=>console.log(k)),J=D.err??((k)=>console.error(k)),K=D.home??N(),W=I.filter((k)=>!k.startsWith("--")),X=I.includes("--yes"),z=W[0]??"";if(z==="-h"||z==="help"||I.includes("--help")){for(let k of M)x(k);return 0}if(z!==""&&z!=="show"&&z!=="untrust"){J(`unknown trust command "${z}"`);for(let k of M)J(k);return 2}let C=O(V,K);if(z==="show"){for(let k of F(C))x(k);return 0}if(z==="untrust"){for(let k of Q(K,C))x(k);return 0}if(C.length===0){for(let k of F(C))x(k);return 1}for(let k of F(C))x(k);if(!X){if(!(D.tty??process.stdin.isTTY===!0))return J("nothing trusted: no terminal to confirm on \u2014 re-run with --yes after reading the lines above"),1;if(!await(D.confirm??((Y)=>confirm(Y)))("trust these files as they are now? [y/N]"))return x("nothing trusted"),1}for(let k of P(K,C))x(k);return x("restart rovecode to apply \u2014 an edit to any of these files asks again"),0}export{H as cmdTrust,M as TRUST_USAGE};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Lh as P,Mh as Z}from"./main-wm997zjx.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";import{existsSync as B}from"fs";import{join as G}from"path";import{existsSync as I}from"fs";import{join as N,sep as X}from"path";var _="/$bunfs/";function $(A){let z=A.entry.replace(/\\/g,"/");if(z.includes(_)||A.exec!==void 0&&A.exec.replace(/\\/g,"/").includes(_))return{mode:"binary"};let D=z.lastIndexOf("/node_modules/");if(D>=0){let E=z.slice(D+14),J=E.split("/"),H=E.startsWith("@")?J.slice(0,2):J.slice(0,1),K=z.slice(0,D)+"/node_modules/"+H.join("/"),Q=A.npmGlobalPrefix?.replace(/\\/g,"/").replace(/\/$/,""),T=Q!==void 0?K.toLowerCase().startsWith((Q+"/node_modules/").toLowerCase()):void 0;return{mode:"npm",root:K,...T!==void 0?{npmGlobal:T}:{}}}for(let E of O(A.entry))if(I(N(E,".git")))return{mode:"source",root:E};return{mode:"unknown"}}function O(A){let z=[],D=A.includes(X)||A.includes("/")?A.replace(/\\/g,"/").split("/").slice(0,-1).join("/"):".";for(let E=0;E<6&&D.length>0;E++){z.push(D.replace(/\//g,X));let J=D.split("/").slice(0,-1).join("/");if(J===D)break;D=J}return z}function Y(A,z){if(z==="beta"||z==="latest")return z;return A.includes("-")?"beta":"latest"}function q(A,z){let D=Y(z.currentVersion,z.channel);switch(A.mode){case"npm":{let E=`rovecode@${D}`;if(A.npmGlobal===!1&&A.root){let J=A.root.replace(/\\/g,"/"),H=J.lastIndexOf("/node_modules/"),K=H>0?J.slice(0,H).replace(/\//g,X):void 0;return{mode:"npm",channel:D,commands:[["npm","install",E]],...K?{cwd:K}:{}}}return{mode:"npm",channel:D,commands:[["npm","install","-g",E]]}}case"source":{let E=[["git","pull","--ff-only"],["bun","install"]];if(z.distBuilt===!0)E.push(["bun","run","build:cli"]);return{mode:"source",channel:D,commands:E,...A.root?{cwd:A.root}:{}}}case"binary":return{mode:"binary",channel:D,commands:[],manual:"a compiled binary does not replace itself yet \u2014 download the new artifact from the releases page (https://github.com/9Code-Labs/rovecode-community/releases) and swap the file"};default:return{mode:"unknown",channel:D,commands:[],manual:"cannot tell how this copy was installed \u2014 update it the way you installed it (npm: `npm install -g rovecode@"+D+"`; source: `git pull && bun install`)"}}}async function M(A,z,D){let E=[];if(A.commands.length===0)return{ok:!1,detail:A.manual??"nothing to run",ran:E};let J=A.commands;if(A.mode==="npm"&&z.npmGlobal===void 0&&z.root&&D.npmGlobalPrefix){let H=(await D.npmGlobalPrefix())?.replace(/\\/g,"/").replace(/\/$/,"");if(H){let K=z.root.replace(/\\/g,"/").toLowerCase().startsWith((H+"/node_modules/").toLowerCase()),Q=A.commands[0][A.commands[0].length-1];J=K?[["npm","install","-g",Q]]:[["npm","install",Q]]}}for(let H of J){D.log?.(`$ ${H.join(" ")}`);let K;try{K=await D.spawn(H,A.cwd)}catch(Q){return{ok:!1,detail:`${H[0]} failed to start: ${Q instanceof Error?Q.message:String(Q)}`,ran:E}}if(E.push(H.join(" ")),K.code!==0)return{ok:!1,detail:`${H.join(" ")} exited ${K.code}: ${V(K.out)}`,ran:E}}return{ok:!0,detail:"updated \u2014 restart rovecode to run the new version",ran:E}}function V(A,z=400){let D=A.trim();return D.length>z?"\u2026"+D.slice(-z):D}var R=process.platform==="win32"?"npm.cmd":"npm";async function L(A,z){let D=A[0]==="npm"?[R,...A.slice(1)]:A,E=Bun.spawn(D,{cwd:z,stdout:"pipe",stderr:"pipe"}),[J,H]=await Promise.all([new Response(E.stdout).text(),new Response(E.stderr).text()]);return{code:await E.exited,out:J+H}}async function b(){try{let A=Bun.spawn([R,"prefix","-g"],{stdout:"pipe",stderr:"ignore"}),z=(await new Response(A.stdout).text()).trim();return await A.exited,z.length>0?z:void 0}catch{return}}async function j(A,z){let D=A.includes("--check"),E=A.includes("--channel")?A[A.indexOf("--channel")+1]:"auto";if(E!=="auto"&&E!=="beta"&&E!=="latest")return z.log("error: --channel must be beta, latest or auto"),2;let J=await P(z.version,D?{cacheOnly:!0}:{});if(D)return z.log(Z(J,!0)??`up to date (${z.version})`),0;if(!J.newer)return z.log(J.latest===void 0?`no newer release is known (${Z(J,!0)??`current: ${z.version}`})`:`up to date (${z.version})`),0;let H=z.deps?.install??$({entry:z.entry}),K=H.mode==="source"&&H.root!==void 0&&B(G(H.root,"dist","cli","main.js")),Q=q(H,{currentVersion:z.version,channel:E,distBuilt:K});if(z.log(`update available: ${z.version} \u2192 ${J.latest} \xB7 this copy is a ${H.mode} install \xB7 channel ${Q.channel} (${Y(z.version,E)} follows the running version)`),Q.commands.length===0)return z.log(Q.manual??"nothing to run"),1;let T=await M(Q,H,{spawn:z.deps?.spawn??L,npmGlobalPrefix:z.deps?.prefix??b,log:z.log});return z.log(T.ok?T.detail:`update failed: ${T.detail}`),T.ok?0:1}async function g(A,z,D){return j(A,{version:z,entry:D,log:(E)=>console.log(E)})}export{j as updateFlow,g as cmdUpdate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Fj as a,Gj as b,Hj as c,Ij as d,Jj as e,Kj as f,Lj as g,Mj as h,Nj as i,Oj as j,Pj as k,Qj as l,Rj as m,Sj as n,Tj as o,Uj as p,Vj as q,Wj as r}from"./main-ywbxshqc.js";import"./main-qsevpgsv.js";r();export{l as welcomeCard,m as resumedLine,i as noModelHint,h as next,o as modeSwitchNote,f as modeMeaning,e as modeLabelShort,d as modeLabel,k as loadedLine,n as effortNote,p as acceptEditsNote,g as NEXT,b as MODE_AUTO,a as MODE_ASK,c as MODE_ACCEPT,j as MOCK_PROVIDER_TEXT,q as EMPTY};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ge as a,He as b,Ie as c,Je as d,Ke as e,Le as f,Me as g,Ne as h,Oe as i,Pe as j,Qe as k,Re as l,Se as m,Te as n}from"./main-mg9b20ac.js";import"./main-qsevpgsv.js";export{n as webFetchTool,j as ssrfDenyReason,l as readBounded,g as isPrivateAddress,h as dnsResolver,m as createWebFetchTool,f as clampChars,i as canonicalHost,k as abortable,e as TIMEOUT_DEFAULT_MS,d as MAX_REDIRECTS,a as MAX_BYTES,b as CHARS_DEFAULT,c as CHARS_CAP};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$d as q,Ld as a,Md as b,Nd as c,Od as d,Pd as e,Qd as f,Rd as g,Sd as h,Td as i,Ud as j,Vd as k,Wd as l,Xd as m,Yd as n,Zd as o,_d as p,ae as r}from"./main-yrjt2sqt.js";import"./main-mg9b20ac.js";import"./main-ys6zj3yr.js";import"./main-qsevpgsv.js";export{r as webSearchTool,o as parseResultsText,m as parseMcpBody,n as parseExaContext,p as formatResults,q as createWebSearchTool,l as clampResults,g as URL_CHARS,f as TITLE_CHARS,k as TIMEOUT_DEFAULT_MS,e as SNIPPET_CHARS,b as RESULTS_DEFAULT,c as RESULTS_CAP,d as QUERY_CHARS,h as OUTPUT_CHARS_CAP,j as MAX_REDIRECTS,i as MAX_BYTES,a as ENDPOINT};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Al as i,Bl as j,Cl as k,Dl as l,sl as a,tl as b,ul as c,vl as d,wl as e,xl as f,yl as g,zl as h}from"./main-a3f51n0x.js";import"./main-qsevpgsv.js";l();export{c as toolPath,h as rootProblem,j as resolveRoots,e as outsideWorkspace,g as outsidePrompt,d as isInside,f as externalResource,b as canonical,k as WorkspaceRoots,i as WorkspaceRootError,a as EXTERNAL_ACTION};
|