@collective-intelligence/extensions-sdk 0.1.1 → 0.1.2
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 +133 -12
- package/dist/components/agents.d.ts +3 -3
- package/dist/components/authoring-core.d.ts +2 -2
- package/dist/components/base.d.ts +1 -1
- package/dist/components/connector-instances.d.ts +9 -0
- package/dist/components/connectors.d.ts +13 -0
- package/dist/components/declaration.d.ts +2 -2
- package/dist/components/executable-authoring.d.ts +6 -1
- package/dist/components/external-application.d.ts +9 -1
- package/dist/components/knowledge.d.ts +3 -3
- package/dist/components/workflow-results.d.ts +14 -0
- package/dist/components/workflows.d.ts +6 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/package/definition.d.ts +3 -3
- package/dist/package/knowledge-readers.d.ts +6 -6
- package/dist/package/primitive-readers.d.ts +14 -0
- package/dist/package/readers.d.ts +3 -62
- package/dist/release/stored-manifest.d.ts +3 -2
- package/dist/schema/forms.d.ts +48 -5
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ClassDeclaredComponent, ConnectionImplementation, DeclaredComponent, DocumentsConnectorImplementation, ErasedWorkflowFieldImplementation, EventListenerImplementation, FieldTransformerImplementation, KnowledgeConnectorImplementation, KnowledgeConnectorOAuthImplementation, KnowledgeEntityAdapterImplementation, KnowledgeRelationAdapterImplementation, MetadataComponentManifest, NotificationChannelImplementation, PackageSchemaRuntimeSidecar, ToolImplementationConstructor, ToolSettingsOptionsImplementation, WorkflowNodeImplementationConstructor } from "../components/authoring-core.js";
|
|
2
|
-
import type { ConnectionDeclaration, DocumentsConnectorDeclaration, DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration, EventListenerDeclaration, KnowledgeConnectorDeclaration, KnowledgeConnectorOAuthDeclaration, KnowledgeEntityAdapterDeclaration, KnowledgeRelationAdapterDeclaration, OrganizationSsoDeclaration } from "../components/connectors.js";
|
|
2
|
+
import type { ConnectionDeclaration, DocumentsConnectorDeclaration, DatasetParserDeclaration, ExternalDatasetProviderDeclaration, ManagedDatasetProviderDeclaration, EmailProviderDeclaration, EventListenerDeclaration, KnowledgeConnectorDeclaration, KnowledgeConnectorOAuthDeclaration, KnowledgeEntityAdapterDeclaration, KnowledgeRelationAdapterDeclaration, OrganizationSsoDeclaration } from "../components/connectors.js";
|
|
3
3
|
import type { DatasetParserImplementation } from "../components/dataset-parser.js";
|
|
4
4
|
import type { ExternalDatasetProviderImplementation, ManagedDatasetProviderImplementation } from "../components/datasets.js";
|
|
5
|
-
import type { OrganizationSsoImplementation } from "../components/executable-authoring.js";
|
|
5
|
+
import type { EmailProviderImplementation, OrganizationSsoImplementation } from "../components/executable-authoring.js";
|
|
6
6
|
import type { FieldTransformerDeclaration, NotificationChannelDeclaration, ToolDeclaration, ToolSettingsOptionsDeclaration } from "../components/tools.js";
|
|
7
7
|
import type { WorkflowFieldDeclaration, WorkflowNodeDeclaration } from "../components/workflows.js";
|
|
8
8
|
import type { HostedContributionDeclaration } from "../hosted/contributions.js";
|
|
9
9
|
import type { PackageManifest } from "./manifest.js";
|
|
10
|
-
export type DeclaredPackageComponent = ClassDeclaredComponent<DatasetParserDeclaration, new () => DatasetParserImplementation> | ClassDeclaredComponent<ExternalDatasetProviderDeclaration, new () => ExternalDatasetProviderImplementation> | ClassDeclaredComponent<ManagedDatasetProviderDeclaration, new () => ManagedDatasetProviderImplementation> | ClassDeclaredComponent<OrganizationSsoDeclaration, new () => OrganizationSsoImplementation> | ClassDeclaredComponent<ToolDeclaration, ToolImplementationConstructor> | ClassDeclaredComponent<ConnectionDeclaration, new () => ConnectionImplementation<unknown>> | ClassDeclaredComponent<DocumentsConnectorDeclaration, new () => DocumentsConnectorImplementation> | ClassDeclaredComponent<KnowledgeConnectorDeclaration, new () => KnowledgeConnectorImplementation> | ClassDeclaredComponent<KnowledgeConnectorOAuthDeclaration, new () => KnowledgeConnectorOAuthImplementation> | ClassDeclaredComponent<WorkflowNodeDeclaration, WorkflowNodeImplementationConstructor> | ClassDeclaredComponent<WorkflowFieldDeclaration, new () => ErasedWorkflowFieldImplementation> | ClassDeclaredComponent<EventListenerDeclaration, new () => EventListenerImplementation> | ClassDeclaredComponent<KnowledgeEntityAdapterDeclaration, new () => KnowledgeEntityAdapterImplementation> | ClassDeclaredComponent<KnowledgeRelationAdapterDeclaration, new () => KnowledgeRelationAdapterImplementation> | ClassDeclaredComponent<FieldTransformerDeclaration, new () => FieldTransformerImplementation> | ClassDeclaredComponent<NotificationChannelDeclaration, new () => NotificationChannelImplementation> | ClassDeclaredComponent<ToolSettingsOptionsDeclaration, new () => ToolSettingsOptionsImplementation> | DeclaredComponent<MetadataComponentManifest>;
|
|
10
|
+
export type DeclaredPackageComponent = ClassDeclaredComponent<DatasetParserDeclaration, new () => DatasetParserImplementation> | ClassDeclaredComponent<ExternalDatasetProviderDeclaration, new () => ExternalDatasetProviderImplementation> | ClassDeclaredComponent<ManagedDatasetProviderDeclaration, new () => ManagedDatasetProviderImplementation> | ClassDeclaredComponent<OrganizationSsoDeclaration, new () => OrganizationSsoImplementation> | ClassDeclaredComponent<EmailProviderDeclaration, new () => EmailProviderImplementation> | ClassDeclaredComponent<ToolDeclaration, ToolImplementationConstructor> | ClassDeclaredComponent<ConnectionDeclaration, new () => ConnectionImplementation<unknown>> | ClassDeclaredComponent<DocumentsConnectorDeclaration, new () => DocumentsConnectorImplementation> | ClassDeclaredComponent<KnowledgeConnectorDeclaration, new () => KnowledgeConnectorImplementation> | ClassDeclaredComponent<KnowledgeConnectorOAuthDeclaration, new () => KnowledgeConnectorOAuthImplementation> | ClassDeclaredComponent<WorkflowNodeDeclaration, WorkflowNodeImplementationConstructor> | ClassDeclaredComponent<WorkflowFieldDeclaration, new () => ErasedWorkflowFieldImplementation> | ClassDeclaredComponent<EventListenerDeclaration, new () => EventListenerImplementation> | ClassDeclaredComponent<KnowledgeEntityAdapterDeclaration, new () => KnowledgeEntityAdapterImplementation> | ClassDeclaredComponent<KnowledgeRelationAdapterDeclaration, new () => KnowledgeRelationAdapterImplementation> | ClassDeclaredComponent<FieldTransformerDeclaration, new () => FieldTransformerImplementation> | ClassDeclaredComponent<NotificationChannelDeclaration, new () => NotificationChannelImplementation> | ClassDeclaredComponent<ToolSettingsOptionsDeclaration, new () => ToolSettingsOptionsImplementation> | DeclaredComponent<MetadataComponentManifest>;
|
|
11
11
|
/** Backwards-compatible name for the discriminated package component union. */
|
|
12
12
|
export type PackageComponent = DeclaredPackageComponent;
|
|
13
13
|
export type DeclaredPackageManifest = PackageManifest;
|
|
@@ -6,15 +6,15 @@ export declare const fieldSemantics: import("./readers.js").ReadValue<Readonly<{
|
|
|
6
6
|
indexContent?: boolean;
|
|
7
7
|
indexOverview?: boolean;
|
|
8
8
|
indexed?: boolean;
|
|
9
|
-
managedProjectionSource?: "
|
|
9
|
+
managedProjectionSource?: "organization_group" | "organization_user";
|
|
10
10
|
queryGuidance?: string;
|
|
11
11
|
unique?: boolean;
|
|
12
12
|
}> & import("../index.js").JsonObject>;
|
|
13
13
|
export declare const managedProjection: import("./readers.js").ReadValue<Readonly<{
|
|
14
14
|
connectorPolicy: "allow" | "deny_schema";
|
|
15
15
|
genericMutationPolicy: "deny_managed_fields" | "deny_schema";
|
|
16
|
-
kind: "directory_person" | "
|
|
17
|
-
source: "
|
|
16
|
+
kind: "directory_person" | "directory_person_in_group" | "directory_group" | "directory_group_parent";
|
|
17
|
+
source: "organization_group" | "organization_group_hierarchy" | "organization_group_membership" | "organization_user";
|
|
18
18
|
}> & import("../index.js").JsonObject>;
|
|
19
19
|
export declare const fieldLocalization: import("./readers.js").ReadValue<Readonly<{
|
|
20
20
|
description?: K.LocalizedFieldText;
|
|
@@ -118,7 +118,7 @@ export declare const knowledgeSchema: {
|
|
|
118
118
|
indexContent?: boolean;
|
|
119
119
|
indexOverview?: boolean;
|
|
120
120
|
indexed?: boolean;
|
|
121
|
-
managedProjectionSource?: "
|
|
121
|
+
managedProjectionSource?: "organization_group" | "organization_user";
|
|
122
122
|
queryGuidance?: string;
|
|
123
123
|
unique?: boolean;
|
|
124
124
|
}> & import("../index.js").JsonObject>> | undefined>;
|
|
@@ -126,8 +126,8 @@ export declare const knowledgeSchema: {
|
|
|
126
126
|
managedProjection: import("./readers.js").ReadValue<(Readonly<{
|
|
127
127
|
connectorPolicy: "allow" | "deny_schema";
|
|
128
128
|
genericMutationPolicy: "deny_managed_fields" | "deny_schema";
|
|
129
|
-
kind: "directory_person" | "
|
|
130
|
-
source: "
|
|
129
|
+
kind: "directory_person" | "directory_person_in_group" | "directory_group" | "directory_group_parent";
|
|
130
|
+
source: "organization_group" | "organization_group_hierarchy" | "organization_group_membership" | "organization_user";
|
|
131
131
|
}> & import("../index.js").JsonObject) | undefined>;
|
|
132
132
|
schema: import("./readers.js").ReadValue<Readonly<{
|
|
133
133
|
dialect: typeof import("../index.js").Draft202012Dialect;
|
|
@@ -155,6 +155,19 @@ export declare const primitives: {
|
|
|
155
155
|
entitySchemaFqns: readonly string[];
|
|
156
156
|
relationSchemaFqns: readonly string[];
|
|
157
157
|
}> & import("../index.js").JsonObject>;
|
|
158
|
+
emailProvider: ReadValue<Readonly<{
|
|
159
|
+
description?: string;
|
|
160
|
+
displayName: string;
|
|
161
|
+
fqn: string;
|
|
162
|
+
icon?: string;
|
|
163
|
+
kind: "emailProvider";
|
|
164
|
+
tags?: readonly string[];
|
|
165
|
+
version: string;
|
|
166
|
+
}> & Readonly<{
|
|
167
|
+
connectionTemplateFqn: string;
|
|
168
|
+
deploymentIdentity?: "aws";
|
|
169
|
+
senderKind: "address" | "mailbox";
|
|
170
|
+
}> & import("../index.js").JsonObject>;
|
|
158
171
|
eventListener: ReadValue<Readonly<{
|
|
159
172
|
description?: string;
|
|
160
173
|
displayName: string;
|
|
@@ -196,6 +209,7 @@ export declare const primitives: {
|
|
|
196
209
|
audience: string;
|
|
197
210
|
lifecycle: import("../index.js").LifecycleOptions;
|
|
198
211
|
postLogoutRedirectUris: readonly string[];
|
|
212
|
+
primaryRedirectUri?: string;
|
|
199
213
|
redirectUris: readonly string[];
|
|
200
214
|
scopes: readonly string[];
|
|
201
215
|
setupInstructions?: string;
|
|
@@ -105,37 +105,8 @@ export declare const selectOptions: ReadValue<Readonly<{
|
|
|
105
105
|
retryable?: boolean;
|
|
106
106
|
}>;
|
|
107
107
|
}> & JsonObject>;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"ui:placeholder"?: string;
|
|
111
|
-
"ui:help"?: string;
|
|
112
|
-
"ui:disabled"?: boolean;
|
|
113
|
-
"ui:readonly"?: boolean;
|
|
114
|
-
"ui:order"?: number;
|
|
115
|
-
"ui:suggestedName"?: string;
|
|
116
|
-
"ui:validation"?: readonly F.FieldValidationRule[];
|
|
117
|
-
"ui:options"?: Readonly<{
|
|
118
|
-
options?: readonly (string | Readonly<{
|
|
119
|
-
value: string;
|
|
120
|
-
label?: string;
|
|
121
|
-
locked?: boolean;
|
|
122
|
-
}>)[];
|
|
123
|
-
allowCustom?: boolean;
|
|
124
|
-
searchable?: boolean;
|
|
125
|
-
allowClear?: boolean;
|
|
126
|
-
dataSource?: string;
|
|
127
|
-
dependencies?: readonly string[];
|
|
128
|
-
submit?: boolean;
|
|
129
|
-
readonlyOnUpdate?: boolean;
|
|
130
|
-
preventSaveWhenEmpty?: boolean;
|
|
131
|
-
selectionMetadataField?: string;
|
|
132
|
-
aiFill?: Readonly<{
|
|
133
|
-
prompt: string;
|
|
134
|
-
buttonLabel?: string;
|
|
135
|
-
retryable?: boolean;
|
|
136
|
-
}>;
|
|
137
|
-
}>;
|
|
138
|
-
}> & JsonObject>;
|
|
108
|
+
/** Reads a field's presentation by its widget; an unknown widget is invalid. */
|
|
109
|
+
export declare const fieldUi: ReadValue<F.FieldUiSchema>;
|
|
139
110
|
export declare const formItems: ReadValue<readonly (string | (Readonly<{
|
|
140
111
|
md: string;
|
|
141
112
|
}> & JsonObject))[]>;
|
|
@@ -168,37 +139,7 @@ export declare const form: ReadValue<Readonly<{
|
|
|
168
139
|
}> | null;
|
|
169
140
|
}>[];
|
|
170
141
|
layout?: F.FormLayout;
|
|
171
|
-
uiSchema?: Partial<Record<string,
|
|
172
|
-
"ui:widget"?: F.FormWidget;
|
|
173
|
-
"ui:placeholder"?: string;
|
|
174
|
-
"ui:help"?: string;
|
|
175
|
-
"ui:disabled"?: boolean;
|
|
176
|
-
"ui:readonly"?: boolean;
|
|
177
|
-
"ui:order"?: number;
|
|
178
|
-
"ui:suggestedName"?: string;
|
|
179
|
-
"ui:validation"?: readonly F.FieldValidationRule[];
|
|
180
|
-
"ui:options"?: Readonly<{
|
|
181
|
-
options?: readonly (string | Readonly<{
|
|
182
|
-
value: string;
|
|
183
|
-
label?: string;
|
|
184
|
-
locked?: boolean;
|
|
185
|
-
}>)[];
|
|
186
|
-
allowCustom?: boolean;
|
|
187
|
-
searchable?: boolean;
|
|
188
|
-
allowClear?: boolean;
|
|
189
|
-
dataSource?: string;
|
|
190
|
-
dependencies?: readonly string[];
|
|
191
|
-
submit?: boolean;
|
|
192
|
-
readonlyOnUpdate?: boolean;
|
|
193
|
-
preventSaveWhenEmpty?: boolean;
|
|
194
|
-
selectionMetadataField?: string;
|
|
195
|
-
aiFill?: Readonly<{
|
|
196
|
-
prompt: string;
|
|
197
|
-
buttonLabel?: string;
|
|
198
|
-
retryable?: boolean;
|
|
199
|
-
}>;
|
|
200
|
-
}>;
|
|
201
|
-
}>>>;
|
|
142
|
+
uiSchema?: Partial<Record<string, F.FieldUiSchema<string>>>;
|
|
202
143
|
updateSections?: readonly Readonly<{
|
|
203
144
|
title?: string | null;
|
|
204
145
|
description?: string | null;
|
|
@@ -2,8 +2,9 @@ import type { JsonObject } from "../foundation/json.js";
|
|
|
2
2
|
import type { ExtensionReleaseManifest } from "./manifest.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns a stored release manifest whose retained primitive declarations use
|
|
5
|
-
* the current spelling: current kind names,
|
|
6
|
-
*
|
|
5
|
+
* the current spelling: current kind names, an Agent `audience` in place of
|
|
6
|
+
* `invokingApplicationFqns`, and Organization Group names in place of
|
|
7
|
+
* Organization Team names. The mapping is a one-to-one rename of
|
|
7
8
|
* retired spellings; every other value is returned as is. A reader that
|
|
8
9
|
* executes the release archive compares the verbatim stored JSON with the
|
|
9
10
|
* archive before it calls this function.
|
package/dist/schema/forms.d.ts
CHANGED
|
@@ -2,11 +2,17 @@ import type { JsonValue } from "../foundation/json.js";
|
|
|
2
2
|
import type { PackageSchemaProjection } from "./projection.js";
|
|
3
3
|
import type { PackageDecoderSource } from "./source.js";
|
|
4
4
|
export type FormLayout = "stacked" | "two_column";
|
|
5
|
+
/** Widgets that take no options. */
|
|
6
|
+
export declare const plainFormWidgets: readonly ["checkbox", "color", "date", "date_range", "datetime", "email", "file", "hidden", "number", "password", "structured_file_preview", "switch", "text", "textarea", "variable_references"];
|
|
7
|
+
export type PlainFormWidget = (typeof plainFormWidgets)[number];
|
|
8
|
+
/** Widgets that choose among options and take `SelectOptions`. */
|
|
9
|
+
export declare const selectFormWidgets: readonly ["folders_explorer", "multi_select", "radio", "select"];
|
|
10
|
+
export type SelectFormWidget = (typeof selectFormWidgets)[number];
|
|
5
11
|
/**
|
|
6
|
-
* Renderer identifier
|
|
7
|
-
*
|
|
12
|
+
* Renderer identifier. The set is closed: each widget has one renderer in the
|
|
13
|
+
* consuming product and one options contract here.
|
|
8
14
|
*/
|
|
9
|
-
export type FormWidget =
|
|
15
|
+
export type FormWidget = PlainFormWidget | SelectFormWidget | "structured_file_browser" | "structured_file_upload";
|
|
10
16
|
export type FieldValidationRule = Readonly<{
|
|
11
17
|
type: "required";
|
|
12
18
|
code?: string;
|
|
@@ -54,6 +60,22 @@ export type SelectOptions<Field extends string = string> = Readonly<{
|
|
|
54
60
|
selectionMetadataField?: Field;
|
|
55
61
|
aiFill?: DynamicFormAiFillConfig;
|
|
56
62
|
}>;
|
|
63
|
+
/** Options of the upload control for a manual structured-file source. */
|
|
64
|
+
export type StructuredFileUploadOptions<Field extends string = string> = Readonly<{
|
|
65
|
+
/** Field that receives the format inferred from the uploaded file. */
|
|
66
|
+
formatField?: Field;
|
|
67
|
+
}>;
|
|
68
|
+
/** Options of the browser that picks a file from a connected source. */
|
|
69
|
+
export type StructuredFileBrowserOptions<Field extends string = string> = Readonly<{
|
|
70
|
+
/** The source contribution that lists the files and its connection slot. */
|
|
71
|
+
contribution: Readonly<{
|
|
72
|
+
componentFqn: string;
|
|
73
|
+
connectionSlot: string;
|
|
74
|
+
}>;
|
|
75
|
+
label?: string;
|
|
76
|
+
/** Field that receives the format of the picked file. */
|
|
77
|
+
formatField?: Field;
|
|
78
|
+
}>;
|
|
57
79
|
export type VisibilityCondition<Field extends string = string> = Readonly<{
|
|
58
80
|
field: Field;
|
|
59
81
|
equals?: JsonValue;
|
|
@@ -67,8 +89,7 @@ export type FieldVisibilityRule<Field extends string = string> = Readonly<{
|
|
|
67
89
|
visibleWhen: VisibilityCondition<Field> | readonly VisibilityCondition<Field>[];
|
|
68
90
|
logic?: "and" | "or";
|
|
69
91
|
}>;
|
|
70
|
-
|
|
71
|
-
"ui:widget"?: FormWidget;
|
|
92
|
+
type FieldUiBase = Readonly<{
|
|
72
93
|
"ui:placeholder"?: string;
|
|
73
94
|
"ui:help"?: string;
|
|
74
95
|
"ui:disabled"?: boolean;
|
|
@@ -76,8 +97,29 @@ export type FieldUiSchema<Field extends string = string> = Readonly<{
|
|
|
76
97
|
"ui:order"?: number;
|
|
77
98
|
"ui:suggestedName"?: string;
|
|
78
99
|
"ui:validation"?: readonly FieldValidationRule[];
|
|
100
|
+
}>;
|
|
101
|
+
export type PlainFieldUi = FieldUiBase & Readonly<{
|
|
102
|
+
"ui:widget": PlainFormWidget;
|
|
103
|
+
"ui:options"?: never;
|
|
104
|
+
}>;
|
|
105
|
+
/**
|
|
106
|
+
* Without a widget the renderer infers one from the field schema, and the
|
|
107
|
+
* select options apply to the inferred control.
|
|
108
|
+
*/
|
|
109
|
+
export type SelectFieldUi<Field extends string = string> = FieldUiBase & Readonly<{
|
|
110
|
+
"ui:widget"?: SelectFormWidget;
|
|
79
111
|
"ui:options"?: SelectOptions<Field>;
|
|
80
112
|
}>;
|
|
113
|
+
export type StructuredFileUploadFieldUi<Field extends string = string> = FieldUiBase & Readonly<{
|
|
114
|
+
"ui:widget": "structured_file_upload";
|
|
115
|
+
"ui:options"?: StructuredFileUploadOptions<Field>;
|
|
116
|
+
}>;
|
|
117
|
+
export type StructuredFileBrowserFieldUi<Field extends string = string> = FieldUiBase & Readonly<{
|
|
118
|
+
"ui:widget": "structured_file_browser";
|
|
119
|
+
"ui:options": StructuredFileBrowserOptions<Field>;
|
|
120
|
+
}>;
|
|
121
|
+
/** Presentation of one field; `ui:widget` selects the options contract. */
|
|
122
|
+
export type FieldUiSchema<Field extends string = string> = PlainFieldUi | SelectFieldUi<Field> | StructuredFileUploadFieldUi<Field> | StructuredFileBrowserFieldUi<Field>;
|
|
81
123
|
export type FormMarkdownBlock = Readonly<{
|
|
82
124
|
md: string;
|
|
83
125
|
}>;
|
|
@@ -115,3 +157,4 @@ export type FormDefinition<Field extends string = string, Schema extends FormSch
|
|
|
115
157
|
export type PortableFormDefinition<Field extends string = string> = FormMetadata<Field> & Readonly<{
|
|
116
158
|
schema: PackageSchemaProjection;
|
|
117
159
|
}>;
|
|
160
|
+
export {};
|
package/package.json
CHANGED