toolroll 0.9.62 → 0.9.65
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 +80 -0
- package/README.md +66 -8
- package/dist/acp-agents.d.ts +43 -0
- package/dist/acp-agents.js +62 -0
- package/dist/acp-attest.d.ts +44 -0
- package/dist/acp-attest.js +269 -0
- package/dist/acp-check.d.ts +28 -0
- package/dist/acp-check.js +410 -0
- package/dist/acp-client.d.ts +163 -0
- package/dist/acp-client.js +738 -0
- package/dist/acp-inspect.d.ts +23 -0
- package/dist/acp-inspect.js +109 -0
- package/dist/agent-board.d.ts +19 -6
- package/dist/agent-board.js +30 -9
- package/dist/agent-fence.d.ts +203 -10
- package/dist/agent-fence.js +623 -41
- package/dist/agent-pulse.js +9 -2
- package/dist/agent-state-words.d.ts +19 -0
- package/dist/agent-state-words.js +20 -0
- package/dist/agent-state.d.ts +65 -0
- package/dist/agent-state.js +229 -0
- package/dist/agentconfig.js +36 -13
- package/dist/agents-board.d.ts +34 -2
- package/dist/agents-board.js +110 -1
- package/dist/approval-rules-ui.js +2 -2
- package/dist/assignment-delivery.d.ts +14 -0
- package/dist/assignment-delivery.js +13 -0
- package/dist/assignment.js +13 -0
- package/dist/attest.js +7 -0
- package/dist/backup-ui.js +2 -2
- package/dist/browser/THIRD_PARTY_NOTICES.txt +48 -0
- package/dist/browser/terminal.css +37 -0
- package/dist/browser/terminal.js +117 -0
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +42 -38
- package/dist/browser-shell.js +6 -3
- package/dist/browser-workspace.d.ts +263 -1
- package/dist/browser-workspace.js +60 -0
- package/dist/builder.d.ts +6 -1
- package/dist/builder.js +34 -13
- package/dist/chat-actions.d.ts +13 -1
- package/dist/chat-actions.js +199 -17
- package/dist/chat-ask.d.ts +4 -0
- package/dist/chat-ask.js +14 -0
- package/dist/chat-channel.js +20 -0
- package/dist/chat-continuity.js +5 -4
- package/dist/chat-decide.d.ts +0 -14
- package/dist/chat-decide.js +4 -1
- package/dist/chat-delivery.d.ts +9 -0
- package/dist/chat-delivery.js +45 -6
- package/dist/chat-messages.d.ts +8 -0
- package/dist/chat-messages.js +36 -4
- package/dist/check-levels-ui.js +2 -2
- package/dist/check-levels.js +3 -0
- package/dist/checkout-proof.d.ts +28 -0
- package/dist/checkout-proof.js +62 -0
- package/dist/claim.d.ts +12 -0
- package/dist/claim.js +20 -1
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +5 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +24 -2
- package/dist/coding-ui.js +6 -4
- package/dist/console-instance.d.ts +124 -0
- package/dist/console-instance.js +337 -0
- package/dist/contracts/chat-actions.d.ts +16 -0
- package/dist/contracts/chat-actions.js +4 -0
- package/dist/contracts/chat-content.d.ts +19 -0
- package/dist/contracts/chat-content.js +6 -0
- package/dist/contracts/cli.d.ts +8 -0
- package/dist/contracts/cli.js +3 -1
- package/dist/contracts/console-api.d.ts +30 -4
- package/dist/contracts/console-api.js +13 -4
- package/dist/contracts/flow-card.d.ts +4 -0
- package/dist/contracts/flow-card.js +3 -0
- package/dist/contracts/flow.d.ts +46 -0
- package/dist/contracts/flow.js +11 -2
- package/dist/contracts/integration-metadata.d.ts +2 -1
- package/dist/contracts/integration-metadata.js +2 -1
- package/dist/contracts/lead-tools.d.ts +92 -0
- package/dist/contracts/lead-tools.js +13 -0
- package/dist/contracts/provider.d.ts +11 -1
- package/dist/contracts/provider.js +1 -1
- package/dist/contracts/route.d.ts +76 -1
- package/dist/contracts/route.js +1 -1
- package/dist/contracts/store-json.d.ts +2 -0
- package/dist/control-setup.d.ts +1 -1
- package/dist/control-ui.js +2 -2
- package/dist/converse.d.ts +16 -0
- package/dist/converse.js +32 -4
- package/dist/demo-chat.js +4 -4
- package/dist/demo.js +2 -2
- package/dist/desktop-update-gate.js +6 -0
- package/dist/discord-chat.js +4 -1
- package/dist/dispatch.js +7 -4
- package/dist/doctor.d.ts +53 -0
- package/dist/doctor.js +427 -0
- package/dist/egress-bridge.d.ts +17 -0
- package/dist/egress-bridge.js +111 -0
- package/dist/egress.d.ts +119 -0
- package/dist/egress.js +423 -0
- package/dist/evidence-pack.d.ts +1 -1
- package/dist/evidence-pack.js +2 -2
- package/dist/exec.d.ts +81 -0
- package/dist/exec.js +368 -9
- package/dist/export-ui.js +2 -2
- package/dist/flow-code.d.ts +2 -2
- package/dist/flow-code.js +4 -15
- package/dist/flow-engine.js +35 -11
- package/dist/flow-gallery-ui.js +2 -2
- package/dist/flow-gallery.js +27 -8
- package/dist/flow-share.js +16 -5
- package/dist/flow-triggers.d.ts +84 -11
- package/dist/flow-triggers.js +554 -87
- package/dist/flow-unattended-words.d.ts +28 -0
- package/dist/flow-unattended-words.js +50 -0
- package/dist/flow-unattended.d.ts +227 -0
- package/dist/flow-unattended.js +776 -0
- package/dist/flows-cli.d.ts +28 -1
- package/dist/flows-cli.js +63 -12
- package/dist/flows-ui.d.ts +2 -3
- package/dist/flows-ui.js +56 -5
- package/dist/flows.d.ts +4 -0
- package/dist/flows.js +9 -1
- package/dist/google-mail.d.ts +1 -0
- package/dist/google-mail.js +61 -18
- package/dist/html.d.ts +9 -0
- package/dist/html.js +11 -0
- package/dist/integrations-ui.d.ts +2 -1
- package/dist/integrations-ui.js +6 -3
- package/dist/integrations.d.ts +17 -3
- package/dist/integrations.js +38 -18
- package/dist/invoke.d.ts +17 -0
- package/dist/invoke.js +510 -182
- package/dist/keys.d.ts +18 -14
- package/dist/keys.js +5 -0
- package/dist/landed-cleanup.d.ts +3 -2
- package/dist/landed-cleanup.js +12 -5
- package/dist/lead-capabilities.js +3 -2
- package/dist/lead-contract.js +2 -0
- package/dist/lead-doors.d.ts +2 -0
- package/dist/lead-doors.js +7 -0
- package/dist/lead-follow.d.ts +2 -0
- package/dist/lead-follow.js +58 -2
- package/dist/lead-progress.js +1 -0
- package/dist/lead-queue-runtime.d.ts +46 -0
- package/dist/lead-queue-runtime.js +191 -0
- package/dist/lead-queue.d.ts +104 -0
- package/dist/lead-queue.js +187 -0
- package/dist/lead-sweep.d.ts +67 -0
- package/dist/lead-sweep.js +99 -0
- package/dist/lead-tools.d.ts +22 -0
- package/dist/lead-tools.js +163 -4
- package/dist/lead.d.ts +13 -5
- package/dist/lead.js +89 -29
- package/dist/limits-ui.d.ts +8 -1
- package/dist/limits-ui.js +26 -0
- package/dist/live-bus.d.ts +8 -0
- package/dist/live-bus.js +40 -4
- package/dist/live-detail.d.ts +27 -0
- package/dist/live-detail.js +57 -0
- package/dist/live-notes.d.ts +20 -0
- package/dist/live-notes.js +47 -0
- package/dist/live-records.d.ts +140 -0
- package/dist/live-records.js +935 -0
- package/dist/live-terminal.d.ts +258 -0
- package/dist/live-terminal.js +649 -0
- package/dist/live.d.ts +38 -27
- package/dist/live.js +142 -124
- package/dist/mcp-connect.d.ts +8 -7
- package/dist/mcp-connect.js +49 -51
- package/dist/mcp-oauth.d.ts +6 -3
- package/dist/mcp-oauth.js +8 -4
- package/dist/memory-pass.js +2 -2
- package/dist/mobile-viewport.d.ts +5 -1
- package/dist/mobile-viewport.js +18 -2
- package/dist/model-catalog.js +4 -0
- package/dist/monitoring-ui.js +2 -2
- package/dist/needs-you.d.ts +1 -1
- package/dist/needs-you.js +11 -4
- package/dist/oauth-run-token.d.ts +51 -0
- package/dist/oauth-run-token.js +127 -0
- package/dist/operate.d.ts +2 -0
- package/dist/operate.js +282 -18
- package/dist/passwordless.d.ts +23 -0
- package/dist/passwordless.js +26 -0
- package/dist/peek-cli.d.ts +12 -4
- package/dist/peek-cli.js +19 -11
- package/dist/phase-routing.js +10 -3
- package/dist/plan-auto.d.ts +11 -0
- package/dist/plan-auto.js +62 -11
- package/dist/planner-source.d.ts +3 -0
- package/dist/planner-source.js +14 -0
- package/dist/planner.d.ts +2 -1
- package/dist/planner.js +7 -1
- package/dist/policy-ui.js +2 -2
- package/dist/policy.d.ts +1 -20
- package/dist/policy.js +29 -2
- package/dist/process-recovery-eligibility.d.ts +1 -1
- package/dist/project-access.d.ts +3 -0
- package/dist/project-access.js +3 -0
- package/dist/project-delete-ui.d.ts +12 -0
- package/dist/project-delete-ui.js +41 -9
- package/dist/project-delete.d.ts +3 -1
- package/dist/project-delete.js +12 -6
- package/dist/project-file.d.ts +3 -0
- package/dist/project-file.js +16 -0
- package/dist/project-memory.d.ts +3 -1
- package/dist/project-memory.js +57 -25
- package/dist/project-tools.d.ts +103 -27
- package/dist/project-tools.js +399 -100
- package/dist/provider-auth.d.ts +4 -3
- package/dist/provider-auth.js +5 -4
- package/dist/provider-connection.d.ts +2 -1
- package/dist/provider-connection.js +5 -0
- package/dist/provider-home.d.ts +22 -0
- package/dist/provider-home.js +99 -0
- package/dist/provider.d.ts +42 -5
- package/dist/provider.js +97 -19
- package/dist/pull-request-ui.js +2 -2
- package/dist/push.js +1 -1
- package/dist/quick-start.d.ts +24 -0
- package/dist/quick-start.js +127 -0
- package/dist/release.d.ts +3 -0
- package/dist/release.js +14 -8
- package/dist/remote-main.d.ts +4 -0
- package/dist/remote-main.js +3 -3
- package/dist/request-budget-ui.js +2 -2
- package/dist/result-review.d.ts +1 -1
- package/dist/result-review.js +9 -3
- package/dist/retention-ui.js +2 -2
- package/dist/retention.js +10 -1
- package/dist/run-efficiency.d.ts +73 -0
- package/dist/run-efficiency.js +228 -0
- package/dist/runner.d.ts +5 -1
- package/dist/runner.js +22 -1
- package/dist/scope.d.ts +171 -6
- package/dist/scope.js +251 -31
- package/dist/scout-net.d.ts +4 -1
- package/dist/scout-net.js +37 -12
- package/dist/scout.d.ts +20 -6
- package/dist/scout.js +27 -3
- package/dist/serve.js +258 -43
- package/dist/server/chat.d.ts +1 -1
- package/dist/server/chat.js +122 -31
- package/dist/server/chrome.d.ts +6 -1
- package/dist/server/chrome.js +18 -7
- package/dist/server/console.css +52 -38
- package/dist/server/flows.js +65 -13
- package/dist/server/guards.d.ts +1 -0
- package/dist/server/guards.js +23 -9
- package/dist/server/http.d.ts +7 -0
- package/dist/server/http.js +3 -2
- package/dist/server/live.d.ts +34 -1
- package/dist/server/live.js +39 -17
- package/dist/server/pages-assets.js +5 -0
- package/dist/server/pages.js +90 -13
- package/dist/server/people-tokens.d.ts +3 -0
- package/dist/server/people-tokens.js +55 -17
- package/dist/server/remote-hooks.js +12 -6
- package/dist/server/remote.d.ts +2 -1
- package/dist/server/remote.js +14 -5
- package/dist/server/render-chat.d.ts +12 -3
- package/dist/server/render-chat.js +47 -16
- package/dist/server/render-pages.d.ts +4 -1
- package/dist/server/render-pages.js +5 -4
- package/dist/server/render-people.d.ts +3 -2
- package/dist/server/render-people.js +3 -2
- package/dist/server/render-results.d.ts +18 -2
- package/dist/server/render-results.js +37 -28
- package/dist/server/render-settings.js +6 -5
- package/dist/server/render-tasks.d.ts +35 -10
- package/dist/server/render-tasks.js +110 -27
- package/dist/server/request-context.d.ts +2 -0
- package/dist/server/request-context.js +2 -1
- package/dist/server/route-table.d.ts +3 -0
- package/dist/server/route-table.js +49 -5
- package/dist/server/runtime.d.ts +34 -3
- package/dist/server/session.d.ts +25 -1
- package/dist/server/session.js +18 -4
- package/dist/server/settings.js +132 -13
- package/dist/server/sweeps.d.ts +4 -0
- package/dist/server/sweeps.js +58 -0
- package/dist/server/task-views.d.ts +2 -1
- package/dist/server/task-views.js +96 -6
- package/dist/server/tasks.js +320 -74
- package/dist/server/terminals.d.ts +31 -0
- package/dist/server/terminals.js +365 -0
- package/dist/setup-guide.js +3 -2
- package/dist/slack-chat.js +4 -1
- package/dist/spend-ui.js +3 -3
- package/dist/spend.js +2 -1
- package/dist/steer-capabilities.d.ts +32 -0
- package/dist/steer-capabilities.js +60 -0
- package/dist/steer-controls.d.ts +14 -0
- package/dist/steer-controls.js +36 -0
- package/dist/steer-status.js +2 -2
- package/dist/storage-sweep-child.js +3 -1
- package/dist/storage-sweep-process.d.ts +12 -5
- package/dist/storage-sweep-process.js +23 -6
- package/dist/storage-ui.js +4 -4
- package/dist/store-baseline.d.ts +1 -1
- package/dist/store-baseline.js +1 -1
- package/dist/store.d.ts +466 -19
- package/dist/store.js +1185 -63
- package/dist/subagent-desk.js +1 -1
- package/dist/subagent-tools.d.ts +1 -1
- package/dist/summary.js +3 -0
- package/dist/surface.js +6 -4
- package/dist/task-source.d.ts +58 -0
- package/dist/task-source.js +93 -0
- package/dist/team-leads.js +1 -1
- package/dist/teams-chat.js +4 -1
- package/dist/teardown-git.d.ts +14 -0
- package/dist/teardown-git.js +119 -0
- package/dist/telegram-lead.d.ts +3 -0
- package/dist/telegram-lead.js +44 -7
- package/dist/telegram.d.ts +11 -2
- package/dist/telegram.js +51 -17
- package/dist/terminal-catalog.d.ts +11 -0
- package/dist/terminal-catalog.js +129 -0
- package/dist/text-limits.d.ts +2 -0
- package/dist/text-limits.js +2 -0
- package/dist/tool-broker.d.ts +39 -0
- package/dist/tool-broker.js +370 -0
- package/dist/tool-launcher.js +5 -4
- package/dist/tool-secret-store.d.ts +170 -0
- package/dist/tool-secret-store.js +834 -0
- package/dist/toolroll-update-ui.js +2 -2
- package/dist/toolroll-update.js +14 -3
- package/dist/tools-ui.d.ts +7 -1
- package/dist/tools-ui.js +19 -10
- package/dist/webhook-limits.d.ts +23 -0
- package/dist/webhook-limits.js +30 -0
- package/dist/webhook-readers.d.ts +56 -0
- package/dist/webhook-readers.js +138 -0
- package/dist/webhook-signing.d.ts +27 -0
- package/dist/webhook-signing.js +119 -0
- package/dist/work-index.d.ts +29 -0
- package/dist/work-index.js +21 -5
- package/dist/workspace-revision.js +3 -1
- package/dist/worktree.d.ts +10 -4
- package/dist/worktree.js +70 -29
- package/package.json +13 -2
- package/scripts/provider-canary.mjs +210 -31
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* render never waits on one (see integrations.ts).
|
|
6
6
|
*/
|
|
7
7
|
import { type Html } from "./html.js";
|
|
8
|
-
import { type Integration } from "./integrations.js";
|
|
8
|
+
import { type Integration, type SecretsKept } from "./integrations.js";
|
|
9
9
|
export declare const INTEGRATIONS_CSS: string;
|
|
10
10
|
export declare function integrationsHtml(list: readonly Integration[], csrf: string, notice: {
|
|
11
11
|
said?: string | null;
|
|
12
12
|
problem?: string | null;
|
|
13
13
|
checking?: boolean;
|
|
14
|
+
secrets?: SecretsKept;
|
|
14
15
|
}): Html;
|
package/dist/integrations-ui.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* render never waits on one (see integrations.ts).
|
|
6
6
|
*/
|
|
7
7
|
import { html, joinHtml, postForm } from "./html.js";
|
|
8
|
-
import { STATE_WORDS } from "./integrations.js";
|
|
8
|
+
import { STATE_WORDS, secretsNote } from "./integrations.js";
|
|
9
9
|
import { whenUtc } from "./when-html.js";
|
|
10
10
|
import { brandMarkHtml } from "./brand-mark.js";
|
|
11
11
|
const when = (at) => whenUtc(at);
|
|
@@ -49,7 +49,7 @@ function row(one, csrf) {
|
|
|
49
49
|
const badge = !one.checked && one.state === "connected"
|
|
50
50
|
? html `<span class="integration-state integration-state--checking"><i aria-hidden="true"></i>Checking</span>`
|
|
51
51
|
: html `<span class="integration-state integration-state--${one.state}"><i aria-hidden="true"></i>${STATE_WORDS[one.state]}</span>`;
|
|
52
|
-
const facts = [one.account, one.detail].filter(Boolean).join(" · ");
|
|
52
|
+
const facts = [one.account, one.detail, one.credentials].filter(Boolean).join(" · ");
|
|
53
53
|
const command = one.action.kind !== "test" ? one.action.command : null;
|
|
54
54
|
const fix = one.action.kind === "fix" ? html `<p class="integration-fix" role="status">${one.action.words}</p>` : "";
|
|
55
55
|
const run = command === null || (one.action.kind === "fix" && one.action.words.includes(command)) ? "" : html `<p class="meta">Run <code>${command}</code> on the computer running Toolroll.</p>`;
|
|
@@ -69,5 +69,8 @@ export function integrationsHtml(list, csrf, notice) {
|
|
|
69
69
|
const rows = list.filter(one => one.group === group);
|
|
70
70
|
return rows.length === 0 ? "" : html `<h2>${title}</h2>${rows.map(one => row(one, csrf))}`;
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
// No keychain here, or Toolroll's folder for secrets can't be used: said once, plainly.
|
|
73
|
+
const said = secretsNote(list, notice.secrets);
|
|
74
|
+
const kept = said === null ? "" : said.problem ? html `<p class="problem integration-secrets" role="alert">${said.words}</p>` : html `<p class="meta integration-secrets" role="note">${said.words}</p>`;
|
|
75
|
+
return html `<section class="integrations">${note}${summary}${kept}${sections}</section>`;
|
|
73
76
|
}
|
package/dist/integrations.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type Integration = {
|
|
|
38
38
|
action: IntegrationAction;
|
|
39
39
|
/** A project's own MCP tool: it shows a letter, never a logo matched by name. */
|
|
40
40
|
custom?: true;
|
|
41
|
+
/** A project's MCP tool: how its runs get credentials ("Short-lived token per run", "Key held by Toolroll"). */
|
|
42
|
+
credentials?: string;
|
|
41
43
|
};
|
|
42
44
|
export declare const STATE_WORDS: Record<IntegrationState, string>;
|
|
43
45
|
export type ProbeResult = {
|
|
@@ -69,7 +71,7 @@ export type IntegrationIo = {
|
|
|
69
71
|
/** The same sign-in check Settings → AI providers makes. */
|
|
70
72
|
checkConnection?: ConnectionChecker;
|
|
71
73
|
/** Where project tool secrets live. */
|
|
72
|
-
toolHome?: string;
|
|
74
|
+
toolHome?: string | undefined;
|
|
73
75
|
/** Whether a mail server answers at host:port (tests replace it). */
|
|
74
76
|
reach?: (host: string, port: number, secure: boolean) => Promise<void>;
|
|
75
77
|
clock?: () => Date;
|
|
@@ -97,8 +99,20 @@ export declare function integrationsNow(io: IntegrationIo): Integration[];
|
|
|
97
99
|
export declare function checkIntegrations(io: IntegrationIo, keys?: readonly string[]): Promise<Integration[]>;
|
|
98
100
|
/** The one line `status` and `onboard` add when something is Broken; null when nothing is. */
|
|
99
101
|
export declare function integrationsBrokenLine(list: readonly Integration[]): string | null;
|
|
100
|
-
/**
|
|
101
|
-
export
|
|
102
|
+
/** Where secrets rest (project-tools.ts toolSecretStorage), as Settings and the CLI take it. */
|
|
103
|
+
export type SecretsKept = {
|
|
104
|
+
words: string;
|
|
105
|
+
filesOnly: boolean;
|
|
106
|
+
problem?: string;
|
|
107
|
+
};
|
|
108
|
+
/** The one line about where secrets rest, or null: a folder that can't be used always; files only once something set up holds secrets. */
|
|
109
|
+
export declare function secretsNote(list: readonly Integration[], secrets: SecretsKept | null | undefined): {
|
|
110
|
+
words: string;
|
|
111
|
+
problem: boolean;
|
|
112
|
+
} | null;
|
|
113
|
+
/** The CLI's lines: one per integration, then the fix under anything Broken; last, where secrets are kept when that is
|
|
114
|
+
* files only, or why they can't be used (secretsNote). */
|
|
115
|
+
export declare function renderIntegrations(list: readonly Integration[], secrets?: SecretsKept | null): string[];
|
|
102
116
|
export type IntegrationMonitor = {
|
|
103
117
|
/** The list now, without waiting; starts a background check when the last one is older than the cache. */
|
|
104
118
|
list(): Integration[];
|
package/dist/integrations.js
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { connect as tcpConnect } from "node:net";
|
|
19
19
|
import { connect as tlsConnect } from "node:tls";
|
|
20
|
-
import { homedir } from "node:os";
|
|
21
20
|
import { basename } from "node:path";
|
|
22
21
|
import { ALL_CREDENTIAL_ENV } from "./provider.js";
|
|
23
22
|
import { providerName, signInCommand } from "./provider-auth.js";
|
|
@@ -29,7 +28,7 @@ import { effectivePrimary } from "./webhooks.js";
|
|
|
29
28
|
import { readEmailSettings } from "./email-settings.js";
|
|
30
29
|
import { googleConnected } from "./google-mail.js";
|
|
31
30
|
import { LINEAR_URL, readHooksBase, readLinearKey } from "./flow-triggers.js";
|
|
32
|
-
import { projectToolsOf, readToolSecrets, missingSecrets, testToolOf } from "./project-tools.js";
|
|
31
|
+
import { credentialModeOf, projectToolsOf, readToolSecrets, missingSecrets, secretsSetFor, testToolOf } from "./project-tools.js";
|
|
33
32
|
import { origin, readMonitoring } from "./monitoring-settings.js";
|
|
34
33
|
import { targetOf } from "./monitoring.js";
|
|
35
34
|
export const STATE_WORDS = { connected: "Connected", "not-set-up": "Not set up", broken: "Broken" };
|
|
@@ -375,15 +374,23 @@ function targets(io) {
|
|
|
375
374
|
probe: email === null ? null : check => probeEmail(check, { host: email.host, port: email.port, secure: email.secure }, email.imap),
|
|
376
375
|
});
|
|
377
376
|
// Each project's MCP tools: the server starts and lists its tools.
|
|
378
|
-
const toolHome = io.toolHome
|
|
377
|
+
const toolHome = io.toolHome;
|
|
379
378
|
let anyTool = false;
|
|
380
379
|
for (const repo of io.repos) {
|
|
381
380
|
for (const tool of projectToolsOf(store, repo)) {
|
|
382
381
|
anyTool = true;
|
|
383
382
|
const href = `/settings/tools?repo=${encodeURIComponent(repo)}#tool-${encodeURIComponent(tool.name)}`;
|
|
384
383
|
const test = tool.lastTest;
|
|
384
|
+
// Which secrets are set, by name only: no value is read to say how runs get them.
|
|
385
|
+
let credentials;
|
|
386
|
+
try {
|
|
387
|
+
credentials = credentialModeOf(tool.spec, secretsSetFor(repo, tool.spec, toolHome))?.words;
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
credentials = undefined;
|
|
391
|
+
}
|
|
385
392
|
list.push({
|
|
386
|
-
key: `mcp:${repo}:${tool.name}`, group: "tools", name: tool.name, configured: true, account: basename(repo), ...(tool.source === "custom" ? { custom: true } : {}),
|
|
393
|
+
key: `mcp:${repo}:${tool.name}`, group: "tools", name: tool.name, configured: true, account: basename(repo), ...(tool.source === "custom" ? { custom: true } : {}), ...(credentials === undefined ? {} : { credentials }),
|
|
387
394
|
setup: place(href), fix: place(href), usedBy: [`Tasks in ${basename(repo)}`],
|
|
388
395
|
activity: test === null ? NO_ACTIVITY : test.ok ? { okAt: test.at, error: null, errorAt: null, failing: false } : { okAt: null, error: test.problem, errorAt: test.at, failing: false },
|
|
389
396
|
probe: async (check) => {
|
|
@@ -432,7 +439,7 @@ function targets(io) {
|
|
|
432
439
|
}
|
|
433
440
|
// ---------------------------------------------------------------- the list
|
|
434
441
|
function combine(target, row) {
|
|
435
|
-
const base = { key: target.key, group: target.group, name: target.name, usedBy: target.usedBy, ...(target.custom ? { custom: true } : {}) };
|
|
442
|
+
const base = { key: target.key, group: target.group, name: target.name, usedBy: target.usedBy, ...(target.custom ? { custom: true } : {}), ...(target.credentials === undefined ? {} : { credentials: target.credentials }) };
|
|
436
443
|
const checked = target.probe === null || row !== undefined;
|
|
437
444
|
const lastSuccessAt = later(row?.okAt ?? null, target.activity.okAt);
|
|
438
445
|
const checkError = row?.error ?? null, checkErrorAt = row?.errorAt ?? null;
|
|
@@ -482,20 +489,33 @@ export function integrationsBrokenLine(list) {
|
|
|
482
489
|
return `Broken integration${broken.length === 1 ? "" : "s"}: ${names}. See \`toolroll integrations\` or Settings → Integrations.`;
|
|
483
490
|
}
|
|
484
491
|
const whenText = (at) => (at === null ? "never" : `${at.slice(0, 16).replace("T", " ")} UTC`);
|
|
485
|
-
/**
|
|
486
|
-
|
|
492
|
+
/** Integrations whose secrets Toolroll holds: project tools, the Linear key, a Google mail connection. */
|
|
493
|
+
const holdsSecrets = (one) => one.group === "tools" || one.key === "linear" || one.key === "email";
|
|
494
|
+
/** The one line about where secrets rest, or null: a folder that can't be used always; files only once something set up holds secrets. */
|
|
495
|
+
export function secretsNote(list, secrets) {
|
|
496
|
+
if (secrets === null || secrets === undefined)
|
|
497
|
+
return null;
|
|
498
|
+
if (secrets.problem !== undefined)
|
|
499
|
+
return { words: secrets.problem, problem: true };
|
|
500
|
+
return secrets.filesOnly && list.some(one => holdsSecrets(one) && one.state !== "not-set-up") ? { words: secrets.words, problem: false } : null;
|
|
501
|
+
}
|
|
502
|
+
/** The CLI's lines: one per integration, then the fix under anything Broken; last, where secrets are kept when that is
|
|
503
|
+
* files only, or why they can't be used (secretsNote). */
|
|
504
|
+
export function renderIntegrations(list, secrets = null) {
|
|
487
505
|
const width = Math.min(24, Math.max(...list.map(one => one.name.length)));
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
lines
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
506
|
+
const said = secretsNote(list, secrets);
|
|
507
|
+
const note = said === null ? [] : [said.words];
|
|
508
|
+
return [...list.flatMap(one => {
|
|
509
|
+
const facts = [one.account, one.detail, one.credentials].filter(Boolean).join(" · ");
|
|
510
|
+
const lines = [`${one.name.padEnd(width)} ${STATE_WORDS[one.state].padEnd(10)}${facts === "" ? "" : ` ${facts}`}`];
|
|
511
|
+
if (one.state !== "not-set-up")
|
|
512
|
+
lines.push(`${"".padEnd(width)} last success ${whenText(one.lastSuccessAt)}${one.lastError === null ? "" : ` · last error ${whenText(one.lastErrorAt)}: ${one.lastError}`}`);
|
|
513
|
+
if (one.action.kind === "fix")
|
|
514
|
+
lines.push(`${"".padEnd(width)} Fix: ${one.action.words}${one.action.command === null || one.action.words.includes(one.action.command) ? "" : ` (run ${one.action.command})`}`);
|
|
515
|
+
if (one.action.kind === "setup")
|
|
516
|
+
lines.push(`${"".padEnd(width)} Set up: ${one.action.command !== null ? `run ${one.action.command}` : `Settings (${one.action.href ?? "/settings"})`}`);
|
|
517
|
+
return lines;
|
|
518
|
+
}), ...note];
|
|
499
519
|
}
|
|
500
520
|
/** Checks in the background with a short cache, as the first-run suggestions are: a render never waits on a check. */
|
|
501
521
|
export function createIntegrationMonitor(io, options = {}) {
|
package/dist/invoke.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { type AgentSpec, type Invocation, type ProviderRunner, type AgentEnding
|
|
|
20
20
|
import { type VersionProbe } from "./attest.js";
|
|
21
21
|
import type { Store } from "./store.js";
|
|
22
22
|
import type { RunOptions } from "./exec.js";
|
|
23
|
+
import { type NetworkProfile } from "./egress.js";
|
|
23
24
|
export type { ProviderRunner } from "./provider.js";
|
|
24
25
|
/** The claude binary name — kept for the legacy quota rows and tests that
|
|
25
26
|
* describe history; new code carries a resolved AgentSpec instead. */
|
|
@@ -53,6 +54,8 @@ export type AgentOutcome = {
|
|
|
53
54
|
* strikes of bad agent work).
|
|
54
55
|
*/
|
|
55
56
|
initFailed: boolean;
|
|
57
|
+
/** An ACP conversation's facts (provider.ts ParsedEnvelope.acp): read by the conformance check only. */
|
|
58
|
+
acp?: NonNullable<import("./provider.js").ParsedEnvelope["acp"]>;
|
|
56
59
|
};
|
|
57
60
|
/**
|
|
58
61
|
* The value-shaped gateway result (Phase 3 B5): a refusal is a VALUE, so
|
|
@@ -78,6 +81,8 @@ export type InvokeResult = {
|
|
|
78
81
|
/** Bounded agent reply when a spawned turn later failed a protocol
|
|
79
82
|
* gate. Pre-spawn refusals omit it because no reply can exist. */
|
|
80
83
|
finalMessage?: string | null;
|
|
84
|
+
/** An ACP conversation's facts, when the refusal came after a spawn (the conformance check grades a cancel). */
|
|
85
|
+
acp?: NonNullable<import("./provider.js").ParsedEnvelope["acp"]>;
|
|
81
86
|
};
|
|
82
87
|
/**
|
|
83
88
|
* Spend money, on the record. Throws — never refuses quietly — when the run
|
|
@@ -86,10 +91,22 @@ export type InvokeResult = {
|
|
|
86
91
|
* bug, not a case. Attestation and protocol refusals are VALUES (above),
|
|
87
92
|
* not throws — those are cases, and they must dispose cleanly.
|
|
88
93
|
*/
|
|
94
|
+
/**
|
|
95
|
+
* What a launch may reach on the network (egress.ts, docs/plans/agent-baseline-hardening.md arc 1). `policy`: the
|
|
96
|
+
* network a build's approval sealed (or the narrowed legacy one), enforced through the run's own proxy. `via`: the
|
|
97
|
+
* caller already runs the proxy (a scout's public-web proxy, its browser): only those loopback ports are reachable.
|
|
98
|
+
* Absent: the provider's own hosts only (a planner, a check — nothing that installs or browses).
|
|
99
|
+
*/
|
|
100
|
+
export type LaunchNetwork = {
|
|
101
|
+
policy: NetworkProfile;
|
|
102
|
+
} | {
|
|
103
|
+
via: number[];
|
|
104
|
+
};
|
|
89
105
|
export declare function invokeAgent(store: Store, runId: number, spec: AgentSpec, invocation: Omit<Invocation, "model">, options: RunOptions & {
|
|
90
106
|
runner?: ProviderRunner;
|
|
91
107
|
clock?: () => Date;
|
|
92
108
|
versionProbe?: VersionProbe;
|
|
93
109
|
keyHome?: string;
|
|
94
110
|
accumulateUsage?: boolean;
|
|
111
|
+
network?: LaunchNetwork;
|
|
95
112
|
}): Promise<InvokeResult>;
|