@anchrd/colab-sdk 0.1.52 → 0.1.54

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.
@@ -975,7 +975,8 @@ export const ClosureFound = z.discriminatedUnion("text", [
975
975
  published: z.boolean(),
976
976
  problems: z.int().min(0),
977
977
  }),
978
- // The gadget's level does not allow the outcome.
978
+ // The gadget's level did not allow the outcome. Not found any more since #1237 (E276); it stays
979
+ // for closures stored before.
979
980
  z.object({ text: z.literal("level"), level: z.enum(["report", "draft", "publish"]) }),
980
981
  // The goal run as it stands.
981
982
  z.object({ text: z.literal("goalRun"), status: z.string(), followUp: z.boolean() }),
@@ -142,6 +142,7 @@ export declare const RelationOutside: z.ZodObject<{
142
142
  goal: "goal";
143
143
  skill: "skill";
144
144
  source: "source";
145
+ flow: "flow";
145
146
  }>>;
146
147
  folderId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
147
148
  folderName: z.ZodNullable<z.ZodString>;
@@ -238,6 +239,7 @@ export declare const RelationList: z.ZodObject<{
238
239
  goal: "goal";
239
240
  skill: "skill";
240
241
  source: "source";
242
+ flow: "flow";
241
243
  }>>;
242
244
  folderId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
243
245
  folderName: z.ZodNullable<z.ZodString>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const rhythms: readonly ["manual", "daily", "weekly", "monthly", "dates"];
3
3
  export declare const weekdays: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
4
+ export declare const TimeOfDay: z.ZodString;
4
5
  export declare const weeksOfMonth: readonly ["first", "second", "third", "fourth", "last"];
5
6
  export declare const whileOpenModes: readonly ["wait", "continue"];
