@collective-intelligence/extensions-sdk-frontend-react 0.5.0 → 0.6.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 CHANGED
@@ -54,6 +54,14 @@ does not expose the retired leaf `declareStudioView` or
54
54
  the serialized package manifest. It identifies the same package's hosted
55
55
  Studio contribution; it is not a source path or an alternate runtime URL.
56
56
 
57
+ `needs` is an optional list of `AccessTarget` values (the type is exported by
58
+ `@collective-intelligence/extensions-sdk`): what the user must be allowed to
59
+ use for the component to render, such as
60
+ `[{ kind: "intent", fqn: "com.acme.crm.intents.create-plan" }]`. Studio checks
61
+ the needs of every widget on a page in one Access Check and does not render a
62
+ widget whose need answers `denied`. It is a display hint only: the backend
63
+ checks every call. A component without `needs` always renders.
64
+
57
65
  ## Frontend runtime
58
66
 
59
67
  The `frontend` entrypoint provides the shared React execution boundary for
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{declareStudioApp as d,declareStudioAppTemplate as m}from"@collective-intelligence/extensions-sdk";import{assertConsumerProfile as r,canonicalJson as p,normalizePackageSchemaProjection as c}from"@collective-intelligence/extensions-sdk";var s=(o)=>{try{p(o)}catch(e){let t=e instanceof Error?e.message:String(e);throw TypeError(`Studio declaration must be serializable JSON: ${t}`,{cause:e})}},a=(o)=>{let e=o.definition.propsSchema,t=`studio_component:${o.manifest.fqn}.propsSchema`,n=c(e.project("input"));r(n,"studio_props",t);let i={category:o.definition.category,...o.definition.composition===void 0?void 0:{composition:o.definition.composition},...o.presentation,...o.manifest,kind:"studioComponent",propsSchema:n,sourceRef:o.definition.sourceRef};return s(i),{manifest:i,schemaSidecars:[{direction:"input",location:t,profile:"studio_props",source:e}]}};var g=d,y=m,D=a;export{g as declareStudioApp,y as declareStudioAppTemplate,D as declareStudioComponent};
1
+ import{declareStudioApp as s,declareStudioAppTemplate as m}from"@collective-intelligence/extensions-sdk";import{assertConsumerProfile as r,canonicalJson as p,normalizePackageSchemaProjection as c}from"@collective-intelligence/extensions-sdk";var d=(e)=>{try{p(e)}catch(o){let t=o instanceof Error?o.message:String(o);throw TypeError(`Studio declaration must be serializable JSON: ${t}`,{cause:o})}},a=(e)=>{let o=e.definition.propsSchema,t=`studio_component:${e.manifest.fqn}.propsSchema`,n=c(o.project("input"));r(n,"studio_props",t);let i={category:e.definition.category,...e.definition.composition===void 0?void 0:{composition:e.definition.composition},...e.definition.needs===void 0?void 0:{needs:e.definition.needs},...e.presentation,...e.manifest,kind:"studioComponent",propsSchema:n,sourceRef:e.definition.sourceRef};return d(i),{manifest:i,schemaSidecars:[{direction:"input",location:t,profile:"studio_props",source:o}]}};var g=s,y=m,D=a;export{g as declareStudioApp,y as declareStudioAppTemplate,D as declareStudioComponent};
@@ -1,4 +1,4 @@
1
- import type { ComponentManifest, ComponentPresentation, DeclaredComponent, JsonObject, PackageDecoderSource, PackageSchemaProjection } from "@collective-intelligence/extensions-sdk";
1
+ import type { AccessTarget, ComponentManifest, ComponentPresentation, DeclaredComponent, JsonObject, PackageDecoderSource, PackageSchemaProjection } from "@collective-intelligence/extensions-sdk";
2
2
  export type LocalizedStudioText = Readonly<{
3
3
  fallbackLocale: string;
4
4
  values: Readonly<Record<string, string>>;
@@ -16,6 +16,13 @@ export type StudioComponentDeclaration = ComponentManifest & ComponentPresentati
16
16
  category: "layout" | "page" | "primitive" | "view" | "widget";
17
17
  composition?: StudioComponentComposition;
18
18
  kind: "studioComponent";
19
+ /**
20
+ * What the user must be allowed to use for the component to render.
21
+ * Studio checks the needs of every widget on a page in one Access Check
22
+ * and does not render a widget whose need answers `denied`. A display
23
+ * hint only: the backend checks every call. None when omitted.
24
+ */
25
+ needs?: readonly AccessTarget[];
19
26
  propsSchema: PackageSchemaProjection;
20
27
  sourceRef: string;
21
28
  }>;
