@anchrd/colab-sdk 0.1.43 → 0.1.44

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/sdk.js CHANGED
@@ -7,7 +7,7 @@ export { App, AppId, AppList, AppListInput, AppRevoked, AppRevokeInput, OwnAppLi
7
7
  export { ArchivedGoalLink, NodeArchived, NodeArchiveInput, NodePurged, NodePurgeInput, NodeRestoreInput, } from "./archive/archive.js";
8
8
  export { PasskeyDeleteInput, SetPasswordInput, SignUpInput, } from "./auth/auth.js";
9
9
  export { AuthorizationRequest, AuthorizationResponse, Identity, Rules, } from "./authorization/authorization.js";
10
- export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskBrief, BoardTaskBriefList, BoardTaskCreated, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardTaskUpdated, BoardTaskUpdateInput, BoardUpdateInput, boardKinds, compactTaskLimit, LabelId, maxBulkTasks, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskUpdateInput, } from "./boards/boards.js";
10
+ export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskBrief, BoardTaskBriefList, BoardTaskCreated, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardTaskUpdated, BoardTaskUpdateInput, BoardUpdateInput, boardKinds, compactTaskLimit, LabelId, maxBulkTasks, maxRules, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskRule, TaskUpdateInput, } from "./boards/boards.js";
11
11
  export { CardField, CardFieldId, CardFieldInput, CardFieldOption, CardFieldType, CardFieldValue, CardKind, CardKindIcon, CardKindId, CardKindInput, CardOptionId, ChecklistItem, cardFieldTypes, cardKindIcons, emptyValue, TaskFields, TaskKind, } from "./card-kinds/card-kinds.js";
12
12
  export { ColumnId, ColumnType, columnTypes, TaskColumn } from "./columns/columns.js";
13
13
  export { Connection, ConnectionCreateInput, ConnectionCredential, ConnectionDetail, ConnectionGetInput, ConnectionId, ConnectionList, ConnectionListInput, ConnectionRevokeInput, ConnectionState, ConnectionTested, ConnectionTestInput, ConnectionTestResult, ConnectionUpdateInput, } from "./connections/connections.js";
