toolroll 0.9.63 → 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 +51 -0
- package/README.md +15 -5
- 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 +50 -2
- package/dist/agent-fence.js +157 -10
- 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 +235 -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 +197 -15
- 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/checkout-proof.d.ts +28 -0
- package/dist/checkout-proof.js +62 -0
- package/dist/claim.d.ts +12 -0
- package/dist/claim.js +19 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +4 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +21 -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/console-api.d.ts +12 -4
- package/dist/contracts/console-api.js +12 -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/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/desktop-update.d.ts +1 -1
- package/dist/discord-chat.js +4 -1
- package/dist/doctor.js +1 -1
- 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/exec.d.ts +78 -0
- package/dist/exec.js +367 -9
- package/dist/export-ui.js +2 -2
- package/dist/flow-engine.js +24 -5
- 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 +77 -8
- package/dist/flow-triggers.js +517 -70
- package/dist/flows-cli.js +8 -2
- package/dist/flows-ui.d.ts +0 -2
- package/dist/flows-ui.js +52 -4
- package/dist/flows.d.ts +4 -0
- package/dist/flows.js +9 -1
- package/dist/html.d.ts +9 -0
- package/dist/html.js +11 -0
- package/dist/invoke.d.ts +17 -0
- package/dist/invoke.js +217 -21
- package/dist/keys.d.ts +18 -14
- package/dist/keys.js +5 -0
- 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 +152 -1
- 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-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/operate.d.ts +2 -0
- package/dist/operate.js +275 -17
- 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/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/project-delete-ui.d.ts +12 -0
- package/dist/project-delete-ui.js +41 -9
- package/dist/project-delete.js +2 -2
- package/dist/project-memory.d.ts +3 -1
- package/dist/project-memory.js +57 -25
- package/dist/project-tools.d.ts +5 -3
- package/dist/project-tools.js +12 -9
- 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.d.ts +25 -2
- package/dist/provider.js +63 -9
- 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/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 +170 -5
- 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 +247 -40
- 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 +38 -8
- 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 +46 -5
- package/dist/server/runtime.d.ts +33 -2
- package/dist/server/session.d.ts +25 -1
- package/dist/server/session.js +18 -4
- package/dist/server/settings.js +121 -10
- 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-ui.js +4 -4
- package/dist/store-baseline.d.ts +1 -1
- package/dist/store-baseline.js +1 -1
- package/dist/store.d.ts +430 -15
- package/dist/store.js +1041 -52
- package/dist/subagent-desk.js +1 -1
- package/dist/summary.js +3 -0
- 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/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 +2 -0
- package/dist/tool-broker.js +1 -0
- package/dist/toolroll-update-ui.js +2 -2
- package/dist/toolroll-update.js +13 -3
- package/dist/tools-ui.js +2 -2
- 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 +16 -2
- package/dist/workspace-revision.js +3 -1
- package/package.json +11 -2
package/dist/flow-share.js
CHANGED
|
@@ -24,7 +24,7 @@ import { addFlowTriggerTo, describeTrigger, HOOK_PATH, readHooksBase, triggerCon
|
|
|
24
24
|
import { durationMinutes, durationWords, FlowContractError, flowTerms, inStepWords, LANGUAGE_WORDS, validateFlowDefinition } from "./flows.js";
|
|
25
25
|
import { stageReferenceProblems } from "./contracts/stage-output.js";
|
|
26
26
|
import { readVersioned } from "./contracts/contract.js";
|
|
27
|
-
import { FLOW_ALIASES, FLOW_FILE_FORMAT, legacyFlowNeed, legacySubagentStep, FLOW_FILE_VERSION, flowFileSchema, PARAMETER_ID } from "./contracts/flow.js";
|
|
27
|
+
import { FLOW_ALIASES, WEBHOOK_SENDERS, FLOW_FILE_FORMAT, legacyFlowNeed, legacySubagentStep, FLOW_FILE_VERSION, flowFileSchema, PARAMETER_ID } from "./contracts/flow.js";
|
|
28
28
|
import { parseSchedule } from "./flow-schedule.js";
|
|
29
29
|
export { FLOW_FILE_FORMAT, FLOW_FILE_VERSION };
|
|
30
30
|
/** The largest flow file Toolroll reads or fetches. */
|
|
@@ -111,7 +111,13 @@ function triggerOf(config, ask) {
|
|
|
111
111
|
...(config.state === null ? {} : { state: config.state }),
|
|
112
112
|
...(config.label === null ? {} : { label: ask({ id: "linear-label", about: "The Linear label issues need", default: config.label }) }),
|
|
113
113
|
delivery: config.delivery, ...zone };
|
|
114
|
-
|
|
114
|
+
// v126: who signs it travels (never its secret or address: an imported signed webhook isn't set up until its
|
|
115
|
+
// secret is made or pasted there); the project and team it is scoped to are asked again, as another install's own.
|
|
116
|
+
case "webhook": return { kind: "webhook", title: config.title, ...(config.titleField == null ? {} : { titleField: config.titleField }), ...(config.bodyField == null ? {} : { bodyField: config.bodyField }),
|
|
117
|
+
...((config.sender ?? "none") === "none" ? {} : { sender: config.sender }),
|
|
118
|
+
...(config.project == null ? {} : { project: ask({ id: "webhook-project", about: "The project the signed webhook's deliveries must come from", default: config.project }) }),
|
|
119
|
+
...(config.team == null ? {} : { team: ask({ id: "webhook-team", about: "The Vercel team the deliveries must come from", default: config.team }) }),
|
|
120
|
+
...(config.idField == null ? {} : { idField: config.idField }), ...(config.urlField == null ? {} : { urlField: config.urlField }), ...zone };
|
|
115
121
|
case "email": return { kind: "email", folder: config.folder,
|
|
116
122
|
...(config.sender === null ? {} : { sender: ask({ id: "email-sender", about: "Whose mail starts cards: addresses or domains, comma-separated (left empty: anyone's)", optional: true }) }),
|
|
117
123
|
...(config.subject === null ? {} : { subject: config.subject }), ...zone };
|
|
@@ -192,8 +198,13 @@ function scrubDeep(value, scrub, key, inScripts) {
|
|
|
192
198
|
return key !== null && (STRUCTURAL.has(key) || (inScripts && key === "name")) ? value : scrub(value);
|
|
193
199
|
if (Array.isArray(value))
|
|
194
200
|
return value.map(one => scrubDeep(one, scrub, key, inScripts));
|
|
195
|
-
if (value !== null && typeof value === "object")
|
|
196
|
-
|
|
201
|
+
if (value !== null && typeof value === "object") {
|
|
202
|
+
// v126: a webhook's sender is one of a fixed few words (who signs it), never prose: kept as it is, even when an
|
|
203
|
+
// account happens to share its name. An email trigger's sender is people's addresses, and is still scrubbed.
|
|
204
|
+
const record = value;
|
|
205
|
+
const webhookSender = record["kind"] === "webhook" && typeof record["sender"] === "string" && WEBHOOK_SENDERS.includes(record["sender"]);
|
|
206
|
+
return Object.fromEntries(Object.entries(record).map(([k, v]) => [k, webhookSender && k === "sender" ? v : scrubDeep(v, scrub, k, inScripts || k === "scripts")]));
|
|
207
|
+
}
|
|
197
208
|
return value;
|
|
198
209
|
}
|
|
199
210
|
/** A flow as a file: its zones and paths, its triggers' settings and the scripts it runs, nothing of this installation's. */
|
|
@@ -530,7 +541,7 @@ export function importFlow(store, plan, actor, now, dir) {
|
|
|
530
541
|
}
|
|
531
542
|
const id = store.createFlow({ repo: plan.repo, name: plan.name, definitionJson: JSON.stringify(plan.definition), by: actor }, now);
|
|
532
543
|
for (const trigger of plan.triggers) {
|
|
533
|
-
const made = addFlowTriggerTo(store, store.getFlow(id), trigger, actor, now, dir);
|
|
544
|
+
const made = addFlowTriggerTo(store, store.getFlow(id), trigger, actor, now, dir, { shown: false });
|
|
534
545
|
if (!made.ok)
|
|
535
546
|
throw new FlowFileError(`A ${String(trigger["kind"])} trigger: ${made.message}`);
|
|
536
547
|
store.updateFlowTrigger(made.id, { state: "paused" }, now);
|
package/dist/flow-triggers.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Runner } from "./backend.js";
|
|
2
2
|
import { type FlowAct } from "./flow-engine.js";
|
|
3
3
|
import { type FlowDefinition } from "./flows.js";
|
|
4
|
+
import { type DistinctHeaders, type WebhookSender } from "./webhook-signing.js";
|
|
4
5
|
import { type ContractResult } from "./contracts/contract.js";
|
|
5
6
|
import { FLOW_TRIGGER_KINDS, type ChatApp, type FlowTriggerKind, type TriggerConfig, type TriggerInput } from "./contracts/flow.js";
|
|
6
7
|
import { type MailReader } from "./mailbox.js";
|
|
@@ -49,11 +50,18 @@ export declare function triggerHeadline(config: TriggerConfig, store: Store): {
|
|
|
49
50
|
export declare function triggerConfigOf(trigger: FlowTriggerRow): TriggerConfig | null;
|
|
50
51
|
/** A saved trigger's config (`configJson`, which carries no version) read by its one schema, what it leaves out filled. */
|
|
51
52
|
export declare function readTriggerConfig(raw: unknown): ContractResult<TriggerConfig>;
|
|
53
|
+
/** v126: who signs a webhook trigger's deliveries; one saved before senders were chosen is unsigned. */
|
|
54
|
+
export declare const senderOf: (config: Extract<TriggerConfig, {
|
|
55
|
+
kind: "webhook";
|
|
56
|
+
}>) => WebhookSender;
|
|
52
57
|
/** Whether this trigger takes deliveries at a secret address rather than being checked. */
|
|
58
|
+
/** Whether a raw trigger the caller is about to add would take deliveries (an address): read leniently, before validation. */
|
|
59
|
+
export declare function rawTakesDeliveries(raw: unknown): boolean;
|
|
53
60
|
export declare function takesDeliveries(config: TriggerConfig): boolean;
|
|
54
|
-
/** A webhook's signing secret (
|
|
55
|
-
export declare function saveHookSecret(dir: string, trigger: number, secret: string): void;
|
|
56
|
-
|
|
61
|
+
/** A webhook's signing secret (made here, or pasted from its sender). In the keychain (or an owner-only file where there's none), never a column. */
|
|
62
|
+
export declare function saveHookSecret(dir: string, trigger: number, secret: string, credential?: string): void;
|
|
63
|
+
/** Exactly this credential's secret, or null: never another's. */
|
|
64
|
+
export declare function readHookSecret(dir: string, trigger: number, credential?: string): string | null;
|
|
57
65
|
export declare const LINEAR_ENV = "TOOLROLL_LINEAR_KEY";
|
|
58
66
|
/** The Linear API key the worker checks Linear with: the environment, or kept by Toolroll (the keychain, or an owner-only file beside the database). */
|
|
59
67
|
export declare function readLinearKey(dir: string | null): string | null;
|
|
@@ -89,7 +97,15 @@ export type TriggerMade = {
|
|
|
89
97
|
message: string;
|
|
90
98
|
};
|
|
91
99
|
/** Add a trigger to a flow. A webhook trigger's address (and GitHub's signing secret) is returned once and never stored readable. */
|
|
92
|
-
|
|
100
|
+
/**
|
|
101
|
+
* `ingress: "proved"`: the caller proved a password typed now (a credential act, docs/plans/passwordless.md) — only then
|
|
102
|
+
* may a trigger that takes deliveries be made with an address. Without it a webhook is made with none (its panel's
|
|
103
|
+
* set-up, which asks for the password, makes one), and GitHub/Linear webhook delivery is refused.
|
|
104
|
+
*/
|
|
105
|
+
export declare function addFlowTriggerTo(store: Store, flow: FlowRow, raw: unknown, actor: string, now: Date, dir: string | null, options?: {
|
|
106
|
+
shown?: boolean;
|
|
107
|
+
ingress?: "proved";
|
|
108
|
+
}): TriggerMade;
|
|
93
109
|
/** A new secret address for a webhook trigger (the old one stops working at once). */
|
|
94
110
|
export declare function renewFlowHook(store: Store, trigger: FlowTriggerRow, now: Date, dir: string): TriggerMade;
|
|
95
111
|
/**
|
|
@@ -189,24 +205,77 @@ export declare const LINEAR_QUERY = "query FlowTrigger($filter: IssueFilter) { i
|
|
|
189
205
|
export declare function linearItem(config: Extract<TriggerConfig, {
|
|
190
206
|
kind: "linear";
|
|
191
207
|
}>, raw: unknown): Found | null;
|
|
208
|
+
/** v126: headers as Node's `headersDistinct` gives them, one value per line they arrived on, so a security header sent
|
|
209
|
+
* twice is seen twice (Node's `headers` joins repeated custom headers with commas). */
|
|
192
210
|
export type HookDelivery = {
|
|
193
|
-
headers:
|
|
211
|
+
headers: DistinctHeaders;
|
|
194
212
|
body: Buffer;
|
|
195
213
|
};
|
|
214
|
+
/** `retryAfter` (seconds): a 429's Retry-After. */
|
|
196
215
|
export type HookAnswer = {
|
|
197
216
|
status: number;
|
|
198
217
|
said: string;
|
|
218
|
+
retryAfter?: number;
|
|
199
219
|
};
|
|
200
220
|
/** A webhook delivery at a trigger's secret address: prove it, read it, make at most the cards it names. Nothing runs here. */
|
|
201
221
|
export declare function receiveFlowHook(store: Store, token: string, delivery: HookDelivery, dir: string, now: Date): HookAnswer;
|
|
202
|
-
/**
|
|
203
|
-
|
|
222
|
+
/**
|
|
223
|
+
* v126: make a trigger's held deliveries into their cards while the last hour has room, oldest first. Each card in its
|
|
224
|
+
* own write transaction, which reads everything it acts on under the write lock: the trigger (still active, still
|
|
225
|
+
* taking deliveries), the hour's room, the oldest held receipt, the flow; then the same guards intake has (a failing
|
|
226
|
+
* run already owned by another card in the project is left out). The card and the receipt's move to accepted land
|
|
227
|
+
* together, or neither does.
|
|
228
|
+
*/
|
|
229
|
+
export declare function drainHeldDeliveries(store: Store, trigger: FlowTriggerRow, now: Date): number;
|
|
230
|
+
/**
|
|
231
|
+
* v126: a delivery refused before it could be read (too large, a body that wouldn't read): it proves nothing, so it
|
|
232
|
+
* counts toward its address's minute like any unproven delivery. The answer to give instead when that count is over.
|
|
233
|
+
*/
|
|
234
|
+
export declare function hookRefusedUnread(store: Store, token: string, now: Date): HookAnswer | null;
|
|
235
|
+
/** A signing secret pasted on the secure panel behind the password, never in chat: Linear's, or a signed webhook's
|
|
236
|
+
* sender's (Sentry's or Vercel's own, or a Standard or GitHub-style one made elsewhere). */
|
|
237
|
+
export declare function saveSigningSecret(store: Store, trigger: FlowTriggerRow, secret: string, now: Date, dir: string): {
|
|
204
238
|
ok: true;
|
|
239
|
+
said: string;
|
|
240
|
+
} | {
|
|
241
|
+
ok: false;
|
|
242
|
+
message: string;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* v126: a new secret for a webhook whose sender Toolroll makes secrets for (Standard Webhooks, GitHub-style), shown once.
|
|
246
|
+
* Its address stays as it is (New address is its own action). Sentry's and Vercel's secrets are theirs, pasted instead.
|
|
247
|
+
* The only place such a secret is made: creating a trigger (from the panel, the gallery or an import) never does.
|
|
248
|
+
*/
|
|
249
|
+
export declare function setUpFlowHook(store: Store, trigger: FlowTriggerRow, now: Date, dir: string): TriggerMade;
|
|
250
|
+
/**
|
|
251
|
+
* v126: change who signs a webhook's deliveries, in place: the trigger keeps its id, address and what it has received
|
|
252
|
+
* (keys carry the sender, so nothing received unsigned stands for anything signed). Its credentials move to the next
|
|
253
|
+
* generation with no secret: it isn't ready until it is set up again. Settings the new sender doesn't read are left out.
|
|
254
|
+
*/
|
|
255
|
+
export declare function changeFlowHookSender(store: Store, trigger: FlowTriggerRow, sender: unknown, actor: string, now: Date, dir: string): {
|
|
256
|
+
ok: true;
|
|
257
|
+
said: string;
|
|
258
|
+
} | {
|
|
259
|
+
ok: false;
|
|
260
|
+
message: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* v126: which project (and, for Vercel, team) a Sentry or Vercel webhook takes deliveries from, set in place: the
|
|
264
|
+
* trigger keeps its id, address, secret and history; blank takes any project the secret covers. Only from the settings
|
|
265
|
+
* read here, so a change racing it doesn't land on top of it.
|
|
266
|
+
*/
|
|
267
|
+
export declare function setFlowHookScope(store: Store, trigger: FlowTriggerRow, scope: {
|
|
268
|
+
project: unknown;
|
|
269
|
+
team: unknown;
|
|
270
|
+
}, actor: string, now: Date): {
|
|
271
|
+
ok: true;
|
|
272
|
+
said: string;
|
|
205
273
|
} | {
|
|
206
274
|
ok: false;
|
|
207
275
|
message: string;
|
|
208
276
|
};
|
|
209
|
-
/** Whether a webhook trigger can prove its deliveries:
|
|
277
|
+
/** Whether a webhook trigger can prove its deliveries: an unsigned webhook always (its address is all it has), the others
|
|
278
|
+
* once the current generation's secret is saved. */
|
|
210
279
|
export declare function hookReady(trigger: FlowTriggerRow, dir: string | null): boolean;
|
|
211
280
|
export declare const FORM_PATH = "/hooks/form/";
|
|
212
281
|
/** Share a button as a secret link anyone can fill in, without signing in. The link is shown once; only its hash is kept. */
|