@exellix/ai-tasks 8.1.16 → 8.2.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.
Files changed (75) hide show
  1. package/dist/core/task-sdk.d.ts.map +1 -1
  2. package/dist/core/task-sdk.js +1187 -1159
  3. package/dist/core/task-sdk.js.map +1 -1
  4. package/dist/errors/runTaskExecutionError.d.ts +63 -0
  5. package/dist/errors/runTaskExecutionError.d.ts.map +1 -0
  6. package/dist/errors/runTaskExecutionError.js +167 -0
  7. package/dist/errors/runTaskExecutionError.js.map +1 -0
  8. package/dist/index.d.ts +9 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +5 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/invocation/buildRunTaskResultMeta.d.ts +7 -0
  13. package/dist/invocation/buildRunTaskResultMeta.d.ts.map +1 -0
  14. package/dist/invocation/buildRunTaskResultMeta.js +38 -0
  15. package/dist/invocation/buildRunTaskResultMeta.js.map +1 -0
  16. package/dist/invocation/formatEngineLabel.d.ts +4 -0
  17. package/dist/invocation/formatEngineLabel.d.ts.map +1 -0
  18. package/dist/invocation/formatEngineLabel.js +19 -0
  19. package/dist/invocation/formatEngineLabel.js.map +1 -0
  20. package/dist/invocation/index.d.ts +8 -0
  21. package/dist/invocation/index.d.ts.map +1 -0
  22. package/dist/invocation/index.js +7 -0
  23. package/dist/invocation/index.js.map +1 -0
  24. package/dist/invocation/invocationPolicy.d.ts +8 -0
  25. package/dist/invocation/invocationPolicy.d.ts.map +1 -0
  26. package/dist/invocation/invocationPolicy.js +13 -0
  27. package/dist/invocation/invocationPolicy.js.map +1 -0
  28. package/dist/invocation/parseProfileSlot.d.ts +6 -0
  29. package/dist/invocation/parseProfileSlot.d.ts.map +1 -0
  30. package/dist/invocation/parseProfileSlot.js +12 -0
  31. package/dist/invocation/parseProfileSlot.js.map +1 -0
  32. package/dist/invocation/resolveInvocationPlan.d.ts +7 -0
  33. package/dist/invocation/resolveInvocationPlan.d.ts.map +1 -0
  34. package/dist/invocation/resolveInvocationPlan.js +49 -0
  35. package/dist/invocation/resolveInvocationPlan.js.map +1 -0
  36. package/dist/invocation/resolveProfileInvocationRouting.d.ts +30 -0
  37. package/dist/invocation/resolveProfileInvocationRouting.d.ts.map +1 -0
  38. package/dist/invocation/resolveProfileInvocationRouting.js +118 -0
  39. package/dist/invocation/resolveProfileInvocationRouting.js.map +1 -0
  40. package/dist/invocation/types.d.ts +64 -0
  41. package/dist/invocation/types.d.ts.map +1 -0
  42. package/dist/invocation/types.js +2 -0
  43. package/dist/invocation/types.js.map +1 -0
  44. package/dist/logxer/aiTasksDiagnosticCodes.d.ts +1 -0
  45. package/dist/logxer/aiTasksDiagnosticCodes.d.ts.map +1 -1
  46. package/dist/logxer/aiTasksDiagnosticCodes.js +1 -0
  47. package/dist/logxer/aiTasksDiagnosticCodes.js.map +1 -1
  48. package/dist/observability/classifyRunTaskFailure.d.ts +33 -0
  49. package/dist/observability/classifyRunTaskFailure.d.ts.map +1 -0
  50. package/dist/observability/classifyRunTaskFailure.js +111 -0
  51. package/dist/observability/classifyRunTaskFailure.js.map +1 -0
  52. package/dist/observability/llmRouteContext.d.ts +26 -0
  53. package/dist/observability/llmRouteContext.d.ts.map +1 -0
  54. package/dist/observability/llmRouteContext.js +92 -0
  55. package/dist/observability/llmRouteContext.js.map +1 -0
  56. package/dist/observability/logRunTaskFailure.d.ts +10 -0
  57. package/dist/observability/logRunTaskFailure.d.ts.map +1 -0
  58. package/dist/observability/logRunTaskFailure.js +87 -0
  59. package/dist/observability/logRunTaskFailure.js.map +1 -0
  60. package/dist/strategies/direct-execution-strategy.d.ts.map +1 -1
  61. package/dist/strategies/direct-execution-strategy.js +38 -4
  62. package/dist/strategies/direct-execution-strategy.js.map +1 -1
  63. package/dist/types/index.d.ts +1 -0
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/dist/types/index.js.map +1 -1
  66. package/dist/utils/aiProfileModelFormat.d.ts +9 -0
  67. package/dist/utils/aiProfileModelFormat.d.ts.map +1 -0
  68. package/dist/utils/aiProfileModelFormat.js +93 -0
  69. package/dist/utils/aiProfileModelFormat.js.map +1 -0
  70. package/dist/utils/resolveAiProfileModel.d.ts +1 -6
  71. package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
  72. package/dist/utils/resolveAiProfileModel.js +11 -108
  73. package/dist/utils/resolveAiProfileModel.js.map +1 -1
  74. package/documenations/upstream-feature-requests/logxer-failure-classification-and-causal-diagnostics.md +403 -0
  75. package/package.json +2 -2
