@constal/sdk 5.1.0 → 5.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constal/sdk",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "description": "Public TypeScript SDK for authoring Constal agents, integrations, policies, channels, and credential providers",
5
5
  "keywords": [
6
6
  "constal",
package/publish/api.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@constal/sdk",
3
- "version": "5.1.0",
3
+ "version": "5.3.0",
4
4
  "exports": [
5
5
  "AGENT_UI_DEFAULTS",
6
6
  "Action",
@@ -4391,22 +4391,45 @@ interface MemoryRememberArgs {
4391
4391
  id?: string;
4392
4392
  content: string;
4393
4393
  metadata?: Record<string, unknown>;
4394
- /** Optional host-derived subpartition within the already authenticated Memory owner partition. */
4394
+ /**
4395
+ * One level of the invocation's authenticated Memory partition. Each level has its own records and ids, and remember,
4396
+ * get, delete and search reach only that level; an omitted scope is the partition's unscoped level, and purge removes
4397
+ * every level. The caller chooses the scope: it subdivides the partition but is not an authority boundary.
4398
+ */
4395
4399
  scope?: string;
4396
4400
  }
4401
+ /**
4402
+ * A search reads one level and sees every write to it that returned before the search started. A record whose remember
4403
+ * returned is a candidate, scored on its current content, until it is deleted or expires; it is returned when it ranks
4404
+ * within `limit` and passes the Memory's `minScore`. A record whose delete returned is never returned. No wait is needed.
4405
+ */
4397
4406
  interface MemorySearchArgs {
4398
4407
  query: string;
4399
4408
  limit?: number;
4400
- /** Must match the host-derived scope used while remembering records. */
4409
+ /** The level to search; see {@link MemoryRememberArgs.scope}. */
4401
4410
  scope?: string;
4411
+ /**
4412
+ * Only the records whose metadata holds each named top-level key with this value and JSON type (`true`, `1` and `"1"`
4413
+ * differ). A key that no record of the level has held a string, number or boolean under matches no record. A level can
4414
+ * filter on the first ten keys that held one; a search filtering on a later key is refused.
4415
+ */
4416
+ filter?: Record<string, string | number | boolean>;
4402
4417
  }
4403
4418
  interface MemoryGetArgs {
4404
4419
  id: string;
4420
+ /** The level that holds the record; see {@link MemoryRememberArgs.scope}. */
4421
+ scope?: string;
4405
4422
  }
4406
4423
  interface MemoryDeleteArgs {
4407
4424
  id: string;
4425
+ /** The level that holds the record; see {@link MemoryRememberArgs.scope}. */
4426
+ scope?: string;
4408
4427
  }
4409
4428
  interface MemorySearchHit extends MemoryRecord {
4429
+ /**
4430
+ * In semantic mode, the record's similarity to the query, in [0, 1]. In hybrid mode, its fused rank divided by the
4431
+ * fused rank of a record first in both rankings, in (0, 1].
4432
+ */
4410
4433
  score: number;
4411
4434
  }
4412
4435
  /** The stable Agent-facing contract shared by logical Memories and Memory Store Connections. */
package/publish/index.js CHANGED
@@ -2614,7 +2614,12 @@ var MEMORY_OPERATION_DECLARATIONS = [
2614
2614
  type: "object",
2615
2615
  required: ["query"],
2616
2616
  additionalProperties: false,
2617
- properties: { query: { type: "string", minLength: 1 }, limit: { type: "integer", minimum: 1 }, scope }
2617
+ properties: {
2618
+ query: { type: "string", minLength: 1 },
2619
+ limit: { type: "integer", minimum: 1 },
2620
+ scope,
2621
+ filter: { type: "object", additionalProperties: { anyOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }] } }
2622
+ }
2618
2623
  },
2619
2624
  resultSchema: {
2620
2625
  type: "object",
@@ -2634,7 +2639,7 @@ var MEMORY_OPERATION_DECLARATIONS = [
2634
2639
  {
2635
2640
  op: "get",
2636
2641
  description: "Read one record from the invocation's authenticated Memory partition.",
2637
- schema: { type: "object", required: ["id"], additionalProperties: false, properties: { id } },
2642
+ schema: { type: "object", required: ["id"], additionalProperties: false, properties: { id, scope } },
2638
2643
  resultSchema: { anyOf: [record5, { type: "null" }] },
2639
2644
  effect: "read-only",
2640
2645
  recovery: { kind: "repeat" },
@@ -2644,7 +2649,7 @@ var MEMORY_OPERATION_DECLARATIONS = [
2644
2649
  {
2645
2650
  op: "delete",
2646
2651
  description: "Delete one record from the invocation's authenticated Memory partition.",
2647
- schema: { type: "object", required: ["id"], additionalProperties: false, properties: { id } },
2652
+ schema: { type: "object", required: ["id"], additionalProperties: false, properties: { id, scope } },
2648
2653
  resultSchema: { type: "object", required: ["deleted"], additionalProperties: false, properties: { deleted: { type: "boolean" } } },
2649
2654
  effect: "idempotent",
2650
2655
  recovery: { kind: "idempotency-key" },