@@ -18,7 +18,7 @@ export { DocumentCreateInput, DocumentDetail, DocumentExcerpt, DocumentGetInput,
18
18
  export { ErrorCode, ErrorCurrent, ErrorIssue, ErrorResponse, errorCodes, invalidInput, Warning, } from "./error/error.js";
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
- export { FileCreateInput, FileDetail, FileGetInput, FileId, FileTextState, FileUpdateInput, FileUpload, fileFormatExtensions, fileFormatOf, fileTextStates, maxFileBytes, UploadTicket, uploadTicketHeader, uploadTicketLifetimeMs, } from "./files/files.js";
21
+ 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";
22
22
  export { FunctionRemoved, ServiceInterfaceFunctionCreateInput, ServiceInterfaceFunctionRemoveInput, ServiceInterfaceFunctionUpdateInput, } from "./functions/functions.js";
23
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";
24
24
  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";
@@ -29,6 +29,7 @@ export { createId, idSchema } from "./ids/ids.js";
29
29
  export { Digest, InstructionRead, Instructions, InstructionsLink, InstructionsRead, InstructionText, instructionsNames, isInstructionsName, isKnownText, Known, KnownText, maxKnown, } from "./instructions/instructions.js";
30
30
  export { FunctionNames, InterfaceRemoved, ServiceInterfaceCreateInput, ServiceInterfaceDeclared, ServiceInterfaceDeclareInput, ServiceInterfaceRemoveInput, ServiceInterfaceUndeclared, ServiceInterfaceUpdateInput, } from "./interfaces/interfaces.js";
31
31
  export { Delivery, Invitation, InvitationAcceptInput, InvitationCreateInput, InvitationId, InvitationLookup, InvitationLookupQuery, InvitationResendInput, InvitationRevokeInput, InvitationSent, InvitationSocialInput, InvitationStatus, RoleChip, } from "./invitations/invitations.js";
32
+ export { Job, JobCreateInput, JobGetInput, JobId, JobKind, JobList, JobListInput, JobRefused, maxJobEntries, maxJobRefusedNamed, } from "./jobs/jobs.js";
32
33
  export { defaultLinkDays, GadgetLink, GadgetLinkCallInput, GadgetLinkCodeInput, GadgetLinkCreateInput, GadgetLinkList, GadgetLinkListInput, GadgetLinkPage, GadgetLinkRevokeInput, GadgetLinkVisit, GadgetLinkVisitInput, gadgetLinkLimits, gadgetLinkPath, LinkId, LinkStatus, maxLinkDays, NodeLink, NodeLinkCreateInput, NodeLinkList, NodeLinkListInput, NodeLinkRevokeInput, NodeLinkUpdateInput, publicLinkPath, } from "./links/links.js";
33
34
  export { Flag, Limit } from "./list-input.js";
34
35
  export { MachineArchiveInput, MachineCreateInput, MachineId, MachineKey, MachinePurged, MachinePurgeInput, MachineRestoreInput, MachineRotateInput, MachineUpdateInput, } from "./machines/machines.js";
@@ -36,7 +37,7 @@ export { Mcp, McpAuth, McpCall, McpCallAction, McpCallList, McpCallListInput, Mc
36
37
  export { ChatRead, ChatTopic, ChatUpdateInput, Message, MessageAuthor, MessageCreateInput, MessageId, MessageList, MessageListInput, messageMaxLength, TopicName, topicMaxLength, topicOf, } from "./messages/messages.js";
37
38
  export { Missing, MissingCall, MissingCode, missingCodes, Reached, } from "./missing/missing.js";
38
39
  export { BoardShownKind, FolderCreated, FolderCreateInput, IntelligenceUser, IntelligenceUserList, IntelligenceUserListInput, NodeDetail, NodeGetInput, NodeHit, NodeHitFoundIn, NodeHitGroup, NodeId, NodeKind, NodeKindRead, NodeList, NodeListInput, NodeListItem, NodeMoved, NodeMoveInput, NodePath, NodePerson, NodeQuery, NodeReader, NodeSearch, NodeSection, NodeSort, NodeUpdateInput, nodeKinds, responsibleKinds, SearchIndexState, SecretFields, SecretId, unknownNodeKind, } from "./nodes/nodes.js";
39
- export { ChangeTrigger, Credential, CredentialCreateInput, CredentialGetInput, CredentialId, CredentialKind, CredentialList, CredentialListInput, CredentialRevokeInput, CredentialState, CredentialTested, CredentialTestInput, CredentialTestResult, CredentialUpdateInput, cacheWritePriceOf, compactRunLimit, GatewayModelEntrySchema, GatewayRight, GatewayRightCheck, GatewayTarget, gatewayCatalog, gatewayModelOf, inCatalog, KeepStepsDays, MachineDisableInput, MachineEnableInput, MachineGetInput, MachineListInput, modelsOf, modelsOfVendor, Operator, OperatorBudget, OperatorLimits, OperatorList, OperatorMachineArchiveInput, OperatorMachineCreateInput, OperatorMachineRestoreInput, OperatorMachineUpdateInput, OperatorModel, OperatorRun, OperatorRunAgents, OperatorRunCostSource, OperatorRunFallbackReason, OperatorRunGetInput, OperatorRunId, OperatorRunInstructions, OperatorRunList, OperatorRunListInput, OperatorRunReason, OperatorRunStatus, OperatorRunStep, OperatorRunStepKind, OperatorRunStepList, OperatorRunTokens, OperatorRunTouched, OperatorRunTrigger, OperatorRunUsage, OperatorRunWoken, OperatorState, OperatorUser, OperatorUserList, OperatorUserListInput, OperatorUserUpdateInput, OperatorVendor, offeredModels, operatorDefaults, operatorProviders, operatorVendors, outputLimitOf, PauseReason, planAnswerOf, RunCancelInput, RunPlanAnswer, RunPlanStep, RunStepListInput, RunUpdateInput, reasoningEffortOf, retiredGatewayModels, runPlanMax, runSummaryChars, Subagents, scheduleQuietMinutes, Trigger, vendorOfModel, } from "./operators/operators.js";
40
+ export { ChangeTrigger, Credential, CredentialCreateInput, CredentialGetInput, CredentialId, CredentialKind, CredentialList, CredentialListInput, CredentialRevokeInput, CredentialState, CredentialTested, CredentialTestInput, CredentialTestResult, CredentialUpdateInput, cacheWritePriceOf, compactRunLimit, GatewayModelEntrySchema, GatewayRight, GatewayRightCheck, GatewayTarget, gatewayCatalog, gatewayModelOf, inCatalog, KeepStepsDays, MachineDisableInput, MachineEnableInput, MachineGetInput, MachineListInput, modelsOf, modelsOfVendor, Operator, OperatorBudget, OperatorLimits, OperatorList, OperatorMachineArchiveInput, OperatorMachineCreateInput, OperatorMachineRestoreInput, OperatorMachineUpdateInput, OperatorModel, OperatorRun, OperatorRunAgents, OperatorRunCostSource, OperatorRunFallbackReason, OperatorRunGetInput, OperatorRunId, OperatorRunInstructions, OperatorRunList, OperatorRunListInput, OperatorRunReason, OperatorRunStatus, OperatorRunStep, OperatorRunStepKind, OperatorRunStepList, OperatorRunTokens, OperatorRunTouched, OperatorRunTrigger, OperatorRunUsage, OperatorRunWoken, OperatorState, OperatorUser, OperatorUserList, OperatorUserListInput, OperatorUserUpdateInput, OperatorVendor, OwnCredentialState, offeredModels, operatorDefaults, operatorProviders, operatorVendors, outputLimitOf, PauseReason, planAnswerOf, RunCancelInput, RunPlanAnswer, RunPlanStep, RunStepListInput, RunUpdateInput, reasoningEffortOf, retiredGatewayModels, runPlanMax, runSummaryChars, Subagents, scheduleQuietMinutes, Trigger, UserCredentialCreateInput, UserCredentialRevokeInput, UserCredentialTestInput, UserCredentialUpdateInput, vendorOfModel, } from "./operators/operators.js";
40
41
  export { Currency, CurrencyRate, currencies, Organisation, OrganisationGetInput, OrganisationUpdateInput, } from "./organisation/organisation.js";
41
42
  export { PageDetail, PageGetInput, PageHead, PageHeading, PageId, PageList, PageListInput, PageSummary, } from "./pages/pages.js";
42
43
  export { AgentName, gatewayAgentsMax, IdempotencyKey, PlanSubstep, planEvidenceMax, Rev, } from "./primitives/primitives.js";
@@ -52,9 +53,10 @@ export { ConsentResource, FunctionId, InterfaceId, RightWord, Service, ServiceAr
52
53
  export { SkillCallName, SkillCaseCalls, SkillCaseResult, SkillCreateInput, SkillDetail, SkillFields, SkillFile, SkillFilePath, SkillGetInput, SkillId, SkillOffer, SkillPoint, SkillRunCall, SkillRunDetail, SkillRunGetInput, SkillRunItem, SkillRunList, SkillRunListInput, SkillTestInput, SkillTestReport, SkillToken, SkillTokenCreateInput, SkillTokens, SkillTriggerHit, SkillUpdateInput, SkillWriteName, skillCaseStatuses, skillFilePattern, skillRunKinds, skillRunStatuses, } from "./skills/skills.js";
53
54
  export { ItemId, QueryId, SourceAccess, SourceCreateInput, SourceDetail, SourceField, SourceFieldType, SourceGetInput, SourceItem, SourceItemList, SourceItemListInput, SourceManifest, SourcePaging, SourceParam, SourcePath, SourceProbe, SourcePublishInput, SourceQuery, SourceQueryArchiveInput, SourceQueryCreateInput, SourceQueryList, SourceQueryListInput, SourceQueryRestoreInput, SourceQueryUpdateInput, SourceRun, SourceRunCounts, SourceRunCreateInput, SourceRunFailure, SourceRunFailureRead, SourceRunGetInput, SourceRunList, SourceRunListInput, SourceSchedule, SourceSecretsInput, SourceStep, SourceTestInput, SourceUpdateInput, SourceVersionRef, SourceWhere, sourceCleans, sourceCodePath, sourceEvery, sourceFieldTypes, sourceFormHeaders, sourceKeepDays, sourceLimits, sourceManifestPath, sourceSchema, } from "./sources/sources.js";
54
55
  export { maxTableColumns, maxTableRows, RowLimit, TableColumn, TableColumnChange, TableColumnType, TableCreateInput, TableDetail, TableExcerpt, TableFilter, TableGetInput, TableId, TableSaved, TableSort, TableUpdateInput, tableColumnTypes, tableFormats, } from "./tables/tables.js";
56
+ export { companyTeamId, MemberId, Team, TeamArchiveInput, TeamCreateInput, TeamId, TeamList, TeamListInput, TeamMember, TeamMemberCreateInput, TeamMemberRemoveInput, TeamRestoreInput, TeamRole, TeamUpdateInput, } from "./teams/teams.js";
55
57
  export { defineTool, } from "./tool.js";
56
58
  export { compareTreeNames, treeKindOrder, treeKindRank, } from "./tree-order/tree-order.js";
57
59
  export { IntelligenceUserGetInput, IntelligenceUserUpdateInput, NotifyMode, notifyModes, UserSettings, } from "./user-settings/user-settings.js";
58
60
  export { MachineFacts, MachineKeyFacts, MachineKind, MessageMachine, OperatorProvider, OwnRoleList, SignInMethod, User, UserDetail, UserDisableInput, UserEnableInput, UserGetInput, UserId, UserKind, UserList, UserListInput, UserListItem, UserStatus, UserTestInput, UserTestResult, UserUpdateInput, } from "./users/users.js";
59
61
  export { MoveColumn, NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionExcerpt, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, TaskVersionChange, taskVersionChanges, VersionId, VersionMove, versionKinds, } from "./versions/versions.js";
60
- export { Changed, Effects, Unblocked, Written, } from "./written/written.js";
62
+ export { Changed, Effects, Moved, Unblocked, Written, } from "./written/written.js";
@@ -0,0 +1,120 @@
1
+ import { z } from "zod";
2
+ export declare const TeamId: z.ZodTemplateLiteral<`team_${string}`>;
3
+ export type TeamId = z.infer<typeof TeamId>;
4
+ export declare const companyTeamId: TeamId;
5
+ export declare const MemberId: z.ZodTemplateLiteral<`member_${string}`>;
6
+ export type MemberId = z.infer<typeof MemberId>;
7
+ export declare const TeamListInput: z.ZodObject<{
8
+ archived: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
9
+ userId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
10
+ query: z.ZodOptional<z.ZodString>;
11
+ cursor: z.ZodOptional<z.ZodTemplateLiteral<`team_${string}`>>;
12
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
13
+ }, z.core.$strict>;
14
+ export type TeamListInput = z.infer<typeof TeamListInput>;
15
+ export declare const TeamCreateInput: z.ZodObject<{
16
+ name: z.ZodString;
17
+ }, z.core.$strict>;
18
+ export type TeamCreateInput = z.infer<typeof TeamCreateInput>;
19
+ export declare const TeamUpdateInput: z.ZodObject<{
20
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
21
+ name: z.ZodOptional<z.ZodString>;
22
+ roleIds: z.ZodOptional<z.ZodArray<z.ZodTemplateLiteral<`role_${string}`>>>;
23
+ }, z.core.$strict>;
24
+ export type TeamUpdateInput = z.infer<typeof TeamUpdateInput>;
25
+ export declare const TeamArchiveInput: z.ZodObject<{
26
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
27
+ }, z.core.$strict>;
28
+ export type TeamArchiveInput = z.infer<typeof TeamArchiveInput>;
29
+ export declare const TeamRestoreInput: z.ZodObject<{
30
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
31
+ }, z.core.$strict>;
32
+ export type TeamRestoreInput = z.infer<typeof TeamRestoreInput>;
33
+ export declare const TeamMemberCreateInput: z.ZodObject<{
34
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
35
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
36
+ }, z.core.$strict>;
37
+ export type TeamMemberCreateInput = z.infer<typeof TeamMemberCreateInput>;
38
+ export declare const TeamMemberRemoveInput: z.ZodObject<{
39
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
40
+ memberId: z.ZodTemplateLiteral<`member_${string}`>;
41
+ }, z.core.$strict>;
42
+ export type TeamMemberRemoveInput = z.infer<typeof TeamMemberRemoveInput>;
43
+ export declare const TeamMember: z.ZodObject<{
44
+ memberId: z.ZodTemplateLiteral<`member_${string}`>;
45
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
46
+ name: z.ZodString;
47
+ kind: z.ZodEnum<{
48
+ machine: "machine";
49
+ human: "human";
50
+ }>;
51
+ email: z.ZodNullable<z.ZodString>;
52
+ machineKind: z.ZodNullable<z.ZodEnum<{
53
+ operator: "operator";
54
+ external: "external";
55
+ }>>;
56
+ }, z.core.$strip>;
57
+ export type TeamMember = z.infer<typeof TeamMember>;
58
+ export declare const TeamRole: z.ZodObject<{
59
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
60
+ name: z.ZodString;
61
+ description: z.ZodString;
62
+ }, z.core.$strip>;
63
+ export type TeamRole = z.infer<typeof TeamRole>;
64
+ export declare const Team: z.ZodObject<{
65
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
66
+ name: z.ZodString;
67
+ members: z.ZodArray<z.ZodObject<{
68
+ memberId: z.ZodTemplateLiteral<`member_${string}`>;
69
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
70
+ name: z.ZodString;
71
+ kind: z.ZodEnum<{
72
+ machine: "machine";
73
+ human: "human";
74
+ }>;
75
+ email: z.ZodNullable<z.ZodString>;
76
+ machineKind: z.ZodNullable<z.ZodEnum<{
77
+ operator: "operator";
78
+ external: "external";
79
+ }>>;
80
+ }, z.core.$strip>>;
81
+ roles: z.ZodArray<z.ZodObject<{
82
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
83
+ name: z.ZodString;
84
+ description: z.ZodString;
85
+ }, z.core.$strip>>;
86
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
87
+ createdAt: z.ZodISODateTime;
88
+ updatedAt: z.ZodISODateTime;
89
+ }, z.core.$strip>;
90
+ export type Team = z.infer<typeof Team>;
91
+ export declare const TeamList: z.ZodObject<{
92
+ items: z.ZodArray<z.ZodObject<{
93
+ teamId: z.ZodTemplateLiteral<`team_${string}`>;
94
+ name: z.ZodString;
95
+ members: z.ZodArray<z.ZodObject<{
96
+ memberId: z.ZodTemplateLiteral<`member_${string}`>;
97
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
98
+ name: z.ZodString;
99
+ kind: z.ZodEnum<{
100
+ machine: "machine";
101
+ human: "human";
102
+ }>;
103
+ email: z.ZodNullable<z.ZodString>;
104
+ machineKind: z.ZodNullable<z.ZodEnum<{
105
+ operator: "operator";
106
+ external: "external";
107
+ }>>;
108
+ }, z.core.$strip>>;
109
+ roles: z.ZodArray<z.ZodObject<{
110
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
111
+ name: z.ZodString;
112
+ description: z.ZodString;
113
+ }, z.core.$strip>>;
114
+ archivedAt: z.ZodNullable<z.ZodISODateTime>;
115
+ createdAt: z.ZodISODateTime;
116
+ updatedAt: z.ZodISODateTime;
117
+ }, z.core.$strip>>;
118
+ nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`team_${string}`>>;
119
+ }, z.core.$strip>;
120
+ export type TeamList = z.infer<typeof TeamList>;
@@ -0,0 +1,70 @@
1
+ import { z } from "zod";
2
+ import { idSchema } from "../ids/ids.js";
3
+ import { Flag, Limit } from "../list-input.js";
4
+ import { RoleId } from "../roles/roles.js";
5
+ // ⚠️ Not imported from `users.ts`: that module imports the invitations, which import this one.
6
+ const UserId = idSchema("user");
7
+ // Teams (Einstellungen › Teams, #1121, E243): a named group of people and Operators that carries
8
+ // roles and can be given a node. The inputs of the `access_team_*` and `access_team_member_*` tools
9
+ // and their answers.
10
+ export const TeamId = idSchema("team").describe("The team's id, `team_…`, as access_team_list names it.");
11
+ // "Gesamte Firma" (#1121, E243): every installation has it once, made by access's migration 0020
12
+ // with every person, and every person who joins later becomes a member (`personCreated`). Otherwise
13
+ // a normal team: renamed, archived and left like any other. ⚠️ The migration writes this id as text.
14
+ export const companyTeamId = "team_01K0000000000000000000FRM1";
15
+ export const MemberId = idSchema("member").describe("The membership's id, `member_…`, as access_team_list names it under members.");
16
+ const TeamName = z.string().trim().min(1).max(64);
17
+ // The whole set of a team's roles, like `roleIds` of access_user_update: what is missing is taken
18
+ // away, an empty list takes every role.
19
+ const TeamRoleIds = z.array(RoleId).max(50);
20
+ export const TeamListInput = z.strictObject({
21
+ // The archive instead of the teams in use.
22
+ archived: Flag.optional(),
23
+ userId: UserId.optional().describe("Only the teams this person or machine is a member of."),
24
+ query: z
25
+ .string()
26
+ .trim()
27
+ .min(1)
28
+ .max(100)
29
+ .optional()
30
+ .describe("Only the teams whose name contains this text."),
31
+ cursor: TeamId.optional(),
32
+ limit: Limit.optional(),
33
+ });
34
+ export const TeamCreateInput = z.strictObject({ name: TeamName });
35
+ export const TeamUpdateInput = z
36
+ .strictObject({
37
+ teamId: TeamId,
38
+ name: TeamName.optional(),
39
+ roleIds: TeamRoleIds.optional().describe("The whole set of the team's roles: what is missing is taken away. Every member holds them as if they were their own. admin goes to no team."),
40
+ })
41
+ .refine((input) => input.name !== undefined || input.roleIds !== undefined, {
42
+ message: "Name a field to change: name or roleIds.",
43
+ });
44
+ export const TeamArchiveInput = z.strictObject({ teamId: TeamId });
45
+ export const TeamRestoreInput = z.strictObject({ teamId: TeamId });
46
+ export const TeamMemberCreateInput = z.strictObject({
47
+ teamId: TeamId,
48
+ userId: UserId.describe("The person or machine to add, `user_…`. A personal Operator is never a member: it holds its person's teams already."),
49
+ });
50
+ export const TeamMemberRemoveInput = z.strictObject({ teamId: TeamId, memberId: MemberId });
51
+ // A member as the team shows it: a person with their address, a machine with its kind.
52
+ export const TeamMember = z.object({
53
+ memberId: MemberId,
54
+ userId: UserId,
55
+ name: z.string(),
56
+ kind: z.enum(["human", "machine"]),
57
+ email: z.string().nullable(),
58
+ machineKind: z.enum(["operator", "external"]).nullable(),
59
+ });
60
+ export const TeamRole = z.object({ roleId: RoleId, name: z.string(), description: z.string() });
61
+ export const Team = z.object({
62
+ teamId: TeamId,
63
+ name: z.string(),
64
+ members: z.array(TeamMember),
65
+ roles: z.array(TeamRole),
66
+ archivedAt: z.iso.datetime().nullable(),
67
+ createdAt: z.iso.datetime(),
68
+ updatedAt: z.iso.datetime(),
69
+ });
70
+ export const TeamList = z.object({ items: z.array(Team), nextCursor: TeamId.nullable() });
@@ -44,6 +44,10 @@ export declare const VersionMove: z.ZodObject<{
44
44
  }>>;
45
45
  }, z.core.$strip>;
46
46
  comment: z.ZodNullable<z.ZodString>;
47
+ cause: z.ZodNullable<z.ZodObject<{
48
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
49
+ title: z.ZodString;
50
+ }, z.core.$strip>>;
47
51
  }, z.core.$strip>;
48
52
  export type VersionMove = z.infer<typeof VersionMove>;
49
53
  export declare const taskVersionChanges: readonly ["title", "text", "assignee", "dates", "labels", "parent", "dependencies", "waiting", "fields"];
@@ -123,6 +127,10 @@ export declare const NodeVersion: z.ZodObject<{
123
127
  }>>;
124
128
  }, z.core.$strip>;
