toolroll 0.9.55 → 0.9.56
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 +10 -0
- package/README.md +24 -8
- package/dist/action-ledger.d.ts +2 -4
- package/dist/action-ledger.js +2 -10
- package/dist/approval-policy.d.ts +5 -5
- package/dist/approval-policy.js +4 -4
- package/dist/approval-rules-ui.js +2 -2
- package/dist/browser/workspace.js +5 -5
- package/dist/browser-workspace.d.ts +12 -12
- package/dist/budget-alerts.js +3 -3
- package/dist/chat-actions.d.ts +23 -18
- package/dist/chat-actions.js +110 -88
- package/dist/chat-ask.d.ts +2 -2
- package/dist/chat-ask.js +5 -5
- package/dist/chat-channel.d.ts +15 -15
- package/dist/chat-channel.js +20 -20
- package/dist/chat-controls.d.ts +0 -4
- package/dist/chat-controls.js +0 -1
- package/dist/chat-core.js +1 -1
- package/dist/chat-delivery-state.js +2 -2
- package/dist/chat-delivery.d.ts +2 -2
- package/dist/chat-delivery.js +27 -34
- package/dist/chat-flow.js +3 -3
- package/dist/chat-messages.d.ts +1 -1
- package/dist/chat-messages.js +4 -4
- package/dist/chat-migration.d.ts +1 -1
- package/dist/chat-migration.js +11 -11
- package/dist/chat-rooms.js +3 -3
- package/dist/chat-warmth.d.ts +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +6 -7
- package/dist/contracts/chat-actions.d.ts +32 -27
- package/dist/contracts/chat-actions.js +29 -11
- package/dist/contracts/chat-content.d.ts +1 -1
- package/dist/contracts/chat-content.js +1 -1
- package/dist/contracts/chat-tables.js +4 -4
- package/dist/contracts/console-api.d.ts +6 -6
- package/dist/contracts/console-api.js +7 -7
- package/dist/contracts/flow-propose.d.ts +3 -3
- package/dist/contracts/flow.d.ts +132 -125
- package/dist/contracts/flow.js +27 -12
- package/dist/contracts/lead-context.d.ts +1 -1
- package/dist/contracts/lead-context.js +2 -2
- package/dist/contracts/lead-tools.d.ts +20 -18
- package/dist/contracts/lead-tools.js +15 -15
- package/dist/contracts/stage-output.d.ts +1 -1
- package/dist/contracts/stage-output.js +1 -1
- package/dist/contracts/store-json.d.ts +23 -22
- package/dist/contracts/store-json.js +17 -17
- package/dist/contracts/{teammate-turn.d.ts → subagent-turn.d.ts} +5 -5
- package/dist/contracts/{teammate-turn.js → subagent-turn.js} +7 -7
- package/dist/converse.d.ts +23 -23
- package/dist/converse.js +28 -28
- package/dist/coordinator-proposals.d.ts +2 -2
- package/dist/coordinator-proposals.js +1 -1
- package/dist/coordinator.js +1 -1
- package/dist/deprecations.d.ts +12 -0
- package/dist/deprecations.js +20 -0
- package/dist/desktop-update-gate.js +8 -4
- package/dist/desktop-update.js +6 -1
- package/dist/discord-chat.js +6 -6
- package/dist/dispatch.d.ts +1 -1
- package/dist/dispatch.js +1 -1
- package/dist/envelope.js +0 -1
- package/dist/export-ui.js +1 -1
- package/dist/export.js +7 -7
- package/dist/flow-engine.d.ts +2 -2
- package/dist/flow-engine.js +21 -21
- package/dist/flow-insights.d.ts +1 -1
- package/dist/flow-share.js +13 -8
- package/dist/flow-steps.d.ts +5 -5
- package/dist/flow-steps.js +19 -19
- package/dist/flow-triggers.d.ts +1 -1
- package/dist/flow-triggers.js +1 -1
- package/dist/flows-cli.js +1 -1
- package/dist/flows-ui.js +20 -20
- package/dist/flows.js +19 -19
- package/dist/guides.js +4 -3
- package/dist/invoke.js +1 -1
- package/dist/kits-ui.js +5 -5
- package/dist/kits.d.ts +12 -12
- package/dist/kits.js +31 -31
- package/dist/{mate-cli.d.ts → lead-cli.d.ts} +11 -11
- package/dist/{mate-cli.js → lead-cli.js} +38 -38
- package/dist/lead-commitments.js +4 -4
- package/dist/lead-context.d.ts +2 -2
- package/dist/lead-context.js +9 -9
- package/dist/{mate-contract.d.ts → lead-contract.d.ts} +3 -3
- package/dist/{mate-contract.js → lead-contract.js} +7 -6
- package/dist/{mate-doors.d.ts → lead-doors.d.ts} +6 -6
- package/dist/{mate-doors.js → lead-doors.js} +24 -24
- package/dist/lead-follow.d.ts +5 -5
- package/dist/lead-follow.js +9 -9
- package/dist/lead-people.d.ts +5 -5
- package/dist/lead-people.js +14 -14
- package/dist/{mate-progress.d.ts → lead-progress.d.ts} +9 -9
- package/dist/{mate-progress.js → lead-progress.js} +3 -3
- package/dist/{mate-tools.d.ts → lead-tools.d.ts} +19 -19
- package/dist/{mate-tools.js → lead-tools.js} +109 -101
- package/dist/{mate.d.ts → lead.d.ts} +27 -27
- package/dist/{mate.js → lead.js} +102 -102
- package/dist/limits-ui.d.ts +1 -1
- package/dist/limits-ui.js +1 -1
- package/dist/mcp-connect.d.ts +1 -1
- package/dist/mcp-connect.js +3 -3
- package/dist/mcp-core.js +1 -1
- package/dist/memory-pass.d.ts +2 -2
- package/dist/memory-pass.js +7 -7
- package/dist/notification-rows.d.ts +2 -2
- package/dist/operate.d.ts +3 -3
- package/dist/operate.js +35 -34
- package/dist/policy.d.ts +1 -1
- package/dist/principal.d.ts +1 -1
- package/dist/principal.js +2 -2
- package/dist/project-delete-ui.js +1 -1
- package/dist/project-delete.d.ts +1 -1
- package/dist/project-delete.js +26 -26
- package/dist/project-memory.js +1 -1
- package/dist/project-tools.d.ts +1 -1
- package/dist/project-tools.js +1 -1
- package/dist/recipe-ui.js +1 -1
- package/dist/retention.js +4 -4
- package/dist/scope.d.ts +2 -2
- package/dist/scout-report.d.ts +1 -1
- package/dist/scout-report.js +1 -1
- package/dist/serve.js +40 -45
- package/dist/server/chat.d.ts +4 -4
- package/dist/server/chat.js +97 -97
- package/dist/server/chrome.js +3 -3
- package/dist/server/flows.js +69 -62
- package/dist/server/guards.js +3 -3
- package/dist/server/http.d.ts +3 -3
- package/dist/server/http.js +1 -1
- package/dist/server/live.js +6 -6
- package/dist/server/people-tokens.js +1 -1
- package/dist/server/remote.js +12 -10
- package/dist/server/render-chat.d.ts +30 -30
- package/dist/server/render-chat.js +33 -33
- package/dist/server/render-pages.js +2 -2
- package/dist/server/render-settings.d.ts +7 -0
- package/dist/server/render-settings.js +3 -0
- package/dist/server/route-table.js +9 -7
- package/dist/server/runtime.d.ts +13 -13
- package/dist/server/settings.js +14 -13
- package/dist/server/tasks.js +6 -5
- package/dist/setup-guide.d.ts +2 -2
- package/dist/slack-chat.d.ts +2 -2
- package/dist/slack-chat.js +6 -6
- package/dist/spend-ui.d.ts +3 -3
- package/dist/spend-ui.js +9 -9
- package/dist/spend.d.ts +14 -14
- package/dist/spend.js +31 -31
- package/dist/store-baseline.d.ts +19 -0
- package/dist/store-baseline.js +2873 -0
- package/dist/store.d.ts +197 -249
- package/dist/store.js +747 -3084
- package/dist/subagent-admin.d.ts +53 -0
- package/dist/{teammate-admin.js → subagent-admin.js} +37 -37
- package/dist/{teammate-desk.d.ts → subagent-desk.d.ts} +22 -23
- package/dist/{teammate-desk.js → subagent-desk.js} +26 -35
- package/dist/{teammate-memory.d.ts → subagent-memory.d.ts} +17 -17
- package/dist/{teammate-memory.js → subagent-memory.js} +41 -41
- package/dist/{teammate-question.d.ts → subagent-question.d.ts} +6 -6
- package/dist/{teammate-question.js → subagent-question.js} +17 -17
- package/dist/{teammate-tools.d.ts → subagent-tools.d.ts} +18 -18
- package/dist/{teammate-tools.js → subagent-tools.js} +36 -36
- package/dist/{teammate-week.d.ts → subagent-week.d.ts} +10 -10
- package/dist/{teammate-week.js → subagent-week.js} +23 -23
- package/dist/{teammate-work.d.ts → subagent-work.d.ts} +21 -21
- package/dist/{teammate-work.js → subagent-work.js} +50 -50
- package/dist/subagents-ui.d.ts +22 -0
- package/dist/{teammates-ui.js → subagents-ui.js} +45 -45
- package/dist/{teammates.d.ts → subagents.d.ts} +11 -11
- package/dist/{teammates.js → subagents.js} +21 -21
- package/dist/subscription-chat.d.ts +13 -13
- package/dist/subscription-chat.js +19 -19
- package/dist/surface.d.ts +19 -2
- package/dist/surface.js +7 -31
- package/dist/team-cli.d.ts +1 -0
- package/dist/team-cli.js +14 -2
- package/dist/team-leads.js +13 -13
- package/dist/team-runtime.d.ts +2 -2
- package/dist/team-runtime.js +8 -8
- package/dist/teams-chat.js +6 -6
- package/dist/telegram-flow.d.ts +3 -3
- package/dist/telegram-flow.js +3 -3
- package/dist/{telegram-mate.d.ts → telegram-lead.d.ts} +5 -5
- package/dist/{telegram-mate.js → telegram-lead.js} +27 -27
- package/dist/telegram-status.js +1 -1
- package/dist/telegram-team.d.ts +1 -1
- package/dist/telegram-team.js +5 -5
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +9 -30
- package/dist/text-limits.d.ts +18 -18
- package/dist/text-limits.js +18 -18
- package/dist/toolroll-update.d.ts +8 -0
- package/dist/toolroll-update.js +45 -8
- package/package.json +1 -2
- package/dist/teammate-admin.d.ts +0 -53
- package/dist/teammates-ui.d.ts +0 -21
|
@@ -3,18 +3,18 @@ import { type Integration } from "./integrations.js";
|
|
|
3
3
|
import type { AuthMode } from "./keys.js";
|
|
4
4
|
import type { ProviderId } from "./provider.js";
|
|
5
5
|
import { type ReviewSnapshot } from "./chat-review.js";
|
|
6
|
-
import { type Store, type
|
|
6
|
+
import { type Store, type LeadProposalKind, type LeadTurnEvidence } from "./store.js";
|
|
7
7
|
import type { VerifiedApprover } from "./principal.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { LeadToolSchema } from "./converse.js";
|
|
9
9
|
import { type AcceptanceCriterion } from "./scope.js";
|
|
10
10
|
import { type ContractResult } from "./contracts/contract.js";
|
|
11
|
-
export declare const
|
|
12
|
-
export type
|
|
11
|
+
export declare const LEAD_MAX_PROPOSALS_PER_TURN = 5;
|
|
12
|
+
export type LeadToolContext = {
|
|
13
13
|
store: Store;
|
|
14
14
|
who: VerifiedApprover;
|
|
15
15
|
now: Date;
|
|
16
16
|
/** Records a proposal as `drafting` under the running turn; null when the turn may draft no more. */
|
|
17
|
-
draft: (kind:
|
|
17
|
+
draft: (kind: LeadProposalKind, payload: Record<string, unknown>) => number | null;
|
|
18
18
|
/** The step this call runs in, and which decisions were read (by get_decision) at which step —
|
|
19
19
|
* an answer may be proposed only for a decision read in an EARLIER step (v3 review, finding 6). */
|
|
20
20
|
step: number;
|
|
@@ -27,7 +27,7 @@ export type MateToolContext = {
|
|
|
27
27
|
evidenceRoot?: string;
|
|
28
28
|
/** Records the screenshots this turn selected, under the turn, for a channel that delivers files; returns how many are recorded. Absent: nothing durable is kept. */
|
|
29
29
|
/** Return the exact artifact ids reserved under this running turn, including earlier calls. */
|
|
30
|
-
selectEvidence?: (rows: readonly Omit<
|
|
30
|
+
selectEvidence?: (rows: readonly Omit<LeadTurnEvidence, "turn" | "ordinal" | "createdAt">[]) => readonly number[];
|
|
31
31
|
/** How this surface delivers selected images: Telegram sends them as documents after the reply; every other surface shows identity only. */
|
|
32
32
|
mediaDelivery?: "documents";
|
|
33
33
|
/** The conversation and turn this call runs in: where a promise (commit_to) is reported. Absent: no promise can be kept. */
|
|
@@ -49,7 +49,7 @@ export type MateToolContext = {
|
|
|
49
49
|
/** Records this turn's one question to its owner; false when it already asked one. Absent: this surface cannot ask. */
|
|
50
50
|
ask?: (question: string, options: readonly string[]) => boolean;
|
|
51
51
|
};
|
|
52
|
-
export type
|
|
52
|
+
export type LeadToolResult = {
|
|
53
53
|
ok: true;
|
|
54
54
|
body: unknown;
|
|
55
55
|
} | {
|
|
@@ -57,18 +57,18 @@ export type MateToolResult = {
|
|
|
57
57
|
message: string;
|
|
58
58
|
};
|
|
59
59
|
export { reportSummaryFor } from "./report-summary.js";
|
|
60
|
-
export type
|
|
60
|
+
export type LeadViewContext = {
|
|
61
61
|
repos: readonly string[];
|
|
62
62
|
names: readonly string[];
|
|
63
63
|
};
|
|
64
64
|
/** Scrub one string. Exact repo paths and their basenames go first (v13: no paths, no basenames), then shapes. */
|
|
65
|
-
export declare function
|
|
65
|
+
export declare function redactForLead(text: string, view: LeadViewContext): string;
|
|
66
66
|
/** The choke point: every string inside a tool result, recursively, scrubbed. */
|
|
67
|
-
export declare function
|
|
68
|
-
export declare function
|
|
67
|
+
export declare function leadView<T>(value: T, view: LeadViewContext): T;
|
|
68
|
+
export declare function leadViewContextFor(store: Store, who: VerifiedApprover): LeadViewContext;
|
|
69
69
|
/** Project names are deliberate display metadata, not a general basename
|
|
70
70
|
* exemption. Invalid, sensitive or account-identifying labels stay opaque. */
|
|
71
|
-
export declare function
|
|
71
|
+
export declare function projectLabelForLead(path: string, index: number, names: readonly string[]): string;
|
|
72
72
|
/** The same text rule, for the gateway's proposals. */
|
|
73
73
|
export declare function honestText(value: unknown, maxChars: number): value is string;
|
|
74
74
|
export declare function readOptionalText(value: unknown, maxChars: number): string | null | undefined;
|
|
@@ -78,9 +78,9 @@ export declare function readTouches(value: unknown): string[] | null;
|
|
|
78
78
|
* the argument did not even parse into a non-empty rubric. */
|
|
79
79
|
export declare function readAcceptanceArg(value: unknown): AcceptanceCriterion[] | null;
|
|
80
80
|
/** A lead tool as the model is shown it (its inputSchema derived from its contract) and as a call is read and run. */
|
|
81
|
-
export type
|
|
82
|
-
read: (ctx:
|
|
83
|
-
handle: (ctx:
|
|
81
|
+
export type LeadTool = LeadToolSchema & {
|
|
82
|
+
read: (ctx: LeadToolContext, raw: Record<string, unknown>) => ContractResult<Record<string, unknown>>;
|
|
83
|
+
handle: (ctx: LeadToolContext, args: Record<string, unknown>) => LeadToolResult;
|
|
84
84
|
};
|
|
85
85
|
/** Replace every `repoIndex` with a `repo` label, recursively. */
|
|
86
86
|
export declare function labelRepos<T>(value: T, label: (index: number) => string): T;
|
|
@@ -106,7 +106,7 @@ export declare const ISO_STAMP_RULE: RegExp;
|
|
|
106
106
|
*/
|
|
107
107
|
export declare function agentsOver(store: Store, taskId: string, now: Date): Record<string, unknown> | null;
|
|
108
108
|
/** The lead's tools, in the order the model is shown them: each one's inputSchema is its contract, derived. */
|
|
109
|
-
export declare const
|
|
109
|
+
export declare const LEAD_TOOLS: LeadTool[];
|
|
110
110
|
/** A unified diff, file by file, with each file's added and removed lines. */
|
|
111
111
|
export declare function patchFiles(patch: string): {
|
|
112
112
|
path: string;
|
|
@@ -114,10 +114,10 @@ export declare function patchFiles(patch: string): {
|
|
|
114
114
|
removed: number;
|
|
115
115
|
text: string;
|
|
116
116
|
}[];
|
|
117
|
-
export declare const
|
|
118
|
-
export declare function
|
|
117
|
+
export declare const LEAD_TOOL_SCHEMAS: LeadToolSchema[];
|
|
118
|
+
export declare function isLeadTool(name: string): boolean;
|
|
119
119
|
/** Scrub every result. Only list_repos then adds validated display metadata
|
|
120
120
|
* from the same admitted project list; no user-authored result gets an exemption. */
|
|
121
|
-
export declare function
|
|
121
|
+
export declare function executeLeadTool(ctx: LeadToolContext, name: string, args: Record<string, unknown>, view?: LeadViewContext): LeadToolResult;
|
|
122
122
|
/** Bytes of a serialized tool result as it will sit inside the request body. */
|
|
123
123
|
export declare function toolResultBytes(text: string): number;
|