@collective-intelligence/extensions-sdk 0.0.0-stage → 0.1.1
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 +1276 -2
- package/dist/components/agents.d.ts +155 -0
- package/dist/components/authoring-core.d.ts +253 -0
- package/dist/components/base.d.ts +25 -0
- package/dist/components/catalog.d.ts +21 -0
- package/dist/components/connections.d.ts +52 -0
- package/dist/components/connector-instances.d.ts +142 -0
- package/dist/components/connectors.d.ts +408 -0
- package/dist/components/dataset-parser-validation.d.ts +2 -0
- package/dist/components/dataset-parser.d.ts +74 -0
- package/dist/components/datasets.d.ts +356 -0
- package/dist/components/declaration.d.ts +12 -0
- package/dist/components/executable-authoring.d.ts +27 -0
- package/dist/components/external-app-gateway.d.ts +7 -0
- package/dist/components/external-application.d.ts +17 -0
- package/dist/components/fields.d.ts +34 -0
- package/dist/components/knowledge-remote-reference.d.ts +7 -0
- package/dist/components/knowledge.d.ts +188 -0
- package/dist/components/lifecycle.d.ts +7 -0
- package/dist/components/metadata-authoring.d.ts +66 -0
- package/dist/components/notification-channel-capabilities.d.ts +7 -0
- package/dist/components/remote-tool-collection.d.ts +3 -0
- package/dist/components/studio.d.ts +48 -0
- package/dist/components/templates.d.ts +50 -0
- package/dist/components/tools.d.ts +138 -0
- package/dist/components/workflow-editor.d.ts +28 -0
- package/dist/components/workflow-node-authoring.d.ts +4 -0
- package/dist/components/workflow-ports.d.ts +26 -0
- package/dist/components/workflow-results.d.ts +75 -0
- package/dist/components/workflow-rules.d.ts +20 -0
- package/dist/components/workflow-schema.d.ts +22 -0
- package/dist/components/workflows.d.ts +529 -0
- package/dist/foundation/json.d.ts +8 -0
- package/dist/foundation/string-order.d.ts +2 -0
- package/dist/gateway/declarations.d.ts +69 -0
- package/dist/gateway/operation-contract.d.ts +29 -0
- package/dist/hosted/contributions.d.ts +52 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +1 -0
- package/dist/package/canonical.d.ts +9 -0
- package/dist/package/connector-readers.d.ts +171 -0
- package/dist/package/definition.d.ts +31 -0
- package/dist/package/dependencies.d.ts +10 -0
- package/dist/package/instance-readers.d.ts +4 -0
- package/dist/package/knowledge-readers.d.ts +137 -0
- package/dist/package/manifest.d.ts +42 -0
- package/dist/package/parse-manifest.d.ts +3 -0
- package/dist/package/policy-readers.d.ts +17 -0
- package/dist/package/presentation-readers.d.ts +61 -0
- package/dist/package/primitive-readers.d.ts +678 -0
- package/dist/package/readers.d.ts +230 -0
- package/dist/package/template-readers.d.ts +37 -0
- package/dist/package/workflow-readers.d.ts +167 -0
- package/dist/release/archive.d.ts +11 -0
- package/dist/release/manifest.d.ts +66 -0
- package/dist/release/paths.d.ts +5 -0
- package/dist/release/stored-manifest.d.ts +13 -0
- package/dist/schema/forms.d.ts +117 -0
- package/dist/schema/knowledge-record.d.ts +16 -0
- package/dist/schema/normalization.d.ts +7 -0
- package/dist/schema/profiles.d.ts +45 -0
- package/dist/schema/projection.d.ts +59 -0
- package/dist/schema/source.d.ts +65 -0
- package/package.json +46 -4
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { JsonObject } from "../foundation/json.js";
|
|
2
|
+
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
3
|
+
import type { PackageCodecSource } from "../schema/source.js";
|
|
4
|
+
import type { ComponentManifest, ComponentPresentation, DeclarationReference, DeclaredComponent } from "./authoring-core.js";
|
|
5
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
6
|
+
import type { LifecycleOptions } from "./lifecycle.js";
|
|
7
|
+
/** Idle activation sources. Each stays off unless declared `true`. */
|
|
8
|
+
export type AgentActivityPolicy = Readonly<{
|
|
9
|
+
heartbeat: boolean;
|
|
10
|
+
schedule: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Approval of a bound tool's calls, as the binding's approval configuration
|
|
14
|
+
* holds it. A rule is named; install resolves the Organization's rule of that
|
|
15
|
+
* name and rejects the package when none exists.
|
|
16
|
+
*/
|
|
17
|
+
export type ToolBindingApproval = "always" | "never" | Readonly<{
|
|
18
|
+
rule: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** Knowledge definitions a binding includes or excludes, by reference. */
|
|
21
|
+
export type KnowledgeScopeSelection<Reference> = Readonly<{
|
|
22
|
+
exclude?: readonly Reference[];
|
|
23
|
+
include?: readonly Reference[];
|
|
24
|
+
}>;
|
|
25
|
+
type KnowledgeScopeOf<Domain, EntitySchema, RelationSchema> = Readonly<{
|
|
26
|
+
domains?: KnowledgeScopeSelection<Domain>;
|
|
27
|
+
entitySchemas?: KnowledgeScopeSelection<EntitySchema>;
|
|
28
|
+
relationSchemas?: KnowledgeScopeSelection<RelationSchema>;
|
|
29
|
+
/** Lifts the scope boundary; the installer still needs the bind permission. */
|
|
30
|
+
unrestricted?: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Portable Knowledge boundary of a binding. Install resolves each reference
|
|
34
|
+
* to the Organization's definition and rejects one that does not resolve, or
|
|
35
|
+
* a boundary on a tool that has no Knowledge scope.
|
|
36
|
+
*/
|
|
37
|
+
export type ToolBindingKnowledgeScope = KnowledgeScopeOf<DeclarationReference<"domain">, DeclarationReference<"knowledgeEntitySchema">, DeclarationReference<"knowledgeRelationSchema">>;
|
|
38
|
+
/**
|
|
39
|
+
* One tool an Agent or Skill binds, with the controls the binding carries.
|
|
40
|
+
* `settings` is validated at install against the tool's binding settings
|
|
41
|
+
* form. A tool may be bound several times under distinct `name`s.
|
|
42
|
+
*/
|
|
43
|
+
export type ToolBinding = Readonly<{
|
|
44
|
+
approval?: ToolBindingApproval;
|
|
45
|
+
knowledge?: ToolBindingKnowledgeScope;
|
|
46
|
+
name?: string;
|
|
47
|
+
settings?: JsonObject;
|
|
48
|
+
tool: DeclarationReference<"tool">;
|
|
49
|
+
}>;
|
|
50
|
+
/** A `ToolBinding` in a manifest: every reference is an FQN. */
|
|
51
|
+
export type ToolBindingDeclaration = Readonly<{
|
|
52
|
+
approval?: ToolBindingApproval;
|
|
53
|
+
knowledge?: KnowledgeScopeOf<string, string, string>;
|
|
54
|
+
name?: string;
|
|
55
|
+
settings?: JsonObject;
|
|
56
|
+
tool: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Declared tool bindings. Manifests published before bindings carried
|
|
60
|
+
* controls list bare tool FQNs; readers keep accepting them.
|
|
61
|
+
*/
|
|
62
|
+
export type DeclaredToolBindings = readonly (string | ToolBindingDeclaration)[];
|
|
63
|
+
/** The binding a manifest entry declares; a bare FQN binds without controls. */
|
|
64
|
+
export declare const toolBindingDeclaration: (entry: string | ToolBindingDeclaration) => ToolBindingDeclaration;
|
|
65
|
+
/** The first binding that repeats a `(tool, name)` pair, if any. */
|
|
66
|
+
export declare const duplicateToolBinding: (tools: DeclaredToolBindings) => ToolBindingDeclaration | undefined;
|
|
67
|
+
/** Organization members an Agent may converse with: none, the ones administrators select, or every member. */
|
|
68
|
+
export type AgentMemberAudience = "all" | "none" | "selected";
|
|
69
|
+
/**
|
|
70
|
+
* Code maximum of who may converse with an Agent, per caller class.
|
|
71
|
+
* Administrators select concrete users and Organization Teams within it and
|
|
72
|
+
* may only narrow it. Omitted fields admit nobody of that class.
|
|
73
|
+
*/
|
|
74
|
+
export type AgentAudience<Application = DeclarationReference<"externalApplication">> = Readonly<{
|
|
75
|
+
/** Opt-in: anonymous visitors that an allowed application brings may converse. */
|
|
76
|
+
anonymous?: boolean;
|
|
77
|
+
/** Applications that may invoke the Agent as a service or bring visitors. */
|
|
78
|
+
applications?: readonly Application[];
|
|
79
|
+
members?: AgentMemberAudience;
|
|
80
|
+
/** "selected": administrators may admit Organization Teams. */
|
|
81
|
+
organizationTeams?: "none" | "selected";
|
|
82
|
+
}>;
|
|
83
|
+
/** An `AgentAudience` in a manifest: applications are FQNs. */
|
|
84
|
+
export type AgentAudienceDeclaration = AgentAudience<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The rule a declared audience breaks, if any: visitors always arrive through
|
|
87
|
+
* an application, and an application is listed at most once.
|
|
88
|
+
*/
|
|
89
|
+
export declare const agentAudienceViolation: (audience: AgentAudienceDeclaration) => string | undefined;
|
|
90
|
+
/** Standard Organization model tiers, most capable first. */
|
|
91
|
+
export declare const agentModelTiers: readonly ["complex", "balanced", "fast", "super_fast"];
|
|
92
|
+
export type AgentModelTier = (typeof agentModelTiers)[number];
|
|
93
|
+
/**
|
|
94
|
+
* Portable Organization Agent. The Role fields become the system prompt; held
|
|
95
|
+
* `skills` and own `tools` are FQN references resolved at install.
|
|
96
|
+
*/
|
|
97
|
+
export type AgentDeclaration = PackagePrimitiveBase<"agent"> & Readonly<{
|
|
98
|
+
activity?: AgentActivityPolicy;
|
|
99
|
+
audience?: AgentAudienceDeclaration;
|
|
100
|
+
behavioralBoundaries: readonly string[];
|
|
101
|
+
lifecycle: LifecycleOptions;
|
|
102
|
+
/** Step limit; omitted uses the CI safety-limit setting. */
|
|
103
|
+
maxSteps?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Organization model tier the Agent runs on, resolved from the
|
|
106
|
+
* Organization's model defaults; omitted runs on `balanced`.
|
|
107
|
+
*/
|
|
108
|
+
modelTier?: AgentModelTier;
|
|
109
|
+
objectives: readonly string[];
|
|
110
|
+
operatingInstructions: string;
|
|
111
|
+
output?: Readonly<{
|
|
112
|
+
schema: PackageSchemaProjection;
|
|
113
|
+
}>;
|
|
114
|
+
responsibility: string;
|
|
115
|
+
skills: readonly string[];
|
|
116
|
+
tools: DeclaredToolBindings;
|
|
117
|
+
}>;
|
|
118
|
+
/** Portable governed Skill held by Agents and loaded on demand. */
|
|
119
|
+
export type SkillDeclaration = PackagePrimitiveBase<"skill"> & Readonly<{
|
|
120
|
+
instructions: string;
|
|
121
|
+
lifecycle: LifecycleOptions;
|
|
122
|
+
tools: DeclaredToolBindings;
|
|
123
|
+
}>;
|
|
124
|
+
type DefinitionOf<Manifest> = Omit<Manifest, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version">;
|
|
125
|
+
type Declaration<Definition> = Readonly<{
|
|
126
|
+
definition: Definition;
|
|
127
|
+
manifest: ComponentManifest;
|
|
128
|
+
presentation: ComponentPresentation;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* `skills`, `tools` and `audience.applications` take same-package handles or
|
|
132
|
+
* FQN strings. Strings are resolved at install, not at compile time: an
|
|
133
|
+
* unknown Skill, tool or application rejects the package. A `tools` entry may
|
|
134
|
+
* be a `ToolBinding` that adds the binding's controls.
|
|
135
|
+
*/
|
|
136
|
+
export type AgentDefinitionInput = Omit<DefinitionOf<AgentDeclaration>, "audience" | "output" | "skills" | "tools"> & Readonly<{
|
|
137
|
+
audience?: AgentAudience;
|
|
138
|
+
output?: Readonly<{
|
|
139
|
+
schema: PackageCodecSource;
|
|
140
|
+
}>;
|
|
141
|
+
skills: readonly DeclarationReference<"skill">[];
|
|
142
|
+
tools: readonly (DeclarationReference<"tool"> | ToolBinding)[];
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* `tools` take same-package handles, FQN strings resolved at install, or
|
|
146
|
+
* `ToolBinding`s, exactly as an Agent's do.
|
|
147
|
+
*/
|
|
148
|
+
export type SkillDefinitionInput = Omit<DefinitionOf<SkillDeclaration>, "tools"> & Readonly<{
|
|
149
|
+
tools: readonly (DeclarationReference<"tool"> | ToolBinding)[];
|
|
150
|
+
}>;
|
|
151
|
+
/** Declares an Organization Agent materialized by package install. */
|
|
152
|
+
export declare const declareAgent: (input: Declaration<AgentDefinitionInput>) => DeclaredComponent<AgentDeclaration>;
|
|
153
|
+
/** Declares a governed Skill materialized by package install. */
|
|
154
|
+
export declare const declareSkill: (input: Declaration<SkillDefinitionInput>) => DeclaredComponent<SkillDeclaration>;
|
|
155
|
+
export {};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import type { JsonValue } from "../foundation/json.js";
|
|
2
|
+
import type { FormDefinition, FormSchemaSource, PortableFormDefinition } from "../schema/forms.js";
|
|
3
|
+
import type { ConsumerProfileId } from "../schema/profiles.js";
|
|
4
|
+
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
5
|
+
import type { PackageCodec, PackageCodecSource, PackageDecoder, PackageDecoderSource, PackageSchemaSource, SchemaDirection, SchemaValue } from "../schema/source.js";
|
|
6
|
+
import type { PackagePrimitiveKind } from "./base.js";
|
|
7
|
+
import type { DocumentsDeltaPage, DocumentsDeltaRequest, DocumentsDrivesPage, DocumentsFoldersPage, DocumentsFetchedContent, DocumentsRootAncestry, DocumentsSource, KnowledgeEntityAdapterDeclaration, ConnectionDeclaration, DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration, DocumentsConnectorDeclaration, KnowledgeConnectorDeclaration, KnowledgeConnectorOAuthDeclaration, EventListenerDeclaration, OrganizationSsoDeclaration, KnowledgeRelationAdapterDeclaration } from "./connectors.js";
|
|
8
|
+
import type { PackagePrimitiveDeclaration } from "./declaration.js";
|
|
9
|
+
import type { FieldOption, FieldOptionPage } from "./fields.js";
|
|
10
|
+
import type { FieldTransformerDeclaration, NotificationChannelDeclaration, ToolDeclaration, ToolSettingsOptionsDeclaration } from "./tools.js";
|
|
11
|
+
import type { WorkflowEditorOverrides, WorkflowFieldDeclaration, WorkflowFieldContract, WorkflowNodeContract, WorkflowNodePortDeclaration, WorkflowNodeDeclaration, WorkflowOutputChannelDeclaration, WorkflowPortSchemaResolution } from "./workflows.js";
|
|
12
|
+
/** Identity is the only data stored in an executable component manifest. */
|
|
13
|
+
export type ComponentManifest = Readonly<{
|
|
14
|
+
fqn: string;
|
|
15
|
+
version: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** Shared catalog metadata, deliberately separate from executable semantics. */
|
|
18
|
+
export type ComponentPresentation = Readonly<{
|
|
19
|
+
description?: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
icon?: string;
|
|
22
|
+
tags?: readonly string[];
|
|
23
|
+
}>;
|
|
24
|
+
export type PackageSchemaRuntimeSidecar = Readonly<{
|
|
25
|
+
direction: SchemaDirection;
|
|
26
|
+
location: string;
|
|
27
|
+
profile: ConsumerProfileId;
|
|
28
|
+
source: PackageDecoderSource;
|
|
29
|
+
}>;
|
|
30
|
+
export type DeclaredComponent<Manifest> = Readonly<{
|
|
31
|
+
manifest: Manifest;
|
|
32
|
+
schemaSidecars: readonly PackageSchemaRuntimeSidecar[];
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* What a same-package declaration helper returns, typed by primitive kind.
|
|
36
|
+
* Pass it where a declaration references a primitive of that kind.
|
|
37
|
+
*/
|
|
38
|
+
export type DeclarationHandle<Kind extends PackagePrimitiveKind> = DeclaredComponent<Readonly<{
|
|
39
|
+
fqn: string;
|
|
40
|
+
kind: Kind;
|
|
41
|
+
}>>;
|
|
42
|
+
/**
|
|
43
|
+
* A reference to a primitive of `Kind`: a same-package handle or the FQN of a
|
|
44
|
+
* primitive that another package declares, including a built-in. TypeScript
|
|
45
|
+
* checks the handle's kind only; a string is not validated statically. The
|
|
46
|
+
* installer resolves every reference against the installed catalog and
|
|
47
|
+
* rejects one that does not resolve.
|
|
48
|
+
*/
|
|
49
|
+
export type DeclarationReference<Kind extends PackagePrimitiveKind> = DeclarationHandle<Kind> | string;
|
|
50
|
+
/** The FQN a reference points at; manifests store references as FQNs. */
|
|
51
|
+
export declare const referenceFqn: (reference: DeclarationReference<PackagePrimitiveKind>) => string;
|
|
52
|
+
export type ExecutableManifest = DatasetParserDeclaration | ExternalDatasetProviderDeclaration | ManagedDatasetProviderDeclaration | OrganizationSsoDeclaration | KnowledgeEntityAdapterDeclaration | ConnectionDeclaration | DocumentsConnectorDeclaration | KnowledgeConnectorDeclaration | KnowledgeConnectorOAuthDeclaration | EventListenerDeclaration | ToolDeclaration | ToolSettingsOptionsDeclaration | WorkflowFieldDeclaration | WorkflowNodeDeclaration;
|
|
53
|
+
export type MetadataComponentManifest = Exclude<PackagePrimitiveDeclaration, ExecutableManifest>;
|
|
54
|
+
export type DefinitionInput<Manifest> = Omit<Manifest, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version">;
|
|
55
|
+
export type ClassDeclaration<Manifest, Constructor extends new () => object, Definition = DefinitionInput<Manifest>> = Readonly<{
|
|
56
|
+
definition: Definition;
|
|
57
|
+
implementation: Constructor & Readonly<{
|
|
58
|
+
prototype: InstanceType<Constructor>;
|
|
59
|
+
}>;
|
|
60
|
+
manifest: ComponentManifest;
|
|
61
|
+
presentation: ComponentPresentation;
|
|
62
|
+
}>;
|
|
63
|
+
export type Awaitable<Value> = PromiseLike<Value> | Value;
|
|
64
|
+
export type ToolImplementation<Input, Output> = Readonly<{
|
|
65
|
+
execute(input: Input, context: unknown): Awaitable<Output>;
|
|
66
|
+
}>;
|
|
67
|
+
export type ConnectionImplementation<Credentials> = Readonly<{
|
|
68
|
+
discover?(credentials: Credentials, context: unknown): unknown;
|
|
69
|
+
test?(credentials: Credentials, context: unknown): unknown;
|
|
70
|
+
}>;
|
|
71
|
+
export type DocumentsConnectorImplementation = Readonly<{
|
|
72
|
+
deltaPage(input: DocumentsDeltaRequest, context: unknown): Awaitable<DocumentsDeltaPage>;
|
|
73
|
+
proveRootAncestry(input: {
|
|
74
|
+
readonly rootRemoteId: string;
|
|
75
|
+
}, context: unknown): Awaitable<DocumentsRootAncestry>;
|
|
76
|
+
listDrives(input: {
|
|
77
|
+
readonly cursor?: string;
|
|
78
|
+
}, context: unknown): Awaitable<DocumentsDrivesPage>;
|
|
79
|
+
listFolders(input: {
|
|
80
|
+
readonly parentRemoteId: string;
|
|
81
|
+
readonly cursor?: string;
|
|
82
|
+
}, context: unknown): Awaitable<DocumentsFoldersPage>;
|
|
83
|
+
fetchContent(input: {
|
|
84
|
+
readonly contentRevision: string;
|
|
85
|
+
readonly remoteFileId: string;
|
|
86
|
+
}, context: unknown): Awaitable<DocumentsFetchedContent>;
|
|
87
|
+
/**
|
|
88
|
+
* Read live source metadata without downloading bytes or changing a Version.
|
|
89
|
+
* Optional for older connectors; null explicitly clears a previous source.
|
|
90
|
+
* Hosts can use this for existing imports even when no delta item is emitted.
|
|
91
|
+
*/
|
|
92
|
+
fetchSource?(input: {
|
|
93
|
+
readonly remoteFileId: string;
|
|
94
|
+
}, context: unknown): Awaitable<DocumentsSource | null>;
|
|
95
|
+
pull(input: {
|
|
96
|
+
readonly cursor?: string;
|
|
97
|
+
readonly selectedRootRemoteIds?: readonly string[];
|
|
98
|
+
}, context: unknown): Awaitable<{
|
|
99
|
+
readonly items: readonly {
|
|
100
|
+
readonly contentHash?: string;
|
|
101
|
+
readonly contentRevision?: string;
|
|
102
|
+
readonly deleted?: boolean;
|
|
103
|
+
readonly kind: "file" | "folder";
|
|
104
|
+
readonly parentRemoteIds: readonly string[];
|
|
105
|
+
readonly remoteFileId: string;
|
|
106
|
+
readonly title: string;
|
|
107
|
+
}[];
|
|
108
|
+
readonly nextCursor?: string;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
111
|
+
export type KnowledgeConnectorImplementation = object;
|
|
112
|
+
export type KnowledgeConnectorOAuthImplementation = Readonly<{
|
|
113
|
+
authorizeUrl(...input: never[]): unknown;
|
|
114
|
+
exchangeCode(...input: never[]): unknown;
|
|
115
|
+
}>;
|
|
116
|
+
export type WorkflowNodeImplementation<Input, Output> = Readonly<{
|
|
117
|
+
execute(input: Input, context: unknown): Awaitable<Readonly<{
|
|
118
|
+
outputs: Output;
|
|
119
|
+
}> | Readonly<{
|
|
120
|
+
directive: string;
|
|
121
|
+
}>>;
|
|
122
|
+
}>;
|
|
123
|
+
export type WorkflowFieldImplementation<Value extends JsonValue, OptionValue extends JsonValue> = Readonly<{
|
|
124
|
+
canonicalize(value: Value, ...input: never[]): Awaitable<Value>;
|
|
125
|
+
getOptions(...input: never[]): Awaitable<readonly FieldOption<OptionValue>[] | FieldOptionPage<OptionValue>>;
|
|
126
|
+
readonly supportsOptionPaging: boolean;
|
|
127
|
+
}>;
|
|
128
|
+
export type ErasedWorkflowFieldImplementation = Pick<WorkflowFieldImplementation<JsonValue, JsonValue>, "supportsOptionPaging">;
|
|
129
|
+
export type EventListenerImplementation = Readonly<{
|
|
130
|
+
broadRouteKeys(): Readonly<Record<string, string>>;
|
|
131
|
+
canonicalSelector(selector: never): unknown;
|
|
132
|
+
routeKeys(selector: never): Readonly<Record<string, string>>;
|
|
133
|
+
}>;
|
|
134
|
+
export type KnowledgeEntityAdapterImplementation = Readonly<{
|
|
135
|
+
remoteId(...input: never[]): string | PromiseLike<string>;
|
|
136
|
+
toLocal(...input: never[]): unknown;
|
|
137
|
+
toRemote(...input: never[]): unknown;
|
|
138
|
+
}>;
|
|
139
|
+
export type KnowledgeRelationAdapterImplementation = Readonly<{
|
|
140
|
+
remoteId(...input: never[]): string | PromiseLike<string>;
|
|
141
|
+
sourceRef(...input: never[]): unknown;
|
|
142
|
+
targetRef(...input: never[]): unknown;
|
|
143
|
+
toLocal(...input: never[]): unknown;
|
|
144
|
+
}>;
|
|
145
|
+
export type FieldTransformerImplementation = Readonly<{
|
|
146
|
+
transform(...input: never[]): unknown;
|
|
147
|
+
}>;
|
|
148
|
+
export type ToolSettingsOptionsImplementation = Readonly<{
|
|
149
|
+
getOptions(...input: never[]): unknown;
|
|
150
|
+
}>;
|
|
151
|
+
export type NotificationChannelImplementation = Readonly<{
|
|
152
|
+
deliver(message: unknown, context: unknown): unknown;
|
|
153
|
+
}>;
|
|
154
|
+
export type ToolImplementationConstructor<Input = unknown, Output = unknown> = new () => ToolImplementation<Input, Output>;
|
|
155
|
+
export type WorkflowNodeImplementationConstructor<Input = unknown, Output = unknown> = new () => WorkflowNodeImplementation<Input, Output>;
|
|
156
|
+
export type WorkflowFieldContractInput<Schema> = Omit<WorkflowFieldContract, "availableForOutput" | "valueSchema"> & (Readonly<{
|
|
157
|
+
availableForOutput: true;
|
|
158
|
+
valueSchema: CodecSource<Schema>;
|
|
159
|
+
}> | Readonly<{
|
|
160
|
+
availableForOutput?: false;
|
|
161
|
+
valueSchema?: DecoderSource<Schema>;
|
|
162
|
+
}>);
|
|
163
|
+
export type WorkflowFieldDefinitionInput<Schema> = Omit<DefinitionInput<WorkflowFieldDeclaration>, "contract"> & Readonly<{
|
|
164
|
+
contract: WorkflowFieldContractInput<Schema>;
|
|
165
|
+
}>;
|
|
166
|
+
export type WorkflowFieldValue<Schema> = Schema extends PackageSchemaSource<unknown, infer Value extends JsonValue> ? Value : never;
|
|
167
|
+
export type WorkflowFieldClassDeclaration<Schema = PackageSchemaSource<unknown, JsonValue>, OptionValue extends JsonValue = WorkflowFieldValue<Schema>, Constructor extends new () => WorkflowFieldImplementation<WorkflowFieldValue<Schema>, OptionValue> = new () => WorkflowFieldImplementation<WorkflowFieldValue<Schema>, OptionValue>> = ClassDeclaration<WorkflowFieldDeclaration, Constructor, WorkflowFieldDefinitionInput<Schema>>;
|
|
168
|
+
export type ClassDeclaredComponent<Manifest, Implementation> = Readonly<{
|
|
169
|
+
implementation: Implementation;
|
|
170
|
+
manifest: Manifest;
|
|
171
|
+
schemaSidecars: readonly PackageSchemaRuntimeSidecar[];
|
|
172
|
+
}>;
|
|
173
|
+
export type DecoderSource<Schema> = Schema extends PackageSchemaSource<unknown, infer Value, infer Native> ? Schema & PackageDecoder<unknown, Value> & Readonly<{
|
|
174
|
+
native: Native;
|
|
175
|
+
}> : never;
|
|
176
|
+
export type CodecSource<Schema> = Schema extends PackageSchemaSource<infer Wire, infer Value, infer Native> ? Schema & PackageCodec<Wire, Value> & Readonly<{
|
|
177
|
+
native: Native;
|
|
178
|
+
}> : never;
|
|
179
|
+
export type ToolDefinitionInput<InputSchema, OutputSchema> = Omit<DefinitionInput<ToolDeclaration>, "bindingSettings" | "input" | "output" | "settings"> & Readonly<{
|
|
180
|
+
bindingSettings?: FormDefinition;
|
|
181
|
+
input: DecoderSource<InputSchema>;
|
|
182
|
+
output: CodecSource<OutputSchema>;
|
|
183
|
+
settings?: FormDefinition;
|
|
184
|
+
}>;
|
|
185
|
+
export type ToolClassDeclaration<InputSchema = PackageSchemaSource<unknown, unknown>, OutputSchema = PackageSchemaSource<unknown, unknown>, Constructor extends new () => ToolImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>> = new () => ToolImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>>> = ClassDeclaration<ToolDeclaration, Constructor, ToolDefinitionInput<InputSchema, OutputSchema>>;
|
|
186
|
+
export type ConnectionDefinitionInput<Schema extends FormSchemaSource> = Omit<DefinitionInput<ConnectionDeclaration>, "credential"> & Readonly<{
|
|
187
|
+
credential: FormDefinition<string, Schema>;
|
|
188
|
+
}>;
|
|
189
|
+
export type ConnectionClassDeclaration<Schema extends FormSchemaSource = FormSchemaSource, Constructor extends new () => ConnectionImplementation<SchemaValue<Schema>> = new () => ConnectionImplementation<SchemaValue<Schema>>> = ClassDeclaration<ConnectionDeclaration, Constructor, ConnectionDefinitionInput<Schema>>;
|
|
190
|
+
export type KnowledgeConnectorDefinitionInput<Schema extends FormSchemaSource> = Omit<DefinitionInput<KnowledgeConnectorDeclaration>, "settings"> & Readonly<{
|
|
191
|
+
settings?: FormDefinition<string, Schema>;
|
|
192
|
+
}>;
|
|
193
|
+
export type DocumentsConnectorClassDeclaration<Constructor extends new () => DocumentsConnectorImplementation = new () => DocumentsConnectorImplementation> = ClassDeclaration<DocumentsConnectorDeclaration, Constructor>;
|
|
194
|
+
export type KnowledgeConnectorClassDeclaration<Schema extends FormSchemaSource = FormSchemaSource, Constructor extends new () => KnowledgeConnectorImplementation = new () => KnowledgeConnectorImplementation> = ClassDeclaration<KnowledgeConnectorDeclaration, Constructor, KnowledgeConnectorDefinitionInput<Schema>>;
|
|
195
|
+
export type KnowledgeConnectorOAuthClassDeclaration<Constructor extends new () => KnowledgeConnectorOAuthImplementation = new () => KnowledgeConnectorOAuthImplementation> = ClassDeclaration<KnowledgeConnectorOAuthDeclaration, Constructor>;
|
|
196
|
+
type WorkflowNodePortMetadata = Omit<WorkflowNodePortDeclaration, "direction" | "schemaResolution" | "valueSchema">;
|
|
197
|
+
/** Output ports and their schema variants emit values, so they need codecs. */
|
|
198
|
+
export type WorkflowNodePortInput = (WorkflowNodePortMetadata & Readonly<{
|
|
199
|
+
direction: "input";
|
|
200
|
+
schemaResolution?: WorkflowPortSchemaResolution<PackageDecoderSource>;
|
|
201
|
+
valueSchema: PackageDecoderSource;
|
|
202
|
+
}>) | (WorkflowNodePortMetadata & Readonly<{
|
|
203
|
+
direction: "output";
|
|
204
|
+
schemaResolution?: WorkflowPortSchemaResolution<PackageCodecSource>;
|
|
205
|
+
valueSchema: PackageCodecSource;
|
|
206
|
+
}>);
|
|
207
|
+
/**
|
|
208
|
+
* Authoring contract for a workflow node. `editor` holds overrides only: the
|
|
209
|
+
* declared editor is always derived from `configSchema` and `inputSchema`.
|
|
210
|
+
*/
|
|
211
|
+
export type WorkflowNodeContractInput<InputSchema, OutputSchema> = Omit<WorkflowNodeContract, "configSchema" | "editor" | "inputSchema" | "outputChannels" | "outputSchema" | "ports"> & Readonly<{
|
|
212
|
+
configSchema?: PackageDecoderSource;
|
|
213
|
+
editor?: WorkflowEditorOverrides;
|
|
214
|
+
inputSchema?: DecoderSource<InputSchema>;
|
|
215
|
+
outputChannels?: readonly WorkflowOutputChannelDeclaration<PackageCodecSource>[];
|
|
216
|
+
outputSchema?: CodecSource<OutputSchema>;
|
|
217
|
+
ports?: readonly WorkflowNodePortInput[];
|
|
218
|
+
}>;
|
|
219
|
+
export type WorkflowNodeDefinitionInput<InputSchema, OutputSchema> = Omit<DefinitionInput<WorkflowNodeDeclaration>, "contract"> & Readonly<{
|
|
220
|
+
contract: WorkflowNodeContractInput<InputSchema, OutputSchema>;
|
|
221
|
+
}>;
|
|
222
|
+
export type WorkflowNodeClassDeclaration<InputSchema = PackageSchemaSource<unknown, unknown>, OutputSchema = PackageSchemaSource<unknown, unknown>, Constructor extends new () => WorkflowNodeImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>> = new () => WorkflowNodeImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>>> = ClassDeclaration<WorkflowNodeDeclaration, Constructor, WorkflowNodeDefinitionInput<InputSchema, OutputSchema>>;
|
|
223
|
+
export type EventListenerClassDeclaration<Constructor extends new () => EventListenerImplementation = new () => EventListenerImplementation> = ClassDeclaration<EventListenerDeclaration, Constructor>;
|
|
224
|
+
export type KnowledgeEntityAdapterClassDeclaration<Constructor extends new () => KnowledgeEntityAdapterImplementation = new () => KnowledgeEntityAdapterImplementation> = ClassDeclaration<KnowledgeEntityAdapterDeclaration, Constructor>;
|
|
225
|
+
export type KnowledgeRelationAdapterClassDeclaration<Constructor extends new () => KnowledgeRelationAdapterImplementation = new () => KnowledgeRelationAdapterImplementation> = ClassDeclaration<KnowledgeRelationAdapterDeclaration, Constructor>;
|
|
226
|
+
export type FieldTransformerClassDeclaration<Constructor extends new () => FieldTransformerImplementation = new () => FieldTransformerImplementation> = ClassDeclaration<FieldTransformerDeclaration, Constructor>;
|
|
227
|
+
export type ToolSettingsOptionsClassDeclaration<Constructor extends new () => ToolSettingsOptionsImplementation = new () => ToolSettingsOptionsImplementation> = ClassDeclaration<ToolSettingsOptionsDeclaration, Constructor>;
|
|
228
|
+
export type NotificationDefinitionInput<Schema extends FormSchemaSource, SetupSchema extends FormSchemaSource> = Omit<DefinitionInput<NotificationChannelDeclaration>, "credential" | "definition"> & Readonly<{
|
|
229
|
+
credential?: FormDefinition<string, Schema>;
|
|
230
|
+
definition: Omit<NotificationChannelDeclaration["definition"], "setup"> & Readonly<{
|
|
231
|
+
setup: Omit<NotificationChannelDeclaration["definition"]["setup"], "setupForm"> & Readonly<{
|
|
232
|
+
setupForm: FormDefinition<string, SetupSchema> | null;
|
|
233
|
+
}>;
|
|
234
|
+
}>;
|
|
235
|
+
}>;
|
|
236
|
+
export type NotificationChannelClassDeclaration<Schema extends FormSchemaSource = FormSchemaSource, SetupSchema extends FormSchemaSource = FormSchemaSource, Constructor extends new () => NotificationChannelImplementation = new () => NotificationChannelImplementation> = ClassDeclaration<NotificationChannelDeclaration, Constructor, NotificationDefinitionInput<Schema, SetupSchema>>;
|
|
237
|
+
export declare const assertSerializable: (value: unknown, label: string) => void;
|
|
238
|
+
export declare const isClassConstructor: (value: unknown) => value is new () => object;
|
|
239
|
+
export type MaterializedForm = Readonly<{
|
|
240
|
+
manifest: PortableFormDefinition;
|
|
241
|
+
sidecar: PackageSchemaRuntimeSidecar;
|
|
242
|
+
}>;
|
|
243
|
+
export declare const materializeForm: (form: FormDefinition, location: string) => MaterializedForm;
|
|
244
|
+
export type MaterializedSchema = Readonly<{
|
|
245
|
+
projection: PackageSchemaProjection;
|
|
246
|
+
sidecar: PackageSchemaRuntimeSidecar;
|
|
247
|
+
}>;
|
|
248
|
+
export declare const isPackageCodecSource: (source: PackageDecoderSource) => source is PackageCodecSource;
|
|
249
|
+
export declare const materializeSchema: (source: PackageDecoderSource, profile: ConsumerProfileId, location: string, direction?: "input" | "output") => MaterializedSchema;
|
|
250
|
+
export declare const executableClass: <Manifest extends {
|
|
251
|
+
readonly kind: string;
|
|
252
|
+
}, Constructor extends new () => object>(kind: Manifest["kind"], input: ClassDeclaration<Manifest, Constructor>, label: string, schemaSidecars?: readonly PackageSchemaRuntimeSidecar[]) => ClassDeclaredComponent<Manifest, Constructor>;
|
|
253
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { VisibilityCondition } from "../schema/forms.js";
|
|
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" | "eventListener" | "externalApplication" | "externalAppGateway" | "fieldTransformer" | "knowledgeEntitySchema" | "knowledgeRelationSchema" | "knowledgePolicy" | "notificationChannel" | "organizationSso" | "remoteToolCollection" | "knowledgeRelationAdapter" | "skill" | "skillTemplate" | "studioApp" | "studioComponent" | "tool" | "toolCollection" | "toolSettingsOptions" | "workflow" | "workflowField" | "workflowFieldCollection" | "workflowNode" | "workflowNodeCollection" | "workflowTemplate";
|
|
4
|
+
export type PackagePrimitiveBase<Kind extends PackagePrimitiveKind> = Readonly<{
|
|
5
|
+
description?: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
fqn: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
kind: Kind;
|
|
10
|
+
tags?: readonly string[];
|
|
11
|
+
version: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type ConnectionReference = Readonly<{
|
|
14
|
+
/**
|
|
15
|
+
* Key of a discovered catalog collection of the bound connection. Tool hosts
|
|
16
|
+
* expose the `id` of each of its resources as
|
|
17
|
+
* `PackageRuntimeContext.connectionCatalogIds[slot]`.
|
|
18
|
+
*/
|
|
19
|
+
catalogCollection?: string;
|
|
20
|
+
connectionTemplateFqn: string;
|
|
21
|
+
label: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
slot: string;
|
|
24
|
+
visibleWhen?: VisibilityCondition;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
2
|
+
import type { LifecycleOptions } from "./lifecycle.js";
|
|
3
|
+
export type DomainDeclaration = PackagePrimitiveBase<"domain"> & Readonly<{
|
|
4
|
+
lifecycle: LifecycleOptions;
|
|
5
|
+
localMutationPolicy?: "always" | "connector_backed" | "never";
|
|
6
|
+
versioningEnabled: boolean | null;
|
|
7
|
+
}>;
|
|
8
|
+
/** Structured legacy catalog facets retained without flattening their values. */
|
|
9
|
+
export type CatalogTags = Readonly<Record<string, readonly string[]>>;
|
|
10
|
+
export type DomainTemplateDeclaration = PackagePrimitiveBase<"domainTemplate"> & Readonly<{
|
|
11
|
+
catalogTags?: CatalogTags;
|
|
12
|
+
domainFqn: string;
|
|
13
|
+
domainName: string;
|
|
14
|
+
entitySchemaFqns: readonly string[];
|
|
15
|
+
relationSchemaFqns: readonly string[];
|
|
16
|
+
}>;
|
|
17
|
+
export type SkillTemplateDeclaration = PackagePrimitiveBase<"skillTemplate"> & Readonly<{
|
|
18
|
+
catalogTags?: CatalogTags;
|
|
19
|
+
lifecycle?: LifecycleOptions;
|
|
20
|
+
name: string;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { JsonValue } from "../foundation/json.js";
|
|
2
|
+
export type ConnectionDiscoveryMetadataValue = string | number | boolean | null;
|
|
3
|
+
export type ConnectionDiscoveryMetadata = Readonly<Record<string, ConnectionDiscoveryMetadataValue>>;
|
|
4
|
+
export type ConnectionDiscoveryField = Readonly<{
|
|
5
|
+
dataType?: JsonValue | null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
id: string;
|
|
8
|
+
kind: "data" | "relation";
|
|
9
|
+
metadata: ConnectionDiscoveryMetadata;
|
|
10
|
+
remotePath: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type ConnectionDiscoveryResource = Readonly<{
|
|
13
|
+
description?: string | null;
|
|
14
|
+
displayName: string;
|
|
15
|
+
fields: readonly ConnectionDiscoveryField[];
|
|
16
|
+
id: string;
|
|
17
|
+
kind: "entity" | "relation";
|
|
18
|
+
link?: string | null;
|
|
19
|
+
metadata: ConnectionDiscoveryMetadata;
|
|
20
|
+
parentPath: readonly string[];
|
|
21
|
+
}>;
|
|
22
|
+
export type ConnectionDiscoveryRelationship = Readonly<{
|
|
23
|
+
displayName: string;
|
|
24
|
+
id: string;
|
|
25
|
+
metadata: ConnectionDiscoveryMetadata;
|
|
26
|
+
sourceResourceId: string;
|
|
27
|
+
targetResourceId: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type ConnectionDiscoveryCollection = Readonly<{
|
|
30
|
+
description?: string | null;
|
|
31
|
+
displayName: string;
|
|
32
|
+
key: string;
|
|
33
|
+
metadata: ConnectionDiscoveryMetadata;
|
|
34
|
+
relationships: readonly ConnectionDiscoveryRelationship[];
|
|
35
|
+
resources: readonly ConnectionDiscoveryResource[];
|
|
36
|
+
usage: "options" | "schema";
|
|
37
|
+
}>;
|
|
38
|
+
/** Portable package-owned snapshot. Hosts persist and page it without interpreting providers. */
|
|
39
|
+
export type ConnectionDiscoveryCatalog = Readonly<{
|
|
40
|
+
collections: readonly ConnectionDiscoveryCollection[];
|
|
41
|
+
connectionTemplateFqn: string;
|
|
42
|
+
discoveredAt: string;
|
|
43
|
+
providerFamily: string;
|
|
44
|
+
providerMetadata: ConnectionDiscoveryMetadata;
|
|
45
|
+
version: 5;
|
|
46
|
+
}>;
|
|
47
|
+
export type PackageConnectionProgress = Readonly<{
|
|
48
|
+
completed: number;
|
|
49
|
+
label: string;
|
|
50
|
+
summary: string;
|
|
51
|
+
total: number;
|
|
52
|
+
}>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../foundation/json.js";
|
|
2
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
3
|
+
import type { KnowledgeConnectorBindingExtraConfig, KnowledgeConnectorFieldMapRule } from "./connectors.js";
|
|
4
|
+
import type { DatasetDefinition, DatasetFilter, DatasetSourceLocation } from "./datasets.js";
|
|
5
|
+
import type { KnowledgePolicyDeclaration } from "./knowledge.js";
|
|
6
|
+
import type { LifecycleOptions } from "./lifecycle.js";
|
|
7
|
+
/** A slot is supplied separately at install time, never by embedding credentials. */
|
|
8
|
+
export type ConnectorInstanceConnection = Readonly<{
|
|
9
|
+
setupKey: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type KnowledgeConnectorInstanceSettings = Readonly<Record<string, Readonly<{
|
|
12
|
+
type: "inline" | "linked";
|
|
13
|
+
value: JsonValue;
|
|
14
|
+
}>>>;
|
|
15
|
+
export type KnowledgeConnectorInstanceRemoteFilters = Readonly<Record<string, Readonly<{
|
|
16
|
+
mode: "all" | "only_selected" | "all_except_selected";
|
|
17
|
+
selected_ids: readonly string[];
|
|
18
|
+
}>>>;
|
|
19
|
+
export type KnowledgeConnectorInstanceBindingOptions = Readonly<{
|
|
20
|
+
key: string;
|
|
21
|
+
remoteCollectionId?: string | null;
|
|
22
|
+
remoteCollectionName?: string | null;
|
|
23
|
+
fieldMap?: readonly KnowledgeConnectorFieldMapRule[];
|
|
24
|
+
extras?: readonly KnowledgeConnectorBindingExtraConfig[];
|
|
25
|
+
executionRole?: "root" | "child";
|
|
26
|
+
parentKey?: string | null;
|
|
27
|
+
supportsInbound?: boolean;
|
|
28
|
+
supportsOutbound?: boolean;
|
|
29
|
+
supportedSyncModes?: readonly ("delta" | "full")[];
|
|
30
|
+
syncIntervalSeconds?: number | null;
|
|
31
|
+
extraPropsMode?: "ignore" | "import" | "inline";
|
|
32
|
+
updateMode?: "full" | "partial";
|
|
33
|
+
outboundStrategy?: "local_first" | "remote_first";
|
|
34
|
+
}>;
|
|
35
|
+
export type KnowledgeConnectorInstanceEntityBinding = KnowledgeConnectorInstanceBindingOptions & Readonly<{
|
|
36
|
+
schemaFqn: string;
|
|
37
|
+
bindingMode: "managed" | "external";
|
|
38
|
+
supportedBindingModes?: readonly ("managed" | "external")[];
|
|
39
|
+
missingConnectorFieldsBehavior?: "prune" | "retain";
|
|
40
|
+
suppressEntityEvents?: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export type KnowledgeConnectorInstanceRelationBinding = KnowledgeConnectorInstanceBindingOptions & Readonly<{
|
|
43
|
+
relationSchemaFqn: string;
|
|
44
|
+
bindingMode?: "managed";
|
|
45
|
+
relationImportMode?: "child_binding" | "relation_only";
|
|
46
|
+
sourceEntityKey?: string | null;
|
|
47
|
+
targetEntityKey?: string | null;
|
|
48
|
+
}>;
|
|
49
|
+
export type KnowledgeConnectorInstanceSchedule = Readonly<{
|
|
50
|
+
key: string;
|
|
51
|
+
cronExpression: string;
|
|
52
|
+
timezone?: string;
|
|
53
|
+
importMode?: "delta" | "full";
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
}>;
|
|
56
|
+
export type KnowledgeConnectorInstancePipeline = Readonly<{
|
|
57
|
+
key: string;
|
|
58
|
+
name?: string;
|
|
59
|
+
enabled?: boolean;
|
|
60
|
+
definition: Readonly<{
|
|
61
|
+
steps: readonly Readonly<{
|
|
62
|
+
tasks: readonly Readonly<{
|
|
63
|
+
kind: "entity" | "relation";
|
|
64
|
+
bindingKey: string;
|
|
65
|
+
modeOverride?: "delta" | "full" | null;
|
|
66
|
+
}>[];
|
|
67
|
+
}>[];
|
|
68
|
+
budgets?: Readonly<{
|
|
69
|
+
maxPagesPerRun?: number | null;
|
|
70
|
+
maxRemoteItemsPerRun?: number | null;
|
|
71
|
+
maxRootWorkUnitsPerRun?: number | null;
|
|
72
|
+
maxSecondsPerRun?: number | null;
|
|
73
|
+
}>;
|
|
74
|
+
}>;
|
|
75
|
+
schedules?: readonly KnowledgeConnectorInstanceSchedule[];
|
|
76
|
+
}>;
|
|
77
|
+
export type KnowledgeConnectorInstanceDataPolicy = Omit<KnowledgePolicyDeclaration, "kind" | "version" | "displayName" | "description" | "icon" | "tags">;
|
|
78
|
+
export type KnowledgeConnectorInstanceDeclaration = PackagePrimitiveBase<"knowledgeConnectorInstance"> & Readonly<{
|
|
79
|
+
templateFqn: string;
|
|
80
|
+
lifecycle: LifecycleOptions;
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
settings?: KnowledgeConnectorInstanceSettings;
|
|
83
|
+
remoteFilters?: KnowledgeConnectorInstanceRemoteFilters;
|
|
84
|
+
connections?: Readonly<Record<string, ConnectorInstanceConnection>>;
|
|
85
|
+
entityBindings?: readonly KnowledgeConnectorInstanceEntityBinding[];
|
|
86
|
+
relationBindings?: readonly KnowledgeConnectorInstanceRelationBinding[];
|
|
87
|
+
pipelines?: readonly KnowledgeConnectorInstancePipeline[];
|
|
88
|
+
dataPolicies?: readonly KnowledgeConnectorInstanceDataPolicy[];
|
|
89
|
+
}>;
|
|
90
|
+
export type DatasetConnectorInstanceDataPolicy = Readonly<{
|
|
91
|
+
principals: readonly Readonly<{
|
|
92
|
+
kind: "user" | "service";
|
|
93
|
+
id: string;
|
|
94
|
+
}>[];
|
|
95
|
+
allowedOperations: readonly ("describe" | "records" | "aggregate" | "time_series")[];
|
|
96
|
+
allowedFields: readonly string[];
|
|
97
|
+
sensitiveFields?: readonly string[];
|
|
98
|
+
rowFilter?: DatasetFilter | null;
|
|
99
|
+
maxRows?: number | null;
|
|
100
|
+
maxBytes?: number | null;
|
|
101
|
+
maxTimeoutMs?: number | null;
|
|
102
|
+
}>;
|
|
103
|
+
export type DatasetConnectorInstanceSchedule = Readonly<{
|
|
104
|
+
key: string;
|
|
105
|
+
action: "health" | "refresh_definition";
|
|
106
|
+
cronExpression: string;
|
|
107
|
+
timezone?: string;
|
|
108
|
+
enabled?: boolean;
|
|
109
|
+
}>;
|
|
110
|
+
type DatasetConnectorInstanceBase = PackagePrimitiveBase<"datasetConnectorInstance"> & Readonly<{
|
|
111
|
+
lifecycle: LifecycleOptions;
|
|
112
|
+
providerFqn: string;
|
|
113
|
+
connection?: ConnectorInstanceConnection;
|
|
114
|
+
settings?: JsonObject;
|
|
115
|
+
dataPolicy?: DatasetConnectorInstanceDataPolicy;
|
|
116
|
+
schedules?: readonly DatasetConnectorInstanceSchedule[];
|
|
117
|
+
}>;
|
|
118
|
+
/** These configure actual native Datasets with the existing executable providers. */
|
|
119
|
+
export type DatasetConnectorInstanceDeclaration = DatasetConnectorInstanceBase & (Readonly<{
|
|
120
|
+
bindingMode: "managed";
|
|
121
|
+
definition: DatasetDefinition;
|
|
122
|
+
templateFqn?: string;
|
|
123
|
+
templateConfig?: Readonly<{
|
|
124
|
+
version: 1;
|
|
125
|
+
variant: string;
|
|
126
|
+
}>;
|
|
127
|
+
sourceLocation?: DatasetSourceLocation;
|
|
128
|
+
}> | Readonly<{
|
|
129
|
+
bindingMode: "external";
|
|
130
|
+
sourceLocation: DatasetSourceLocation;
|
|
131
|
+
definition?: DatasetDefinition;
|
|
132
|
+
sourceMapping?: Readonly<{
|
|
133
|
+
version: 1;
|
|
134
|
+
kind: "entity_snapshot" | "status_update";
|
|
135
|
+
entityIdFieldId: string;
|
|
136
|
+
statusFieldId?: string;
|
|
137
|
+
effectiveAtFieldId?: string;
|
|
138
|
+
historySemantics?: "append_history";
|
|
139
|
+
}>;
|
|
140
|
+
gatewayBindingKey?: string;
|
|
141
|
+
}>);
|
|
142
|
+
export {};
|