toolroll 0.5.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/LICENSE +21 -0
- package/README.md +1113 -0
- package/THIRD_PARTY_NOTICES.md +449 -0
- package/dist/accent-colors.d.ts +48 -0
- package/dist/accent-colors.js +122 -0
- package/dist/action-ledger.d.ts +26 -0
- package/dist/action-ledger.js +75 -0
- package/dist/agent-fence.d.ts +42 -0
- package/dist/agent-fence.js +183 -0
- package/dist/agentconfig.d.ts +216 -0
- package/dist/agentconfig.js +454 -0
- package/dist/api-tokens.d.ts +16 -0
- package/dist/api-tokens.js +27 -0
- package/dist/approval-policy.d.ts +69 -0
- package/dist/approval-policy.js +137 -0
- package/dist/approval-rules-ui.d.ts +25 -0
- package/dist/approval-rules-ui.js +39 -0
- package/dist/assignment-adapters.d.ts +180 -0
- package/dist/assignment-adapters.js +239 -0
- package/dist/assignment-brief.d.ts +71 -0
- package/dist/assignment-brief.js +129 -0
- package/dist/assignment-delivery.d.ts +56 -0
- package/dist/assignment-delivery.js +160 -0
- package/dist/assignment-presentation.d.ts +26 -0
- package/dist/assignment-presentation.js +80 -0
- package/dist/assignment-status.d.ts +62 -0
- package/dist/assignment-status.js +152 -0
- package/dist/assignment-ui.d.ts +71 -0
- package/dist/assignment-ui.js +103 -0
- package/dist/assignment.d.ts +222 -0
- package/dist/assignment.js +399 -0
- package/dist/attest.d.ts +56 -0
- package/dist/attest.js +153 -0
- package/dist/backend.d.ts +97 -0
- package/dist/backend.js +166 -0
- package/dist/backup-ui.d.ts +22 -0
- package/dist/backup-ui.js +59 -0
- package/dist/backup.d.ts +84 -0
- package/dist/backup.js +421 -0
- package/dist/beads.d.ts +34 -0
- package/dist/beads.js +135 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +22 -0
- package/dist/board.d.ts +150 -0
- package/dist/board.js +210 -0
- package/dist/boot-identity.d.ts +63 -0
- package/dist/boot-identity.js +99 -0
- package/dist/browser/THIRD_PARTY_NOTICES.txt +2295 -0
- package/dist/browser/workspace.css +4 -0
- package/dist/browser/workspace.js +225 -0
- package/dist/browser-crew.d.ts +11 -0
- package/dist/browser-crew.js +50 -0
- package/dist/browser-shell.d.ts +8 -0
- package/dist/browser-shell.js +60 -0
- package/dist/browser-workspace.d.ts +780 -0
- package/dist/browser-workspace.js +47 -0
- package/dist/budget-alerts.d.ts +19 -0
- package/dist/budget-alerts.js +46 -0
- package/dist/builder.d.ts +370 -0
- package/dist/builder.js +3262 -0
- package/dist/capscan.d.ts +35 -0
- package/dist/capscan.js +113 -0
- package/dist/chat-acceptance.d.ts +71 -0
- package/dist/chat-acceptance.js +120 -0
- package/dist/chat-actions.d.ts +265 -0
- package/dist/chat-actions.js +1273 -0
- package/dist/chat-channel.d.ts +109 -0
- package/dist/chat-channel.js +652 -0
- package/dist/chat-continuity.d.ts +32 -0
- package/dist/chat-continuity.js +317 -0
- package/dist/chat-controls.d.ts +113 -0
- package/dist/chat-controls.js +53 -0
- package/dist/chat-delivery-state.d.ts +159 -0
- package/dist/chat-delivery-state.js +309 -0
- package/dist/chat-delivery.d.ts +38 -0
- package/dist/chat-delivery.js +693 -0
- package/dist/chat-display.d.ts +1 -0
- package/dist/chat-display.js +18 -0
- package/dist/chat-evidence.d.ts +123 -0
- package/dist/chat-evidence.js +207 -0
- package/dist/chat-flow.d.ts +44 -0
- package/dist/chat-flow.js +215 -0
- package/dist/chat-inbox.d.ts +57 -0
- package/dist/chat-inbox.js +123 -0
- package/dist/chat-polish.d.ts +16 -0
- package/dist/chat-polish.js +135 -0
- package/dist/chat-review.d.ts +46 -0
- package/dist/chat-review.js +98 -0
- package/dist/chat-rooms.d.ts +123 -0
- package/dist/chat-rooms.js +216 -0
- package/dist/chat-task-actions.d.ts +44 -0
- package/dist/chat-task-actions.js +79 -0
- package/dist/check-progress.d.ts +51 -0
- package/dist/check-progress.js +290 -0
- package/dist/child-database.d.ts +12 -0
- package/dist/child-database.js +30 -0
- package/dist/claim.d.ts +688 -0
- package/dist/claim.js +1740 -0
- package/dist/cli.d.ts +137 -0
- package/dist/cli.js +1461 -0
- package/dist/codex-limits.d.ts +15 -0
- package/dist/codex-limits.js +145 -0
- package/dist/coding-context.d.ts +55 -0
- package/dist/coding-context.js +92 -0
- package/dist/coding-handoff.d.ts +57 -0
- package/dist/coding-handoff.js +277 -0
- package/dist/coding-provider.d.ts +72 -0
- package/dist/coding-provider.js +424 -0
- package/dist/coding-shipping-ui.d.ts +4 -0
- package/dist/coding-shipping-ui.js +12 -0
- package/dist/coding-types.d.ts +62 -0
- package/dist/coding-types.js +1 -0
- package/dist/coding-ui.d.ts +17 -0
- package/dist/coding-ui.js +364 -0
- package/dist/coding-update.d.ts +15 -0
- package/dist/coding-update.js +149 -0
- package/dist/coding-workspace.d.ts +124 -0
- package/dist/coding-workspace.js +768 -0
- package/dist/container-state.d.ts +5 -0
- package/dist/container-state.js +62 -0
- package/dist/containment.d.ts +197 -0
- package/dist/containment.js +559 -0
- package/dist/contest.d.ts +318 -0
- package/dist/contest.js +753 -0
- package/dist/control-setup.d.ts +35 -0
- package/dist/control-setup.js +40 -0
- package/dist/control-ui.d.ts +29 -0
- package/dist/control-ui.js +53 -0
- package/dist/controller-service.d.ts +1 -0
- package/dist/controller-service.js +19 -0
- package/dist/controller-supervisor.d.ts +30 -0
- package/dist/controller-supervisor.js +104 -0
- package/dist/converse.d.ts +304 -0
- package/dist/converse.js +849 -0
- package/dist/coordinator-proposals.d.ts +29 -0
- package/dist/coordinator-proposals.js +137 -0
- package/dist/coordinator.d.ts +186 -0
- package/dist/coordinator.js +447 -0
- package/dist/credentials-ui.d.ts +25 -0
- package/dist/credentials-ui.js +48 -0
- package/dist/daemon.d.ts +209 -0
- package/dist/daemon.js +604 -0
- package/dist/decision.d.ts +120 -0
- package/dist/decision.js +388 -0
- package/dist/demo.d.ts +55 -0
- package/dist/demo.js +992 -0
- package/dist/desktop-access.d.ts +28 -0
- package/dist/desktop-access.js +88 -0
- package/dist/desktop-bundle.d.ts +16 -0
- package/dist/desktop-bundle.js +74 -0
- package/dist/desktop-host.d.ts +54 -0
- package/dist/desktop-host.js +508 -0
- package/dist/desktop-update-gate.d.ts +12 -0
- package/dist/desktop-update-gate.js +91 -0
- package/dist/desktop-update-recovery.d.ts +14 -0
- package/dist/desktop-update-recovery.js +243 -0
- package/dist/desktop-update.d.ts +110 -0
- package/dist/desktop-update.js +740 -0
- package/dist/discord-api.d.ts +20 -0
- package/dist/discord-api.js +138 -0
- package/dist/discord-chat.d.ts +16 -0
- package/dist/discord-chat.js +381 -0
- package/dist/discord-settings.d.ts +7 -0
- package/dist/discord-settings.js +75 -0
- package/dist/discord.d.ts +10 -0
- package/dist/discord.js +169 -0
- package/dist/discover.d.ts +75 -0
- package/dist/discover.js +150 -0
- package/dist/dispatch.d.ts +100 -0
- package/dist/dispatch.js +311 -0
- package/dist/dispose.d.ts +161 -0
- package/dist/dispose.js +803 -0
- package/dist/email-settings.d.ts +34 -0
- package/dist/email-settings.js +50 -0
- package/dist/envelope.d.ts +47 -0
- package/dist/envelope.js +105 -0
- package/dist/evidence-pack.d.ts +185 -0
- package/dist/evidence-pack.js +258 -0
- package/dist/evidence.d.ts +345 -0
- package/dist/evidence.js +782 -0
- package/dist/exec.d.ts +285 -0
- package/dist/exec.js +1841 -0
- package/dist/exhaustion.d.ts +85 -0
- package/dist/exhaustion.js +141 -0
- package/dist/export-ui.d.ts +4 -0
- package/dist/export-ui.js +17 -0
- package/dist/export.d.ts +48 -0
- package/dist/export.js +305 -0
- package/dist/flow-actions.d.ts +77 -0
- package/dist/flow-actions.js +203 -0
- package/dist/flow-code.d.ts +50 -0
- package/dist/flow-code.js +159 -0
- package/dist/flow-draft.d.ts +38 -0
- package/dist/flow-draft.js +80 -0
- package/dist/flow-engine.d.ts +66 -0
- package/dist/flow-engine.js +416 -0
- package/dist/flow-insights.d.ts +95 -0
- package/dist/flow-insights.js +149 -0
- package/dist/flow-live.d.ts +24 -0
- package/dist/flow-live.js +150 -0
- package/dist/flow-people.d.ts +24 -0
- package/dist/flow-people.js +91 -0
- package/dist/flow-replies.d.ts +48 -0
- package/dist/flow-replies.js +113 -0
- package/dist/flow-scripts.d.ts +38 -0
- package/dist/flow-scripts.js +73 -0
- package/dist/flow-secrets.d.ts +13 -0
- package/dist/flow-secrets.js +45 -0
- package/dist/flow-sort.d.ts +82 -0
- package/dist/flow-sort.js +153 -0
- package/dist/flow-steps.d.ts +40 -0
- package/dist/flow-steps.js +408 -0
- package/dist/flow-triggers.d.ts +244 -0
- package/dist/flow-triggers.js +959 -0
- package/dist/flows-ui.d.ts +20 -0
- package/dist/flows-ui.js +175 -0
- package/dist/flows.d.ts +229 -0
- package/dist/flows.js +968 -0
- package/dist/fonts.d.ts +19 -0
- package/dist/fonts.js +19 -0
- package/dist/gaps.d.ts +35 -0
- package/dist/gaps.js +101 -0
- package/dist/gate-failure.d.ts +40 -0
- package/dist/gate-failure.js +66 -0
- package/dist/git.d.ts +54 -0
- package/dist/git.js +94 -0
- package/dist/google-mail.d.ts +58 -0
- package/dist/google-mail.js +151 -0
- package/dist/grant.d.ts +136 -0
- package/dist/grant.js +238 -0
- package/dist/graph.d.ts +164 -0
- package/dist/graph.js +383 -0
- package/dist/guides.d.ts +22 -0
- package/dist/guides.js +363 -0
- package/dist/held.d.ts +150 -0
- package/dist/held.js +799 -0
- package/dist/invoke.d.ts +112 -0
- package/dist/invoke.js +780 -0
- package/dist/issues.d.ts +41 -0
- package/dist/issues.js +131 -0
- package/dist/job-object-helper.ps1 +252 -0
- package/dist/jsonl-discriminants.d.ts +11 -0
- package/dist/jsonl-discriminants.js +93 -0
- package/dist/keys.d.ts +104 -0
- package/dist/keys.js +229 -0
- package/dist/kits-ui.d.ts +17 -0
- package/dist/kits-ui.js +46 -0
- package/dist/kits.d.ts +86 -0
- package/dist/kits.js +215 -0
- package/dist/knowledge-cli.d.ts +101 -0
- package/dist/knowledge-cli.js +92 -0
- package/dist/knowledge-ui.d.ts +24 -0
- package/dist/knowledge-ui.js +40 -0
- package/dist/lead-context.d.ts +8 -0
- package/dist/lead-context.js +56 -0
- package/dist/lead-follow.d.ts +22 -0
- package/dist/lead-follow.js +167 -0
- package/dist/lead-status.d.ts +75 -0
- package/dist/lead-status.js +285 -0
- package/dist/ledger-chain.d.ts +46 -0
- package/dist/ledger-chain.js +187 -0
- package/dist/ledger-csv.d.ts +4 -0
- package/dist/ledger-csv.js +11 -0
- package/dist/ledger-view.d.ts +24 -0
- package/dist/ledger-view.js +58 -0
- package/dist/limits-ui.d.ts +26 -0
- package/dist/limits-ui.js +67 -0
- package/dist/link.d.ts +72 -0
- package/dist/link.js +217 -0
- package/dist/live.d.ts +96 -0
- package/dist/live.js +366 -0
- package/dist/liveness.d.ts +30 -0
- package/dist/liveness.js +42 -0
- package/dist/log.d.ts +7 -0
- package/dist/log.js +25 -0
- package/dist/mailbox.d.ts +57 -0
- package/dist/mailbox.js +150 -0
- package/dist/maintenance.d.ts +11 -0
- package/dist/maintenance.js +35 -0
- package/dist/mate-cli.d.ts +52 -0
- package/dist/mate-cli.js +345 -0
- package/dist/mate-contract.d.ts +10 -0
- package/dist/mate-contract.js +30 -0
- package/dist/mate-doors.d.ts +69 -0
- package/dist/mate-doors.js +548 -0
- package/dist/mate-progress.d.ts +29 -0
- package/dist/mate-progress.js +121 -0
- package/dist/mate-tools.d.ts +94 -0
- package/dist/mate-tools.js +1878 -0
- package/dist/mate.d.ts +92 -0
- package/dist/mate.js +435 -0
- package/dist/mcp-connect.d.ts +103 -0
- package/dist/mcp-connect.js +252 -0
- package/dist/mcp.d.ts +27 -0
- package/dist/mcp.js +651 -0
- package/dist/memory-cli.d.ts +466 -0
- package/dist/memory-cli.js +111 -0
- package/dist/memory-pass.d.ts +160 -0
- package/dist/memory-pass.js +409 -0
- package/dist/metrics.d.ts +3 -0
- package/dist/metrics.js +56 -0
- package/dist/mobile-viewport.d.ts +3 -0
- package/dist/mobile-viewport.js +37 -0
- package/dist/model-catalog.d.ts +118 -0
- package/dist/model-catalog.js +376 -0
- package/dist/models-cli.d.ts +102 -0
- package/dist/models-cli.js +66 -0
- package/dist/models-ui.d.ts +34 -0
- package/dist/models-ui.js +68 -0
- package/dist/modes.d.ts +80 -0
- package/dist/modes.js +182 -0
- package/dist/monitoring-settings.d.ts +44 -0
- package/dist/monitoring-settings.js +173 -0
- package/dist/monitoring-ui.d.ts +20 -0
- package/dist/monitoring-ui.js +51 -0
- package/dist/monitoring.d.ts +34 -0
- package/dist/monitoring.js +221 -0
- package/dist/names.d.ts +67 -0
- package/dist/names.js +102 -0
- package/dist/observations.d.ts +40 -0
- package/dist/observations.js +211 -0
- package/dist/oidc.d.ts +71 -0
- package/dist/oidc.js +182 -0
- package/dist/onboard.d.ts +108 -0
- package/dist/onboard.js +325 -0
- package/dist/openrouter-models.d.ts +30 -0
- package/dist/openrouter-models.js +120 -0
- package/dist/operate.d.ts +118 -0
- package/dist/operate.js +11321 -0
- package/dist/peek-cli.d.ts +97 -0
- package/dist/peek-cli.js +215 -0
- package/dist/peek.d.ts +134 -0
- package/dist/peek.js +578 -0
- package/dist/phase-routing.d.ts +307 -0
- package/dist/phase-routing.js +658 -0
- package/dist/plan-auto.d.ts +14 -0
- package/dist/plan-auto.js +92 -0
- package/dist/plan.d.ts +186 -0
- package/dist/plan.js +401 -0
- package/dist/planner-source.d.ts +251 -0
- package/dist/planner-source.js +460 -0
- package/dist/planner.d.ts +75 -0
- package/dist/planner.js +992 -0
- package/dist/policy-ui.d.ts +20 -0
- package/dist/policy-ui.js +41 -0
- package/dist/policy.d.ts +111 -0
- package/dist/policy.js +231 -0
- package/dist/prepared-evidence.d.ts +16 -0
- package/dist/prepared-evidence.js +96 -0
- package/dist/pricing.d.ts +45 -0
- package/dist/pricing.js +77 -0
- package/dist/principal.d.ts +42 -0
- package/dist/principal.js +82 -0
- package/dist/probe.d.ts +46 -0
- package/dist/probe.js +79 -0
- package/dist/process-custody.d.ts +17 -0
- package/dist/process-custody.js +91 -0
- package/dist/process-liveness.d.ts +10 -0
- package/dist/process-liveness.js +81 -0
- package/dist/process-recovery-anchor.d.ts +75 -0
- package/dist/process-recovery-anchor.js +188 -0
- package/dist/process-recovery-coalition.d.ts +25 -0
- package/dist/process-recovery-coalition.js +105 -0
- package/dist/process-recovery-eligibility.d.ts +178 -0
- package/dist/process-recovery-eligibility.js +170 -0
- package/dist/process-recovery-native.d.ts +172 -0
- package/dist/process-recovery-native.js +592 -0
- package/dist/process-recovery-provenance.d.ts +163 -0
- package/dist/process-recovery-provenance.js +292 -0
- package/dist/process-recovery-services.d.ts +56 -0
- package/dist/process-recovery-services.js +191 -0
- package/dist/process-recovery-settlement.d.ts +32 -0
- package/dist/process-recovery-settlement.js +132 -0
- package/dist/process-recovery.d.ts +41 -0
- package/dist/process-recovery.js +91 -0
- package/dist/process-tree.d.ts +41 -0
- package/dist/process-tree.js +264 -0
- package/dist/project-access.d.ts +14 -0
- package/dist/project-access.js +34 -0
- package/dist/project-cli.d.ts +18 -0
- package/dist/project-cli.js +104 -0
- package/dist/project-delete-ui.d.ts +22 -0
- package/dist/project-delete-ui.js +48 -0
- package/dist/project-delete.d.ts +55 -0
- package/dist/project-delete.js +413 -0
- package/dist/project-knowledge.d.ts +111 -0
- package/dist/project-knowledge.js +241 -0
- package/dist/project-learning.d.ts +100 -0
- package/dist/project-learning.js +438 -0
- package/dist/project-memory.d.ts +81 -0
- package/dist/project-memory.js +264 -0
- package/dist/project-skills.d.ts +152 -0
- package/dist/project-skills.js +660 -0
- package/dist/project-tools.d.ts +219 -0
- package/dist/project-tools.js +796 -0
- package/dist/project.d.ts +61 -0
- package/dist/project.js +125 -0
- package/dist/prompt.d.ts +22 -0
- package/dist/prompt.js +72 -0
- package/dist/proof.d.ts +513 -0
- package/dist/proof.js +1140 -0
- package/dist/proposal.d.ts +82 -0
- package/dist/proposal.js +210 -0
- package/dist/provider-connection.d.ts +22 -0
- package/dist/provider-connection.js +98 -0
- package/dist/provider-limits.d.ts +35 -0
- package/dist/provider-limits.js +95 -0
- package/dist/provider.d.ts +279 -0
- package/dist/provider.js +935 -0
- package/dist/publish.d.ts +107 -0
- package/dist/publish.js +650 -0
- package/dist/pulls.d.ts +118 -0
- package/dist/pulls.js +240 -0
- package/dist/push.d.ts +95 -0
- package/dist/push.js +353 -0
- package/dist/quality.d.ts +8 -0
- package/dist/quality.js +6 -0
- package/dist/recipe-ui.d.ts +18 -0
- package/dist/recipe-ui.js +152 -0
- package/dist/recipes.d.ts +81 -0
- package/dist/recipes.js +332 -0
- package/dist/remote.d.ts +67 -0
- package/dist/remote.js +122 -0
- package/dist/render.d.ts +64 -0
- package/dist/render.js +587 -0
- package/dist/report-summary.d.ts +13 -0
- package/dist/report-summary.js +15 -0
- package/dist/repos.d.ts +65 -0
- package/dist/repos.js +277 -0
- package/dist/repository-context-ui.d.ts +2 -0
- package/dist/repository-context-ui.js +10 -0
- package/dist/repository-context.d.ts +67 -0
- package/dist/repository-context.js +376 -0
- package/dist/restart-certification.d.ts +134 -0
- package/dist/restart-certification.js +226 -0
- package/dist/result-actions.d.ts +28 -0
- package/dist/result-actions.js +270 -0
- package/dist/result-completion.d.ts +18 -0
- package/dist/result-completion.js +66 -0
- package/dist/result-review.d.ts +213 -0
- package/dist/result-review.js +430 -0
- package/dist/retention-ui.d.ts +12 -0
- package/dist/retention-ui.js +39 -0
- package/dist/retention.d.ts +72 -0
- package/dist/retention.js +288 -0
- package/dist/review-context.d.ts +243 -0
- package/dist/review-context.js +1043 -0
- package/dist/review-evidence.d.ts +33 -0
- package/dist/review-evidence.js +56 -0
- package/dist/reviewer.d.ts +97 -0
- package/dist/reviewer.js +202 -0
- package/dist/routine.d.ts +228 -0
- package/dist/routine.js +764 -0
- package/dist/runner.d.ts +266 -0
- package/dist/runner.js +399 -0
- package/dist/scan.d.ts +32 -0
- package/dist/scan.js +92 -0
- package/dist/scope.d.ts +695 -0
- package/dist/scope.js +1176 -0
- package/dist/scout-report.d.ts +42 -0
- package/dist/scout-report.js +108 -0
- package/dist/scout.d.ts +69 -0
- package/dist/scout.js +351 -0
- package/dist/serve.d.ts +313 -0
- package/dist/serve.js +21776 -0
- package/dist/session-brief.d.ts +8 -0
- package/dist/session-brief.js +24 -0
- package/dist/session-cli.d.ts +13 -0
- package/dist/session-cli.js +284 -0
- package/dist/session-contract.d.ts +183 -0
- package/dist/session-contract.js +122 -0
- package/dist/session-http.d.ts +19 -0
- package/dist/session-http.js +154 -0
- package/dist/session-server.d.ts +12 -0
- package/dist/session-server.js +37 -0
- package/dist/session-service.d.ts +22 -0
- package/dist/session-service.js +157 -0
- package/dist/setup-guide.d.ts +39 -0
- package/dist/setup-guide.js +93 -0
- package/dist/sign-in-guard.d.ts +45 -0
- package/dist/sign-in-guard.js +74 -0
- package/dist/skills-ui.d.ts +11 -0
- package/dist/skills-ui.js +58 -0
- package/dist/skills.d.ts +97 -0
- package/dist/skills.js +276 -0
- package/dist/slack-api.d.ts +55 -0
- package/dist/slack-api.js +229 -0
- package/dist/slack-chat.d.ts +28 -0
- package/dist/slack-chat.js +413 -0
- package/dist/slack-settings.d.ts +7 -0
- package/dist/slack-settings.js +75 -0
- package/dist/slack-state.d.ts +13 -0
- package/dist/slack-state.js +9 -0
- package/dist/slack.d.ts +13 -0
- package/dist/slack.js +167 -0
- package/dist/spend-ui.d.ts +28 -0
- package/dist/spend-ui.js +95 -0
- package/dist/spend.d.ts +142 -0
- package/dist/spend.js +313 -0
- package/dist/sqlite-runtime.d.ts +3 -0
- package/dist/sqlite-runtime.js +6 -0
- package/dist/sso-settings.d.ts +33 -0
- package/dist/sso-settings.js +103 -0
- package/dist/sso-ui.d.ts +22 -0
- package/dist/sso-ui.js +39 -0
- package/dist/storage.d.ts +15 -0
- package/dist/storage.js +84 -0
- package/dist/store.d.ts +7754 -0
- package/dist/store.js +23279 -0
- package/dist/structured-output.d.ts +58 -0
- package/dist/structured-output.js +103 -0
- package/dist/style-asset.d.ts +7 -0
- package/dist/style-asset.js +41 -0
- package/dist/subscription-chat.d.ts +46 -0
- package/dist/subscription-chat.js +275 -0
- package/dist/summary.d.ts +33 -0
- package/dist/summary.js +71 -0
- package/dist/supervisor.mjs +297 -0
- package/dist/surface.d.ts +63 -0
- package/dist/surface.js +352 -0
- package/dist/sync.d.ts +94 -0
- package/dist/sync.js +279 -0
- package/dist/task-composer.d.ts +13 -0
- package/dist/task-composer.js +52 -0
- package/dist/task-control.d.ts +165 -0
- package/dist/task-control.js +214 -0
- package/dist/task-outcome-cli.d.ts +10 -0
- package/dist/task-outcome-cli.js +92 -0
- package/dist/task-text.d.ts +30 -0
- package/dist/task-text.js +41 -0
- package/dist/team-cli.d.ts +15 -0
- package/dist/team-cli.js +618 -0
- package/dist/team-contract.d.ts +92 -0
- package/dist/team-contract.js +1 -0
- package/dist/team-http.d.ts +17 -0
- package/dist/team-http.js +144 -0
- package/dist/team-leads.d.ts +81 -0
- package/dist/team-leads.js +565 -0
- package/dist/team-runtime.d.ts +27 -0
- package/dist/team-runtime.js +264 -0
- package/dist/team-ui.d.ts +3 -0
- package/dist/team-ui.js +9 -0
- package/dist/team-updates.d.ts +8 -0
- package/dist/team-updates.js +57 -0
- package/dist/teammate-admin.d.ts +53 -0
- package/dist/teammate-admin.js +111 -0
- package/dist/teammate-desk.d.ts +60 -0
- package/dist/teammate-desk.js +154 -0
- package/dist/teammate-memory.d.ts +64 -0
- package/dist/teammate-memory.js +196 -0
- package/dist/teammate-question.d.ts +59 -0
- package/dist/teammate-question.js +175 -0
- package/dist/teammate-tools.d.ts +108 -0
- package/dist/teammate-tools.js +271 -0
- package/dist/teammate-week.d.ts +68 -0
- package/dist/teammate-week.js +132 -0
- package/dist/teammate-work.d.ts +76 -0
- package/dist/teammate-work.js +280 -0
- package/dist/teammates-ui.d.ts +20 -0
- package/dist/teammates-ui.js +166 -0
- package/dist/teammates.d.ts +180 -0
- package/dist/teammates.js +253 -0
- package/dist/teams-api.d.ts +33 -0
- package/dist/teams-api.js +204 -0
- package/dist/teams-chat.d.ts +26 -0
- package/dist/teams-chat.js +215 -0
- package/dist/teams-settings.d.ts +12 -0
- package/dist/teams-settings.js +57 -0
- package/dist/teams.d.ts +21 -0
- package/dist/teams.js +124 -0
- package/dist/telegram-flow.d.ts +49 -0
- package/dist/telegram-flow.js +110 -0
- package/dist/telegram-mate.d.ts +137 -0
- package/dist/telegram-mate.js +707 -0
- package/dist/telegram-progress.d.ts +14 -0
- package/dist/telegram-progress.js +129 -0
- package/dist/telegram-settings.d.ts +9 -0
- package/dist/telegram-settings.js +36 -0
- package/dist/telegram-status.d.ts +75 -0
- package/dist/telegram-status.js +265 -0
- package/dist/telegram-team.d.ts +85 -0
- package/dist/telegram-team.js +359 -0
- package/dist/telegram.d.ts +230 -0
- package/dist/telegram.js +1931 -0
- package/dist/templates.d.ts +65 -0
- package/dist/templates.js +118 -0
- package/dist/tool-launcher.d.ts +1 -0
- package/dist/tool-launcher.js +101 -0
- package/dist/tools-ui.d.ts +30 -0
- package/dist/tools-ui.js +40 -0
- package/dist/transitions-recipes.d.ts +1 -0
- package/dist/transitions-recipes.js +203 -0
- package/dist/tree-proof.d.ts +34 -0
- package/dist/tree-proof.js +58 -0
- package/dist/verification-evidence.d.ts +44 -0
- package/dist/verification-evidence.js +238 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +10 -0
- package/dist/webhooks.d.ts +91 -0
- package/dist/webhooks.js +283 -0
- package/dist/work-index.d.ts +68 -0
- package/dist/work-index.js +384 -0
- package/dist/work-summary.d.ts +57 -0
- package/dist/work-summary.js +116 -0
- package/dist/workspace-motion.d.ts +4 -0
- package/dist/workspace-motion.js +133 -0
- package/dist/workspace-revision.d.ts +19 -0
- package/dist/workspace-revision.js +92 -0
- package/dist/workspace-ui.d.ts +204 -0
- package/dist/workspace-ui.js +411 -0
- package/dist/worktree-notices.d.ts +13 -0
- package/dist/worktree-notices.js +17 -0
- package/dist/worktree.d.ts +249 -0
- package/dist/worktree.js +720 -0
- package/package.json +122 -0
- package/scripts/canary-assertions.mjs +42 -0
- package/scripts/crash-canary.mjs +253 -0
- package/scripts/fixtures/crash-process.mjs +74 -0
- package/scripts/fixtures/pilot-scenarios.mjs +85 -0
- package/scripts/fixtures/restart-service.mjs +27 -0
- package/scripts/launchd-certification.mjs +143 -0
- package/scripts/pilot.mjs +121 -0
- package/scripts/proof-preflight.mjs +140 -0
- package/scripts/provider-canary.mjs +379 -0
- package/scripts/recovery-canary.mjs +135 -0
- package/scripts/restart-certification.mjs +98 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Flows in the console: the list of a person's flows, and one flow's canvas
|
|
2
|
+
* (the React view's data, plus a plain fallback page the view replaces). */
|
|
3
|
+
import type { BrowserFlowView } from "./browser-workspace.js";
|
|
4
|
+
import type { FlowRow, Store } from "./store.js";
|
|
5
|
+
export declare const FLOWS_CSS = ".flows{max-width:880px;min-width:0}.flows .card{padding:16px 18px;margin:12px 0}.flows .flow-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.flows .flow-row h2{font-size:1.05rem;margin:0}.flows .flow-counts{font-size:.85rem;color:var(--so-muted)}.flows form{display:grid;gap:10px;margin:0}.flows label{display:grid;gap:6px}.flows input,.flows select{box-sizing:border-box;width:100%;max-width:100%}.flows button{justify-self:start;min-height:44px}.flows .flow-fallback ol{padding-left:20px}.flows summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}.flows .flow-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}@media(max-width:600px){.flows input,.flows select{font-size:16px}}";
|
|
6
|
+
/** The flows a person can open, with how many cards wait in each, and the new-flow form. */
|
|
7
|
+
export declare function flowsListHtml(store: Store, flows: readonly FlowRow[], projects: readonly string[], csrf: string, canCreate: boolean, problem: string | null): string;
|
|
8
|
+
/** One flow's canvas for one person. */
|
|
9
|
+
export declare function flowView(store: Store, flow: FlowRow, viewer: {
|
|
10
|
+
name: string;
|
|
11
|
+
approver: boolean;
|
|
12
|
+
}, selectedCard: number | null, setup?: {
|
|
13
|
+
dir: string | null;
|
|
14
|
+
repos: readonly string[];
|
|
15
|
+
startTrigger?: number | null;
|
|
16
|
+
sortReady?: boolean;
|
|
17
|
+
toolHome?: string;
|
|
18
|
+
}): BrowserFlowView;
|
|
19
|
+
/** The page the canvas replaces when scripts can't run: each zone and its cards, in order. */
|
|
20
|
+
export declare function flowFallbackHtml(view: BrowserFlowView): string;
|
package/dist/flows-ui.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { draftFor, flowDefinitionOf } from "./flow-engine.js";
|
|
2
|
+
import { describeTrigger, triggerHeadline, FLOW_TRIGGER_KINDS, FLOW_TRIGGER_WORDS, githubRepoOf, HOOK_PATH, hookReady, readHooksBase, readLinearKey, takesDeliveries, triggerConfigOf } from "./flow-triggers.js";
|
|
3
|
+
import { deciderOf, FLOW_COLORS, FLOW_KIND_WORDS, FLOW_STAGE_KINDS, FLOW_TEMPLATES } from "./flows.js";
|
|
4
|
+
import { flowInsights, troubleWords } from "./flow-insights.js";
|
|
5
|
+
import { parseSortDecision, sortChip } from "./flow-sort.js";
|
|
6
|
+
import { flowSecretNames, readEmailSettings, sendingReady } from "./flow-actions.js";
|
|
7
|
+
import { projectToolsOf, secretsSetFor, toolStanding } from "./project-tools.js";
|
|
8
|
+
import { flowFingerprint } from "./flow-live.js";
|
|
9
|
+
import { googleConnected } from "./google-mail.js";
|
|
10
|
+
import { mailboxReady } from "./mailbox.js";
|
|
11
|
+
import { labelOf, nameOf } from "./teammate-admin.js";
|
|
12
|
+
import { callWords, receiptWords } from "./teammate-tools.js";
|
|
13
|
+
import { undoFor } from "./teammate-week.js";
|
|
14
|
+
const e = (value) => String(value ?? "").replace(/[&<>"']/g, c => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[c]);
|
|
15
|
+
const projectName = (repo) => repo.split(/[\\/]/).filter(Boolean).pop() ?? repo;
|
|
16
|
+
export const FLOWS_CSS = `.flows{max-width:880px;min-width:0}.flows .card{padding:16px 18px;margin:12px 0}.flows .flow-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.flows .flow-row h2{font-size:1.05rem;margin:0}.flows .flow-counts{font-size:.85rem;color:var(--so-muted)}.flows form{display:grid;gap:10px;margin:0}.flows label{display:grid;gap:6px}.flows input,.flows select{box-sizing:border-box;width:100%;max-width:100%}.flows button{justify-self:start;min-height:44px}.flows .flow-fallback ol{padding-left:20px}.flows summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}.flows .flow-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}@media(max-width:600px){.flows input,.flows select{font-size:16px}}`;
|
|
17
|
+
/** The flows a person can open, with how many cards wait in each, and the new-flow form. */
|
|
18
|
+
export function flowsListHtml(store, flows, projects, csrf, canCreate, problem) {
|
|
19
|
+
const rows = flows.map(flow => {
|
|
20
|
+
const cards = store.flowCards(flow.id, false);
|
|
21
|
+
const definition = flowDefinitionOf(flow);
|
|
22
|
+
const waiting = cards.filter(card => definition?.stages.find(one => one.id === card.stage)?.kind === "approval").length;
|
|
23
|
+
const buttons = store.flowTriggers(flow.id).filter(one => one.state === "active").flatMap(one => { const config = triggerConfigOf(one); return config?.kind === "button" ? [{ id: one.id, label: config.label }] : []; });
|
|
24
|
+
const trouble = troubleWords(flowInsights(store, flow, new Date(), 7));
|
|
25
|
+
return `<article class="card"><div class="flow-row"><h2><a href="/flows/${flow.id}">${e(flow.name)}</a></h2><span class="flow-counts">${e(projectName(flow.repo))} · ${cards.length} card${cards.length === 1 ? "" : "s"} in progress${waiting > 0 ? ` · ${waiting} waiting for a decision` : ""}${trouble === null ? "" : ` · ${e(trouble)}`}</span></div>` +
|
|
26
|
+
(buttons.length === 0 ? "" : `<p class="flow-buttons">${buttons.map(one => `<a class="button-link" href="/flows/${flow.id}?start=${one.id}">${e(one.label)}</a>`).join(" ")}</p>`) + `</article>`;
|
|
27
|
+
}).join("");
|
|
28
|
+
const create = canCreate && projects.length > 0 ? `<details class="card"${flows.length === 0 ? " open" : ""}><summary>New flow</summary><form method="post" action="/flows/new"><input type="hidden" name="csrf" value="${e(csrf)}"><label>Name<input name="name" required maxlength="80" placeholder="for example: Bug fixes"></label><label>Project<select name="repo">${projects.map(repo => `<option value="${e(repo)}">${e(projectName(repo))}</option>`).join("")}</select></label><label>Start from<select name="template">${FLOW_TEMPLATES.map(one => `<option value="${e(one.id)}">${e(one.label)}: ${e(one.about)}</option>`).join("")}</select></label><button>Create flow</button></form></details>` : "";
|
|
29
|
+
// No flows yet: one click makes a working example with a sample question in it.
|
|
30
|
+
const example = flows.length === 0 && canCreate && projects.length > 0
|
|
31
|
+
? `<form method="post" action="/flows/example" class="card flow-example"><input type="hidden" name="csrf" value="${e(csrf)}"><h2>See a flow work</h2><p class="meta">Claude drafts a reply to a sample customer question; you approve it here or in your chat app.</p>${projects.length === 1 ? `<input type="hidden" name="repo" value="${e(projects[0])}">` : `<label>Project<select name="repo">${projects.map(repo => `<option value="${e(repo)}">${e(projectName(repo))}</option>`).join("")}</select></label>`}<button>Try an example</button></form>`
|
|
32
|
+
: "";
|
|
33
|
+
const intro = `<p class="meta">A flow is your process drawn as zones. Cards move through them: agents do the work, people approve, and the team hears about it.</p>` +
|
|
34
|
+
(canCreate && projects.length > 0 ? `<p class="flow-chat">Describe how work should move and your lead drafts the flow for you to confirm, or start from a template below. <a href="/chat?draft=${encodeURIComponent("Make a flow for ")}">Describe it in chat</a></p>` : "") +
|
|
35
|
+
`<p class="flow-chat">AI teammates can decide and handle cards for you, within rules you write. <a href="/teammates">Teammates</a> · or set one up with its flow in one click: <a href="/kits">Starter kits</a></p>`;
|
|
36
|
+
return `<section class="flows">${problem === null ? "" : `<p class="problem" role="alert">${e(problem)}</p>`}${intro}${rows || example || '<p class="meta">No flows yet.</p>'}${create}</section>`;
|
|
37
|
+
}
|
|
38
|
+
const historyText = (event, title, sorts = new Set()) => {
|
|
39
|
+
const who = event.actor === "flow" ? "" : ` by ${event.actor}`;
|
|
40
|
+
const note = event.note === null ? "" : `: ${event.note}`;
|
|
41
|
+
switch (event.outcome) {
|
|
42
|
+
case "created": return `Added to ${title(event.toStage)}${who}`;
|
|
43
|
+
case "approved": return `Approved${who}${note}`;
|
|
44
|
+
case "sent-back": return `Sent back to ${title(event.toStage)}${who}${note}`;
|
|
45
|
+
case "fail": return `Moved to ${title(event.toStage)} after a problem${note}`;
|
|
46
|
+
case "cancelled": return `Cancelled${who}`;
|
|
47
|
+
case "ok": return event.fromStage !== null && sorts.has(event.fromStage) ? `Sorted into ${title(event.toStage)}` : `Moved on to ${title(event.toStage)}${note}`;
|
|
48
|
+
default: return `Moved to ${title(event.toStage)}${who}${note}`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
/** One flow's canvas for one person. */
|
|
52
|
+
export function flowView(store, flow, viewer, selectedCard, setup = { dir: null, repos: [] }) {
|
|
53
|
+
const definition = flowDefinitionOf(flow);
|
|
54
|
+
const stages = definition?.stages ?? [];
|
|
55
|
+
const title = (id) => stages.find(one => one.id === id)?.title ?? id;
|
|
56
|
+
const sortZones = new Set(stages.filter(one => one.kind === "sort").map(one => one.id));
|
|
57
|
+
const decisions = sortZones.size === 0 ? new Map() : store.flowSortDecisions(flow.id);
|
|
58
|
+
const mates = new Map(store.teammates([flow.repo]).map(one => [one.id, one]));
|
|
59
|
+
const cards = store.flowCards(flow.id, true).filter(card => card.state === "active" || Date.now() - Date.parse(card.updatedAt) < 7 * 86_400_000).map((card) => {
|
|
60
|
+
const stage = stages.find(one => one.id === card.stage);
|
|
61
|
+
const task = card.task ?? card.primaryTask;
|
|
62
|
+
const discussion = store.flowComments(card.id);
|
|
63
|
+
const watchers = store.flowCardWatchers(card.id);
|
|
64
|
+
const decider = stage?.kind === "approval" ? deciderOf(stage, flow) : null;
|
|
65
|
+
// While its teammate is deciding (v92), the card isn't anyone else's to decide yet.
|
|
66
|
+
const teammateDeciding = stage?.teammate !== undefined && card.waiting !== null && card.waiting.endsWith(" is deciding");
|
|
67
|
+
const canDecide = viewer.approver && card.state === "active" && stage?.kind === "approval" && (decider === null || decider === viewer.name) && !teammateDeciding;
|
|
68
|
+
// History reads moves and ownership together, newest first.
|
|
69
|
+
const owned = discussion.filter(one => one.kind === "owner").map(one => ({ text: one.body === "" ? `${one.author} left it without an owner` : one.body === one.author ? `${one.author} took it on` : `${one.author} made ${one.body} the owner`, at: one.at }));
|
|
70
|
+
const moves = store.flowEvents(card.id).map(event => ({ text: historyText(event, title, sortZones), at: event.at }));
|
|
71
|
+
const decision = parseSortDecision(decisions.get(card.id)?.decisionJson ?? null);
|
|
72
|
+
const shown = stage?.kind === "approval" && definition !== null ? draftFor(definition, stage) : null;
|
|
73
|
+
// v91: when a Wait zone gives up (or moves on), or a zone's time limit comes.
|
|
74
|
+
const clock = stage?.wait ?? stage?.limit;
|
|
75
|
+
const until = card.state !== "active" || stage === undefined || clock === undefined ? null : new Date(Date.parse(store.flowCardEnteredAt(card.id) ?? card.updatedAt) + clock.minutes * 60_000);
|
|
76
|
+
const deadline = until === null || until.getTime() <= Date.now() ? null : {
|
|
77
|
+
at: until.toISOString(),
|
|
78
|
+
label: stage.wait !== undefined ? (stage.wait.for === "reply" ? "No reply by" : "Moves on at") : stage.limit.to !== null ? `Moves to ${title(stage.limit.to)} at` : "Reminder at",
|
|
79
|
+
};
|
|
80
|
+
// Its open question: one of its own, or (v94) a tool call waiting for approval.
|
|
81
|
+
const asked = card.state === "active" ? store.openTeammateQuestionOn(card.id, card.entry) : null;
|
|
82
|
+
const pending = asked?.toolCall == null ? null : store.teammateCall(asked.toolCall);
|
|
83
|
+
// A decision its teammate handed over carries what the teammate said (v92).
|
|
84
|
+
const turn = card.state === "active" && stage?.kind === "approval" && stage.teammate !== undefined ? store.flowStepRun(card.id, card.entry) : null;
|
|
85
|
+
let handoff = null;
|
|
86
|
+
if (turn !== null && turn.kind === "teammate" && turn.state === "passed") {
|
|
87
|
+
try {
|
|
88
|
+
const said = JSON.parse(turn.decisionJson ?? "{}");
|
|
89
|
+
const mate = store.teammateByHandle(flow.repo, stage.teammate);
|
|
90
|
+
if (said.action === "hand_off" && typeof said.note === "string" && said.note !== "" && mate !== null)
|
|
91
|
+
handoff = { from: labelOf(mate), note: said.note };
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
handoff = null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const asker = asked === null || asked.state !== "open" ? null : store.getTeammate(asked.teammate);
|
|
98
|
+
return {
|
|
99
|
+
id: card.id, title: card.title, description: card.description, stage: card.stage, state: card.state, waiting: card.waiting,
|
|
100
|
+
task: task === null ? null : { id: task, href: `/t/${encodeURIComponent(task)}` },
|
|
101
|
+
createdBy: card.createdBy, updatedAt: card.updatedAt,
|
|
102
|
+
canDecide,
|
|
103
|
+
outputs: Object.entries(card.outputs).map(([id, text]) => ({ stage: id, title: title(id), text })),
|
|
104
|
+
history: [...moves, ...owned].sort((a, b) => b.at.localeCompare(a.at)).slice(0, 30),
|
|
105
|
+
source: card.source,
|
|
106
|
+
owner: card.owner, watchers, watching: watchers.includes(viewer.name),
|
|
107
|
+
mine: card.owner === viewer.name || watchers.includes(viewer.name) || canDecide,
|
|
108
|
+
comments: discussion.filter(one => one.kind === "comment").map(one => ({ id: one.id, author: one.author, body: one.body, mentions: one.mentions, at: one.at })),
|
|
109
|
+
sorted: decision === null ? null : { chip: sortChip(decision), confident: decision.confident },
|
|
110
|
+
draft: shown === null || card.state !== "active" || card.outputs[shown.id] === undefined ? null : { zone: shown.id, title: shown.title, text: card.outputs[shown.id] },
|
|
111
|
+
deadline,
|
|
112
|
+
handoff,
|
|
113
|
+
question: asked === null || asked.state !== "open" || asker === null ? null
|
|
114
|
+
: { id: asked.id, from: labelOf(asker), question: asked.question, options: asked.options, askedOf: asked.askedOf, mine: asked.askedOf === viewer.name,
|
|
115
|
+
call: pending === null ? null : { why: pending.why, rule: pending.result ?? "" } },
|
|
116
|
+
calls: store.teammateCallsOn(card.id).slice(-30).map(call => {
|
|
117
|
+
const mate = mates.get(call.teammate) ?? null;
|
|
118
|
+
// A person's undo (v97) reads as theirs, and its outcome says what it undid.
|
|
119
|
+
return { id: call.id, who: call.undoOf !== null ? call.decidedBy ?? "A person" : mate === null ? "A teammate" : nameOf(mate), words: callWords(call.tool, call.action, call.input, 400), state: call.state, outcome: receiptWords(store, call),
|
|
120
|
+
why: call.undoOf !== null ? "" : call.why, result: call.state === "asked" ? null : call.result, at: call.createdAt, teammate: call.teammate, undo: viewer.approver ? undoFor(store, call) : null };
|
|
121
|
+
}),
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
const triggers = store.flowTriggers(flow.id).map(trigger => {
|
|
125
|
+
const config = triggerConfigOf(trigger);
|
|
126
|
+
return {
|
|
127
|
+
id: trigger.id, kind: trigger.kind, words: config === null ? "This trigger can't be read." : describeTrigger(config, store),
|
|
128
|
+
...(config === null ? { name: "Trigger", detail: "Can't be read" } : triggerHeadline(config, store)),
|
|
129
|
+
zone: title(config?.zone ?? definition?.start ?? ""), zoneId: config?.zone ?? definition?.start ?? "", state: trigger.state, status: trigger.lastOutcome, statusAt: trigger.lastAt, failing: trigger.failures > 0,
|
|
130
|
+
button: config?.kind === "button" ? { label: config.label, questions: config.questions } : null,
|
|
131
|
+
hook: config !== null && takesDeliveries(config) ? { ready: hookReady(trigger, setup.dir), needsSecret: config.kind === "linear" } : null,
|
|
132
|
+
checkable: ((config?.kind === "github" || config?.kind === "linear") && config.delivery === "poll") || config?.kind === "email" || (config?.kind === "schedule" && config.script !== undefined),
|
|
133
|
+
shared: config?.kind === "button" && trigger.hookHash !== null,
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
kind: "flow",
|
|
138
|
+
flow: { id: flow.id, name: flow.name, project: projectName(flow.repo), revision: flow.revision, href: `/flows/${flow.id}`, owner: flow.owner },
|
|
139
|
+
chatHref: `/chat?draft=${encodeURIComponent(`In the ${flow.name} flow, `)}`,
|
|
140
|
+
triggers,
|
|
141
|
+
triggerSetup: {
|
|
142
|
+
kinds: FLOW_TRIGGER_KINDS.map(kind => ({ kind, label: FLOW_TRIGGER_WORDS[kind] })),
|
|
143
|
+
githubRepo: githubRepoOf(flow.repo), linearKey: readLinearKey(setup.dir) !== null, hooksBase: readHooksBase(setup.dir), hooksPath: HOOK_PATH,
|
|
144
|
+
mailbox: mailboxReady(setup.dir) ? googleConnected(setup.dir)?.address ?? readEmailSettings(setup.dir)?.from ?? null : null,
|
|
145
|
+
otherFlows: store.listFlows(setup.repos).filter(one => one.id !== flow.id).map(one => ({ id: one.id, name: one.name, zones: (flowDefinitionOf(one)?.stages ?? []).map(stage => ({ id: stage.id, title: stage.title })) })),
|
|
146
|
+
},
|
|
147
|
+
startTrigger: setup.startTrigger ?? null,
|
|
148
|
+
me: viewer.name,
|
|
149
|
+
sortReady: setup.sortReady ?? false,
|
|
150
|
+
teammates: store.teammates([flow.repo]).map(mate => ({ handle: mate.handle, label: labelOf(mate), name: nameOf(mate), working: mate.state === "active", href: `/teammates/${mate.id}` })),
|
|
151
|
+
emailReady: sendingReady(setup.dir),
|
|
152
|
+
requestSecrets: flowSecretNames(setup.dir, flow.repo),
|
|
153
|
+
tools: projectToolsOf(store, flow.repo).map(tool => ({ name: tool.name, about: tool.spec.about, functions: tool.lastTest?.ok === true ? tool.lastTest.tools : [],
|
|
154
|
+
ready: toolStanding(tool, secretsSetFor(flow.repo, tool.spec, setup.toolHome)).ready })),
|
|
155
|
+
scripts: store.flowScripts(flow.repo).map(script => ({ name: script.name, about: script.about, body: script.body, timeoutMinutes: script.timeoutMinutes, version: script.version, savedBy: script.savedBy, savedAt: script.savedAt,
|
|
156
|
+
language: script.language, file: script.file,
|
|
157
|
+
usedHere: stages.filter(stage => stage.kind === "check" && stage.script === script.name).map(stage => stage.title) })),
|
|
158
|
+
start: definition?.start ?? stages[0]?.id ?? "",
|
|
159
|
+
stages,
|
|
160
|
+
cards,
|
|
161
|
+
selectedCard,
|
|
162
|
+
live: flowFingerprint(store, flow.id),
|
|
163
|
+
canEdit: viewer.approver,
|
|
164
|
+
approvers: store.listApprovers().map(one => one.name).filter(name => store.accountCanAccess(name, flow.repo)),
|
|
165
|
+
kinds: FLOW_STAGE_KINDS.map(kind => ({ kind, label: FLOW_KIND_WORDS[kind].label, about: FLOW_KIND_WORDS[kind].about })),
|
|
166
|
+
colors: [...FLOW_COLORS],
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/** The page the canvas replaces when scripts can't run: each zone and its cards, in order. */
|
|
170
|
+
export function flowFallbackHtml(view) {
|
|
171
|
+
return `<section class="flows flow-fallback"><p class="meta">${e(view.flow.project)}</p><ol>${view.stages.map(stage => {
|
|
172
|
+
const cards = view.cards.filter(card => card.stage === stage.id && card.state === "active");
|
|
173
|
+
return `<li><strong>${e(stage.title)}</strong> · ${e(FLOW_KIND_WORDS[stage.kind].label)}${cards.length === 0 ? "" : `<ul>${cards.map(card => `<li>${e(card.title)}${card.waiting === null ? "" : ` — ${e(card.waiting)}`}</li>`).join("")}</ul>`}</li>`;
|
|
174
|
+
}).join("")}</ol></section>`;
|
|
175
|
+
}
|
package/dist/flows.d.ts
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export declare const FLOW_STAGE_KINDS: readonly ["inbox", "task", "report", "approval", "check", "update", "notify", "sort", "draft", "request", "email", "tool", "wait", "teammate", "done"];
|
|
2
|
+
export type FlowStageKind = (typeof FLOW_STAGE_KINDS)[number];
|
|
3
|
+
export declare const FLOW_COLORS: readonly ["slate", "blue", "violet", "amber", "green", "rose"];
|
|
4
|
+
export type FlowColor = (typeof FLOW_COLORS)[number];
|
|
5
|
+
export type FlowZone = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
w: number;
|
|
9
|
+
h: number;
|
|
10
|
+
color: FlowColor;
|
|
11
|
+
};
|
|
12
|
+
/** One answer a sort zone can pick: its name, what it means (what Jev reads), and the zone it sends the card to. */
|
|
13
|
+
export type FlowSortAnswer = {
|
|
14
|
+
answer: string;
|
|
15
|
+
means: string;
|
|
16
|
+
to: string;
|
|
17
|
+
};
|
|
18
|
+
/** Something else a sort zone notes on the card: a score on a scale of levels, or a yes/no. */
|
|
19
|
+
export type FlowSortNote = {
|
|
20
|
+
id: string;
|
|
21
|
+
kind: "score" | "yes-no";
|
|
22
|
+
question: string;
|
|
23
|
+
levels: string[] | null;
|
|
24
|
+
};
|
|
25
|
+
/** sort: the question, its answers, how sure Jev must be to act alone (0.5–0.99), and what else it notes. */
|
|
26
|
+
export type FlowSort = {
|
|
27
|
+
question: string;
|
|
28
|
+
answers: FlowSortAnswer[];
|
|
29
|
+
sureAt: number;
|
|
30
|
+
notes: FlowSortNote[];
|
|
31
|
+
};
|
|
32
|
+
/** request: what is called. The address's scheme and host are fixed; fill-ins go in its path and query (encoded), headers and body. */
|
|
33
|
+
export type FlowRequest = {
|
|
34
|
+
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
35
|
+
url: string;
|
|
36
|
+
headers: Record<string, string>;
|
|
37
|
+
body: string | null;
|
|
38
|
+
};
|
|
39
|
+
/** email: who it goes to, the subject and the text — all with fill-ins. */
|
|
40
|
+
export type FlowEmail = {
|
|
41
|
+
to: string;
|
|
42
|
+
subject: string;
|
|
43
|
+
body: string;
|
|
44
|
+
};
|
|
45
|
+
/** tool: which of the project's tools (MCP servers), which of its functions, and the arguments as JSON with fill-ins. */
|
|
46
|
+
export type FlowTool = {
|
|
47
|
+
server: string;
|
|
48
|
+
name: string;
|
|
49
|
+
args: string;
|
|
50
|
+
};
|
|
51
|
+
/** wait (v91): for a reply to the card's email (next: replied, onFail: no reply in time), or for a set time (then next). */
|
|
52
|
+
export type FlowWait = {
|
|
53
|
+
for: "reply" | "time";
|
|
54
|
+
minutes: number;
|
|
55
|
+
};
|
|
56
|
+
/** A time limit on a zone (v91): after this long, the person it waits on is reminded, and a Holding or
|
|
57
|
+
* "Person decides" zone can move the card on (`to`). */
|
|
58
|
+
export type FlowLimit = {
|
|
59
|
+
minutes: number;
|
|
60
|
+
to: string | null;
|
|
61
|
+
};
|
|
62
|
+
export type FlowStage = {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
kind: FlowStageKind;
|
|
66
|
+
zone: FlowZone;
|
|
67
|
+
/** task/report: what the agent is asked to do. `{{card.title}}`,
|
|
68
|
+
* `{{card.description}}`, `{{note}}` (the latest send-back note) and
|
|
69
|
+
* `{{stage.<id>}}` (an earlier zone's report) are filled in. */
|
|
70
|
+
instructions: string | null;
|
|
71
|
+
/** task: plan first (required), let Toolroll decide (auto), or build directly (skip). */
|
|
72
|
+
planning: "auto" | "required" | "skip" | null;
|
|
73
|
+
/** approval: the one person who decides, or null for any approver on the project. */
|
|
74
|
+
approver: string | null;
|
|
75
|
+
/** approval: the flow's owner decides (v86), whoever that is when the card arrives; `approver` is then unused. */
|
|
76
|
+
toOwner?: boolean;
|
|
77
|
+
/** notify: the message; update: the comment left on the issue. Same fill-ins. */
|
|
78
|
+
message: string | null;
|
|
79
|
+
/** update: also close the issue (Linear: move it to the team's done state). */
|
|
80
|
+
close: boolean | null;
|
|
81
|
+
/** check: the project script (by name) run with no AI. */
|
|
82
|
+
script: string | null;
|
|
83
|
+
/** check (v90): where it runs — a clean folder, or a copy of the card's work (the default for zones made before v90);
|
|
84
|
+
* the answers a script's "goto:" line may pick, each with the zone it leads to; and the flow secrets it gets as variables. */
|
|
85
|
+
runIn?: "folder" | "copy";
|
|
86
|
+
routes?: {
|
|
87
|
+
answer: string;
|
|
88
|
+
to: string;
|
|
89
|
+
}[];
|
|
90
|
+
secrets?: string[];
|
|
91
|
+
/** sort: what Jev is asked and where each answer leads. Its onFail is where a card goes when Jev isn't sure. */
|
|
92
|
+
sort: FlowSort | null;
|
|
93
|
+
/** request, email, tool (v87): what the step sends, and to where. */
|
|
94
|
+
request?: FlowRequest;
|
|
95
|
+
email?: FlowEmail;
|
|
96
|
+
tool?: FlowTool;
|
|
97
|
+
/** wait (v91): what it waits for, and how long. */
|
|
98
|
+
wait?: FlowWait;
|
|
99
|
+
/** Any zone but Wait and Done (v91): how long a card may sit here before someone is reminded. */
|
|
100
|
+
limit?: FlowLimit;
|
|
101
|
+
/** v92: the AI teammate (by handle) who decides a "Person decides" zone (handing hard ones to its person), or handles a "Teammate handles it" zone. */
|
|
102
|
+
teammate?: string;
|
|
103
|
+
/** v96: a "Teammate handles it" zone sends what the teammate writes back to whoever asked (the person who added the card, its chat thread, or the teammate's manager). */
|
|
104
|
+
reply?: boolean;
|
|
105
|
+
/** Where a card goes when this zone's step succeeds, and when it fails or is sent back (sort: when it isn't sure). */
|
|
106
|
+
next: string | null;
|
|
107
|
+
onFail: string | null;
|
|
108
|
+
};
|
|
109
|
+
export type FlowDefinition = {
|
|
110
|
+
version: 1;
|
|
111
|
+
start: string;
|
|
112
|
+
stages: FlowStage[];
|
|
113
|
+
};
|
|
114
|
+
/** What each kind is called and does, in the words the canvas uses. */
|
|
115
|
+
export declare const FLOW_KIND_WORDS: Record<FlowStageKind, {
|
|
116
|
+
label: string;
|
|
117
|
+
about: string;
|
|
118
|
+
}>;
|
|
119
|
+
/** A project script's name: short, lowercase, dashes — how zones and chat refer to it. */
|
|
120
|
+
export declare const SCRIPT_NAME: RegExp;
|
|
121
|
+
/** The languages a project script is written in (v90). */
|
|
122
|
+
export declare const SCRIPT_LANGUAGES: readonly ["shell", "python", "node"];
|
|
123
|
+
export type ScriptLanguage = (typeof SCRIPT_LANGUAGES)[number];
|
|
124
|
+
export declare const LANGUAGE_WORDS: Record<ScriptLanguage, string>;
|
|
125
|
+
/** How an answer is named to Jev: its words as a short key. */
|
|
126
|
+
export declare const sortKeyOf: (answer: string) => string;
|
|
127
|
+
/** The default for "sure enough to act alone". */
|
|
128
|
+
export declare const SORT_SURE_AT = 0.8;
|
|
129
|
+
/** The longest a zone waits or a limit runs: 30 days. */
|
|
130
|
+
export declare const LONGEST_WAIT_MINUTES: number;
|
|
131
|
+
/** "3 days", "4 hours", "90 minutes", "1 week" (or a number of minutes) as minutes; null when it isn't one. */
|
|
132
|
+
export declare function durationMinutes(value: unknown): number | null;
|
|
133
|
+
/** Minutes in the words people use: "3 days", "1 day 4 hours", "45 minutes". */
|
|
134
|
+
export declare function durationWords(minutes: number): string;
|
|
135
|
+
/** Who decides at an approval zone: its named person, the flow's owner, or null for anyone who approves on the project. */
|
|
136
|
+
export declare function deciderOf(stage: Pick<FlowStage, "approver" | "toOwner">, flow: {
|
|
137
|
+
owner: string;
|
|
138
|
+
}): string | null;
|
|
139
|
+
/** A flow as drawn on the canvas, checked whole. Throws in plain words. */
|
|
140
|
+
export declare function validateFlowDefinition(input: unknown): FlowDefinition;
|
|
141
|
+
/** What a card's work is held to: the zones' steps and paths, never where they sit on the canvas. */
|
|
142
|
+
export declare function flowDigest(definition: FlowDefinition): string;
|
|
143
|
+
/** Fill a zone's text from the card: title, description, the latest note and earlier zones' reports. */
|
|
144
|
+
export declare function fillFlowText(template: string, card: {
|
|
145
|
+
title: string;
|
|
146
|
+
description: string | null;
|
|
147
|
+
note: string | null;
|
|
148
|
+
outputs: Record<string, string>;
|
|
149
|
+
}, encode?: (value: string) => string): string;
|
|
150
|
+
/** The first email address a card mentions, or "" — what {{card.email}} holds. */
|
|
151
|
+
export declare function cardEmailOf(card: {
|
|
152
|
+
title: string;
|
|
153
|
+
description: string | null;
|
|
154
|
+
}): string;
|
|
155
|
+
/** A step as the lead describes it, in list order. A step that keeps an
|
|
156
|
+
* existing zone (by `id`) carries over whatever it leaves out. */
|
|
157
|
+
export type FlowStepInput = {
|
|
158
|
+
id?: string;
|
|
159
|
+
title?: string;
|
|
160
|
+
kind?: FlowStageKind;
|
|
161
|
+
instructions?: string;
|
|
162
|
+
planning?: "auto" | "required" | "skip";
|
|
163
|
+
decider?: string | null;
|
|
164
|
+
message?: string;
|
|
165
|
+
script?: string;
|
|
166
|
+
close?: boolean;
|
|
167
|
+
/** check (v90): "folder" (a clean folder) or "copy" (a copy of the card's work); the answers a "goto:" line picks, each with the step it goes to; saved secrets it gets. */
|
|
168
|
+
runIn?: "folder" | "copy";
|
|
169
|
+
routes?: {
|
|
170
|
+
answer?: string;
|
|
171
|
+
goesTo?: string;
|
|
172
|
+
}[];
|
|
173
|
+
secrets?: string[];
|
|
174
|
+
/** sort: the question, each answer with what it means and the step it goes to, how sure Jev must be (a percentage), and up to 3 other things to note. */
|
|
175
|
+
question?: string;
|
|
176
|
+
answers?: {
|
|
177
|
+
answer?: string;
|
|
178
|
+
means?: string;
|
|
179
|
+
goesTo?: string;
|
|
180
|
+
}[];
|
|
181
|
+
sureAt?: number;
|
|
182
|
+
alsoNote?: {
|
|
183
|
+
question?: string;
|
|
184
|
+
kind?: "score" | "yes-no";
|
|
185
|
+
levels?: string[];
|
|
186
|
+
}[];
|
|
187
|
+
/** request: method, address, headers and body; email: to, subject, body; tool: the tool (server), its function (tool) and arguments. */
|
|
188
|
+
method?: FlowRequest["method"];
|
|
189
|
+
url?: string;
|
|
190
|
+
headers?: Record<string, string>;
|
|
191
|
+
body?: string;
|
|
192
|
+
to?: string;
|
|
193
|
+
subject?: string;
|
|
194
|
+
server?: string;
|
|
195
|
+
tool?: string;
|
|
196
|
+
args?: Record<string, unknown> | string;
|
|
197
|
+
/** wait (v91): for a reply (the default) or a set time, and how long ("3 days"); where a card goes when no reply comes. */
|
|
198
|
+
waitFor?: "reply" | "time";
|
|
199
|
+
wait?: string | number;
|
|
200
|
+
ifNoReply?: string;
|
|
201
|
+
/** Any step but wait and done (v91): remind after this long ("2 days"; "none" removes it), and on holding and approval steps, move the card to this step then. */
|
|
202
|
+
remindAfter?: string | number;
|
|
203
|
+
thenMoveTo?: string;
|
|
204
|
+
/** v92: the AI teammate (by name) who decides an approval step (handing hard ones to its decider) or handles a teammate step. */
|
|
205
|
+
teammate?: string;
|
|
206
|
+
/** v96: a teammate step sends what it writes back to whoever asked. */
|
|
207
|
+
reply?: boolean;
|
|
208
|
+
next?: string;
|
|
209
|
+
ifFails?: string;
|
|
210
|
+
ifNotSure?: string;
|
|
211
|
+
};
|
|
212
|
+
/** What a draft zone asks for when the steps leave it out. */
|
|
213
|
+
export declare const DRAFT_DEFAULT = "Write a short, friendly reply to the person who sent this card, in plain words.";
|
|
214
|
+
/**
|
|
215
|
+
* A flow from an ordered list of steps: ids from names, each step leading
|
|
216
|
+
* to the next, a Done zone at the end when none is listed, and a decision
|
|
217
|
+
* sending work back to the nearest earlier step that does work. New zones
|
|
218
|
+
* are laid out in rows; zones kept from `previous` keep their place.
|
|
219
|
+
*/
|
|
220
|
+
export declare function flowFromSteps(input: unknown, previous?: FlowDefinition | null): FlowDefinition;
|
|
221
|
+
/** What confirming a new or changed flow means, in the canvas's words: each step's job and path, what changed, and that the usual approvals still apply. */
|
|
222
|
+
export declare function flowTerms(definition: FlowDefinition, previous: FlowDefinition | null): string[];
|
|
223
|
+
/** Ready-made flows: the coding flow is the whole business process around a change. */
|
|
224
|
+
export declare const FLOW_TEMPLATES: readonly {
|
|
225
|
+
id: string;
|
|
226
|
+
label: string;
|
|
227
|
+
about: string;
|
|
228
|
+
definition: FlowDefinition;
|
|
229
|
+
}[];
|