@anchrd/colab-sdk 0.1.43 → 0.1.45

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.
@@ -37,6 +37,12 @@ import { OperatorProvider, UserId } from "../users/users.js";
37
37
  // `reasoning_effort: "none"` (`reasoningEffort`); `openai/gpt-6.1-sol` and `gpt-6-sol` call tools only
38
38
  // through `/responses` (Spike #979). GPT-6.1 Terra stays (#1059 keeps it) although it left its test
39
39
  // card open twice (#1066).
40
+ // `reasoning` (E249, #1139): how strongly the model thinks unasked (`level`, `off` not at all), and
41
+ // whether its path through `/compat` takes a stage while it calls tools (`adjustable`). Adjustable is
42
+ // DeepSeek: its runs think at `high` and not at `off` (#1139). Claude does not think through
43
+ // `/compat` at any stage (Sonnet 5.5 at `high`: no thinking, the same output, #1139) until #1161;
44
+ // GPT calls tools only without thinking; Grok, Kimi, GLM, Qwen and Nemotron think by themselves, but
45
+ // no stage of theirs is proven.
40
46
  export const gatewayCatalog = [
41
47
  {
42
48
  gateway: "cloudflare",
@@ -47,108 +53,126 @@ export const gatewayCatalog = [
47
53
  name: "DeepSeek V4 Pro",
48
54
  context: 1_000_000,
49
55
  price: { input: 1.32, cacheRead: 0.044, output: 3.96 },
56
+ reasoning: { level: "medium", adjustable: true },
50
57
  },
51
58
  {
52
59
  model: "workers-ai/@cf/deepseek-ai/deepseek-v4.1-flash-1017",
53
60
  name: "DeepSeek V4.1 Flash",
54
61
  context: 1_048_576,
55
62
  price: { input: 0.3, cacheRead: 0.006, output: 1.2 },
63
+ reasoning: { level: "medium", adjustable: true },
56
64
  },
57
65
  {
58
66
  model: "anthropic/claude-haiku-5-5",
59
67
  name: "Claude Haiku 5.5",
60
68
  context: 1_000_000,
61
69
  price: { input: 0.1, cacheRead: 0.01, cacheWrite: 0.125, output: 0.5 },
70
+ reasoning: { level: "off", adjustable: false },
62
71
  },
63
72
  {
64
73
  model: "anthropic/claude-sonnet-5-5",
65
74
  name: "Claude Sonnet 5.5",
66
75
  context: 1_000_000,
67
76
  price: { input: 2, cacheRead: 0.1, cacheWrite: 2.5, output: 10 },
77
+ reasoning: { level: "off", adjustable: false },
68
78
  },
69
79
  {
70
80
  model: "anthropic/claude-opus-5-5",
71
81
  name: "Claude Opus 5.5",
72
82
  context: 1_000_000,
73
83
  price: { input: 4, cacheRead: 0.2, cacheWrite: 5, output: 20 },
84
+ reasoning: { level: "off", adjustable: false },
74
85
  },
75
86
  {
76
87
  model: "anthropic/claude-fable-5-1",
77
88
  name: "Claude Fable 5.1",
78
89
  context: 1_000_000,
79
90
  price: { input: 10, cacheRead: 0.25, cacheWrite: 12.5, output: 50 },
91
+ reasoning: { level: "off", adjustable: false },
80
92
  },
81
93
  {
82
94
  model: "xai/grok-4.7",
83
95
  name: "Grok 4.7",
84
96
  context: 500_000,
85
97
  price: { input: 2, cacheRead: 0.5, output: 6 },
98
+ reasoning: { level: "medium", adjustable: false },
86
99
  },
87
100
  {
88
101
  model: "moonshotai/kimi-k3",
89
102
  name: "Kimi K3",
90
103
  context: 1_048_576,
91
104
  price: { input: 3, cacheRead: 0.3, output: 15 },
105
+ reasoning: { level: "medium", adjustable: false },
92
106
  },
93
107
  {
94
108
  model: "workers-ai/@cf/moonshotai/kimi-k2.7-code",
95
109
  name: "Kimi K2.7 Code",
96
110
  context: 262_144,
97
111
  price: { input: 0.95, cacheRead: 0.19, output: 4 },
112
+ reasoning: { level: "medium", adjustable: false },
98
113
  },
99
114
  {
100
115
  model: "workers-ai/@cf/moonshotai/kimi-k2.6",
101
116
  name: "Kimi K2.6",
102
117
  context: 262_144,
103
118
  price: { input: 0.95, cacheRead: 0.16, output: 4 },
119
+ reasoning: { level: "medium", adjustable: false },
104
120
  },
105
121
  {
106
122
  model: "workers-ai/@cf/zai-org/glm-5.3",
107
123
  name: "GLM 5.3",
108
124
  context: 1_048_576,
109
125
  price: { input: 1.4, cacheRead: 0.26, output: 4.4 },
126
+ reasoning: { level: "medium", adjustable: false },
110
127
  },
111
128
  {
112
129
  model: "workers-ai/@cf/zai-org/glm-5.3-flash",
113
130
  name: "GLM 5.3 Flash",
114
131
  context: 1_048_576,
115
132
  price: { input: 0.15, cacheRead: 0.03, output: 0.5 },
133
+ reasoning: { level: "medium", adjustable: false },
116
134
  },
117
135
  {
118
136
  model: "workers-ai/@cf/qwen/qwen3.8-27b",
119
137
  name: "Qwen3.8 27B",
120
138
  context: 262_144,
121
139
  price: { input: 0.45, cacheRead: 0.05, output: 3.2 },
140
+ reasoning: { level: "medium", adjustable: false },
122
141
  },
123
142
  {
124
143
  model: "workers-ai/@cf/google/gemma-4-26b-a4b-it",
125
144
  name: "Gemma 4 26B",
126
145
  context: 256_000,
127
146
  price: { input: 0.1, cacheRead: 0.1, output: 0.3 },
147
+ reasoning: { level: "off", adjustable: false },
128
148
  },
129
149
  {
130
150
  model: "workers-ai/@cf/nvidia/nemotron-3-120b-a12b",
131
151
  name: "Nemotron 3 120B",
132
152
  context: 256_000,
133
153
  price: { input: 0.5, cacheRead: 0.5, output: 1.5 },
154
+ reasoning: { level: "medium", adjustable: false },
134
155
  },
135
156
  {
136
157
  model: "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct",
137
158
  name: "Llama 4 Scout",
138
159
  context: 131_000,
139
160
  price: { input: 0.27, cacheRead: 0.27, output: 0.85 },
161
+ reasoning: { level: "off", adjustable: false },
140
162
  },
141
163
  {
142
164
  model: "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct",
143
165
  name: "Mistral Small 3.1",
144
166
  context: 128_000,
145
167
  price: { input: 0.351, cacheRead: 0.351, output: 0.555 },
168
+ reasoning: { level: "off", adjustable: false },
146
169
  },
147
170
  {
148
171
  model: "openai/gpt-6.1-terra",
149
172
  name: "GPT-6.1 Terra",
150
173
  context: 1_050_000,
151
174
  price: { input: 1, cacheRead: 0.05, cacheWrite: 1.25, output: 5 },
175
+ reasoning: { level: "off", adjustable: false },
152
176
  outputLimit: "max_completion_tokens",
153
177
  reasoningEffort: "none",
154
178
  },
@@ -157,6 +181,7 @@ export const gatewayCatalog = [
157
181
  name: "GPT-6 Luna",
158
182
  context: 1_050_000,
159
183
  price: { input: 0.1, cacheRead: 0.01, cacheWrite: 0.125, output: 0.5 },
184
+ reasoning: { level: "off", adjustable: false },
160
185
  outputLimit: "max_completion_tokens",
161
186
  reasoningEffort: "none",
162
187
  },
@@ -189,10 +214,29 @@ export function outputLimitOf(model) {
189
214
  const entry = gatewayModelOf(model);
190
215
  return entry && "outputLimit" in entry ? entry.outputLimit : "max_tokens";
191
216
  }
192
- // The reasoning effort a model must be sent to call tools on Chat Completions, or null (#1018).
193
- export function reasoningEffortOf(model) {
217
+ // The stage an Operator of the kind Gateway thinks at (E249, #1139): `default` sends nothing, so the
218
+ // model thinks as the catalog's `level` says; every other stage goes to the model.
219
+ export const ReasoningLevel = z.enum(["off", "low", "medium", "high"]);
220
+ export const ReasoningStage = z.enum(["default", ...ReasoningLevel.options]);
221
+ export const reasoningDefault = "default";
222
+ // A model's thinking in the catalog, or null for a model outside it.
223
+ export function reasoningOfModel(model) {
224
+ return gatewayModelOf(model)?.reasoning ?? null;
225
+ }
226
+ // Whether an Operator on this model may take a stage other than `default`.
227
+ export function reasoningAdjustable(model) {
228
+ return reasoningOfModel(model)?.adjustable ?? false;
229
+ }
230
+ export function reasoningEffortOf(model, stage) {
194
231
  const entry = gatewayModelOf(model);
195
- return entry && "reasoningEffort" in entry ? entry.reasoningEffort : null;
232
+ if (!entry)
233
+ return null;
234
+ if (!entry.reasoning.adjustable) {
235
+ return "reasoningEffort" in entry ? entry.reasoningEffort : null;
236
+ }
237
+ if (stage === "default")
238
+ return null;
239
+ return stage === "off" ? "none" : stage;
196
240
  }
197
241
  // A cache write at its own price where the catalog names one, else at the input's.
198
242
  export function cacheWritePriceOf(entry) {
@@ -212,6 +256,7 @@ export const GatewayModelEntrySchema = z.object({
212
256
  }),
213
257
  outputLimit: z.enum(["max_tokens", "max_completion_tokens"]).optional(),
214
258
  reasoningEffort: z.literal("none").optional(),
259
+ reasoning: z.object({ level: ReasoningLevel, adjustable: z.boolean() }),
215
260
  });
216
261
  // The catalog (Einstellungen › Operator › Katalog), two kinds (E210):
217
262
  // - `claude`: Claude Code in a container, with the sign-in of a subscription or an API key. Its
@@ -482,6 +527,36 @@ export const CredentialUpdateInput = z
482
527
  export const CredentialTestInput = z.strictObject({ credentialId: CredentialId });
483
528
  // "Trennen": the value is deleted at once and without archive. Refused while an Operator uses it.
484
529
  export const CredentialRevokeInput = z.strictObject({ credentialId: CredentialId });
530
+ // A person's own Claude subscription token (E240, #1114): `operator_user_credential_*`, always the
531
+ // caller's own (`userId` is you), never an admin's for someone else. Only kind subscription of Claude;
532
+ // other providers come through the company's credentials marked "Firma und Persönlich" (#1112).
533
+ const OwnUserId = UserId.describe("You, `user_…`: a person sets only their own credential, an admin none for anyone else.");
534
+ export const UserCredentialCreateInput = z.strictObject({
535
+ userId: OwnUserId,
536
+ name: CredentialName.optional().describe("Leaving it out names it Claude-Abo."),
537
+ value: CredentialValue.describe("The token of `claude setup-token` (sk-ant-oat01-…), stored sealed and never shown again."),
538
+ });
539
+ export const UserCredentialUpdateInput = z
540
+ .strictObject({
541
+ userId: OwnUserId,
542
+ credentialId: CredentialId,
543
+ name: CredentialName.optional(),
544
+ value: CredentialValue.optional().describe("A new token, tested at once."),
545
+ })
546
+ .refine((input) => input.name !== undefined || input.value !== undefined, {
547
+ message: "Name a field to change: name or value.",
548
+ });
549
+ export const UserCredentialTestInput = z.strictObject({
550
+ userId: OwnUserId,
551
+ credentialId: CredentialId,
552
+ });
553
+ export const UserCredentialRevokeInput = z.strictObject({
554
+ userId: OwnUserId,
555
+ credentialId: CredentialId,
556
+ });
557
+ // What an admin sees of a person's own credential (E240): that it is there and how it stands, never
558
+ // its value or its name.
559
+ export const OwnCredentialState = z.enum(["valid", "invalid", "limit"]);
485
560
  export const Credential = z.object({
486
561
  credentialId: CredentialId,
487
562
  // Null for a gateway credential, which serves the Operators of every provider (#470).
@@ -583,6 +658,9 @@ export const PauseReason = z.enum([
583
658
  "owner",
584
659
  "budget",
585
660
  "model",
661
+ // A personal Operator whose person's own credential is refused or at its limit, with no company
662
+ // credential marked personal to fall back to (E240, #1114): the person renews their own token.
663
+ "own",
586
664
  ]);
587
665
  export const MachineListInput = z.strictObject({
588
666
  personal: Flag.optional().describe("true: the personal Operators (E143), your own, or every person's for an admin in admin mode. Leaving it out lists the company's Operators; without admin rights you read your own personal ones only, whatever you send."),
@@ -622,6 +700,8 @@ export const OperatorMachineUpdateInput = z
622
700
  rev: Rev.describe("The revision of the Operator this change is based on, as the last read returned it. If someone saved it in between, the call answers conflict, changes nothing and names under current what stands now: decide, and send it again with that rev."),
623
701
  credentialId: CredentialId.optional(),
624
702
  model: OperatorModel.optional(),
703
+ // The stage of thinking (E249, #1139); only a model of the kind Gateway whose path takes one.
704
+ reasoning: ReasoningStage.optional(),
625
705
  subagents: Subagents.optional(),
626
706
  trigger: ChangeTrigger.optional(),
627
707
  limits: OperatorLimits.partial().optional(),
@@ -656,6 +736,8 @@ export const Operator = z.object({
656
736
  // company's, whose Actions its page does not count.
657
737
  open: z.int().min(0).nullable(),
658
738
  model: OperatorModel,
739
+ // The stage of thinking (E249, #1139); `default` for every Operator that never set one.
740
+ reasoning: ReasoningStage,
659
741
  subagents: Subagents,
660
742
  trigger: Trigger,
661
743
  limits: OperatorLimits,
@@ -718,6 +800,9 @@ export const OperatorList = z.object({
718
800
  personalCredential: z.boolean().optional(),
719
801
  // For one's own personal Operators (E143, #804): one's month against one's limit.
720
802
  budget: OperatorBudget.optional(),
803
+ // For one's own personal Operators (E240, #1114): one's own Claude subscription token, which they
804
+ // run on first; null without one. Never the value.
805
+ ownCredential: Credential.nullable().optional(),
721
806
  });
722
807
  // ---------------------------------------------------------------------------------------------
723
808
  // The people with personal Operators and their limits (E143, #804, Organisation › Operatoren ›
@@ -754,6 +839,9 @@ export const OperatorUser = z.object({
754
839
  budget: OperatorBudget,
755
840
  // Their personal Operators, deleted ones included (a deleted one keeps its runs in the sums).
756
841
  machineIds: z.array(MachineId),
842
+ // Their own Claude subscription token (E240, #1114): only that there is one and how it stands,
843
+ // never its value; null without one.
844
+ ownCredential: z.object({ state: OwnCredentialState }).nullable(),
757
845
  });
758
846
  export const OperatorUserList = z.object({
759
847
  defaults: z.object({
@@ -883,8 +971,17 @@ export const OperatorRun = z.object({
883
971
  woken: OperatorRunWoken.nullable(),
884
972
  // The credential it ran with, by name, and the switch that led there (E143, #805): the credential
885
973
  // it fell back from and why (`credential` refused, `limit` its usage limit); null without a switch.
974
+ // A person's own Claude subscription token (E240, #1114) is never named, to an admin neither:
975
+ // `credentialOwn` (and `fromOwn`) say "eigener Zugang" instead, and its name stays empty.
886
976
  credentialName: z.string().nullable(),
887
- fallback: z.object({ fromName: z.string(), reason: OperatorRunFallbackReason }).nullable(),
977
+ credentialOwn: z.boolean().optional(),
978
+ fallback: z
979
+ .object({
980
+ fromName: z.string(),
981
+ fromOwn: z.boolean().optional(),
982
+ reason: OperatorRunFallbackReason,
983
+ })
984
+ .nullable(),
888
985
  startedAt: z.iso.datetime(),
889
986
  endedAt: z.iso.datetime().nullable(),
890
987
  durationMs: z.int().nullable(),
@@ -0,0 +1,336 @@
1
+ import { z } from "zod";
2
+ export declare const baseRelationTypes: {
3
+ readonly mentions: {
4
+ readonly from: "node";
5
+ readonly to: "node";
6
+ readonly meaning: "mentions";
7
+ readonly source: "text";
8
+ };
9
+ readonly refers: {
10
+ readonly from: "node";
11
+ readonly to: "node";
12
+ readonly meaning: "refers to";
13
+ readonly source: "field";
14
+ };
15
+ readonly waits: {
16
+ readonly from: "node";
17
+ readonly to: "node";
18
+ readonly meaning: "waits for";
19
+ readonly source: "dependency";
20
+ };
21
+ readonly responsible: {
22
+ readonly from: "actor";
23
+ readonly to: "node";
24
+ readonly meaning: "answers for";
25
+ readonly source: "role";
26
+ };
27
+ readonly assignee: {
28
+ readonly from: "actor";
29
+ readonly to: "node";
30
+ readonly meaning: "works on";
31
+ readonly source: "assignment";
32
+ };
33
+ readonly operator: {
34
+ readonly from: "actor";
35
+ readonly to: "node";
36
+ readonly meaning: "pursues";
37
+ readonly source: "assignment";
38
+ };
39
+ readonly grant: {
40
+ readonly from: "node";
41
+ readonly to: "actor";
42
+ readonly meaning: "shared with";
43
+ readonly source: "grant";
44
+ };
45
+ };
46
+ export type BaseRelationType = keyof typeof baseRelationTypes;
47
+ export declare const BaseRelationType: z.ZodEnum<{
48
+ operator: "operator";
49
+ grant: "grant";
50
+ responsible: "responsible";
51
+ mentions: "mentions";
52
+ assignee: "assignee";
53
+ refers: "refers";
54
+ waits: "waits";
55
+ }>;
56
+ export declare const RelationListInput: z.ZodObject<{
57
+ nodeId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
58
+ section: z.ZodOptional<z.ZodLiteral<"shared">>;
59
+ }, z.core.$strict>;
60
+ export type RelationListInput = z.infer<typeof RelationListInput>;
61
+ export declare const RelationEnd: z.ZodDiscriminatedUnion<[z.ZodObject<{
62
+ kind: z.ZodLiteral<"node">;
63
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ kind: z.ZodLiteral<"actor">;
66
+ userId: z.ZodString;
67
+ }, z.core.$strip>, z.ZodObject<{
68
+ kind: z.ZodLiteral<"outside">;
69
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ kind: z.ZodLiteral<"type">;
72
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
73
+ }, z.core.$strip>], "kind">;
74
+ export type RelationEnd = z.infer<typeof RelationEnd>;
75
+ export declare const RelationId: z.ZodTemplateLiteral<`relation_${string}`>;
76
+ export type RelationId = z.infer<typeof RelationId>;
77
+ export declare const Relation: z.ZodObject<{
78
+ type: z.ZodUnion<readonly [z.ZodEnum<{
79
+ operator: "operator";
80
+ grant: "grant";
81
+ responsible: "responsible";
82
+ mentions: "mentions";
83
+ assignee: "assignee";
84
+ refers: "refers";
85
+ waits: "waits";
86
+ }>, z.ZodTemplateLiteral<`type_${string}`>]>;
87
+ origin: z.ZodEnum<{
88
+ set: "set";
89
+ computed: "computed";
90
+ }>;
91
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
92
+ kind: z.ZodLiteral<"node">;
93
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
94
+ }, z.core.$strip>, z.ZodObject<{
95
+ kind: z.ZodLiteral<"actor">;
96
+ userId: z.ZodString;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"outside">;
99
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
100
+ }, z.core.$strip>, z.ZodObject<{
101
+ kind: z.ZodLiteral<"type">;
102
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
103
+ }, z.core.$strip>], "kind">;
104
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ kind: z.ZodLiteral<"node">;
106
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ kind: z.ZodLiteral<"actor">;
109
+ userId: z.ZodString;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ kind: z.ZodLiteral<"outside">;
112
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
113
+ }, z.core.$strip>, z.ZodObject<{
114
+ kind: z.ZodLiteral<"type">;
115
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
116
+ }, z.core.$strip>], "kind">;
117
+ count: z.ZodNumber;
118
+ relationId: z.ZodNullable<z.ZodTemplateLiteral<`relation_${string}`>>;
119
+ }, z.core.$strip>;
120
+ export type Relation = z.infer<typeof Relation>;
121
+ export declare const RelationActor: z.ZodObject<{
122
+ userId: z.ZodString;
123
+ name: z.ZodString;
124
+ kind: z.ZodEnum<{
125
+ machine: "machine";
126
+ human: "human";
127
+ }>;
128
+ }, z.core.$strip>;
129
+ export type RelationActor = z.infer<typeof RelationActor>;
130
+ export declare const RelationOutside: z.ZodObject<{
131
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
132
+ name: z.ZodString;
133
+ kind: z.ZodCatch<z.ZodEnum<{
134
+ unknown: "unknown";
135
+ file: "file";
136
+ folder: "folder";
137
+ document: "document";
138
+ table: "table";
139
+ board: "board";
140
+ task: "task";
141
+ gadget: "gadget";
142
+ goal: "goal";
143
+ skill: "skill";
144
+ source: "source";
145
+ }>>;
146
+ folderId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
147
+ folderName: z.ZodNullable<z.ZodString>;
148
+ }, z.core.$strip>;
149
+ export type RelationOutside = z.infer<typeof RelationOutside>;
150
+ export declare const RelationType: z.ZodObject<{
151
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
152
+ name: z.ZodString;
153
+ kind: z.ZodEnum<{
154
+ object: "object";
155
+ action: "action";
156
+ relation: "relation";
157
+ actor: "actor";
158
+ }>;
159
+ }, z.core.$strip>;
160
+ export type RelationType = z.infer<typeof RelationType>;
161
+ export declare const RelationAction: z.ZodObject<{
162
+ actionId: z.ZodString;
163
+ name: z.ZodString;
164
+ description: z.ZodString;
165
+ origin: z.ZodEnum<{
166
+ set: "set";
167
+ computed: "computed";
168
+ }>;
169
+ approval: z.ZodBoolean;
170
+ implementedBy: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
171
+ on: z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>;
172
+ }, z.core.$strip>;
173
+ export type RelationAction = z.infer<typeof RelationAction>;
174
+ export declare const RelationList: z.ZodObject<{
175
+ items: z.ZodArray<z.ZodObject<{
176
+ type: z.ZodUnion<readonly [z.ZodEnum<{
177
+ operator: "operator";
178
+ grant: "grant";
179
+ responsible: "responsible";
180
+ mentions: "mentions";
181
+ assignee: "assignee";
182
+ refers: "refers";
183
+ waits: "waits";
184
+ }>, z.ZodTemplateLiteral<`type_${string}`>]>;
185
+ origin: z.ZodEnum<{
186
+ set: "set";
187
+ computed: "computed";
188
+ }>;
189
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
+ kind: z.ZodLiteral<"node">;
191
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ kind: z.ZodLiteral<"actor">;
194
+ userId: z.ZodString;
195
+ }, z.core.$strip>, z.ZodObject<{
196
+ kind: z.ZodLiteral<"outside">;
197
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
198
+ }, z.core.$strip>, z.ZodObject<{
199
+ kind: z.ZodLiteral<"type">;
200
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
201
+ }, z.core.$strip>], "kind">;
202
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
203
+ kind: z.ZodLiteral<"node">;
204
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
205
+ }, z.core.$strip>, z.ZodObject<{
206
+ kind: z.ZodLiteral<"actor">;
207
+ userId: z.ZodString;
208
+ }, z.core.$strip>, z.ZodObject<{
209
+ kind: z.ZodLiteral<"outside">;
210
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ kind: z.ZodLiteral<"type">;
213
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
214
+ }, z.core.$strip>], "kind">;
215
+ count: z.ZodNumber;
216
+ relationId: z.ZodNullable<z.ZodTemplateLiteral<`relation_${string}`>>;
217
+ }, z.core.$strip>>;
218
+ actors: z.ZodArray<z.ZodObject<{
219
+ userId: z.ZodString;
220
+ name: z.ZodString;
221
+ kind: z.ZodEnum<{
222
+ machine: "machine";
223
+ human: "human";
224
+ }>;
225
+ }, z.core.$strip>>;
226
+ outside: z.ZodArray<z.ZodObject<{
227
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
228
+ name: z.ZodString;
229
+ kind: z.ZodCatch<z.ZodEnum<{
230
+ unknown: "unknown";
231
+ file: "file";
232
+ folder: "folder";
233
+ document: "document";
234
+ table: "table";
235
+ board: "board";
236
+ task: "task";
237
+ gadget: "gadget";
238
+ goal: "goal";
239
+ skill: "skill";
240
+ source: "source";
241
+ }>>;
242
+ folderId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
243
+ folderName: z.ZodNullable<z.ZodString>;
244
+ }, z.core.$strip>>;
245
+ types: z.ZodArray<z.ZodObject<{
246
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
247
+ name: z.ZodString;
248
+ kind: z.ZodEnum<{
249
+ object: "object";
250
+ action: "action";
251
+ relation: "relation";
252
+ actor: "actor";
253
+ }>;
254
+ }, z.core.$strip>>;
255
+ actions: z.ZodArray<z.ZodObject<{
256
+ actionId: z.ZodString;
257
+ name: z.ZodString;
258
+ description: z.ZodString;
259
+ origin: z.ZodEnum<{
260
+ set: "set";
261
+ computed: "computed";
262
+ }>;
263
+ approval: z.ZodBoolean;
264
+ implementedBy: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
265
+ on: z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>;
266
+ }, z.core.$strip>>;
267
+ nextCursor: z.ZodNull;
268
+ }, z.core.$strip>;
269
+ export type RelationList = z.infer<typeof RelationList>;
270
+ export declare const RelationSetEnd: z.ZodDiscriminatedUnion<[z.ZodObject<{
271
+ kind: z.ZodLiteral<"node">;
272
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
273
+ }, z.core.$strict>, z.ZodObject<{
274
+ kind: z.ZodLiteral<"actor">;
275
+ userId: z.ZodString;
276
+ }, z.core.$strict>, z.ZodObject<{
277
+ kind: z.ZodLiteral<"type">;
278
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
279
+ }, z.core.$strict>], "kind">;
280
+ export type RelationSetEnd = z.infer<typeof RelationSetEnd>;
281
+ export declare const RelationCreateInput: z.ZodObject<{
282
+ type: z.ZodString;
283
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
284
+ kind: z.ZodLiteral<"node">;
285
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
286
+ }, z.core.$strict>, z.ZodObject<{
287
+ kind: z.ZodLiteral<"actor">;
288
+ userId: z.ZodString;
289
+ }, z.core.$strict>, z.ZodObject<{
290
+ kind: z.ZodLiteral<"type">;
291
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
292
+ }, z.core.$strict>], "kind">;
293
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
294
+ kind: z.ZodLiteral<"node">;
295
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
296
+ }, z.core.$strict>, z.ZodObject<{
297
+ kind: z.ZodLiteral<"actor">;
298
+ userId: z.ZodString;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ kind: z.ZodLiteral<"type">;
301
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
302
+ }, z.core.$strict>], "kind">;
303
+ idempotencyKey: z.ZodString;
304
+ }, z.core.$strict>;
305
+ export type RelationCreateInput = z.infer<typeof RelationCreateInput>;
306
+ export declare const SetRelation: z.ZodObject<{
307
+ relationId: z.ZodTemplateLiteral<`relation_${string}`>;
308
+ type: z.ZodString;
309
+ from: z.ZodDiscriminatedUnion<[z.ZodObject<{
310
+ kind: z.ZodLiteral<"node">;
311
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ kind: z.ZodLiteral<"actor">;
314
+ userId: z.ZodString;
315
+ }, z.core.$strip>, z.ZodObject<{
316
+ kind: z.ZodLiteral<"type">;
317
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
318
+ }, z.core.$strip>], "kind">;
319
+ to: z.ZodDiscriminatedUnion<[z.ZodObject<{
320
+ kind: z.ZodLiteral<"node">;
321
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ kind: z.ZodLiteral<"actor">;
324
+ userId: z.ZodString;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ kind: z.ZodLiteral<"type">;
327
+ typeId: z.ZodTemplateLiteral<`type_${string}`>;
328
+ }, z.core.$strip>], "kind">;
329
+ createdBy: z.ZodString;
330
+ createdAt: z.ZodISODateTime;
331
+ }, z.core.$strip>;
332
+ export type SetRelation = z.infer<typeof SetRelation>;
333
+ export declare const RelationRemoveInput: z.ZodObject<{
334
+ relationId: z.ZodTemplateLiteral<`relation_${string}`>;
335
+ }, z.core.$strict>;
336
+ export type RelationRemoveInput = z.infer<typeof RelationRemoveInput>;