6
7
  export declare const WhileOpen: z.ZodEnum<{
@@ -15,7 +15,7 @@ export const weekdays = [
15
15
  // No seconds and no zone on the string: a run happens at eight, and the zone is the schedule's own.
16
16
  // `24:00` is refused rather than read as midnight, so one moment has one spelling (anchrd/intel
17
17
  // `contract/process.ts`, f4eccd16).
18
- const TimeOfDay = z
18
+ export const TimeOfDay = z
19
19
  .string()
20
20
  .regex(/^([01]\d|2[0-3]):[0-5]\d$/, "A time of day is HH:MM, from 00:00 to 23:59, like 08:00.");
21
21
  // A fixed moment on the wall clock of the schedule's zone, without seconds and without an offset.
package/dist/sdk.d.ts CHANGED
@@ -19,8 +19,10 @@ export { ErrorCode, ErrorCurrent, ErrorIssue, ErrorResponse, errorCodes, invalid
19
19
  export { ActorKind, Event, EventId, EventKind, EventList, EventListInput, EventSource, } from "./events/events.js";
20
20
  export { ExcerptCursor, excerptChars, RowsExcerpt, TextExcerpt } from "./excerpt/excerpt.js";
21
21
  export { FileCreateInput, FileDescribeInput, FileDescription, FileDetail, type FileEncoding, type FileFormat, FileGetInput, FileId, FileTextState, FileUpdateInput, FileUpload, fileEncodings, fileFormatExtensions, fileFormatOf, fileTextStates, maxContentFileBytes, maxDescribeBytes, maxDescribeQuestionChars, maxFileBytes, UploadTicket, uploadTicketHeader, uploadTicketLifetimeMs, } from "./files/files.js";
22
+ export { FlowBox, FlowElementRef, FlowFreeAction, FlowLiveClientMessage, FlowLiveServerMessage, FlowRun, FlowRunActed, FlowRunActionCreateInput, FlowRunCancelInput, FlowRunCompleted, FlowRunCompleteInput, FlowRunCreateInput, FlowRunDetail, FlowRunGetInput, FlowRunId, FlowRunList, FlowRunListInput, FlowRunPage, FlowRunPageGetInput, FlowRunPicture, FlowRunStarted, type FlowRunStatus, FlowRunStep, FlowRunStepCreateInput, FlowRunStepResult, FlowRunStepStarted, type FlowRunStepStatus, FlowRunStepUpdateInput, flowLivePath, flowPicturePath, flowRunKinds, flowRunStatuses, flowRunStepStatuses, flowRunTriggers, } from "./flows/flow-runs.js";
23
+ export { FlowAction, FlowActions, type FlowActionType, FlowCreateInput, FlowDetail, FlowGetInput, FlowHost, FlowHour, FlowPublishInput, FlowReachedPath, FlowSchedule, FlowScheduleDetail, FlowSecret, FlowSecretCreateInput, FlowSecretList, FlowSecretListInput, FlowSecretName, FlowSecretRemoved, FlowSecretRemoveInput, FlowSecretUpdateInput, FlowStep, FlowStepCreateInput, FlowStepId, FlowStepMoveInput, FlowStepRemoveInput, FlowStepState, FlowStepUpdateInput, FlowSubStep, FlowTarget, FlowUpdateInput, FlowVersionContent, flowActionTypes, flowLimits, flowReadTakes, flowRecordingDays, flowRhythms, flowScheduleProblem, flowStepStates, } from "./flows/flows.js";
22
24
  export { FunctionRemoved, ServiceInterfaceFunctionCreateInput, ServiceInterfaceFunctionRemoveInput, ServiceInterfaceFunctionUpdateInput, } from "./functions/functions.js";
23
- export { GadgetAccess, GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetDiffFile, GadgetDistAnswer, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetLevel, GadgetManifest, GadgetPublishInput, GadgetRequires, GadgetSettings, GadgetTestHooks, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetUseRight, GadgetUses, GadgetVersionRef, gadgetLimits, gadgetLogDays, TestLimits, testLimits, testLimitsText, } from "./gadgets/gadgets.js";
25
+ export { GadgetAccess, GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetDiffFile, GadgetDistAnswer, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetManifest, GadgetPublishInput, GadgetRequires, GadgetSettings, GadgetTestHooks, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetUseRight, GadgetUses, GadgetVersionRef, gadgetLimits, gadgetLogDays, TestLimits, testLimits, testLimitsText, } from "./gadgets/gadgets.js";
24
26
  export { GoalCheck, GoalCreateInput, GoalDetail, GoalFields, GoalFollowUp, GoalGetInput, GoalId, GoalPlanning, GoalPlanStep, GoalProof, GoalReady, GoalReport, GoalRunCancelInput, GoalRunCompleteInput, GoalRunCreateInput, GoalRunDetail, GoalRunGetInput, GoalRunItem, GoalRunList, GoalRunListInput, GoalRunStatus, GoalRunTrigger, GoalRunUpdateInput, GoalSession, GoalUpdateInput, goalPlannings, goalRunStatuses, } from "./goals/goals.js";
25
27
  export { type Action, actions, hasRoute, isAction, isPackage, isWord, type Package, packages, parseConnectorFunction, parseToolName, type Resource, type Route, resources, type ToolName, toolAnnotations, toolEvent, toolPermission, toolRoute, toolSchemaName, verbs, } from "./grammar/grammar.js";
26
28
  export { GrantId, GrantRight, NodeGrant, NodeGrantList, NodeGrantListInput, NodeGrantRevoked, NodeGrantRevokeInput, NodeShared, NodeShareInput, } from "./grants/grants.js";
package/dist/sdk.js CHANGED
@@ -22,8 +22,10 @@ export { ErrorCode, ErrorCurrent, ErrorIssue, ErrorResponse, errorCodes, invalid
22
22
  export { ActorKind, Event, EventId, EventKind, EventList, EventListInput, EventSource, } from "./events/events.js";
23
23
  export { ExcerptCursor, excerptChars, RowsExcerpt, TextExcerpt } from "./excerpt/excerpt.js";
24
24
  export { FileCreateInput, FileDescribeInput, FileDescription, FileDetail, FileGetInput, FileId, FileTextState, FileUpdateInput, FileUpload, fileEncodings, fileFormatExtensions, fileFormatOf, fileTextStates, maxContentFileBytes, maxDescribeBytes, maxDescribeQuestionChars, maxFileBytes, UploadTicket, uploadTicketHeader, uploadTicketLifetimeMs, } from "./files/files.js";
25
+ export { FlowBox, FlowElementRef, FlowFreeAction, FlowLiveClientMessage, FlowLiveServerMessage, FlowRun, FlowRunActed, FlowRunActionCreateInput, FlowRunCancelInput, FlowRunCompleted, FlowRunCompleteInput, FlowRunCreateInput, FlowRunDetail, FlowRunGetInput, FlowRunId, FlowRunList, FlowRunListInput, FlowRunPage, FlowRunPageGetInput, FlowRunPicture, FlowRunStarted, FlowRunStep, FlowRunStepCreateInput, FlowRunStepResult, FlowRunStepStarted, FlowRunStepUpdateInput, flowLivePath, flowPicturePath, flowRunKinds, flowRunStatuses, flowRunStepStatuses, flowRunTriggers, } from "./flows/flow-runs.js";
26
+ export { FlowAction, FlowActions, FlowCreateInput, FlowDetail, FlowGetInput, FlowHost, FlowHour, FlowPublishInput, FlowReachedPath, FlowSchedule, FlowScheduleDetail, FlowSecret, FlowSecretCreateInput, FlowSecretList, FlowSecretListInput, FlowSecretName, FlowSecretRemoved, FlowSecretRemoveInput, FlowSecretUpdateInput, FlowStep, FlowStepCreateInput, FlowStepId, FlowStepMoveInput, FlowStepRemoveInput, FlowStepState, FlowStepUpdateInput, FlowSubStep, FlowTarget, FlowUpdateInput, FlowVersionContent, flowActionTypes, flowLimits, flowReadTakes, flowRecordingDays, flowRhythms, flowScheduleProblem, flowStepStates, } from "./flows/flows.js";
25
27
  export { FunctionRemoved, ServiceInterfaceFunctionCreateInput, ServiceInterfaceFunctionRemoveInput, ServiceInterfaceFunctionUpdateInput, } from "./functions/functions.js";
26
- export { GadgetAccess, GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetDiffFile, GadgetDistAnswer, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetLevel, GadgetManifest, GadgetPublishInput, GadgetRequires, GadgetSettings, GadgetTestHooks, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetUseRight, GadgetUses, GadgetVersionRef, gadgetLimits, gadgetLogDays, TestLimits, testLimits, testLimitsText, } from "./gadgets/gadgets.js";
28
+ export { GadgetAccess, GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetDiffFile, GadgetDistAnswer, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetManifest, GadgetPublishInput, GadgetRequires, GadgetSettings, GadgetTestHooks, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetUseRight, GadgetUses, GadgetVersionRef, gadgetLimits, gadgetLogDays, TestLimits, testLimits, testLimitsText, } from "./gadgets/gadgets.js";
27
29
  export { GoalCheck, GoalCreateInput, GoalDetail, GoalFields, GoalFollowUp, GoalGetInput, GoalId, GoalPlanning, GoalPlanStep, GoalProof, GoalReady, GoalReport, GoalRunCancelInput, GoalRunCompleteInput, GoalRunCreateInput, GoalRunDetail, GoalRunGetInput, GoalRunItem, GoalRunList, GoalRunListInput, GoalRunStatus, GoalRunTrigger, GoalRunUpdateInput, GoalSession, GoalUpdateInput, goalPlannings, goalRunStatuses, } from "./goals/goals.js";
28
30
  export { actions, hasRoute, isAction, isPackage, isWord, packages, parseConnectorFunction, parseToolName, resources, toolAnnotations, toolEvent, toolPermission, toolRoute, toolSchemaName, verbs, } from "./grammar/grammar.js";
29
31
  export { GrantId, GrantRight, NodeGrant, NodeGrantList, NodeGrantListInput, NodeGrantRevoked, NodeGrantRevokeInput, NodeShared, NodeShareInput, } from "./grants/grants.js";
@@ -242,11 +242,6 @@ export declare const SourceUpdateInput: z.ZodObject<{
242
242
  discard: z.ZodOptional<z.ZodLiteral<true>>;
243
243
  settings: z.ZodOptional<z.ZodObject<{
244
244
  responsibleId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>>;
245
- level: z.ZodOptional<z.ZodEnum<{
246
- publish: "publish";
247
- draft: "draft";
248
- report: "report";
249
- }>>;
250
245
  keepDays: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<30>, z.ZodLiteral<90>, z.ZodLiteral<180>]>>;
251
246
  logDays: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<7>, z.ZodLiteral<14>, z.ZodLiteral<30>]>>;
252
247
  original: z.ZodOptional<z.ZodNull>;
@@ -969,11 +964,6 @@ export declare const SourceDetail: z.ZodObject<{
969
964
  human: "human";
970
965
  }>>;
971
966
  }, z.core.$strip>>;
972
- level: z.ZodEnum<{
973
- publish: "publish";
974
- draft: "draft";
975
- report: "report";
976
- }>;
977
967
  keepDays: z.ZodNumber;
978
968
  logDays: z.ZodNumber;
979
969
  credentials: z.ZodArray<z.ZodObject<{
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { GadgetFile, GadgetFilePath, GadgetLevel, GadgetTestRun } from "../gadgets/gadgets.js";
2
+ import { GadgetFile, GadgetFilePath, GadgetTestRun } from "../gadgets/gadgets.js";
3
3
  import { idSchema } from "../ids/ids.js";
4
4
  import { Flag, Limit } from "../list-input.js";
5
5
  import { CreateSection, NodeId, NodePath, NodePerson } from "../nodes/nodes.js";
@@ -227,8 +227,9 @@ export const SourceUpdateInput = z.strictObject({
227
227
  discard: z.literal(true).optional().describe("Throw the draft away."),
228
228
  settings: z
229
229
  .strictObject({
230
- responsibleId: UserId.nullable().optional(),
231
- level: GadgetLevel.optional(),
230
+ responsibleId: UserId.nullable()
231
+ .optional()
232
+ .describe("The Operator or person who gets every new failure as an Action, repairs it and publishes the repair (only with every test green and no new hosts); null for nobody. Only whoever may write the source changes it."),
232
233
  keepDays: KeepDays.optional(),
233
234
  logDays: LogDays.optional(),
234
235
  original: z
@@ -473,7 +474,6 @@ export const SourceDetail = z.object({
473
474
  settings: z
474
475
  .object({
475
476
  responsible: NodePerson.nullable(),
476
- level: GadgetLevel,
477
477
  keepDays: z.number().int(),
478
478
  logDays: z.number().int(),
479
479
  // Names only, never values: which key is set and when. ⚠️ Not `secrets`: `/mcp` strikes every
@@ -1,4 +1,4 @@
1
1
  import type { NodeKindRead } from "../nodes/nodes.js";
2
- export declare const treeKindOrder: readonly ["folder", "document", "table", "board", "gadget", "source", "file", "skill", "goal"];
2
+ export declare const treeKindOrder: readonly ["folder", "document", "table", "board", "gadget", "source", "flow", "file", "skill", "goal"];
3
3
  export declare function treeKindRank(kind: NodeKindRead): number;
4
4
  export declare function compareTreeNames(a: string, b: string): number;
@@ -8,6 +8,7 @@ export const treeKindOrder = [
8
8
  "board",
9
9
  "gadget",
10
10
  "source",
11
+ "flow",
11
12
  "file",
12
13
  "skill",
13
14
  "goal",
@@ -10,6 +10,8 @@ export declare const Changed: z.ZodObject<{
10
10
  goalId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
11
11
  skillId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
12
12
  sourceId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
13
+ flowId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
14
+ stepId: z.ZodOptional<z.ZodTemplateLiteral<`step_${string}`>>;
13
15
  queryId: z.ZodOptional<z.ZodTemplateLiteral<`query_${string}`>>;
14
16
  runId: z.ZodOptional<z.ZodTemplateLiteral<`run_${string}`>>;
15
17
  messageId: z.ZodOptional<z.ZodTemplateLiteral<`message_${string}`>>;
@@ -148,6 +150,8 @@ export declare const Written: z.ZodObject<{
148
150
  goalId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
149
151
  skillId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
150
152
  sourceId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
153
+ flowId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
154
+ stepId: z.ZodOptional<z.ZodTemplateLiteral<`step_${string}`>>;
151
155
  queryId: z.ZodOptional<z.ZodTemplateLiteral<`query_${string}`>>;
152
156
  runId: z.ZodOptional<z.ZodTemplateLiteral<`run_${string}`>>;
153
157
  messageId: z.ZodOptional<z.ZodTemplateLiteral<`message_${string}`>>;
@@ -4,6 +4,7 @@ import { TaskColumn } from "../columns/columns.js";
4
4
  import { ConnectionId } from "../connections/connections.js";
5
5
  import { ConnectorId } from "../connectors/connectors.js";
6
6
  import { Warning } from "../error/error.js";
7
+ import { FlowStepId } from "../flows/flows.js";
7
8
  import { GrantId } from "../grants/grants.js";
8
9
  import { idSchema } from "../ids/ids.js";
9
10
  import { InvitationId } from "../invitations/invitations.js";
@@ -40,6 +41,9 @@ export const Changed = z.object({
40
41
  goalId: NodeId.optional(),
41
42
  skillId: NodeId.optional(),
42
43
  sourceId: NodeId.optional(),
44
+ // A flow and a step of it (#1228).
45
+ flowId: NodeId.optional(),
46
+ stepId: FlowStepId.optional(),
43
47
  queryId: QueryId.optional(),
44
48
  runId: RunId.optional(),
45
49
  messageId: MessageId.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.52",
3
+ "version": "0.1.54",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",