@anchrd/colab-sdk 0.1.21 → 0.1.23
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/dist/actions/actions.d.ts +265 -13
- package/dist/actions/actions.js +52 -22
- package/dist/boards/boards.d.ts +55 -8
- package/dist/boards/boards.js +3 -0
- package/dist/card-kinds/card-kinds.d.ts +5 -5
- package/dist/connections/connections.d.ts +5 -5
- package/dist/files/files.d.ts +2 -2
- package/dist/goals/goals.d.ts +1115 -0
- package/dist/goals/goals.js +329 -0
- package/dist/grammar/grammar.d.ts +3 -0
- package/dist/grammar/grammar.js +12 -0
- package/dist/mcps/mcps.d.ts +264 -0
- package/dist/mcps/mcps.js +241 -0
- package/dist/nodes/nodes.d.ts +13 -1
- package/dist/nodes/nodes.js +7 -3
- package/dist/operators/operators.d.ts +497 -72
- package/dist/operators/operators.js +189 -15
- package/dist/runs/runs.d.ts +1 -1
- package/dist/schedule/schedule.d.ts +19 -0
- package/dist/schedule/schedule.js +28 -5
- package/dist/sdk.d.ts +8 -5
- package/dist/sdk.js +8 -5
- package/dist/services/services.d.ts +6 -0
- package/dist/services/services.js +6 -0
- package/dist/skills/skills.d.ts +437 -0
- package/dist/skills/skills.js +240 -0
- package/dist/tool.d.ts +1 -0
- package/dist/validation/validation.d.ts +5 -0
- package/dist/validation/validation.js +4 -0
- package/dist/versions/versions.d.ts +120 -0
- package/dist/versions/versions.js +6 -0
- package/dist/written/written.d.ts +6 -0
- package/dist/written/written.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { idSchema } from "../ids/ids.js";
|
|
3
|
+
import { Limit } from "../list-input.js";
|
|
4
|
+
import { Message } from "../messages/messages.js";
|
|
5
|
+
import { Missing } from "../missing/missing.js";
|
|
6
|
+
import { NodeId, NodeKind, NodePath, NodePerson } from "../nodes/nodes.js";
|
|
7
|
+
import { IdempotencyKey, Rev } from "../primitives/primitives.js";
|
|
8
|
+
import { Schedule } from "../schedule/schedule.js";
|
|
9
|
+
import { UserId } from "../users/users.js";
|
|
10
|
+
// Goals (#813, Nodes › Ziel, E139): the inputs of `intelligence_goal_create|get|update` and
|
|
11
|
+
// `intelligence_goal_run_create|list|get|update|complete|cancel`, and their answers. A goal says
|
|
12
|
+
// what is to be reached by when; its Operator makes the plan itself in every run. Fields stand above
|
|
13
|
+
// the line like on a card, the goal itself below it in Markdown. A run is an object of its own at the
|
|
14
|
+
// goal, frozen once it ends.
|
|
15
|
+
export const GoalId = NodeId.describe("The goal's id, a `node_…` of kind goal.");
|
|
16
|
+
// A run of a goal is the resource `run` (`run_…`) like a run of a process board; defined here, not
|
|
17
|
+
// imported from `runs.ts`, which `versions.ts` reaches through this file.
|
|
18
|
+
const RunId = idSchema("run").describe("The run's id, `run_…`, as intelligence_goal_run_list names it.");
|
|
19
|
+
export const goalPlannings = ["short", "detailed"];
|
|
20
|
+
export const GoalPlanning = z
|
|
21
|
+
.enum(goalPlannings)
|
|
22
|
+
.describe("How the Operator writes its plan: short (one line per step) or detailed (every step with how and the result it leaves).");
|
|
23
|
+
const Content = z
|
|
24
|
+
.string()
|
|
25
|
+
.max(200_000)
|
|
26
|
+
.describe("The goal as Markdown, like you would tell a colleague: goal, order, quality, done when. Link the boards, skills, tables and folders it uses as `[Name](/n/node_…)`; Startklar checks that the Operator reaches each of them.");
|
|
27
|
+
// US dollars per run, in cents of precision.
|
|
28
|
+
const Budget = z
|
|
29
|
+
.number()
|
|
30
|
+
.positive()
|
|
31
|
+
.max(100_000)
|
|
32
|
+
.multipleOf(0.01)
|
|
33
|
+
.describe("The budget of one run in US dollars; a run that spends it ends as missed.");
|
|
34
|
+
const MaxHours = z
|
|
35
|
+
.int()
|
|
36
|
+
.min(1)
|
|
37
|
+
.max(24 * 90)
|
|
38
|
+
.describe("How long one run may take at most, in hours; a run past it ends as missed.");
|
|
39
|
+
const Rhythm = Schedule.describe("When a run starts, on the rhythm's clock: daily, weekly, monthly or on dates, like a process board's schedule; whileOpen does not apply, because a moment that falls due while a run is open is always skipped. manual or null starts runs only by hand.");
|
|
40
|
+
// The fields above the line. Every one optional on a change: only what is sent changes.
|
|
41
|
+
const GoalFieldsInput = {
|
|
42
|
+
operatorId: UserId.nullable()
|
|
43
|
+
.optional()
|
|
44
|
+
.describe("The Operator that works on the goal, a machine that can read it; null for none."),
|
|
45
|
+
rhythm: Rhythm.nullable().optional(),
|
|
46
|
+
budget: Budget.nullable().optional(),
|
|
47
|
+
maxHours: MaxHours.nullable().optional(),
|
|
48
|
+
planning: GoalPlanning.optional(),
|
|
49
|
+
reportToId: UserId.nullable()
|
|
50
|
+
.optional()
|
|
51
|
+
.describe("Who gets the report of every run, someone who can read the goal; null for nobody."),
|
|
52
|
+
};
|
|
53
|
+
export const GoalCreateInput = z.strictObject({
|
|
54
|
+
// ⚠️ Required and nullable (trap C015): null is the top level of Shared.
|
|
55
|
+
parentId: NodeId.nullable().describe("The folder to create the goal in, one you can write to; null creates it on the top level of Shared."),
|
|
56
|
+
name: z.string().max(200).describe("The name as people read it, like `Monatsbericht`."),
|
|
57
|
+
content: Content,
|
|
58
|
+
...GoalFieldsInput,
|
|
59
|
+
idempotencyKey: IdempotencyKey,
|
|
60
|
+
});
|
|
61
|
+
export const GoalGetInput = z.strictObject({ goalId: GoalId });
|
|
62
|
+
export const GoalUpdateInput = z.strictObject({
|
|
63
|
+
goalId: GoalId,
|
|
64
|
+
content: Content.optional(),
|
|
65
|
+
...GoalFieldsInput,
|
|
66
|
+
rev: Rev,
|
|
67
|
+
editSession: z
|
|
68
|
+
.string()
|
|
69
|
+
.min(1)
|
|
70
|
+
.max(100)
|
|
71
|
+
.optional()
|
|
72
|
+
.describe("The editing session the editor keeps while a person stays on the goal: saves of one session go into one version. Leaving it out makes every save a version of its own, which is right for an AI."),
|
|
73
|
+
});
|
|
74
|
+
// What Startklar checks, without a model (E139): each node the goal links with the right the
|
|
75
|
+
// Operator needs there, the Operator itself, and the frame (budget and longest duration).
|
|
76
|
+
export const GoalCheck = z.object({
|
|
77
|
+
// reference: a node the text links; operator: the Operator of the goal; helper: an Operator the text
|
|
78
|
+
// mentions (`/u/user_…`), who gets cards on the boards it links (#829); connector: a connector
|
|
79
|
+
// whose tool the text names (`github_issue_list`, #829); frame: budget and longest duration.
|
|
80
|
+
kind: z.enum(["reference", "operator", "helper", "connector", "frame"]),
|
|
81
|
+
nodeId: NodeId.nullable(),
|
|
82
|
+
// The node's name and kind as the caller may read them; null where they may not, or it is gone.
|
|
83
|
+
name: z.string().nullable(),
|
|
84
|
+
nodeKind: NodeKind.nullable(),
|
|
85
|
+
// The right the Operator needs on the node: write on a board, where it hands over work as cards,
|
|
86
|
+
// read on everything else.
|
|
87
|
+
needs: z.enum(["read", "write"]).nullable(),
|
|
88
|
+
ok: z.boolean(),
|
|
89
|
+
// Why it is red, a sentence for people and their AI; null when it is green.
|
|
90
|
+
problem: z.string().nullable(),
|
|
91
|
+
// A missing right with who can give it (E126), null otherwise.
|
|
92
|
+
missing: Missing.nullable(),
|
|
93
|
+
// The Operator a helper check is about, with its name as the caller may read it; null elsewhere.
|
|
94
|
+
// nodeId, name and nodeKind then name the board it needs write on, null when the text links none.
|
|
95
|
+
user: z.object({ userId: z.string(), name: z.string().nullable() }).nullable(),
|
|
96
|
+
// The connector a connector check is about, with the tools of it the text names; null elsewhere.
|
|
97
|
+
connector: z
|
|
98
|
+
.object({ connectorId: z.string(), name: z.string(), tools: z.array(z.string()) })
|
|
99
|
+
.nullable(),
|
|
100
|
+
});
|
|
101
|
+
export const GoalReady = z.object({
|
|
102
|
+
// Green: nothing is red, Play may start a run.
|
|
103
|
+
ok: z.boolean(),
|
|
104
|
+
checkedAt: z.iso.datetime(),
|
|
105
|
+
checks: z.array(GoalCheck),
|
|
106
|
+
// What the Operator's short question about the goal costs, about: the cheapest session of the
|
|
107
|
+
// goal's last runs; null without one (#829). Asking blocks nothing.
|
|
108
|
+
questionCostUsd: z.number().nullable(),
|
|
109
|
+
});
|
|
110
|
+
export const goalRunStatuses = ["running", "reached", "missed", "ended"];
|
|
111
|
+
export const GoalRunStatus = z
|
|
112
|
+
.enum(goalRunStatuses)
|
|
113
|
+
.describe("running (started, not over), reached (the Operator closed it with its report), missed (the longest duration or the budget ran out, or the Operator says it was not reached), ended (a person stopped it).");
|
|
114
|
+
export const GoalRunTrigger = z
|
|
115
|
+
.enum(["rhythm", "play"])
|
|
116
|
+
.describe("What started the run: the rhythm, or Play by a person or their AI.");
|
|
117
|
+
const Line = z.string().min(1).max(500);
|
|
118
|
+
const Paragraph = z.string().max(4000);
|
|
119
|
+
export const GoalPlanStep = z.object({
|
|
120
|
+
title: Line,
|
|
121
|
+
how: Paragraph.nullable(),
|
|
122
|
+
result: Paragraph.nullable(),
|
|
123
|
+
done: z.boolean(),
|
|
124
|
+
// The card this step was handed over as, on a normal board; null when the Operator does it itself.
|
|
125
|
+
taskId: NodeId.nullable(),
|
|
126
|
+
});
|
|
127
|
+
const GoalPlanStepInput = z.strictObject({
|
|
128
|
+
title: Line.describe("The step in a few words."),
|
|
129
|
+
how: Paragraph.nullable()
|
|
130
|
+
.optional()
|
|
131
|
+
.describe("How it is done, and by whom: yourself, or a card for someone else."),
|
|
132
|
+
result: Paragraph.nullable().optional().describe("What the step left, once it is done."),
|
|
133
|
+
done: z.boolean().optional().describe("Whether the step is done; leaving it out means not yet."),
|
|
134
|
+
taskId: NodeId.nullable()
|
|
135
|
+
.optional()
|
|
136
|
+
.describe("The card the step was handed over as, on a normal board."),
|
|
137
|
+
});
|
|
138
|
+
export const GoalFollowUp = z.object({
|
|
139
|
+
at: z.iso.datetime(),
|
|
140
|
+
text: z.string(),
|
|
141
|
+
by: NodePerson,
|
|
142
|
+
});
|
|
143
|
+
// One time the Operator was woken for the run: by the rhythm or Play that started it, a mention in
|
|
144
|
+
// the goal's chat, or its follow-up.
|
|
145
|
+
export const GoalSession = z.object({
|
|
146
|
+
number: z.int(),
|
|
147
|
+
trigger: z.enum(["rhythm", "play", "mention", "followup"]),
|
|
148
|
+
at: z.iso.datetime(),
|
|
149
|
+
// Who mentioned the Operator, or started the run; null for the rhythm and the follow-up.
|
|
150
|
+
by: NodePerson.nullable(),
|
|
151
|
+
summary: z.string().nullable(),
|
|
152
|
+
// US dollars this session cost, as the Operator's run reported it; null while unknown.
|
|
153
|
+
costUsd: z.number().nullable(),
|
|
154
|
+
});
|
|
155
|
+
const ReportText = z.string().max(20_000);
|
|
156
|
+
const reportParts = {
|
|
157
|
+
result: ReportText.min(1).describe("What came out, in a few sentences: the line of the run."),
|
|
158
|
+
changed: ReportText.nullable().optional().describe("What changed, with links to the nodes."),
|
|
159
|
+
open: ReportText.nullable()
|
|
160
|
+
.optional()
|
|
161
|
+
.describe("What stays open, including cards handed over that are not done."),
|
|
162
|
+
learned: ReportText.nullable()
|
|
163
|
+
.optional()
|
|
164
|
+
.describe("What the next run should know: it is the goal's memory."),
|
|
165
|
+
participants: ReportText.nullable()
|
|
166
|
+
.optional()
|
|
167
|
+
.describe("Who worked on it, people and Operators."),
|
|
168
|
+
frame: ReportText.nullable().optional().describe("Time and money spent against the frame."),
|
|
169
|
+
};
|
|
170
|
+
export const GoalReport = z.object({
|
|
171
|
+
result: z.string(),
|
|
172
|
+
changed: z.string().nullable(),
|
|
173
|
+
open: z.string().nullable(),
|
|
174
|
+
learned: z.string().nullable(),
|
|
175
|
+
participants: z.string().nullable(),
|
|
176
|
+
frame: z.string().nullable(),
|
|
177
|
+
});
|
|
178
|
+
export const GoalRunItem = z.object({
|
|
179
|
+
runId: RunId,
|
|
180
|
+
goalId: GoalId,
|
|
181
|
+
status: GoalRunStatus,
|
|
182
|
+
trigger: GoalRunTrigger,
|
|
183
|
+
// The rhythm's moment the run stands for, null for Play.
|
|
184
|
+
dueAt: z.iso.datetime().nullable(),
|
|
185
|
+
startedAt: z.iso.datetime(),
|
|
186
|
+
startedBy: NodePerson.nullable(),
|
|
187
|
+
// When the longest duration runs out, null without one.
|
|
188
|
+
endsAt: z.iso.datetime().nullable(),
|
|
189
|
+
completedAt: z.iso.datetime().nullable(),
|
|
190
|
+
completedBy: NodePerson.nullable(),
|
|
191
|
+
// The number of the goal's version the run worked with.
|
|
192
|
+
goalVersion: z.int(),
|
|
193
|
+
steps: z.object({ done: z.int(), total: z.int() }),
|
|
194
|
+
sessions: z.int(),
|
|
195
|
+
spentUsd: z.number(),
|
|
196
|
+
budgetUsd: z.number().nullable(),
|
|
197
|
+
// The line of the run: the report's result, else the current state.
|
|
198
|
+
summary: z.string().nullable(),
|
|
199
|
+
// Moments of the rhythm that fell due while this run was open, skipped and never made up.
|
|
200
|
+
skipped: z.array(z.iso.datetime()),
|
|
201
|
+
});
|
|
202
|
+
// The fields above the line as a version of the goal holds them.
|
|
203
|
+
export const GoalFields = z.object({
|
|
204
|
+
operatorId: z.string().nullable(),
|
|
205
|
+
rhythm: Schedule.nullable(),
|
|
206
|
+
budget: z.number().nullable(),
|
|
207
|
+
maxHours: z.int().nullable(),
|
|
208
|
+
planning: GoalPlanning,
|
|
209
|
+
reportToId: z.string().nullable(),
|
|
210
|
+
});
|
|
211
|
+
export const GoalRunDetail = GoalRunItem.extend({
|
|
212
|
+
plan: z.array(GoalPlanStep),
|
|
213
|
+
// The Operator's state of the run, rewritten at the end of every session.
|
|
214
|
+
state: z.string().nullable(),
|
|
215
|
+
followUp: GoalFollowUp.nullable(),
|
|
216
|
+
sessionList: z.array(GoalSession),
|
|
217
|
+
report: GoalReport.nullable(),
|
|
218
|
+
// The goal as the run worked with it: the fields and the text of its version.
|
|
219
|
+
fields: GoalFields,
|
|
220
|
+
// The Operator and who got the report in that version, with their names today.
|
|
221
|
+
operator: NodePerson.nullable(),
|
|
222
|
+
reportTo: NodePerson.nullable(),
|
|
223
|
+
content: z.string(),
|
|
224
|
+
// The chat of the goal while the run was open, oldest first; only once the run is over.
|
|
225
|
+
chat: z.array(Message).nullable(),
|
|
226
|
+
rev: z.int(),
|
|
227
|
+
rights: z.object({
|
|
228
|
+
// Plan, state and follow-up: the goal's Operator and whoever writes on the goal.
|
|
229
|
+
update: z.boolean(),
|
|
230
|
+
// Closing with a report: the goal's Operator, while the run is open or ended without a report.
|
|
231
|
+
complete: z.boolean(),
|
|
232
|
+
// Stopping: whoever writes on the goal.
|
|
233
|
+
cancel: z.boolean(),
|
|
234
|
+
}),
|
|
235
|
+
});
|
|
236
|
+
export const GoalDetail = z.object({
|
|
237
|
+
goalId: GoalId,
|
|
238
|
+
name: z.string(),
|
|
239
|
+
hidden: z.boolean(),
|
|
240
|
+
parentId: NodeId.nullable(),
|
|
241
|
+
path: NodePath,
|
|
242
|
+
content: z.string(),
|
|
243
|
+
operator: NodePerson.nullable(),
|
|
244
|
+
rhythm: Schedule.nullable(),
|
|
245
|
+
// The next moment of the rhythm, null without one.
|
|
246
|
+
nextRunAt: z.iso.datetime().nullable(),
|
|
247
|
+
budget: z.number().nullable(),
|
|
248
|
+
maxHours: z.int().nullable(),
|
|
249
|
+
planning: GoalPlanning,
|
|
250
|
+
reportTo: NodePerson.nullable(),
|
|
251
|
+
ready: GoalReady,
|
|
252
|
+
// The run that is open now, with its plan and follow-up; null without one.
|
|
253
|
+
run: GoalRunDetail.nullable(),
|
|
254
|
+
// The current version's number ("Version 5").
|
|
255
|
+
version: z.int(),
|
|
256
|
+
rev: z.int(),
|
|
257
|
+
archivedAt: z.iso.datetime().nullable(),
|
|
258
|
+
rights: z.object({
|
|
259
|
+
write: z.boolean(),
|
|
260
|
+
// Play: write, no open run and Startklar green.
|
|
261
|
+
start: z.boolean(),
|
|
262
|
+
}),
|
|
263
|
+
});
|
|
264
|
+
export const GoalRunCreateInput = z.strictObject({
|
|
265
|
+
goalId: GoalId.describe("The goal to start a run of (Play), one you can write to. Refused with conflict while a run is open or Startklar is red."),
|
|
266
|
+
idempotencyKey: IdempotencyKey,
|
|
267
|
+
});
|
|
268
|
+
export const GoalRunListInput = z.strictObject({
|
|
269
|
+
goalId: GoalId,
|
|
270
|
+
status: GoalRunStatus.optional().describe("Only the runs in this state."),
|
|
271
|
+
cursor: z
|
|
272
|
+
.string()
|
|
273
|
+
.max(1000)
|
|
274
|
+
.optional()
|
|
275
|
+
.describe("The nextCursor of the previous page, unchanged. Leaving it out starts at the newest."),
|
|
276
|
+
limit: Limit.optional().describe("How many runs one page holds, 1 to 100. Leaving it out gives 50."),
|
|
277
|
+
});
|
|
278
|
+
export const GoalRunList = z.object({
|
|
279
|
+
items: z.array(GoalRunItem),
|
|
280
|
+
nextCursor: z.string().nullable(),
|
|
281
|
+
});
|
|
282
|
+
export const GoalRunGetInput = z.strictObject({ goalId: GoalId, runId: RunId });
|
|
283
|
+
export const GoalRunUpdateInput = z.strictObject({
|
|
284
|
+
goalId: GoalId,
|
|
285
|
+
runId: RunId,
|
|
286
|
+
plan: z
|
|
287
|
+
.array(GoalPlanStepInput)
|
|
288
|
+
.max(50)
|
|
289
|
+
.optional()
|
|
290
|
+
.describe("The whole plan, in order; it replaces the one before."),
|
|
291
|
+
state: z
|
|
292
|
+
.string()
|
|
293
|
+
.max(4000)
|
|
294
|
+
.nullable()
|
|
295
|
+
.optional()
|
|
296
|
+
.describe("Where the run stands now, rewritten at the end of every session."),
|
|
297
|
+
followUp: z
|
|
298
|
+
.strictObject({
|
|
299
|
+
at: z.iso
|
|
300
|
+
.datetime({ offset: true })
|
|
301
|
+
.describe("When Colab mentions the Operator in the goal's chat again, ISO 8601: in the future and before the run's longest duration runs out."),
|
|
302
|
+
text: z.string().min(1).max(2000).describe("What to check then, in a sentence."),
|
|
303
|
+
})
|
|
304
|
+
.nullable()
|
|
305
|
+
.optional()
|
|
306
|
+
.describe("The one follow-up of the run: set or move it, or null to delete it. At most one is open."),
|
|
307
|
+
note: z
|
|
308
|
+
.string()
|
|
309
|
+
.max(500)
|
|
310
|
+
.optional()
|
|
311
|
+
.describe("What this session did, in one line: shown beside the session in the plan."),
|
|
312
|
+
rev: Rev.describe("The run's revision as the last read of it returned it."),
|
|
313
|
+
});
|
|
314
|
+
export const GoalRunCompleteInput = z.strictObject({
|
|
315
|
+
goalId: GoalId,
|
|
316
|
+
runId: RunId,
|
|
317
|
+
status: z
|
|
318
|
+
.enum(["reached", "missed"])
|
|
319
|
+
.describe("reached when every point of done-when holds, missed otherwise. Ignored for a run that is already over (Colab or a person ended it): then only the report is added."),
|
|
320
|
+
report: z.strictObject(reportParts).describe("The report of the run, sent to Report to."),
|
|
321
|
+
});
|
|
322
|
+
export const GoalRunCancelInput = z.strictObject({
|
|
323
|
+
goalId: GoalId,
|
|
324
|
+
runId: RunId,
|
|
325
|
+
report: z
|
|
326
|
+
.boolean()
|
|
327
|
+
.optional()
|
|
328
|
+
.describe("true asks the Operator in the goal's chat for a short report; leaving it out ends the run without one."),
|
|
329
|
+
});
|
|
@@ -8,6 +8,8 @@ export declare const resources: {
|
|
|
8
8
|
readonly task: "tasks";
|
|
9
9
|
readonly gadget: "gadgets";
|
|
10
10
|
readonly file: "files";
|
|
11
|
+
readonly goal: "goals";
|
|
12
|
+
readonly skill: "skills";
|
|
11
13
|
readonly run: "runs";
|
|
12
14
|
readonly version: "versions";
|
|
13
15
|
readonly chat: "chats";
|
|
@@ -34,6 +36,7 @@ export declare const resources: {
|
|
|
34
36
|
readonly secret: "secrets";
|
|
35
37
|
readonly step: "steps";
|
|
36
38
|
readonly crawl: "crawls";
|
|
39
|
+
readonly mcp: "mcps";
|
|
37
40
|
};
|
|
38
41
|
export declare const actions: readonly ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
39
42
|
export declare const verbs: readonly ["invite", "resend", "disable", "enable", "rotate", "share", "move", "start", "complete", "test", "revoke", "remove", "unlock", "publish", "schedule", "unpublish", "cancel"];
|
package/dist/grammar/grammar.js
CHANGED
|
@@ -24,6 +24,12 @@ export const resources = {
|
|
|
24
24
|
// A small application an AI builds and Colab runs (#642, E118): `intelligence_gadget_*`.
|
|
25
25
|
gadget: "gadgets",
|
|
26
26
|
file: "files",
|
|
27
|
+
// What is to be reached by when, with its runs (#813, E139, Nodes › Ziel): `intelligence_goal_*`,
|
|
28
|
+
// a run of it `intelligence_goal_run_*`. Named by the documentation page.
|
|
29
|
+
goal: "goals",
|
|
30
|
+
// How something is done well, with its result, trigger and tests (#817, #807, E140, Nodes › Skill):
|
|
31
|
+
// `intelligence_skill_*`, a run of it in its log `intelligence_skill_run_*`.
|
|
32
|
+
skill: "skills",
|
|
27
33
|
run: "runs",
|
|
28
34
|
version: "versions",
|
|
29
35
|
chat: "chats",
|
|
@@ -63,6 +69,9 @@ export const resources = {
|
|
|
63
69
|
// A crawl of a known website at Cloudflare Browser Rendering (#785, E137): `intelligence_crawl_*`.
|
|
64
70
|
// Its pages are searched in Colab for 14 days and stored nowhere as a node.
|
|
65
71
|
crawl: "crawls",
|
|
72
|
+
// A person's own MCP server for their personal Operators (#802, E144, Einstellungen › MCPs):
|
|
73
|
+
// `operator_mcp_*`, its protocol `operator_mcp_call_list`. Named by the ticket and the page.
|
|
74
|
+
mcp: "mcps",
|
|
66
75
|
};
|
|
67
76
|
// The closed list of actions with a route of their own shape.
|
|
68
77
|
export const actions = ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
@@ -220,6 +229,9 @@ const routeExceptions = {
|
|
|
220
229
|
method: "PATCH",
|
|
221
230
|
path: "/api/intelligence/boards/:boardId/tasks",
|
|
222
231
|
},
|
|
232
|
+
// The limits of personal Operators (E143, #804): without `userId` the company's defaults, with it
|
|
233
|
+
// one person's own values. The defaults are no person, so there is no one `userId` for the path.
|
|
234
|
+
operator_user_update: { method: "PATCH", path: "/api/operator/users" },
|
|
223
235
|
};
|
|
224
236
|
// `access_user_invite` → `POST /api/access/users/:userId/invite`.
|
|
225
237
|
export function toolRoute(name) {
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const McpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
3
|
+
export type McpId = z.infer<typeof McpId>;
|
|
4
|
+
export declare const McpAuth: z.ZodEnum<{
|
|
5
|
+
oauth: "oauth";
|
|
6
|
+
bearer: "bearer";
|
|
7
|
+
header: "header";
|
|
8
|
+
none: "none";
|
|
9
|
+
}>;
|
|
10
|
+
export type McpAuth = z.infer<typeof McpAuth>;
|
|
11
|
+
export declare const McpState: z.ZodEnum<{
|
|
12
|
+
expired: "expired";
|
|
13
|
+
running: "running";
|
|
14
|
+
unreachable: "unreachable";
|
|
15
|
+
pending: "pending";
|
|
16
|
+
}>;
|
|
17
|
+
export type McpState = z.infer<typeof McpState>;
|
|
18
|
+
export declare const mcpCatalog: readonly [{
|
|
19
|
+
readonly id: "gmail";
|
|
20
|
+
readonly name: "Gmail";
|
|
21
|
+
readonly url: "https://gmailmcp.googleapis.com/mcp/v1";
|
|
22
|
+
readonly auth: "oauth";
|
|
23
|
+
readonly signIn: "Google";
|
|
24
|
+
readonly color: "#c5221f";
|
|
25
|
+
readonly initials: "G";
|
|
26
|
+
}, {
|
|
27
|
+
readonly id: "calendar";
|
|
28
|
+
readonly name: "Google Calendar";
|
|
29
|
+
readonly url: "https://calendarmcp.googleapis.com/mcp/v1";
|
|
30
|
+
readonly auth: "oauth";
|
|
31
|
+
readonly signIn: "Google";
|
|
32
|
+
readonly color: "#1a73e8";
|
|
33
|
+
readonly initials: "K";
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: "drive";
|
|
36
|
+
readonly name: "Google Drive";
|
|
37
|
+
readonly url: "https://drivemcp.googleapis.com/mcp/v1";
|
|
38
|
+
readonly auth: "oauth";
|
|
39
|
+
readonly signIn: "Google";
|
|
40
|
+
readonly color: "#188038";
|
|
41
|
+
readonly initials: "D";
|
|
42
|
+
}, {
|
|
43
|
+
readonly id: "slack";
|
|
44
|
+
readonly name: "Slack";
|
|
45
|
+
readonly url: "https://mcp.slack.com/mcp";
|
|
46
|
+
readonly auth: "oauth";
|
|
47
|
+
readonly signIn: "Slack";
|
|
48
|
+
readonly color: "#4a154b";
|
|
49
|
+
readonly initials: "Sl";
|
|
50
|
+
}, {
|
|
51
|
+
readonly id: "teams";
|
|
52
|
+
readonly name: "Microsoft Teams";
|
|
53
|
+
readonly url: "https://agent365.svc.cloud.microsoft/agents/servers/mcp_TeamsServer";
|
|
54
|
+
readonly auth: "oauth";
|
|
55
|
+
readonly signIn: "Microsoft";
|
|
56
|
+
readonly color: "#5059c9";
|
|
57
|
+
readonly initials: "T";
|
|
58
|
+
}, {
|
|
59
|
+
readonly id: "outlook";
|
|
60
|
+
readonly name: "Outlook";
|
|
61
|
+
readonly url: "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools";
|
|
62
|
+
readonly auth: "oauth";
|
|
63
|
+
readonly signIn: "Microsoft";
|
|
64
|
+
readonly color: "#0f6cbd";
|
|
65
|
+
readonly initials: "O";
|
|
66
|
+
}, {
|
|
67
|
+
readonly id: "hubspot";
|
|
68
|
+
readonly name: "HubSpot";
|
|
69
|
+
readonly url: "https://mcp.hubspot.com";
|
|
70
|
+
readonly auth: "oauth";
|
|
71
|
+
readonly signIn: "HubSpot";
|
|
72
|
+
readonly color: "#c2410c";
|
|
73
|
+
readonly initials: "H";
|
|
74
|
+
}, {
|
|
75
|
+
readonly id: "notion";
|
|
76
|
+
readonly name: "Notion";
|
|
77
|
+
readonly url: "https://mcp.notion.com/mcp";
|
|
78
|
+
readonly auth: "oauth";
|
|
79
|
+
readonly signIn: "Notion";
|
|
80
|
+
readonly color: "#111111";
|
|
81
|
+
readonly initials: "N";
|
|
82
|
+
}];
|
|
83
|
+
export type McpCatalogEntry = (typeof mcpCatalog)[number];
|
|
84
|
+
export declare const McpCatalogId: z.ZodEnum<{
|
|
85
|
+
[x: string]: string;
|
|
86
|
+
}>;
|
|
87
|
+
export type McpCatalogId = McpCatalogEntry["id"];
|
|
88
|
+
export declare const McpListInput: z.ZodObject<{
|
|
89
|
+
cursor: z.ZodOptional<z.ZodTemplateLiteral<`mcp_${string}`>>;
|
|
90
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
export type McpListInput = z.infer<typeof McpListInput>;
|
|
93
|
+
export declare const McpGetInput: z.ZodObject<{
|
|
94
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
export type McpGetInput = z.infer<typeof McpGetInput>;
|
|
97
|
+
export declare const McpCreateInput: z.ZodObject<{
|
|
98
|
+
catalogId: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
[x: string]: string;
|
|
100
|
+
}>>;
|
|
101
|
+
name: z.ZodOptional<z.ZodString>;
|
|
102
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
103
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
oauth: "oauth";
|
|
105
|
+
bearer: "bearer";
|
|
106
|
+
header: "header";
|
|
107
|
+
none: "none";
|
|
108
|
+
}>>;
|
|
109
|
+
headerName: z.ZodOptional<z.ZodString>;
|
|
110
|
+
value: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strict>;
|
|
112
|
+
export type McpCreateInput = z.infer<typeof McpCreateInput>;
|
|
113
|
+
export declare const McpUpdateInput: z.ZodObject<{
|
|
114
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
115
|
+
name: z.ZodOptional<z.ZodString>;
|
|
116
|
+
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
117
|
+
value: z.ZodOptional<z.ZodString>;
|
|
118
|
+
signIn: z.ZodOptional<z.ZodLiteral<true>>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
export type McpUpdateInput = z.infer<typeof McpUpdateInput>;
|
|
121
|
+
export declare const McpTestInput: z.ZodObject<{
|
|
122
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
export type McpTestInput = z.infer<typeof McpTestInput>;
|
|
125
|
+
export declare const McpRevokeInput: z.ZodObject<{
|
|
126
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
127
|
+
}, z.core.$strict>;
|
|
128
|
+
export type McpRevokeInput = z.infer<typeof McpRevokeInput>;
|
|
129
|
+
export declare const McpCallListInput: z.ZodObject<{
|
|
130
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
131
|
+
cursor: z.ZodOptional<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
132
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
export type McpCallListInput = z.infer<typeof McpCallListInput>;
|
|
135
|
+
export declare const McpTool: z.ZodObject<{
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
description: z.ZodString;
|
|
138
|
+
writes: z.ZodBoolean;
|
|
139
|
+
enabled: z.ZodBoolean;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type McpTool = z.infer<typeof McpTool>;
|
|
142
|
+
export declare const Mcp: z.ZodObject<{
|
|
143
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
144
|
+
catalogId: z.ZodNullable<z.ZodEnum<{
|
|
145
|
+
[x: string]: string;
|
|
146
|
+
}>>;
|
|
147
|
+
name: z.ZodString;
|
|
148
|
+
url: z.ZodString;
|
|
149
|
+
auth: z.ZodEnum<{
|
|
150
|
+
oauth: "oauth";
|
|
151
|
+
bearer: "bearer";
|
|
152
|
+
header: "header";
|
|
153
|
+
none: "none";
|
|
154
|
+
}>;
|
|
155
|
+
headerName: z.ZodNullable<z.ZodString>;
|
|
156
|
+
state: z.ZodEnum<{
|
|
157
|
+
expired: "expired";
|
|
158
|
+
running: "running";
|
|
159
|
+
unreachable: "unreachable";
|
|
160
|
+
pending: "pending";
|
|
161
|
+
}>;
|
|
162
|
+
authorizeUrl: z.ZodNullable<z.ZodString>;
|
|
163
|
+
problem: z.ZodNullable<z.ZodString>;
|
|
164
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
description: z.ZodString;
|
|
167
|
+
writes: z.ZodBoolean;
|
|
168
|
+
enabled: z.ZodBoolean;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
machineIds: z.ZodArray<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
171
|
+
checkedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
172
|
+
createdAt: z.ZodISODateTime;
|
|
173
|
+
createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
174
|
+
updatedAt: z.ZodISODateTime;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export type Mcp = z.infer<typeof Mcp>;
|
|
177
|
+
export declare const McpList: z.ZodObject<{
|
|
178
|
+
items: z.ZodArray<z.ZodObject<{
|
|
179
|
+
mcpId: z.ZodTemplateLiteral<`mcp_${string}`>;
|
|
180
|
+
catalogId: z.ZodNullable<z.ZodEnum<{
|
|
181
|
+
[x: string]: string;
|
|
182
|
+
}>>;
|
|
183
|
+
name: z.ZodString;
|
|
184
|
+
url: z.ZodString;
|
|
185
|
+
auth: z.ZodEnum<{
|
|
186
|
+
oauth: "oauth";
|
|
187
|
+
bearer: "bearer";
|
|
188
|
+
header: "header";
|
|
189
|
+
none: "none";
|
|
190
|
+
}>;
|
|
191
|
+
headerName: z.ZodNullable<z.ZodString>;
|
|
192
|
+
state: z.ZodEnum<{
|
|
193
|
+
expired: "expired";
|
|
194
|
+
running: "running";
|
|
195
|
+
unreachable: "unreachable";
|
|
196
|
+
pending: "pending";
|
|
197
|
+
}>;
|
|
198
|
+
authorizeUrl: z.ZodNullable<z.ZodString>;
|
|
199
|
+
problem: z.ZodNullable<z.ZodString>;
|
|
200
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
201
|
+
name: z.ZodString;
|
|
202
|
+
description: z.ZodString;
|
|
203
|
+
writes: z.ZodBoolean;
|
|
204
|
+
enabled: z.ZodBoolean;
|
|
205
|
+
}, z.core.$strip>>;
|
|
206
|
+
machineIds: z.ZodArray<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
207
|
+
checkedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
208
|
+
createdAt: z.ZodISODateTime;
|
|
209
|
+
createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
210
|
+
updatedAt: z.ZodISODateTime;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`mcp_${string}`>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
export type McpList = z.infer<typeof McpList>;
|
|
215
|
+
export declare const McpCallAction: z.ZodEnum<{
|
|
216
|
+
blocked: "blocked";
|
|
217
|
+
update: "update";
|
|
218
|
+
test: "test";
|
|
219
|
+
revoke: "revoke";
|
|
220
|
+
call: "call";
|
|
221
|
+
connect: "connect";
|
|
222
|
+
signin: "signin";
|
|
223
|
+
expire: "expire";
|
|
224
|
+
}>;
|
|
225
|
+
export type McpCallAction = z.infer<typeof McpCallAction>;
|
|
226
|
+
export declare const McpCall: z.ZodObject<{
|
|
227
|
+
callId: z.ZodTemplateLiteral<`call_${string}`>;
|
|
228
|
+
action: z.ZodEnum<{
|
|
229
|
+
blocked: "blocked";
|
|
230
|
+
update: "update";
|
|
231
|
+
test: "test";
|
|
232
|
+
revoke: "revoke";
|
|
233
|
+
call: "call";
|
|
234
|
+
connect: "connect";
|
|
235
|
+
signin: "signin";
|
|
236
|
+
expire: "expire";
|
|
237
|
+
}>;
|
|
238
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
239
|
+
machineId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
240
|
+
status: z.ZodNullable<z.ZodInt>;
|
|
241
|
+
createdAt: z.ZodISODateTime;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
export type McpCall = z.infer<typeof McpCall>;
|
|
244
|
+
export declare const McpCallList: z.ZodObject<{
|
|
245
|
+
items: z.ZodArray<z.ZodObject<{
|
|
246
|
+
callId: z.ZodTemplateLiteral<`call_${string}`>;
|
|
247
|
+
action: z.ZodEnum<{
|
|
248
|
+
blocked: "blocked";
|
|
249
|
+
update: "update";
|
|
250
|
+
test: "test";
|
|
251
|
+
revoke: "revoke";
|
|
252
|
+
call: "call";
|
|
253
|
+
connect: "connect";
|
|
254
|
+
signin: "signin";
|
|
255
|
+
expire: "expire";
|
|
256
|
+
}>;
|
|
257
|
+
tool: z.ZodNullable<z.ZodString>;
|
|
258
|
+
machineId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
259
|
+
status: z.ZodNullable<z.ZodInt>;
|
|
260
|
+
createdAt: z.ZodISODateTime;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
export type McpCallList = z.infer<typeof McpCallList>;
|