@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
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// packages/core/src/models/compaction-recommendations.ts
|
|
2
|
+
import { recommendAuxiliaryModel } from "@zhivex-ai/core";
|
|
3
|
+
|
|
4
|
+
// packages/core/src/models/sdk-catalog-adapter.ts
|
|
5
|
+
import { createModelCatalog } from "@zhivex-ai/core";
|
|
6
|
+
function toSdkCompactionCatalog(catalog, inputTokens) {
|
|
7
|
+
const entries = catalog.providers.flatMap((provider) => provider.models.map((model) => {
|
|
8
|
+
const entry = { provider: provider.id, modelId: model.id };
|
|
9
|
+
const evidence = {};
|
|
10
|
+
const source = (value) => ({
|
|
11
|
+
source: value.sourceUrl,
|
|
12
|
+
sourceType: "primary",
|
|
13
|
+
verifiedAt: value.checkedAt
|
|
14
|
+
});
|
|
15
|
+
if (model.limits) {
|
|
16
|
+
entry.contextWindowTokens = model.limits.contextWindowTokens;
|
|
17
|
+
entry.contextWindowType = model.limits.contextWindowType;
|
|
18
|
+
entry.maxOutputTokens = model.limits.maxOutputTokens;
|
|
19
|
+
const proof = source(model.limits.evidence);
|
|
20
|
+
evidence.contextWindowTokens = proof;
|
|
21
|
+
evidence.contextWindowType = proof;
|
|
22
|
+
evidence.maxOutputTokens = proof;
|
|
23
|
+
if (model.limits.maxInputTokens !== undefined) {
|
|
24
|
+
entry.maxInputTokens = model.limits.maxInputTokens;
|
|
25
|
+
evidence.maxInputTokens = proof;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (model.pricing && (model.pricing.maxInputTokens === undefined || inputTokens <= model.pricing.maxInputTokens)) {
|
|
29
|
+
entry.inputCostPer1kTokens = model.pricing.inputPerMillionTokens / 1000;
|
|
30
|
+
entry.outputCostPer1kTokens = model.pricing.outputPerMillionTokens / 1000;
|
|
31
|
+
evidence.inputCostPer1kTokens = source(model.pricing.evidence);
|
|
32
|
+
evidence.outputCostPer1kTokens = source(model.pricing.evidence);
|
|
33
|
+
}
|
|
34
|
+
if (model.compaction?.suitability === "candidate" || model.compaction?.suitability === "evaluated") {
|
|
35
|
+
entry.compaction = { status: "candidate" };
|
|
36
|
+
}
|
|
37
|
+
entry.evidence = evidence;
|
|
38
|
+
return entry;
|
|
39
|
+
}));
|
|
40
|
+
return createModelCatalog(entries, {
|
|
41
|
+
snapshotVersion: catalog.revision,
|
|
42
|
+
policy: { data: "rolling", updates: "catalog-replacement" },
|
|
43
|
+
pricing: { version: catalog.revision, currency: "USD", unit: "per_1k_tokens" }
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// packages/core/src/models/compaction-recommendations.ts
|
|
48
|
+
function recommendCompactionModels(catalog, request) {
|
|
49
|
+
for (const value of [request.inputTokens, request.outputTokens]) {
|
|
50
|
+
if (!Number.isSafeInteger(value) || value <= 0)
|
|
51
|
+
throw new Error("INVALID_COMPACTION_TOKEN_ESTIMATE");
|
|
52
|
+
}
|
|
53
|
+
const now = request.now ?? Date.now();
|
|
54
|
+
const days = request.maxEvidenceAgeDays ?? 90;
|
|
55
|
+
if (!Number.isFinite(now) || !Number.isFinite(days) || days < 0)
|
|
56
|
+
throw new Error("INVALID_RECOMMENDATION_CLOCK");
|
|
57
|
+
const fresh = (date) => {
|
|
58
|
+
const age = now - Date.parse(`${date}T00:00:00Z`);
|
|
59
|
+
return age >= 0 && age <= days * 86400000;
|
|
60
|
+
};
|
|
61
|
+
const models = catalog.providers.find((p) => p.id === request.provider)?.models ?? [];
|
|
62
|
+
const advice = recommendAuxiliaryModel({
|
|
63
|
+
catalog: toSdkCompactionCatalog(catalog, request.inputTokens),
|
|
64
|
+
routes: models.map((model) => ({
|
|
65
|
+
provider: request.provider,
|
|
66
|
+
modelId: model.id,
|
|
67
|
+
available: !request.availableModels || request.availableModels.includes(model.id),
|
|
68
|
+
credentialsAvailable: true
|
|
69
|
+
})),
|
|
70
|
+
inputTokens: request.inputTokens,
|
|
71
|
+
outputTokens: request.outputTokens,
|
|
72
|
+
now: new Date(now).toISOString(),
|
|
73
|
+
maxEvidenceAgeMs: days * 86400000
|
|
74
|
+
});
|
|
75
|
+
const sdkCandidates = new Map(advice.candidates.map((candidate) => [candidate.modelId, candidate]));
|
|
76
|
+
const assessments = models.map((model) => {
|
|
77
|
+
const assessment = sdkCandidates.get(model.id);
|
|
78
|
+
const reasons = [];
|
|
79
|
+
const warnings = [];
|
|
80
|
+
for (const exclusion of assessment.exclusions) {
|
|
81
|
+
const mapped = {
|
|
82
|
+
route_unavailable: "not_available",
|
|
83
|
+
input_limit_exceeded: "input_limit_too_small",
|
|
84
|
+
context_window_exceeded: "context_too_small",
|
|
85
|
+
output_limit_exceeded: "output_limit_too_small",
|
|
86
|
+
compaction_not_curated: model.compaction?.suitability === "unsuitable" ? "compaction_unsuitable" : "compaction_suitability_unknown"
|
|
87
|
+
};
|
|
88
|
+
reasons.push(mapped[exclusion] ?? (exclusion.endsWith("unknown_stale_or_conditional") ? model.limits ? "token_limits_stale" : "token_limits_unknown" : exclusion));
|
|
89
|
+
}
|
|
90
|
+
if (model.lifecycle === "retired" || model.lifecycle === "deprecated")
|
|
91
|
+
reasons.push(model.lifecycle);
|
|
92
|
+
if (model.lifecycle === "unknown")
|
|
93
|
+
warnings.push("lifecycle_unknown");
|
|
94
|
+
if (model.validation !== "verified")
|
|
95
|
+
warnings.push("route_unverified");
|
|
96
|
+
if (!model.capabilities.includes("chat"))
|
|
97
|
+
reasons.push("chat_capability_unknown");
|
|
98
|
+
if (model.compaction && ["candidate", "evaluated"].includes(model.compaction.suitability)) {
|
|
99
|
+
if (!fresh(model.compaction.evidence.checkedAt))
|
|
100
|
+
reasons.push("compaction_evidence_stale");
|
|
101
|
+
warnings.push("compaction_quality_not_evaluated");
|
|
102
|
+
if (model.compaction.suitability === "evaluated")
|
|
103
|
+
warnings.push("compaction_evaluation_evidence_missing");
|
|
104
|
+
}
|
|
105
|
+
const pricing = model.pricing;
|
|
106
|
+
if (!pricing)
|
|
107
|
+
warnings.push("pricing_unknown");
|
|
108
|
+
else if (!fresh(pricing.evidence.checkedAt))
|
|
109
|
+
warnings.push("pricing_stale");
|
|
110
|
+
else if (pricing.maxInputTokens && request.inputTokens > pricing.maxInputTokens)
|
|
111
|
+
warnings.push("pricing_tier_unknown");
|
|
112
|
+
else if (assessment.estimatedCost === undefined)
|
|
113
|
+
warnings.push("pricing_unknown");
|
|
114
|
+
return {
|
|
115
|
+
model,
|
|
116
|
+
eligible: reasons.length === 0,
|
|
117
|
+
reasons: [...new Set(reasons)],
|
|
118
|
+
warnings,
|
|
119
|
+
...assessment.estimatedCost === undefined ? {} : { estimatedCostUsd: assessment.estimatedCost }
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
const candidates = assessments.filter((m) => m.eligible).sort((a, b) => {
|
|
123
|
+
if (a.estimatedCostUsd !== undefined && b.estimatedCostUsd !== undefined && a.estimatedCostUsd !== b.estimatedCostUsd)
|
|
124
|
+
return a.estimatedCostUsd - b.estimatedCostUsd;
|
|
125
|
+
if (a.estimatedCostUsd === undefined !== (b.estimatedCostUsd === undefined))
|
|
126
|
+
return a.estimatedCostUsd === undefined ? 1 : -1;
|
|
127
|
+
return a.model.order - b.model.order || a.model.id.localeCompare(b.model.id);
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
...candidates[0] ? { recommendedModel: candidates[0].model.id } : {},
|
|
131
|
+
candidates,
|
|
132
|
+
excluded: assessments.filter((m) => !m.eligible)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { recommendCompactionModels };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openHarnessProjectMemory
|
|
3
|
+
} from "./index-bw34861c.js";
|
|
4
|
+
import {
|
|
5
|
+
HarnessConfigError
|
|
6
|
+
} from "./index-xwb691v9.js";
|
|
7
|
+
|
|
8
|
+
// packages/core/src/persistence/project-memory-command.ts
|
|
9
|
+
var HARNESS_MEMORY_COMMANDS = ["remember", "list", "read", "update", "forget", "suggest", "accept", "clear", "enable", "disable", "context"];
|
|
10
|
+
async function executeHarnessMemoryCommand(options, command, args, source = "Explicit operator input") {
|
|
11
|
+
const counts = {
|
|
12
|
+
remember: 1,
|
|
13
|
+
list: 0,
|
|
14
|
+
read: 1,
|
|
15
|
+
update: 3,
|
|
16
|
+
forget: 2,
|
|
17
|
+
suggest: 1,
|
|
18
|
+
accept: 2,
|
|
19
|
+
clear: 0,
|
|
20
|
+
enable: 0,
|
|
21
|
+
disable: 0,
|
|
22
|
+
context: 1
|
|
23
|
+
};
|
|
24
|
+
if (!Object.hasOwn(counts, command) || args.length !== counts[command])
|
|
25
|
+
throw new HarnessConfigError("Invalid memory command arguments. Use memory --help.");
|
|
26
|
+
const memory = await openHarnessProjectMemory(options);
|
|
27
|
+
try {
|
|
28
|
+
let result;
|
|
29
|
+
switch (command) {
|
|
30
|
+
case "list":
|
|
31
|
+
result = memory.list();
|
|
32
|
+
break;
|
|
33
|
+
case "read":
|
|
34
|
+
result = memory.read(args[0]);
|
|
35
|
+
break;
|
|
36
|
+
case "remember":
|
|
37
|
+
result = memory.remember({ content: args[0], source });
|
|
38
|
+
break;
|
|
39
|
+
case "suggest":
|
|
40
|
+
result = memory.suggest({ content: args[0], source });
|
|
41
|
+
break;
|
|
42
|
+
case "update":
|
|
43
|
+
result = memory.update(args[0], Number(args[1]), { content: args[2], source });
|
|
44
|
+
break;
|
|
45
|
+
case "accept":
|
|
46
|
+
result = memory.accept(args[0], Number(args[1]));
|
|
47
|
+
break;
|
|
48
|
+
case "forget":
|
|
49
|
+
memory.forget(args[0], Number(args[1]));
|
|
50
|
+
result = { forgotten: args[0] };
|
|
51
|
+
break;
|
|
52
|
+
case "clear":
|
|
53
|
+
result = { cleared: memory.clear() };
|
|
54
|
+
break;
|
|
55
|
+
case "enable":
|
|
56
|
+
case "disable":
|
|
57
|
+
memory.setEnabled(command === "enable");
|
|
58
|
+
result = { enabled: command === "enable" };
|
|
59
|
+
break;
|
|
60
|
+
case "context":
|
|
61
|
+
result = memory.retrieve(args[0]);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
const view = memory.list();
|
|
65
|
+
return {
|
|
66
|
+
schemaVersion: 1,
|
|
67
|
+
kind: "memory-command",
|
|
68
|
+
command,
|
|
69
|
+
workspaceKey: view.workspaceKey,
|
|
70
|
+
scopeKey: view.scopeKey,
|
|
71
|
+
result
|
|
72
|
+
};
|
|
73
|
+
} finally {
|
|
74
|
+
memory.close();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { HARNESS_MEMORY_COMMANDS, executeHarnessMemoryCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/runtime/provider-diagnostics.ts
|
|
1
|
+
// packages/core/src/runtime/provider-diagnostics.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var providerDiagnosticSchema = z.strictObject({
|
|
4
4
|
reason: z.enum(["previous_response_unavailable", "context_length_exceeded", "authentication", "payment_required", "permission", "rate_limit", "model_unavailable", "invalid_request", "server_error", "unknown"]),
|
|
@@ -41,7 +41,7 @@ function providerDiagnostic(body, status) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
// src/runtime/provider-transient.ts
|
|
44
|
+
// packages/core/src/runtime/provider-transient.ts
|
|
45
45
|
var PROVIDER_STATUS_CATEGORIES = [
|
|
46
46
|
"ABORTED",
|
|
47
47
|
"RESOURCE_EXHAUSTED",
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import {
|
|
2
|
+
checkEvidence
|
|
3
|
+
} from "./index-sx1t6dnd.js";
|
|
4
|
+
import {
|
|
5
|
+
USAGE_LEDGER_KEY,
|
|
6
|
+
inspectUsageLedger
|
|
7
|
+
} from "./index-6ehtssyz.js";
|
|
8
|
+
import {
|
|
9
|
+
CLI_JSON_SCHEMA_VERSION
|
|
10
|
+
} from "./index-5jxm2wy5.js";
|
|
11
|
+
|
|
12
|
+
// packages/core/src/client/run-document.ts
|
|
13
|
+
import { getAgentBudgetStatus } from "@zhivex-ai/agents";
|
|
14
|
+
import { estimateAgentRunCost } from "@zhivex-ai/agents/ops";
|
|
15
|
+
var costPricing = (harness) => harness.config.costBudget ? {
|
|
16
|
+
inputCostPer1kTokens: harness.config.costBudget.inputCostPer1kTokens,
|
|
17
|
+
outputCostPer1kTokens: harness.config.costBudget.outputCostPer1kTokens,
|
|
18
|
+
currency: "USD"
|
|
19
|
+
} : undefined;
|
|
20
|
+
var runResultDocument = (result, harness) => ({
|
|
21
|
+
schemaVersion: CLI_JSON_SCHEMA_VERSION,
|
|
22
|
+
kind: "run-result",
|
|
23
|
+
runId: result.state.runId,
|
|
24
|
+
status: result.status,
|
|
25
|
+
provider: result.state.provider,
|
|
26
|
+
model: result.state.modelId,
|
|
27
|
+
output: result.outputText,
|
|
28
|
+
steps: result.steps.length,
|
|
29
|
+
toolCalls: result.toolResults.length,
|
|
30
|
+
verification: checkEvidence(result.toolResults),
|
|
31
|
+
mutations: harness.workspace.mutationAudit(),
|
|
32
|
+
pendingApprovals: result.state.pendingApprovals.map((approval) => ({
|
|
33
|
+
id: approval.id,
|
|
34
|
+
kind: approval.kind ?? "provider",
|
|
35
|
+
name: approval.name,
|
|
36
|
+
arguments: approval.arguments,
|
|
37
|
+
...approval.childRunId ? { childRunId: approval.childRunId } : {},
|
|
38
|
+
...approval.childAgentId ? { childAgentId: approval.childAgentId } : {}
|
|
39
|
+
})),
|
|
40
|
+
children: (result.state.childRuns ?? []).map((child) => ({
|
|
41
|
+
runId: child.runId,
|
|
42
|
+
agentId: child.agentId,
|
|
43
|
+
toolName: child.toolName,
|
|
44
|
+
status: child.status,
|
|
45
|
+
steps: child.steps,
|
|
46
|
+
toolCalls: child.toolCalls,
|
|
47
|
+
toolErrors: child.toolErrors,
|
|
48
|
+
usage: child.usage
|
|
49
|
+
})),
|
|
50
|
+
usage: result.usage,
|
|
51
|
+
...result.state.metadata?.[USAGE_LEDGER_KEY] ? { usageLedger: inspectUsageLedger(result.state.metadata[USAGE_LEDGER_KEY]) } : {},
|
|
52
|
+
budget: getAgentBudgetStatus(result.state, harness.config.budget, result),
|
|
53
|
+
...harness.config.costBudget ? {
|
|
54
|
+
costBudget: {
|
|
55
|
+
limitUsd: harness.config.costBudget.maxCostUsd,
|
|
56
|
+
estimate: estimateAgentRunCost(result.state, costPricing(harness))
|
|
57
|
+
}
|
|
58
|
+
} : {},
|
|
59
|
+
scope: result.state.scope,
|
|
60
|
+
capabilities: harness.capabilities,
|
|
61
|
+
orchestration: {
|
|
62
|
+
profiles: harness.config.orchestration.profiles,
|
|
63
|
+
childBudget: harness.config.orchestration.childBudget,
|
|
64
|
+
mcpServers: harness.mcpConfiguration.servers.map((server) => server.name)
|
|
65
|
+
},
|
|
66
|
+
execution: harness.executionEnvironment ? {
|
|
67
|
+
backend: "oci",
|
|
68
|
+
binding: result.state.executionEnvironment,
|
|
69
|
+
image: harness.executionEnvironment.image
|
|
70
|
+
} : { backend: "none" },
|
|
71
|
+
store: {
|
|
72
|
+
backend: harness.config.storeBackend,
|
|
73
|
+
stateDirectory: harness.config.stateDirectory,
|
|
74
|
+
migration: harness.persistence?.migration
|
|
75
|
+
},
|
|
76
|
+
stateDirectory: harness.config.stateDirectory
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export { runResultDocument };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// src/models/catalog.ts
|
|
1
|
+
// packages/core/src/models/catalog.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
// src/models/catalog.json
|
|
3
|
+
// packages/core/src/models/catalog.json
|
|
4
4
|
var catalog_default = {
|
|
5
5
|
schemaVersion: 1,
|
|
6
|
-
revision: "2026-
|
|
6
|
+
revision: "2026-11-16-qwen4-max",
|
|
7
7
|
providers: [
|
|
8
8
|
{
|
|
9
9
|
id: "openai",
|
|
@@ -256,11 +256,35 @@ var catalog_default = {
|
|
|
256
256
|
id: "qwen",
|
|
257
257
|
defaultModel: "qwen3.8-max",
|
|
258
258
|
models: [
|
|
259
|
+
{
|
|
260
|
+
id: "qwen4-max",
|
|
261
|
+
name: "Qwen4 Max",
|
|
262
|
+
group: "primary",
|
|
263
|
+
order: 0,
|
|
264
|
+
lifecycle: "active",
|
|
265
|
+
validation: "verified",
|
|
266
|
+
capabilities: [
|
|
267
|
+
"chat",
|
|
268
|
+
"tools",
|
|
269
|
+
"vision"
|
|
270
|
+
],
|
|
271
|
+
limits: {
|
|
272
|
+
contextWindowTokens: 1e6,
|
|
273
|
+
contextWindowType: "combined",
|
|
274
|
+
maxOutputTokens: 131072,
|
|
275
|
+
maxInputTokens: 983616,
|
|
276
|
+
evidence: {
|
|
277
|
+
sourceUrl: "https://docs.qwencloud.com/developer-guides/getting-started/latest-model",
|
|
278
|
+
checkedAt: "2026-11-16"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
reason: "Live chat, tools and streaming validated on 2026-11-16 with the configured account via CLI and Electron provider runtimes. Other routes require validation. Conservative output cap supports both thinking modes."
|
|
282
|
+
},
|
|
259
283
|
{
|
|
260
284
|
id: "qwen3.8-flash",
|
|
261
285
|
name: "qwen3.8-flash",
|
|
262
286
|
group: "primary",
|
|
263
|
-
order:
|
|
287
|
+
order: 1,
|
|
264
288
|
lifecycle: "unknown",
|
|
265
289
|
validation: "unverified",
|
|
266
290
|
capabilities: [
|
|
@@ -290,7 +314,7 @@ var catalog_default = {
|
|
|
290
314
|
id: "qwen3.8-max",
|
|
291
315
|
name: "qwen3.8-max",
|
|
292
316
|
group: "primary",
|
|
293
|
-
order:
|
|
317
|
+
order: 2,
|
|
294
318
|
lifecycle: "unknown",
|
|
295
319
|
validation: "unverified",
|
|
296
320
|
capabilities: [
|
|
@@ -320,7 +344,7 @@ var catalog_default = {
|
|
|
320
344
|
id: "glm-5.3",
|
|
321
345
|
name: "GLM 5.3",
|
|
322
346
|
group: "primary",
|
|
323
|
-
order:
|
|
347
|
+
order: 3,
|
|
324
348
|
lifecycle: "active",
|
|
325
349
|
validation: "unverified",
|
|
326
350
|
capabilities: [
|
|
@@ -333,7 +357,7 @@ var catalog_default = {
|
|
|
333
357
|
id: "deepseek-v4.1-flash",
|
|
334
358
|
name: "DeepSeek V4.1 Flash",
|
|
335
359
|
group: "primary",
|
|
336
|
-
order:
|
|
360
|
+
order: 4,
|
|
337
361
|
lifecycle: "active",
|
|
338
362
|
validation: "unverified",
|
|
339
363
|
capabilities: [
|
|
@@ -347,7 +371,7 @@ var catalog_default = {
|
|
|
347
371
|
id: "kimi-k3",
|
|
348
372
|
name: "Kimi K3",
|
|
349
373
|
group: "primary",
|
|
350
|
-
order:
|
|
374
|
+
order: 5,
|
|
351
375
|
lifecycle: "active",
|
|
352
376
|
validation: "unverified",
|
|
353
377
|
capabilities: [
|
|
@@ -361,7 +385,7 @@ var catalog_default = {
|
|
|
361
385
|
id: "qwen3.7-plus",
|
|
362
386
|
name: "qwen3.7-plus",
|
|
363
387
|
group: "primary",
|
|
364
|
-
order:
|
|
388
|
+
order: 6,
|
|
365
389
|
lifecycle: "unknown",
|
|
366
390
|
validation: "unverified",
|
|
367
391
|
capabilities: [
|
|
@@ -373,7 +397,7 @@ var catalog_default = {
|
|
|
373
397
|
id: "qwen3.8-omni-flash",
|
|
374
398
|
name: "qwen3.8-omni-flash",
|
|
375
399
|
group: "other",
|
|
376
|
-
order:
|
|
400
|
+
order: 7,
|
|
377
401
|
lifecycle: "unknown",
|
|
378
402
|
validation: "unverified",
|
|
379
403
|
capabilities: [
|
|
@@ -385,7 +409,7 @@ var catalog_default = {
|
|
|
385
409
|
id: "qwen3.8-max-0902",
|
|
386
410
|
name: "qwen3.8-max-0902",
|
|
387
411
|
group: "other",
|
|
388
|
-
order:
|
|
412
|
+
order: 8,
|
|
389
413
|
lifecycle: "unknown",
|
|
390
414
|
validation: "unverified",
|
|
391
415
|
capabilities: [
|
|
@@ -397,7 +421,7 @@ var catalog_default = {
|
|
|
397
421
|
id: "qwen3.8-max-preview",
|
|
398
422
|
name: "qwen3.8-max-preview",
|
|
399
423
|
group: "other",
|
|
400
|
-
order:
|
|
424
|
+
order: 9,
|
|
401
425
|
lifecycle: "unknown",
|
|
402
426
|
validation: "unverified",
|
|
403
427
|
capabilities: [
|
|
@@ -409,7 +433,7 @@ var catalog_default = {
|
|
|
409
433
|
id: "qwen3.7-max",
|
|
410
434
|
name: "qwen3.7-max",
|
|
411
435
|
group: "other",
|
|
412
|
-
order:
|
|
436
|
+
order: 10,
|
|
413
437
|
lifecycle: "unknown",
|
|
414
438
|
validation: "unverified",
|
|
415
439
|
capabilities: [
|
|
@@ -421,7 +445,7 @@ var catalog_default = {
|
|
|
421
445
|
id: "qwen3.6-flash",
|
|
422
446
|
name: "qwen3.6-flash",
|
|
423
447
|
group: "other",
|
|
424
|
-
order:
|
|
448
|
+
order: 11,
|
|
425
449
|
lifecycle: "unknown",
|
|
426
450
|
validation: "unverified",
|
|
427
451
|
capabilities: [
|
|
@@ -433,7 +457,7 @@ var catalog_default = {
|
|
|
433
457
|
id: "qwen3.5-omni-plus",
|
|
434
458
|
name: "qwen3.5-omni-plus",
|
|
435
459
|
group: "other",
|
|
436
|
-
order:
|
|
460
|
+
order: 12,
|
|
437
461
|
lifecycle: "unknown",
|
|
438
462
|
validation: "unverified",
|
|
439
463
|
capabilities: [
|
|
@@ -445,7 +469,7 @@ var catalog_default = {
|
|
|
445
469
|
id: "qwen-plus",
|
|
446
470
|
name: "qwen-plus",
|
|
447
471
|
group: "other",
|
|
448
|
-
order:
|
|
472
|
+
order: 13,
|
|
449
473
|
lifecycle: "unknown",
|
|
450
474
|
validation: "unverified",
|
|
451
475
|
capabilities: [
|
|
@@ -780,7 +804,10 @@ var catalog_default = {
|
|
|
780
804
|
order: 0,
|
|
781
805
|
lifecycle: "unknown",
|
|
782
806
|
validation: "unverified",
|
|
783
|
-
capabilities: [
|
|
807
|
+
capabilities: [
|
|
808
|
+
"chat",
|
|
809
|
+
"tools"
|
|
810
|
+
],
|
|
784
811
|
reason: "Provisional Bedrock Converse route. Account access, region, and live Harness certification are not verified. No prices or context limits are inferred."
|
|
785
812
|
},
|
|
786
813
|
{
|
|
@@ -790,7 +817,10 @@ var catalog_default = {
|
|
|
790
817
|
order: 1,
|
|
791
818
|
lifecycle: "unknown",
|
|
792
819
|
validation: "unverified",
|
|
793
|
-
capabilities: [
|
|
820
|
+
capabilities: [
|
|
821
|
+
"chat",
|
|
822
|
+
"tools"
|
|
823
|
+
],
|
|
794
824
|
reason: "Provisional Bedrock model id. Availability depends on the account and region. No live certification."
|
|
795
825
|
},
|
|
796
826
|
{
|
|
@@ -800,7 +830,10 @@ var catalog_default = {
|
|
|
800
830
|
order: 2,
|
|
801
831
|
lifecycle: "unknown",
|
|
802
832
|
validation: "unverified",
|
|
803
|
-
capabilities: [
|
|
833
|
+
capabilities: [
|
|
834
|
+
"chat",
|
|
835
|
+
"tools"
|
|
836
|
+
],
|
|
804
837
|
reason: "Provisional Bedrock model id. Availability depends on the account and region. No live certification."
|
|
805
838
|
}
|
|
806
839
|
]
|
|
@@ -816,7 +849,10 @@ var catalog_default = {
|
|
|
816
849
|
order: 0,
|
|
817
850
|
lifecycle: "unknown",
|
|
818
851
|
validation: "unverified",
|
|
819
|
-
capabilities: [
|
|
852
|
+
capabilities: [
|
|
853
|
+
"chat",
|
|
854
|
+
"tools"
|
|
855
|
+
],
|
|
820
856
|
reason: "Provisional Azure OpenAI route. Deployment name, API version, and live Harness certification are not verified. No prices are copied from the OpenAI API."
|
|
821
857
|
},
|
|
822
858
|
{
|
|
@@ -826,7 +862,10 @@ var catalog_default = {
|
|
|
826
862
|
order: 1,
|
|
827
863
|
lifecycle: "unknown",
|
|
828
864
|
validation: "unverified",
|
|
829
|
-
capabilities: [
|
|
865
|
+
capabilities: [
|
|
866
|
+
"chat",
|
|
867
|
+
"tools"
|
|
868
|
+
],
|
|
830
869
|
reason: "Provisional Azure OpenAI model id. Use AZURE_OPENAI_DEPLOYMENTS when the deployment name differs. No live certification."
|
|
831
870
|
},
|
|
832
871
|
{
|
|
@@ -836,7 +875,10 @@ var catalog_default = {
|
|
|
836
875
|
order: 2,
|
|
837
876
|
lifecycle: "unknown",
|
|
838
877
|
validation: "unverified",
|
|
839
|
-
capabilities: [
|
|
878
|
+
capabilities: [
|
|
879
|
+
"chat",
|
|
880
|
+
"tools"
|
|
881
|
+
],
|
|
840
882
|
reason: "Provisional Azure OpenAI model id. Account rollout and deployment availability are not verified. No live certification."
|
|
841
883
|
}
|
|
842
884
|
]
|
|
@@ -844,7 +886,7 @@ var catalog_default = {
|
|
|
844
886
|
]
|
|
845
887
|
};
|
|
846
888
|
|
|
847
|
-
// src/models/catalog.ts
|
|
889
|
+
// packages/core/src/models/catalog.ts
|
|
848
890
|
var modelId = z.string().min(1).max(160).regex(/^[a-zA-Z0-9][a-zA-Z0-9._:/-]*$/);
|
|
849
891
|
var text = z.string().min(1).max(300).regex(/^[^\x00-\x1f\x7f-\x9f]*$/);
|
|
850
892
|
var evidence = z.object({
|
|
File without changes
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// packages/core/src/client/task-projection.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var HARNESS_TASK_PROJECTION_VERSION = 1;
|
|
4
|
+
var id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
5
|
+
var count = z.number().int().nonnegative().safe();
|
|
6
|
+
var digest = z.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
7
|
+
var text = z.string().max(2048);
|
|
8
|
+
var tokens = z.strictObject({ inputTokens: count, outputTokens: count, totalTokens: count });
|
|
9
|
+
var harnessTaskProjectionSchema = z.strictObject({
|
|
10
|
+
schemaVersion: z.literal(1),
|
|
11
|
+
connectionId: id,
|
|
12
|
+
sequence: count,
|
|
13
|
+
projectId: id,
|
|
14
|
+
sessionId: id,
|
|
15
|
+
runId: id,
|
|
16
|
+
task: z.strictObject({
|
|
17
|
+
reference: digest,
|
|
18
|
+
contractRevision: count,
|
|
19
|
+
contractDigest: digest,
|
|
20
|
+
runRevision: count,
|
|
21
|
+
objective: text.nullable(),
|
|
22
|
+
objectiveSource: z.enum(["operator_brief", "retained_operator_source", "unavailable"]),
|
|
23
|
+
observedRunId: id,
|
|
24
|
+
historicalRequest: z.boolean(),
|
|
25
|
+
execution: z.enum(["created", "queued", "running", "waiting_approval", "cancel_requested", "completed", "failed", "cancelled", "timed_out", "unknown"]),
|
|
26
|
+
artifact: z.strictObject({
|
|
27
|
+
observedDigest: digest.nullable(),
|
|
28
|
+
deliveredDigest: digest.nullable(),
|
|
29
|
+
correspondence: z.enum(["current", "stale", "missing"]),
|
|
30
|
+
paths: z.array(text).max(256),
|
|
31
|
+
contents: z.literal("not_included")
|
|
32
|
+
}),
|
|
33
|
+
review: z.strictObject({
|
|
34
|
+
structure: z.enum(["verified", "incomplete"]),
|
|
35
|
+
semantic: z.literal("pending"),
|
|
36
|
+
acceptance: z.literal("not_recorded"),
|
|
37
|
+
human: z.array(z.strictObject({ id: text, requirement: text, status: z.literal("pending") })).max(32),
|
|
38
|
+
checks: z.array(z.strictObject({ id: text, status: z.enum(["confirmed", "missing", "missing_or_stale", "host_policy_changed"]), provenance: z.literal("contract_snapshot_and_tool_journal") })).max(32)
|
|
39
|
+
}),
|
|
40
|
+
budget: z.strictObject({
|
|
41
|
+
availability: z.enum(["authoritative", "legacy_not_enabled"]),
|
|
42
|
+
revision: count.nullable(),
|
|
43
|
+
confirmed: tokens.nullable(),
|
|
44
|
+
reserved: tokens.nullable(),
|
|
45
|
+
unknown: tokens.nullable(),
|
|
46
|
+
remaining: tokens.nullable(),
|
|
47
|
+
limits: tokens.nullable(),
|
|
48
|
+
estimated: z.null(),
|
|
49
|
+
estimation: z.literal("not_separately_recorded"),
|
|
50
|
+
usageComplete: z.boolean().nullable(),
|
|
51
|
+
admissionsClosed: z.boolean().nullable(),
|
|
52
|
+
monetary: z.strictObject({ estimatedConfirmedUsd: z.number().finite().nonnegative().nullable(), reservedUsd: z.number().finite().nonnegative().nullable(), unknownHeldUsd: z.number().finite().nonnegative().nullable(), remainingUsd: z.number().finite().nonnegative().nullable(), unknown: z.boolean(), costKind: z.literal("estimate-not-invoice") })
|
|
53
|
+
}),
|
|
54
|
+
effects: z.strictObject({ readOnly: count, recorded: count, unknown: count, missingEvidence: z.boolean(), automaticReplay: z.literal(false), providerStopped: z.literal("unconfirmed") }),
|
|
55
|
+
nextAction: z.strictObject({
|
|
56
|
+
kind: z.enum(["wait", "reconcile", "review_approval", "review_delivery", "explicit_continuation"]),
|
|
57
|
+
permitted: z.literal("read_only"),
|
|
58
|
+
authorization: z.literal("required_for_execution"),
|
|
59
|
+
preserves: z.literal("contract_receipts_budget_and_effects"),
|
|
60
|
+
automaticReplay: z.literal(false)
|
|
61
|
+
}),
|
|
62
|
+
diagnostic: z.strictObject({ code: z.enum(["EXECUTION_FAILED", "EXECUTION_CANCELLED", "EXECUTION_TIMED_OUT", "EVIDENCE_INCOMPLETE"]), cause: z.enum(["execution_terminal_failure", "operator_or_runtime_cancellation", "execution_deadline", "receipts_missing_or_stale"]), impact: z.literal("acceptance_not_established"), safeAction: z.enum(["review_configuration", "reconcile", "review_delivery"]) }).nullable(),
|
|
63
|
+
reasons: z.array(z.string().regex(/^[A-Z][A-Z0-9_]{0,95}$/)).max(32),
|
|
64
|
+
provenance: z.literal("host_durable_contract_journal_budget_and_fresh_native_snapshot"),
|
|
65
|
+
textTruncated: z.boolean()
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
function reduceHarnessTaskProjection(current, incoming, expected) {
|
|
69
|
+
const inScope = (value) => ["connectionId", "projectId", "sessionId", "runId"].every((key) => value[key] === expected[key]);
|
|
70
|
+
const previous = harnessTaskProjectionSchema.safeParse(current);
|
|
71
|
+
const retained = previous.success && inScope(previous.data) ? previous.data : null;
|
|
72
|
+
let encoded;
|
|
73
|
+
try {
|
|
74
|
+
encoded = JSON.stringify(incoming);
|
|
75
|
+
} catch {
|
|
76
|
+
return { status: "refresh_required", snapshot: retained };
|
|
77
|
+
}
|
|
78
|
+
if (new TextEncoder().encode(encoded).length > 64 * 1024)
|
|
79
|
+
return { status: "refresh_required", snapshot: retained };
|
|
80
|
+
const parsed = harnessTaskProjectionSchema.safeParse(incoming);
|
|
81
|
+
if (!parsed.success || !inScope(parsed.data))
|
|
82
|
+
return { status: "refresh_required", snapshot: retained };
|
|
83
|
+
if (retained && parsed.data.sequence <= retained.sequence) {
|
|
84
|
+
if (parsed.data.sequence === retained.sequence && JSON.stringify(parsed.data) !== JSON.stringify(retained))
|
|
85
|
+
return { status: "refresh_required", snapshot: retained };
|
|
86
|
+
return { status: "ignored", snapshot: retained };
|
|
87
|
+
}
|
|
88
|
+
return { status: "applied", snapshot: parsed.data };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export { HARNESS_TASK_PROJECTION_VERSION, harnessTaskProjectionSchema, reduceHarnessTaskProjection };
|