@@ -23,6 +30,7 @@ export type StudioComponentDeclarationInput<Schema extends PackageDecoderSource
23
30
  definition: Readonly<{
24
31
  category: StudioComponentDeclaration["category"];
25
32
  composition?: StudioComponentComposition;
33
+ needs?: StudioComponentDeclaration["needs"];
26
34
  propsSchema: Schema;
27
35
  sourceRef: string;
28
36
  }>;
package/dist/studio.js CHANGED
@@ -1 +1 @@
1
- import{declareStudioApp as l,declareStudioAppTemplate as m}from"@collective-intelligence/extensions-sdk";import{assertConsumerProfile as r,canonicalJson as s,normalizePackageSchemaProjection as c}from"@collective-intelligence/extensions-sdk";var u=(e)=>{try{s(e)}catch(o){let t=o instanceof Error?o.message:String(o);throw TypeError(`Studio declaration must be serializable JSON: ${t}`,{cause:o})}},a=(e)=>{let o=e.definition.propsSchema,t=`studio_component:${e.manifest.fqn}.propsSchema`,i=c(o.project("input"));r(i,"studio_props",t);let n={category:e.definition.category,...e.definition.composition===void 0?void 0:{composition:e.definition.composition},...e.presentation,...e.manifest,kind:"studioComponent",propsSchema:i,sourceRef:e.definition.sourceRef};return u(n),{manifest:n,schemaSidecars:[{direction:"input",location:t,profile:"studio_props",source:o}]}};var p=(e)=>({headers:{"x-organization-id":e.organizationId},path:{slug:e.appSlug,viewId:e.viewId}}),d=(e)=>({headers:{"x-organization-id":e.organizationId},query:{appId:e.appId,pageId:e.pageId,publishedRevisionId:e.publishedRevisionId,viewId:e.viewId}});var h=l,I=m,P=a,R=d,b=p;export{h as declareStudioApp,I as declareStudioAppTemplate,P as declareStudioComponent,R as studioPublishedViewScope,b as studioViewScope};
1
+ import{declareStudioApp as l,declareStudioAppTemplate as m}from"@collective-intelligence/extensions-sdk";import{assertConsumerProfile as r,canonicalJson as s,normalizePackageSchemaProjection as c}from"@collective-intelligence/extensions-sdk";var u=(e)=>{try{s(e)}catch(o){let t=o instanceof Error?o.message:String(o);throw TypeError(`Studio declaration must be serializable JSON: ${t}`,{cause:o})}},a=(e)=>{let o=e.definition.propsSchema,t=`studio_component:${e.manifest.fqn}.propsSchema`,i=c(o.project("input"));r(i,"studio_props",t);let n={category:e.definition.category,...e.definition.composition===void 0?void 0:{composition:e.definition.composition},...e.definition.needs===void 0?void 0:{needs:e.definition.needs},...e.presentation,...e.manifest,kind:"studioComponent",propsSchema:i,sourceRef:e.definition.sourceRef};return u(n),{manifest:n,schemaSidecars:[{direction:"input",location:t,profile:"studio_props",source:o}]}};var d=(e)=>({headers:{"x-organization-id":e.organizationId},path:{slug:e.appSlug,viewId:e.viewId}}),p=(e)=>({headers:{"x-organization-id":e.organizationId},query:{appId:e.appId,pageId:e.pageId,publishedRevisionId:e.publishedRevisionId,viewId:e.viewId}});var h=l,I=m,P=a,R=p,b=d;export{h as declareStudioApp,I as declareStudioAppTemplate,P as declareStudioComponent,R as studioPublishedViewScope,b as studioViewScope};
@@ -257,6 +257,12 @@ export interface WorkflowEditorVisibilityRule {
257
257
  value?: JsonValue;
258
258
  }
