@collective-intelligence/extensions-sdk 0.0.0-stage → 0.1.0
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,66 @@
|
|
|
1
|
+
import type { PackageCodecSource, PackageDecoderSource } from "../schema/source.js";
|
|
2
|
+
import type { ClassDeclaration, ClassDeclaredComponent, ComponentManifest, ComponentPresentation, DeclaredComponent, DecoderSource, MetadataComponentManifest } from "./authoring-core.js";
|
|
3
|
+
import type { DomainDeclaration, DomainTemplateDeclaration, SkillTemplateDeclaration } from "./catalog.js";
|
|
4
|
+
import type { KnowledgeConnectorInstanceDeclaration, DatasetConnectorInstanceDeclaration } from "./connector-instances.js";
|
|
5
|
+
import type { DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration } from "./connectors.js";
|
|
6
|
+
import type { DatasetParserImplementation } from "./dataset-parser.js";
|
|
7
|
+
import type { ExternalDatasetProviderImplementation, ManagedDatasetProviderImplementation } from "./datasets.js";
|
|
8
|
+
import type { ExternalAppGatewayDeclaration } from "./external-app-gateway.js";
|
|
9
|
+
import type { ExternalApplicationDeclaration } from "./external-application.js";
|
|
10
|
+
import type { KnowledgeEntitySchemaDeclaration, KnowledgePolicyDeclaration, KnowledgeRelationSchemaDeclaration } from "./knowledge.js";
|
|
11
|
+
import type { LifecycleOptions } from "./lifecycle.js";
|
|
12
|
+
import type { StudioAppDeclaration, StudioComponentDeclaration } from "./studio.js";
|
|
13
|
+
import type { RemoteToolCollectionDeclaration, RemoteToolCollectionDefinition, ToolCollectionDeclaration } from "./tools.js";
|
|
14
|
+
import type { WorkflowDeclaration, WorkflowFieldCollectionDeclaration, WorkflowNodeCollectionDeclaration, WorkflowTemplateDeclaration, WorkflowTemplateGraphDefinition } from "./workflows.js";
|
|
15
|
+
type MetadataDefinition<Manifest> = Manifest extends MetadataComponentManifest ? Omit<Manifest, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version"> : never;
|
|
16
|
+
type MetadataClassDeclaration<Manifest, Definition = MetadataDefinition<Manifest>> = Readonly<{
|
|
17
|
+
definition: Definition;
|
|
18
|
+
manifest: ComponentManifest;
|
|
19
|
+
presentation: ComponentPresentation;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const declareDomain: (input: MetadataClassDeclaration<DomainDeclaration>) => DeclaredComponent<DomainDeclaration>;
|
|
22
|
+
export type ManagedDatasetProviderClassDeclaration<Constructor extends new () => ManagedDatasetProviderImplementation = new () => ManagedDatasetProviderImplementation> = ClassDeclaration<ManagedDatasetProviderDeclaration, Constructor>;
|
|
23
|
+
export declare const declareManagedDatasetProvider: <Constructor extends new () => ManagedDatasetProviderImplementation>(input: ManagedDatasetProviderClassDeclaration<Constructor>) => ClassDeclaredComponent<ManagedDatasetProviderDeclaration, Constructor>;
|
|
24
|
+
export type ExternalDatasetProviderClassDeclaration<Constructor extends new () => ExternalDatasetProviderImplementation = new () => ExternalDatasetProviderImplementation> = ClassDeclaration<ExternalDatasetProviderDeclaration, Constructor>;
|
|
25
|
+
export declare const declareExternalDatasetProvider: <Constructor extends new () => ExternalDatasetProviderImplementation>(input: ExternalDatasetProviderClassDeclaration<Constructor>) => ClassDeclaredComponent<ExternalDatasetProviderDeclaration, Constructor>;
|
|
26
|
+
export type DatasetParserClassDeclaration<Constructor extends new () => DatasetParserImplementation = new () => DatasetParserImplementation> = ClassDeclaration<DatasetParserDeclaration, Constructor>;
|
|
27
|
+
export declare const declareDatasetParser: <Constructor extends new () => DatasetParserImplementation>(input: DatasetParserClassDeclaration<Constructor>) => ClassDeclaredComponent<DatasetParserDeclaration, Constructor>;
|
|
28
|
+
export declare const declareDomainTemplate: (input: MetadataClassDeclaration<DomainTemplateDeclaration>) => DeclaredComponent<DomainTemplateDeclaration>;
|
|
29
|
+
export declare const declareExternalApplication: (input: MetadataClassDeclaration<ExternalApplicationDeclaration>) => DeclaredComponent<ExternalApplicationDeclaration>;
|
|
30
|
+
export declare const declareSkillTemplate: (input: MetadataClassDeclaration<SkillTemplateDeclaration>) => DeclaredComponent<SkillTemplateDeclaration>;
|
|
31
|
+
type KnowledgeEntityDefinitionInput<Schema> = Omit<MetadataDefinition<KnowledgeEntitySchemaDeclaration>, "schema"> & Readonly<{
|
|
32
|
+
schema: DecoderSource<Schema>;
|
|
33
|
+
}>;
|
|
34
|
+
type KnowledgeRelationDefinitionInput<Schema> = Omit<MetadataDefinition<KnowledgeRelationSchemaDeclaration>, "schema" | "lifecycle"> & Readonly<{
|
|
35
|
+
lifecycle: LifecycleOptions;
|
|
36
|
+
schema: DecoderSource<Schema>;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const declareKnowledgeEntitySchema: <Schema>(input: MetadataClassDeclaration<KnowledgeEntitySchemaDeclaration, KnowledgeEntityDefinitionInput<Schema>>) => DeclaredComponent<KnowledgeEntitySchemaDeclaration>;
|
|
39
|
+
export declare const declareKnowledgeRelationSchema: <Schema>(input: MetadataClassDeclaration<KnowledgeRelationSchemaDeclaration, KnowledgeRelationDefinitionInput<Schema>>) => DeclaredComponent<KnowledgeRelationSchemaDeclaration>;
|
|
40
|
+
export declare const declareKnowledgePolicy: (input: MetadataClassDeclaration<KnowledgePolicyDeclaration>) => DeclaredComponent<KnowledgePolicyDeclaration>;
|
|
41
|
+
type WorkflowTemplateGraphDefinitionInput = Omit<WorkflowTemplateGraphDefinition, "inputContract" | "outputContract"> & Readonly<{
|
|
42
|
+
inputContract: Omit<WorkflowTemplateGraphDefinition["inputContract"], "schema"> & Readonly<{
|
|
43
|
+
schema: PackageDecoderSource;
|
|
44
|
+
}>;
|
|
45
|
+
outputContract: Omit<WorkflowTemplateGraphDefinition["outputContract"], "schema"> & Readonly<{
|
|
46
|
+
schema: PackageCodecSource;
|
|
47
|
+
}>;
|
|
48
|
+
}>;
|
|
49
|
+
type WorkflowTemplateDefinitionInput = Omit<MetadataDefinition<WorkflowTemplateDeclaration>, "definition"> & Readonly<{
|
|
50
|
+
definition: WorkflowTemplateGraphDefinitionInput;
|
|
51
|
+
}>;
|
|
52
|
+
export declare const declareWorkflow: (input: MetadataClassDeclaration<WorkflowDeclaration>) => DeclaredComponent<WorkflowDeclaration>;
|
|
53
|
+
export declare const declareWorkflowTemplate: (input: MetadataClassDeclaration<WorkflowTemplateDeclaration, WorkflowTemplateDefinitionInput>) => DeclaredComponent<WorkflowTemplateDeclaration>;
|
|
54
|
+
export declare const declareToolCollection: (input: MetadataClassDeclaration<ToolCollectionDeclaration>) => DeclaredComponent<ToolCollectionDeclaration>;
|
|
55
|
+
export declare const declareExternalAppGateway: (input: MetadataClassDeclaration<ExternalAppGatewayDeclaration>) => DeclaredComponent<ExternalAppGatewayDeclaration>;
|
|
56
|
+
export declare const declareRemoteToolCollection: (input: MetadataClassDeclaration<RemoteToolCollectionDeclaration, RemoteToolCollectionDefinition>) => DeclaredComponent<RemoteToolCollectionDeclaration>;
|
|
57
|
+
export declare const declareWorkflowFieldCollection: (input: MetadataClassDeclaration<WorkflowFieldCollectionDeclaration>) => DeclaredComponent<WorkflowFieldCollectionDeclaration>;
|
|
58
|
+
export declare const declareWorkflowNodeCollection: (input: MetadataClassDeclaration<WorkflowNodeCollectionDeclaration>) => DeclaredComponent<WorkflowNodeCollectionDeclaration>;
|
|
59
|
+
export declare const declareStudioApp: (input: MetadataClassDeclaration<StudioAppDeclaration>) => DeclaredComponent<StudioAppDeclaration>;
|
|
60
|
+
type StudioComponentDefinitionInput<Schema> = Omit<MetadataDefinition<StudioComponentDeclaration>, "propsSchema"> & Readonly<{
|
|
61
|
+
propsSchema: DecoderSource<Schema>;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const declareStudioComponent: <Schema>(input: MetadataClassDeclaration<StudioComponentDeclaration, StudioComponentDefinitionInput<Schema>>) => DeclaredComponent<StudioComponentDeclaration>;
|
|
64
|
+
export declare const declareKnowledgeConnectorInstance: (input: MetadataClassDeclaration<KnowledgeConnectorInstanceDeclaration>) => DeclaredComponent<KnowledgeConnectorInstanceDeclaration>;
|
|
65
|
+
export declare const declareDatasetConnectorInstance: (input: MetadataClassDeclaration<DatasetConnectorInstanceDeclaration>) => DeclaredComponent<DatasetConnectorInstanceDeclaration>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NotificationChannelDeclaration } from "./tools.js";
|
|
2
|
+
type Capabilities = NotificationChannelDeclaration["definition"]["capabilities"];
|
|
3
|
+
/** Resolve old manifests without changing their bytes or declaration identity. */
|
|
4
|
+
export declare const normalizeNotificationChannelCapabilities: (capabilities: Capabilities) => Capabilities & Readonly<{
|
|
5
|
+
supportsFixedDestinations: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { JsonObject } from "../foundation/json.js";
|
|
2
|
+
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
3
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
4
|
+
import type { LocalizedFieldText } from "./knowledge.js";
|
|
5
|
+
export type StudioComponentDeclaration = PackagePrimitiveBase<"studioComponent"> & Readonly<{
|
|
6
|
+
category: "layout" | "page" | "primitive" | "view" | "widget";
|
|
7
|
+
composition?: Readonly<{
|
|
8
|
+
extensions?: JsonObject;
|
|
9
|
+
slotSource: "props" | "static";
|
|
10
|
+
slots: readonly Readonly<{
|
|
11
|
+
extensions?: JsonObject;
|
|
12
|
+
key: string;
|
|
13
|
+
label?: LocalizedFieldText;
|
|
14
|
+
}>[];
|
|
15
|
+
}>;
|
|
16
|
+
propsSchema: PackageSchemaProjection;
|
|
17
|
+
sourceRef: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type StudioAppDeclaration = PackagePrimitiveBase<"studioApp"> & Readonly<{
|
|
20
|
+
definition: StudioAppDefinition;
|
|
21
|
+
}>;
|
|
22
|
+
export type StudioAppPageDefinition = Readonly<{
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
icon?: string;
|
|
25
|
+
kind: "predefined";
|
|
26
|
+
label: string;
|
|
27
|
+
orderIndex: number;
|
|
28
|
+
predefinedPageRef: string;
|
|
29
|
+
routeSegment: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type StudioAppSectionDefinition = Readonly<{
|
|
33
|
+
description?: string;
|
|
34
|
+
icon?: string;
|
|
35
|
+
label: string;
|
|
36
|
+
orderIndex: number;
|
|
37
|
+
pages: readonly StudioAppPageDefinition[];
|
|
38
|
+
slug: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type StudioAppDefinition = Readonly<{
|
|
41
|
+
color?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
icon?: string;
|
|
44
|
+
isDefaultTemplate?: boolean;
|
|
45
|
+
name: string;
|
|
46
|
+
sections: readonly StudioAppSectionDefinition[];
|
|
47
|
+
slug: string;
|
|
48
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { JsonObject } from "../foundation/json.js";
|
|
2
|
+
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
3
|
+
import type { ComponentManifest, ComponentPresentation, DeclaredComponent } from "./authoring-core.js";
|
|
4
|
+
import type { PackagePrimitiveBase } from "./base.js";
|
|
5
|
+
import type { DatasetDefinition, DatasetIngestMode, DatasetProviderResult } from "./datasets.js";
|
|
6
|
+
export type DatasetBlueprintDeclaration = PackagePrimitiveBase<"datasetBlueprint"> & Readonly<{
|
|
7
|
+
/** Durable Blueprint revision, distinct from the package component version. */
|
|
8
|
+
blueprintVersion: number;
|
|
9
|
+
configuration?: JsonObject;
|
|
10
|
+
definition: DatasetDefinition;
|
|
11
|
+
templateFqn: string;
|
|
12
|
+
}>;
|
|
13
|
+
export type DatasetBlueprintClassDeclaration = Readonly<{
|
|
14
|
+
definition: Omit<DatasetBlueprintDeclaration, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version">;
|
|
15
|
+
manifest: ComponentManifest;
|
|
16
|
+
presentation: ComponentPresentation;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const declareDatasetBlueprint: (input: DatasetBlueprintClassDeclaration) => DeclaredComponent<DatasetBlueprintDeclaration>;
|
|
19
|
+
export declare const DATASET_TABLE_TEMPLATE_PHYSICAL_CODES: readonly ["gen", "snap", "ts", "evt", "fact", "stat"];
|
|
20
|
+
export type DatasetTableTemplatePhysicalCode = (typeof DATASET_TABLE_TEMPLATE_PHYSICAL_CODES)[number];
|
|
21
|
+
export declare const DATASET_TABLE_TEMPLATE_SEMANTIC_ROLES: readonly ["dimension", "effective_time", "entity_reference", "event_time", "identity", "measure", "status"];
|
|
22
|
+
export type DatasetTableTemplateSemanticRole = (typeof DATASET_TABLE_TEMPLATE_SEMANTIC_ROLES)[number];
|
|
23
|
+
export type DatasetTableTemplateUniqueness = "append_only" | "key" | "none";
|
|
24
|
+
export type DatasetTableTemplateHint = Readonly<{
|
|
25
|
+
role: DatasetTableTemplateSemanticRole;
|
|
26
|
+
}>;
|
|
27
|
+
export type DatasetTableTemplateDeclaration = PackagePrimitiveBase<"datasetTableTemplate"> & Readonly<{
|
|
28
|
+
admittedIngestionModes: readonly DatasetIngestMode[];
|
|
29
|
+
compatibleProviderFqns: readonly string[];
|
|
30
|
+
configuration: PackageSchemaProjection;
|
|
31
|
+
identity: Readonly<{
|
|
32
|
+
keyRoles: readonly DatasetTableTemplateSemanticRole[];
|
|
33
|
+
uniqueness: DatasetTableTemplateUniqueness;
|
|
34
|
+
}>;
|
|
35
|
+
indexHints: readonly DatasetTableTemplateHint[];
|
|
36
|
+
partitionHints: readonly DatasetTableTemplateHint[];
|
|
37
|
+
physicalCode: DatasetTableTemplatePhysicalCode;
|
|
38
|
+
requirements: PackageSchemaProjection;
|
|
39
|
+
semanticRoles: readonly DatasetTableTemplateSemanticRole[];
|
|
40
|
+
}>;
|
|
41
|
+
export type DatasetTableTemplateClassDeclaration = Readonly<{
|
|
42
|
+
definition: Omit<DatasetTableTemplateDeclaration, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version">;
|
|
43
|
+
manifest: ComponentManifest;
|
|
44
|
+
presentation: ComponentPresentation;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const declareDatasetTableTemplate: (input: DatasetTableTemplateClassDeclaration) => DeclaredComponent<DatasetTableTemplateDeclaration>;
|
|
47
|
+
export declare const rejectUnsupportedDatasetTableTemplate: (input: {
|
|
48
|
+
readonly compatibleTemplateFqns: readonly string[];
|
|
49
|
+
readonly templateFqn: string;
|
|
50
|
+
}) => DatasetProviderResult<undefined>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { JsonObject } from "../foundation/json.js";
|
|
2
|
+
import type { PortableFormDefinition } from "../schema/forms.js";
|
|
3
|
+
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
4
|
+
import type { DeclarationReference } from "./authoring-core.js";
|
|
5
|
+
import type { BindingScope, ConnectionReference, PackagePrimitiveBase } from "./base.js";
|
|
6
|
+
export type SetupInstructions = Readonly<{
|
|
7
|
+
links: readonly string[];
|
|
8
|
+
markdown: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type ToolGuidance = Readonly<{
|
|
11
|
+
inputRequirementsSummary?: string;
|
|
12
|
+
useWhen?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** A companion tool bound alongside the declaring tool, e.g. a catalog lookup. */
|
|
15
|
+
export type ToolExtraLoader = Readonly<{
|
|
16
|
+
bindingName: string;
|
|
17
|
+
/** Copies the declaring binding's settings, minus approval keys. */
|
|
18
|
+
inheritBindingSettings?: boolean;
|
|
19
|
+
toolFqn: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Presence advertises a read-only readiness probe (`healthCheck` operation). */
|
|
22
|
+
export type ToolHealthCheck = Readonly<{
|
|
23
|
+
capabilities?: readonly string[];
|
|
24
|
+
description: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type ToolDeclaration = PackagePrimitiveBase<"tool"> & Readonly<{
|
|
27
|
+
allowMultipleSkillBindings?: boolean;
|
|
28
|
+
autoActivate?: boolean;
|
|
29
|
+
autoInstantiate?: boolean;
|
|
30
|
+
bindingScopes?: readonly BindingScope[];
|
|
31
|
+
bindingSettings?: PortableFormDefinition;
|
|
32
|
+
capabilityType?: "delegate" | "external" | "read" | "write";
|
|
33
|
+
category?: string;
|
|
34
|
+
connectionRefs?: readonly ConnectionReference[];
|
|
35
|
+
effectKind?: "mutation" | "read_only";
|
|
36
|
+
extraLoaders?: readonly ToolExtraLoader[];
|
|
37
|
+
healthCheck?: ToolHealthCheck;
|
|
38
|
+
input: PackageSchemaProjection;
|
|
39
|
+
isSingleton?: boolean;
|
|
40
|
+
output: PackageSchemaProjection;
|
|
41
|
+
settings?: PortableFormDefinition;
|
|
42
|
+
setupInstructions?: SetupInstructions;
|
|
43
|
+
toolCollectionFqns?: readonly string[];
|
|
44
|
+
toolGuidance?: ToolGuidance;
|
|
45
|
+
usageScopes?: readonly ("automation" | "chat" | "skill")[];
|
|
46
|
+
}>;
|
|
47
|
+
/** Seeded once, when the collection is first created for an organization. */
|
|
48
|
+
export type ToolCollectionVisibilityGrant = Readonly<{
|
|
49
|
+
effect: "allow" | "deny";
|
|
50
|
+
subject: "organization";
|
|
51
|
+
}>;
|
|
52
|
+
export type ToolCollectionDeclaration = PackagePrimitiveBase<"toolCollection"> & Readonly<{
|
|
53
|
+
category?: string;
|
|
54
|
+
defaultVisibility?: readonly ToolCollectionVisibilityGrant[];
|
|
55
|
+
tags?: readonly string[];
|
|
56
|
+
toolFqns: readonly string[];
|
|
57
|
+
}>;
|
|
58
|
+
/** References approved Gateway Operations; execution and authority stay Host-owned. */
|
|
59
|
+
export type RemoteToolCollectionDeclaration = PackagePrimitiveBase<"remoteToolCollection"> & Pick<ToolCollectionDeclaration, "category" | "defaultVisibility"> & Readonly<{
|
|
60
|
+
gatewayRef: string;
|
|
61
|
+
operationReferences: readonly string[];
|
|
62
|
+
}>;
|
|
63
|
+
export type RemoteToolCollectionDefinition = Omit<RemoteToolCollectionDeclaration, "description" | "displayName" | "fqn" | "icon" | "kind" | "tags" | "version" | "gatewayRef"> & Readonly<{
|
|
64
|
+
gatewayRef: DeclarationReference<"externalAppGateway">;
|
|
65
|
+
}>;
|
|
66
|
+
export type FieldTransformerDeclaration = PackagePrimitiveBase<"fieldTransformer"> & Readonly<{
|
|
67
|
+
sourceFieldType: string;
|
|
68
|
+
targetFieldType: string;
|
|
69
|
+
}>;
|
|
70
|
+
export type NotificationChannelDeclaration = PackagePrimitiveBase<"notificationChannel"> & Readonly<{
|
|
71
|
+
credential?: PortableFormDefinition;
|
|
72
|
+
definition: Readonly<{
|
|
73
|
+
capabilities: Readonly<{
|
|
74
|
+
extensionReadyProviders: readonly string[];
|
|
75
|
+
recipientTargets: readonly string[];
|
|
76
|
+
supportsActionLink: boolean;
|
|
77
|
+
supportsAttachments: boolean;
|
|
78
|
+
supportsFixedDestinations?: boolean;
|
|
79
|
+
supportsHtml: boolean;
|
|
80
|
+
supportsMarkdown: boolean;
|
|
81
|
+
supportsMentions: boolean;
|
|
82
|
+
supportsReadReceipts: boolean;
|
|
83
|
+
supportsRouteDestinations: boolean;
|
|
84
|
+
supportsThreads: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
credentialProfileKey?: string;
|
|
87
|
+
family: "email" | "im" | "internal";
|
|
88
|
+
key: string;
|
|
89
|
+
provider: string;
|
|
90
|
+
setup: Readonly<{
|
|
91
|
+
docsUrl: string | null;
|
|
92
|
+
healthCheck: Readonly<{
|
|
93
|
+
available: boolean;
|
|
94
|
+
label?: string;
|
|
95
|
+
}>;
|
|
96
|
+
instructions: string;
|
|
97
|
+
liveTest: Readonly<{
|
|
98
|
+
available: boolean;
|
|
99
|
+
label?: string;
|
|
100
|
+
}>;
|
|
101
|
+
secretFields: readonly string[];
|
|
102
|
+
setupForm: PortableFormDefinition | null;
|
|
103
|
+
}>;
|
|
104
|
+
}>;
|
|
105
|
+
}>;
|
|
106
|
+
export type ToolSettingsOptionsDeclaration = PackagePrimitiveBase<"toolSettingsOptions"> & Readonly<{
|
|
107
|
+
catalogCollection?: string;
|
|
108
|
+
catalogConnectionSlots?: readonly string[];
|
|
109
|
+
connectionSlots?: readonly string[];
|
|
110
|
+
dependencies?: readonly string[];
|
|
111
|
+
fieldKey: string;
|
|
112
|
+
formTarget?: "binding" | "settings";
|
|
113
|
+
includeUnavailableSelectedOptions?: boolean;
|
|
114
|
+
toolFqn: string;
|
|
115
|
+
}>;
|
|
116
|
+
export type ToolSettingsOption = Readonly<{
|
|
117
|
+
available?: boolean;
|
|
118
|
+
id: string;
|
|
119
|
+
label: string;
|
|
120
|
+
}>;
|
|
121
|
+
export type ToolSettingsOptionPage = Readonly<{
|
|
122
|
+
hasMore?: boolean;
|
|
123
|
+
options: readonly ToolSettingsOption[];
|
|
124
|
+
}>;
|
|
125
|
+
export type ToolSettingsOptionsContext = Readonly<{
|
|
126
|
+
connectionCatalogs: Readonly<Record<string, JsonObject>>;
|
|
127
|
+
connectionCredentials: Readonly<Record<string, Readonly<Record<string, string | null>>>>;
|
|
128
|
+
dependencies: JsonObject;
|
|
129
|
+
fieldKey: string;
|
|
130
|
+
/** Requested options per page; providers page by it when present. */
|
|
131
|
+
limit?: number;
|
|
132
|
+
organizationId: string;
|
|
133
|
+
page: number;
|
|
134
|
+
parentId: string | null;
|
|
135
|
+
search: string | null;
|
|
136
|
+
settings: JsonObject;
|
|
137
|
+
templateFqn: string;
|
|
138
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JsonSchemaDocument } from "../schema/projection.js";
|
|
2
|
+
import type { WorkflowEditorDeclaration, WorkflowEditorOverrides } from "./workflows.js";
|
|
3
|
+
/**
|
|
4
|
+
* `format` value marking a configuration property whose value is itself a JSON
|
|
5
|
+
* Schema (a response or payload contract). Derived editors expose such a
|
|
6
|
+
* property as a structural, literal-only `schema_builder` field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkflowJsonSchemaFormat: "json-schema";
|
|
9
|
+
export type WorkflowEditorDerivationInput = Readonly<{
|
|
10
|
+
configSchema?: JsonSchemaDocument;
|
|
11
|
+
inputSchema?: JsonSchemaDocument;
|
|
12
|
+
overrides?: WorkflowEditorOverrides;
|
|
13
|
+
/**
|
|
14
|
+
* Top-level configuration keys that shape the node's ports (dynamic port
|
|
15
|
+
* lists, default ids, and port schema selectors). They derive as
|
|
16
|
+
* structural, literal-only fields and cannot accept expressions.
|
|
17
|
+
*/
|
|
18
|
+
structuralParameters?: readonly string[];
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Derives a workflow editor from projected node schemas with legacy rules:
|
|
22
|
+
* each top-level configuration property becomes a `parameter` field and each
|
|
23
|
+
* input property an `input_binding` field in the default `parameters`
|
|
24
|
+
* section. Overrides, keyed by those top-level bindings, may change any field
|
|
25
|
+
* attribute and place fields in other sections; every property stays covered
|
|
26
|
+
* exactly once.
|
|
27
|
+
*/
|
|
28
|
+
export declare const deriveWorkflowEditor: (input: WorkflowEditorDerivationInput) => WorkflowEditorDeclaration;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SchemaValue } from "../schema/source.js";
|
|
2
|
+
import type { ClassDeclaredComponent, WorkflowNodeClassDeclaration, WorkflowNodeImplementation } from "./authoring-core.js";
|
|
3
|
+
import type { WorkflowNodeDeclaration } from "./workflows.js";
|
|
4
|
+
export declare const declareWorkflowNode: <InputSchema, OutputSchema, Constructor extends new () => WorkflowNodeImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>> = new () => WorkflowNodeImplementation<SchemaValue<InputSchema>, SchemaValue<OutputSchema>>>(input: WorkflowNodeClassDeclaration<InputSchema, OutputSchema, Constructor>) => ClassDeclaredComponent<WorkflowNodeDeclaration, Constructor>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { JsonObject } from "../foundation/json.js";
|
|
2
|
+
import type { WorkflowNodeContract, WorkflowNodePortDeclaration } from "./workflows.js";
|
|
3
|
+
/** Why configuration could not derive a node's dynamic ports. */
|
|
4
|
+
export declare const WorkflowPortIssueCodes: readonly ["dynamic_port_config_invalid", "dynamic_port_config_not_fixed", "dynamic_port_count_invalid", "dynamic_port_id_duplicate", "dynamic_port_id_invalid", "port_schema_config_not_fixed"];
|
|
5
|
+
export type WorkflowPortIssueCode = (typeof WorkflowPortIssueCodes)[number];
|
|
6
|
+
export type WorkflowPortIssue = Readonly<{
|
|
7
|
+
code: WorkflowPortIssueCode;
|
|
8
|
+
message: string;
|
|
9
|
+
/** Location in the node configuration, starting at a top-level key. */
|
|
10
|
+
path: readonly (number | string)[];
|
|
11
|
+
}>;
|
|
12
|
+
export type WorkflowResolvedPorts = Readonly<{
|
|
13
|
+
issues: readonly WorkflowPortIssue[];
|
|
14
|
+
ports: readonly WorkflowNodePortDeclaration[];
|
|
15
|
+
}>;
|
|
16
|
+
export type WorkflowNodePortsContract = Pick<WorkflowNodeContract, "configSchema" | "dynamicPorts" | "ports">;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves a node's effective ports from its contract and authored
|
|
19
|
+
* configuration, like the legacy `compile_ports`: static inputs, inputs
|
|
20
|
+
* derived through `dynamicPorts.input`, outputs derived through
|
|
21
|
+
* `dynamicPorts.output` (list items, then the default id), and static
|
|
22
|
+
* outputs. Static ports take their `schemaResolution` variant schema.
|
|
23
|
+
* Configuration problems are returned as issues, never thrown; a
|
|
24
|
+
* derived id that repeats an earlier port of its direction is dropped.
|
|
25
|
+
*/
|
|
26
|
+
export declare const resolveWorkflowNodePorts: (contract: WorkflowNodePortsContract, config?: JsonObject) => WorkflowResolvedPorts;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../foundation/json.js";
|
|
2
|
+
export type PackageWorkflowPauseResumeContract = Readonly<{
|
|
3
|
+
approvalPolicyId?: string;
|
|
4
|
+
condition?: Readonly<{
|
|
5
|
+
kind: string;
|
|
6
|
+
payload: JsonObject;
|
|
7
|
+
}>;
|
|
8
|
+
decisions?: readonly string[];
|
|
9
|
+
mode: string;
|
|
10
|
+
payloadSchema?: JsonObject;
|
|
11
|
+
resumePorts: readonly string[];
|
|
12
|
+
summary?: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type PackageWorkflowNodeDirective = Readonly<{
|
|
15
|
+
directive: "pause";
|
|
16
|
+
expiresAt?: string;
|
|
17
|
+
outputSnapshot: JsonObject;
|
|
18
|
+
resumeContract: PackageWorkflowPauseResumeContract;
|
|
19
|
+
wakeAt?: string;
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
childInput: JsonObject;
|
|
22
|
+
childWorkflowId: string;
|
|
23
|
+
directive: "invoke_workflow";
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
config: JsonObject;
|
|
26
|
+
directive: "merge";
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
config: JsonObject;
|
|
29
|
+
directive: "loop";
|
|
30
|
+
inputs: JsonObject;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
classification: "business_error" | "intentional_stop";
|
|
33
|
+
directive: "stop";
|
|
34
|
+
fault: JsonObject;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
directive: "persist_artifact";
|
|
37
|
+
expiresAt?: string;
|
|
38
|
+
filename: string;
|
|
39
|
+
retentionState: "expires" | "legal_hold" | "retained";
|
|
40
|
+
role: "final" | "intermediate";
|
|
41
|
+
value: JsonValue;
|
|
42
|
+
}> | Readonly<{
|
|
43
|
+
directive: "prompt_text";
|
|
44
|
+
model?: "balanced" | "complex" | "fast" | "super_fast";
|
|
45
|
+
system: string;
|
|
46
|
+
user: string;
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
authorizedToolIds: readonly string[];
|
|
49
|
+
directive: "skill";
|
|
50
|
+
inputMessage: string;
|
|
51
|
+
pinnedVersionId?: string;
|
|
52
|
+
resolutionMode: "latest_at_run_start" | "pinned_at_publish";
|
|
53
|
+
schemaHash?: string;
|
|
54
|
+
skillId: string;
|
|
55
|
+
}> | Readonly<{
|
|
56
|
+
directive: "run_code";
|
|
57
|
+
language: "javascript" | "python";
|
|
58
|
+
runtimeId: string;
|
|
59
|
+
source: string;
|
|
60
|
+
value: JsonValue;
|
|
61
|
+
}> | Readonly<{
|
|
62
|
+
body: JsonValue;
|
|
63
|
+
directive: "http_request";
|
|
64
|
+
headers: Readonly<Record<string, string>>;
|
|
65
|
+
maxBytes: number;
|
|
66
|
+
method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT";
|
|
67
|
+
timeoutSeconds: number;
|
|
68
|
+
url: string;
|
|
69
|
+
}>;
|
|
70
|
+
export type PackageWorkflowNodeResult<Output> = Readonly<{
|
|
71
|
+
contextPatch?: JsonObject;
|
|
72
|
+
mainOutputPort?: string;
|
|
73
|
+
outputs: Output;
|
|
74
|
+
}> | PackageWorkflowNodeDirective;
|
|
75
|
+
export type PackageWorkflowNodeExecutionResult<Output> = PackageWorkflowNodeResult<Output>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JsonValue } from "../foundation/json.js";
|
|
2
|
+
import type { WorkflowEditorDeclaration, WorkflowFieldBindingDeclaration, WorkflowNodePortDeclaration } from "./workflows.js";
|
|
3
|
+
/** Port policy fields shared by authored and manifest port declarations. */
|
|
4
|
+
export type WorkflowPortPolicy = Pick<WorkflowNodePortDeclaration, "allowedTemplateFqns" | "allowedTemplateKinds" | "maxConnections" | "minConnections"> & Readonly<{
|
|
5
|
+
schemaResolution?: Readonly<{
|
|
6
|
+
variants: readonly Readonly<{
|
|
7
|
+
when: JsonValue;
|
|
8
|
+
}>[];
|
|
9
|
+
}>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const workflowBindingKey: (binding: WorkflowFieldBindingDeclaration) => string;
|
|
12
|
+
export declare const renderWorkflowBinding: (binding: WorkflowFieldBindingDeclaration) => string;
|
|
13
|
+
/** Explains why a port policy is inconsistent, or returns undefined. */
|
|
14
|
+
export declare const workflowPortPolicyViolation: (port: WorkflowPortPolicy) => string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Explains why an editor is inconsistent, or returns undefined: section ids
|
|
17
|
+
* and field bindings are unique, and every `visibleWhen` or remote
|
|
18
|
+
* `dependsOn` binding names a field of the same editor exactly.
|
|
19
|
+
*/
|
|
20
|
+
export declare const workflowEditorViolation: (editor: WorkflowEditorDeclaration) => string | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../foundation/json.js";
|
|
2
|
+
import type { JsonSchemaDocument } from "../schema/projection.js";
|
|
3
|
+
export type WorkflowSchemaLocation = Readonly<{
|
|
4
|
+
/** Every object on the path lists the next key in its `required`. */
|
|
5
|
+
required: boolean;
|
|
6
|
+
schema: JsonSchemaDocument;
|
|
7
|
+
}>;
|
|
8
|
+
/** Resolves local references and unwraps a single nullable branch. */
|
|
9
|
+
export declare const concreteSchema: (root: JsonSchemaDocument, schema: JsonSchemaDocument, seen?: ReadonlySet<string>) => JsonSchemaDocument;
|
|
10
|
+
/** The concrete item schema of an array schema, if it declares one. */
|
|
11
|
+
export declare const itemSchema: (root: JsonSchemaDocument, schema: JsonSchemaDocument) => JsonSchemaDocument | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Finds the concrete schema at a non-empty object property path, starting at
|
|
14
|
+
* `from` (the root by default). Local `$ref`s resolve against `root`, and a
|
|
15
|
+
* single nullable branch is unwrapped at every step.
|
|
16
|
+
*/
|
|
17
|
+
export declare const workflowSchemaAt: (root: JsonSchemaDocument, path: readonly (number | string)[], from?: JsonSchemaDocument) => WorkflowSchemaLocation | undefined;
|
|
18
|
+
/** Splits a dotted dynamic-port path into property segments. */
|
|
19
|
+
export declare const dottedPath: (path: string) => readonly string[];
|
|
20
|
+
export declare const isJsonObject: (value: JsonValue | undefined) => value is JsonObject;
|
|
21
|
+
/** Reads a JSON path of object keys and array indexes; misses are undefined. */
|
|
22
|
+
export declare const jsonAt: (value: JsonValue | undefined, path: readonly (number | string)[]) => JsonValue | undefined;
|