toolroll 0.9.33 → 0.9.36
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 +57 -0
- package/README.md +7 -0
- package/dist/assignment.d.ts +1 -0
- package/dist/assignment.js +2 -2
- package/dist/browser/workspace.css +1 -1
- package/dist/browser/workspace.js +17 -17
- package/dist/browser-crew.js +1 -0
- package/dist/browser-workspace.d.ts +5 -3
- package/dist/builder.js +4 -7
- package/dist/chat-acceptance.d.ts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +124 -63
- package/dist/contracts/contract-test.d.ts +45 -0
- package/dist/contracts/contract-test.js +69 -0
- package/dist/contracts/contract.d.ts +87 -0
- package/dist/contracts/contract.js +308 -0
- package/dist/contracts/flow-propose.d.ts +325 -0
- package/dist/contracts/flow-propose.js +41 -0
- package/dist/contracts/flow.d.ts +19400 -0
- package/dist/contracts/flow.js +359 -0
- package/dist/contracts/handoff.d.ts +91 -0
- package/dist/contracts/handoff.js +82 -0
- package/dist/contracts/plan.d.ts +58 -0
- package/dist/contracts/plan.js +67 -0
- package/dist/contracts/proof.d.ts +136 -0
- package/dist/contracts/proof.js +110 -0
- package/dist/contracts/verification-receipt.d.ts +148 -0
- package/dist/contracts/verification-receipt.js +87 -0
- package/dist/demo.js +28 -11
- package/dist/desktop-update.d.ts +1 -1
- package/dist/evidence.d.ts +3 -40
- package/dist/evidence.js +7 -3
- package/dist/flow-gallery.d.ts +3 -2
- package/dist/flow-share.d.ts +10 -32
- package/dist/flow-share.js +65 -83
- package/dist/flow-starters.d.ts +2 -1
- package/dist/flow-triggers.d.ts +15 -72
- package/dist/flow-triggers.js +94 -83
- package/dist/flows.d.ts +37 -218
- package/dist/flows.js +350 -385
- package/dist/mate-tools.js +14 -44
- package/dist/mcp-connect.d.ts +3 -0
- package/dist/mcp-connect.js +16 -4
- package/dist/operate.js +83 -12
- package/dist/plan.d.ts +12 -12
- package/dist/plan.js +109 -72
- package/dist/planner-source.js +2 -1
- package/dist/planner.js +55 -25
- package/dist/process-recovery-eligibility.d.ts +2 -2
- package/dist/process-recovery-eligibility.js +13 -8
- package/dist/project-admission.d.ts +93 -0
- package/dist/project-admission.js +134 -0
- package/dist/project-delete-ui.js +5 -2
- package/dist/proof.d.ts +15 -91
- package/dist/proof.js +90 -249
- package/dist/result-evidence-readers.d.ts +42 -0
- package/dist/result-evidence-readers.js +91 -0
- package/dist/runner.d.ts +10 -0
- package/dist/runner.js +16 -0
- package/dist/scope.js +4 -3
- package/dist/serve.d.ts +4 -0
- package/dist/serve.js +112 -160
- package/dist/setup-guide.d.ts +2 -2
- package/dist/store.d.ts +2 -0
- package/dist/store.js +4 -0
- package/dist/surface.js +16 -3
- package/dist/task-review-brief.d.ts +75 -0
- package/dist/task-review-brief.js +179 -0
- package/dist/text-limits.d.ts +87 -0
- package/dist/text-limits.js +86 -0
- package/dist/verification-evidence.js +24 -12
- package/dist/when-html.d.ts +2 -0
- package/dist/when-html.js +13 -0
- package/package.json +3 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lead's `propose_flow` input (docs/plans/zod-revamp.md, item 3): one schema, built from the flow contract's own
|
|
3
|
+
* step and trigger schemas, that is both the JSON Schema the lead is given and the check its call is read with
|
|
4
|
+
* (mate-tools.ts). The lead-tools contract (item 5) imports it from here rather than restating it.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { LIMITS } from "../decision.js";
|
|
8
|
+
import { STARTER_IDS } from "../flow-starters.js";
|
|
9
|
+
import { FLOW_TEMPLATES } from "../flows.js";
|
|
10
|
+
import { KITS } from "../kits.js";
|
|
11
|
+
import { TEXT_LIMITS } from "../text-limits.js";
|
|
12
|
+
import { toModelSchema } from "./contract.js";
|
|
13
|
+
import { flowStepsSchema, leadTriggerSchema, SCRIPT_LANGUAGES, SCRIPT_NAME } from "./flow.js";
|
|
14
|
+
export const PROPOSE_FLOW_OPERATIONS = ["create", "edit", "add_card", "move_card", "approve", "send_back", "choose", "cancel_card", "comment", "assign", "follow", "unfollow", "save_script", "add_trigger", "pause_trigger", "resume_trigger", "remove_trigger", "kit", "starter"];
|
|
15
|
+
const id = z.int().min(1);
|
|
16
|
+
const enumOf = (values) => z.enum(values);
|
|
17
|
+
export const proposeFlowInputSchema = z.strictObject({
|
|
18
|
+
operation: z.enum(PROPOSE_FLOW_OPERATIONS),
|
|
19
|
+
/** A project as list_repos names it (r1, r2). */
|
|
20
|
+
repo: z.string().regex(/^r[0-9]{1,3}$/, { error: "must be a project from list_repos, like r1" }).optional(),
|
|
21
|
+
flow: id.optional(), card: id.optional(),
|
|
22
|
+
kit: enumOf(KITS.map(one => one.id)).optional(),
|
|
23
|
+
starter: z.enum(STARTER_IDS).optional(),
|
|
24
|
+
name: z.string().max(TEXT_LIMITS.flowName).optional(),
|
|
25
|
+
template: enumOf(FLOW_TEMPLATES.map(one => one.id)).optional(),
|
|
26
|
+
steps: flowStepsSchema.shape.steps.optional(),
|
|
27
|
+
title: z.string().max(TEXT_LIMITS.flowCardTitle).optional(),
|
|
28
|
+
description: z.string().max(TEXT_LIMITS.flowCardDescription).optional(),
|
|
29
|
+
zone: z.string().max(TEXT_LIMITS.flowRef).optional(),
|
|
30
|
+
note: z.string().max(LIMITS.note).describe(`At most ${LIMITS.note} characters; longer is refused with its length, not cut.`).optional(),
|
|
31
|
+
choice: z.int().min(1).max(4).optional(),
|
|
32
|
+
trigger: id.optional(),
|
|
33
|
+
owner: z.string().max(TEXT_LIMITS.flowDecider).optional(),
|
|
34
|
+
script: z.strictObject({
|
|
35
|
+
name: z.string().regex(SCRIPT_NAME, { error: "must be a script's name: lowercase letters, numbers and dashes" }).optional(), about: z.string().max(TEXT_LIMITS.flowScriptAbout).optional(), body: z.string().max(TEXT_LIMITS.flowScriptInline).optional(),
|
|
36
|
+
timeoutMinutes: z.int().min(1).max(60).optional(), language: z.enum(SCRIPT_LANGUAGES).optional(), file: z.string().max(TEXT_LIMITS.flowScriptFile).optional(),
|
|
37
|
+
}).optional(),
|
|
38
|
+
settings: leadTriggerSchema.optional(),
|
|
39
|
+
});
|
|
40
|
+
/** What the lead is told propose_flow takes: exactly the schema its call is read with. */
|
|
41
|
+
export const PROPOSE_FLOW_MODEL_SCHEMA = toModelSchema(proposeFlowInputSchema);
|