toolroll 0.9.34 → 0.9.37

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.
Files changed (195) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +7 -0
  3. package/dist/assignment-adapters.d.ts +12 -48
  4. package/dist/assignment-adapters.js +33 -43
  5. package/dist/assignment.d.ts +1 -0
  6. package/dist/assignment.js +2 -2
  7. package/dist/browser-workspace.d.ts +3 -3
  8. package/dist/build-review.d.ts +1 -1
  9. package/dist/build-review.js +2 -1
  10. package/dist/builder.js +4 -7
  11. package/dist/chat-acceptance.d.ts +2 -2
  12. package/dist/chat-actions.d.ts +18 -12
  13. package/dist/chat-actions.js +15 -65
  14. package/dist/chat-ask.js +5 -5
  15. package/dist/chat-decide.d.ts +14 -1
  16. package/dist/chat-decide.js +12 -6
  17. package/dist/chat-delivery-state.d.ts +12 -70
  18. package/dist/chat-delivery-state.js +17 -135
  19. package/dist/chat-delivery.js +58 -30
  20. package/dist/chat-flow.js +8 -6
  21. package/dist/chat-inbox.js +1 -1
  22. package/dist/coding-context.d.ts +2 -39
  23. package/dist/coding-context.js +2 -1
  24. package/dist/coding-handoff.d.ts +6 -25
  25. package/dist/coding-handoff.js +11 -5
  26. package/dist/coding-types.d.ts +2 -26
  27. package/dist/coding-workspace.d.ts +2 -0
  28. package/dist/coding-workspace.js +50 -14
  29. package/dist/contracts/acceptance-terms.d.ts +14 -0
  30. package/dist/contracts/acceptance-terms.js +16 -0
  31. package/dist/contracts/chat-actions.d.ts +328 -0
  32. package/dist/contracts/chat-actions.js +133 -0
  33. package/dist/contracts/chat-callback-rows.d.ts +59 -0
  34. package/dist/contracts/chat-callback-rows.js +46 -0
  35. package/dist/contracts/chat-content.d.ts +276 -0
  36. package/dist/contracts/chat-content.js +127 -0
  37. package/dist/contracts/chat-tables.d.ts +6 -0
  38. package/dist/contracts/chat-tables.js +136 -0
  39. package/dist/contracts/coding-context.d.ts +97 -0
  40. package/dist/contracts/coding-context.js +60 -0
  41. package/dist/contracts/coding-handoff.d.ts +44 -0
  42. package/dist/contracts/coding-handoff.js +47 -0
  43. package/dist/contracts/coding-workspace.d.ts +165 -0
  44. package/dist/contracts/coding-workspace.js +71 -0
  45. package/dist/contracts/contract.d.ts +40 -7
  46. package/dist/contracts/contract.js +155 -19
  47. package/dist/contracts/decision.d.ts +45 -0
  48. package/dist/contracts/decision.js +45 -0
  49. package/dist/contracts/discord-callback.d.ts +45 -0
  50. package/dist/contracts/discord-callback.js +34 -0
  51. package/dist/contracts/flow-card.d.ts +50 -0
  52. package/dist/contracts/flow-card.js +46 -0
  53. package/dist/contracts/flow-propose.d.ts +325 -0
  54. package/dist/contracts/flow-propose.js +41 -0
  55. package/dist/contracts/flow-send.d.ts +119 -0
  56. package/dist/contracts/flow-send.js +112 -0
  57. package/dist/contracts/flow.d.ts +19405 -0
  58. package/dist/contracts/flow.js +364 -0
  59. package/dist/contracts/gateway-tools.d.ts +374 -0
  60. package/dist/contracts/gateway-tools.js +94 -0
  61. package/dist/contracts/handoff.d.ts +91 -0
  62. package/dist/contracts/handoff.js +82 -0
  63. package/dist/contracts/lead-context.d.ts +165 -0
  64. package/dist/contracts/lead-context.js +73 -0
  65. package/dist/contracts/lead-tools.d.ts +1905 -0
  66. package/dist/contracts/lead-tools.js +265 -0
  67. package/dist/contracts/memory-pass.d.ts +158 -0
  68. package/dist/contracts/memory-pass.js +102 -0
  69. package/dist/contracts/project-knowledge.d.ts +126 -0
  70. package/dist/contracts/project-knowledge.js +93 -0
  71. package/dist/contracts/project-memory.d.ts +117 -0
  72. package/dist/contracts/project-memory.js +51 -0
  73. package/dist/contracts/project-skills.d.ts +121 -0
  74. package/dist/contracts/project-skills.js +76 -0
  75. package/dist/contracts/proof.d.ts +136 -0
  76. package/dist/contracts/proof.js +110 -0
  77. package/dist/contracts/review-findings.d.ts +46 -0
  78. package/dist/contracts/review-findings.js +48 -0
  79. package/dist/contracts/route.d.ts +484 -0
  80. package/dist/contracts/route.js +128 -0
  81. package/dist/contracts/scope.d.ts +105 -0
  82. package/dist/contracts/scope.js +114 -0
  83. package/dist/contracts/scout-report.d.ts +234 -0
  84. package/dist/contracts/scout-report.js +141 -0
  85. package/dist/contracts/slack-callback.d.ts +43 -0
  86. package/dist/contracts/slack-callback.js +35 -0
  87. package/dist/contracts/sort-answer.d.ts +83 -0
  88. package/dist/contracts/sort-answer.js +77 -0
  89. package/dist/contracts/stage-output.d.ts +127 -0
  90. package/dist/contracts/stage-output.js +166 -0
  91. package/dist/contracts/task-sizing.d.ts +24 -0
  92. package/dist/contracts/task-sizing.js +28 -0
  93. package/dist/contracts/teammate-turn.d.ts +43 -0
  94. package/dist/contracts/teammate-turn.js +51 -0
  95. package/dist/contracts/teams-callback.d.ts +14 -0
  96. package/dist/contracts/teams-callback.js +14 -0
  97. package/dist/contracts/telegram-callback.d.ts +120 -0
  98. package/dist/contracts/telegram-callback.js +97 -0
  99. package/dist/contracts/verification-receipt.d.ts +148 -0
  100. package/dist/contracts/verification-receipt.js +87 -0
  101. package/dist/decision.d.ts +11 -20
  102. package/dist/decision.js +86 -167
  103. package/dist/demo.js +28 -11
  104. package/dist/discord-chat.js +31 -20
  105. package/dist/evidence.d.ts +3 -40
  106. package/dist/evidence.js +5 -1
  107. package/dist/flow-engine.js +14 -17
  108. package/dist/flow-gallery.d.ts +3 -2
  109. package/dist/flow-items.d.ts +4 -13
  110. package/dist/flow-items.js +1 -15
  111. package/dist/flow-send.d.ts +6 -37
  112. package/dist/flow-send.js +18 -14
  113. package/dist/flow-share.d.ts +10 -32
  114. package/dist/flow-share.js +72 -84
  115. package/dist/flow-sort.d.ts +7 -26
  116. package/dist/flow-sort.js +25 -20
  117. package/dist/flow-starters.d.ts +2 -1
  118. package/dist/flow-steps.js +3 -2
  119. package/dist/flow-triggers.d.ts +15 -72
  120. package/dist/flow-triggers.js +94 -83
  121. package/dist/flows.d.ts +37 -220
  122. package/dist/flows.js +356 -387
  123. package/dist/invoke.js +4 -4
  124. package/dist/lead-context.d.ts +4 -2
  125. package/dist/lead-context.js +24 -17
  126. package/dist/mate-tools.d.ts +4 -0
  127. package/dist/mate-tools.js +111 -308
  128. package/dist/mcp-connect.d.ts +27 -4
  129. package/dist/mcp-connect.js +92 -17
  130. package/dist/mcp.js +84 -216
  131. package/dist/memory-pass.d.ts +17 -42
  132. package/dist/memory-pass.js +54 -26
  133. package/dist/operate.js +31 -2
  134. package/dist/phase-routing.d.ts +19 -72
  135. package/dist/phase-routing.js +34 -164
  136. package/dist/plan.d.ts +5 -5
  137. package/dist/plan.js +5 -25
  138. package/dist/process-recovery-eligibility.d.ts +2 -2
  139. package/dist/process-recovery-eligibility.js +13 -8
  140. package/dist/project-knowledge.d.ts +16 -35
  141. package/dist/project-knowledge.js +42 -21
  142. package/dist/project-memory.d.ts +2 -28
  143. package/dist/project-memory.js +28 -13
  144. package/dist/project-skills.d.ts +16 -38
  145. package/dist/project-skills.js +41 -32
  146. package/dist/project-tools.d.ts +1 -0
  147. package/dist/project-tools.js +4 -4
  148. package/dist/proof.d.ts +15 -91
  149. package/dist/proof.js +90 -249
  150. package/dist/provider.d.ts +2 -0
  151. package/dist/provider.js +4 -16
  152. package/dist/result-evidence-readers.d.ts +42 -0
  153. package/dist/result-evidence-readers.js +91 -0
  154. package/dist/result-shots.d.ts +1 -1
  155. package/dist/result-shots.js +2 -1
  156. package/dist/review-switch.d.ts +3 -8
  157. package/dist/reviewer.d.ts +8 -12
  158. package/dist/reviewer.js +11 -35
  159. package/dist/scope.d.ts +21 -43
  160. package/dist/scope.js +42 -128
  161. package/dist/scout-report.d.ts +9 -194
  162. package/dist/scout-report.js +113 -264
  163. package/dist/scout.js +15 -11
  164. package/dist/serve.js +17 -101
  165. package/dist/slack-chat.js +26 -20
  166. package/dist/slack-state.js +2 -1
  167. package/dist/store.d.ts +9 -32
  168. package/dist/store.js +18 -15
  169. package/dist/structured-output.js +2 -1
  170. package/dist/subscription-chat.d.ts +4 -0
  171. package/dist/subscription-chat.js +4 -1
  172. package/dist/surface.js +8 -1
  173. package/dist/task-review-brief.d.ts +69 -0
  174. package/dist/task-review-brief.js +179 -0
  175. package/dist/task-sizing.d.ts +3 -27
  176. package/dist/task-sizing.js +11 -26
  177. package/dist/task-text.d.ts +0 -5
  178. package/dist/task-text.js +1 -3
  179. package/dist/teammate-question.js +7 -5
  180. package/dist/teammate-work.js +9 -5
  181. package/dist/teammates.d.ts +13 -64
  182. package/dist/teammates.js +32 -33
  183. package/dist/teams-chat.js +20 -11
  184. package/dist/telegram-flow.js +4 -3
  185. package/dist/telegram-mate.d.ts +4 -14
  186. package/dist/telegram-mate.js +8 -7
  187. package/dist/telegram-team.d.ts +2 -19
  188. package/dist/telegram.d.ts +1 -1
  189. package/dist/telegram.js +52 -42
  190. package/dist/text-limits.d.ts +212 -1
  191. package/dist/text-limits.js +214 -1
  192. package/dist/tools-ui.d.ts +2 -1
  193. package/dist/tools-ui.js +7 -4
  194. package/dist/verification-evidence.js +24 -12
  195. package/package.json +1 -1
