@anchrd/colab-sdk 0.1.44 → 0.1.46
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/connectors/connectors.d.ts +3 -0
- package/dist/connectors/connectors.js +7 -0
- package/dist/grammar/grammar.d.ts +2 -0
- package/dist/grammar/grammar.js +7 -0
- package/dist/operators/operators.d.ts +213 -14
- package/dist/operators/operators.js +89 -26
- package/dist/relations/relations.d.ts +340 -0
- package/dist/relations/relations.js +129 -0
- package/dist/sdk.d.ts +3 -1
- package/dist/sdk.js +3 -1
- package/dist/types/types.d.ts +181 -0
- package/dist/types/types.js +124 -0
- package/dist/written/written.d.ts +4 -0
- package/dist/written/written.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { idSchema } from "../ids/ids.js";
|
|
3
|
+
import { NodeId, NodeKindRead } from "../nodes/nodes.js";
|
|
4
|
+
import { IdempotencyKey } from "../primitives/primitives.js";
|
|
5
|
+
import { NodeTypes, TypeId, TypeKind, TypeRef } from "../types/types.js";
|
|
6
|
+
// The ontology's relations (#1124, Nodes › Ontologie): what connects two things, a node or an actor,
|
|
7
|
+
// "Beziehung" in the UI. A relation is computed from a rule ("entsteht aus") or set by somebody; that
|
|
8
|
+
// is its origin, never a type of its own. The view "Ontologie" of a folder reads them through
|
|
9
|
+
// `intelligence_relation_list`.
|
|
10
|
+
// The rules Colab brings along, locked: each says where its relations come from. Their meaning is a
|
|
11
|
+
// word of the UI's catalogue (`ontology_relation_<id>`); an AI reads the English one here.
|
|
12
|
+
export const baseRelationTypes = {
|
|
13
|
+
// A node names another one in its text (a document's, a task's): `/n/node_…` or the bare id.
|
|
14
|
+
mentions: { from: "node", to: "node", meaning: "mentions", source: "text" },
|
|
15
|
+
// A field of a task's card kind points at a node.
|
|
16
|
+
refers: { from: "node", to: "node", meaning: "refers to", source: "field" },
|
|
17
|
+
// A task waits for another one.
|
|
18
|
+
waits: { from: "node", to: "node", meaning: "waits for", source: "dependency" },
|
|
19
|
+
// The person who answers for a document, table or file's content (its creator without one).
|
|
20
|
+
responsible: { from: "actor", to: "node", meaning: "answers for", source: "role" },
|
|
21
|
+
// The person or machine a task is assigned to.
|
|
22
|
+
assignee: { from: "actor", to: "node", meaning: "works on", source: "assignment" },
|
|
23
|
+
// The Operator that works on a goal.
|
|
24
|
+
operator: { from: "actor", to: "node", meaning: "pursues", source: "assignment" },
|
|
25
|
+
// A node shared with a person or machine directly.
|
|
26
|
+
grant: { from: "node", to: "actor", meaning: "shared with", source: "grant" },
|
|
27
|
+
};
|
|
28
|
+
export const BaseRelationType = z.enum(Object.keys(baseRelationTypes));
|
|
29
|
+
export const RelationListInput = z
|
|
30
|
+
.strictObject({
|
|
31
|
+
nodeId: NodeId.optional().describe("The node whose picture to read. A folder: the relations between the things directly in it, a subfolder standing for everything below it, and to people and machines. Any other node: all its own relations, in and out, with its actions."),
|
|
32
|
+
section: z
|
|
33
|
+
.literal("shared")
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Instead of a node: the picture of Shared, the tops of what others share with you."),
|
|
36
|
+
})
|
|
37
|
+
.refine((input) => (input.nodeId === undefined) !== (input.section === undefined), {
|
|
38
|
+
message: "Give exactly one of nodeId and section.",
|
|
39
|
+
});
|
|
40
|
+
// One end of a relation in the picture of a folder: a node directly in it (a subfolder stands for its
|
|
41
|
+
// whole content), an actor, or a node outside the folder.
|
|
42
|
+
export const RelationEnd = z.discriminatedUnion("kind", [
|
|
43
|
+
z.object({ kind: z.literal("node"), nodeId: NodeId }),
|
|
44
|
+
z.object({ kind: z.literal("actor"), userId: z.string() }),
|
|
45
|
+
z.object({ kind: z.literal("outside"), nodeId: NodeId }),
|
|
46
|
+
// An own object type standing for a thing of the real world, the end of a set relation.
|
|
47
|
+
z.object({ kind: z.literal("type"), typeId: TypeId }),
|
|
48
|
+
]);
|
|
49
|
+
export const RelationId = idSchema("relation").describe("A set relation's id, `relation_…`.");
|
|
50
|
+
export const Relation = z.object({
|
|
51
|
+
// A base rule by its word, or an own relation type.
|
|
52
|
+
type: z.union([BaseRelationType, TypeId]),
|
|
53
|
+
origin: z.enum(["computed", "set"]),
|
|
54
|
+
from: RelationEnd,
|
|
55
|
+
to: RelationEnd,
|
|
56
|
+
// How many single relations this line stands for: a subfolder bundles those of its content.
|
|
57
|
+
count: z.number().int().min(1),
|
|
58
|
+
// A set relation that stands alone (count 1): its id, to remove it. null otherwise.
|
|
59
|
+
relationId: RelationId.nullable(),
|
|
60
|
+
});
|
|
61
|
+
export const RelationActor = z.object({
|
|
62
|
+
userId: z.string(),
|
|
63
|
+
name: z.string(),
|
|
64
|
+
kind: z.enum(["human", "machine"]),
|
|
65
|
+
});
|
|
66
|
+
// A node outside the folder that a relation reaches, with the folder it lies in, as the caller reads it.
|
|
67
|
+
export const RelationOutside = z.object({
|
|
68
|
+
nodeId: NodeId,
|
|
69
|
+
name: z.string(),
|
|
70
|
+
kind: NodeKindRead,
|
|
71
|
+
folderId: NodeId.nullable(),
|
|
72
|
+
folderName: z.string().nullable(),
|
|
73
|
+
});
|
|
74
|
+
// An own type at the end of a relation, or naming one: its name for the picture.
|
|
75
|
+
export const RelationType = z.object({ typeId: TypeId, name: z.string(), kind: TypeKind });
|
|
76
|
+
// An action in the picture (#1124): what may change the cards it acts on. Derived ones come from a
|
|
77
|
+
// board's columns and from skills; own ones are action types. The base actions (create, update,
|
|
78
|
+
// archive) hold for every type and are never shown.
|
|
79
|
+
export const RelationAction = z.object({
|
|
80
|
+
// `type_…` for an action type; a derived one is keyed by where it comes from (`column:…`, `skill:…`).
|
|
81
|
+
actionId: z.string(),
|
|
82
|
+
name: z.string(),
|
|
83
|
+
description: z.string(),
|
|
84
|
+
origin: z.enum(["computed", "set"]),
|
|
85
|
+
approval: z.boolean(),
|
|
86
|
+
implementedBy: NodeId.nullable(),
|
|
87
|
+
// The cards of this picture it acts on.
|
|
88
|
+
on: z.array(NodeId),
|
|
89
|
+
});
|
|
90
|
+
export const RelationList = z.object({
|
|
91
|
+
items: z.array(Relation),
|
|
92
|
+
actors: z.array(RelationActor),
|
|
93
|
+
outside: z.array(RelationOutside),
|
|
94
|
+
types: z.array(RelationType),
|
|
95
|
+
actions: z.array(RelationAction),
|
|
96
|
+
// The own object types given to the nodes of this picture (#1170, E255): its cards, the node of an
|
|
97
|
+
// object picture and the outside nodes it names; a node without any is left out. Their names stand
|
|
98
|
+
// in `types`.
|
|
99
|
+
nodeTypes: z.array(NodeTypes),
|
|
100
|
+
nextCursor: z.null(),
|
|
101
|
+
});
|
|
102
|
+
// One end of a relation somebody sets: a node, a person or machine, or a thing of the real world (an
|
|
103
|
+
// own object type without a source).
|
|
104
|
+
export const RelationSetEnd = z.discriminatedUnion("kind", [
|
|
105
|
+
z.strictObject({ kind: z.literal("node"), nodeId: NodeId }),
|
|
106
|
+
z.strictObject({ kind: z.literal("actor"), userId: z.string().regex(/^user_/) }),
|
|
107
|
+
z.strictObject({ kind: z.literal("type"), typeId: TypeId }),
|
|
108
|
+
]);
|
|
109
|
+
export const RelationCreateInput = z.strictObject({
|
|
110
|
+
type: TypeRef.describe("What the relation means: a relation type, an own one `type_…` or a base rule `base:<word>` (base:mentions …). To write a new meaning, create the relation type first with intelligence_type_create."),
|
|
111
|
+
from: RelationSetEnd,
|
|
112
|
+
to: RelationSetEnd,
|
|
113
|
+
idempotencyKey: IdempotencyKey,
|
|
114
|
+
});
|
|
115
|
+
// The same ends in an answer: `z.object`, never strict (E113).
|
|
116
|
+
const SetRelationEnd = z.discriminatedUnion("kind", [
|
|
117
|
+
z.object({ kind: z.literal("node"), nodeId: NodeId }),
|
|
118
|
+
z.object({ kind: z.literal("actor"), userId: z.string() }),
|
|
119
|
+
z.object({ kind: z.literal("type"), typeId: TypeId }),
|
|
120
|
+
]);
|
|
121
|
+
export const SetRelation = z.object({
|
|
122
|
+
relationId: RelationId,
|
|
123
|
+
type: TypeRef,
|
|
124
|
+
from: SetRelationEnd,
|
|
125
|
+
to: SetRelationEnd,
|
|
126
|
+
createdBy: z.string(),
|
|
127
|
+
createdAt: z.iso.datetime(),
|
|
128
|
+
});
|
|
129
|
+
export const RelationRemoveInput = z.strictObject({ relationId: RelationId });
|
package/dist/sdk.d.ts
CHANGED
|
@@ -34,12 +34,13 @@ export { Mcp, McpAuth, McpCall, McpCallAction, McpCallList, McpCallListInput, ty
|
|
|
34
34
|
export { ChatRead, ChatTopic, ChatUpdateInput, Message, MessageAuthor, MessageCreateInput, MessageId, MessageList, MessageListInput, messageMaxLength, TopicName, topicMaxLength, topicOf, } from "./messages/messages.js";
|
|
35
35
|
export { Missing, MissingCall, MissingCode, missingCodes, Reached, } from "./missing/missing.js";
|
|
36
36
|
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";
|
|
37
|
-
export { ChangeTrigger, Credential, CredentialCreateInput, CredentialGetInput, CredentialId, CredentialKind, CredentialList, CredentialListInput, CredentialRevokeInput, CredentialState, CredentialTested, CredentialTestInput, CredentialTestResult, CredentialUpdateInput, cacheWritePriceOf, compactRunLimit, type GatewayModel, type GatewayModelEntry, GatewayModelEntrySchema,
|
|
37
|
+
export { ChangeTrigger, Credential, CredentialCreateInput, CredentialGetInput, CredentialId, CredentialKind, CredentialList, CredentialListInput, CredentialRevokeInput, CredentialState, CredentialTested, CredentialTestInput, CredentialTestResult, CredentialUpdateInput, cacheWritePriceOf, compactRunLimit, type GatewayModel, type GatewayModelEntry, GatewayModelEntrySchema, GatewayRight, GatewayRightCheck, GatewayTarget, gatewayCatalog, gatewayModelOf, inCatalog, KeepStepsDays, MachineDisableInput, MachineEnableInput, MachineGetInput, MachineListInput, modelsOf, modelsOfVendor, Operator, OperatorBudget, OperatorLimits, OperatorList, OperatorMachineArchiveInput, OperatorMachineCreateInput, OperatorMachineRestoreInput, OperatorMachineUpdateInput, OperatorModel, type OperatorProviderEntry, 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, type OperatorVendorEntry, OwnCredentialState, offeredModels, operatorDefaults, operatorProviders, operatorVendors, PauseReason, planAnswerOf, type ReasoningEffort, ReasoningLevel, ReasoningStage, type RetiredGatewayModel, RunCancelInput, RunPlanAnswer, RunPlanStep, RunStepListInput, RunUpdateInput, reasoningAdjustable, reasoningDefault, reasoningEffortOf, reasoningOfModel, retiredGatewayModels, runPlanMax, runSummaryChars, Subagents, scheduleQuietMinutes, Trigger, UserCredentialCreateInput, UserCredentialRevokeInput, UserCredentialTestInput, UserCredentialUpdateInput, vendorOfModel, } from "./operators/operators.js";
|
|
38
38
|
export { Currency, CurrencyRate, currencies, Organisation, OrganisationGetInput, OrganisationUpdateInput, } from "./organisation/organisation.js";
|
|
39
39
|
export { PageDetail, PageGetInput, PageHead, PageHeading, PageId, PageList, PageListInput, PageSummary, } from "./pages/pages.js";
|
|
40
40
|
export { AgentName, gatewayAgentsMax, IdempotencyKey, PlanSubstep, planEvidenceMax, Rev, } from "./primitives/primitives.js";
|
|
41
41
|
export { Locale, locales, Name, ProfileImageResponse, ProfileUpdateInput, profileImageMaxBytes, profileImageTypes, Theme, TimeZone, themes, } from "./profile/profile.js";
|
|
42
42
|
export { offersSignIn, Provider, ProviderId, ProviderList, ProviderListInput, ProviderRemoveInput, ProviderSource, ProviderTest, ProviderTestInput, ProviderUpdateInput, providerEndpoints, providerIds, SignInProviderId, SignInProviders, signInProviderIds, } from "./providers/providers.js";
|
|
43
|
+
export { BaseRelationType, baseRelationTypes, Relation, RelationAction, RelationActor, RelationCreateInput, RelationEnd, RelationId, RelationList, RelationListInput, RelationOutside, RelationRemoveInput, RelationSetEnd, RelationType, SetRelation, } from "./relations/relations.js";
|
|
43
44
|
export { GrantChange, PermissionsResponse, RightPath, RightTree, Role, RoleArchiveInput, RoleCreateInput, RoleDetail, RoleGetInput, RoleGrantCreateInput, RoleGrantRevokeInput, RoleId, RoleList, RoleListInput, RoleRestoreInput, RoleUpdateInput, } from "./roles/roles.js";
|
|
44
45
|
export { RunDetail, RunGetInput, RunId, RunItem, RunList, RunListInput, RunStatus, runStatuses, } from "./runs/runs.js";
|
|
45
46
|
export { RuntimeConfig } from "./runtime-config.js";
|
|
@@ -53,6 +54,7 @@ export { maxTableColumns, maxTableRows, RowLimit, TableColumn, TableColumnChange
|
|
|
53
54
|
export { companyTeamId, MemberId, Team, TeamArchiveInput, TeamCreateInput, TeamId, TeamList, TeamListInput, TeamMember, TeamMemberCreateInput, TeamMemberRemoveInput, TeamRestoreInput, TeamRole, TeamUpdateInput, } from "./teams/teams.js";
|
|
54
55
|
export { type Actor, defineTool, type Permission, type Tool, type ToolAnnotations, type ToolContext, type ToolInput, type ToolSource, } from "./tool.js";
|
|
55
56
|
export { compareTreeNames, treeKindOrder, treeKindRank, } from "./tree-order/tree-order.js";
|
|
57
|
+
export { baseActionTypes, baseActorTypes, baseObjectTypes, baseRef, Cardinality, cardinalities, NodeTypeCreateInput, NodeTypeRemoveInput, NodeTypes, OntologyType, TypeArchiveInput, TypeCreateInput, TypeId, TypeKind, TypeList, TypeListInput, TypeRef, TypeRestoreInput, TypeStatus, TypeUpdateInput, typeKinds, typeStatuses, } from "./types/types.js";
|
|
56
58
|
export { IntelligenceUserGetInput, IntelligenceUserUpdateInput, NotifyMode, notifyModes, UserSettings, } from "./user-settings/user-settings.js";
|
|
57
59
|
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";
|
|
58
60
|
export { MoveColumn, NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionExcerpt, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, TaskVersionChange, taskVersionChanges, VersionId, VersionMove, versionKinds, } from "./versions/versions.js";
|
package/dist/sdk.js
CHANGED
|
@@ -37,12 +37,13 @@ export { Mcp, McpAuth, McpCall, McpCallAction, McpCallList, McpCallListInput, Mc
|
|
|
37
37
|
export { ChatRead, ChatTopic, ChatUpdateInput, Message, MessageAuthor, MessageCreateInput, MessageId, MessageList, MessageListInput, messageMaxLength, TopicName, topicMaxLength, topicOf, } from "./messages/messages.js";
|
|
38
38
|
export { Missing, MissingCall, MissingCode, missingCodes, Reached, } from "./missing/missing.js";
|
|
39
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";
|
|
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,
|
|
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, PauseReason, planAnswerOf, ReasoningLevel, ReasoningStage, RunCancelInput, RunPlanAnswer, RunPlanStep, RunStepListInput, RunUpdateInput, reasoningAdjustable, reasoningDefault, reasoningEffortOf, reasoningOfModel, retiredGatewayModels, runPlanMax, runSummaryChars, Subagents, scheduleQuietMinutes, Trigger, UserCredentialCreateInput, UserCredentialRevokeInput, UserCredentialTestInput, UserCredentialUpdateInput, vendorOfModel, } from "./operators/operators.js";
|
|
41
41
|
export { Currency, CurrencyRate, currencies, Organisation, OrganisationGetInput, OrganisationUpdateInput, } from "./organisation/organisation.js";
|
|
42
42
|
export { PageDetail, PageGetInput, PageHead, PageHeading, PageId, PageList, PageListInput, PageSummary, } from "./pages/pages.js";
|
|
43
43
|
export { AgentName, gatewayAgentsMax, IdempotencyKey, PlanSubstep, planEvidenceMax, Rev, } from "./primitives/primitives.js";
|
|
44
44
|
export { Locale, locales, Name, ProfileImageResponse, ProfileUpdateInput, profileImageMaxBytes, profileImageTypes, Theme, TimeZone, themes, } from "./profile/profile.js";
|
|
45
45
|
export { offersSignIn, Provider, ProviderId, ProviderList, ProviderListInput, ProviderRemoveInput, ProviderSource, ProviderTest, ProviderTestInput, ProviderUpdateInput, providerEndpoints, providerIds, SignInProviderId, SignInProviders, signInProviderIds, } from "./providers/providers.js";
|
|
46
|
+
export { BaseRelationType, baseRelationTypes, Relation, RelationAction, RelationActor, RelationCreateInput, RelationEnd, RelationId, RelationList, RelationListInput, RelationOutside, RelationRemoveInput, RelationSetEnd, RelationType, SetRelation, } from "./relations/relations.js";
|
|
46
47
|
export { GrantChange, PermissionsResponse, RightPath, RightTree, Role, RoleArchiveInput, RoleCreateInput, RoleDetail, RoleGetInput, RoleGrantCreateInput, RoleGrantRevokeInput, RoleId, RoleList, RoleListInput, RoleRestoreInput, RoleUpdateInput, } from "./roles/roles.js";
|
|
47
48
|
export { RunDetail, RunGetInput, RunId, RunItem, RunList, RunListInput, RunStatus, runStatuses, } from "./runs/runs.js";
|
|
48
49
|
export { RuntimeConfig } from "./runtime-config.js";
|
|
@@ -56,6 +57,7 @@ export { maxTableColumns, maxTableRows, RowLimit, TableColumn, TableColumnChange
|
|
|
56
57
|
export { companyTeamId, MemberId, Team, TeamArchiveInput, TeamCreateInput, TeamId, TeamList, TeamListInput, TeamMember, TeamMemberCreateInput, TeamMemberRemoveInput, TeamRestoreInput, TeamRole, TeamUpdateInput, } from "./teams/teams.js";
|
|
57
58
|
export { defineTool, } from "./tool.js";
|
|
58
59
|
export { compareTreeNames, treeKindOrder, treeKindRank, } from "./tree-order/tree-order.js";
|
|
60
|
+
export { baseActionTypes, baseActorTypes, baseObjectTypes, baseRef, Cardinality, cardinalities, NodeTypeCreateInput, NodeTypeRemoveInput, NodeTypes, OntologyType, TypeArchiveInput, TypeCreateInput, TypeId, TypeKind, TypeList, TypeListInput, TypeRef, TypeRestoreInput, TypeStatus, TypeUpdateInput, typeKinds, typeStatuses, } from "./types/types.js";
|
|
59
61
|
export { IntelligenceUserGetInput, IntelligenceUserUpdateInput, NotifyMode, notifyModes, UserSettings, } from "./user-settings/user-settings.js";
|
|
60
62
|
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";
|
|
61
63
|
export { MoveColumn, NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionExcerpt, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, TaskVersionChange, taskVersionChanges, VersionId, VersionMove, versionKinds, } from "./versions/versions.js";
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const typeKinds: readonly ["object", "relation", "action", "actor"];
|
|
3
|
+
export declare const TypeKind: z.ZodEnum<{
|
|
4
|
+
object: "object";
|
|
5
|
+
action: "action";
|
|
6
|
+
relation: "relation";
|
|
7
|
+
actor: "actor";
|
|
8
|
+
}>;
|
|
9
|
+
export type TypeKind = z.infer<typeof TypeKind>;
|
|
10
|
+
export declare const typeStatuses: readonly ["experimental", "active", "deprecated"];
|
|
11
|
+
export declare const TypeStatus: z.ZodEnum<{
|
|
12
|
+
active: "active";
|
|
13
|
+
experimental: "experimental";
|
|
14
|
+
deprecated: "deprecated";
|
|
15
|
+
}>;
|
|
16
|
+
export type TypeStatus = z.infer<typeof TypeStatus>;
|
|
17
|
+
export declare const cardinalities: readonly ["one", "optional", "many"];
|
|
18
|
+
export declare const Cardinality: z.ZodEnum<{
|
|
19
|
+
optional: "optional";
|
|
20
|
+
one: "one";
|
|
21
|
+
many: "many";
|
|
22
|
+
}>;
|
|
23
|
+
export type Cardinality = z.infer<typeof Cardinality>;
|
|
24
|
+
export declare const baseObjectTypes: readonly ["document", "file", "table", "board", "task", "gadget", "skill", "goal", "source"];
|
|
25
|
+
export declare const baseActorTypes: readonly ["person", "machine", "system"];
|
|
26
|
+
export declare const baseActionTypes: readonly ["create", "update", "archive"];
|
|
27
|
+
export declare const TypeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
28
|
+
export type TypeId = z.infer<typeof TypeId>;
|
|
29
|
+
export declare const TypeRef: z.ZodString;
|
|
30
|
+
export type TypeRef = z.infer<typeof TypeRef>;
|
|
31
|
+
export declare const baseRef: (word: string) => TypeRef;
|
|
32
|
+
export declare const OntologyType: z.ZodObject<{
|
|
33
|
+
typeId: z.ZodString;
|
|
34
|
+
kind: z.ZodEnum<{
|
|
35
|
+
object: "object";
|
|
36
|
+
action: "action";
|
|
37
|
+
relation: "relation";
|
|
38
|
+
actor: "actor";
|
|
39
|
+
}>;
|
|
40
|
+
base: z.ZodBoolean;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
description: z.ZodString;
|
|
43
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
44
|
+
active: "active";
|
|
45
|
+
experimental: "experimental";
|
|
46
|
+
deprecated: "deprecated";
|
|
47
|
+
}>>;
|
|
48
|
+
sourceNodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
49
|
+
from: z.ZodNullable<z.ZodString>;
|
|
50
|
+
to: z.ZodNullable<z.ZodString>;
|
|
51
|
+
cardinality: z.ZodNullable<z.ZodEnum<{
|
|
52
|
+
optional: "optional";
|
|
53
|
+
one: "one";
|
|
54
|
+
many: "many";
|
|
55
|
+
}>>;
|
|
56
|
+
arisesFrom: z.ZodNullable<z.ZodString>;
|
|
57
|
+
on: z.ZodNullable<z.ZodString>;
|
|
58
|
+
implementedBy: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
59
|
+
approval: z.ZodBoolean;
|
|
60
|
+
rev: z.ZodNullable<z.ZodInt>;
|
|
61
|
+
updatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type OntologyType = z.infer<typeof OntologyType>;
|
|
64
|
+
export declare const TypeListInput: z.ZodObject<{
|
|
65
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
object: "object";
|
|
67
|
+
action: "action";
|
|
68
|
+
relation: "relation";
|
|
69
|
+
actor: "actor";
|
|
70
|
+
}>>;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
export type TypeListInput = z.infer<typeof TypeListInput>;
|
|
73
|
+
export declare const TypeList: z.ZodObject<{
|
|
74
|
+
items: z.ZodArray<z.ZodObject<{
|
|
75
|
+
typeId: z.ZodString;
|
|
76
|
+
kind: z.ZodEnum<{
|
|
77
|
+
object: "object";
|
|
78
|
+
action: "action";
|
|
79
|
+
relation: "relation";
|
|
80
|
+
actor: "actor";
|
|
81
|
+
}>;
|
|
82
|
+
base: z.ZodBoolean;
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
description: z.ZodString;
|
|
85
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
86
|
+
active: "active";
|
|
87
|
+
experimental: "experimental";
|
|
88
|
+
deprecated: "deprecated";
|
|
89
|
+
}>>;
|
|
90
|
+
sourceNodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
91
|
+
from: z.ZodNullable<z.ZodString>;
|
|
92
|
+
to: z.ZodNullable<z.ZodString>;
|
|
93
|
+
cardinality: z.ZodNullable<z.ZodEnum<{
|
|
94
|
+
optional: "optional";
|
|
95
|
+
one: "one";
|
|
96
|
+
many: "many";
|
|
97
|
+
}>>;
|
|
98
|
+
arisesFrom: z.ZodNullable<z.ZodString>;
|
|
99
|
+
on: z.ZodNullable<z.ZodString>;
|
|
100
|
+
implementedBy: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
101
|
+
approval: z.ZodBoolean;
|
|
102
|
+
rev: z.ZodNullable<z.ZodInt>;
|
|
103
|
+
updatedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
nextCursor: z.ZodNull;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type TypeList = z.infer<typeof TypeList>;
|
|
108
|
+
export declare const TypeCreateInput: z.ZodObject<{
|
|
109
|
+
kind: z.ZodEnum<{
|
|
110
|
+
object: "object";
|
|
111
|
+
action: "action";
|
|
112
|
+
relation: "relation";
|
|
113
|
+
actor: "actor";
|
|
114
|
+
}>;
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
description: z.ZodOptional<z.ZodString>;
|
|
117
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
active: "active";
|
|
119
|
+
experimental: "experimental";
|
|
120
|
+
deprecated: "deprecated";
|
|
121
|
+
}>>;
|
|
122
|
+
sourceNodeId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
123
|
+
from: z.ZodOptional<z.ZodString>;
|
|
124
|
+
to: z.ZodOptional<z.ZodString>;
|
|
125
|
+
cardinality: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
optional: "optional";
|
|
127
|
+
one: "one";
|
|
128
|
+
many: "many";
|
|
129
|
+
}>>;
|
|
130
|
+
on: z.ZodOptional<z.ZodString>;
|
|
131
|
+
implementedBy: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
132
|
+
approval: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
idempotencyKey: z.ZodString;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
export type TypeCreateInput = z.infer<typeof TypeCreateInput>;
|
|
136
|
+
export declare const TypeUpdateInput: z.ZodObject<{
|
|
137
|
+
typeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
138
|
+
rev: z.ZodNumber;
|
|
139
|
+
name: z.ZodOptional<z.ZodString>;
|
|
140
|
+
description: z.ZodOptional<z.ZodString>;
|
|
141
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
142
|
+
active: "active";
|
|
143
|
+
experimental: "experimental";
|
|
144
|
+
deprecated: "deprecated";
|
|
145
|
+
}>>>;
|
|
146
|
+
sourceNodeId: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
147
|
+
from: z.ZodOptional<z.ZodString>;
|
|
148
|
+
to: z.ZodOptional<z.ZodString>;
|
|
149
|
+
cardinality: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
150
|
+
optional: "optional";
|
|
151
|
+
one: "one";
|
|
152
|
+
many: "many";
|
|
153
|
+
}>>>;
|
|
154
|
+
on: z.ZodOptional<z.ZodString>;
|
|
155
|
+
implementedBy: z.ZodOptional<z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
156
|
+
approval: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export type TypeUpdateInput = z.infer<typeof TypeUpdateInput>;
|
|
159
|
+
export declare const TypeArchiveInput: z.ZodObject<{
|
|
160
|
+
typeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
161
|
+
}, z.core.$strict>;
|
|
162
|
+
export type TypeArchiveInput = z.infer<typeof TypeArchiveInput>;
|
|
163
|
+
export declare const TypeRestoreInput: z.ZodObject<{
|
|
164
|
+
typeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
165
|
+
}, z.core.$strict>;
|
|
166
|
+
export type TypeRestoreInput = z.infer<typeof TypeRestoreInput>;
|
|
167
|
+
export declare const NodeTypeCreateInput: z.ZodObject<{
|
|
168
|
+
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
169
|
+
typeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
export type NodeTypeCreateInput = z.infer<typeof NodeTypeCreateInput>;
|
|
172
|
+
export declare const NodeTypeRemoveInput: z.ZodObject<{
|
|
173
|
+
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
174
|
+
typeId: z.ZodTemplateLiteral<`type_${string}`>;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
export type NodeTypeRemoveInput = z.infer<typeof NodeTypeRemoveInput>;
|
|
177
|
+
export declare const NodeTypes: z.ZodObject<{
|
|
178
|
+
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
179
|
+
typeIds: z.ZodArray<z.ZodTemplateLiteral<`type_${string}`>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
export type NodeTypes = z.infer<typeof NodeTypes>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { idSchema } from "../ids/ids.js";
|
|
3
|
+
import { NodeId } from "../nodes/nodes.js";
|
|
4
|
+
import { IdempotencyKey, Rev } from "../primitives/primitives.js";
|
|
5
|
+
// The ontology's types (#1124, E250, Nodes › Ontologie): what something is (an object), what
|
|
6
|
+
// connects two things (a relation), what may change (an action) and who acts (an actor). Described
|
|
7
|
+
// per type, never per instance, and nothing has to be described: a type without description carries
|
|
8
|
+
// the name of where it comes from.
|
|
9
|
+
//
|
|
10
|
+
// Colab brings base types along, locked: every node has its kind as object type, every relation
|
|
11
|
+
// rule of `baseRelationTypes` is a relation type, people, machines and Colab itself are actor
|
|
12
|
+
// types, and creating, changing and archiving are the base actions of every type. A company adds
|
|
13
|
+
// its own types over them; an own object type stands on a source (a node, e.g. the table whose rows
|
|
14
|
+
// are its objects) or on none, a thing of the real world ("Monteur", "Schlüsselkasten").
|
|
15
|
+
export const typeKinds = ["object", "relation", "action", "actor"];
|
|
16
|
+
export const TypeKind = z.enum(typeKinds);
|
|
17
|
+
// Switched on per type: null is off.
|
|
18
|
+
export const typeStatuses = ["experimental", "active", "deprecated"];
|
|
19
|
+
export const TypeStatus = z.enum(typeStatuses);
|
|
20
|
+
// How many things a relation type connects on its far end: 1, 0..1, 0..n.
|
|
21
|
+
export const cardinalities = ["one", "optional", "many"];
|
|
22
|
+
export const Cardinality = z.enum(cardinalities);
|
|
23
|
+
// The locked base types, by word. A node's object type is its kind.
|
|
24
|
+
export const baseObjectTypes = [
|
|
25
|
+
"document",
|
|
26
|
+
"file",
|
|
27
|
+
"table",
|
|
28
|
+
"board",
|
|
29
|
+
"task",
|
|
30
|
+
"gadget",
|
|
31
|
+
"skill",
|
|
32
|
+
"goal",
|
|
33
|
+
"source",
|
|
34
|
+
];
|
|
35
|
+
export const baseActorTypes = ["person", "machine", "system"];
|
|
36
|
+
export const baseActionTypes = ["create", "update", "archive"];
|
|
37
|
+
export const TypeId = idSchema("type").describe("An own type's id, `type_…`.");
|
|
38
|
+
// A type as a relation, an action or a set relation names it: an own type's id, or a base type as
|
|
39
|
+
// `base:<word>` (`base:table`, `base:person`, `base:mentions`, `base:create`).
|
|
40
|
+
export const TypeRef = z
|
|
41
|
+
.string()
|
|
42
|
+
.regex(/^(base:[a-z]+|type_[0-9A-HJKMNP-TV-Z]{26})$/)
|
|
43
|
+
.describe("A type: an own type's id `type_…`, or a base type as `base:<word>`.");
|
|
44
|
+
export const baseRef = (word) => `base:${word}`;
|
|
45
|
+
export const OntologyType = z.object({
|
|
46
|
+
typeId: TypeRef,
|
|
47
|
+
kind: TypeKind,
|
|
48
|
+
// A base type is locked: it has no rev and changes with Colab, not with the company.
|
|
49
|
+
base: z.boolean(),
|
|
50
|
+
name: z.string(),
|
|
51
|
+
description: z.string(),
|
|
52
|
+
status: TypeStatus.nullable(),
|
|
53
|
+
// An object type: the node its objects are, or come from (rows of a table); null for a thing of
|
|
54
|
+
// the real world without a source, and for every base type.
|
|
55
|
+
sourceNodeId: NodeId.nullable(),
|
|
56
|
+
// A relation type: the rule "from type × to type → meaning" and how many it connects.
|
|
57
|
+
from: TypeRef.nullable(),
|
|
58
|
+
to: TypeRef.nullable(),
|
|
59
|
+
cardinality: Cardinality.nullable(),
|
|
60
|
+
// Where its relations come from: a base rule's source ("text", "field", …); null for a type whose
|
|
61
|
+
// relations are set.
|
|
62
|
+
arisesFrom: z.string().nullable(),
|
|
63
|
+
// An action type: the type it acts on, what carries it out in Colab (a gadget, a skill, a board),
|
|
64
|
+
// and whether a person has to approve it first.
|
|
65
|
+
on: TypeRef.nullable(),
|
|
66
|
+
implementedBy: NodeId.nullable(),
|
|
67
|
+
approval: z.boolean(),
|
|
68
|
+
rev: z.int().nullable(),
|
|
69
|
+
updatedAt: z.iso.datetime().nullable(),
|
|
70
|
+
});
|
|
71
|
+
export const TypeListInput = z.strictObject({
|
|
72
|
+
kind: TypeKind.optional().describe("Only the types of this kind; all four without it."),
|
|
73
|
+
});
|
|
74
|
+
export const TypeList = z.object({
|
|
75
|
+
items: z.array(OntologyType),
|
|
76
|
+
nextCursor: z.null(),
|
|
77
|
+
});
|
|
78
|
+
const name = z.string().trim().min(1).max(120);
|
|
79
|
+
const description = z.string().max(4000);
|
|
80
|
+
export const TypeCreateInput = z.strictObject({
|
|
81
|
+
kind: TypeKind.describe("object: what something is; relation: a rule that connects two types; action: what may change a type; actor: who acts."),
|
|
82
|
+
name: name.describe("The type's name, e.g. Unterkunft, Monteur, vermietet an."),
|
|
83
|
+
description: description.optional().describe("What the type means, for people and their AI."),
|
|
84
|
+
status: TypeStatus.optional(),
|
|
85
|
+
sourceNodeId: NodeId.optional().describe("An object type only: the node its objects are or come from, e.g. the table whose rows they are. Leave it out for a thing of the real world."),
|
|
86
|
+
from: TypeRef.optional().describe("A relation type only: the type it starts at."),
|
|
87
|
+
to: TypeRef.optional().describe("A relation type only: the type it leads to."),
|
|
88
|
+
cardinality: Cardinality.optional().describe("A relation type only: how many it connects at its far end (one, optional, many)."),
|
|
89
|
+
on: TypeRef.optional().describe("An action type only: the type it acts on."),
|
|
90
|
+
implementedBy: NodeId.optional().describe("An action type only: the gadget, skill or board that carries it out."),
|
|
91
|
+
approval: z
|
|
92
|
+
.boolean()
|
|
93
|
+
.optional()
|
|
94
|
+
.describe("An action type only: true when a person has to approve it before it runs."),
|
|
95
|
+
idempotencyKey: IdempotencyKey,
|
|
96
|
+
});
|
|
97
|
+
export const TypeUpdateInput = z.strictObject({
|
|
98
|
+
typeId: TypeId,
|
|
99
|
+
rev: Rev,
|
|
100
|
+
name: name.optional(),
|
|
101
|
+
description: description.optional(),
|
|
102
|
+
status: TypeStatus.nullable().optional().describe("null switches the status off."),
|
|
103
|
+
sourceNodeId: NodeId.nullable().optional(),
|
|
104
|
+
from: TypeRef.optional(),
|
|
105
|
+
to: TypeRef.optional(),
|
|
106
|
+
cardinality: Cardinality.nullable().optional(),
|
|
107
|
+
on: TypeRef.optional(),
|
|
108
|
+
implementedBy: NodeId.nullable().optional(),
|
|
109
|
+
approval: z.boolean().optional(),
|
|
110
|
+
});
|
|
111
|
+
export const TypeArchiveInput = z.strictObject({ typeId: TypeId });
|
|
112
|
+
export const TypeRestoreInput = z.strictObject({ typeId: TypeId });
|
|
113
|
+
// Own object types given to one element (#1170, E255): beside its locked base type, by whoever may
|
|
114
|
+
// change the element. A folder takes none (E250), and nothing is ever required.
|
|
115
|
+
export const NodeTypeCreateInput = z.strictObject({
|
|
116
|
+
nodeId: NodeId.describe("The element to give the type: a document, file, table, board, task, gadget, skill, goal or source. A folder takes no type."),
|
|
117
|
+
typeId: TypeId.describe("An own object type, `type_…`, from intelligence_type_list. Giving it again changes nothing."),
|
|
118
|
+
});
|
|
119
|
+
export const NodeTypeRemoveInput = z.strictObject({
|
|
120
|
+
nodeId: NodeId,
|
|
121
|
+
typeId: TypeId.describe("The own object type to take off the element."),
|
|
122
|
+
});
|
|
123
|
+
// An element's own object types, by name order; its base type is its kind.
|
|
124
|
+
export const NodeTypes = z.object({ nodeId: NodeId, typeIds: z.array(TypeId) });
|
|
@@ -37,6 +37,8 @@ export declare const Changed: z.ZodObject<{
|
|
|
37
37
|
connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
|
|
38
38
|
credentialId: z.ZodOptional<z.ZodTemplateLiteral<`credential_${string}`>>;
|
|
39
39
|
mcpId: z.ZodOptional<z.ZodTemplateLiteral<`mcp_${string}`>>;
|
|
40
|
+
typeId: z.ZodOptional<z.ZodTemplateLiteral<`type_${string}`>>;
|
|
41
|
+
relationId: z.ZodOptional<z.ZodTemplateLiteral<`relation_${string}`>>;
|
|
40
42
|
ref: z.ZodOptional<z.ZodString>;
|
|
41
43
|
rev: z.ZodOptional<z.ZodNumber>;
|
|
42
44
|
version: z.ZodOptional<z.ZodNumber>;
|
|
@@ -171,6 +173,8 @@ export declare const Written: z.ZodObject<{
|
|
|
171
173
|
connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
|
|
172
174
|
credentialId: z.ZodOptional<z.ZodTemplateLiteral<`credential_${string}`>>;
|
|
173
175
|
mcpId: z.ZodOptional<z.ZodTemplateLiteral<`mcp_${string}`>>;
|
|
176
|
+
typeId: z.ZodOptional<z.ZodTemplateLiteral<`type_${string}`>>;
|
|
177
|
+
relationId: z.ZodOptional<z.ZodTemplateLiteral<`relation_${string}`>>;
|
|
174
178
|
ref: z.ZodOptional<z.ZodString>;
|
|
175
179
|
rev: z.ZodOptional<z.ZodNumber>;
|
|
176
180
|
version: z.ZodOptional<z.ZodNumber>;
|
package/dist/written/written.js
CHANGED
|
@@ -14,11 +14,13 @@ import { Missing, Reached } from "../missing/missing.js";
|
|
|
14
14
|
import { NodeId, NodeReader } from "../nodes/nodes.js";
|
|
15
15
|
import { CredentialId } from "../operators/operators.js";
|
|
16
16
|
import { ProviderId } from "../providers/providers.js";
|
|
17
|
+
import { RelationId } from "../relations/relations.js";
|
|
17
18
|
import { RoleId } from "../roles/roles.js";
|
|
18
19
|
import { RunId } from "../runs/runs.js";
|
|
19
20
|
import { FunctionId, InterfaceId, ServiceId } from "../services/services.js";
|
|
20
21
|
import { QueryId } from "../sources/sources.js";
|
|
21
22
|
import { MemberId, TeamId } from "../teams/teams.js";
|
|
23
|
+
import { TypeId } from "../types/types.js";
|
|
22
24
|
import { UserId } from "../users/users.js";
|
|
23
25
|
// What a write answers over `/mcp` (E126, #672): what it changed and what that caused, never the
|
|
24
26
|
// object it wrote. The AI sent the object itself; echoing it back filled an Operator's context with
|
|
@@ -67,6 +69,9 @@ export const Changed = z.object({
|
|
|
67
69
|
credentialId: CredentialId.optional(),
|
|
68
70
|
// A person's own MCP (#802).
|
|
69
71
|
mcpId: McpId.optional(),
|
|
72
|
+
// The ontology (#1124): an own type and a relation somebody set.
|
|
73
|
+
typeId: TypeId.optional(),
|
|
74
|
+
relationId: RelationId.optional(),
|
|
70
75
|
// The caller's own name for an entry of a create of many (#625).
|
|
71
76
|
ref: z.string().optional(),
|
|
72
77
|
rev: z.number().int().optional(),
|
package/package.json
CHANGED