@collective-intelligence/extensions-sdk-frontend 0.2.10 → 0.2.11

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.
@@ -144,20 +144,25 @@ The declaration of an Agent sets the most it can do: its tools, scopes, approval
144
144
 
145
145
  ## Approvals
146
146
 
147
- An entry in a `tools` list can be a `ToolBinding` instead of a bare reference. A binding can rename the tool, set its settings, narrow its Knowledge and choose an approval mode, and you can bind one tool several times under different names:
147
+ An entry in a `tools` list can be a `ToolBinding` instead of a bare reference. A binding can rename the tool, give it a Binding Description, set its Binding Settings and choose an approval mode, and you can bind one tool several times under different names:
148
148
 
149
149
  ```ts
150
150
  tools: [
151
151
  {
152
152
  tool: "builtin.core.knowledge.tools.query",
153
- name: "member-query",
154
- settings: { limit: 10 },
155
- knowledge: { domains: { include: [membersDomain] } },
153
+ name: "lead-query",
154
+ description: "Search the Leads of the CRM",
155
+ settings: {
156
+ // The Knowledge tools' form marks this field "x-fqn-of": "knowledge-entity-schema".
157
+ allowedEntitySchemaIds: [leadSchemaFqn]
158
+ },
156
159
  approval: { rule: "Escalations" }
157
160
  }
158
161
  ]
159
162
  ```
160
163
 
164
+ `name`, `description` and `approval` work the same way for every tool. The model sees the Binding Description in place of the tool's own description. `settings` holds the tool's own options, and the tool's Binding Settings Form defines them, so install fails on a key that the form does not define. A field that the form marks with `x-fqn-of` takes FQNs, and install translates each FQN into the id of the installing Organization's record. Install fails when an FQN names no record of that Organization, and the error names every such FQN of the binding. A binding has no tool-specific property.
165
+
161
166
  `approval` has three modes. `"never"` makes no approval request for the binding. `"always"` pauses for an explicit decision by the user who started the call, and that user's eligibility to approve does not approve the call. `{ rule: "<rule name>" }` uses an approval rule of the installing Organization, with that rule's reviewers and expiry. Install fails when no rule has the name, so create the rule in the target Organization before you install a demo package that uses one.
162
167
 
163
168
  Approval pauses the call and leaves the tool visible. With `"always"`, the model still sees the tool definition and can decide to call it, and the call then waits for a person.
@@ -312,7 +317,7 @@ An agent reads data only through the tools it is bound to. The core packages pro
312
317
 
313
318
  Knowledge Query has seven intents: `autocomplete`, `search`, `facets`, `facet_values`, `count`, `get` and `relation_members`. `search`, `count` and the two facet intents need an `entitySchemaId`, and `get` needs an `entityId`. A missing id fails with `invalid_input`, so tell the model in the Skill or the Role to find schema ids with Knowledge `catalog` first and never to invent one. When a schema has record or indexed-file embeddings, Query also runs semantic retrieval on PostgreSQL with pgvector, and the model never sees the vectors or the embedding provider.
314
319
 
315
- Two settings decide what these tools can read. A binding's `knowledge` field narrows a tool to included or excluded domains and entity schemas, as the `member-query` binding above does. `dataAccess` on `declareAgent`, `declareSkill` or `declareWorkflow` decides, separately for `knowledge`, `documents` and `datasets`, whose permission applies. With `"user"`, the run reads what the acting person can read. With the declaration's own kind (`"agent"`, `"skill"` or `"workflow"`), which is the default, the run reads its configured resources without the caller's permission on the source. `dataAccess` grants no extra tool bindings.
320
+ Two settings decide what these tools can read. The Binding Settings of a Knowledge tool narrow it to allowed or excluded domains and entity schemas (`allowedDomainIds`, `excludedDomainIds`, `allowedEntitySchemaIds` and `excludedEntitySchemaIds`), as the `lead-query` binding above does. The Information tools take `allowedEntitySchemaIds` in the same way, and when Advanced Retrieval loads Expand Passage and Read Source Range, they use its Binding Settings. `dataAccess` on `declareAgent`, `declareSkill` or `declareWorkflow` decides, separately for `knowledge`, `documents` and `datasets`, whose permission applies. With `"user"`, the run reads what the acting person can read. With the declaration's own kind (`"agent"`, `"skill"` or `"workflow"`), which is the default, the run reads its configured resources without the caller's permission on the source. `dataAccess` grants no extra tool bindings.
316
321
 
317
322
  ```ts
318
323
  const dataAccess = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collective-intelligence/extensions-sdk-frontend",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Framework-neutral frontend declaration, catalog, and activation contracts for Collective Intelligence extension packages.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -44,7 +44,7 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@collective-intelligence/extensions-sdk": "0.2.10"
47
+ "@collective-intelligence/extensions-sdk": "0.2.11"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "effect": "^4.1.0"
@@ -63,5 +63,5 @@
63
63
  "typescript": "7.0.2",
64
64
  "ultracite": "7.10.7"
65
65
  },
66
- "gitHead": "4cefe91552731170db20795b65c41115fd65c62b"
66
+ "gitHead": "b0f4929291e18278637c715476bb981c6d63db15"
67
67
  }