@exellix/ai-skills 6.16.0 → 7.0.1
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 +3 -3
- package/dist/catalog-manager/createAiSkillsCatalogApi.d.ts.map +1 -1
- package/dist/catalog-manager/createAiSkillsCatalogApi.js +1 -0
- package/dist/catalog-manager/createAiSkillsCatalogApi.js.map +1 -1
- package/dist/catalog-manager/types.d.ts +2 -0
- package/dist/catalog-manager/types.d.ts.map +1 -1
- package/dist/catalox/ai-engines-catalog.d.ts +2 -0
- package/dist/catalox/ai-engines-catalog.d.ts.map +1 -1
- package/dist/catalox/ai-engines-catalog.js +2 -1
- package/dist/catalox/ai-engines-catalog.js.map +1 -1
- package/dist/catalox/index.d.ts +0 -14
- package/dist/catalox/index.d.ts.map +1 -1
- package/dist/catalox/index.js +0 -14
- package/dist/catalox/index.js.map +1 -1
- package/dist/client/registry-manager.d.ts +1 -1
- package/dist/client/registry-manager.d.ts.map +1 -1
- package/dist/client/registry-manager.js +1 -1
- package/dist/client/registry-manager.js.map +1 -1
- package/dist/client/skill-executor.d.ts.map +1 -1
- package/dist/client/skill-executor.js +22 -3
- package/dist/client/skill-executor.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -5
- package/dist/client.js.map +1 -1
- package/dist/diagnostics/map-gateway-trace.d.ts.map +1 -1
- package/dist/diagnostics/map-gateway-trace.js +89 -18
- package/dist/diagnostics/map-gateway-trace.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/optimixer/skills-optimixer.d.ts +1 -1
- package/dist/optimixer/skills-optimixer.d.ts.map +1 -1
- package/dist/optimixer/skills-optimixer.js +1 -1
- package/dist/optimixer/skills-optimixer.js.map +1 -1
- package/dist/skill-execution-trace-error.d.ts +6 -0
- package/dist/skill-execution-trace-error.d.ts.map +1 -1
- package/dist/skill-execution-trace-error.js +15 -0
- package/dist/skill-execution-trace-error.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/gateway-invoke-rejection.d.ts +16 -1
- package/dist/utils/gateway-invoke-rejection.d.ts.map +1 -1
- package/dist/utils/gateway-invoke-rejection.js +34 -0
- package/dist/utils/gateway-invoke-rejection.js.map +1 -1
- package/metadata/log-diagnostics.json +19 -0
- package/package.json +8 -8
- package/templates/professional-answer/instructions.md +0 -34
- package/templates/professional-answer/prompt.md +0 -11
- package/templates/professional-answer/synthesis-context/execution-memory-only/instructions.md +0 -20
- package/templates/professional-answer/synthesis-context/execution-memory-only/prompt.md +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tryExtractFallbackAttemptsFromErrorChain } from "@x12i/ai-gateway";
|
|
1
2
|
/**
|
|
2
3
|
* Reads `@x12i/ai-gateway` **`GatewayInvokeRejectionMetadata`** from a thrown **`invoke()`** error
|
|
3
4
|
* (`error.metadata`), walking **`cause`** a few hops (wrapped NO_PROVIDER errors preserve metadata on the wrapper).
|
|
@@ -25,4 +26,37 @@ function readRejectionMetadataFromSingleError(err) {
|
|
|
25
26
|
return undefined;
|
|
26
27
|
return m;
|
|
27
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Lift gateway ≥ 10.4.4 provider failure taxonomy from a thrown invoke error
|
|
31
|
+
* (`providerSubCode`, `operatorHint`, structured `providerAttempts` / `fallbackAttempts`).
|
|
32
|
+
*/
|
|
33
|
+
export function providerInvokeFailureFromErrorChain(err) {
|
|
34
|
+
const rejection = gatewayInvokeRejectionFromErrorChain(err);
|
|
35
|
+
return rejection ? providerInvokeFailureFromRejection(rejection) : snapshotFromFallbackChainOnly(err);
|
|
36
|
+
}
|
|
37
|
+
function snapshotFromFallbackChainOnly(err) {
|
|
38
|
+
const chainFallbacks = tryExtractFallbackAttemptsFromErrorChain(err);
|
|
39
|
+
if (!chainFallbacks?.length)
|
|
40
|
+
return undefined;
|
|
41
|
+
const providerSubCode = chainFallbacks.find((a) => a.code)?.code;
|
|
42
|
+
return {
|
|
43
|
+
fallbackAttempts: chainFallbacks,
|
|
44
|
+
...(providerSubCode ? { providerSubCode } : {}),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Normalize gateway rejection metadata into the ai-skills provider failure snapshot. */
|
|
48
|
+
export function providerInvokeFailureFromRejection(rejection) {
|
|
49
|
+
const fallbackAttempts = rejection.fallbackAttempts;
|
|
50
|
+
const providerAttempts = rejection.providerAttempts;
|
|
51
|
+
const providerSubCode = rejection.providerSubCode ??
|
|
52
|
+
providerAttempts?.find((a) => a.code)?.code ??
|
|
53
|
+
fallbackAttempts?.find((a) => a.code)?.code;
|
|
54
|
+
return {
|
|
55
|
+
rejection,
|
|
56
|
+
...(providerSubCode ? { providerSubCode } : {}),
|
|
57
|
+
...(rejection.operatorHint ? { operatorHint: rejection.operatorHint } : {}),
|
|
58
|
+
...(providerAttempts?.length ? { providerAttempts } : {}),
|
|
59
|
+
...(fallbackAttempts?.length ? { fallbackAttempts } : {}),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
28
62
|
//# sourceMappingURL=gateway-invoke-rejection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-invoke-rejection.js","sourceRoot":"","sources":["../../src/utils/gateway-invoke-rejection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gateway-invoke-rejection.js","sourceRoot":"","sources":["../../src/utils/gateway-invoke-rejection.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wCAAwC,EAAE,MAAM,kBAAkB,CAAC;AAW5E;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAAC,GAAY;IAC7D,IAAI,GAAG,GAAY,GAAG,CAAC;IACvB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,KAAK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,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClD,CAAC;AACN,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,kCAAkC,CAC9C,SAAyC;IAEzC,MAAM,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC;IACpD,MAAM,gBAAgB,GAAG,SAAS,CAAC,gBAAgB,CAAC;IACpD,MAAM,eAAe,GACjB,SAAS,CAAC,eAAe;QACzB,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI;QAC3C,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IAChD,OAAO;QACH,SAAS;QACT,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC;AACN,CAAC"}
|
|
@@ -250,5 +250,24 @@
|
|
|
250
250
|
"retryable": true,
|
|
251
251
|
"userActionRequired": false,
|
|
252
252
|
"confidence": "medium"
|
|
253
|
+
},
|
|
254
|
+
"SKILL_PROVIDER_INVOKE_FAILED": {
|
|
255
|
+
"defaultLevel": "error",
|
|
256
|
+
"title": "Gateway provider invoke failed",
|
|
257
|
+
"impact": "runSkill did not return a successful gateway response; downstream parsed output is unavailable.",
|
|
258
|
+
"possibleCauses": [
|
|
259
|
+
"Provider authentication failed for the resolved route (see providerSubCode evidence).",
|
|
260
|
+
"Provider quota or rate limit exceeded.",
|
|
261
|
+
"Model id not found on the resolved provider.",
|
|
262
|
+
"Gateway or provider network unreachable."
|
|
263
|
+
],
|
|
264
|
+
"remediation": [
|
|
265
|
+
"Read providerSubCode and operatorHint evidence on this log entry.",
|
|
266
|
+
"Inspect trace.invokeRejection.providerAttempts when executionMode is trace.",
|
|
267
|
+
"Verify API keys for the adapter implied by the resolved model route."
|
|
268
|
+
],
|
|
269
|
+
"retryable": true,
|
|
270
|
+
"userActionRequired": true,
|
|
271
|
+
"confidence": "high"
|
|
253
272
|
}
|
|
254
273
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exellix/ai-skills",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
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",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
26
|
"metadata",
|
|
27
|
-
"templates",
|
|
28
27
|
"README.md",
|
|
29
28
|
"erc-manifest.json"
|
|
30
29
|
],
|
|
@@ -38,11 +37,11 @@
|
|
|
38
37
|
"test:real": "tsx test-real.ts",
|
|
39
38
|
"test:integration": "tsx test/run.ts",
|
|
40
39
|
"test:unit": "tsx test/run-unit.ts",
|
|
41
|
-
"catalox:provision-ai-skills": "
|
|
42
|
-
"catalox:sync-skill-templates": "
|
|
40
|
+
"catalox:provision-ai-skills": "npm run catalox:provision-ai-skills -w @exellix/catalox-ai-skills",
|
|
41
|
+
"catalox:sync-skill-templates": "npm run catalox:sync-skill-templates -w @exellix/catalox-ai-skills",
|
|
43
42
|
"catalox:provision-ai-engines": "tsx scripts/provision-ai-engines-catalog.ts",
|
|
44
43
|
"catalox:restore": "npm run catalox:provision-ai-skills && npm run catalox:provision-ai-engines",
|
|
45
|
-
"catalox:verify": "
|
|
44
|
+
"catalox:verify": "npm run catalox:verify -w @exellix/catalox-ai-skills",
|
|
46
45
|
"live:professional-answer": "tsx scripts/run-professional-answer-live.ts",
|
|
47
46
|
"test:ci": "npm run build && npm run test:unit",
|
|
48
47
|
"test": "npm run build && npm run test:integration",
|
|
@@ -66,10 +65,11 @@
|
|
|
66
65
|
"@x12i/logxer": "$@x12i/logxer"
|
|
67
66
|
},
|
|
68
67
|
"dependencies": {
|
|
68
|
+
"@exellix/catalox-ai-skills": "^1.0.1",
|
|
69
69
|
"@x12i/activix": "^9.0.0",
|
|
70
|
-
"@x12i/ai-gateway": "^10.4.
|
|
70
|
+
"@x12i/ai-gateway": "^10.4.4",
|
|
71
71
|
"@x12i/ai-profiles": "^3.4.0",
|
|
72
|
-
"@x12i/catalox": "^5.
|
|
72
|
+
"@x12i/catalox": "^5.10.1",
|
|
73
73
|
"@x12i/env": "^4.0.3",
|
|
74
74
|
"@x12i/execution-memory-manager": "^1.2.0",
|
|
75
75
|
"@x12i/graphenix-core": "^2.12.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/node": "^20.19.27",
|
|
85
|
-
"@x12i/catalox-contracts": "^5.
|
|
85
|
+
"@x12i/catalox-contracts": "^5.10.1",
|
|
86
86
|
"dotenv": "^16.6.1",
|
|
87
87
|
"ts-node": "^10.9.2",
|
|
88
88
|
"tsx": "^4.21.0",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Professional answer
|
|
2
|
-
|
|
3
|
-
You are a professional advisor. Answer the **question** supplied in `{{taskVariables.question}}` using only the facts, context, and knowledge provided in the user message.
|
|
4
|
-
|
|
5
|
-
## Constraints
|
|
6
|
-
|
|
7
|
-
- Address `taskVariables.question` directly. Do not substitute a different task or topic.
|
|
8
|
-
- Ground every claim in the provided input, context, or knowledge. Do not invent facts.
|
|
9
|
-
- State assumptions when you infer beyond the provided material.
|
|
10
|
-
- List unknowns or information gaps that limit confidence.
|
|
11
|
-
- Keep a professional, neutral tone suitable for {{jobVariables.audience | the intended audience}}.
|
|
12
|
-
|
|
13
|
-
## Output format
|
|
14
|
-
|
|
15
|
-
Respond with **only** the structure below. No preamble, no closing remarks, and no text outside these sections.
|
|
16
|
-
|
|
17
|
-
Start with the FlexMD frame line, then use these headings exactly:
|
|
18
|
-
|
|
19
|
-
[[frame:professional-answer]]
|
|
20
|
-
|
|
21
|
-
### Short Answer
|
|
22
|
-
One or two sentences that directly answer the question.
|
|
23
|
-
|
|
24
|
-
### Full Answer
|
|
25
|
-
A detailed explanation with reasoning. Use paragraphs or bullets as appropriate.
|
|
26
|
-
|
|
27
|
-
### Assumptions
|
|
28
|
-
- List each assumption on its own bullet, or write `- None` when you made no assumptions.
|
|
29
|
-
|
|
30
|
-
### Unknowns
|
|
31
|
-
- List each gap or missing fact on its own bullet, or write `- None` when nothing material is missing.
|
|
32
|
-
|
|
33
|
-
### Evidence
|
|
34
|
-
- Cite supporting facts from the provided input, context, or knowledge only. Do not rely on general world knowledge unless it appears in the provided material. Write `- None` when no supporting material was supplied.
|
package/templates/professional-answer/synthesis-context/execution-memory-only/instructions.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Synthesis context — execution memory only
|
|
2
|
-
|
|
3
|
-
You prepare **synthesized context** for the downstream **professional-answer** MAIN skill. The MAIN skill will answer `{{taskVariables.question}}` using only material you distill here.
|
|
4
|
-
|
|
5
|
-
## Role
|
|
6
|
-
|
|
7
|
-
- Read the execution-memory JSON supplied in the user message.
|
|
8
|
-
- Extract facts, structure, and reasoning relevant to the question.
|
|
9
|
-
- Produce markdown context the MAIN skill can use as override context.
|
|
10
|
-
|
|
11
|
-
## Core focus
|
|
12
|
-
|
|
13
|
-
This synthesis pass targets {{core:analysis}} — structured analysis of the execution-memory payload relative to the question.
|
|
14
|
-
|
|
15
|
-
## Constraints
|
|
16
|
-
|
|
17
|
-
- Do not answer the question directly; prepare material for MAIN.
|
|
18
|
-
- Do not invent facts absent from execution memory.
|
|
19
|
-
- Prefer concise sections with headings when the payload is large.
|
|
20
|
-
- Note gaps as "unknowns" when evidence is missing.
|