@collective-intelligence/extensions-sdk 0.1.9 → 0.1.11
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/README.md +599 -109
- package/dist/components/agents.d.ts +3 -0
- package/dist/components/authoring-core.d.ts +2 -2
- package/dist/components/base.d.ts +2 -1
- package/dist/components/connection-instances.d.ts +9 -0
- package/dist/components/connector-instances.d.ts +5 -1
- package/dist/components/connectors.d.ts +27 -1
- package/dist/components/data-access.d.ts +11 -0
- package/dist/components/declaration.d.ts +3 -1
- package/dist/components/external-application.d.ts +76 -28
- package/dist/components/knowledge.d.ts +52 -14
- package/dist/components/metadata-authoring.d.ts +27 -12
- package/dist/components/organization-settings.d.ts +1 -1
- package/dist/components/service-principal.d.ts +12 -0
- package/dist/components/tools.d.ts +18 -1
- package/dist/components/workflow-code-runtimes.d.ts +11 -0
- package/dist/components/workflow-results.d.ts +5 -0
- package/dist/components/workflows.d.ts +3 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.js +2 -2
- package/dist/package/connector-readers.d.ts +1 -0
- package/dist/package/dependencies.d.ts +3 -3
- package/dist/package/knowledge-readers.d.ts +54 -0
- package/dist/package/manifest.d.ts +2 -4
- package/dist/package/primitive-readers.d.ts +20 -37
- package/dist/package/workflow-readers.d.ts +1 -0
- package/dist/release/stored-manifest.d.ts +3 -2
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
|
3
3
|
import type { PackageCodecSource } from "../schema/source.js";
|
|
4
4
|
import type { ComponentManifest, ComponentPresentation, DeclarationReference, DeclaredComponent } from "./authoring-core.js";
|
|
5
5
|
import type { PackagePrimitiveBase } from "./base.js";
|
|
6
|
+
import type { DataAccess } from "./data-access.js";
|
|
6
7
|
import type { LifecycleOptions } from "./lifecycle.js";
|
|
7
8
|
/** Idle activation sources. Each stays off unless declared `true`. */
|
|
8
9
|
export type AgentActivityPolicy = Readonly<{
|
|
@@ -95,6 +96,7 @@ export type AgentModelTier = (typeof agentModelTiers)[number];
|
|
|
95
96
|
* `skills` and own `tools` are FQN references resolved at install.
|
|
96
97
|
*/
|
|
97
98
|
export type AgentDeclaration = PackagePrimitiveBase<"agent"> & Readonly<{
|
|
99
|
+
dataAccess?: DataAccess<"agent">;
|
|
98
100
|
activity?: AgentActivityPolicy;
|
|
99
101
|
audience?: AgentAudienceDeclaration;
|
|
100
102
|
behavioralBoundaries: readonly string[];
|
|
@@ -119,6 +121,7 @@ export type AgentDeclaration = PackagePrimitiveBase<"agent"> & Readonly<{
|
|
|
119
121
|
}>;
|
|
120
122
|
/** Portable governed Skill held by Agents and loaded on demand. */
|
|
121
123
|
export type SkillDeclaration = PackagePrimitiveBase<"skill"> & Readonly<{
|
|
124
|
+
dataAccess?: DataAccess<"skill">;
|
|
122
125
|
instructions: string;
|
|
123
126
|
lifecycle: LifecycleOptions;
|
|
124
127
|
tools: DeclaredToolBindings;
|
|
@@ -7,7 +7,7 @@ import type { PackagePrimitiveKind } from "./base.js";
|
|
|
7
7
|
import type { DocumentsDeltaPage, DocumentsDeltaRequest, DocumentsDrivesPage, DocumentsFoldersPage, DocumentsFetchedContent, DocumentsRootAncestry, DocumentsSource, KnowledgeEntityAdapterDeclaration, ConnectionDeclaration, DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration, DocumentsConnectorDeclaration, KnowledgeConnectorDeclaration, KnowledgeConnectorOAuthDeclaration, EmailProviderDeclaration, EventListenerDeclaration, OrganizationSsoDeclaration, OutboundMessagingProviderDeclaration, KnowledgeRelationAdapterDeclaration } from "./connectors.js";
|
|
8
8
|
import type { PackagePrimitiveDeclaration } from "./declaration.js";
|
|
9
9
|
import type { FieldOption, FieldOptionPage } from "./fields.js";
|
|
10
|
-
import type { FieldTransformerDeclaration, NotificationChannelDeclaration, ToolDeclaration, ToolSettingsOptionsDeclaration } from "./tools.js";
|
|
10
|
+
import type { FieldTransformerDeclaration, NotificationChannelDeclaration, ToolDeclaration, ToolResultWithDisplay, ToolSettingsOptionsDeclaration } from "./tools.js";
|
|
11
11
|
import type { WorkflowEditorOverrides, WorkflowFieldDeclaration, WorkflowFieldContract, WorkflowNodeContract, WorkflowNodePortDeclaration, WorkflowNodeDeclaration, WorkflowOutputChannelDeclaration, WorkflowPortSchemaResolution } from "./workflows.js";
|
|
12
12
|
/** Identity is the only data stored in an executable component manifest. */
|
|
13
13
|
export type ComponentManifest = Readonly<{
|
|
@@ -62,7 +62,7 @@ export type ClassDeclaration<Manifest, Constructor extends new () => object, Def
|
|
|
62
62
|
}>;
|
|
63
63
|
export type Awaitable<Value> = PromiseLike<Value> | Value;
|
|
64
64
|
export type ToolImplementation<Input, Output> = Readonly<{
|
|
65
|
-
execute(input: Input, context: unknown): Awaitable<Output
|
|
65
|
+
execute(input: Input, context: unknown): Awaitable<Output | ToolResultWithDisplay<Output>>;
|
|
66
66
|
}>;
|
|
67
67
|
export type ConnectionImplementation<Credentials> = Readonly<{
|
|
68
68
|
discover?(credentials: Credentials, context: unknown): unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VisibilityCondition } from "../schema/forms.js";
|
|
2
2
|
export type BindingScope = "organization" | "tenant";
|
|
3
|
-
export type PackagePrimitiveKind = "agent" | "knowledgeEntityAdapter" | "connection" | "externalDatasetProvider" | "managedDatasetProvider" | "datasetParser" | "datasetBlueprint" | "datasetTableTemplate" | "documentsConnector" | "knowledgeConnectorInstance" | "datasetConnectorInstance" | "knowledgeConnector" | "knowledgeConnectorOauth" | "domain" | "domainTemplate" | "emailProvider" | "eventListener" | "externalApplication" | "externalAppGateway" | "fieldTransformer" | "knowledgeEntitySchema" | "knowledgeRelationSchema" | "knowledgePolicy" | "notificationChannel" | "organizationGroup" | "organizationSettings" | "organizationSso" | "outboundMessagingProvider" | "remoteToolCollection" | "knowledgeRelationAdapter" | "skill" | "skillTemplate" | "studioApp" | "studioAppTemplate" | "studioComponent" | "tool" | "toolCollection" | "toolSettingsOptions" | "workflow" | "workflowField" | "workflowFieldCollection" | "workflowNode" | "workflowNodeCollection" | "workflowTemplate";
|
|
3
|
+
export type PackagePrimitiveKind = "agent" | "knowledgeEntityAdapter" | "connection" | "connectionInstance" | "externalDatasetProvider" | "managedDatasetProvider" | "datasetParser" | "datasetBlueprint" | "datasetTableTemplate" | "documentsConnector" | "knowledgeConnectorInstance" | "datasetConnectorInstance" | "knowledgeConnector" | "knowledgeConnectorOauth" | "domain" | "domainTemplate" | "emailProvider" | "eventListener" | "externalApplication" | "externalAppGateway" | "fieldTransformer" | "knowledgeEntitySchema" | "knowledgeRelationSchema" | "knowledgePolicy" | "notificationChannel" | "organizationGroup" | "organizationSettings" | "organizationSso" | "outboundMessagingProvider" | "remoteToolCollection" | "knowledgeRelationAdapter" | "servicePrincipal" | "skill" | "skillTemplate" | "studioApp" | "studioAppTemplate" | "studioComponent" | "tool" | "toolCollection" | "toolSettingsOptions" | "workflow" | "workflowField" | "workflowFieldCollection" | "workflowNode" | "workflowNodeCollection" | "workflowTemplate";
|
|
4
4
|
export type PackagePrimitiveBase<Kind extends PackagePrimitiveKind> = Readonly<{
|
|
5
5
|
description?: string;
|
|
6
6
|
displayName: string;
|
|
@@ -17,6 +17,7 @@ export type ConnectionReference = Readonly<{
|
|
|
17
17
|
* `PackageRuntimeContext.connectionCatalogIds[slot]`.
|
|
18
18
|
*/
|
|
19
19
|
catalogCollection?: string;
|
|
20
|
+
connectionInstanceFqn?: string;
|
|
20
21
|
connectionTemplateFqn: string;
|
|
21
22
|
label: string;
|
|
22
23
|
required?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JsonValue } from "../foundation/json.js";
|
|
2
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
3
|
+
import type { LifecycleOptions } from "./lifecycle.js";
|
|
4
|
+
/** An organization connection provisioned with the package lifecycle. */
|
|
5
|
+
export type ConnectionInstanceDeclaration = PackagePrimitiveBase<"connectionInstance"> & Readonly<{
|
|
6
|
+
templateFqn: string;
|
|
7
|
+
lifecycle: LifecycleOptions;
|
|
8
|
+
credentials: Readonly<Record<string, JsonValue>>;
|
|
9
|
+
}>;
|
|
@@ -4,9 +4,13 @@ import type { KnowledgeConnectorBindingExtraConfig, KnowledgeConnectorFieldMapRu
|
|
|
4
4
|
import type { DatasetDefinition, DatasetFilter, DatasetSourceLocation } from "./datasets.js";
|
|
5
5
|
import type { KnowledgePolicyDeclaration } from "./knowledge.js";
|
|
6
6
|
import type { LifecycleOptions } from "./lifecycle.js";
|
|
7
|
-
/** A slot
|
|
7
|
+
/** A slot uses install input or a declared connection, never embedded credentials. */
|
|
8
8
|
export type ConnectorInstanceConnection = Readonly<{
|
|
9
9
|
setupKey: string;
|
|
10
|
+
connectionInstanceFqn?: never;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
connectionInstanceFqn: string;
|
|
13
|
+
setupKey?: never;
|
|
10
14
|
}>;
|
|
11
15
|
export type KnowledgeConnectorInstanceSettings = Readonly<Record<string, Readonly<{
|
|
12
16
|
type: "inline" | "linked";
|
|
@@ -231,6 +231,30 @@ export type KnowledgeConnectorFieldMapRule = ConnectorFieldMapRuleBase & (Readon
|
|
|
231
231
|
op: "transform";
|
|
232
232
|
remote: string;
|
|
233
233
|
transformerId: string;
|
|
234
|
+
}> | Readonly<{
|
|
235
|
+
/**
|
|
236
|
+
* Stores the remote ids at `remote` as Entity References to the
|
|
237
|
+
* entities of the target binding; a `[]` segment projects every
|
|
238
|
+
* array item, as in `associations.companies.results[].id`.
|
|
239
|
+
*/
|
|
240
|
+
op: "reference";
|
|
241
|
+
remote: string;
|
|
242
|
+
/** The target binding key; required when the connector binds the target schema more than once. */
|
|
243
|
+
target?: string;
|
|
244
|
+
}> | Readonly<{
|
|
245
|
+
/**
|
|
246
|
+
* Maps each nested object at `remote` through `fieldMap` into an
|
|
247
|
+
* entity of the target binding, created only when no entity has the
|
|
248
|
+
* remote id at `remoteId`, and stores Entity References to them. The
|
|
249
|
+
* nested field map holds no further `embedded` rule.
|
|
250
|
+
*/
|
|
251
|
+
fieldMap: readonly Exclude<KnowledgeConnectorFieldMapRule, Readonly<{
|
|
252
|
+
op: "embedded";
|
|
253
|
+
}>>[];
|
|
254
|
+
op: "embedded";
|
|
255
|
+
remote: string;
|
|
256
|
+
remoteId: string;
|
|
257
|
+
target?: string;
|
|
234
258
|
}>);
|
|
235
259
|
export type KnowledgeConnectorBindingExtraConfig = Readonly<{
|
|
236
260
|
displayName: string | null;
|
|
@@ -463,8 +487,10 @@ export type EmailProviderDeclaration = PackagePrimitiveBase<"emailProvider"> & R
|
|
|
463
487
|
* The cloud identity of the deployment that the tenant may use instead of
|
|
464
488
|
* stored credentials. For `aws`, the host passes temporary `accessKeyId`,
|
|
465
489
|
* `secretAccessKey`, `sessionToken`, and `region` as the credentials.
|
|
490
|
+
* Azure token authority is Host-bound at execution; tokens never enter
|
|
491
|
+
* this portable declaration or persisted credentials.
|
|
466
492
|
*/
|
|
467
|
-
deploymentIdentity?: "aws";
|
|
493
|
+
deploymentIdentity?: "aws" | "azure";
|
|
468
494
|
/** `mailbox` always sends from a real mailbox; `address` is every other provider. */
|
|
469
495
|
senderKind: "address" | "mailbox";
|
|
470
496
|
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Per-source authority; an omitted source uses the declaration's own kind. */
|
|
2
|
+
export type DataAccess<Own extends "agent" | "skill" | "workflow"> = Readonly<{
|
|
3
|
+
datasets?: "user" | Own;
|
|
4
|
+
documents?: "user" | Own;
|
|
5
|
+
knowledge?: "user" | Own;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const assertDataAccess: <Own extends "agent" | "skill" | "workflow">(value: unknown, own: Own, location: string) => asserts value is DataAccess<Own> | undefined;
|
|
8
|
+
/** Internal manifest reader, sharing declaration admission rules. */
|
|
9
|
+
export declare const readDataAccess: <Own extends "agent" | "skill" | "workflow">(own: Own) => (value: unknown, location: string) => DataAccess<Own> | undefined;
|
|
10
|
+
/** Reconcile the declaration and pinned graph as one Workflow setting. */
|
|
11
|
+
export declare const workflowDataAccess: (outer: DataAccess<"workflow"> | undefined, inner: DataAccess<"workflow"> | undefined, location: string) => DataAccess<"workflow"> | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentDeclaration, SkillDeclaration } from "./agents.js";
|
|
2
2
|
import type { DomainDeclaration, DomainTemplateDeclaration, SkillTemplateDeclaration } from "./catalog.js";
|
|
3
|
+
import type { ConnectionInstanceDeclaration } from "./connection-instances.js";
|
|
3
4
|
import type { KnowledgeConnectorInstanceDeclaration, DatasetConnectorInstanceDeclaration } from "./connector-instances.js";
|
|
4
5
|
import type { ConnectionDeclaration, DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration, EmailProviderDeclaration, EventListenerDeclaration, DocumentsConnectorDeclaration, KnowledgeConnectorDeclaration, KnowledgeConnectorOAuthDeclaration, KnowledgeEntityAdapterDeclaration, KnowledgeRelationAdapterDeclaration, OrganizationSsoDeclaration, OutboundMessagingProviderDeclaration } from "./connectors.js";
|
|
5
6
|
import type { ExternalAppGatewayDeclaration } from "./external-app-gateway.js";
|
|
@@ -7,8 +8,9 @@ import type { ExternalApplicationDeclaration } from "./external-application.js";
|
|
|
7
8
|
import type { KnowledgeEntitySchemaDeclaration, KnowledgePolicyDeclaration, KnowledgeRelationSchemaDeclaration } from "./knowledge.js";
|
|
8
9
|
import type { OrganizationGroupDeclaration } from "./organization-group.js";
|
|
9
10
|
import type { OrganizationSettingsDeclaration } from "./organization-settings.js";
|
|
11
|
+
import type { ServicePrincipalDeclaration } from "./service-principal.js";
|
|
10
12
|
import type { StudioAppDeclaration, StudioAppTemplateDeclaration, StudioComponentDeclaration } from "./studio.js";
|
|
11
13
|
import type { DatasetBlueprintDeclaration, DatasetTableTemplateDeclaration } from "./templates.js";
|
|
12
14
|
import type { FieldTransformerDeclaration, NotificationChannelDeclaration, RemoteToolCollectionDeclaration, ToolCollectionDeclaration, ToolDeclaration, ToolSettingsOptionsDeclaration } from "./tools.js";
|
|
13
15
|
import type { WorkflowDeclaration, WorkflowFieldCollectionDeclaration, WorkflowFieldDeclaration, WorkflowNodeCollectionDeclaration, WorkflowNodeDeclaration, WorkflowTemplateDeclaration } from "./workflows.js";
|
|
14
|
-
export type PackagePrimitiveDeclaration = KnowledgeConnectorInstanceDeclaration | DatasetConnectorInstanceDeclaration | AgentDeclaration | OrganizationSsoDeclaration | KnowledgeEntityAdapterDeclaration | ConnectionDeclaration | DatasetParserDeclaration | DatasetBlueprintDeclaration | DatasetTableTemplateDeclaration | ExternalDatasetProviderDeclaration | ManagedDatasetProviderDeclaration | DocumentsConnectorDeclaration | KnowledgeConnectorDeclaration | KnowledgeConnectorOAuthDeclaration | DomainDeclaration | DomainTemplateDeclaration | EmailProviderDeclaration | EventListenerDeclaration | ExternalApplicationDeclaration | ExternalAppGatewayDeclaration | FieldTransformerDeclaration | KnowledgeEntitySchemaDeclaration | KnowledgePolicyDeclaration | KnowledgeRelationSchemaDeclaration | NotificationChannelDeclaration | OrganizationGroupDeclaration | OrganizationSettingsDeclaration | OutboundMessagingProviderDeclaration | RemoteToolCollectionDeclaration | KnowledgeRelationAdapterDeclaration | SkillDeclaration | SkillTemplateDeclaration | StudioAppDeclaration | StudioAppTemplateDeclaration | StudioComponentDeclaration | ToolCollectionDeclaration | ToolSettingsOptionsDeclaration | ToolDeclaration | WorkflowDeclaration | WorkflowFieldCollectionDeclaration | WorkflowFieldDeclaration | WorkflowNodeCollectionDeclaration | WorkflowNodeDeclaration | WorkflowTemplateDeclaration;
|
|
16
|
+
export type PackagePrimitiveDeclaration = ConnectionInstanceDeclaration | KnowledgeConnectorInstanceDeclaration | DatasetConnectorInstanceDeclaration | AgentDeclaration | OrganizationSsoDeclaration | KnowledgeEntityAdapterDeclaration | ConnectionDeclaration | DatasetParserDeclaration | DatasetBlueprintDeclaration | DatasetTableTemplateDeclaration | ExternalDatasetProviderDeclaration | ManagedDatasetProviderDeclaration | DocumentsConnectorDeclaration | KnowledgeConnectorDeclaration | KnowledgeConnectorOAuthDeclaration | DomainDeclaration | DomainTemplateDeclaration | EmailProviderDeclaration | EventListenerDeclaration | ExternalApplicationDeclaration | ExternalAppGatewayDeclaration | FieldTransformerDeclaration | KnowledgeEntitySchemaDeclaration | KnowledgePolicyDeclaration | KnowledgeRelationSchemaDeclaration | NotificationChannelDeclaration | OrganizationGroupDeclaration | OrganizationSettingsDeclaration | OutboundMessagingProviderDeclaration | RemoteToolCollectionDeclaration | KnowledgeRelationAdapterDeclaration | ServicePrincipalDeclaration | SkillDeclaration | SkillTemplateDeclaration | StudioAppDeclaration | StudioAppTemplateDeclaration | StudioComponentDeclaration | ToolCollectionDeclaration | ToolSettingsOptionsDeclaration | ToolDeclaration | WorkflowDeclaration | WorkflowFieldCollectionDeclaration | WorkflowFieldDeclaration | WorkflowNodeCollectionDeclaration | WorkflowNodeDeclaration | WorkflowTemplateDeclaration;
|
|
@@ -8,45 +8,93 @@ export type ExternalApplicationType = "confidential" | "public";
|
|
|
8
8
|
*/
|
|
9
9
|
export type ExternalApplicationConsent = "inherit" | "ask" | "skip";
|
|
10
10
|
export declare const externalApplicationConsents: readonly ["inherit", "ask", "skip"];
|
|
11
|
-
/** A User Class that an Application can admit. */
|
|
12
|
-
export type ExternalApplicationUserClass = "internal" | "external";
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The target list of one binding kind: `all`, or the FQNs of the targets. An
|
|
13
|
+
* omitted kind binds no target.
|
|
16
14
|
*/
|
|
17
|
-
export type
|
|
15
|
+
export type ExternalApplicationBindingTargets<Target> = "all" | readonly Target[];
|
|
16
|
+
/** A Knowledge Entity Schema or Domain, with an optional row policy. */
|
|
17
|
+
export type ExternalApplicationKnowledgeTarget = Readonly<{
|
|
18
|
+
fqn: string;
|
|
19
|
+
policy?: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** The resources that a role sees without a Grant to the user. */
|
|
22
|
+
export type ExternalApplicationDeclaredBindings = Readonly<{
|
|
23
|
+
agents?: ExternalApplicationBindingTargets<string>;
|
|
24
|
+
documents?: ExternalApplicationBindingTargets<string>;
|
|
25
|
+
knowledge?: Readonly<{
|
|
26
|
+
domains?: ExternalApplicationBindingTargets<ExternalApplicationKnowledgeTarget>;
|
|
27
|
+
schemas?: ExternalApplicationBindingTargets<ExternalApplicationKnowledgeTarget>;
|
|
28
|
+
}>;
|
|
29
|
+
skills?: ExternalApplicationBindingTargets<string>;
|
|
30
|
+
workflows?: ExternalApplicationBindingTargets<string>;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* The fields of every External App Role. `Key` is the union of the role keys
|
|
34
|
+
* of the same list and `UserKey` the union of the User Role keys; a manifest
|
|
35
|
+
* holds plain strings.
|
|
36
|
+
*/
|
|
37
|
+
export type ExternalApplicationRoleBase<Key extends string = string, UserKey extends string = string> = Readonly<{
|
|
38
|
+
/** Permissions that the application defines and checks itself. */
|
|
39
|
+
appPermissions?: readonly string[];
|
|
40
|
+
/** Keys of the User Roles that a holder of this role can assign. */
|
|
41
|
+
assignRoles?: readonly NoInfer<UserKey>[];
|
|
18
42
|
key: Key;
|
|
19
|
-
/** Key of the declared role that holds every permission of this role. */
|
|
43
|
+
/** Key of the declared role of the same kind that holds every permission of this role. */
|
|
20
44
|
parent?: NoInfer<Key>;
|
|
21
|
-
/** CI permissions, each one `resource:action
|
|
22
|
-
|
|
45
|
+
/** CI permissions, each one `resource:action`; resources may be namespaced. */
|
|
46
|
+
platformPermissions: readonly string[];
|
|
23
47
|
/** Key of a role that an earlier release declared and this one removed. */
|
|
24
48
|
replaces?: string;
|
|
49
|
+
/** `create: true` lets a holder of this role create External App Users. */
|
|
50
|
+
users?: Readonly<{
|
|
51
|
+
create: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* A User Role. User Visibility shows the resources granted to the user;
|
|
56
|
+
* Declared Visibility shows the `bindings` of the role.
|
|
57
|
+
*/
|
|
58
|
+
export type ExternalApplicationUserRole<Key extends string = string> = ExternalApplicationRoleBase<Key, Key> & (Readonly<{
|
|
59
|
+
visibility: "user";
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
bindings?: ExternalApplicationDeclaredBindings;
|
|
62
|
+
visibility: "declared";
|
|
63
|
+
}>);
|
|
64
|
+
/** A Server Role: the role of a call that the application server makes. */
|
|
65
|
+
export type ExternalApplicationServerRole<Key extends string = string, UserKey extends string = string> = ExternalApplicationRoleBase<Key, UserKey> & Readonly<{
|
|
66
|
+
bindings?: ExternalApplicationDeclaredBindings;
|
|
25
67
|
}>;
|
|
26
|
-
/** A
|
|
27
|
-
export type
|
|
28
|
-
/**
|
|
68
|
+
/** A Group Role Binding: the members of one Group hold one User Role. */
|
|
69
|
+
export type ExternalApplicationGroupBinding = Readonly<{
|
|
70
|
+
/** `direct` covers the members of the Group only; `inherited` (the default) also covers its subgroups. */
|
|
71
|
+
coverage?: "direct" | "inherited";
|
|
72
|
+
/** FQN of the Group, in any package. */
|
|
29
73
|
group: string;
|
|
30
74
|
lifecycle: LifecycleOptions;
|
|
31
|
-
/** Key of a declared
|
|
75
|
+
/** Key of a declared User Role of the application. */
|
|
32
76
|
role: string;
|
|
33
77
|
}>;
|
|
78
|
+
/**
|
|
79
|
+
* The access model of the application. It keeps its shape: a Variable
|
|
80
|
+
* Reference never stands in for one of its values.
|
|
81
|
+
*/
|
|
82
|
+
type ExternalApplicationAccess = Readonly<{
|
|
83
|
+
/** The Server Role of a server call that names no role; required with `serverRoles`. */
|
|
84
|
+
defaultServerRole?: string;
|
|
85
|
+
groupBindings?: readonly ExternalApplicationGroupBinding[];
|
|
86
|
+
serverRoles?: readonly ExternalApplicationServerRole[];
|
|
87
|
+
userRoles: readonly ExternalApplicationUserRole[];
|
|
88
|
+
}>;
|
|
34
89
|
/**
|
|
35
90
|
* Portable External App definition. Tokens and client secrets are never
|
|
36
91
|
* declared here; Dashboard rotate remains the credential path.
|
|
37
92
|
*/
|
|
38
|
-
export type ExternalApplicationDeclaration = PackagePrimitiveBase<"externalApplication"> & Readonly<{
|
|
39
|
-
/**
|
|
40
|
-
* Admitted Classes ceiling: the User Classes that an Organization admin
|
|
41
|
-
* can admit. When absent, the application admits internal users only.
|
|
42
|
-
*/
|
|
43
|
-
admits?: readonly ExternalApplicationUserClass[];
|
|
93
|
+
export type ExternalApplicationDeclaration = PackagePrimitiveBase<"externalApplication"> & ExternalApplicationAccess & Readonly<{
|
|
44
94
|
allowedOrigins: readonly string[];
|
|
45
95
|
applicationConsent?: ExternalApplicationConsent;
|
|
46
96
|
applicationType: ExternalApplicationType;
|
|
47
97
|
audience: string;
|
|
48
|
-
/** The Declared Grants of the application. */
|
|
49
|
-
grants?: readonly ExternalApplicationGrant[];
|
|
50
98
|
lifecycle: LifecycleOptions;
|
|
51
99
|
postLogoutRedirectUris: readonly string[];
|
|
52
100
|
/**
|
|
@@ -56,17 +104,17 @@ export type ExternalApplicationDeclaration = PackagePrimitiveBase<"externalAppli
|
|
|
56
104
|
primaryRedirectUri?: string;
|
|
57
105
|
/** Every accepted callback, including the primary redirect URI. */
|
|
58
106
|
redirectUris: readonly string[];
|
|
59
|
-
/** The role tree of the application. */
|
|
60
|
-
roles?: readonly ExternalApplicationRole[];
|
|
61
107
|
scopes: readonly string[];
|
|
62
108
|
setupInstructions?: string;
|
|
63
109
|
}>;
|
|
64
|
-
/** The access model of the application
|
|
65
|
-
export type ExternalApplicationAccessKey =
|
|
110
|
+
/** The fields of the access model of the application. */
|
|
111
|
+
export type ExternalApplicationAccessKey = keyof ExternalApplicationAccess;
|
|
66
112
|
/** The declaration as manifest readers admit it, before substitution. */
|
|
67
|
-
export type VaryingExternalApplication =
|
|
113
|
+
export type VaryingExternalApplication = ExternalApplicationAccess & VaryingDefinition<Omit<ExternalApplicationDeclaration, ExternalApplicationAccessKey>>;
|
|
68
114
|
/**
|
|
69
|
-
* Shared authoring and serialized admission invariant for callbacks, the
|
|
70
|
-
*
|
|
115
|
+
* Shared authoring and serialized admission invariant for callbacks, the
|
|
116
|
+
* User Roles, the Server Roles with their Default Server Role and the Group
|
|
117
|
+
* Role Bindings. A role violation starts with the field path of the role.
|
|
71
118
|
*/
|
|
72
|
-
export declare const externalApplicationViolation: ({
|
|
119
|
+
export declare const externalApplicationViolation: ({ applicationConsent, defaultServerRole, groupBindings, primaryRedirectUri, redirectUris, serverRoles, userRoles }: Pick<VaryingExternalApplication, "applicationConsent" | "defaultServerRole" | "groupBindings" | "primaryRedirectUri" | "redirectUris" | "serverRoles" | "userRoles">) => string | undefined;
|
|
120
|
+
export {};
|
|
@@ -48,6 +48,7 @@ export type KnowledgeFieldSemantics = Readonly<{
|
|
|
48
48
|
*/
|
|
49
49
|
mediaVisibility?: "private" | "protected" | "public";
|
|
50
50
|
queryGuidance?: string;
|
|
51
|
+
relation?: KnowledgeEntityRelationField;
|
|
51
52
|
unique?: boolean;
|
|
52
53
|
}>;
|
|
53
54
|
export type KnowledgeManagedProjection = Readonly<{
|
|
@@ -102,23 +103,60 @@ export type KnowledgeDisplayDefaults = Readonly<{
|
|
|
102
103
|
collections?: readonly string[];
|
|
103
104
|
details?: readonly string[];
|
|
104
105
|
}>;
|
|
105
|
-
/**
|
|
106
|
-
* Portable relation metadata retained inside an entity schema when a gateway
|
|
107
|
-
* projects references as fields rather than first-class relation edges.
|
|
108
|
-
*/
|
|
109
|
-
export type EntityRelationField = Readonly<{
|
|
110
|
-
cardinality: "many" | "one";
|
|
111
|
-
field: string;
|
|
112
|
-
id: string;
|
|
113
|
-
nullable: boolean;
|
|
114
|
-
reference: "external_id";
|
|
115
|
-
targetEntityId: string;
|
|
116
|
-
targetSchemaFqn: string;
|
|
117
|
-
}>;
|
|
118
106
|
export type KnowledgeAutocompleteFieldReference = Readonly<{
|
|
119
107
|
field: string;
|
|
120
108
|
scope: "data" | "entity";
|
|
121
109
|
}>;
|
|
110
|
+
/** A schema-aware filter over the fields of the target schema. */
|
|
111
|
+
type KnowledgeRelationBaseFilter = Readonly<{
|
|
112
|
+
caseSensitive?: boolean;
|
|
113
|
+
field: string;
|
|
114
|
+
operator: "contains" | "ends_with" | "eq" | "exists" | "gt" | "gte" | "in" | "is_empty" | "is_not_empty" | "lt" | "lte" | "ne" | "nin" | "not_contains" | "starts_with";
|
|
115
|
+
value: JsonValue;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Makes a top-level property of an entity schema an Entity Relation Field:
|
|
119
|
+
* its value holds Entity References to entities of exactly one target schema
|
|
120
|
+
* of the same organization. The schema does not define the property: the
|
|
121
|
+
* platform generates it. `onDelete` defaults to `clear`; without `maxItems` a
|
|
122
|
+
* list-shaped owner has no item limit. `display.fields` label a referenced entity,
|
|
123
|
+
* `autocomplete.fields` are searched when picking one and
|
|
124
|
+
* `autocomplete.baseFilters` (ANDed) limit the selectable targets.
|
|
125
|
+
*/
|
|
126
|
+
type KnowledgeOwnedRelationField = Readonly<{
|
|
127
|
+
autocomplete?: Readonly<{
|
|
128
|
+
baseFilters?: readonly KnowledgeRelationBaseFilter[];
|
|
129
|
+
fields?: readonly KnowledgeAutocompleteFieldReference[];
|
|
130
|
+
}>;
|
|
131
|
+
display?: Readonly<{
|
|
132
|
+
fields: readonly KnowledgeAutocompleteFieldReference[];
|
|
133
|
+
}>;
|
|
134
|
+
onDelete?: "clear" | "restrict";
|
|
135
|
+
targetSchemaFqn: string;
|
|
136
|
+
inverseOf?: never;
|
|
137
|
+
}> & (Readonly<{
|
|
138
|
+
cardinality: "one_to_one" | "many_to_one";
|
|
139
|
+
maxItems?: never;
|
|
140
|
+
}> | Readonly<{
|
|
141
|
+
cardinality: "one_to_many" | "many_to_many";
|
|
142
|
+
maxItems?: number;
|
|
143
|
+
}>);
|
|
144
|
+
/** A read-only projection of one owner field; the host resolves its target and shape. */
|
|
145
|
+
type KnowledgeInverseRelationField = Readonly<{
|
|
146
|
+
inverseOf: Readonly<{
|
|
147
|
+
schemaFqn: string;
|
|
148
|
+
field: string;
|
|
149
|
+
}>;
|
|
150
|
+
display?: Readonly<{
|
|
151
|
+
fields: readonly KnowledgeAutocompleteFieldReference[];
|
|
152
|
+
}>;
|
|
153
|
+
autocomplete?: never;
|
|
154
|
+
cardinality?: never;
|
|
155
|
+
maxItems?: never;
|
|
156
|
+
onDelete?: never;
|
|
157
|
+
targetSchemaFqn?: never;
|
|
158
|
+
}>;
|
|
159
|
+
export type KnowledgeEntityRelationField = KnowledgeOwnedRelationField | KnowledgeInverseRelationField;
|
|
122
160
|
export type KnowledgeAutocompleteConfiguration = Readonly<{
|
|
123
161
|
autocompleteFields: readonly KnowledgeAutocompleteFieldReference[];
|
|
124
162
|
defaultAutocompleteFields: readonly KnowledgeAutocompleteFieldReference[];
|
|
@@ -144,7 +182,6 @@ export type KnowledgeEntitySchemaDeclaration = PackagePrimitiveBase<"knowledgeEn
|
|
|
144
182
|
managedProjection?: KnowledgeManagedProjection;
|
|
145
183
|
maxVersionsExpirationDays?: number | null;
|
|
146
184
|
persistFullFieldContributions: boolean;
|
|
147
|
-
relationFields?: readonly EntityRelationField[];
|
|
148
185
|
schema: PackageSchemaProjection;
|
|
149
186
|
syncable?: boolean;
|
|
150
187
|
usableAsDocumentScope: boolean;
|
|
@@ -250,3 +287,4 @@ export type KnowledgePolicyBody = Readonly<{
|
|
|
250
287
|
subjectMatch: KnowledgePolicyPredicate;
|
|
251
288
|
rule?: KnowledgePolicyPredicate;
|
|
252
289
|
}>;
|
|
290
|
+
export {};
|
|
@@ -2,16 +2,18 @@ import type { VaryingDefinition, VaryingStructure } from "../package/variables.j
|
|
|
2
2
|
import type { PackageCodecSource, PackageDecoderSource } from "../schema/source.js";
|
|
3
3
|
import type { ClassDeclaration, ClassDeclaredComponent, ComponentManifest, ComponentPresentation, DeclarationHandle, DeclarationReference, DeclaredComponent, DecoderSource, MetadataComponentManifest } from "./authoring-core.js";
|
|
4
4
|
import type { DomainDeclaration, DomainTemplateDeclaration, SkillTemplateDeclaration } from "./catalog.js";
|
|
5
|
+
import type { ConnectionInstanceDeclaration } from "./connection-instances.js";
|
|
5
6
|
import type { KnowledgeConnectorInstanceDeclaration, DatasetConnectorInstanceDeclaration } from "./connector-instances.js";
|
|
6
7
|
import type { DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration } from "./connectors.js";
|
|
7
8
|
import type { DatasetParserImplementation } from "./dataset-parser.js";
|
|
8
9
|
import type { ExternalDatasetProviderImplementation, ManagedDatasetProviderImplementation } from "./datasets.js";
|
|
9
10
|
import type { ExternalAppGatewayDeclaration } from "./external-app-gateway.js";
|
|
10
|
-
import type { ExternalApplicationAccessKey, ExternalApplicationDeclaration,
|
|
11
|
+
import type { ExternalApplicationAccessKey, ExternalApplicationDeclaration, ExternalApplicationGroupBinding, ExternalApplicationServerRole, ExternalApplicationUserRole } from "./external-application.js";
|
|
11
12
|
import type { KnowledgeEntitySchemaDeclaration, KnowledgeFieldSemantics, KnowledgeFileFieldDeclaration, KnowledgePolicyDeclaration, KnowledgeRelationSchemaDeclaration } from "./knowledge.js";
|
|
12
13
|
import type { LifecycleOptions } from "./lifecycle.js";
|
|
13
14
|
import type { OrganizationGroupDeclaration } from "./organization-group.js";
|
|
14
15
|
import type { OrganizationSettingsDeclaration, VaryingOrganizationSettingsAuthentication, VaryingOrganizationSettingsSso } from "./organization-settings.js";
|
|
16
|
+
import type { ServicePrincipalDeclaration } from "./service-principal.js";
|
|
15
17
|
import type { StudioAppDeclaration, StudioAppDeclarationInput, StudioAppTemplateDeclaration, StudioComponentDeclaration } from "./studio.js";
|
|
16
18
|
import type { RemoteToolCollectionDeclaration, RemoteToolCollectionDefinition, ToolCollectionDeclaration } from "./tools.js";
|
|
17
19
|
import type { WorkflowDeclaration, WorkflowFieldCollectionDeclaration, WorkflowNodeCollectionDeclaration, WorkflowTemplateDeclaration, WorkflowTemplateGraphDefinition } from "./workflows.js";
|
|
@@ -34,20 +36,22 @@ export declare const declareExternalDatasetProvider: <Constructor extends new ()
|
|
|
34
36
|
export type DatasetParserClassDeclaration<Constructor extends new () => DatasetParserImplementation = new () => DatasetParserImplementation> = ClassDeclaration<DatasetParserDeclaration, Constructor>;
|
|
35
37
|
export declare const declareDatasetParser: <Constructor extends new () => DatasetParserImplementation>(input: DatasetParserClassDeclaration<Constructor>) => ClassDeclaredComponent<DatasetParserDeclaration, Constructor>;
|
|
36
38
|
export declare const declareDomainTemplate: (input: MetadataClassDeclaration<DomainTemplateDeclaration>) => DeclaredComponent<DomainTemplateDeclaration>;
|
|
37
|
-
type ExternalApplicationDefinitionInput<
|
|
38
|
-
|
|
39
|
+
type ExternalApplicationDefinitionInput<UserKey extends string, ServerKey extends string> = VaryingDefinition<Omit<MetadataDefinition<ExternalApplicationDeclaration>, ExternalApplicationAccessKey>> & Readonly<{
|
|
40
|
+
defaultServerRole?: NoInfer<ServerKey>;
|
|
41
|
+
groupBindings?: readonly (Omit<ExternalApplicationGroupBinding, "group" | "role"> & Readonly<{
|
|
39
42
|
group: DeclarationReference<"organizationGroup">;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
role: NoInfer<UserKey>;
|
|
44
|
+
}>)[];
|
|
45
|
+
serverRoles?: readonly ExternalApplicationServerRole<ServerKey, UserKey>[];
|
|
46
|
+
userRoles: readonly ExternalApplicationUserRole<UserKey>[];
|
|
44
47
|
}>;
|
|
45
48
|
/**
|
|
46
|
-
* Declares an external application. `
|
|
47
|
-
*
|
|
48
|
-
* role
|
|
49
|
+
* Declares an external application. `UserKey` and `ServerKey` are inferred
|
|
50
|
+
* from the `key` of each declared User Role and Server Role, so `parent`,
|
|
51
|
+
* `assignRoles`, `defaultServerRole` and the `role` of a Group Role Binding
|
|
52
|
+
* accept only a declared role key.
|
|
49
53
|
*/
|
|
50
|
-
export declare const declareExternalApplication: <
|
|
54
|
+
export declare const declareExternalApplication: <UserKey extends string, ServerKey extends string = never>(input: MetadataClassDeclaration<ExternalApplicationDeclaration, ExternalApplicationDefinitionInput<UserKey, ServerKey>>) => DeclaredComponent<ExternalApplicationDeclaration>;
|
|
51
55
|
type OrganizationGroupDefinitionInput = Omit<MetadataDefinition<OrganizationGroupDeclaration>, "parent"> & Readonly<{
|
|
52
56
|
parent?: DeclarationReference<"organizationGroup">;
|
|
53
57
|
}>;
|
|
@@ -69,6 +73,8 @@ export declare const declareOrganizationSettings: (input: MetadataClassDeclarati
|
|
|
69
73
|
export declare const declareSkillTemplate: (input: MetadataClassDeclaration<SkillTemplateDeclaration>) => DeclaredComponent<SkillTemplateDeclaration>;
|
|
70
74
|
/** Authored field semantics; File field entries come from `fileFields`. */
|
|
71
75
|
type KnowledgeFieldSemanticsInput = Readonly<Record<string, Omit<KnowledgeFieldSemantics, "file">>>;
|
|
76
|
+
/** Relation schemas take no File or relation field entries. */
|
|
77
|
+
type KnowledgeRelationFieldSemanticsInput = Readonly<Record<string, Omit<KnowledgeFieldSemantics, "file" | "relation">>>;
|
|
72
78
|
type KnowledgeEntityDefinitionInput<Schema> = Omit<MetadataDefinition<KnowledgeEntitySchemaDeclaration>, "fieldSemantics" | "schema"> & Readonly<{
|
|
73
79
|
fieldSemantics?: KnowledgeFieldSemanticsInput;
|
|
74
80
|
/** The File fields of the schema, by top-level property key. */
|
|
@@ -76,7 +82,7 @@ type KnowledgeEntityDefinitionInput<Schema> = Omit<MetadataDefinition<KnowledgeE
|
|
|
76
82
|
schema: DecoderSource<Schema>;
|
|
77
83
|
}>;
|
|
78
84
|
type KnowledgeRelationDefinitionInput<Schema> = Omit<MetadataDefinition<KnowledgeRelationSchemaDeclaration>, "fieldSemantics" | "schema" | "lifecycle"> & Readonly<{
|
|
79
|
-
fieldSemantics?:
|
|
85
|
+
fieldSemantics?: KnowledgeRelationFieldSemanticsInput;
|
|
80
86
|
lifecycle: LifecycleOptions;
|
|
81
87
|
schema: DecoderSource<Schema>;
|
|
82
88
|
}>;
|
|
@@ -115,4 +121,13 @@ type StudioComponentDefinitionInput<Schema> = Omit<MetadataDefinition<StudioComp
|
|
|
115
121
|
export declare const declareStudioComponent: <Schema>(input: MetadataClassDeclaration<StudioComponentDeclaration, StudioComponentDefinitionInput<Schema>>) => DeclaredComponent<StudioComponentDeclaration>;
|
|
116
122
|
export declare const declareKnowledgeConnectorInstance: (input: MetadataClassDeclaration<KnowledgeConnectorInstanceDeclaration, VaryingMetadataDefinition<KnowledgeConnectorInstanceDeclaration>>) => DeclaredComponent<KnowledgeConnectorInstanceDeclaration>;
|
|
117
123
|
export declare const declareDatasetConnectorInstance: (input: MetadataClassDeclaration<DatasetConnectorInstanceDeclaration, VaryingMetadataDefinition<DatasetConnectorInstanceDeclaration>>) => DeclaredComponent<DatasetConnectorInstanceDeclaration>;
|
|
124
|
+
/** Declares a service principal; Group ownership is checked when assembling the package. */
|
|
125
|
+
export declare const servicePrincipal: (input: Readonly<{
|
|
126
|
+
fqn: string;
|
|
127
|
+
name: string;
|
|
128
|
+
version: string;
|
|
129
|
+
organizationRole: ServicePrincipalDeclaration["organizationRole"];
|
|
130
|
+
groups: readonly DeclarationReference<"organizationGroup">[];
|
|
131
|
+
}>) => DeclaredComponent<ServicePrincipalDeclaration>;
|
|
132
|
+
export declare const declareConnectionInstance: (input: MetadataClassDeclaration<ConnectionInstanceDeclaration, VaryingMetadataDefinition<ConnectionInstanceDeclaration>>) => DeclaredComponent<ConnectionInstanceDeclaration>;
|
|
118
133
|
export {};
|
|
@@ -10,7 +10,7 @@ export type OrganizationSettingsLocalMethod = Readonly<{
|
|
|
10
10
|
domains?: readonly string[];
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
}>;
|
|
13
|
-
export type OrganizationSettingsSsoRole = "organization_admin" | "
|
|
13
|
+
export type OrganizationSettingsSsoRole = "organization_admin" | "organization_operator" | "organization_member";
|
|
14
14
|
/** One SSO provider of the Organization; credentials arrive through the slot. */
|
|
15
15
|
export type OrganizationSettingsSso = Readonly<{
|
|
16
16
|
connection: Readonly<{
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
2
|
+
import type { PackagePrimitiveDeclaration } from "./declaration.js";
|
|
3
|
+
/** The Organization Role held by a declared service principal. */
|
|
4
|
+
export declare const servicePrincipalOrganizationRoles: readonly ["organization_admin", "organization_operator", "organization_member"];
|
|
5
|
+
export type ServicePrincipalOrganizationRole = (typeof servicePrincipalOrganizationRoles)[number];
|
|
6
|
+
export type ServicePrincipalDeclaration = PackagePrimitiveBase<"servicePrincipal"> & Readonly<{
|
|
7
|
+
/** FQNs of Groups declared by this package, including nested subgroups. */
|
|
8
|
+
groups: readonly string[];
|
|
9
|
+
organizationRole: ServicePrincipalOrganizationRole;
|
|
10
|
+
}>;
|
|
11
|
+
/** Group membership is package-local, regardless of the spelling of an FQN. */
|
|
12
|
+
export declare const assertServicePrincipalGroups: (primitives: readonly PackagePrimitiveDeclaration[]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonObject } from "../foundation/json.js";
|
|
1
|
+
import type { JsonObject, JsonValue } from "../foundation/json.js";
|
|
2
2
|
import type { PortableFormDefinition } from "../schema/forms.js";
|
|
3
3
|
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
4
4
|
import type { DeclarationReference } from "./authoring-core.js";
|
|
@@ -11,6 +11,21 @@ export type ToolGuidance = Readonly<{
|
|
|
11
11
|
inputRequirementsSummary?: string;
|
|
12
12
|
useWhen?: string;
|
|
13
13
|
}>;
|
|
14
|
+
/** One unit of display data a tool returns next to its output; it never reaches the model. */
|
|
15
|
+
export type ToolDisplayPart = Readonly<{
|
|
16
|
+
data: JsonValue;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
metadata?: JsonObject;
|
|
19
|
+
title?: string | null;
|
|
20
|
+
type: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const toolResultBrand: unique symbol;
|
|
23
|
+
/** A branded tool result that carries Display Parts next to its output. */
|
|
24
|
+
export type ToolResultWithDisplay<Output> = Readonly<{
|
|
25
|
+
[toolResultBrand]: true;
|
|
26
|
+
displayParts: readonly ToolDisplayPart[];
|
|
27
|
+
output: Output;
|
|
28
|
+
}>;
|
|
14
29
|
/** A companion tool bound alongside the declaring tool, e.g. a catalog lookup. */
|
|
15
30
|
export type ToolExtraLoader = Readonly<{
|
|
16
31
|
bindingName: string;
|
|
@@ -123,6 +138,8 @@ export type ToolSettingsOptionPage = Readonly<{
|
|
|
123
138
|
options: readonly ToolSettingsOption[];
|
|
124
139
|
}>;
|
|
125
140
|
export type ToolSettingsOptionsContext = Readonly<{
|
|
141
|
+
/** Eligible image-output choices projected by the authorized Host; no runtime authority. */
|
|
142
|
+
imageModelOptions?: readonly Readonly<Pick<ToolSettingsOption, "id" | "label">>[];
|
|
126
143
|
connectionCatalogs: Readonly<Record<string, JsonObject>>;
|
|
127
144
|
connectionCredentials: Readonly<Record<string, Readonly<Record<string, string | null>>>>;
|
|
128
145
|
dependencies: JsonObject;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Well-known ids of the built-in workflow code runtimes. Every Collective
|
|
3
|
+
* Intelligence deployment seeds them, so a package `code-block` node sets its
|
|
4
|
+
* `runtimeId` to one of these instead of a per-deployment id.
|
|
5
|
+
*/
|
|
6
|
+
export declare const builtInCodeRuntimeIds: {
|
|
7
|
+
/** JavaScript on Node.js 24. */
|
|
8
|
+
readonly node24: "65eda637-e41c-43ea-81aa-0596439e8513";
|
|
9
|
+
/** Python 3.12. */
|
|
10
|
+
readonly python312: "ff5aca6d-99b3-40cc-bccb-37951b919bcb";
|
|
11
|
+
};
|
|
@@ -70,6 +70,11 @@ export type PackageWorkflowNodeDirective = Readonly<{
|
|
|
70
70
|
skillId: string;
|
|
71
71
|
}> | Readonly<{
|
|
72
72
|
directive: "run_code";
|
|
73
|
+
/**
|
|
74
|
+
* `trusted` asks for the host's trusted JavaScript runner. The engine
|
|
75
|
+
* decides from its own records whether the workflow may use it.
|
|
76
|
+
*/
|
|
77
|
+
execution?: "isolated" | "trusted";
|
|
73
78
|
language: "javascript" | "python";
|
|
74
79
|
runtimeId: string;
|
|
75
80
|
source: string;
|
|
@@ -2,6 +2,7 @@ import type { JsonObject, JsonValue } from "../foundation/json.js";
|
|
|
2
2
|
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
3
3
|
import type { PackagePrimitiveBase } from "./base.js";
|
|
4
4
|
import type { CatalogTags } from "./catalog.js";
|
|
5
|
+
import type { DataAccess } from "./data-access.js";
|
|
5
6
|
import type { LocalizedFieldText } from "./knowledge.js";
|
|
6
7
|
import type { LifecycleOptions } from "./lifecycle.js";
|
|
7
8
|
export type WorkflowNodeDeclaration = PackagePrimitiveBase<"workflowNode"> & Readonly<{
|
|
@@ -435,6 +436,7 @@ export type WorkflowAuthoringEdge = Readonly<{
|
|
|
435
436
|
target: WorkflowAuthoringEdgeTarget;
|
|
436
437
|
}>;
|
|
437
438
|
export type WorkflowAuthoringDefinition = Readonly<{
|
|
439
|
+
dataAccess?: DataAccess<"workflow">;
|
|
438
440
|
edges: readonly WorkflowAuthoringEdge[];
|
|
439
441
|
inputBoundary: WorkflowAuthoringTemplateRef;
|
|
440
442
|
inputContract: WorkflowAuthoringInputContract;
|
|
@@ -446,6 +448,7 @@ export type WorkflowAuthoringDefinition = Readonly<{
|
|
|
446
448
|
version: 1;
|
|
447
449
|
}>;
|
|
448
450
|
export type WorkflowDeclaration = PackagePrimitiveBase<"workflow"> & Readonly<{
|
|
451
|
+
dataAccess?: DataAccess<"workflow">;
|
|
449
452
|
definition: WorkflowAuthoringDefinition;
|
|
450
453
|
lifecycle: LifecycleOptions;
|
|
451
454
|
name: string;
|