@@ -0,0 +1,118 @@
1
+ import { AIProfilesError, resolveAIProfile } from "@x12i/ai-profiles";
2
+ import { inferLlmRouteFromModel } from "../observability/llmRouteContext.js";
3
+ import { formatResolvedProfileModelId, isResolvableModelAlias, normalizeXynthesisModelAlias, } from "../utils/aiProfileModelFormat.js";
4
+ import { isConcreteModelId } from "../utils/concreteModelId.js";
5
+ import { formatEngineLabel } from "./formatEngineLabel.js";
6
+ import { parseProfileSlot } from "./parseProfileSlot.js";
7
+ export const INVOCATION_RESOLVER_VERSION = "ai-tasks/8.1.16";
8
+ /** Match `@exellix/xynthesis` `toOpenRouterModelId` wire shape for PRE/POST hops. */
9
+ export function formatXynthesisWireModelId(provider, modelId) {
10
+ const p = provider.trim();
11
+ const m = modelId.trim();
12
+ if (!p || !m)
13
+ return m;
14
+ if (p === "custom" || p === "local")
15
+ return m;
16
+ return `${p}/${m}`;
17
+ }
18
+ function routingFromConcreteModelId(modelId) {
19
+ const route = inferLlmRouteFromModel(modelId);
20
+ return route.adapterHint === "openrouter" ? "openrouter" : "direct";
21
+ }
22
+ function directModelIdFromInvocation(resolved) {
23
+ const direct = resolved.invocation?.direct;
24
+ if (direct?.modelId) {
25
+ const provider = direct.provider ?? resolved.provider;
26
+ return formatResolvedProfileModelId(String(provider), direct.modelId);
27
+ }
28
+ return formatResolvedProfileModelId(resolved.provider, resolved.modelId);
29
+ }
30
+ function openrouterModelIdFromInvocation(resolved) {
31
+ const or = resolved.invocation?.openrouter;
32
+ if (or?.modelId) {
33
+ return or.modelId.includes("/") ? or.modelId : `openrouter/${or.modelId}`;
34
+ }
35
+ if (resolved.routing === "openrouter") {
36
+ return formatResolvedProfileModelId(resolved.provider, resolved.modelId);
37
+ }
38
+ return undefined;
39
+ }
40
+ function profileWarnings(resolved) {
41
+ return (resolved.warnings ?? [])
42
+ .map((w) => w.message)
43
+ .filter((m) => typeof m === "string" && m.trim().length > 0);
44
+ }
45
+ /**
46
+ * Shared profile-slot → routed provider/model resolver used by `resolveModelReference` and
47
+ * `resolveInvocationPlan`. Calls `@x12i/ai-profiles` `resolveAIProfile` with the same options
48
+ * `runTask` model resolution uses at execute time.
49
+ */
50
+ export async function resolveProfileInvocationRouting(profileSlot, options) {
51
+ const trimmed = profileSlot.trim();
52
+ if (!trimmed) {
53
+ throw new Error("Profile slot must be a non-empty string.");
54
+ }
55
+ if (isConcreteModelId(trimmed)) {
56
+ const routing = routingFromConcreteModelId(trimmed);
57
+ const route = inferLlmRouteFromModel(trimmed);
58
+ const provider = route.providerPrefix ?? trimmed.split("/")[0] ?? "unknown";
59
+ return {
60
+ profileSlot: trimmed,
61
+ routing,
62
+ provider,
63
+ modelId: trimmed,
64
+ engineLabel: formatEngineLabel(routing, provider),
65
+ warnings: [],
66
+ ...(routing === "openrouter"
67
+ ? { openrouterModelId: trimmed }
68
+ : { directModelId: trimmed }),
69
+ };
70
+ }
71
+ if (!isResolvableModelAlias(trimmed) && !trimmed.includes("@")) {
72
+ const routing = routingFromConcreteModelId(trimmed);
73
+ const provider = trimmed.split("/")[0] ?? "unknown";
74
+ return {
75
+ profileSlot: trimmed,
76
+ routing,
77
+ provider,
78
+ modelId: trimmed,
79
+ engineLabel: formatEngineLabel(routing, provider),
80
+ warnings: [],
81
+ };
82
+ }
83
+ const { profileInput, choice } = parseProfileSlot(trimmed);
84
+ const normalizedInput = normalizeXynthesisModelAlias(profileInput);
85
+ let resolved;
86
+ try {
87
+ resolved = await resolveAIProfile(normalizedInput, {
88
+ choice,
89
+ source: options.source ?? "bundled",
90
+ useOpenRouter: options.useOpenRouter,
91
+ });
92
+ }
93
+ catch (err) {
94
+ if (err instanceof AIProfilesError && err.code === "UNKNOWN_PROFILE") {
95
+ throw new Error(`Unknown model profile alias "${trimmed}". Use a concrete provider model id or an @x12i/ai-profiles profile/shortcut (e.g. cheap, balanced, pro, default, cheapest).`);
96
+ }
97
+ if (err instanceof AIProfilesError && err.code === "UNKNOWN_CHOICE") {
98
+ throw new Error(`Unknown profile choice in slot "${trimmed}". Use profile@choice only when choice exists in the ai-profiles registry.`);
99
+ }
100
+ throw err;
101
+ }
102
+ const skillWireModelId = formatResolvedProfileModelId(resolved.provider, resolved.modelId);
103
+ const xynthesisWireModelId = formatXynthesisWireModelId(resolved.provider, resolved.modelId);
104
+ const modelId = options.phaseKind === "skill" ? skillWireModelId : xynthesisWireModelId;
105
+ return {
106
+ profileSlot: trimmed,
107
+ routing: resolved.routing,
108
+ provider: resolved.provider,
109
+ modelId,
110
+ engineLabel: formatEngineLabel(resolved.routing, resolved.provider),
111
+ invocation: resolved.invocation,
112
+ warnings: profileWarnings(resolved),
113
+ openrouterModelId: openrouterModelIdFromInvocation(resolved),
114
+ directModelId: directModelIdFromInvocation(resolved),
115
+ resolvedProfile: resolved,
116
+ };
117
+ }
118
+ //# sourceMappingURL=resolveProfileInvocationRouting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveProfileInvocationRouting.js","sourceRoot":"","sources":["../../src/invocation/resolveProfileInvocationRouting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AA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,KAAK,iBAAiB,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CACb,gCAAgC,OAAO,8HAA8H,CACtK,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,YAAY,eAAe,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;YACpE,MAAM,IAAI,KAAK,CACb,mCAAmC,OAAO,4EAA4E,CACvH,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,MAAM,gBAAgB,GAAG,4BAA4B,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3F,MAAM,oBAAoB,GAAG,0BAA0B,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAExF,OAAO;QACL,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,OAAO;QACP,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC;QACnE,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,QAAQ,EAAE,eAAe,CAAC,QAAQ,CAAC;QACnC,iBAAiB,EAAE,+BAA+B,CAAC,QAAQ,CAAC;QAC5D,aAAa,EAAE,2BAA2B,CAAC,QAAQ,CAAC;QACpD,eAAe,EAAE,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { ModelInvocation } from "@x12i/ai-profiles";
2
+ /** Same routing enum as `@x12i/ai-profiles` {@link ResolvedAIProfile.routing}. */
3
+ export type InvocationRouting = "openrouter" | "direct";
4
+ export type InvocationPhase = "preAction" | "skill" | "postAction";
5
+ export type InvocationPhasePlan = {
6
+ phase: InvocationPhase;
7
+ /** Stored ai-profile slot after graph-engine merge (name or profile@choice). */
8
+ profileSlot: string;
9
+ routing: InvocationRouting;
10
+ /** Logical provider key used by ai-tasks for this call. */
11
+ provider: string;
12
+ /** Model id passed to the gateway/client for this routing (OR id or vendor-native id). */
13
+ modelId: string;
14
+ /** Short UI label, e.g. "OpenRouter", "Anthropic". */
15
+ engineLabel: string;
16
+ /** Full invocation shapes from registry (optional but recommended for studio tooltips). */
17
+ invocation?: ModelInvocation;
18
+ warnings?: string[];
19
+ };
20
+ export type ResolveInvocationPlanInput = {
21
+ /** Required — ai-profile names per phase (already merged by caller). */
22
+ profiles: {
23
+ preActionModel: string;
24
+ skillModel: string;
25
+ postActionModel: string;
26
+ };
27
+ /**
28
+ * Policy snapshot — must match execute.
29
+ * Example: USE_OPENROUTER, API keys presence flags, studio Records-run defaults.
30
+ */
31
+ policy?: {
32
+ useOpenRouter?: boolean;
33
+ openrouterApiKeyPresent?: boolean;
34
+ };
35
+ /**
36
+ * Optional — when plan must reflect a specific node/strategy.
37
+ * If omitted, ai-tasks returns graph-default plan for the triple only.
38
+ */
39
+ runTaskContext?: {
40
+ skillKey?: string;
41
+ aiTaskStrategies?: Record<string, unknown>;
42
+ nodeId?: string;
43
+ };
44
+ };
45
+ export type ResolveInvocationPlanResult = {
46
+ phases: InvocationPhasePlan[];
47
+ /** Plan-level warnings (e.g. OR requested but key missing → fallback). */
48
+ warnings?: string[];
49
+ /** Version string for studio to log when debugging drift. */
50
+ resolverVersion?: string;
51
+ };
52
+ /** Post-run metadata on successful (or pre-provider) LLM-backed `runTask` results. */
53
+ export type RunTaskResultMeta = {
54
+ provider?: string;
55
+ model?: string;
56
+ routing?: InvocationRouting;
57
+ engineLabel?: string;
58
+ /** When routing is openrouter, the OR model id actually invoked. */
59
+ openrouterModelId?: string;
60
+ /** When routing is direct, vendor-native id. */
61
+ directModelId?: string;
62
+ requestId?: string;
63
+ };
64
+ //# sourceMappingUR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,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/invocation/types.ts"],"names":[],"mappings":""}
@@ -7,6 +7,7 @@ export declare const AI_TASKS_DIAGNOSTIC_CODES: {
7
7
  readonly RUN_TASK_OBSERVABILITY_HINT: "RUN_TASK_OBSERVABILITY_HINT";
8
8
  readonly EXECUTION_STRATEGIES_MULTIPLE_OPTIMIZERS: "EXECUTION_STRATEGIES_MULTIPLE_OPTIMIZERS";
9
9
  readonly NARRIX_WEB_SCOPE_MISS: "NARRIX_WEB_SCOPE_MISS";
10
+ readonly RUN_TASK_EXECUTION_FAILED: "RUN_TASK_EXECUTION_FAILED";
10
11
  };
