@exellix/ai-skills 6.3.3 → 6.3.7

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.
Files changed (2) hide show
  1. package/README.md +5 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -14,6 +14,7 @@ Foundational skill execution layer for the exellix ecosystem: templates live in
14
14
  | Per-package log level (`AI_SKILLS_LOGS_LEVEL`) | **[Logging](#logging-aiskills--x12ilogxer)** below · [Logxer integration checklist](docs/LOGXER_INTEGRATION_CHECKLIST.md) · [@x12i/logxer on npm](https://www.npmjs.com/package/@x12i/logxer) |
15
15
  | Gateway templates (v4), `invoke()` vs `invokeChat()`, `templateRendering` | **[docs/GATEWAY_TEMPLATE_PROTOCOL_V4.md](docs/GATEWAY_TEMPLATE_PROTOCOL_V4.md)** |
16
16
  | This package: `workingMemory`, `templateRenderOptions`, client `templateRendering` | **[docs/AI_SKILLS_GATEWAY_TEMPLATES.md](docs/AI_SKILLS_GATEWAY_TEMPLATES.md)** |
17
+ | **Upgrading to `@x12i/ai-gateway` 10.x** (billing, required fields, removed behaviors) | **[docs/UPGRADING_AI_GATEWAY_10.md](docs/UPGRADING_AI_GATEWAY_10.md)** |
17
18
  | Invoke execution metadata (`provider`, `modelUsed`, `effectiveModelConfig`, …) | **[docs/AI_GATEWAY_INVOKE_EXECUTION_METADATA.md](docs/AI_GATEWAY_INVOKE_EXECUTION_METADATA.md)** |
18
19
  | Wire model on `runSkill()` (required; no alias / no gateway default) | **[docs/MODEL_INVOKE_CONTRACT.md](docs/MODEL_INVOKE_CONTRACT.md)** |
19
20
  | Host invoke contract (`reasoningEffort`, no caller `maxTokens`) | **[Host responsibilities](#host-responsibilities-orchestrator--main)** · [MODEL_INVOKE_CONTRACT.md](docs/MODEL_INVOKE_CONTRACT.md) |
@@ -45,7 +46,7 @@ npm install @exellix/ai-skills
45
46
 
46
47
  This package depends on **`@x12i/ai-gateway`**, **`@x12i/catalox`**, **`@x12i/logxer`**, **`@x12i/env`**, **`@x12i/rendrix`**, and **`firebase-admin`** (for Firestore-backed Catalox). **`@x12i/catalox` ≥ 4.0** expects **Node 20+**. Align **`firebase-admin`** / **`@x12i/catalox`** versions with your app if you share a Firebase app instance.
47
48
 
48
- **`@x12i/ai-gateway` ≥ 10.0.6** (see `package.json`) with **`@x12i/activix` ^8** is required: every invoke needs an explicit wire **`model`** and **`maxTokens`** (this package supplies **`maxTokens`** via **`@x12i/optimixer`** before `gateway.invoke()`). Invoke **`metadata`** includes routing fields (≥9.1.1), rejection **`metadata`** on failures (≥9.1.2), and normalized billing (**`costUsd`**, **`cost`**, **`costStatus: priced | unpriced`**, optional **`costBreakdown`**) on success (≥9.3; ai-tools catalog pricing in gateway ≥10.0.6). **This package does not use `@x12i/ai-tools` directly** — cost is resolved by the gateway. See **`docs/AI_GATEWAY_INVOKE_EXECUTION_METADATA.md`**. Every **`runSkill`** call must include **`agentId`**, **`jobTypeId`**, and **`taskTypeId`** (Activix linkage — no package defaults).
49
+ **`@x12i/ai-gateway` ≥ 10.0.6** (see `package.json`) with **`@x12i/activix` ^8** is required: every invoke needs an explicit wire **`model`** and **`maxTokens`** (this package supplies **`maxTokens`** via **`@x12i/optimixer`** before `gateway.invoke()`). Invoke **`metadata`** includes routing fields (≥9.1.1), rejection **`metadata`** on failures (≥9.1.2), and normalized billing (**`costUsd`**, **`cost`**, **`costStatus: priced | unpriced`**, optional **`costBreakdown`**) on success (≥9.3; ai-tools catalog pricing in gateway ≥10.0.6). **This package does not use `@x12i/ai-tools` directly** — cost is resolved by the gateway. See **`docs/UPGRADING_AI_GATEWAY_10.md`** and **`docs/AI_GATEWAY_INVOKE_EXECUTION_METADATA.md`**. Every **`runSkill`** call must include **`agentId`**, **`jobTypeId`**, and **`taskTypeId`** (Activix linkage — no package defaults).
49
50
 
50
51
  **CI:** `npm run test:ci` runs **`npm run build`** and **`npm run test:unit`** (no live Firestore or real LLM). Full **`npm test`** still runs **`test:integration`**, which may append live catalog tests when env enables them.
51
52
 
@@ -256,10 +257,10 @@ Studio / graph Run Analysis expects activities and responses to explain billing
256
257
 
257
258
  Gateway **`invoke()`** metadata (≥ **9.3**, ai-tools catalog in gateway ≥ **10.0.6**) uses **`costUsd`** / **`cost`** when priced and **`costStatus: "priced" | "unpriced"`**. Optional **`costBreakdown`** (prompt/completion USD) is forwarded when the gateway catalog pricing includes it. **This SDK never calculates cost locally** — it normalizes gateway metadata only. Priced runs expose **`costUsd` only** (gateway **`"priced"`** status is not echoed). When usage exists but no USD total is known, **`costStatus: "unpriced"`** is set (gateway explicit flag or SDK fallback).
258
259
 
259
- | Gateway / router situation | Gateway `metadata` | On `RunSkillResponse.metadata` | Activix record (gateway `completeRecord` + SDK patch) |
260
+ | Gateway / router situation | Gateway `metadata` | On `RunSkillResponse.metadata` | Activix record (gateway `logSuccess` + SDK patch) |
260
261
  |----------------------------|-------------------|-------------------------------|------------------------------------------------------|
261
- | Priced (router or ai-tools catalog) | `costUsd`, `cost`, `costStatus: "priced"`, optional `costBreakdown` | `costUsd`, optional `costBreakdown` (no `costStatus`) | Top-level `cost`, `costStatus: "priced"`, `outer.metadata` billing slice, `outer.cost.usd` |
262
- | Usage, no price | `costStatus: "unpriced"` | `costStatus: "unpriced"` | `costStatus: "unpriced"` + token usage on `outer.metadata` / `response.metadata` |
262
+ | Priced (router or ai-tools catalog) | `costUsd`, `cost`, `costStatus: "priced"`, optional `costBreakdown` | `costUsd`, optional `costBreakdown` (no `costStatus`) | Root `cost` / `costUsd` / `costStatus: "priced"`, **`outer.cost.usd`**; prefer these over `outer.metadata` for billing |
263
+ | Usage, no price | `costStatus: "unpriced"` | `costStatus: "unpriced"` | Root `costStatus: "unpriced"` + token usage on root `metadata` / `response.metadata` |
263
264
  | Legacy async pricing | `costStatus: "deferred"` (older gateways) | `costStatus: "deferred"` | same |
264
265
 
265
266
  Gateway **`logSuccess`** writes billing on the activity row during **`invoke()`** when **`enableActivityTracking`** is on (default). **`patchActivixActivityAfterSkill`** then merges the same billing slice plus **`outputContract`** **`parsed`** fields so Run Analysis and Activix queries stay aligned with **`RunSkillResponse.metadata`**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exellix/ai-skills",
3
- "version": "6.3.3",
3
+ "version": "6.3.7",
4
4
  "description": "Foundational skill execution layer for exellix ecosystem using @x12i/ai-gateway with FlexMD 2.0 support and Catalox as the catalog store",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@x12i/activix": "^8.5.0",
61
- "@x12i/ai-gateway": "^10.0.6",
61
+ "@x12i/ai-gateway": "^10.0.7",
62
62
  "@x12i/ai-profiles": "^2.1.1",
63
63
  "@x12i/catalox": "^5.1.3",
64
64
  "@x12i/env": "^4.0.1",