125
129
  comment: z.ZodNullable<z.ZodString>;
130
+ cause: z.ZodNullable<z.ZodObject<{
131
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
132
+ title: z.ZodString;
133
+ }, z.core.$strip>>;
126
134
  }, z.core.$strip>>;
127
135
  changes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
128
136
  title: "title";
@@ -184,6 +192,10 @@ export declare const NodeVersionList: z.ZodObject<{
184
192
  }>>;
185
193
  }, z.core.$strip>;
186
194
  comment: z.ZodNullable<z.ZodString>;
195
+ cause: z.ZodNullable<z.ZodObject<{
196
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
197
+ title: z.ZodString;
198
+ }, z.core.$strip>>;
187
199
  }, z.core.$strip>>;
188
200
  changes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
189
201
  title: "title";
@@ -247,6 +259,10 @@ export declare const NodeVersionDetail: z.ZodObject<{
247
259
  }>>;
248
260
  }, z.core.$strip>;
249
261
  comment: z.ZodNullable<z.ZodString>;
262
+ cause: z.ZodNullable<z.ZodObject<{
263
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
264
+ title: z.ZodString;
265
+ }, z.core.$strip>>;
250
266
  }, z.core.$strip>>;
251
267
  changes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
252
268
  title: "title";
@@ -263,6 +279,7 @@ export declare const NodeVersionDetail: z.ZodObject<{
263
279
  locked: z.ZodOptional<z.ZodBoolean>;
264
280
  content: z.ZodNullable<z.ZodString>;
265
281
  mediaType: z.ZodNullable<z.ZodString>;
282
+ description: z.ZodNullable<z.ZodString>;
266
283
  columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
267
284
  name: z.ZodString;
268
285
  type: z.ZodEnum<{
@@ -398,6 +415,10 @@ export declare const NodeVersionExcerpt: z.ZodObject<{
398
415
  }>>;
399
416
  }, z.core.$strip>;
400
417
  comment: z.ZodNullable<z.ZodString>;
418
+ cause: z.ZodNullable<z.ZodObject<{
419
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
420
+ title: z.ZodString;
421
+ }, z.core.$strip>>;
401
422
  }, z.core.$strip>>;