11
12
  export type AiTasksDiagnosticCode = (typeof AI_TASKS_DIAGNOSTIC_CODES)[keyof typeof AI_TASKS_DIAGNOSTIC_CODES];
12
13
  //# sourceMappingURL=aiTasksDiagnosticCodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aiTasksDiagnosticCodes.d.ts","sourceRoot":"","sources":["../../src/logxer/aiTasksDiagnosticCodes.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,eAAO,MAAM,yBAAyB;;;;;;;;CAQ5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"aiTasksDiagnosticCodes.d.ts","sourceRoot":"","sources":["../../src/logxer/aiTasksDiagnosticCodes.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,eAAO,MAAM,yBAAyB;;;;;;;;;CAS5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC"}
@@ -7,5 +7,6 @@ export const AI_TASKS_DIAGNOSTIC_CODES = {
7
7
  RUN_TASK_OBSERVABILITY_HINT: "RUN_TASK_OBSERVABILITY_HINT",
8
8
  EXECUTION_STRATEGIES_MULTIPLE_OPTIMIZERS: "EXECUTION_STRATEGIES_MULTIPLE_OPTIMIZERS",
9
9
  NARRIX_WEB_SCOPE_MISS: "NARRIX_WEB_SCOPE_MISS",
10
+ RUN_TASK_EXECUTION_FAILED: "RUN_TASK_EXECUTION_FAILED",
10
11
  };
