@exellix/ai-tasks 8.2.1 → 8.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/.env.example +0 -10
- package/.metadata/log-diagnostics.json +13 -0
- package/README.md +48 -21
- package/dist/activix/activixClient.d.ts +13 -0
- package/dist/activix/activixClient.d.ts.map +1 -1
- package/dist/activix/activixClient.js +25 -3
- package/dist/activix/activixClient.js.map +1 -1
- package/dist/activix/getTaskActivities.d.ts +1 -1
- package/dist/activix/getTaskActivities.js +1 -1
- package/dist/activix/phaseTracking.js +1 -1
- package/dist/activix/phaseTracking.js.map +1 -1
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +7 -0
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/runPostStepLlmCall.d.ts.map +1 -1
- package/dist/internal/runPostStepLlmCall.js +65 -1
- package/dist/internal/runPostStepLlmCall.js.map +1 -1
- package/dist/logxer/aiTasksDiagnosticCodes.d.ts +1 -0
- package/dist/logxer/aiTasksDiagnosticCodes.d.ts.map +1 -1
- package/dist/logxer/aiTasksDiagnosticCodes.js +1 -0
- package/dist/logxer/aiTasksDiagnosticCodes.js.map +1 -1
- package/dist/logxer/packageLogxers.d.ts.map +1 -1
- package/dist/logxer/packageLogxers.js +2 -1
- package/dist/logxer/packageLogxers.js.map +1 -1
- package/dist/observability/extractHttpEndpointFromError.d.ts +4 -0
- package/dist/observability/extractHttpEndpointFromError.d.ts.map +1 -0
- package/dist/observability/extractHttpEndpointFromError.js +54 -0
- package/dist/observability/extractHttpEndpointFromError.js.map +1 -0
- package/dist/observability/logLlmProviderInvocation.d.ts +55 -0
- package/dist/observability/logLlmProviderInvocation.d.ts.map +1 -0
- package/dist/observability/logLlmProviderInvocation.js +187 -0
- package/dist/observability/logLlmProviderInvocation.js.map +1 -0
- package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/logRunTaskFailure.js +7 -0
- package/dist/observability/logRunTaskFailure.js.map +1 -1
- package/dist/strategies/direct-execution-strategy.d.ts.map +1 -1
- package/dist/strategies/direct-execution-strategy.js +56 -1
- package/dist/strategies/direct-execution-strategy.js.map +1 -1
- package/documenations/activix.md +15 -3
- package/documenations/xynthesis-activix-telemetry.md +1 -1
- package/package.json +8 -7
package/documenations/activix.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Activix Integration
|
|
2
2
|
|
|
3
|
-
This packaged doc summarizes task-activity tracking via `@
|
|
3
|
+
This packaged doc summarizes task-activity tracking via `@x12i/activix`.
|
|
4
4
|
|
|
5
5
|
## Activix Integration Best Practices Checklist
|
|
6
6
|
|
|
7
|
-
Use this as the operational checklist for integrating `@
|
|
7
|
+
Use this as the operational checklist for integrating `@x12i/activix` correctly and consistently.
|
|
8
8
|
|
|
9
9
|
### 1) Ownership and boundaries
|
|
10
10
|
|
|
@@ -86,6 +86,17 @@ const { activityId } = await ax.startRecord({
|
|
|
86
86
|
- `createdAt`, `updatedAt`
|
|
87
87
|
- `error` (except via `failRecord`)
|
|
88
88
|
|
|
89
|
+
### 6b) Collection tracking state (Activix 8.4+) — always call, let Activix persist
|
|
90
|
+
|
|
91
|
+
- **Always call** Activix lifecycle APIs on every AI activity phase (`startRecord`, `completeRecord`, `failRecord`, …).
|
|
92
|
+
- **Do not** branch in ai-tasks (or other integrators) on whether to write to Mongo.
|
|
93
|
+
- Activix reads the **`activix-collections`** legend row for your collection and its **`state`**:
|
|
94
|
+
- **`track`** (default) — rows are persisted
|
|
95
|
+
- **`off`** — same API and return shapes; Mongo writes are skipped
|
|
96
|
+
- Toggle persistence at runtime: `setCollectionTrackingState('task-activities', 'off' | 'track')`.
|
|
97
|
+
- ai-tasks constructs Activix when **`MONGO_URI`** or **`MONGO_LOGS_URI`** is set; set **`ACTIVIX_ENABLED=false`** only to skip client construction entirely (dev/CI zero-overhead escape hatch).
|
|
98
|
+
- Package collection name is **`task-activities`** (hard-coded in `src/activix/activixClient.ts`).
|
|
99
|
+
|
|
89
100
|
### 7) Validate shape and observability expectations
|
|
90
101
|
|
|
91
102
|
- `outer` is required and must contain:
|
|
@@ -155,7 +166,8 @@ All records for a run share a correlation id for grouping.
|
|
|
155
166
|
|
|
156
167
|
## Enablement
|
|
157
168
|
|
|
158
|
-
-
|
|
169
|
+
- **Client wiring:** Activix is constructed when `MONGO_URI` or `MONGO_LOGS_URI` is set. Set `ACTIVIX_ENABLED=false` to opt out (no client, no lifecycle API calls).
|
|
170
|
+
- **Mongo persistence:** Controlled by Activix collection legend **`state`** (`track` | `off`) in `activix-collections`, not by a required `ACTIVIX_ENABLED=true` flag. ai-tasks always calls lifecycle APIs when wired; Activix decides whether rows reach Mongo.
|
|
159
171
|
- Activix failures are treated as non-fatal to task execution.
|
|
160
172
|
|
|
161
173
|
## Typical metadata
|
|
@@ -25,4 +25,4 @@ In **`exellix/xynthesis`** (`src/activix.ts`, `getActivix`), pass **`diagnostics
|
|
|
25
25
|
## Related
|
|
26
26
|
|
|
27
27
|
- Gateway-side Activix (**`@x12i/ai-gateway`**) is separate from xynthesis’ singleton.
|
|
28
|
-
- ai-tasks
|
|
28
|
+
- ai-tasks Activix wiring: **`src/activix/activixClient.ts`** — constructs when Mongo is configured; persistence toggled via **`activix-collections`** legend `state` (Activix 8.4+), not `ACTIVIX_ENABLED=true`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/ai-tasks",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.3",
|
|
4
4
|
"description": "Task orchestration for the Exellix stack: runTask() with local handlers or LLM-backed execution, task-scoped memory/context enrichment, and executor dispatch via @exellix/ai-skills. ERC-compliant.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
"dev": "ts-node src/index.ts",
|
|
23
23
|
"prepublishOnly": "npm run build && node scripts/ensure-nx-content-md-variants.mjs",
|
|
24
24
|
"deps:latest": "npx npm-check-updates -u && npm install",
|
|
25
|
-
"test": "node scripts/ensure-xynthesis-dist.mjs && node scripts/clean-dist-test.mjs && tsc -p tsconfig.test.json && node scripts/copy-test-fixtures.mjs && node --test --test-force-exit --test-concurrency=1 dist-test/test/narrix/*.js dist-test/test/narrix-then-execute/*.js dist-test/test/aiScoping/*.js dist-test/test/intermediateSteps/*.js dist-test/test/post-steps/*.js dist-test/test/planWebScopeQuestions/*.js dist-test/test/synthesis/*.js dist-test/test/utils/*.js dist-test/test/errors/*.js dist-test/test/validation/*.js dist-test/test/compile/*.js dist-test/test/task-strategies/*.js dist-test/test/observability/*.js dist-test/test/run-task/*.js dist-test/test/internal/*.js dist-test/test/execution-strategies/*.js dist-test/test/invocation/*.js",
|
|
25
|
+
"test": "node scripts/ensure-xynthesis-dist.mjs && node scripts/clean-dist-test.mjs && tsc -p tsconfig.test.json && node scripts/copy-test-fixtures.mjs && node --test --test-force-exit --test-concurrency=1 dist-test/test/narrix/*.js dist-test/test/narrix-then-execute/*.js dist-test/test/aiScoping/*.js dist-test/test/intermediateSteps/*.js dist-test/test/post-steps/*.js dist-test/test/planWebScopeQuestions/*.js dist-test/test/synthesis/*.js dist-test/test/utils/*.js dist-test/test/errors/*.js dist-test/test/validation/*.js dist-test/test/compile/*.js dist-test/test/task-strategies/*.js dist-test/test/observability/*.js dist-test/test/run-task/*.js dist-test/test/internal/*.js dist-test/test/execution-strategies/*.js dist-test/test/invocation/*.js dist-test/test/e2e/*.js",
|
|
26
26
|
"test:with-narrix-ingest": "node scripts/run-npm-test-with-narrix-ingest.mjs",
|
|
27
27
|
"test:e2e:intermediateSteps": "node scripts/run-with-env.mjs RUN_INTERMEDIATE_STEPS_E2E=1 npm run test",
|
|
28
28
|
"test:e2e:synthesis": "node scripts/run-synthesis-e2e.mjs",
|
|
29
29
|
"test:e2e:webScope": "node scripts/run-web-scope-e2e.mjs",
|
|
30
|
+
"test:live": "node scripts/run-live-ai-e2e.mjs",
|
|
30
31
|
"test:narrix:live": "node scripts/check-narrix-archive.mjs && node scripts/run-npm-test-with-narrix-ingest.mjs",
|
|
31
32
|
"local:narrix:subnets": "node dist/localTasks/narrixSubnetPlayground.js",
|
|
32
33
|
"local:narrix:assets": "node dist/localTasks/narrixAssetPlayground.js",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"@x12i/logxer": "$@x12i/logxer"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"@exellix/ai-skills": "^5.9.
|
|
68
|
+
"@exellix/ai-skills": "^5.9.4",
|
|
68
69
|
"@exellix/memorix-narrix-adapter": "^2.0.0",
|
|
69
70
|
"@exellix/narrix-adapter-chat": "^2.0.0",
|
|
70
71
|
"@exellix/narrix-adapter-docs": "^2.0.0",
|
|
@@ -76,13 +77,13 @@
|
|
|
76
77
|
"@exellix/narrix-ingest": "^2.0.0",
|
|
77
78
|
"@exellix/narrix-runner": "^2.0.0",
|
|
78
79
|
"@exellix/narrix-web-scoper": "^2.0.0",
|
|
79
|
-
"@exellix/xynthesis": "^4.
|
|
80
|
-
"@x12i/activix": "^8.
|
|
81
|
-
"@x12i/ai-profiles": "^1.7.
|
|
80
|
+
"@exellix/xynthesis": "^4.1.5",
|
|
81
|
+
"@x12i/activix": "^8.4.1",
|
|
82
|
+
"@x12i/ai-profiles": "^1.7.2",
|
|
82
83
|
"@x12i/catalox": "^5.1.3",
|
|
83
84
|
"@x12i/env": "^4.0.1",
|
|
84
85
|
"@x12i/execution-memory-manager": "^1.2.0",
|
|
85
|
-
"@x12i/funcx": "^4.2.
|
|
86
|
+
"@x12i/funcx": "^4.2.8",
|
|
86
87
|
"@x12i/logxer": "^4.6.0",
|
|
87
88
|
"@x12i/rendrix": "^4.3.0",
|
|
88
89
|
"@x12i/search-adapter": "^1.5.1",
|