259
259
  export interface WorkflowFormField {
260
+ /**
261
+ * Item fields of a runtime `list` that accept a binding to an earlier
262
+ * output; every other item field takes fixed values only. Absent means no
263
+ * item field binds, and the list keeps its plain editor.
264
+ */
265
+ bindableItemFields?: string[];
260
266
  key: string;
261
267
  binding: WorkflowFieldBinding;
262
268
  label: WorkflowLocalizedText;
@@ -77,7 +77,9 @@ ci login <api-url> --organization <organization-id>
77
77
  ci whoami
78
78
  ```
79
79
 
80
- `ci login` asks you to approve the device in the Dashboard and stores a 30-day CLI Session in your user profile. `ci upgrade` updates a global install.
80
+ `ci login` asks you to approve the device in the Dashboard and stores a 30-day CLI Session in your user profile. `ci upgrade` updates a global install. For a pipeline, `ci login <api-url> --pipeline-token --name <name> --expires <date|never>` issues a Pipeline Token instead: store it as `CI_MANAGEMENT_TOKEN` and pass `--organization`.
81
+
82
+ The Backend declares the oldest `ci` version it supports. Before a command that calls the Backend, a released `ci` reads this minimum from the discovery document. If `ci` is older, the command stops with `CliVersionUnsupportedError` and tells you to run `ci upgrade`.
81
83
 
82
84
  > **Note:** `ci login` needs the API URL. It reads the tenant's discovery document at
83
85
  > `/.well-known/ci-configuration` and rejects a Dashboard URL as "not a CI API
@@ -209,11 +211,12 @@ The Connect Studio link that the Dashboard shows only tells the Studio desktop a
209
211
 
210
212
  #### Held by pipelines and scripts
211
213
 
212
- | Credential | Type | Lifetime or rotation | Used for |
213
- | ------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
214
- | API key | Opaque secret with the prefix `dpk_` | No expiry at creation; a rotation keeps the old secret 24 hours; a revocation ends both | Calls with a service principal's grants, cut to a Max Privileges template |
215
- | `CI_MANAGEMENT_TOKEN` | Environment variable with an API key or a session token | That of the token it holds | Unattended `ci` commands; an API key fixes the Organization |
216
- | Publisher credential (`CI_PUBLISHER_TOKEN`) | Opaque secret for one exact package name | Optional expiry; a revocation stops it at once | Publish and promote for that package only |
214
+ | Credential | Type | Lifetime or rotation | Used for |
215
+ | ------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
216
+ | Pipeline Token | Opaque secret with the prefix `cpt_`; a session of a technical account | The end chosen when it is issued, or never; the account or a Tenant Admin revokes it | Unattended `ci` commands and calls as that account, such as `ci deploy` |
217
+ | API key | Opaque secret with the prefix `dpk_` | No expiry at creation; a rotation keeps the old secret 24 hours; a revocation ends both | Calls with a service principal's grants, cut to a Max Privileges template |
218
+ | `CI_MANAGEMENT_TOKEN` | Environment variable with a Pipeline Token, an API key or a session token | That of the token it holds | Unattended `ci` commands; an API key fixes the Organization |
219
+ | Publisher credential (`CI_PUBLISHER_TOKEN`) | Opaque secret for one exact package name | Optional expiry; a revocation stops it at once | Publish and promote for that package only |
217
220
 
218
221
  #### Held by your external app
219
222
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collective-intelligence/extensions-sdk-frontend-react",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Public hosted React contribution contracts for Collective Intelligence extensions.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -80,11 +80,11 @@
80
80
  "type-check": "bun check --no-script -p tsconfig.json && bun check --no-script -p tsconfig.type-tests.json"
81
81
  },
82
82
  "dependencies": {
83
- "@collective-intelligence/extensions-sdk": "0.5.0",
84
- "@collective-intelligence/extensions-sdk-frontend": "0.5.0"
83
+ "@collective-intelligence/extensions-sdk": "0.6.0",
84
+ "@collective-intelligence/extensions-sdk-frontend": "0.6.0"
85
85
  },
86
86
  "peerDependencies": {
87
- "@collective-intelligence/ui-react": "0.5.0",
87
+ "@collective-intelligence/ui-react": "0.6.0",
88
88
  "@tanstack/react-query": ">=5 <6",
89
89
  "@xyflow/react": ">=12 <13",
90
90
  "effect": "^4.1.0",
@@ -101,7 +101,7 @@
101
101
  "access": "public"
102
102
  },
103
103
  "devDependencies": {
104
- "@collective-intelligence/ui-react": "0.5.0",
104
+ "@collective-intelligence/ui-react": "0.6.0",
105
105
  "@effect/eslint-plugin": "0.3.2",
106
106
  "@effect/vitest": "4.1.4",
107
107
  "@hey-api/openapi-ts": "^0.96.0",
@@ -129,5 +129,5 @@
129
129
  "vitest": "5.0.2",
130
130
  "xstate": "5.33.3"
131
131
  },
132
- "gitHead": "a8245252c396252c381dafd86a4fcb31af310906"
132
+ "gitHead": "94535cc59ece904d4a9374a368edb09222688bb6"
133
133
  }