11
12
  //# sourceMappingURL=aiTasksDiagnosticCodes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"aiTasksDiagnosticCodes.js","sourceRoot":"","sources":["../../src/logxer/aiTasksDiagnosticCodes.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,wCAAwC,EAAE,0CAA0C;IACpF,qCAAqC,EAAE,uCAAuC;IAC9E,kCAAkC,EAAE,oCAAoC;IACxE,mCAAmC,EAAE,qCAAqC;IAC1E,2BAA2B,EAAE,6BAA6B;IAC1D,wCAAwC,EAAE,0CAA0C;IACpF,qBAAqB,EAAE,uBAAuB;CACtC,CAAC"}
1
+ {"version":3,"file":"aiTasksDiagnosticCodes.js","sourceRoot":"","sources":["../../src/logxer/aiTasksDiagnosticCodes.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,wCAAwC,EAAE,0CAA0C;IACpF,qCAAqC,EAAE,uCAAuC;IAC9E,kCAAkC,EAAE,oCAAoC;IACxE,mCAAmC,EAAE,qCAAqC;IAC1E,2BAA2B,EAAE,6BAA6B;IAC1D,wCAAwC,EAAE,0CAA0C;IACpF,qBAAqB,EAAE,uBAAuB;IAC9C,yBAAyB,EAAE,2BAA2B;CAC9C,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Best-effort classification of runTask failures for operators and downstream hosts.
3
+ * Distinguishes likely root causes from wrapper/surface symptoms and names the event.
4
+ */
5
+ export type FailureRole = "cause" | "symptom" | "unknown";
6
+ /** Stable machine-readable failure event ids for filtering and dashboards. */
7
+ export type FailureEvent = "graph_engine_task_run_wrapper" | "provider_auth" | "provider_quota_rate_limit" | "provider_routing" | "provider_invoke" | "content_registry_miss" | "prompt_template_empty" | "request_validation" | "task_configuration_compile" | "smart_input_validation" | "output_schema_validation" | "structured_output_parse" | "narrix_failure" | "synthesis_failure" | "missing_parsed_output" | "decision_output_missing" | "model_config" | "timeout" | "unknown";
8
+ export type FailureClassification = {
9
+ /** Whether this message is likely the root cause or a downstream wrapper/surface signal. */
10
+ role: FailureRole;
11
+ /** Primary event this log line describes. */
12
+ event: FailureEvent;
13
+ /**
14
+ * When `role` is `symptom`, where to look next (event ids or free-text operator hint).
15
+ * Omitted when the line itself is the cause or classification is uncertain.
16
+ */
17
+ pointsTo?: FailureEvent[] | string;
18
+ /** Short operator-facing explanation of role + where to look. */
19
+ note: string;
20
+ confidence: "high" | "medium" | "low";
21
+ };
22
+ export type ClassifyRunTaskFailureInput = {
23
+ message: string;
24
+ code?: string;
25
+ name?: string;
26
+ phase?: string;
27
+ stage?: string;
28
+ durationMs?: number;
29
+ };
30
+ /** Classify a failure from message/code/name heuristics (no LLM invoke required). */
31
+ export declare function classifyRunTaskFailure(input: ClassifyRunTaskFailureInput): FailureClassification;
32
+ export declare function formatFailureClassificationHint(c: FailureClassification): string;
33
+ //# sourceMappingURL=classifyRunTaskFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifyRunTaskFailure.d.ts","sourceRoot":"","sources":["../../src/observability/classifyRunTaskFailure.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1D,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GACpB,+BAA+B,GAC/B,eAAe,GACf,2BAA2B,GAC3B,kBAAkB,GAClB,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,oBAAoB,GACpB,4BAA4B,GAC5B,wBAAwB,GACxB,0BAA0B,GAC1B,yBAAyB,GACzB,gBAAgB,GAChB,mBAAmB,GACnB,uBAAuB,GACvB,yBAAyB,GACzB,cAAc,GACd,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,qBAAqB,GAAG;IAClC,4FAA4F;IAC5F,IAAI,EAAE,WAAW,CAAC;IAClB,6CAA6C;IAC7C,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IACnC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAgCF,qFAAqF;AACrF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,qBAAqB,CAiLhG;AAED,wBAAgB,+BAA+B,CAAC,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAahF"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Best-effort classification of runTask failures for operators and downstream hosts.
3
+ * Distinguishes likely root causes from wrapper/surface symptoms and names the event.
4
+ */
5
+ function msgLower(input) {
6
+ return input.message.toLowerCase();
7
+ }
8
+ function symptom(event, pointsTo, note, confidence = "high") {
9
+ return { role: "symptom", event, pointsTo, note, confidence };
10
+ }
11
+ function cause(event, note, confidence = "high") {
12
+ return { role: "cause", event, note, confidence };
13
+ }
14
+ function unknown(note) {
15
+ return {
16
+ role: "unknown",
17
+ event: "unknown",
18
+ note,
19
+ confidence: "low",
20
+ };
21
+ }
22
+ /** Classify a failure from message/code/name heuristics (no LLM invoke required). */
23
+ export function classifyRunTaskFailure(input) {
24
+ const m = msgLower(input);
25
+ const code = input.code?.toUpperCase() ?? "";
26
+ const name = input.name ?? "";
27
+ // Graph-engine / host wrappers — surface symptom only.
28
+ if (/^task_run_failed:/i.test(input.message.trim()) || code === "TASK_RUN_FAILED") {
29
+ return symptom("graph_engine_task_run_wrapper", [
30
+ "provider_auth",
31
+ "provider_quota_rate_limit",
32
+ "content_registry_miss",
33
+ "prompt_template_empty",
34
+ "provider_invoke",
35
+ "synthesis_failure",
36
+ ], "Graph-engine TASK_RUN_FAILED is a wrapper; inspect taskRunLog, res.error.message, ai-tasks RUN_TASK_EXECUTION_FAILED logs, or skill-execution records for the root cause.", "high");
37
+ }
38
+ if (name === "SmartInputValidationError" || code.startsWith("SMART_INPUT") || /smartinput/i.test(m)) {
39
+ return cause("smart_input_validation", "Invalid smartInput shape or unsupported xynthesized scope on the RunTaskRequest.", "high");
40
+ }
41
+ if (name === "TaskConfigurationCompileError" || /taskconfiguration/i.test(m)) {
42
+ return cause("task_configuration_compile", "taskConfiguration could not compile into a valid executionPipeline / request shape.", "high");
43
+ }
44
+ if (code === "PROMPT_RENDERED_EMPTY" ||
45
+ /prompt template.*rendered to empty string/i.test(m)) {
46
+ return cause("prompt_template_empty", "Prompt template resolved to empty text — check input bindings and template variables (e.g. input.question).", "high");
47
+ }
48
+ if (/content not found for key/i.test(m) ||
49
+ /failed to resolve instruction key/i.test(m) ||
50
+ /failed to resolve prompt key/i.test(m)) {
51
+ return cause("content_registry_miss", "Skill instructions/prompt could not be resolved from the content registry (.metadata / Catalox).", "high");
52
+ }
53
+ if (/agentid|jobtypeid|tasktypeid/i.test(m) &&
54
+ (/required|missing|non-empty|blank/i.test(m) || /must include/i.test(m))) {
55
+ return cause("request_validation", "Required RunTaskRequest correlation ids (agentId, jobTypeId, taskTypeId) are missing or blank.", "high");
56
+ }
57
+ if (/401|403|unauthorized|invalid api key|incorrect api key|authentication/i.test(m) ||
58
+ /api key.*(missing|not set|required)/i.test(m)) {
59
+ return cause("provider_auth", "Provider authentication failed — verify API keys for the resolved adapter (see adapterHint / likelyEnvKeys).", "high");
60
+ }
61
+ if (/rate limit|quota|429|too many requests/i.test(m)) {
62
+ return cause("provider_quota_rate_limit", "Provider quota or rate limit exceeded for the resolved model route.", "high");
63
+ }
64
+ if (/timeout|timed out|ETIMEDOUT|ESOCKETTIMEDOUT/i.test(m)) {
65
+ return cause("timeout", "Call exceeded timeoutMs — may be slow provider, network, or an oversized prompt/context.", "medium");
66
+ }
67
+ if (/unknown model profile alias|model_config|xynthesis_concrete_not_allowed/i.test(m)) {
68
+ return cause("model_config", "Model slot resolution failed — check modelConfig.skillModel / xynthesisModel aliases and graph-engine pre-resolution.", "high");
69
+ }
70
+ if (/narrix/i.test(m) && /fail|error|invalid|disabled/i.test(m)) {
71
+ return cause("narrix_failure", "Narrix preprocessor or handler returned an error — inspect narrixInput, seed archive, and USE_NARRIX_INGEST.", "high");
72
+ }
73
+ if (/synthesized-context|synthesis|xynthesis/i.test(m) &&
74
+ /fail|error|invoke/i.test(m)) {
75
+ return cause("synthesis_failure", "PRE/POST xynthesis call failed — check xynthesisModel, synthesis templates, and xynthesis provider env.", "medium");
76
+ }
77
+ if (/outputvalidation failed/i.test(m)) {
78
+ return symptom("output_schema_validation", "structured_output_parse", "Output failed JSON/schema validation after the model returned — inspect raw model output and outputValidation schema; root may be provider quality or schema mismatch.", "medium");
79
+ }
80
+ if (/did not return response\.parsed/i.test(m)) {
81
+ return symptom("decision_output_missing", "structured_output_parse", "Decision/routing task returned no parsed payload — inspect gateway parse mode and model structured-output compliance.", "high");
82
+ }
83
+ if (/no parsed output|parsed is empty|missing parsed/i.test(m)) {
84
+ return symptom("missing_parsed_output", ["provider_invoke", "structured_output_parse", "prompt_template_empty"], "No parsed skill output — often a symptom of an earlier provider/template failure or non-JSON model response.", "medium");
85
+ }
86
+ // Fast MAIN failures — only when no more specific cause matched above.
87
+ if (input.durationMs != null &&
88
+ input.durationMs < 2_000 &&
89
+ (input.stage === "main-skill" || input.phase === "main_skill")) {
90
+ return cause("provider_invoke", "Fast MAIN/provider failure — likely auth, routing, content resolution, or prompt build before a successful model round-trip.", "medium");
91
+ }
92
+ if (/provider|routing|gateway|invoke/i.test(m)) {
93
+ return cause("provider_invoke", "Provider or gateway invocation failed for the resolved model route.", "medium");
94
+ }
95
+ return unknown("Could not classify this failure automatically — use executionMode:trace, skill-execution records, and rootMessage/rootCode.");
96
+ }
97
+ export function formatFailureClassificationHint(c) {
98
+ if (c.role === "cause") {
99
+ return `[cause:${c.event}] ${c.note}`;
100
+ }
101
+ if (c.role === "symptom") {
102
+ const target = Array.isArray(c.pointsTo)
103
+ ? c.pointsTo.join(",")
104
+ : typeof c.pointsTo === "string"
105
+ ? c.pointsTo
106
+ : "upstream logs";
107
+ return `[symptom:${c.event}→check:${target}] ${c.note}`;
108
+ }
109
+ return `[unknown:${c.event}] ${c.note}`;
110
+ }
111
+ //# sourceMappingURL=classifyRunTaskFailure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifyRunTaskFailure.js","sourceRoot":"","sources":["../../src/observability/classifyRunTaskFail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ateway may still reroute internally; this is the best pre-invoke signal for logs.
4
+ */
5
+ export type LlmAdapterHint = "openrouter" | "openai-direct" | "anthropic-direct" | "google-direct" | "groq-direct" | "unknown" | "unset";
6
+ export type LlmRouteContext = {
7
+ /** Raw model string from modelConfig / llmCall (post alias resolution when applicable). */
8
+ rawModel?: string;
9
+ /** First path segment when model contains `/` (e.g. `openai`, `openrouter`, `x-ai`). */
10
+ providerPrefix?: string;
11
+ /** Remainder after provider prefix. */
12
+ modelId?: string;
13
+ /** Best-effort adapter the gateway stack is expected to use for this prefix. */
14
+ adapterHint: LlmAdapterHint;
15
+ /** Env vars commonly required for the inferred adapter (for operator hints). */
16
+ likelyEnvKeys: string[];
17
+ /** Short human-readable routing summary for log lines and error messages. */
18
+ routingNote: string;
19
+ /** When upstream returned routing diagnostics (trace mode / gateway echo). */
20
+ actualRouting?: Record<string, unknown>;
21
+ };
22
+ /** Parse a concrete or alias-like model id into log-friendly route context. */
23
+ export declare function inferLlmRouteFromModel(rawModel: string | undefined | null): LlmRouteContext;
24
+ /** Merge gateway routing echo (when present) into route context. */
25
+ export declare function withActualRouting(base: LlmRouteContext, actualRouting: unknown): LlmRouteContext;
26
+ //# sourceMappingURL=llmRouteContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llmRouteContext.d.ts","sourceRoot":"","sources":["../../src/observability/llmRouteContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,WAAW,EAAE,cAAc,CAAC;IAC5B,gFAAgF;IAChF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC,CAAC;AAyCF,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,eAAe,CA0C3F;AAED,oEAAoE;AACpE,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,OAAO,GACrB,eAAe,CAejB"}
@@ -0,0 +1,92 @@
1
+ const ADAPTER_ENV = {
2
+ openrouter: ["OPEN_ROUTER_KEY", "OPENROUTER_API_KEY"],
3
+ "openai-direct": ["OPENAI_API_KEY"],
4
+ "anthropic-direct": ["ANTHROPIC_API_KEY"],
5
+ "google-direct": ["GOOGLE_API_KEY", "GEMINI_API_KEY"],
6
+ "groq-direct": ["GROQ_API_KEY"],
7
+ unknown: [],
8
+ unset: [],
9
+ };
10
+ function adapterForPrefix(prefix) {
11
+ const p = prefix.toLowerCase();
12
+ if (p === "openrouter")
13
+ return "openrouter";
14
+ if (p === "openai")
15
+ return "openai-direct";
16
+ if (p === "anthropic")
17
+ return "anthropic-direct";
18
+ if (p === "google")
19
+ return "google-direct";
20
+ if (p === "groq")
21
+ return "groq-direct";
22
+ return "unknown";
23
+ }
24
+ function formatRoutingNote(args) {
25
+ if (!args.rawModel?.trim()) {
26
+ return "no model configured on this call (gateway/provider defaults may apply)";
27
+ }
28
+ const target = args.providerPrefix && args.modelId
29
+ ? `${args.providerPrefix}/${args.modelId}`
30
+ : args.rawModel;
31
+ const env = args.likelyEnvKeys.length > 0 ? `; check env: ${args.likelyEnvKeys.join(" or ")}` : "";
32
+ return `intended adapter=${args.adapterHint} model=${target}${env}`;
33
+ }
34
+ /** Parse a concrete or alias-like model id into log-friendly route context. */
35
+ export function inferLlmRouteFromModel(rawModel) {
36
+ const raw = typeof rawModel === "string" ? rawModel.trim() : "";
37
+ if (!raw) {
38
+ return {
39
+ adapterHint: "unset",
40
+ likelyEnvKeys: [],
41
+ routingNote: formatRoutingNote({ adapterHint: "unset", likelyEnvKeys: [] }),
42
+ };
43
+ }
44
+ const slash = raw.indexOf("/");
45
+ if (slash > 0) {
46
+ const providerPrefix = raw.slice(0, slash);
47
+ const modelId = raw.slice(slash + 1);
48
+ const adapterHint = adapterForPrefix(providerPrefix);
49
+ const likelyEnvKeys = ADAPTER_ENV[adapterHint];
50
+ return {
51
+ rawModel: raw,
52
+ providerPrefix,
53
+ modelId,
54
+ adapterHint,
55
+ likelyEnvKeys,
56
+ routingNote: formatRoutingNote({
57
+ rawModel: raw,
58
+ adapterHint,
59
+ providerPrefix,
60
+ modelId,
61
+ likelyEnvKeys,
62
+ }),
63
+ };
64
+ }
65
+ return {
66
+ rawModel: raw,
67
+ adapterHint: "unknown",
68
+ likelyEnvKeys: [],
69
+ routingNote: formatRoutingNote({
70
+ rawModel: raw,
71
+ adapterHint: "unknown",
72
+ likelyEnvKeys: [],
73
+ }),
74
+ };
75
+ }
76
+ /** Merge gateway routing echo (when present) into route context. */
77
+ export function withActualRouting(base, actualRouting) {
78
+ if (actualRouting == null || typeof actualRouting !== "object" || Array.isArray(actualRouting)) {
79
+ return base;
80
+ }
81
+ const r = actualRouting;
82
+ const provider = typeof r.provider === "string" && r.provider.trim() ? r.provider.trim() : undefined;
83
+ const note = provider
84
+ ? `${base.routingNote}; gateway routing.provider=${provider}`
85
+ : base.routingNote;
86
+ return {
87
+ ...base,
88
+ actualRouting: r,
89
+ routingNote: note,
90
+ };
91
+ }
92
+ //# sourceMappingURL=llmRouteContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llmRouteContext.js","sourceRoot":"","sources":["../../src/observability/llmRouteContext.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,GAAqC;IACpD,UAAU,EAAE,CAAC,iBAAiB,EA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UAAU,iBAAiB,CAC/B,IAAqB,EACrB,aAAsB;IAEtB,IAAI,aAAa,IAAI,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/F,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,CAAC,GAAG,aAAwC,CAAC;IACnD,MAAM,QAAQ,GACZ,OAAO,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,MAAM,IAAI,GAAG,QAAQ;QACnB,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,8BAA8B,QAAQ,EAAE;QAC7D,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IACrB,OAAO;QACL,GAAG,IAAI;QACP,aAAa,EAAE,CAAC;QAChB,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type EnrichRunTaskErrorContext } from "../errors/runTaskExecutionError.js";
2
+ export type LogRunTaskFailureArgs = EnrichRunTaskErrorContext & {
3
+ cause: unknown;
4
+ };
5
+ /**
6
+ * Emit a structured diagnostic log for a failed `runTask` and return an enriched error
7
+ * suitable for graph-engine / RealTasksClient to surface as `error.message`.
8
+ */
9
+ export declare function logAndEnrichRunTaskFailure(args: LogRunTaskFailureArgs): Error;
10
+ //# sourceMappingURL=logRunTaskFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logRunTaskFailure.d.ts","sourceRoot":"","sources":["../../src/observability/logRunTaskFailure.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,oCAAoC,CAAC;AAO5C,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG;IAC9D,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAaF;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,qBAAqB,GAAG,KAAK,CA8E7E"}
@@ -0,0 +1,87 @@
1
+ import { DebugLogAbstract, fieldEvidence } from "@x12i/logxer";
2
+ import { classifyRunTaskFailure, formatFailureClassificationHint, } from "./classifyRunTaskFailure.js";
3
+ import { enrichRunTaskError, isRunTaskExecutionError, } from "../errors/runTaskExecutionError.js";
4
+ import { isSmartInputValidationError } from "../errors/smartInputValidationError.js";
5
+ import { isTaskConfigurationCompileError } from "../errors/taskConfigurationCompileError.js";
6
+ import { AI_TASKS_DIAGNOSTIC_CODES } from "../logxer/aiTasksDiagnosticCodes.js";
7
+ import { getAiTasksLogxer } from "../logxer/packageLogxers.js";
8
+ import { inferLlmRouteFromModel } from "./llmRouteContext.js";
9
+ function rootMessageFromError(error) {
10
+ return {
11
+ message: error.message,
12
+ name: error.name,
13
+ code: typeof error.code === "string"
14
+ ? error.code
15
+ : undefined,
16
+ };
17
+ }
18
+ /**
19
+ * Emit a structured diagnostic log for a failed `runTask` and return an enriched error
20
+ * suitable for graph-engine / RealTasksClient to surface as `error.message`.
21
+ */
22
+ export function logAndEnrichRunTaskFailure(args) {
23
+ const enriched = enrichRunTaskError(args.cause, args);
24
+ const details = isRunTaskExecutionError(enriched) ? enriched.details : undefined;
25
+ const root = details?.rootError ??
26
+ (args.cause instanceof Error ? rootMessageFromError(args.cause) : { name: "Error", message: String(args.cause) });
27
+ const route = details?.llmRoute ??
28
+ inferLlmRouteFromModel(details?.modelConfig?.skillModel ??
29
+ args.modelConfig?.skillModel);
30
+ const failureClassification = details?.failureClassification ??
31
+ classifyRunTaskFailure({
32
+ message: root.message,
33
+ code: root.code,
34
+ name: root.name,
35
+ phase: details?.phase ?? args.phase,
36
+ stage: details?.stage ?? args.stage,
37
+ durationMs: args.durationMs ?? details?.durationMs,
38
+ });
39
+ const evidence = [
40
+ fieldEvidence("skillKey", args.skillKey),
41
+ fieldEvidence("phase", details?.phase ?? args.phase ?? "unknown"),
42
+ fieldEvidence("failureRole", failureClassification.role),
43
+ fieldEvidence("failureEvent", failureClassification.event),
44
+ fieldEvidence("failureConfidence", failureClassification.confidence),
45
+ ...(failureClassification.pointsTo
46
+ ? [
47
+ fieldEvidence("failurePointsTo", Array.isArray(failureClassification.pointsTo)
48
+ ? failureClassification.pointsTo.join(",")
49
+ : failureClassification.pointsTo),
50
+ ]
51
+ : []),
52
+ fieldEvidence("failureNote", failureClassification.note),
53
+ ...(args.stage || details?.stage
54
+ ? [fieldEvidence("stage", details?.stage ?? args.stage)]
55
+ : []),
56
+ ...(args.nodeId ? [fieldEvidence("nodeId", args.nodeId)] : []),
57
+ ...(args.graphId ? [fieldEvidence("graphId", args.graphId)] : []),
58
+ ...(args.jobId ? [fieldEvidence("jobId", args.jobId)] : []),
59
+ ...(args.taskId ? [fieldEvidence("taskId", args.taskId)] : []),
60
+ ...(route.rawModel ? [fieldEvidence("model", route.rawModel)] : []),
61
+ ...(route.adapterHint !== "unset"
62
+ ? [fieldEvidence("adapterHint", route.adapterHint)]
63
+ : []),
64
+ ...(route.routingNote ? [fieldEvidence("routingNote", route.routingNote)] : []),
65
+ ...(route.likelyEnvKeys.length
66
+ ? [fieldEvidence("likelyEnvKeys", route.likelyEnvKeys.join(", "))]
67
+ : []),
68
+ ...(root.message ? [fieldEvidence("rootMessage", root.message)] : []),
69
+ ...(root.code ? [fieldEvidence("rootCode", root.code)] : []),
70
+ ...(root.name ? [fieldEvidence("rootErrorName", root.name)] : []),
71
+ ...(args.durationMs != null ? [fieldEvidence("durationMs", args.durationMs)] : []),
72
+ ];
73
+ const summary = isRunTaskExecutionError(enriched)
74
+ ? enriched.message
75
+ : `${root.message} ${formatFailureClassificationHint(failureClassification)}`.trim();
76
+ getAiTasksLogxer().errorCode(AI_TASKS_DIAGNOSTIC_CODES.RUN_TASK_EXECUTION_FAILED, {
77
+ source: "@exellix/ai-tasks",
78
+ debugKind: DebugLogAbstract.TRACE,
79
+ diagnostics: { summary },
80
+ evidence,
81
+ });
82
+ if (isSmartInputValidationError(enriched) || isTaskConfigurationCompileError(enriched)) {
83
+ return enriched;
84
+ }
85
+ return enriched;
86
+ }
87
+ //# sourceMappingURL=logRunTaskFailure.js.map