@zhivex-ai/harness 1.6.3 → 1.8.0
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 +16 -3
- package/README.md +17 -5
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/benchmarks/README.md +98 -0
- package/contracts/engine-api.json +1587 -0
- package/contracts/public-api.json +114 -0
- package/contracts/stable-api-signatures.json +17 -17
- package/dist/acp-cli.js +37 -1090
- package/dist/application/agenda.d.ts +10 -0
- package/dist/application/approval-review.d.ts +61 -0
- package/dist/application/assistant/automation/scheduler.d.ts +21 -0
- package/dist/application/assistant/automation/summary.d.ts +29 -0
- package/dist/application/assistant/automation/time.d.ts +10 -0
- package/dist/application/assistant/calendar/calendar.d.ts +238 -0
- package/dist/application/assistant/calendar/connection.d.ts +50 -0
- package/dist/application/assistant/calendar/create-event.d.ts +75 -0
- package/dist/application/assistant/calendar/environment.d.ts +2 -0
- package/dist/application/assistant/calendar/http.d.ts +6 -0
- package/dist/application/assistant/calendar/oauth.d.ts +68 -0
- package/dist/application/assistant/calendar/store.d.ts +11 -0
- package/dist/application/assistant/calendar/tools.d.ts +78 -0
- package/dist/application/assistant/client.d.ts +10 -0
- package/dist/application/assistant/config.d.ts +9 -0
- package/dist/application/assistant/contracts.d.ts +77 -0
- package/dist/application/assistant/daily/service.d.ts +181 -0
- package/dist/application/assistant/doctor.d.ts +22 -0
- package/dist/application/assistant/evaluation.d.ts +81 -0
- package/dist/application/assistant/host.d.ts +399 -0
- package/dist/application/assistant/integrations/google.d.ts +117 -0
- package/dist/application/assistant/integrations/public-web.d.ts +16 -0
- package/dist/application/assistant/managed/secrets.d.ts +10 -0
- package/dist/application/assistant/managed/setup-state.d.ts +346 -0
- package/dist/application/assistant/managed/setup.d.ts +492 -0
- package/dist/application/assistant/microsoft/connection.d.ts +73 -0
- package/dist/application/assistant/microsoft/tools.d.ts +78 -0
- package/dist/application/assistant/modules/calendar.d.ts +3 -0
- package/dist/application/assistant/modules/catalog.d.ts +38 -0
- package/dist/application/assistant/modules/daily.d.ts +5 -0
- package/dist/application/assistant/modules/github.d.ts +5 -0
- package/dist/application/assistant/modules/google.d.ts +3 -0
- package/dist/application/assistant/modules/mcp.d.ts +11 -0
- package/dist/application/assistant/modules/microsoft.d.ts +3 -0
- package/dist/application/assistant/modules/module.d.ts +224 -0
- package/dist/application/assistant/modules/tools.d.ts +11 -0
- package/dist/application/assistant/modules/web.d.ts +7 -0
- package/dist/application/assistant/private-directory.d.ts +3 -0
- package/dist/application/assistant/proactive/service.d.ts +142 -0
- package/dist/application/assistant/providers/openai-compatible.d.ts +66 -0
- package/dist/application/assistant/providers/provider.d.ts +141 -0
- package/dist/application/assistant/providers/web-citations.d.ts +2 -0
- package/dist/application/assistant/runtime.d.ts +16 -0
- package/dist/application/assistant/task-metrics.d.ts +304 -0
- package/dist/application/assistant/telegram/api.d.ts +47 -0
- package/dist/application/assistant/telegram/bridge.d.ts +69 -0
- package/dist/application/assistant/telegram/store.d.ts +10 -0
- package/dist/application/automation.d.ts +5 -0
- package/dist/application/calendar-review.d.ts +5 -0
- package/dist/application/checkpoint-review.d.ts +30 -0
- package/dist/application/client.d.ts +18 -0
- package/dist/application/code/context.d.ts +5 -0
- package/dist/application/code/delivery.d.ts +6 -0
- package/dist/application/code/git-delivery.d.ts +54 -0
- package/dist/application/code/github-git-transport.d.ts +15 -0
- package/dist/application/code/github-pr-transport.d.ts +6 -0
- package/dist/application/code/host.d.ts +25 -0
- package/dist/application/code/pr-delivery.d.ts +79 -0
- package/dist/application/code/projects.d.ts +90 -0
- package/dist/application/code/remote-delivery.d.ts +80 -0
- package/dist/application/code/repository.d.ts +9 -0
- package/dist/application/code/worktrees.d.ts +123 -0
- package/dist/application/contracts.d.ts +288 -0
- package/dist/application/coordinator-client.d.ts +33 -0
- package/dist/application/coordinator-discovery.d.ts +17 -0
- package/dist/application/coordinator-launcher.d.ts +2 -0
- package/dist/application/coordinator.d.ts +27 -0
- package/dist/application/credential-process.d.ts +13 -0
- package/dist/application/host.d.ts +7 -0
- package/dist/application/management.d.ts +68 -0
- package/dist/application/notes.d.ts +5 -0
- package/dist/application/offline-migration.d.ts +16 -0
- package/dist/application/personal-state.d.ts +5 -0
- package/dist/application/review-channel.d.ts +23 -0
- package/dist/application/review-tickets.d.ts +29 -0
- package/dist/application/runtime-binding.d.ts +4 -0
- package/dist/application-cli-wfh08g41.js +184 -0
- package/dist/application-cli-z3f9pvcf.js +209 -0
- package/dist/arguments-75r85mvc.js +27 -0
- package/dist/arguments-x24bbqvd.js +22 -0
- package/dist/audit/index.js +16 -472
- package/dist/audit-pack-1gnych0m.js +93 -0
- package/dist/{audit-pack-s9n693by.js → audit-pack-h44kjkbj.js} +17 -11
- package/dist/calendar-2xw0rr7b.js +49 -0
- package/dist/cli/application-cli.d.ts +2 -0
- package/dist/cli/arguments.d.ts +14 -1
- package/dist/cli/auto-approve-setup.d.ts +13 -0
- package/dist/cli/configured-harness.d.ts +1 -2
- package/dist/cli/console/console-budget.d.ts +16 -2
- package/dist/cli/console/console-checkpoints.d.ts +12 -0
- package/dist/cli/console/console-commands.d.ts +3 -3
- package/dist/cli/console/console-compaction.d.ts +1 -1
- package/dist/cli/console/console-diff.d.ts +2 -0
- package/dist/cli/console/console-input.d.ts +29 -1
- package/dist/cli/console/console-navigation.d.ts +2 -2
- package/dist/cli/console/console-outcome.d.ts +10 -0
- package/dist/cli/console/console-presentation.d.ts +17 -2
- package/dist/cli/console/console-pricing.d.ts +14 -0
- package/dist/cli/console/console-reasoning.d.ts +1 -1
- package/dist/cli/console/console-recovery.d.ts +2 -0
- package/dist/cli/console/console-review.d.ts +34 -0
- package/dist/cli/console/console-run-policy.d.ts +5 -0
- package/dist/cli/console/console-run-view.d.ts +28 -0
- package/dist/cli/console/console-task.d.ts +30 -0
- package/dist/cli/console/console-welcome.d.ts +13 -3
- package/dist/cli/console/review-diff.d.ts +20 -0
- package/dist/cli/presentation.d.ts +8 -6
- package/dist/cli/service-checkpoints.d.ts +234 -0
- package/dist/cli/terminal/activity-history.d.ts +4 -2
- package/dist/cli/terminal/activity-stream.d.ts +33 -0
- package/dist/cli/terminal/file-diff.d.ts +11 -0
- package/dist/cli/terminal/terminal-theme.d.ts +9 -0
- package/dist/cli/terminal/terminal-ui.d.ts +44 -2
- package/dist/cli/terminal/tool-activity.d.ts +6 -2
- package/dist/{cli-entry-hdtfef27.js → cli-entry-68kqraj7.js} +95 -43
- package/dist/{cli-entry-1epvek01.js → cli-entry-86rcbmwh.js} +294 -14
- package/dist/cli-entry-btkpb4h1.js +3627 -0
- package/dist/cli-entry-bxjbs6qq.js +200 -0
- package/dist/cli-entry-cpm89r9q.js +624 -0
- package/dist/{cli-entry-mbcq96nx.js → cli-entry-dksm56sj.js} +39 -293
- package/dist/{cli-entry-rsx0wpvs.js → cli-entry-eka68ttb.js} +4087 -4625
- package/dist/cli-entry-h7dcah4p.js +137 -0
- package/dist/cli-entry-kwk23ktq.js +33 -0
- package/dist/{cli-entry-nyzyvf24.js → cli-entry-vmce694z.js} +1286 -3142
- package/dist/cli-entry-wanv05db.js +1113 -0
- package/dist/{cli-yxvq8qf1.js → cli-z7vhm1rk.js} +1767 -380
- package/dist/cli.js +8 -6
- package/dist/client/json-contracts.d.ts +153 -0
- package/dist/client/local-service.d.ts +7 -12
- package/dist/client/local-transport.d.ts +14 -0
- package/dist/client/protocol.d.ts +43 -1
- package/dist/compat/cli-options.d.ts +7 -1
- package/dist/compat/cli.d.ts +2 -0
- package/dist/compat/cli.js +4043 -0
- package/dist/compat/code-support.d.ts +4 -0
- package/dist/compat/code-support.js +50 -28
- package/dist/{config-r9fdhce6.js → config-hw78440t.js} +5 -5
- package/dist/{config-vyajmksy.js → config-v7s8hp37.js} +1 -1
- package/dist/context/adaptive-compaction.d.ts +1 -0
- package/dist/context/lossless-lines.d.ts +13 -0
- package/dist/context/numbered-read-lines.d.ts +15 -0
- package/dist/context/read-attempts.d.ts +21 -0
- package/dist/context/request-projection.d.ts +32 -4
- package/dist/context/scoped-context.d.ts +31 -5
- package/dist/context/working-read-replay.d.ts +12 -0
- package/dist/coordinator-client-nzysqxf0.js +10 -0
- package/dist/engine/acp.js +27 -21
- package/dist/engine/application-client.d.ts +11 -0
- package/dist/engine/application-client.js +18 -0
- package/dist/engine/application-protocol.d.ts +5 -0
- package/dist/engine/application-protocol.js +7 -0
- package/dist/engine/application.d.ts +43 -0
- package/dist/engine/application.js +206 -0
- package/dist/engine/assistant/automation/scheduler.d.ts +2 -0
- package/dist/engine/assistant/automation/scheduler.js +11 -0
- package/dist/engine/assistant/automation/summary.d.ts +3 -0
- package/dist/engine/assistant/automation/summary.js +8 -0
- package/dist/engine/assistant/automation/time.d.ts +5 -0
- package/dist/engine/assistant/automation/time.js +15 -0
- package/dist/engine/assistant/calendar/calendar.d.ts +5 -0
- package/dist/engine/assistant/calendar/calendar.js +12 -0
- package/dist/engine/assistant/calendar/connection.d.ts +2 -0
- package/dist/engine/assistant/calendar/connection.js +11 -0
- package/dist/engine/assistant/calendar/environment.d.ts +1 -0
- package/dist/engine/assistant/calendar/environment.js +7 -0
- package/dist/engine/assistant/calendar/http.d.ts +3 -0
- package/dist/engine/assistant/calendar/http.js +9 -0
- package/dist/engine/assistant/calendar/oauth.d.ts +5 -0
- package/dist/engine/assistant/calendar/oauth.js +12 -0
- package/dist/engine/assistant/calendar/store.d.ts +2 -0
- package/dist/engine/assistant/calendar/store.js +8 -0
- package/dist/engine/assistant/calendar/tools.d.ts +2 -0
- package/dist/engine/assistant/calendar/tools.js +46 -0
- package/dist/engine/assistant/client.d.ts +2 -0
- package/dist/engine/assistant/client.js +33 -0
- package/dist/engine/assistant/config.d.ts +1 -0
- package/dist/engine/assistant/config.js +102 -0
- package/dist/engine/assistant/contracts.d.ts +10 -0
- package/dist/engine/assistant/contracts.js +78 -0
- package/dist/engine/assistant/daily/service.d.ts +12 -0
- package/dist/engine/assistant/daily/service.js +27 -0
- package/dist/engine/assistant/doctor.d.ts +1 -0
- package/dist/engine/assistant/doctor.js +116 -0
- package/dist/engine/assistant/evaluation.d.ts +2 -0
- package/dist/engine/assistant/evaluation.js +76 -0
- package/dist/engine/assistant/host.d.ts +2 -0
- package/dist/engine/assistant/host.js +63 -0
- package/dist/engine/assistant/integrations/google.d.ts +9 -0
- package/dist/engine/assistant/integrations/google.js +30 -0
- package/dist/engine/assistant/integrations/public-web.d.ts +3 -0
- package/dist/engine/assistant/integrations/public-web.js +11 -0
- package/dist/engine/assistant/managed/secrets.d.ts +1 -0
- package/dist/engine/assistant/managed/secrets.js +0 -0
- package/dist/engine/assistant/managed/setup-state.d.ts +11 -0
- package/dist/engine/assistant/managed/setup-state.js +84 -0
- package/dist/engine/assistant/managed/setup.d.ts +3 -0
- package/dist/engine/assistant/managed/setup.js +85 -0
- package/dist/engine/assistant/microsoft/connection.d.ts +7 -0
- package/dist/engine/assistant/microsoft/connection.js +21 -0
- package/dist/engine/assistant/microsoft/tools.d.ts +8 -0
- package/dist/engine/assistant/microsoft/tools.js +30 -0
- package/dist/engine/assistant/modules/calendar.d.ts +1 -0
- package/dist/engine/assistant/modules/calendar.js +49 -0
- package/dist/engine/assistant/modules/catalog.d.ts +3 -0
- package/dist/engine/assistant/modules/catalog.js +67 -0
- package/dist/engine/assistant/modules/daily.d.ts +1 -0
- package/dist/engine/assistant/modules/daily.js +48 -0
- package/dist/engine/assistant/modules/github.d.ts +1 -0
- package/dist/engine/assistant/modules/github.js +43 -0
- package/dist/engine/assistant/modules/google.d.ts +1 -0
- package/dist/engine/assistant/modules/google.js +53 -0
- package/dist/engine/assistant/modules/mcp.d.ts +1 -0
- package/dist/engine/assistant/modules/mcp.js +42 -0
- package/dist/engine/assistant/modules/microsoft.d.ts +1 -0
- package/dist/engine/assistant/modules/microsoft.js +53 -0
- package/dist/engine/assistant/modules/module.d.ts +5 -0
- package/dist/engine/assistant/modules/module.js +42 -0
- package/dist/engine/assistant/modules/tools.d.ts +2 -0
- package/dist/engine/assistant/modules/tools.js +42 -0
- package/dist/engine/assistant/modules/web.d.ts +1 -0
- package/dist/engine/assistant/modules/web.js +45 -0
- package/dist/engine/assistant/private-directory.d.ts +1 -0
- package/dist/engine/assistant/private-directory.js +7 -0
- package/dist/engine/assistant/proactive/service.d.ts +6 -0
- package/dist/engine/assistant/proactive/service.js +16 -0
- package/dist/engine/assistant/providers/openai-compatible.d.ts +4 -0
- package/dist/engine/assistant/providers/openai-compatible.js +12 -0
- package/dist/engine/assistant/providers/provider.d.ts +7 -0
- package/dist/engine/assistant/providers/provider.js +54 -0
- package/dist/engine/assistant/providers/web-citations.d.ts +1 -0
- package/dist/engine/assistant/providers/web-citations.js +7 -0
- package/dist/engine/assistant/runtime.d.ts +2 -0
- package/dist/engine/assistant/runtime.js +73 -0
- package/dist/engine/assistant/task-metrics.d.ts +8 -0
- package/dist/engine/assistant/task-metrics.js +17 -0
- package/dist/engine/assistant/telegram/api.d.ts +5 -0
- package/dist/engine/assistant/telegram/api.js +11 -0
- package/dist/engine/assistant/telegram/bridge.d.ts +2 -0
- package/dist/engine/assistant/telegram/bridge.js +40 -0
- package/dist/engine/assistant/telegram/store.d.ts +2 -0
- package/dist/engine/assistant/telegram/store.js +8 -0
- package/dist/engine/client.js +26 -18
- package/dist/engine/desktop-providers-v1.js +4 -4
- package/dist/engine/desktop-state-v1.js +16 -13
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +117 -159
- package/dist/engine/mcp-stdio-v1.js +13 -12
- package/dist/engine/models.js +65 -23
- package/dist/engine/protocol.js +10 -6
- package/dist/engine/service.js +32 -21
- package/dist/hostile-repository-demo.js +2329 -1096
- package/dist/index-09rsdr2d.js +1744 -0
- package/dist/index-0csc5sc7.js +139 -0
- package/dist/{index-4mn6m3bq.js → index-0dkty795.js} +8 -6
- package/dist/index-0kkgqvg7.js +0 -0
- package/dist/index-0mzz9axm.js +58 -0
- package/dist/index-1e69ar8r.js +38 -0
- package/dist/index-1z0xhkh9.js +18 -0
- package/dist/index-2cef1k92.js +356 -0
- package/dist/{index-rgqzdgv6.js → index-2j0v1xwr.js} +17 -13
- package/dist/index-2jw9jd7h.js +116 -0
- package/dist/index-2n9qx4km.js +0 -0
- package/dist/index-3rvk23e8.js +877 -0
- package/dist/index-3wa4j0yk.js +71 -0
- package/dist/index-41q1k17x.js +210 -0
- package/dist/index-4vz4bqqw.js +33 -0
- package/dist/index-5jxm2wy5.js +123 -0
- package/dist/index-5rk6ss42.js +216 -0
- package/dist/index-5v1skxf7.js +1852 -0
- package/dist/{index-fqqz1yt8.js → index-6ehtssyz.js} +369 -335
- package/dist/index-76kpdbpw.js +80 -0
- package/dist/{index-5nmm0642.js → index-7nbmhmw5.js} +10 -10
- package/dist/index-8mx0yrkz.js +31 -0
- package/dist/index-8tjev5ds.js +11 -0
- package/dist/index-91n5wr6s.js +163 -0
- package/dist/index-91trs3ew.js +151 -0
- package/dist/index-9y8p5vy5.js +222 -0
- package/dist/index-abxahprd.js +55 -0
- package/dist/index-aptyr511.js +84 -0
- package/dist/{index-8sm2a1wa.js → index-ay26xfxt.js} +28 -20
- package/dist/index-b4yed1s3.js +657 -0
- package/dist/index-bb7phvtg.js +23 -0
- package/dist/index-bk5tn9b8.js +236 -0
- package/dist/index-bw34861c.js +292 -0
- package/dist/index-c6fnjhgv.js +55 -0
- package/dist/{index-qfsrrnz6.js → index-cjevq9s8.js} +2 -2
- package/dist/{index-c39197wq.js → index-ctcwrkrc.js} +4 -4
- package/dist/{index-yx52bt4a.js → index-cztmcesv.js} +2 -2
- package/dist/index-dpbmxnrf.js +564 -0
- package/dist/index-ekxdcy36.js +134 -0
- package/dist/index-f8zpcsx3.js +289 -0
- package/dist/{index-6dxrbnxm.js → index-f970qtb4.js} +7 -143
- package/dist/index-fatcn6fp.js +2791 -0
- package/dist/index-fbzykqxy.js +105 -0
- package/dist/{index-1265j7t2.js → index-fwf274vc.js} +24 -14
- package/dist/index-fy4w0a7v.js +0 -0
- package/dist/index-gvva3e5x.js +76 -0
- package/dist/index-h7dcah4p.js +137 -0
- package/dist/index-hm9r120s.js +42 -0
- package/dist/index-j3d2tw97.js +328 -0
- package/dist/index-jfqj20x8.js +41 -0
- package/dist/{index-hhrnrqfc.js → index-k529a278.js} +6 -6
- package/dist/{index-bt2p8x7r.js → index-kbrf5bx7.js} +110 -106
- package/dist/index-kwk23ktq.js +33 -0
- package/dist/index-kz857p1j.js +557 -0
- package/dist/{index-j466sekf.js → index-mkt5yrax.js} +31 -105
- package/dist/{index-nxmk6re7.js → index-ndgnvjez.js} +18 -18
- package/dist/index-nemn4epv.js +43 -0
- package/dist/index-nkwy5bjr.js +1225 -0
- package/dist/index-nvvzr4ny.js +136 -0
- package/dist/index-pkspzsfs.js +78 -0
- package/dist/{index-fm84men1.js → index-px1tnqgt.js} +2 -2
- package/dist/index-q7qdw883.js +79 -0
- package/dist/{index-mzydbzp8.js → index-qvbg6tx1.js} +65 -23
- package/dist/index-r3mwr5fb.js +0 -0
- package/dist/index-rdr78m0k.js +91 -0
- package/dist/index-rtamqsfs.js +59 -0
- package/dist/index-s125ss45.js +38 -0
- package/dist/{index-vn91b9z1.js → index-sx1t6dnd.js} +3721 -2382
- package/dist/index-tar0ngkm.js +359 -0
- package/dist/index-tn58cr6w.js +471 -0
- package/dist/{index-w0m1nckc.js → index-v79s9bf9.js} +118 -45
- package/dist/index-vk3rq21m.js +17 -0
- package/dist/index-vmvnr28y.js +72 -0
- package/dist/index-vz629cg8.js +49 -0
- package/dist/{index-eps3c3g6.js → index-w292hdpz.js} +197 -960
- package/dist/{index-amjttjaj.js → index-w9eqg6p9.js} +24 -302
- package/dist/index-wj96kdw2.js +57 -0
- package/dist/index-wyck5yhd.js +141 -0
- package/dist/index-xvtk8pxs.js +674 -0
- package/dist/{index-bpc596v3.js → index-xwb691v9.js} +2 -2
- package/dist/index-ym69x168.js +518 -0
- package/dist/index-yprdjk9v.js +65 -0
- package/dist/index-z2a81ccr.js +35 -0
- package/dist/{index-3ah1f369.js → index-z69cqk74.js} +3 -3
- package/dist/index-zaakvmzq.js +62 -0
- package/dist/index-zk3m4mzg.js +232 -0
- package/dist/index-zx3wgvx4.js +218 -0
- package/dist/index.js +102 -83
- package/dist/persistence/migration-guard.d.ts +3 -0
- package/dist/runtime/agent-profile.d.ts +12 -0
- package/dist/runtime/harness.d.ts +13 -0
- package/dist/runtime/known-file-preload.d.ts +35 -0
- package/dist/service-cli.js +130 -40
- package/dist/service-client-cli-2rzxy5mj.js +1166 -0
- package/dist/service-client-cli-5ne8q5ej.js +543 -0
- package/dist/tools/ooxml-zip.d.ts +21 -0
- package/dist/tools/presentations.d.ts +47 -0
- package/dist/tools/tabular-data.d.ts +114 -0
- package/dist/tools/workspace.d.ts +76 -0
- package/dist/verify-historical-migrations.js +2249 -1016
- package/dist/workspace/workspace.d.ts +13 -1
- package/dist/zhx.js +8 -6
- package/docs/APPLICATION_MIGRATION.md +32 -0
- package/docs/CLI.md +166 -2
- package/docs/CODE_RELEASE.md +11 -5
- package/docs/CODE_WEB_TASKS.md +3 -114
- package/docs/CONTEXT_ENGINEERING.md +93 -0
- package/docs/ENGINE_API.md +9 -2
- package/docs/EXTENSIBILITY.md +1 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/INTERNAL_ARCHIVE.md +43 -0
- package/docs/LOCAL_SERVICE.md +1 -1
- package/docs/MODEL_CATALOG.md +14 -0
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/README.md +23 -4
- package/evaluations/representative-assembly-matrix.json +19 -1
- package/examples/README.md +4 -4
- package/examples/assistant/compatible-calendar.json +17 -0
- package/examples/assistant/composed-modules.json +23 -0
- package/examples/assistant/connected-tools.json +9 -0
- package/examples/assistant/daily-tools.json +6 -0
- package/examples/assistant/offline.mjs +24 -0
- package/fixtures/cli-compatibility/README.md +10 -0
- package/fixtures/cli-compatibility/inventory.json +7858 -0
- package/package.json +232 -26
- package/dist/cli/console/console-model-catalog.d.ts +0 -8
- package/dist/index-2yyfg69h.js +0 -619
- package/dist/index-3wwfn5n6.js +0 -270
- package/dist/index-4gt045j0.js +0 -288
- package/dist/index-4jw3tvy8.js +0 -301
- package/dist/service-client-cli-xbj7j5kj.js +0 -1251
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import"./index-2n9qx4km.js";
|
|
1
2
|
import {
|
|
2
3
|
DEFAULT_APPROVAL_SUMMARY_CHARACTERS,
|
|
3
4
|
formatApproval,
|
|
@@ -6,7 +7,10 @@ import {
|
|
|
6
7
|
resolveTerminalApprovals,
|
|
7
8
|
sanitizeTerminalText,
|
|
8
9
|
terminalSupportsColor
|
|
9
|
-
} from "./index-
|
|
10
|
+
} from "./index-3rvk23e8.js";
|
|
11
|
+
import"./index-0kkgqvg7.js";
|
|
12
|
+
import"./index-dpbmxnrf.js";
|
|
13
|
+
import"./index-cjevq9s8.js";
|
|
10
14
|
import {
|
|
11
15
|
DEFAULT_TIME_TO_SAFE_FIX_GOAL,
|
|
12
16
|
TIME_TO_SAFE_FIX_CARRIERS,
|
|
@@ -18,6 +22,17 @@ import {
|
|
|
18
22
|
TIME_TO_SAFE_FIX_SCHEMA_VERSION,
|
|
19
23
|
cancelHarnessReviewGroup,
|
|
20
24
|
classifyTimeToSafeFixFailure,
|
|
25
|
+
createTimeToSafeFixCases,
|
|
26
|
+
createTimeToSafeFixReport,
|
|
27
|
+
createTimeToSafeFixSample,
|
|
28
|
+
injectTimeToSafeFixAttack,
|
|
29
|
+
inspectHarnessReviewGroup,
|
|
30
|
+
runHarnessDurableReviewGroup,
|
|
31
|
+
timeToSafeFixDriverResultSchema,
|
|
32
|
+
timeToSafeFixLatencyStatistics,
|
|
33
|
+
timeToSafeFixTaskSchema
|
|
34
|
+
} from "./index-w292hdpz.js";
|
|
35
|
+
import {
|
|
21
36
|
cliChangeEnvelopeVerificationDocumentSchema,
|
|
22
37
|
cliDoctorDocumentSchema,
|
|
23
38
|
cliErrorDocumentSchema,
|
|
@@ -40,19 +55,19 @@ import {
|
|
|
40
55
|
cliStateStatusDocumentSchema,
|
|
41
56
|
cliStreamErrorDocumentSchema,
|
|
42
57
|
cliStreamResultDocumentSchema,
|
|
43
|
-
createTimeToSafeFixCases,
|
|
44
|
-
createTimeToSafeFixReport,
|
|
45
|
-
createTimeToSafeFixSample,
|
|
46
|
-
injectTimeToSafeFixAttack,
|
|
47
|
-
inspectHarnessReviewGroup,
|
|
48
58
|
parseCliJsonDocument,
|
|
49
|
-
parseCliJsonLineDocument
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
parseCliJsonLineDocument
|
|
60
|
+
} from "./index-b4yed1s3.js";
|
|
61
|
+
import {
|
|
62
|
+
recoverHarnessLocalService,
|
|
63
|
+
startHarnessLocalService
|
|
64
|
+
} from "./index-j3d2tw97.js";
|
|
65
|
+
import {
|
|
66
|
+
recommendCompactionModels
|
|
67
|
+
} from "./index-nvvzr4ny.js";
|
|
68
|
+
import {
|
|
69
|
+
openHarnessActivityStore
|
|
70
|
+
} from "./index-f8zpcsx3.js";
|
|
56
71
|
import {
|
|
57
72
|
HARNESS_STATE_BACKUP_MAX_BYTES,
|
|
58
73
|
HARNESS_STATE_BACKUP_SCHEMA_VERSION,
|
|
@@ -63,7 +78,14 @@ import {
|
|
|
63
78
|
inspectHarnessState,
|
|
64
79
|
readHarnessStateBackup,
|
|
65
80
|
stateBackupBundleSchema
|
|
66
|
-
} from "./index-
|
|
81
|
+
} from "./index-2j0v1xwr.js";
|
|
82
|
+
import {
|
|
83
|
+
createAcpConnection,
|
|
84
|
+
serveAcpStdio
|
|
85
|
+
} from "./index-z69cqk74.js";
|
|
86
|
+
import {
|
|
87
|
+
createHarnessClientAdapter
|
|
88
|
+
} from "./index-mkt5yrax.js";
|
|
67
89
|
import {
|
|
68
90
|
CLI_COMMAND_OPTION_CONTRACTS,
|
|
69
91
|
CLI_OPTION_DEFINITIONS,
|
|
@@ -73,49 +95,12 @@ import {
|
|
|
73
95
|
resolveHarnessModelRoutes,
|
|
74
96
|
serializeHarnessModelRoutes,
|
|
75
97
|
validateCliCommandOptions
|
|
76
|
-
} from "./index-
|
|
77
|
-
import
|
|
78
|
-
|
|
79
|
-
serveAcpStdio
|
|
80
|
-
} from "./index-3ah1f369.js";
|
|
81
|
-
import {
|
|
82
|
-
CHANGE_ENVELOPE_DIGEST_ALGORITHM,
|
|
83
|
-
CHANGE_ENVELOPE_SCHEMA_VERSION,
|
|
84
|
-
MAX_CHANGE_ENVELOPE_APPROVALS,
|
|
85
|
-
MAX_CHANGE_ENVELOPE_APPROVAL_SCOPES,
|
|
86
|
-
MAX_CHANGE_ENVELOPE_ATTESTATIONS,
|
|
87
|
-
MAX_CHANGE_ENVELOPE_CHECKS,
|
|
88
|
-
canonicalizeChangeEnvelope,
|
|
89
|
-
changeEnvelopeApprovalSchema,
|
|
90
|
-
changeEnvelopeBaseSchema,
|
|
91
|
-
changeEnvelopeCheckSchema,
|
|
92
|
-
changeEnvelopeEvidenceSchema,
|
|
93
|
-
changeEnvelopeFingerprintsSchema,
|
|
94
|
-
changeEnvelopeInputSchema,
|
|
95
|
-
changeEnvelopePatchSchema,
|
|
96
|
-
changeEnvelopePreconditionsSchema,
|
|
97
|
-
changeEnvelopeSchema,
|
|
98
|
-
computeChangeEnvelopeDigest,
|
|
99
|
-
computeChangeEnvelopeEvidenceDigest,
|
|
100
|
-
createChangeEnvelope,
|
|
101
|
-
digestChangeEnvelopeArtifact,
|
|
102
|
-
externalAttestationReferenceSchema,
|
|
103
|
-
verifyChangeEnvelope
|
|
104
|
-
} from "./index-yx52bt4a.js";
|
|
105
|
-
import {
|
|
106
|
-
harnessLocalCredentialsSchema,
|
|
107
|
-
openHarnessActivityStore,
|
|
108
|
-
readHarnessLocalCredentials,
|
|
109
|
-
recoverHarnessLocalService,
|
|
110
|
-
requestHarnessLocalService,
|
|
111
|
-
startHarnessLocalService
|
|
112
|
-
} from "./index-2yyfg69h.js";
|
|
113
|
-
import {
|
|
114
|
-
createHarnessClientAdapter
|
|
115
|
-
} from "./index-j466sekf.js";
|
|
98
|
+
} from "./index-ay26xfxt.js";
|
|
99
|
+
import"./index-1z0xhkh9.js";
|
|
100
|
+
import"./index-q7qdw883.js";
|
|
116
101
|
import {
|
|
117
102
|
openWorkspaceCheckpointStore
|
|
118
|
-
} from "./index-
|
|
103
|
+
} from "./index-0dkty795.js";
|
|
119
104
|
import {
|
|
120
105
|
DEFAULT_HARNESS_CONTEXT_MANIFEST,
|
|
121
106
|
DEFAULT_HARNESS_PROJECT_INSTRUCTIONS,
|
|
@@ -154,7 +139,16 @@ import {
|
|
|
154
139
|
runHarness,
|
|
155
140
|
runHarnessReviewGroup,
|
|
156
141
|
selectHarnessModel
|
|
157
|
-
} from "./index-
|
|
142
|
+
} from "./index-sx1t6dnd.js";
|
|
143
|
+
import {
|
|
144
|
+
HARNESS_MCP_CONFIG_SCHEMA_VERSION,
|
|
145
|
+
HARNESS_MCP_PERMISSIONS,
|
|
146
|
+
createHarnessMcpTools,
|
|
147
|
+
createHttpMcpClient,
|
|
148
|
+
loadHarnessMcpConfiguration,
|
|
149
|
+
normalizeHarnessMcpConfiguration
|
|
150
|
+
} from "./index-k529a278.js";
|
|
151
|
+
import"./index-bw34861c.js";
|
|
158
152
|
import {
|
|
159
153
|
HARNESS_OPERATIONS_SCHEMA_VERSION,
|
|
160
154
|
HARNESS_SQLITE_FILE,
|
|
@@ -165,15 +159,7 @@ import {
|
|
|
165
159
|
listHarnessRuns,
|
|
166
160
|
migrateLegacyFileRuns,
|
|
167
161
|
openHarnessPersistence
|
|
168
|
-
} from "./index-
|
|
169
|
-
import {
|
|
170
|
-
HARNESS_MCP_CONFIG_SCHEMA_VERSION,
|
|
171
|
-
HARNESS_MCP_PERMISSIONS,
|
|
172
|
-
createHarnessMcpTools,
|
|
173
|
-
createHttpMcpClient,
|
|
174
|
-
loadHarnessMcpConfiguration,
|
|
175
|
-
normalizeHarnessMcpConfiguration
|
|
176
|
-
} from "./index-hhrnrqfc.js";
|
|
162
|
+
} from "./index-w9eqg6p9.js";
|
|
177
163
|
import {
|
|
178
164
|
CliOciRuntimeAdapter,
|
|
179
165
|
HARNESS_EXECUTION_ARTIFACT_SCHEMA_VERSION,
|
|
@@ -185,7 +171,7 @@ import {
|
|
|
185
171
|
describeOciCommand,
|
|
186
172
|
executionFingerprintInput,
|
|
187
173
|
harnessExecutionSession
|
|
188
|
-
} from "./index-
|
|
174
|
+
} from "./index-v79s9bf9.js";
|
|
189
175
|
import {
|
|
190
176
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
|
191
177
|
DEFAULT_ALLOWED_CHECKS,
|
|
@@ -210,14 +196,43 @@ import {
|
|
|
210
196
|
providerAvailability,
|
|
211
197
|
providerDescriptor,
|
|
212
198
|
resolveHarnessConfig
|
|
213
|
-
} from "./index-
|
|
214
|
-
import"./index-
|
|
215
|
-
import"./index-
|
|
199
|
+
} from "./index-fwf274vc.js";
|
|
200
|
+
import"./index-ctcwrkrc.js";
|
|
201
|
+
import"./index-qvbg6tx1.js";
|
|
202
|
+
import {
|
|
203
|
+
CHANGE_ENVELOPE_DIGEST_ALGORITHM,
|
|
204
|
+
CHANGE_ENVELOPE_SCHEMA_VERSION,
|
|
205
|
+
MAX_CHANGE_ENVELOPE_APPROVALS,
|
|
206
|
+
MAX_CHANGE_ENVELOPE_APPROVAL_SCOPES,
|
|
207
|
+
MAX_CHANGE_ENVELOPE_ATTESTATIONS,
|
|
208
|
+
MAX_CHANGE_ENVELOPE_CHECKS,
|
|
209
|
+
canonicalizeChangeEnvelope,
|
|
210
|
+
changeEnvelopeApprovalSchema,
|
|
211
|
+
changeEnvelopeBaseSchema,
|
|
212
|
+
changeEnvelopeCheckSchema,
|
|
213
|
+
changeEnvelopeEvidenceSchema,
|
|
214
|
+
changeEnvelopeFingerprintsSchema,
|
|
215
|
+
changeEnvelopeInputSchema,
|
|
216
|
+
changeEnvelopePatchSchema,
|
|
217
|
+
changeEnvelopePreconditionsSchema,
|
|
218
|
+
changeEnvelopeSchema,
|
|
219
|
+
computeChangeEnvelopeDigest,
|
|
220
|
+
computeChangeEnvelopeEvidenceDigest,
|
|
221
|
+
createChangeEnvelope,
|
|
222
|
+
digestChangeEnvelopeArtifact,
|
|
223
|
+
externalAttestationReferenceSchema,
|
|
224
|
+
verifyChangeEnvelope
|
|
225
|
+
} from "./index-cztmcesv.js";
|
|
216
226
|
import {
|
|
217
227
|
applyHarnessToolPolicy,
|
|
218
228
|
createHarnessToolPolicy,
|
|
219
229
|
harnessToolPolicySchema
|
|
220
|
-
} from "./index-
|
|
230
|
+
} from "./index-kbrf5bx7.js";
|
|
231
|
+
import {
|
|
232
|
+
BUN_ENGINE_RANGE,
|
|
233
|
+
HARNESS_VERSION,
|
|
234
|
+
NODE_ENGINE_RANGE
|
|
235
|
+
} from "./index-kwk23ktq.js";
|
|
221
236
|
import {
|
|
222
237
|
HARNESS_SESSION_INDEX_FILE,
|
|
223
238
|
HARNESS_SESSION_SCHEMA_VERSION,
|
|
@@ -226,12 +241,7 @@ import {
|
|
|
226
241
|
openCliSessionStore,
|
|
227
242
|
openSessionStore,
|
|
228
243
|
validateStateDirectory
|
|
229
|
-
} from "./index-
|
|
230
|
-
import {
|
|
231
|
-
BUN_ENGINE_RANGE,
|
|
232
|
-
HARNESS_VERSION,
|
|
233
|
-
NODE_ENGINE_RANGE
|
|
234
|
-
} from "./index-3wwfn5n6.js";
|
|
244
|
+
} from "./index-6ehtssyz.js";
|
|
235
245
|
import {
|
|
236
246
|
EDIT_CONTRACT_SCHEMA_VERSION,
|
|
237
247
|
EDIT_DIGEST_ALGORITHM,
|
|
@@ -254,18 +264,22 @@ import {
|
|
|
254
264
|
restoreFileInputSchema,
|
|
255
265
|
validateEditProposal,
|
|
256
266
|
workspaceFilePathSchema
|
|
257
|
-
} from "./index-
|
|
267
|
+
} from "./index-f970qtb4.js";
|
|
268
|
+
import"./index-h7dcah4p.js";
|
|
269
|
+
import {
|
|
270
|
+
harnessLocalCredentialsSchema,
|
|
271
|
+
readHarnessLocalCredentials,
|
|
272
|
+
requestHarnessLocalService
|
|
273
|
+
} from "./index-3wa4j0yk.js";
|
|
274
|
+
import"./index-rdr78m0k.js";
|
|
258
275
|
import {
|
|
259
276
|
CLI_EVENT_SCHEMA_VERSION,
|
|
260
277
|
CLI_JSON_SCHEMA_VERSION,
|
|
261
|
-
HARNESS_CLIENT_PROTOCOL_VERSION,
|
|
262
|
-
harnessClientCommandSchema,
|
|
263
|
-
harnessClientRequestSchema,
|
|
264
278
|
serializeStreamEvent,
|
|
265
279
|
serializeStreamResult,
|
|
266
280
|
streamEventDocument,
|
|
267
281
|
streamResultDocument
|
|
268
|
-
} from "./index-
|
|
282
|
+
} from "./index-5jxm2wy5.js";
|
|
269
283
|
import {
|
|
270
284
|
HARNESS_ERROR_CODES,
|
|
271
285
|
HARNESS_ERROR_SCHEMA_VERSION,
|
|
@@ -278,8 +292,13 @@ import {
|
|
|
278
292
|
HarnessWorkspaceError,
|
|
279
293
|
harnessErrorDocument,
|
|
280
294
|
normalizeHarnessError
|
|
281
|
-
} from "./index-
|
|
282
|
-
import"./index-
|
|
295
|
+
} from "./index-xwb691v9.js";
|
|
296
|
+
import"./index-px1tnqgt.js";
|
|
297
|
+
import {
|
|
298
|
+
HARNESS_CLIENT_PROTOCOL_VERSION,
|
|
299
|
+
harnessClientCommandSchema,
|
|
300
|
+
harnessClientRequestSchema
|
|
301
|
+
} from "./index-76kpdbpw.js";
|
|
283
302
|
import"./index-1bx83sw4.js";
|
|
284
303
|
export {
|
|
285
304
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Trusted host configuration. Profiles describe behavior, never grant permissions. */
|
|
3
|
+
export declare const harnessAgentProfileSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
version: z.ZodString;
|
|
6
|
+
instructions: z.ZodString;
|
|
7
|
+
toolNames: z.ZodArray<z.ZodString>;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type HarnessAgentProfile = z.infer<typeof harnessAgentProfileSchema>;
|
|
10
|
+
export declare const GENERAL_ASSISTANT_PROFILE: Readonly<Omit<HarnessAgentProfile, "toolNames"> & {
|
|
11
|
+
toolNames: readonly string[];
|
|
12
|
+
}>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type KnownFilePreload } from "./known-file-preload.js";
|
|
1
2
|
import { type TaskTelemetrySnapshot } from './task-telemetry.js';
|
|
2
3
|
import { type HarnessSharedBudgetOptions } from "./shared-budget.js";
|
|
3
4
|
import { createRequestMeasurements } from '../context/request-measurements.js';
|
|
5
|
+
import { createRequestProjection } from '../context/request-projection.js';
|
|
6
|
+
import { type HarnessAgentProfile } from "./agent-profile.js";
|
|
4
7
|
import { type HarnessIsolatedMcpSession } from '../integrations/mcp-host-session.js';
|
|
5
8
|
import { type HarnessDelegationContract } from "./delegation-contracts.js";
|
|
6
9
|
import { UsageLedger, type UsageAccountingOptions } from "./usage-ledger.js";
|
|
@@ -73,6 +76,7 @@ export interface ZhivexHarness {
|
|
|
73
76
|
close(): Promise<void>;
|
|
74
77
|
}
|
|
75
78
|
export interface HarnessRunDiagnostics {
|
|
79
|
+
readAttempts?: ReturnType<ReturnType<typeof createRequestProjection>["readAttempts"]>;
|
|
76
80
|
requireVerifiedDelivery: boolean;
|
|
77
81
|
requestMeasurements?: ReturnType<ReturnType<typeof createRequestMeasurements>["snapshot"]>;
|
|
78
82
|
approvalTimings?: {
|
|
@@ -110,6 +114,8 @@ export interface HarnessRunOptions {
|
|
|
110
114
|
}
|
|
111
115
|
/** Experimental Code host options; the Stable runHarness contract remains unchanged. */
|
|
112
116
|
export interface HarnessTaskRunOptions extends HarnessRunOptions {
|
|
117
|
+
/** Opt-in bounded file snapshots for new local runs; never grants read permissions. */
|
|
118
|
+
preloadFiles?: KnownFilePreload;
|
|
113
119
|
taskBudgetExisting?: boolean;
|
|
114
120
|
taskBudgetContinue?: boolean;
|
|
115
121
|
/** Trusted host consent binding, rechecked during durable admission. Never metadata or model input. */
|
|
@@ -127,6 +133,13 @@ export declare const runHarnessTask: (harness: ZhivexHarness, input: AgentRunInp
|
|
|
127
133
|
export declare const estimateMessageTokens: (messages: readonly ModelMessage[]) => number;
|
|
128
134
|
export declare const compactHarnessMessages: (messages: readonly ModelMessage[]) => ModelMessage[];
|
|
129
135
|
export declare const createHarness: (options?: CreateHarnessOptions) => Promise<ZhivexHarness>;
|
|
136
|
+
export interface CreateProfiledHarnessOptions extends CreateHarnessOptions {
|
|
137
|
+
agentProfile: Readonly<Omit<HarnessAgentProfile, "toolNames"> & {
|
|
138
|
+
toolNames: readonly string[];
|
|
139
|
+
}>;
|
|
140
|
+
}
|
|
141
|
+
/** Experimental additive host API; leaves the stable coding constructor unchanged. */
|
|
142
|
+
export declare const createProfiledHarness: (options: CreateProfiledHarnessOptions) => Promise<ZhivexHarness>;
|
|
130
143
|
export declare const runHarness: (harness: ZhivexHarness, input: AgentRunInput<LanguageModel>, options?: HarnessRunOptions) => Promise<AgentRunOutput>;
|
|
131
144
|
export declare const appendUserMessage: (messages: readonly ModelMessage[], text: string) => ModelMessage[];
|
|
132
145
|
export { createWorkspaceTools } from "../tools/workspace.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ToolSet, LanguageModel, ToolApprovalPolicy } from '@zhivex-ai/core';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
files: z.ZodArray<z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strict>>;
|
|
9
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
/** Explicit host-selected context. Limits may only reduce the workspace reader's limits. */
|
|
12
|
+
export type KnownFilePreload = z.infer<typeof schema>;
|
|
13
|
+
export declare const parseKnownFilePreload: (value: KnownFilePreload) => {
|
|
14
|
+
files: {
|
|
15
|
+
path: string;
|
|
16
|
+
startLine?: number | undefined;
|
|
17
|
+
endLine?: number | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
maxBytes?: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
export declare function readKnownFilePreload(options: KnownFilePreload, tools: ToolSet, model: LanguageModel, signal?: AbortSignal, approvalPolicy?: ToolApprovalPolicy): Promise<{
|
|
22
|
+
text: string;
|
|
23
|
+
receipt: {
|
|
24
|
+
schemaVersion: number;
|
|
25
|
+
toolName: string;
|
|
26
|
+
requests: {
|
|
27
|
+
path: string;
|
|
28
|
+
startLine?: number | undefined;
|
|
29
|
+
endLine?: number | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
bytes: number;
|
|
32
|
+
digest: string;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
export {};
|
package/dist/service-cli.js
CHANGED
|
@@ -1,31 +1,129 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import"./index-4mn6m3bq.js";
|
|
3
|
+
acquireApplicationCoordinator,
|
|
4
|
+
createProcessSecretStore,
|
|
5
|
+
runCredentialWorker
|
|
6
|
+
} from "./index-xvtk8pxs.js";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
8
|
+
startCodeHost
|
|
9
|
+
} from "./index-fatcn6fp.js";
|
|
10
|
+
import"./index-91trs3ew.js";
|
|
11
|
+
import"./index-vz629cg8.js";
|
|
12
|
+
import"./index-kz857p1j.js";
|
|
13
|
+
import"./index-wyck5yhd.js";
|
|
14
|
+
import"./index-gvva3e5x.js";
|
|
15
|
+
import"./index-8tjev5ds.js";
|
|
16
|
+
import"./index-yprdjk9v.js";
|
|
17
|
+
import"./index-abxahprd.js";
|
|
18
|
+
import"./index-jfqj20x8.js";
|
|
19
|
+
import"./index-c6fnjhgv.js";
|
|
20
|
+
import"./index-1e69ar8r.js";
|
|
21
|
+
import"./index-bb7phvtg.js";
|
|
22
|
+
import"./index-4vz4bqqw.js";
|
|
23
|
+
import"./index-bk5tn9b8.js";
|
|
24
|
+
import"./index-vmvnr28y.js";
|
|
25
|
+
import"./index-zk3m4mzg.js";
|
|
26
|
+
import"./index-ym69x168.js";
|
|
27
|
+
import"./index-5rk6ss42.js";
|
|
28
|
+
import"./index-zaakvmzq.js";
|
|
29
|
+
import"./index-z2a81ccr.js";
|
|
30
|
+
import"./index-aptyr511.js";
|
|
31
|
+
import"./index-zx3wgvx4.js";
|
|
32
|
+
import"./index-91n5wr6s.js";
|
|
33
|
+
import"./index-9y8p5vy5.js";
|
|
34
|
+
import"./index-tar0ngkm.js";
|
|
35
|
+
import"./index-rtamqsfs.js";
|
|
36
|
+
import"./index-ekxdcy36.js";
|
|
37
|
+
import"./index-wj96kdw2.js";
|
|
38
|
+
import"./index-2jw9jd7h.js";
|
|
39
|
+
import"./index-nemn4epv.js";
|
|
40
|
+
import"./index-8mx0yrkz.js";
|
|
41
|
+
import"./index-0csc5sc7.js";
|
|
42
|
+
import"./index-vk3rq21m.js";
|
|
43
|
+
import"./index-41q1k17x.js";
|
|
44
|
+
import"./index-fbzykqxy.js";
|
|
45
|
+
import"./index-2cef1k92.js";
|
|
46
|
+
import"./index-hm9r120s.js";
|
|
47
|
+
import"./index-r3mwr5fb.js";
|
|
48
|
+
import"./index-fy4w0a7v.js";
|
|
49
|
+
import"./index-pkspzsfs.js";
|
|
50
|
+
import"./index-w292hdpz.js";
|
|
51
|
+
import"./index-b4yed1s3.js";
|
|
52
|
+
import"./index-j3d2tw97.js";
|
|
53
|
+
import"./index-nvvzr4ny.js";
|
|
54
|
+
import"./index-f8zpcsx3.js";
|
|
55
|
+
import"./index-2j0v1xwr.js";
|
|
56
|
+
import"./index-z69cqk74.js";
|
|
57
|
+
import"./index-mkt5yrax.js";
|
|
58
|
+
import"./index-ay26xfxt.js";
|
|
59
|
+
import"./index-1z0xhkh9.js";
|
|
60
|
+
import"./index-q7qdw883.js";
|
|
61
|
+
import"./index-0dkty795.js";
|
|
62
|
+
import"./index-sx1t6dnd.js";
|
|
63
|
+
import"./index-k529a278.js";
|
|
64
|
+
import"./index-bw34861c.js";
|
|
65
|
+
import"./index-w9eqg6p9.js";
|
|
66
|
+
import"./index-v79s9bf9.js";
|
|
67
|
+
import"./index-fwf274vc.js";
|
|
68
|
+
import"./index-ctcwrkrc.js";
|
|
69
|
+
import"./index-qvbg6tx1.js";
|
|
70
|
+
import"./index-7nbmhmw5.js";
|
|
71
|
+
import"./index-cztmcesv.js";
|
|
72
|
+
import"./index-kbrf5bx7.js";
|
|
73
|
+
import"./index-kwk23ktq.js";
|
|
74
|
+
import"./index-6ehtssyz.js";
|
|
75
|
+
import"./index-f970qtb4.js";
|
|
76
|
+
import"./index-h7dcah4p.js";
|
|
77
|
+
import"./index-0mzz9axm.js";
|
|
78
|
+
import"./index-3wa4j0yk.js";
|
|
79
|
+
import"./index-rdr78m0k.js";
|
|
80
|
+
import"./index-5jxm2wy5.js";
|
|
81
|
+
import"./index-xwb691v9.js";
|
|
82
|
+
import"./index-px1tnqgt.js";
|
|
83
|
+
import"./index-76kpdbpw.js";
|
|
84
|
+
import {
|
|
85
|
+
__require
|
|
86
|
+
} from "./index-1bx83sw4.js";
|
|
87
|
+
|
|
88
|
+
// packages/core/src/application/coordinator-launcher.ts
|
|
89
|
+
import { mkdir, realpath } from "node:fs/promises";
|
|
90
|
+
async function launchApplicationCoordinator(directory) {
|
|
91
|
+
await mkdir(directory, { recursive: true, mode: 448 });
|
|
92
|
+
directory = await realpath(directory);
|
|
93
|
+
const secrets = await createProcessSecretStore(directory, { executable: process.execPath, entry: await realpath(process.argv[1]), args: ["--credential-worker"] });
|
|
94
|
+
const application = await acquireApplicationCoordinator(directory, { secrets });
|
|
95
|
+
process.stdout.write(JSON.stringify({ schemaVersion: 1, kind: "application-ready", directory, owned: application.ownsService }) + `
|
|
96
|
+
`);
|
|
97
|
+
if (application.ownsService) {
|
|
98
|
+
const stop = () => {
|
|
99
|
+
application.close().catch(() => {
|
|
100
|
+
process.stderr.write(`{"kind":"application-error","code":"APPLICATION_SHUTDOWN_FAILED"}
|
|
101
|
+
`);
|
|
102
|
+
process.exitCode = 1;
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
process.once("SIGINT", stop);
|
|
106
|
+
process.once("SIGTERM", stop);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
25
109
|
|
|
26
|
-
// src/service-cli.ts
|
|
110
|
+
// packages/core/src/service-cli.ts
|
|
27
111
|
var main = async () => {
|
|
28
112
|
const args = process.argv.slice(2);
|
|
113
|
+
if (args.length === 1 && args[0] === "--credential-worker") {
|
|
114
|
+
await runCredentialWorker(async (account) => {
|
|
115
|
+
const { AsyncEntry } = await import("@napi-rs/keyring");
|
|
116
|
+
const entry = new AsyncEntry("ai.zhivex.assistant", account, { linux: { store: "secret-service" } });
|
|
117
|
+
return { read: () => entry.getPassword(), write: (value) => entry.setPassword(value) };
|
|
118
|
+
});
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (args[0] === "--application-directory") {
|
|
122
|
+
if (args.length !== 2 || !args[1])
|
|
123
|
+
throw new Error("SERVICE_USAGE_INVALID");
|
|
124
|
+
await launchApplicationCoordinator(args[1]);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
29
127
|
const values = {};
|
|
30
128
|
let recover = false;
|
|
31
129
|
for (let i = 0;i < args.length; i++) {
|
|
@@ -40,26 +138,18 @@ var main = async () => {
|
|
|
40
138
|
}
|
|
41
139
|
if (!values["--workspace"] || !values["--directory"])
|
|
42
140
|
throw new Error("SERVICE_USAGE_INVALID");
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
if (recover)
|
|
46
|
-
await recoverHarnessLocalService(harness, values["--directory"]);
|
|
47
|
-
const service = await startHarnessLocalService(harness, { directory: values["--directory"] });
|
|
48
|
-
process.stdout.write(JSON.stringify({ schemaVersion: 1, kind: "service-ready", credentialsPath: service.credentialsPath }) + `
|
|
141
|
+
const service = await startCodeHost({ workspace: values["--workspace"], directory: values["--directory"], recover, engine: { ...values["--tool-policy"] ? { toolPolicyFile: values["--tool-policy"] } : {}, ...values["--provider"] ? { provider: values["--provider"] } : {}, ...values["--model"] ? { model: values["--model"] } : {} } });
|
|
142
|
+
process.stdout.write(JSON.stringify({ schemaVersion: 1, kind: "service-ready", credentialsPath: service.credentialsPath }) + `
|
|
49
143
|
`);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
144
|
+
const stop = () => {
|
|
145
|
+
service.close().catch(() => {
|
|
146
|
+
process.stderr.write(`{"kind":"service-error","code":"SERVICE_SHUTDOWN_FAILED"}
|
|
53
147
|
`);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} catch (e) {
|
|
60
|
-
await harness.close();
|
|
61
|
-
throw e;
|
|
62
|
-
}
|
|
148
|
+
process.exitCode = 1;
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
process.once("SIGINT", stop);
|
|
152
|
+
process.once("SIGTERM", stop);
|
|
63
153
|
};
|
|
64
154
|
main().catch(() => {
|
|
65
155
|
process.stderr.write(`{"kind":"service-error","code":"SERVICE_START_FAILED"}
|