402
423
  changes: z.ZodNullable<z.ZodArray<z.ZodEnum<{
403
424
  title: "title";
@@ -414,6 +435,7 @@ export declare const NodeVersionExcerpt: z.ZodObject<{
414
435
  locked: z.ZodOptional<z.ZodBoolean>;
415
436
  content: z.ZodNullable<z.ZodString>;
416
437
  mediaType: z.ZodNullable<z.ZodString>;
438
+ description: z.ZodNullable<z.ZodString>;
417
439
  columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
418
440
  name: z.ZodString;
419
441
  type: z.ZodEnum<{
@@ -31,6 +31,8 @@ export const VersionMove = z.object({
31
31
  from: MoveColumn.nullable(),
32
32
  to: MoveColumn,
33
33
  comment: z.string().nullable(),
34
+ // The card whose move made Colab move this one by a rule on its waits for (E242); null otherwise.
35
+ cause: z.object({ taskId: NodeId, title: z.string() }).nullable(),
34
36
  });
35
37
  // What a task's version changed besides a move (E117): the words the history names, in this order.
36
38
  // The fields of a card kind (#638) come later as their own entries.
@@ -101,6 +103,9 @@ export const NodeVersionDetail = NodeVersion.extend({
101
103
  content: z.string().nullable(),
102
104
  // Only for a file: its media type.
103
105
  mediaType: z.string().nullable(),
106
+ // Only for an image file (#1126, E244): the description `intelligence_file_describe` stored at
107
+ // this version; null before anyone asked and for every other version.
108
+ description: z.string().nullable(),
104
109
  // Only for a table: its columns with their types in this version (#40).
105
110
  columns: z.array(TableColumn).nullable(),
106
111
  // Only for a task of a card kind (#638): the values of its fields in this version, by the field's
@@ -19,6 +19,8 @@ export declare const Changed: z.ZodObject<{
19
19
  userId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
20
20
  machineId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
21
21
  roleId: z.ZodOptional<z.ZodTemplateLiteral<`role_${string}`>>;
22
+ teamId: z.ZodOptional<z.ZodTemplateLiteral<`team_${string}`>>;
23
+ memberId: z.ZodOptional<z.ZodTemplateLiteral<`member_${string}`>>;
22
24
  permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
25
  invitationId: z.ZodOptional<z.ZodTemplateLiteral<`invitation_${string}`>>;
24
26
  serviceId: z.ZodOptional<z.ZodTemplateLiteral<`service_${string}`>>;
@@ -51,6 +53,26 @@ export declare const Unblocked: z.ZodObject<{
51
53
  own: z.ZodOptional<z.ZodLiteral<true>>;
52
54
  }, z.core.$strip>;
53
55
  export type Unblocked = z.infer<typeof Unblocked>;
56
+ export declare const Moved: z.ZodObject<{
57
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
58
+ title: z.ZodString;
59
+ column: z.ZodObject<{
60
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
61
+ name: z.ZodString;
62
+ type: z.ZodEnum<{
63
+ archive: "archive";
64
+ done: "done";
65
+ backlog: "backlog";
66
+ open: "open";
67
+ progress: "progress";
68
+ discarded: "discarded";
69
+ blocked: "blocked";
70
+ }>;
71
+ }, z.core.$strip>;
72
+ rev: z.ZodNumber;
73
+ cause: z.ZodTemplateLiteral<`node_${string}`>;
74
+ }, z.core.$strip>;
75
+ export type Moved = z.infer<typeof Moved>;
54
76
  export declare const Effects: z.ZodObject<{
55
77
  woken: z.ZodOptional<z.ZodArray<z.ZodObject<{
56
78
  userId: z.ZodString;
@@ -70,6 +92,25 @@ export declare const Effects: z.ZodObject<{
70
92
  rev: z.ZodNumber;
71
93
  own: z.ZodOptional<z.ZodLiteral<true>>;
72
94
  }, z.core.$strip>>>;
95
+ moved: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
97
+ title: z.ZodString;
98
+ column: z.ZodObject<{
99
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
100
+ name: z.ZodString;
101
+ type: z.ZodEnum<{
102
+ archive: "archive";
103
+ done: "done";
104
+ backlog: "backlog";
105
+ open: "open";
106
+ progress: "progress";
107
+ discarded: "discarded";
108
+ blocked: "blocked";
109
+ }>;
110
+ }, z.core.$strip>;
111
+ rev: z.ZodNumber;
112
+ cause: z.ZodTemplateLiteral<`node_${string}`>;
113
+ }, z.core.$strip>>>;
73
114
  readers: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
115
  userId: z.ZodString;
75
116
  name: z.ZodNullable<z.ZodString>;
@@ -112,6 +153,8 @@ export declare const Written: z.ZodObject<{
112
153
  userId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
113
154
  machineId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
114
155
  roleId: z.ZodOptional<z.ZodTemplateLiteral<`role_${string}`>>;
156
+ teamId: z.ZodOptional<z.ZodTemplateLiteral<`team_${string}`>>;
157
+ memberId: z.ZodOptional<z.ZodTemplateLiteral<`member_${string}`>>;
115
158
  permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
159
  invitationId: z.ZodOptional<z.ZodTemplateLiteral<`invitation_${string}`>>;
117
160
  serviceId: z.ZodOptional<z.ZodTemplateLiteral<`service_${string}`>>;
@@ -151,6 +194,25 @@ export declare const Written: z.ZodObject<{
151
194
  rev: z.ZodNumber;
152
195
  own: z.ZodOptional<z.ZodLiteral<true>>;
153
196
  }, z.core.$strip>>>;
197
+ moved: z.ZodOptional<z.ZodArray<z.ZodObject<{
198
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
199
+ title: z.ZodString;
200
+ column: z.ZodObject<{
201
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
202
+ name: z.ZodString;
203
+ type: z.ZodEnum<{
204
+ archive: "archive";
205
+ done: "done";
206
+ backlog: "backlog";
207
+ open: "open";
208
+ progress: "progress";
209
+ discarded: "discarded";
210
+ blocked: "blocked";
211
+ }>;
212
+ }, z.core.$strip>;
213
+ rev: z.ZodNumber;
214
+ cause: z.ZodTemplateLiteral<`node_${string}`>;
215
+ }, z.core.$strip>>>;
154
216
  readers: z.ZodOptional<z.ZodArray<z.ZodObject<{
155
217
  userId: z.ZodString;
156
218
  name: z.ZodNullable<z.ZodString>;
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { AppId, SessionId } from "../apps/apps.js";
3
+ import { TaskColumn } from "../columns/columns.js";
3
4
  import { ConnectionId } from "../connections/connections.js";
4
5
  import { ConnectorId } from "../connectors/connectors.js";
5
6
  import { Warning } from "../error/error.js";
@@ -17,6 +18,7 @@ import { RoleId } from "../roles/roles.js";
17
18
  import { RunId } from "../runs/runs.js";
18
19
  import { FunctionId, InterfaceId, ServiceId } from "../services/services.js";
19
20
  import { QueryId } from "../sources/sources.js";
21
+ import { MemberId, TeamId } from "../teams/teams.js";
20
22
  import { UserId } from "../users/users.js";
21
23
  // What a write answers over `/mcp` (E126, #672): what it changed and what that caused, never the
22
24
  // object it wrote. The AI sent the object itself; echoing it back filled an Operator's context with
@@ -48,6 +50,9 @@ export const Changed = z.object({
48
50
  // its `user_…` id either way.
49
51
  machineId: MachineId.optional(),
50
52
  roleId: RoleId.optional(),
53
+ // A team and a membership in it (#1121).
54
+ teamId: TeamId.optional(),
55
+ memberId: MemberId.optional(),
51
56
  // The rights a switch of a role really turned on or off, which a level in the call expands to.
52
57
  permissions: z.array(z.string()).optional(),
53
58
  invitationId: InvitationId.optional(),
@@ -77,6 +82,15 @@ export const Unblocked = z.object({
77
82
  rev: z.number().int(),
78
83
  own: z.literal(true).optional(),
79
84
  });
85
+ // A card Colab moved because a rule on its "waits for" fired (E242, #1132): where it lies now, its
86
+ // `rev` for the next save, and the card whose move caused it.
87
+ export const Moved = z.object({
88
+ taskId: NodeId,
89
+ title: z.string(),
90
+ column: TaskColumn,
91
+ rev: z.number().int(),
92
+ cause: NodeId,
93
+ });
80
94
  // What the write caused for others; an empty field is left out.
81
95
  export const Effects = z.object({
82
96
  // Machines whose Actions changed by it (#334, E124): an Operator among them wakes.
@@ -85,6 +99,8 @@ export const Effects = z.object({
85
99
  notified: z.array(Reached).optional(),
86
100
  // Tasks ready now, because the last thing they waited on was closed by this call.
87
101
  unblocked: z.array(Unblocked).optional(),
102
+ // Cards moved by a rule on their "waits for" (E242), a chain of them in the order they moved.
103
+ moved: z.array(Moved).optional(),
88
104
  // Who reads a moved node now (#36): a move takes the grants of its new folder.
89
105
  readers: z.array(NodeReader).optional(),
90
106
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
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",