@collective-intelligence/extensions-sdk 0.2.1 → 0.2.3
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 +332 -368
- package/dist/access/application-gate.d.ts +36 -0
- package/dist/access/audience.d.ts +43 -0
- package/dist/access/capabilities.d.ts +105 -0
- package/dist/access/conditions.d.ts +136 -0
- package/dist/access/core-catalog.d.ts +221 -0
- package/dist/access/declarations.d.ts +169 -0
- package/dist/access/document-policy.d.ts +31 -0
- package/dist/access/index.d.ts +62 -0
- package/dist/access/knowledge-policy.d.ts +87 -0
- package/dist/access/manifest.d.ts +161 -0
- package/dist/access/readers.d.ts +114 -0
- package/dist/access/requirement.d.ts +61 -0
- package/dist/components/agents.d.ts +12 -30
- package/dist/components/authoring-core.d.ts +3 -1
- package/dist/components/base.d.ts +1 -1
- package/dist/components/connector-instances.d.ts +0 -3
- package/dist/components/declaration.d.ts +3 -2
- package/dist/components/document-collections.d.ts +3 -32
- package/dist/components/external-application.d.ts +18 -90
- package/dist/components/knowledge.d.ts +1 -164
- package/dist/components/metadata-authoring.d.ts +24 -21
- package/dist/components/organization-settings.d.ts +7 -2
- package/dist/components/service-principal.d.ts +9 -4
- package/dist/components/studio.d.ts +22 -44
- package/dist/components/tools.d.ts +15 -8
- package/dist/components/workflows.d.ts +7 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +2 -2
- package/dist/package/primitive-readers.d.ts +111 -24
- package/dist/package/readers.d.ts +2 -0
- package/dist/package/variables.d.ts +1 -2
- package/docs/effect.md +2 -2
- package/package.json +2 -2
- package/dist/package/policy-readers.d.ts +0 -23
|
@@ -10,13 +10,116 @@ import type * as K from "../components/knowledge.js";
|
|
|
10
10
|
import type * as Og from "../components/organization-group.js";
|
|
11
11
|
import type * as Oi from "../components/organization-instructions.js";
|
|
12
12
|
import type * as Os from "../components/organization-settings.js";
|
|
13
|
-
import type * as Sp from "../components/service-principal.js";
|
|
14
13
|
import type * as S from "../components/studio.js";
|
|
15
14
|
import type * as T from "../components/tools.js";
|
|
16
15
|
import type * as W from "../components/workflows.js";
|
|
17
16
|
import type { JsonObject } from "../foundation/json.js";
|
|
18
17
|
import type { ReadValue } from "./readers.js";
|
|
19
18
|
export declare const primitives: {
|
|
19
|
+
accessCapabilities: ReadValue<Readonly<{
|
|
20
|
+
description?: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
fqn: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
kind: "accessCapabilities";
|
|
25
|
+
tags?: readonly string[];
|
|
26
|
+
version: string;
|
|
27
|
+
}> & Readonly<{
|
|
28
|
+
grantableBy: import("../index.js").AccessGrantableBy;
|
|
29
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
30
|
+
nodes: Readonly<Record<string, import("../index.js").AccessCapabilityNodeDeclaration>>;
|
|
31
|
+
}> & JsonObject>;
|
|
32
|
+
accessDocumentDataPolicy: ReadValue<import("../index.js").AccessDocumentDataPolicyDeclaration>;
|
|
33
|
+
accessGrantAxis: ReadValue<Readonly<{
|
|
34
|
+
description?: string;
|
|
35
|
+
displayName: string;
|
|
36
|
+
fqn: string;
|
|
37
|
+
icon?: string;
|
|
38
|
+
kind: "accessGrantAxis";
|
|
39
|
+
tags?: readonly string[];
|
|
40
|
+
version: string;
|
|
41
|
+
}> & Readonly<{
|
|
42
|
+
hierarchy?: string;
|
|
43
|
+
label: string;
|
|
44
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
45
|
+
target: string;
|
|
46
|
+
}> & JsonObject>;
|
|
47
|
+
accessKnowledgeDataCondition: ReadValue<Readonly<{
|
|
48
|
+
description?: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
fqn: string;
|
|
51
|
+
icon?: string;
|
|
52
|
+
kind: "accessKnowledgeDataCondition";
|
|
53
|
+
tags?: readonly string[];
|
|
54
|
+
version: string;
|
|
55
|
+
}> & Readonly<{
|
|
56
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
57
|
+
target: string;
|
|
58
|
+
tests?: readonly import("../index.js").AccessConditionTest[];
|
|
59
|
+
where: import("../index.js").AccessCondition;
|
|
60
|
+
}> & JsonObject>;
|
|
61
|
+
accessKnowledgeDataPolicy: ReadValue<Readonly<{
|
|
62
|
+
description?: string;
|
|
63
|
+
displayName: string;
|
|
64
|
+
fqn: string;
|
|
65
|
+
icon?: string;
|
|
66
|
+
kind: "accessKnowledgeDataPolicy";
|
|
67
|
+
tags?: readonly string[];
|
|
68
|
+
version: string;
|
|
69
|
+
}> & Readonly<{
|
|
70
|
+
axes?: readonly import("../index.js").AccessPolicyAxis[];
|
|
71
|
+
capability: import("../index.js").AccessCapabilityRequirement;
|
|
72
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
73
|
+
operation: import("../index.js").AccessDataOperation;
|
|
74
|
+
otherAxes?: "unscoped";
|
|
75
|
+
purpose: import("../index.js").AccessPolicyPurpose;
|
|
76
|
+
readableFields?: import("../index.js").AccessFieldSelection;
|
|
77
|
+
target: string;
|
|
78
|
+
where?: import("../index.js").AccessCondition;
|
|
79
|
+
writableFields?: import("../index.js").AccessFieldSelection;
|
|
80
|
+
}> & JsonObject>;
|
|
81
|
+
accessMaxPrivileges: ReadValue<Readonly<{
|
|
82
|
+
description?: string;
|
|
83
|
+
displayName: string;
|
|
84
|
+
fqn: string;
|
|
85
|
+
icon?: string;
|
|
86
|
+
kind: "accessMaxPrivileges";
|
|
87
|
+
tags?: readonly string[];
|
|
88
|
+
version: string;
|
|
89
|
+
}> & Readonly<{
|
|
90
|
+
appliesTo: import("../index.js").AccessMaxPrivilegesTarget;
|
|
91
|
+
capabilities: readonly import("../index.js").AccessCapabilityGrant[];
|
|
92
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
93
|
+
}> & JsonObject>;
|
|
94
|
+
accessProfile: ReadValue<Readonly<{
|
|
95
|
+
description?: string;
|
|
96
|
+
displayName: string;
|
|
97
|
+
fqn: string;
|
|
98
|
+
icon?: string;
|
|
99
|
+
kind: "accessProfile";
|
|
100
|
+
tags?: readonly string[];
|
|
101
|
+
version: string;
|
|
102
|
+
}> & Readonly<{
|
|
103
|
+
audience: import("../index.js").AccessProfileAudience;
|
|
104
|
+
axes?: readonly string[];
|
|
105
|
+
canGrant?: import("../index.js").AccessCanGrant;
|
|
106
|
+
capabilities: readonly import("../index.js").AccessCapabilityGrant[];
|
|
107
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
108
|
+
}> & JsonObject>;
|
|
109
|
+
accessProfileGrant: ReadValue<Readonly<{
|
|
110
|
+
description?: string;
|
|
111
|
+
displayName: string;
|
|
112
|
+
fqn: string;
|
|
113
|
+
icon?: string;
|
|
114
|
+
kind: "accessProfileGrant";
|
|
115
|
+
tags?: readonly string[];
|
|
116
|
+
version: string;
|
|
117
|
+
}> & Readonly<{
|
|
118
|
+
axes?: Readonly<Record<string, import("../index.js").AccessKnowledgeEntityIdentifier>>;
|
|
119
|
+
grantee: import("../index.js").AccessGrantee;
|
|
120
|
+
lifecycle?: import("../index.js").LifecycleOptions;
|
|
121
|
+
profile: string;
|
|
122
|
+
}> & JsonObject>;
|
|
20
123
|
agent: ReadValue<Readonly<{
|
|
21
124
|
description?: string;
|
|
22
125
|
displayName: string;
|
|
@@ -28,7 +131,7 @@ export declare const primitives: {
|
|
|
28
131
|
}> & Readonly<{
|
|
29
132
|
dataAccess?: import("../index.js").DataAccess<"agent">;
|
|
30
133
|
activity?: Ag.AgentActivityPolicy;
|
|
31
|
-
audience?:
|
|
134
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
32
135
|
behavioralBoundaries: readonly string[];
|
|
33
136
|
bypassOrganizationInstructions?: boolean;
|
|
34
137
|
lifecycle: import("../index.js").LifecycleOptions;
|
|
@@ -313,22 +416,6 @@ export declare const primitives: {
|
|
|
313
416
|
normalizesImportedData?: boolean;
|
|
314
417
|
}> & JsonObject>;
|
|
315
418
|
knowledgeEntitySchema: ReadValue<K.KnowledgeEntitySchemaDeclaration>;
|
|
316
|
-
knowledgePolicy: (value: unknown, path: string) => Readonly<{
|
|
317
|
-
description?: string;
|
|
318
|
-
displayName: string;
|
|
319
|
-
fqn: string;
|
|
320
|
-
icon?: string;
|
|
321
|
-
kind: "knowledgePolicy";
|
|
322
|
-
tags?: readonly string[];
|
|
323
|
-
version: string;
|
|
324
|
-
}> & Readonly<{
|
|
325
|
-
effect: "allow" | "deny";
|
|
326
|
-
targetKind: "entity_domain" | "entity_schema";
|
|
327
|
-
policyBody: K.KnowledgePolicyBody;
|
|
328
|
-
policyType: "filter" | "gate";
|
|
329
|
-
priority?: number;
|
|
330
|
-
targetFqn: string;
|
|
331
|
-
}> & JsonObject;
|
|
332
419
|
managedDatasetProvider: ReadValue<Readonly<{
|
|
333
420
|
description?: string;
|
|
334
421
|
displayName: string;
|
|
@@ -438,7 +525,7 @@ export declare const primitives: {
|
|
|
438
525
|
kind: "remoteToolCollection";
|
|
439
526
|
tags?: readonly string[];
|
|
440
527
|
version: string;
|
|
441
|
-
}> & Pick<T.ToolCollectionDeclaration, "
|
|
528
|
+
}> & Pick<T.ToolCollectionDeclaration, "audience" | "category"> & Readonly<{
|
|
442
529
|
gatewayRef: string;
|
|
443
530
|
operationReferences: readonly string[];
|
|
444
531
|
}> & JsonObject>;
|
|
@@ -452,7 +539,6 @@ export declare const primitives: {
|
|
|
452
539
|
version: string;
|
|
453
540
|
}> & Readonly<{
|
|
454
541
|
groups: readonly string[];
|
|
455
|
-
organizationRole: Sp.ServicePrincipalOrganizationRole;
|
|
456
542
|
}> & JsonObject>;
|
|
457
543
|
skill: ReadValue<Readonly<{
|
|
458
544
|
description?: string;
|
|
@@ -463,6 +549,7 @@ export declare const primitives: {
|
|
|
463
549
|
tags?: readonly string[];
|
|
464
550
|
version: string;
|
|
465
551
|
}> & Readonly<{
|
|
552
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
466
553
|
dataAccess?: import("../index.js").DataAccess<"skill">;
|
|
467
554
|
instructions: string;
|
|
468
555
|
lifecycle: import("../index.js").LifecycleOptions;
|
|
@@ -490,10 +577,8 @@ export declare const primitives: {
|
|
|
490
577
|
tags?: readonly string[];
|
|
491
578
|
version: string;
|
|
492
579
|
}> & Readonly<{
|
|
580
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
493
581
|
definition: S.StudioAppDefinition;
|
|
494
|
-
grants: Readonly<{
|
|
495
|
-
groups: readonly S.StudioAppGrant[];
|
|
496
|
-
}>;
|
|
497
582
|
lifecycle: S.StudioAppLifecycle;
|
|
498
583
|
}> & JsonObject>;
|
|
499
584
|
studioAppTemplate: ReadValue<Readonly<{
|
|
@@ -539,6 +624,7 @@ export declare const primitives: {
|
|
|
539
624
|
version: string;
|
|
540
625
|
}> & Readonly<{
|
|
541
626
|
allowMultipleSkillBindings?: boolean;
|
|
627
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
542
628
|
autoActivate?: boolean;
|
|
543
629
|
autoInstantiate?: boolean;
|
|
544
630
|
bindingScopes?: readonly B.BindingScope[];
|
|
@@ -567,8 +653,8 @@ export declare const primitives: {
|
|
|
567
653
|
tags?: readonly string[];
|
|
568
654
|
version: string;
|
|
569
655
|
}> & Readonly<{
|
|
656
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
570
657
|
category?: string;
|
|
571
|
-
defaultVisibility?: readonly T.ToolCollectionVisibilityGrant[];
|
|
572
658
|
tags?: readonly string[];
|
|
573
659
|
toolFqns: readonly string[];
|
|
574
660
|
}> & JsonObject>;
|
|
@@ -599,6 +685,7 @@ export declare const primitives: {
|
|
|
599
685
|
tags?: readonly string[];
|
|
600
686
|
version: string;
|
|
601
687
|
}> & Readonly<{
|
|
688
|
+
audience?: import("../index.js").AccessAudienceDeclaration;
|
|
602
689
|
dataAccess?: import("../index.js").DataAccess<"workflow">;
|
|
603
690
|
definition: W.WorkflowAuthoringDefinition;
|
|
604
691
|
lifecycle: import("../index.js").LifecycleOptions;
|
|
@@ -41,6 +41,8 @@ export declare const varyingObject: <A extends object>(fields: Fields<InnerVaryi
|
|
|
41
41
|
export declare const substituted: <A extends Authored, Authored>(read: ReadValue<Authored>) => ReadValue<A>;
|
|
42
42
|
/** Rejects a structurally valid value that breaks a cross-field rule. */
|
|
43
43
|
export declare const refine: <A>(read: ReadValue<A>, violation: (value: A) => string | undefined) => ReadValue<A>;
|
|
44
|
+
/** A `refine` violation for an object that holds a member outside `keys`. */
|
|
45
|
+
export declare const onlyKeys: (...keys: readonly string[]) => (value: JsonObject) => string | undefined;
|
|
44
46
|
export declare const strings: ReadValue<readonly string[]>;
|
|
45
47
|
export declare const optString: ReadValue<string | undefined>;
|
|
46
48
|
export declare const optBoolean: ReadValue<boolean | undefined>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { KnowledgeConnectorBindingExtraConfig, KnowledgeConnectorFieldMapRule } from "../components/connectors.js";
|
|
2
|
-
import type { KnowledgePolicyBody } from "../components/knowledge.js";
|
|
3
2
|
import type { JsonPrimitive, JsonValue } from "../foundation/json.js";
|
|
4
3
|
import type { PortableFormDefinition } from "../schema/forms.js";
|
|
5
4
|
import type { PackageSchemaProjection } from "../schema/projection.js";
|
|
@@ -60,7 +59,7 @@ export type VaryingStructure<Value> = Value | PackageVariable<JsonValue>;
|
|
|
60
59
|
*/
|
|
61
60
|
export type VaryingExcludedKey = "fqn" | "kind" | "lifecycle" | "version" | `${string}Fqn`;
|
|
62
61
|
/** Structural values whose inside keeps the declared shape. */
|
|
63
|
-
type VaryingAtom = KnowledgeConnectorBindingExtraConfig | KnowledgeConnectorFieldMapRule |
|
|
62
|
+
type VaryingAtom = KnowledgeConnectorBindingExtraConfig | KnowledgeConnectorFieldMapRule | PackageSchemaProjection | PortableFormDefinition;
|
|
64
63
|
type Nullish<Value> = Extract<Value, null | undefined>;
|
|
65
64
|
type Present<Value> = Exclude<Value, null | undefined>;
|
|
66
65
|
/**
|
package/docs/effect.md
CHANGED
|
@@ -15,8 +15,8 @@ Each SDK of the extension family has an `/effect` entry and `effect`
|
|
|
15
15
|
|
|
16
16
|
- Import declarations from the root of `extensions-sdk`, also in an Effect
|
|
17
17
|
package. An empty `/effect` is the convention, not a gap.
|
|
18
|
-
- `extensions-sdk-backend-effect` is
|
|
19
|
-
`extensions-sdk-backend/effect`
|
|
18
|
+
- The package `extensions-sdk-backend-effect` is removed after its last
|
|
19
|
+
version 0.2.0. Import `extensions-sdk-backend/effect` instead.
|
|
20
20
|
- `ci package build` bundles each SDK `/effect` entry into the release and
|
|
21
21
|
keeps the root entries Host-provided. An earlier `ci` CLI keeps `/effect`
|
|
22
22
|
external, and `ci package validate` rejects that release: use a CLI that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/extensions-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Framework-neutral authoring contracts for Collective Intelligence extension packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"typescript": "7.0.2",
|
|
59
59
|
"ultracite": "7.10.7"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "1718b80bc8d0ba696d78ac8f5f905c8dc46fe0c5"
|
|
62
62
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { KnowledgePolicyDeclaration, KnowledgePolicyPredicate } from "../components/knowledge.js";
|
|
2
|
-
import type { ReadValue } from "./readers.js";
|
|
3
|
-
export declare const policyPredicate: ReadValue<KnowledgePolicyPredicate>;
|
|
4
|
-
export declare const policyBody: ReadValue<Readonly<{
|
|
5
|
-
subjectMatch: KnowledgePolicyPredicate;
|
|
6
|
-
rule?: KnowledgePolicyPredicate;
|
|
7
|
-
writableFields?: readonly (readonly string[])[];
|
|
8
|
-
}> & import("../index.js").JsonObject>;
|
|
9
|
-
/** Only an allow filter policy on entities may hold a field write rule. */
|
|
10
|
-
export declare const fieldWriteRule: <A extends Pick<KnowledgePolicyDeclaration, "effect" | "policyBody" | "policyType" | "targetKind">>(policy: A, path: string) => A;
|
|
11
|
-
/** Only a policy on one entity schema may follow its Reference Fields. */
|
|
12
|
-
export declare const relationScopeRule: <A extends Pick<KnowledgePolicyDeclaration, "policyBody" | "targetKind">>(policy: A, path: string) => A;
|
|
13
|
-
export declare const policyFields: {
|
|
14
|
-
effect: ReadValue<"allow" | "deny">;
|
|
15
|
-
policyBody: ReadValue<Readonly<{
|
|
16
|
-
subjectMatch: KnowledgePolicyPredicate;
|
|
17
|
-
rule?: KnowledgePolicyPredicate;
|
|
18
|
-
writableFields?: readonly (readonly string[])[];
|
|
19
|
-
}> & import("../index.js").JsonObject>;
|
|
20
|
-
policyType: ReadValue<"filter" | "gate">;
|
|
21
|
-
targetFqn: ReadValue<string>;
|
|
22
|
-
targetKind: ReadValue<"entity_domain" | "entity_schema">;
|
|
23
|
-
};
|