@zhivex-ai/harness 1.7.0 → 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 +8 -2
- package/README.md +17 -5
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/benchmarks/README.md +26 -0
- package/contracts/engine-api.json +1557 -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/approvals/auto-approve.d.ts +1 -1
- 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-y02n8zd0.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-j6jcb2jb.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-v5db3eb2.js → cli-entry-dksm56sj.js} +39 -297
- package/dist/{cli-entry-td04s0fa.js → cli-entry-eka68ttb.js} +3919 -4549
- package/dist/cli-entry-h7dcah4p.js +137 -0
- package/dist/cli-entry-kwk23ktq.js +33 -0
- package/dist/{cli-entry-ynahz9qc.js → cli-entry-vmce694z.js} +1251 -3139
- package/dist/cli-entry-wanv05db.js +1113 -0
- package/dist/{cli-zw18kdqx.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 +3 -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 +14 -0
- 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.js +111 -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 +1822 -696
- package/dist/index-09rsdr2d.js +1744 -0
- package/dist/index-0csc5sc7.js +139 -0
- package/dist/{index-v86bh0eg.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-k1a1xesg.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-qz4fs9f9.js → index-6ehtssyz.js} +355 -332
- package/dist/index-76kpdbpw.js +80 -0
- package/dist/{index-r0q0r88h.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-yp0jtaxp.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-tc2r2n8b.js → index-mkt5yrax.js} +31 -105
- package/dist/{index-tgt8gtq7.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-h8r80xhk.js → index-sx1t6dnd.js} +4005 -2781
- package/dist/index-tar0ngkm.js +359 -0
- package/dist/index-tn58cr6w.js +471 -0
- package/dist/{index-v17e1xs8.js → index-v79s9bf9.js} +96 -23
- 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-t6sjhxh8.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/harness.d.ts +2 -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 +1923 -797
- 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 +5 -3
- package/docs/CODE_WEB_TASKS.md +3 -114
- package/docs/CONTEXT_ENGINEERING.md +27 -0
- package/docs/ENGINE_API.md +1 -1
- 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/README.md +13 -2
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/examples/README.md +3 -3
- 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 +230 -28
- package/dist/cli/console/console-model-catalog.d.ts +0 -8
- package/dist/index-4gt045j0.js +0 -288
- package/dist/index-4jw3tvy8.js +0 -301
- package/dist/index-ebb5d4s3.js +0 -640
- package/dist/index-x9hv1a34.js +0 -274
- package/dist/service-client-cli-gtk26axb.js +0 -1251
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type PushDestination, type PushSnapshot } from "./remote-delivery.js";
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
destination: z.ZodObject<{
|
|
5
|
+
remote: z.ZodString;
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
ref: z.ZodString;
|
|
8
|
+
baseRef: z.ZodString;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
body: z.ZodString;
|
|
12
|
+
draft: z.ZodBoolean;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type PullRequestInput = z.infer<typeof inputSchema>;
|
|
15
|
+
export declare const pullRequestRecordSchema: z.ZodObject<{
|
|
16
|
+
number: z.ZodNumber;
|
|
17
|
+
url: z.ZodString;
|
|
18
|
+
head: z.ZodString;
|
|
19
|
+
base: z.ZodString;
|
|
20
|
+
headRef: z.ZodString;
|
|
21
|
+
baseRef: z.ZodString;
|
|
22
|
+
title: z.ZodString;
|
|
23
|
+
body: z.ZodString;
|
|
24
|
+
draft: z.ZodBoolean;
|
|
25
|
+
state: z.ZodEnum<{
|
|
26
|
+
closed: "closed";
|
|
27
|
+
open: "open";
|
|
28
|
+
}>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export type PullRequestRecord = z.infer<typeof pullRequestRecordSchema>;
|
|
31
|
+
export declare class PullRequestRejectedError extends Error {
|
|
32
|
+
constructor();
|
|
33
|
+
}
|
|
34
|
+
export interface PullRequestTransport {
|
|
35
|
+
inspect(destination: PushDestination): Promise<PushSnapshot>;
|
|
36
|
+
list(destination: PushDestination): Promise<PullRequestRecord[]>;
|
|
37
|
+
create(input: PullRequestInput): Promise<PullRequestRecord>;
|
|
38
|
+
}
|
|
39
|
+
export interface PullRequestReview extends PullRequestInput {
|
|
40
|
+
ticketId: string;
|
|
41
|
+
expiresAt: number;
|
|
42
|
+
snapshot: PushSnapshot;
|
|
43
|
+
}
|
|
44
|
+
declare const operationSchema: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
destination: z.ZodObject<{
|
|
47
|
+
remote: z.ZodString;
|
|
48
|
+
url: z.ZodString;
|
|
49
|
+
ref: z.ZodString;
|
|
50
|
+
baseRef: z.ZodString;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
head: z.ZodString;
|
|
53
|
+
base: z.ZodString;
|
|
54
|
+
proposalDigest: z.ZodString;
|
|
55
|
+
knownNumbers: z.ZodArray<z.ZodNumber>;
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
completed: "completed";
|
|
58
|
+
"needs-review": "needs-review";
|
|
59
|
+
prepared: "prepared";
|
|
60
|
+
rejected: "rejected";
|
|
61
|
+
}>;
|
|
62
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
number: z.ZodNumber;
|
|
64
|
+
url: z.ZodString;
|
|
65
|
+
head: z.ZodString;
|
|
66
|
+
base: z.ZodString;
|
|
67
|
+
}, z.core.$strict>>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export type PullRequestOperation = z.infer<typeof operationSchema>;
|
|
70
|
+
/** One owner per project. Every admitted ID can issue at most one create request. */
|
|
71
|
+
export declare function openPullRequestDelivery(directory: string, transport: PullRequestTransport, secrets?: readonly string[]): Promise<{
|
|
72
|
+
review: (value: unknown) => Promise<PullRequestReview>;
|
|
73
|
+
create: (id: string) => Promise<PullRequestOperation>;
|
|
74
|
+
reconcile: (id: string) => Promise<PullRequestOperation | {
|
|
75
|
+
id: string;
|
|
76
|
+
status: "not-accepted";
|
|
77
|
+
}>;
|
|
78
|
+
}>;
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { CodeProjectState } from '../contracts.js';
|
|
2
|
+
export type { CodeProject, CodeProjectState } from '../contracts.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { startCodeHost } from './host.js';
|
|
5
|
+
declare const registrySchema: z.ZodObject<{
|
|
6
|
+
version: z.ZodLiteral<1>;
|
|
7
|
+
active: z.ZodOptional<z.ZodString>;
|
|
8
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
workspace: z.ZodString;
|
|
11
|
+
connectionId: z.ZodString;
|
|
12
|
+
label: z.ZodString;
|
|
13
|
+
isGitRepository: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strict>>;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
/** Registry storage is owned/locked by the application manager. One Code project stays running alongside Assistant. */
|
|
17
|
+
export declare function createCodeProjects(options: {
|
|
18
|
+
directory: string;
|
|
19
|
+
read(): unknown;
|
|
20
|
+
save(value: z.infer<typeof registrySchema>): void;
|
|
21
|
+
connection(id: string): Pick<Parameters<typeof startCodeHost>[0], 'engine' | 'sensitiveValues'>;
|
|
22
|
+
}): {
|
|
23
|
+
state: () => CodeProjectState;
|
|
24
|
+
open: (workspace: string, connectionId: string) => Promise<CodeProjectState>;
|
|
25
|
+
select: (id: string) => Promise<CodeProjectState>;
|
|
26
|
+
configure(id: string, connectionId: string): Promise<CodeProjectState>;
|
|
27
|
+
currentHost: () => {
|
|
28
|
+
socketPath: string;
|
|
29
|
+
credentialsPath: string;
|
|
30
|
+
pauseAdmission(): boolean;
|
|
31
|
+
resumeAdmission(): void;
|
|
32
|
+
cancelActive(): Promise<void>;
|
|
33
|
+
dispatchReviewed(request: unknown): Promise<import("../../index.js").HarnessClientResponse>;
|
|
34
|
+
binding: () => import("../contracts.js").ApplicationRuntimeBinding;
|
|
35
|
+
context: () => import("./context.js").CodeContextSnapshot;
|
|
36
|
+
delivery: (action: string, input?: unknown) => Promise<unknown>;
|
|
37
|
+
close: () => Promise<void>;
|
|
38
|
+
checks(): Promise<{
|
|
39
|
+
name: string;
|
|
40
|
+
script: string;
|
|
41
|
+
argv: string[];
|
|
42
|
+
}[]>;
|
|
43
|
+
} | undefined;
|
|
44
|
+
worktrees(): Promise<{
|
|
45
|
+
id: string;
|
|
46
|
+
sourceProjectKey: string;
|
|
47
|
+
sourceWorkspace: string;
|
|
48
|
+
workspace: string;
|
|
49
|
+
stateDirectory: string;
|
|
50
|
+
title: string;
|
|
51
|
+
branch: string;
|
|
52
|
+
baseCommit: string;
|
|
53
|
+
integrationRef: string;
|
|
54
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
55
|
+
createdAt: number;
|
|
56
|
+
error?: string | undefined;
|
|
57
|
+
}[]>;
|
|
58
|
+
createWorktree(input: unknown): Promise<{
|
|
59
|
+
id: string;
|
|
60
|
+
sourceProjectKey: string;
|
|
61
|
+
sourceWorkspace: string;
|
|
62
|
+
workspace: string;
|
|
63
|
+
stateDirectory: string;
|
|
64
|
+
title: string;
|
|
65
|
+
branch: string;
|
|
66
|
+
baseCommit: string;
|
|
67
|
+
integrationRef: string;
|
|
68
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
69
|
+
createdAt: number;
|
|
70
|
+
error?: string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
openWorktree(id: string): Promise<CodeProjectState>;
|
|
73
|
+
reviewWorktreeRemoval(id: string): Promise<import("./worktrees.js").TaskRemovalReview>;
|
|
74
|
+
removeWorktree(ticketId: string): Promise<{
|
|
75
|
+
id: string;
|
|
76
|
+
sourceProjectKey: string;
|
|
77
|
+
sourceWorkspace: string;
|
|
78
|
+
workspace: string;
|
|
79
|
+
stateDirectory: string;
|
|
80
|
+
title: string;
|
|
81
|
+
branch: string;
|
|
82
|
+
baseCommit: string;
|
|
83
|
+
integrationRef: string;
|
|
84
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
85
|
+
createdAt: number;
|
|
86
|
+
error?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
restore(): Promise<CodeProjectState>;
|
|
89
|
+
close(): Promise<void>;
|
|
90
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const pushDestinationSchema: z.ZodObject<{
|
|
3
|
+
remote: z.ZodString;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
ref: z.ZodString;
|
|
6
|
+
baseRef: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const pushSnapshotSchema: z.ZodObject<{
|
|
9
|
+
branch: z.ZodString;
|
|
10
|
+
head: z.ZodString;
|
|
11
|
+
destination: z.ZodObject<{
|
|
12
|
+
remote: z.ZodString;
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
ref: z.ZodString;
|
|
15
|
+
baseRef: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
remoteHead: z.ZodNullable<z.ZodString>;
|
|
18
|
+
baseHead: z.ZodString;
|
|
19
|
+
fastForward: z.ZodBoolean;
|
|
20
|
+
stagedPaths: z.ZodArray<z.ZodString>;
|
|
21
|
+
commits: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
message: z.ZodString;
|
|
24
|
+
files: z.ZodArray<z.ZodObject<{
|
|
25
|
+
path: z.ZodString;
|
|
26
|
+
before: z.ZodString;
|
|
27
|
+
after: z.ZodString;
|
|
28
|
+
beforeMode: z.ZodEnum<{
|
|
29
|
+
"000000": "000000";
|
|
30
|
+
100644: "100644";
|
|
31
|
+
100755: "100755";
|
|
32
|
+
}>;
|
|
33
|
+
afterMode: z.ZodEnum<{
|
|
34
|
+
"000000": "000000";
|
|
35
|
+
100644: "100644";
|
|
36
|
+
100755: "100755";
|
|
37
|
+
}>;
|
|
38
|
+
parent: z.ZodString;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type PushSnapshot = z.infer<typeof pushSnapshotSchema>;
|
|
43
|
+
export type PushDestination = z.infer<typeof pushDestinationSchema>;
|
|
44
|
+
export interface PushReview extends PushSnapshot {
|
|
45
|
+
ticketId: string;
|
|
46
|
+
expiresAt: number;
|
|
47
|
+
}
|
|
48
|
+
declare const operationSchema: z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
head: z.ZodString;
|
|
51
|
+
destination: z.ZodObject<{
|
|
52
|
+
remote: z.ZodString;
|
|
53
|
+
url: z.ZodString;
|
|
54
|
+
ref: z.ZodString;
|
|
55
|
+
baseRef: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
previousHead: z.ZodNullable<z.ZodString>;
|
|
58
|
+
status: z.ZodEnum<{
|
|
59
|
+
completed: "completed";
|
|
60
|
+
prepared: "prepared";
|
|
61
|
+
}>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
export type PushOperation = z.infer<typeof operationSchema>;
|
|
64
|
+
/** Implementations belong to the host, never the renderer or a model. */
|
|
65
|
+
export interface RemoteTransport {
|
|
66
|
+
inspect(destination: PushDestination): Promise<PushSnapshot>;
|
|
67
|
+
readHead(destination: PushDestination): Promise<string | null>;
|
|
68
|
+
/** Must use ordinary non-forced push of this exact object to this single ref. */
|
|
69
|
+
push(head: string, destination: PushDestination): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
/** Durable admission and reconciliation for one host/project, with no automatic retry. */
|
|
72
|
+
export declare function openRemoteDelivery(directory: string, transport: RemoteTransport, sensitiveValues?: readonly string[]): Promise<{
|
|
73
|
+
reviewPush: (input: unknown) => Promise<PushReview>;
|
|
74
|
+
push: (ticketId: string) => Promise<PushOperation>;
|
|
75
|
+
reconcile: (id: string) => Promise<PushOperation | {
|
|
76
|
+
id: string;
|
|
77
|
+
status: "not-accepted";
|
|
78
|
+
}>;
|
|
79
|
+
}>;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Validate without initializing a repository, checking out files, or inheriting Git overrides. */
|
|
2
|
+
export declare function requireCodeRepository(workspace: string): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Inspect whether a workspace folder is a Git repository root or a plain local folder.
|
|
5
|
+
* Rejects bare Git repositories (CODE_GIT_REQUIRED) and subfolders inside a Git repository (CODE_GIT_ROOT_REQUIRED).
|
|
6
|
+
*/
|
|
7
|
+
export declare function inspectCodeWorkspace(workspace: string): Promise<{
|
|
8
|
+
isGitRepository: boolean;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const taskSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
sourceProjectKey: z.ZodString;
|
|
5
|
+
sourceWorkspace: z.ZodString;
|
|
6
|
+
workspace: z.ZodString;
|
|
7
|
+
stateDirectory: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
branch: z.ZodString;
|
|
10
|
+
baseCommit: z.ZodString;
|
|
11
|
+
integrationRef: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<{
|
|
13
|
+
creating: "creating";
|
|
14
|
+
"needs-attention": "needs-attention";
|
|
15
|
+
ready: "ready";
|
|
16
|
+
removed: "removed";
|
|
17
|
+
}>;
|
|
18
|
+
createdAt: z.ZodNumber;
|
|
19
|
+
error: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type ManagedTask = z.infer<typeof taskSchema>;
|
|
22
|
+
export interface TaskRemovalReview {
|
|
23
|
+
ticketId: string;
|
|
24
|
+
task: ManagedTask;
|
|
25
|
+
head: string;
|
|
26
|
+
integrationCommit: string;
|
|
27
|
+
changedPaths: string[];
|
|
28
|
+
unmergedCommits: number;
|
|
29
|
+
locked: boolean;
|
|
30
|
+
canRemove: boolean;
|
|
31
|
+
expiresAt: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const taskCreationSchema: z.ZodObject<{
|
|
34
|
+
title: z.ZodString;
|
|
35
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
36
|
+
initialState: z.ZodLiteral<"committed-head">;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
/** Single desktop-owner registry. Git directories and task records are never guessed. */
|
|
39
|
+
export declare function openTaskWorktrees(directory: string): Promise<{
|
|
40
|
+
list: (sourceProjectKey?: string) => {
|
|
41
|
+
id: string;
|
|
42
|
+
sourceProjectKey: string;
|
|
43
|
+
sourceWorkspace: string;
|
|
44
|
+
workspace: string;
|
|
45
|
+
stateDirectory: string;
|
|
46
|
+
title: string;
|
|
47
|
+
branch: string;
|
|
48
|
+
baseCommit: string;
|
|
49
|
+
integrationRef: string;
|
|
50
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
51
|
+
createdAt: number;
|
|
52
|
+
error?: string | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
get: (id: string) => {
|
|
55
|
+
id: string;
|
|
56
|
+
sourceProjectKey: string;
|
|
57
|
+
sourceWorkspace: string;
|
|
58
|
+
workspace: string;
|
|
59
|
+
stateDirectory: string;
|
|
60
|
+
title: string;
|
|
61
|
+
branch: string;
|
|
62
|
+
baseCommit: string;
|
|
63
|
+
integrationRef: string;
|
|
64
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
65
|
+
createdAt: number;
|
|
66
|
+
error?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
create(project: {
|
|
69
|
+
key: string;
|
|
70
|
+
workspace: string;
|
|
71
|
+
}, input: unknown): Promise<{
|
|
72
|
+
id: string;
|
|
73
|
+
sourceProjectKey: string;
|
|
74
|
+
sourceWorkspace: string;
|
|
75
|
+
workspace: string;
|
|
76
|
+
stateDirectory: string;
|
|
77
|
+
title: string;
|
|
78
|
+
branch: string;
|
|
79
|
+
baseCommit: string;
|
|
80
|
+
integrationRef: string;
|
|
81
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
82
|
+
createdAt: number;
|
|
83
|
+
error?: string | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
inspect(id: string): Promise<{
|
|
86
|
+
head: string;
|
|
87
|
+
integrationCommit: string;
|
|
88
|
+
changedPaths: string[];
|
|
89
|
+
unmergedCommits: number;
|
|
90
|
+
locked: boolean;
|
|
91
|
+
canRemove: boolean;
|
|
92
|
+
task: {
|
|
93
|
+
id: string;
|
|
94
|
+
sourceProjectKey: string;
|
|
95
|
+
sourceWorkspace: string;
|
|
96
|
+
workspace: string;
|
|
97
|
+
stateDirectory: string;
|
|
98
|
+
title: string;
|
|
99
|
+
branch: string;
|
|
100
|
+
baseCommit: string;
|
|
101
|
+
integrationRef: string;
|
|
102
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
103
|
+
createdAt: number;
|
|
104
|
+
error?: string | undefined;
|
|
105
|
+
};
|
|
106
|
+
}>;
|
|
107
|
+
reviewRemoval(id: string): Promise<TaskRemovalReview>;
|
|
108
|
+
remove(ticketId: string): Promise<{
|
|
109
|
+
id: string;
|
|
110
|
+
sourceProjectKey: string;
|
|
111
|
+
sourceWorkspace: string;
|
|
112
|
+
workspace: string;
|
|
113
|
+
stateDirectory: string;
|
|
114
|
+
title: string;
|
|
115
|
+
branch: string;
|
|
116
|
+
baseCommit: string;
|
|
117
|
+
integrationRef: string;
|
|
118
|
+
status: "creating" | "needs-attention" | "ready" | "removed";
|
|
119
|
+
createdAt: number;
|
|
120
|
+
error?: string | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
123
|
+
export {};
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/** Serializable application projections. No host, filesystem, provider or UI dependencies. */
|
|
2
|
+
export declare const APPLICATION_PROJECTION_VERSION: 1;
|
|
3
|
+
export interface PersonalSnapshot {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
tasks: {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
due_date: string | null;
|
|
9
|
+
status: string;
|
|
10
|
+
created_at: number;
|
|
11
|
+
}[];
|
|
12
|
+
total: number;
|
|
13
|
+
nextOffset: number | null;
|
|
14
|
+
proactive?: {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
sources?: {
|
|
17
|
+
calendar: boolean;
|
|
18
|
+
replies: string[];
|
|
19
|
+
};
|
|
20
|
+
health?: {
|
|
21
|
+
source: string;
|
|
22
|
+
status: string;
|
|
23
|
+
checkedAt: number;
|
|
24
|
+
}[];
|
|
25
|
+
policy: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
timeZone: string;
|
|
28
|
+
channel: 'web' | 'telegram';
|
|
29
|
+
calendar: boolean;
|
|
30
|
+
tasks: boolean;
|
|
31
|
+
replies: boolean;
|
|
32
|
+
quietStart: string;
|
|
33
|
+
quietEnd: string;
|
|
34
|
+
maxPerDay: number;
|
|
35
|
+
bufferMinutes: number;
|
|
36
|
+
} | null;
|
|
37
|
+
alerts: {
|
|
38
|
+
id: string;
|
|
39
|
+
kind: string;
|
|
40
|
+
text: string;
|
|
41
|
+
status: string;
|
|
42
|
+
channel: string;
|
|
43
|
+
created_at: number;
|
|
44
|
+
}[];
|
|
45
|
+
watches: {
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
status: string;
|
|
49
|
+
due_at: number;
|
|
50
|
+
}[];
|
|
51
|
+
};
|
|
52
|
+
reminders: {
|
|
53
|
+
id: string;
|
|
54
|
+
text: string;
|
|
55
|
+
due_at: number;
|
|
56
|
+
time_zone: string;
|
|
57
|
+
channel: string;
|
|
58
|
+
status: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
export interface NotesSnapshot {
|
|
62
|
+
enabled: boolean;
|
|
63
|
+
notes: {
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
created_at: number;
|
|
67
|
+
}[];
|
|
68
|
+
total: number;
|
|
69
|
+
nextOffset: number | null;
|
|
70
|
+
note?: {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
created_at: number;
|
|
74
|
+
body: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export interface AutomationSnapshot {
|
|
78
|
+
available: boolean;
|
|
79
|
+
linked: boolean;
|
|
80
|
+
delivery: 'telegram';
|
|
81
|
+
digest: string;
|
|
82
|
+
state: {
|
|
83
|
+
schedule: {
|
|
84
|
+
enabled: number;
|
|
85
|
+
revision: number;
|
|
86
|
+
next_at: number;
|
|
87
|
+
} | null;
|
|
88
|
+
preferences: {
|
|
89
|
+
key: string;
|
|
90
|
+
value: string;
|
|
91
|
+
}[];
|
|
92
|
+
occurrences: {
|
|
93
|
+
id: string;
|
|
94
|
+
day: string;
|
|
95
|
+
status: string;
|
|
96
|
+
attempts: number;
|
|
97
|
+
}[];
|
|
98
|
+
} | null;
|
|
99
|
+
}
|
|
100
|
+
export type AutomationChange = {
|
|
101
|
+
action: 'configure' | 'pause' | 'resume' | 'delete' | 'forget';
|
|
102
|
+
expectedDigest: string;
|
|
103
|
+
confirmed: true;
|
|
104
|
+
localTime?: string;
|
|
105
|
+
timeZone?: string;
|
|
106
|
+
};
|
|
107
|
+
export interface AgendaSnapshot {
|
|
108
|
+
connected: boolean;
|
|
109
|
+
canCreate?: boolean;
|
|
110
|
+
complete: boolean;
|
|
111
|
+
date: string;
|
|
112
|
+
timeZone: string;
|
|
113
|
+
calendarId?: string;
|
|
114
|
+
events: {
|
|
115
|
+
id: string;
|
|
116
|
+
summary: string;
|
|
117
|
+
status?: string | undefined;
|
|
118
|
+
busy?: boolean | undefined;
|
|
119
|
+
start: {
|
|
120
|
+
date?: string | undefined;
|
|
121
|
+
dateTime?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
end: {
|
|
124
|
+
date?: string | undefined;
|
|
125
|
+
dateTime?: string | undefined;
|
|
126
|
+
};
|
|
127
|
+
}[];
|
|
128
|
+
}
|
|
129
|
+
export interface CodeContextSnapshot {
|
|
130
|
+
schemaVersion: 1;
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
provider: string;
|
|
133
|
+
model: string;
|
|
134
|
+
fingerprint: string;
|
|
135
|
+
manifest?: {
|
|
136
|
+
path: string;
|
|
137
|
+
digest: string;
|
|
138
|
+
bytes: number;
|
|
139
|
+
};
|
|
140
|
+
sources: {
|
|
141
|
+
kind: 'context' | 'rule';
|
|
142
|
+
path: string;
|
|
143
|
+
digest: string;
|
|
144
|
+
bytes: number;
|
|
145
|
+
}[];
|
|
146
|
+
skills: {
|
|
147
|
+
id: string;
|
|
148
|
+
path: string;
|
|
149
|
+
digest: string;
|
|
150
|
+
bytes: number;
|
|
151
|
+
}[];
|
|
152
|
+
}
|
|
153
|
+
export declare const APPLICATION_PROTOCOL_VERSION: 1;
|
|
154
|
+
export interface ProviderSummary {
|
|
155
|
+
kind: 'openai-compatible' | 'meta' | 'qwen';
|
|
156
|
+
model: string;
|
|
157
|
+
webSearch: boolean;
|
|
158
|
+
canEnableWebSearch: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface AssistantSetupState {
|
|
161
|
+
managed: boolean;
|
|
162
|
+
setupRevision: number;
|
|
163
|
+
canStop: boolean;
|
|
164
|
+
ready: boolean;
|
|
165
|
+
busy: boolean;
|
|
166
|
+
error: string | null;
|
|
167
|
+
locked: boolean;
|
|
168
|
+
configured: boolean;
|
|
169
|
+
editing: boolean;
|
|
170
|
+
editingExisting?: boolean;
|
|
171
|
+
draftName?: string | undefined;
|
|
172
|
+
microsoft: {
|
|
173
|
+
connected: boolean;
|
|
174
|
+
email?: string | undefined;
|
|
175
|
+
clientId?: string | undefined;
|
|
176
|
+
tenantId?: string | undefined;
|
|
177
|
+
mail: boolean;
|
|
178
|
+
calendar: boolean;
|
|
179
|
+
};
|
|
180
|
+
tools: {
|
|
181
|
+
daily: boolean;
|
|
182
|
+
proactive?: boolean | undefined;
|
|
183
|
+
github?: {
|
|
184
|
+
account: string;
|
|
185
|
+
authorizationEnv: string;
|
|
186
|
+
} | undefined;
|
|
187
|
+
web?: {
|
|
188
|
+
apiKeyEnv: string;
|
|
189
|
+
} | undefined;
|
|
190
|
+
};
|
|
191
|
+
google: {
|
|
192
|
+
connected: boolean;
|
|
193
|
+
email?: string | undefined;
|
|
194
|
+
mail: boolean;
|
|
195
|
+
drive: boolean;
|
|
196
|
+
};
|
|
197
|
+
provider: ProviderSummary | null;
|
|
198
|
+
calendar: {
|
|
199
|
+
connected: boolean;
|
|
200
|
+
allowCreate: boolean;
|
|
201
|
+
email?: string | undefined;
|
|
202
|
+
pending: boolean;
|
|
203
|
+
available: boolean;
|
|
204
|
+
};
|
|
205
|
+
telegram: {
|
|
206
|
+
configured: boolean;
|
|
207
|
+
pending: boolean;
|
|
208
|
+
candidate?: string | undefined;
|
|
209
|
+
url?: string | undefined;
|
|
210
|
+
};
|
|
211
|
+
connections: ({
|
|
212
|
+
id: string;
|
|
213
|
+
agents: {
|
|
214
|
+
id: string;
|
|
215
|
+
name: string;
|
|
216
|
+
}[];
|
|
217
|
+
draft: boolean;
|
|
218
|
+
label: string;
|
|
219
|
+
} & Partial<ProviderSummary>)[];
|
|
220
|
+
profiles: {
|
|
221
|
+
id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
active: boolean;
|
|
224
|
+
connectionId?: string | undefined;
|
|
225
|
+
provider: ProviderSummary | null;
|
|
226
|
+
integrations: {
|
|
227
|
+
microsoft: boolean;
|
|
228
|
+
microsoftEmail?: string | undefined;
|
|
229
|
+
outlookMail: boolean;
|
|
230
|
+
outlookCalendar: boolean;
|
|
231
|
+
daily: boolean;
|
|
232
|
+
github: boolean;
|
|
233
|
+
web: boolean;
|
|
234
|
+
mail: boolean;
|
|
235
|
+
drive: boolean;
|
|
236
|
+
calendar: boolean;
|
|
237
|
+
calendarEmail?: string | undefined;
|
|
238
|
+
telegram: boolean;
|
|
239
|
+
};
|
|
240
|
+
}[];
|
|
241
|
+
}
|
|
242
|
+
export interface CodeProject {
|
|
243
|
+
id: string;
|
|
244
|
+
workspace: string;
|
|
245
|
+
connectionId: string;
|
|
246
|
+
label: string;
|
|
247
|
+
isGitRepository?: boolean | undefined;
|
|
248
|
+
}
|
|
249
|
+
export interface CodeProjectState {
|
|
250
|
+
projects: CodeProject[];
|
|
251
|
+
active?: string | undefined;
|
|
252
|
+
ready: boolean;
|
|
253
|
+
error: string | null;
|
|
254
|
+
}
|
|
255
|
+
/** Metadata of the loaded runtime. A changed binding never authorizes resuming an old run. */
|
|
256
|
+
export interface ApplicationRuntimeBinding {
|
|
257
|
+
fingerprint: string;
|
|
258
|
+
tools: string[];
|
|
259
|
+
contextFingerprint: string;
|
|
260
|
+
}
|
|
261
|
+
export interface ApplicationCatalogSnapshot {
|
|
262
|
+
schemaVersion: 1;
|
|
263
|
+
generation: string;
|
|
264
|
+
revision: string;
|
|
265
|
+
locked: boolean;
|
|
266
|
+
agents: AssistantSetupState['profiles'];
|
|
267
|
+
connections: AssistantSetupState['connections'];
|
|
268
|
+
projects: CodeProjectState;
|
|
269
|
+
runtimes: {
|
|
270
|
+
area: 'assistant' | 'code';
|
|
271
|
+
id: string;
|
|
272
|
+
projectId: string;
|
|
273
|
+
binding: ApplicationRuntimeBinding;
|
|
274
|
+
}[];
|
|
275
|
+
}
|
|
276
|
+
export interface ApplicationError {
|
|
277
|
+
schemaVersion: 1;
|
|
278
|
+
code: string;
|
|
279
|
+
recovery: 'upgrade' | 'refresh' | 'reconcile' | 'review-request';
|
|
280
|
+
}
|
|
281
|
+
export type CoordinatorMethod = 'reply-watch-proposal' | 'mail-draft-proposal' | 'catalog' | 'calendar-create-proposal' | 'notes' | 'agenda' | 'authorization' | 'automation' | 'personal-state' | 'management' | 'state' | 'shutdown' | 'shutdown-summary' | 'action' | 'code-configure' | 'code-open' | 'code-select' | 'code-retry' | 'code-tools' | 'code-delivery';
|
|
282
|
+
export interface ApplicationHello {
|
|
283
|
+
version: 1;
|
|
284
|
+
projectionVersion: 1;
|
|
285
|
+
activityVersion: 1;
|
|
286
|
+
generation: string;
|
|
287
|
+
capabilities: string[];
|
|
288
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AssistantSetupState, CodeProjectState, ApplicationCatalogSnapshot, ApplicationError, CoordinatorMethod } from './contracts.js';
|
|
2
|
+
import type { startManagedAssistant } from './assistant/managed/setup.js';
|
|
3
|
+
export type ManagedApplication = Awaited<ReturnType<typeof startManagedAssistant>>;
|
|
4
|
+
export interface CoordinatorSnapshot {
|
|
5
|
+
state: AssistantSetupState;
|
|
6
|
+
credentialsPath?: string | undefined;
|
|
7
|
+
code: CodeProjectState;
|
|
8
|
+
codeCredentialsPath?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type { CoordinatorMethod } from './contracts.js';
|
|
11
|
+
/** Trusted Node client only. Runtime credential paths must never be forwarded to a renderer. */
|
|
12
|
+
export declare function connectCoordinator(directory: string, options?: {
|
|
13
|
+
versions?: number[];
|
|
14
|
+
requiredCapabilities?: string[];
|
|
15
|
+
}): Promise<{
|
|
16
|
+
call: <T = unknown>(method: CoordinatorMethod | 'hello', input?: unknown) => Promise<T>;
|
|
17
|
+
protocol: {
|
|
18
|
+
version: 1;
|
|
19
|
+
projectionVersion?: 1 | undefined;
|
|
20
|
+
activityVersion?: 1 | undefined;
|
|
21
|
+
generation?: string | undefined;
|
|
22
|
+
capabilities: string[];
|
|
23
|
+
};
|
|
24
|
+
capabilities: string[];
|
|
25
|
+
catalog: () => Promise<ApplicationCatalogSnapshot>;
|
|
26
|
+
state: () => Promise<CoordinatorSnapshot>;
|
|
27
|
+
}>;
|
|
28
|
+
/** Stable code and recovery metadata; clients must never automatically replay failed mutations. */
|
|
29
|
+
export declare class ApplicationCoordinatorError extends Error {
|
|
30
|
+
readonly code: string;
|
|
31
|
+
readonly detail: ApplicationError | undefined;
|
|
32
|
+
constructor(code: string, detail?: ApplicationError);
|
|
33
|
+
}
|