@@ -0,0 +1,165 @@
1
+ /**
2
+ * The lead's catch-up bundle (lead-context.ts): one schema for the DATA each lead turn opens with, built fresh from the
3
+ * local database, in order of importance. The bundle is checked before it is scrubbed and serialized; its whole size
4
+ * (TEXT_LIMITS.leadContextBytes, in UTF-8 bytes) is met in plain code after, by dropping the least important parts.
5
+ */
6
+ import { z } from "zod";
7
+ /** How many tasks the bundle reads, projects it names, and open promises, corrections and proposals it shows. */
8
+ export declare const LEAD_CONTEXT_COUNTS: {
9
+ readonly tasks: 8;
10
+ readonly projects: 8;
11
+ readonly promises: 10;
12
+ readonly corrections: 5;
13
+ readonly proposals: 5;
14
+ };
15
+ export declare const LEAD_CHANNELS: readonly ["console", "terminal", "telegram", "slack", "discord", "teams"];
16
+ /** A task as the lead reads it: which project (`r1`...), its ids, state, goal, outcome, checks, the next action and
17
+ * the questions still open on it. */
18
+ export declare const leadTaskSchema: z.ZodObject<{
19
+ repo: z.ZodString;
20
+ id: z.ZodString;
21
+ currentExecution: z.ZodString;
22
+ title: z.ZodString;
23
+ state: z.ZodString;
24
+ goal: z.ZodNullable<z.ZodString>;
25
+ outcome: z.ZodNullable<z.ZodString>;
26
+ checks: z.ZodNullable<z.ZodString>;
27
+ next: z.ZodNullable<z.ZodString>;
28
+ decisions: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodInt;
30
+ question: z.ZodString;
31
+ }, z.core.$strict>>;
32
+ }, z.core.$strict>;
33
+ /** The lead's own open promise in this conversation, and when it is due. */
34
+ export declare const leadPromiseSchema: z.ZodObject<{
35
+ id: z.ZodInt;
36
+ what: z.ZodString;
37
+ when: z.ZodString;
38
+ expires: z.ZodString;
39
+ }, z.core.$strict>;
40
+ /** A correction the operator confirmed since the lead's last reply. */
41
+ export declare const leadCorrectionSchema: z.ZodObject<{
42
+ proposal: z.ZodInt;
43
+ change: z.ZodString;
44
+ }, z.core.$strict>;
45
+ /** A proposal still open in this conversation, which a correction may affect. */
46
+ export declare const leadOpenProposalSchema: z.ZodObject<{
47
+ proposal: z.ZodInt;
48
+ kind: z.ZodString;
49
+ about: z.ZodNullable<z.ZodString>;
50
+ }, z.core.$strict>;
51
+ export declare const LEAD_CONTEXT_VERSION = 3;
52
+ export declare const leadContextSchema: z.ZodObject<{
53
+ snapshotVersion: z.ZodLiteral<3>;
54
+ source: z.ZodLiteral<"local-database">;
55
+ me: z.ZodObject<{
56
+ name: z.ZodString;
57
+ persona: z.ZodString;
58
+ }, z.core.$strict>;
59
+ you: z.ZodObject<{
60
+ firstName: z.ZodNullable<z.ZodString>;
61
+ timeZone: z.ZodString;
62
+ today: z.ZodString;
63
+ }, z.core.$strict>;
64
+ aboutYou: z.ZodArray<z.ZodString>;
65
+ people: z.ZodObject<{
66
+ people: z.ZodArray<z.ZodString>;
67
+ teammates: z.ZodArray<z.ZodString>;
68
+ teams: z.ZodArray<z.ZodString>;
69
+ }, z.core.$strict>;
70
+ channel: z.ZodNullable<z.ZodObject<{
71
+ id: z.ZodEnum<{
72
+ console: "console";
73
+ discord: "discord";
74
+ slack: "slack";
75
+ teams: "teams";
76
+ telegram: "telegram";
77
+ terminal: "terminal";
78
+ }>;
79
+ fit: z.ZodString;
80
+ replyLimit: z.ZodNullable<z.ZodInt>;
81
+ }, z.core.$strict>>;
82
+ needsYou: z.ZodArray<z.ZodObject<{
83
+ repo: z.ZodString;
84
+ id: z.ZodString;
85
+ currentExecution: z.ZodString;
86
+ title: z.ZodString;
87
+ state: z.ZodString;
88
+ goal: z.ZodNullable<z.ZodString>;
89
+ outcome: z.ZodNullable<z.ZodString>;
90
+ checks: z.ZodNullable<z.ZodString>;
91
+ next: z.ZodNullable<z.ZodString>;
92
+ decisions: z.ZodArray<z.ZodObject<{
93
+ id: z.ZodInt;
94
+ question: z.ZodString;
95
+ }, z.core.$strict>>;
96
+ }, z.core.$strict>>;
97
+ commitments: z.ZodOptional<z.ZodArray<z.ZodObject<{
98
+ id: z.ZodInt;
99
+ what: z.ZodString;
100
+ when: z.ZodString;
101
+ expires: z.ZodString;
102
+ }, z.core.$strict>>>;
103
+ corrections: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
+ proposal: z.ZodInt;
105
+ change: z.ZodString;
106
+ }, z.core.$strict>>>;
107
+ openProposals: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
+ proposal: z.ZodInt;
109
+ kind: z.ZodString;
110
+ about: z.ZodNullable<z.ZodString>;
111
+ }, z.core.$strict>>>;
112
+ followThrough: z.ZodOptional<z.ZodString>;
113
+ projects: z.ZodArray<z.ZodObject<{
114
+ repo: z.ZodString;
115
+ name: z.ZodString;
116
+ decisions: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodInt;
118
+ title: z.ZodString;
119
+ why: z.ZodString;
120
+ }, z.core.$strict>>;
121
+ }, z.core.$strict>>;
122
+ rest: z.ZodObject<{
123
+ tasks: z.ZodArray<z.ZodObject<{
124
+ repo: z.ZodString;
125
+ id: z.ZodString;
126
+ currentExecution: z.ZodString;
127
+ title: z.ZodString;
128
+ state: z.ZodString;
129
+ goal: z.ZodNullable<z.ZodString>;
130
+ outcome: z.ZodNullable<z.ZodString>;
131
+ checks: z.ZodNullable<z.ZodString>;
132
+ next: z.ZodNullable<z.ZodString>;
133
+ decisions: z.ZodArray<z.ZodObject<{
134
+ id: z.ZodInt;
135
+ question: z.ZodString;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>>;
138
+ knowledge: z.ZodArray<z.ZodObject<{
139
+ repo: z.ZodString;
140
+ status: z.ZodEnum<{
141
+ none: "none";
142
+ stored: "stored";
143
+ unavailable: "unavailable";
144
+ }>;
145
+ revision: z.ZodNullable<z.ZodInt>;
146
+ instructions: z.ZodString;
147
+ sources: z.ZodArray<z.ZodObject<{
148
+ id: z.ZodString;
149
+ title: z.ZodString;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>>;
152
+ }, z.core.$strict>;
153
+ omissions: z.ZodObject<{
154
+ assignments: z.ZodInt;
155
+ decisions: z.ZodInt;
156
+ projects: z.ZodInt;
157
+ textFields: z.ZodInt;
158
+ candidateScanLimited: z.ZodBoolean;
159
+ notes: z.ZodArray<z.ZodString>;
160
+ people: z.ZodInt;
161
+ }, z.core.$strict>;
162
+ notice: z.ZodString;
163
+ }, z.core.$strict>;
164
+ export type LeadContextBundle = z.infer<typeof leadContextSchema>;
165
+ export type LeadChannel = (typeof LEAD_CHANNELS)[number];
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The lead's catch-up bundle (lead-context.ts): one schema for the DATA each lead turn opens with, built fresh from the
3
+ * local database, in order of importance. The bundle is checked before it is scrubbed and serialized; its whole size
4
+ * (TEXT_LIMITS.leadContextBytes, in UTF-8 bytes) is met in plain code after, by dropping the least important parts.
5
+ */
6
+ import { z } from "zod";
7
+ import { limited } from "./contract.js";
8
+ /** How many tasks the bundle reads, projects it names, and open promises, corrections and proposals it shows. */
9
+ export const LEAD_CONTEXT_COUNTS = { tasks: 8, projects: 8, promises: 10, corrections: 5, proposals: 5 };
10
+ export const LEAD_CHANNELS = ["console", "terminal", "telegram", "slack", "discord", "teams"];
11
+ /** A task as the lead reads it: which project (`r1`...), its ids, state, goal, outcome, checks, the next action and
12
+ * the questions still open on it. */
13
+ export const leadTaskSchema = z.strictObject({
14
+ repo: z.string(),
15
+ id: z.string(),
16
+ currentExecution: z.string(),
17
+ title: z.string(),
18
+ state: z.string(),
19
+ goal: z.string().nullable(),
20
+ outcome: z.string().nullable(),
21
+ checks: z.string().nullable(),
22
+ next: z.string().nullable(),
23
+ decisions: z.array(z.strictObject({ id: z.int(), question: z.string() })),
24
+ });
25
+ /** The lead's own open promise in this conversation, and when it is due. */
26
+ export const leadPromiseSchema = z.strictObject({ id: z.int(), what: limited("promise", "leadPromise"), when: z.string(), expires: z.string() });
27
+ /** A correction the operator confirmed since the lead's last reply. */
28
+ export const leadCorrectionSchema = z.strictObject({ proposal: z.int(), change: limited("correction", "leadCorrection") });
29
+ /** A proposal still open in this conversation, which a correction may affect. */
30
+ export const leadOpenProposalSchema = z.strictObject({ proposal: z.int(), kind: z.string(), about: limited("about", "leadProposalAbout").nullable() });
31
+ export const LEAD_CONTEXT_VERSION = 3;
32
+ export const leadContextSchema = z.strictObject({
33
+ snapshotVersion: z.literal(LEAD_CONTEXT_VERSION),
34
+ source: z.literal("local-database"),
35
+ me: z.strictObject({ name: z.string(), persona: z.string() }),
36
+ you: z.strictObject({ firstName: z.string().nullable(), timeZone: z.string(), today: z.string() }),
37
+ /** Lines the person confirmed about themselves. */
38
+ aboutYou: z.array(z.string()),
39
+ /** The people, AI teammates and team chats the lead works with, one line each. */
40
+ people: z.strictObject({ people: z.array(z.string()), teammates: z.array(z.string()), teams: z.array(z.string()) }),
41
+ channel: z.strictObject({ id: z.enum(LEAD_CHANNELS), fit: z.string(), replyLimit: z.int().nullable() }).nullable(),
42
+ needsYou: z.array(leadTaskSchema),
43
+ /** This conversation's follow-through; absent outside one. */
44
+ commitments: z.array(leadPromiseSchema).max(LEAD_CONTEXT_COUNTS.promises).optional(),
45
+ corrections: z.array(leadCorrectionSchema).max(LEAD_CONTEXT_COUNTS.corrections).optional(),
46
+ openProposals: z.array(leadOpenProposalSchema).max(LEAD_CONTEXT_COUNTS.proposals).optional(),
47
+ followThrough: z.string().optional(),
48
+ projects: z.array(z.strictObject({
49
+ repo: z.string(),
50
+ name: z.string(),
51
+ decisions: z.array(z.strictObject({ id: z.int(), title: z.string(), why: z.string() })),
52
+ })).max(LEAD_CONTEXT_COUNTS.projects),
53
+ rest: z.strictObject({
54
+ tasks: z.array(leadTaskSchema),
55
+ knowledge: z.array(z.strictObject({
56
+ repo: z.string(),
57
+ status: z.enum(["stored", "none", "unavailable"]),
58
+ revision: z.int().nullable(),
59
+ instructions: z.string(),
60
+ sources: z.array(z.strictObject({ id: z.string(), title: z.string() })),
61
+ })),
62
+ }),
63
+ omissions: z.strictObject({
64
+ assignments: z.int(),
65
+ decisions: z.int(),
66
+ projects: z.int(),
67
+ textFields: z.int(),
68
+ candidateScanLimited: z.boolean(),
69
+ notes: z.array(z.string()),
70
+ people: z.int(),
71
+ }),
72
+ notice: z.string(),
73
+ });