@exellix/ai-tasks 9.0.6 → 9.1.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/CHANGELOG.md +22 -4
- package/README.md +5 -5
- package/RUNTASK_REQUEST.md +17 -15
- package/dist/compile/compileTaskConfiguration.d.ts.map +1 -1
- package/dist/compile/compileTaskConfiguration.js +3 -0
- package/dist/compile/compileTaskConfiguration.js.map +1 -1
- package/dist/core/task-sdk.d.ts.map +1 -1
- package/dist/core/task-sdk.js +112 -166
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/invocation/types.d.ts +1 -1
- package/dist/narrix/narrixUnitExecution.js +2 -2
- package/dist/narrix/narrixUnitExecution.js.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.d.ts +4 -0
- package/dist/node-execution/buildRequestFromNodePlan.d.ts.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.js +4 -13
- package/dist/node-execution/buildRequestFromNodePlan.js.map +1 -1
- package/dist/node-execution/compileProfessionalAnswerRequest.d.ts +2 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.d.ts.map +1 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.js +4 -0
- package/dist/node-execution/compileProfessionalAnswerRequest.js.map +1 -0
- package/dist/node-execution/rejectForbiddenWireFields.d.ts +2 -0
- package/dist/node-execution/rejectForbiddenWireFields.d.ts.map +1 -1
- package/dist/node-execution/rejectForbiddenWireFields.js +42 -7
- package/dist/node-execution/rejectForbiddenWireFields.js.map +1 -1
- package/dist/node-execution/resolveUnitModelSelection.d.ts.map +1 -1
- package/dist/node-execution/resolveUnitModelSelection.js +10 -1
- package/dist/node-execution/resolveUnitModelSelection.js.map +1 -1
- package/dist/observability/graphExecutionRunLogContract.d.ts +1 -1
- package/dist/observability/graphExecutionRunLogContract.js +1 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts +19 -3
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts.map +1 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js +7 -1
- package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js.map +1 -1
- package/dist/post-steps/audit/loadAuditTemplates.d.ts +2 -55
- package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -1
- package/dist/post-steps/audit/loadAuditTemplates.js +3 -38
- package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -1
- package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts +8 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts.map +1 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.js +62 -0
- package/dist/post-steps/audit/parseAuditFuncxOutput.js.map +1 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts +2 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -1
- package/dist/post-steps/audit/parseAuditOutput.js +56 -0
- package/dist/post-steps/audit/parseAuditOutput.js.map +1 -1
- package/dist/post-steps/audit/runAudit.d.ts.map +1 -1
- package/dist/post-steps/audit/runAudit.js +53 -113
- package/dist/post-steps/audit/runAudit.js.map +1 -1
- package/dist/post-steps/audit/runAuditFuncxCall.d.ts +18 -0
- package/dist/post-steps/audit/runAuditFuncxCall.d.ts.map +1 -0
- package/dist/post-steps/audit/runAuditFuncxCall.js +59 -0
- package/dist/post-steps/audit/runAuditFuncxCall.js.map +1 -0
- package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -1
- package/dist/synthesis/resolveSourceMaterial.js +14 -0
- package/dist/synthesis/resolveSourceMaterial.js.map +1 -1
- package/dist/types/task-types.d.ts +4 -3
- package/dist/types/task-types.d.ts.map +1 -1
- package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -1
- package/dist/utils/bridgeRunSkillGatewayMemory.js +1 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -1
- package/dist/utils/executionMemoryInputRecord.d.ts +12 -0
- package/dist/utils/executionMemoryInputRecord.d.ts.map +1 -0
- package/dist/utils/executionMemoryInputRecord.js +28 -0
- package/dist/utils/executionMemoryInputRecord.js.map +1 -0
- package/dist/utils/resolveAiProfileModel.d.ts +1 -1
- package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
- package/dist/utils/skillTemplateVariables.d.ts +3 -2
- package/dist/utils/skillTemplateVariables.d.ts.map +1 -1
- package/dist/utils/skillTemplateVariables.js +3 -2
- package/dist/utils/skillTemplateVariables.js.map +1 -1
- package/dist/validation/validateProfessionalAnswerContract.d.ts +8 -0
- package/dist/validation/validateProfessionalAnswerContract.d.ts.map +1 -0
- package/dist/validation/validateProfessionalAnswerContract.js +45 -0
- package/dist/validation/validateProfessionalAnswerContract.js.map +1 -0
- package/dist/validation/validateRunTaskConfig.d.ts.map +1 -1
- package/dist/validation/validateRunTaskConfig.js +2 -0
- package/dist/validation/validateRunTaskConfig.js.map +1 -1
- package/documenations/record-and-template-variables.md +21 -13
- package/documenations/run-task-execution-flow.md +1 -1
- package/documenations/schemas/v1/run-task-request.json +1 -1
- package/documenations/upstream-feature-requests/README.md +9 -5
- package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +1 -1
- package/documenations/upstream-feature-requests/funcx-4.9.13-open-items.md +62 -0
- package/documenations/upstream-feature-requests/funcx-gap-analysis-cr-fr.md +401 -0
- package/documenations/upstream-feature-requests/funcx-pre-post-sidekick-actions.md +1 -0
- package/documenations/upstream-feature-requests/graph-engine-runtask-contract-alignment-investigation.md +370 -0
- package/documenations/upstream-feature-requests/xynthesis-ai-profiles-2.1-import-break.md +2 -2
- package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md +1 -1
- package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +1 -1
- package/package.json +14 -17
- package/.docs/DOWNSTREAM_ENV.md +0 -42
- package/.docs/FEEDBACK_TO_CLIENT_DOWNSTREAM_FIXES.md +0 -64
- package/.docs/INTERMEDIATE_STEPS.md +0 -82
- package/.docs/activity-structure.md +0 -31
- package/.docs/ai-task-ai-scoping-spec.md +0 -338
- package/.docs/ai-tasks-model-profile-aliases-7x.md +0 -96
- package/.docs/blockers-and-issues.md +0 -346
- package/.docs/building-runTask-sdk.md +0 -659
- package/.docs/building-skill-execution-orchestrator.md +0 -968
- package/.docs/code-used-before/run-task.txt +0 -39
- package/.docs/code-used-before/task-executor.ts.old +0 -57
- package/.docs/code-used-before/test-run-task.ts.old +0 -42
- package/.docs/code-used-before/types.txt +0 -23
- package/.docs/env-ready-policy.md +0 -40
- package/.docs/flow-io/flow-README.md +0 -76
- package/.docs/flow-io/narrix.md +0 -124
- package/.docs/flow-io/web-scoping.md +0 -135
- package/.docs/flow-io/xynthesis-post.md +0 -154
- package/.docs/flow-io/xynthesis-pre.md +0 -181
- package/.docs/gap-analysis.md +0 -201
- package/.docs/integration-facts-ai-tasks.md +0 -109
- package/.docs/investigation/ai-skills.md +0 -170
- package/.docs/investigation/external-packages-assignments.md +0 -66
- package/.docs/investigation/integration-summary.md +0 -20
- package/.docs/investigation/narrix-catalox.md +0 -29
- package/.docs/investigation/workplan-close-graph-engine-gaps.md +0 -101
- package/.docs/logging-stack.md +0 -30
- package/.docs/memory-narrix-adapter-developer-guide.md +0 -402
- package/.docs/memory-narrix-adapter-requirements.md +0 -112
- package/.docs/narrix-context-consumption-gap.md +0 -184
- package/.docs/narrix-context-downstream-report.md +0 -30
- package/.docs/narrix-ingest-and-packs-library-spec.md +0 -240
- package/.docs/narrix-record-input-current-design.md +0 -48
- package/.docs/pacakge.md +0 -48
- package/.docs/possible-components/README.md +0 -11
- package/.docs/possible-components/integration/README.md +0 -10
- package/.docs/possible-components/integration/gaps-when-merging.md +0 -16
- package/.docs/possible-components/integration/platform.md +0 -54
- package/.docs/possible-components/integration/reintegrate-into-ai-tasks.md +0 -26
- package/.docs/possible-components/integration/roadmap-and-checklists.md +0 -54
- package/.docs/possible-components/post-component/README.md +0 -18
- package/.docs/possible-components/post-component/builder-guide.md +0 -175
- package/.docs/possible-components/post-component/gaps-and-artifacts.md +0 -52
- package/.docs/possible-components/post-component/handler-audit.md +0 -47
- package/.docs/possible-components/post-component/handler-polish.md +0 -41
- package/.docs/possible-components/post-component/unified-protocol.md +0 -59
- package/.docs/possible-components/pre-component/README.md +0 -22
- package/.docs/possible-components/pre-component/builder-guide.md +0 -127
- package/.docs/possible-components/pre-component/gaps-and-artifacts.md +0 -35
- package/.docs/possible-components/pre-component/handler-ai-scoping.md +0 -45
- package/.docs/possible-components/pre-component/handler-narrix-preprocessor.md +0 -49
- package/.docs/possible-components/pre-component/handler-narrix-system2.md +0 -35
- package/.docs/possible-components/pre-component/handler-synthesized-context.md +0 -65
- package/.docs/possible-components/pre-component/handler-web-scope.md +0 -29
- package/.docs/possible-components/pre-component/unified-protocol.md +0 -89
- package/.docs/prefer-openrouter-routing-policy.md +0 -114
- package/.docs/questions-for-ai-skills.md +0 -123
- package/.docs/realtime-narrixing-gap-analysis.md +0 -40
- package/.docs/realtime-narrixing.md +0 -433
- package/.docs/run-context-object.md +0 -32
- package/.docs/session-id-usage.md +0 -26
- package/.docs/skill-library-spec.md +0 -249
- package/.docs/synthesized-context-strategy-spec.md +0 -906
- package/.docs/upstream-issue/2026-03-21_woroces-ai-tasks_ISSUE-006_web-scope-question-from-cni-entity.md +0 -46
- package/.docs/web-scopper-embed.md +0 -93
- package/.docs/xynthesis-wiring-and-io.md +0 -12
- package/documenations/activix-feature-request-identity.md +0 -123
- package/documenations/bug-report-xynthesis-and-synthesis-call.md +0 -217
- package/documenations/feature-request-ai-skills-raw-template-access.md +0 -82
- package/documenations/feature-request-athenix-core-directive.md +0 -145
- package/documenations/feature-request-athenix-token-extraction.md +0 -124
- package/documenations/funcx-upstream-github-issues-draft.md +0 -153
- package/documenations/identity-metadata-contract.md +0 -165
- package/documenations/run-task-single-run-checklist.md +0 -109
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-1-no-concrete-wire-in-graph-plans.md +0 -93
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-2-skillModel-profile-only-at-storage.md +0 -88
- package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-3-reject-concrete-models-in-catalog-rows.md +0 -76
- package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-1-suggested-profile-in-catalogs.md +0 -96
- package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-2-graph-engine-failure-phase-attribution.md +0 -92
- package/documenations/sessions/2026-06-08-subnets-model-resolution/INVESTIGATION-original-bug.md +0 -182
- package/documenations/sessions/2026-06-08-subnets-model-resolution/PROBLEM.md +0 -236
- package/documenations/sessions/2026-06-08-subnets-model-resolution/README.md +0 -11
- package/documenations/sessions/2026-06-08-subnets-model-resolution/funcx-test-resolveModel.cheapDefaultWireSlug.test.ts +0 -117
- package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +0 -129
- package/documenations/upstream-feedback-request-shape-clarification.md +0 -101
- package/documenations/web-context-precedence.md +0 -33
- package/documenations/xynthesis-activix-telemetry.md +0 -28
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Feature Request: Athenix `core:` Directive Tokens
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
Add first-class support in `@x12i/rendrix` for semantic directive tokens:
|
|
6
|
-
|
|
7
|
-
- `{{core:analysis}}`
|
|
8
|
-
- `{{core:decision}}`
|
|
9
|
-
- `{{core:question}}`
|
|
10
|
-
|
|
11
|
-
These are **not** memory paths and must not be resolved via normal object lookup.
|
|
12
|
-
|
|
13
|
-
## Why
|
|
14
|
-
|
|
15
|
-
`@exellix/ai-tasks` uses template-declared task semantics to drive structured synthesis.
|
|
16
|
-
|
|
17
|
-
Using path-like syntax such as `{{core.analysis}}` is incorrect because parser/runtime treats it as:
|
|
18
|
-
|
|
19
|
-
- lookup object `core`
|
|
20
|
-
- then property `analysis`
|
|
21
|
-
|
|
22
|
-
That conflates semantic declaration with data lookup and causes false missing-token errors.
|
|
23
|
-
|
|
24
|
-
We need directive syntax where `core:` is a command namespace, not path traversal.
|
|
25
|
-
|
|
26
|
-
## Requested Behavior
|
|
27
|
-
|
|
28
|
-
### 1) Parse `core:` as directive token (not path token)
|
|
29
|
-
|
|
30
|
-
When parser sees:
|
|
31
|
-
|
|
32
|
-
- `{{core:analysis}}`
|
|
33
|
-
|
|
34
|
-
it should emit a dedicated token type (example `kind: "core"` or `kind: "directive"` with `directive: "core"`).
|
|
35
|
-
|
|
36
|
-
It must **not** classify this as path/helper token.
|
|
37
|
-
|
|
38
|
-
### 2) Do not perform memory-path resolution for `core:` tokens
|
|
39
|
-
|
|
40
|
-
Renderer should not try to read:
|
|
41
|
-
|
|
42
|
-
- `workingMemory.core.analysis`
|
|
43
|
-
|
|
44
|
-
for `{{core:analysis}}`.
|
|
45
|
-
|
|
46
|
-
No missing-path error should be thrown due to absent `core` object.
|
|
47
|
-
|
|
48
|
-
### 3) Introspection output must expose directive value
|
|
49
|
-
|
|
50
|
-
`listTokens()` (or equivalent) should include structured fields, e.g.:
|
|
51
|
-
|
|
52
|
-
```ts
|
|
53
|
-
{
|
|
54
|
-
kind: "core",
|
|
55
|
-
raw: "core:analysis",
|
|
56
|
-
directive: "core",
|
|
57
|
-
value: "analysis",
|
|
58
|
-
start: 123,
|
|
59
|
-
end: 141
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## API / Type Additions (Conceptual)
|
|
64
|
-
|
|
65
|
-
```ts
|
|
66
|
-
export type TemplateTokenKind =
|
|
67
|
-
| "path"
|
|
68
|
-
| "helper"
|
|
69
|
-
| "block"
|
|
70
|
-
| "core"
|
|
71
|
-
| "unknown";
|
|
72
|
-
|
|
73
|
-
export interface TemplateTokenRef {
|
|
74
|
-
raw: string;
|
|
75
|
-
kind: TemplateTokenKind;
|
|
76
|
-
path?: string; // only for path-kind
|
|
77
|
-
directive?: string; // "core" for core-kind
|
|
78
|
-
value?: string; // "analysis" for core-kind
|
|
79
|
-
start: number;
|
|
80
|
-
end: number;
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Optional utility:
|
|
85
|
-
|
|
86
|
-
```ts
|
|
87
|
-
export function listDirectiveValues(
|
|
88
|
-
template: string,
|
|
89
|
-
directive: string
|
|
90
|
-
): string[];
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Rendering Semantics
|
|
94
|
-
|
|
95
|
-
For `core:` tokens:
|
|
96
|
-
|
|
97
|
-
- default render output can be empty string (`""`) unless overridden,
|
|
98
|
-
- or configurable render policy (e.g. keep literal / empty / custom formatter),
|
|
99
|
-
- but never path lookup failure.
|
|
100
|
-
|
|
101
|
-
For all other required tokens:
|
|
102
|
-
|
|
103
|
-
- existing strict behavior remains unchanged.
|
|
104
|
-
|
|
105
|
-
## Validation Rules
|
|
106
|
-
|
|
107
|
-
Parser-level validation should enforce:
|
|
108
|
-
|
|
109
|
-
- `{{core:...}}` must include non-empty value segment
|
|
110
|
-
- whitespace-trimmed value allowed (`{{core: analysis}}` -> `analysis`)
|
|
111
|
-
|
|
112
|
-
Optional strict mode (consumer-level) can validate value against allowed set.
|
|
113
|
-
|
|
114
|
-
## Backward Compatibility
|
|
115
|
-
|
|
116
|
-
- Additive change.
|
|
117
|
-
- Existing path tokens keep current behavior.
|
|
118
|
-
- No change required for templates not using `core:`.
|
|
119
|
-
|
|
120
|
-
## Acceptance Criteria
|
|
121
|
-
|
|
122
|
-
1. `listTokens("...{{core:analysis}}...")` returns token with `kind: "core"` and `value: "analysis"`.
|
|
123
|
-
2. Rendering template containing `{{core:analysis}}` does not throw missing-path errors when no `core` object exists.
|
|
124
|
-
3. Existing strict missing-token behavior for non-core path tokens is unchanged.
|
|
125
|
-
4. Unit tests added for:
|
|
126
|
-
- single and multiple core directives
|
|
127
|
-
- whitespace around colon/value
|
|
128
|
-
- invalid `{{core:}}`
|
|
129
|
-
- coexistence with normal path/helper tokens
|
|
130
|
-
|
|
131
|
-
## Example
|
|
132
|
-
|
|
133
|
-
Template:
|
|
134
|
-
|
|
135
|
-
```md
|
|
136
|
-
System contract:
|
|
137
|
-
- {{core:analysis}}
|
|
138
|
-
- {{core:decision}}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Expected:
|
|
142
|
-
|
|
143
|
-
- introspection detects two core directives: `analysis`, `decision`
|
|
144
|
-
- rendering does not require `core.analysis` or `core.decision` in memory
|
|
145
|
-
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# Feature Request: Athenix Token Introspection and Selective Resolution
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
`@exellix/ai-tasks` needs first-class support in Athenix parser for:
|
|
6
|
-
|
|
7
|
-
1. Inspecting templates to discover tokens before rendering.
|
|
8
|
-
2. Resolving values for a selected token set from a runtime context, without fully rendering output.
|
|
9
|
-
|
|
10
|
-
This is required to implement template-contract-driven semantics (for example task core tokens) in a deterministic, pre-render-safe way.
|
|
11
|
-
|
|
12
|
-
## Problem
|
|
13
|
-
|
|
14
|
-
Current behavior in downstream runtime integrations can make full-template rendering unsuitable as a source of truth for semantic discovery:
|
|
15
|
-
|
|
16
|
-
- Semantic tokens may be transformed/removed by template rendering pipelines.
|
|
17
|
-
- Some integrations lazily initialize content resolvers.
|
|
18
|
-
- Full rendered text is a poor boundary for extracting contract-level meaning.
|
|
19
|
-
|
|
20
|
-
For `ai-tasks`, we must:
|
|
21
|
-
|
|
22
|
-
- discover semantic tokens from template contract (`{{...}}`) pre-render,
|
|
23
|
-
- then resolve token values against runtime memory/context,
|
|
24
|
-
- then drive synthesis and execution from those resolved semantics.
|
|
25
|
-
|
|
26
|
-
Without parser-native support, we are forced into brittle string probing.
|
|
27
|
-
|
|
28
|
-
## Requested Capability
|
|
29
|
-
|
|
30
|
-
### 1) Token Introspection API
|
|
31
|
-
|
|
32
|
-
Return token metadata from a template without rendering.
|
|
33
|
-
|
|
34
|
-
Conceptual API:
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
|
-
export interface TemplateTokenRef {
|
|
38
|
-
raw: string; // original token expression
|
|
39
|
-
path?: string; // normalized dot-path if applicable
|
|
40
|
-
kind: "path" | "helper" | "block" | "unknown";
|
|
41
|
-
start: number; // source offset
|
|
42
|
-
end: number; // source offset
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function listTokens(template: string, options?: {
|
|
46
|
-
includeDuplicates?: boolean; // default false
|
|
47
|
-
}): TemplateTokenRef[];
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 2) Selective Token Resolution API
|
|
51
|
-
|
|
52
|
-
Resolve only requested tokens from context, without full template rendering.
|
|
53
|
-
|
|
54
|
-
Conceptual API:
|
|
55
|
-
|
|
56
|
-
```ts
|
|
57
|
-
export interface ResolveTokenValuesInput {
|
|
58
|
-
template: string;
|
|
59
|
-
context: Record<string, unknown>;
|
|
60
|
-
selectors: string[]; // e.g. ["core.*", "question", "metadata.intent"]
|
|
61
|
-
options?: {
|
|
62
|
-
strict?: boolean; // throw if selected token missing/invalid
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface ResolvedTokenValue {
|
|
67
|
-
token: string; // matched token expression
|
|
68
|
-
selector: string; // selector that matched
|
|
69
|
-
value: unknown; // resolved value
|
|
70
|
-
found: boolean;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function resolveTokenValues(
|
|
74
|
-
input: ResolveTokenValuesInput
|
|
75
|
-
): ResolvedTokenValue[];
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Behavioral Requirements
|
|
79
|
-
|
|
80
|
-
1. **Pre-render safe**: no dependency on rendered final text.
|
|
81
|
-
2. **Deterministic**: same template+context => same result.
|
|
82
|
-
3. **Selector support**: dot-path and wildcard matching (`core.*`).
|
|
83
|
-
4. **No implicit coercion surprises**: raw `unknown` values should be returned.
|
|
84
|
-
5. **Stable with missing values**: explicit `found: false` (or strict throw).
|
|
85
|
-
6. **Works with current Athenix token syntax** used across Woroces stack.
|
|
86
|
-
|
|
87
|
-
## Why This Matters
|
|
88
|
-
|
|
89
|
-
For template-driven orchestration, semantics belong to the template contract.
|
|
90
|
-
The runtime should not infer semantics from caller hints or post-render text.
|
|
91
|
-
|
|
92
|
-
Parser-native token introspection + selective resolution enables:
|
|
93
|
-
|
|
94
|
-
- reliable template core discovery,
|
|
95
|
-
- robust runtime validation,
|
|
96
|
-
- traceable synthesis inputs,
|
|
97
|
-
- less integration-specific glue logic.
|
|
98
|
-
|
|
99
|
-
## Real Integration Use Case (`@exellix/ai-tasks`)
|
|
100
|
-
|
|
101
|
-
Structured synthesis requires:
|
|
102
|
-
|
|
103
|
-
- detect template core tokens (for example `core.analysis`, `core.decision`),
|
|
104
|
-
- resolve relevant values from memory/context,
|
|
105
|
-
- block execution when required semantic tokens are absent.
|
|
106
|
-
|
|
107
|
-
This must happen before synthesis prompt rendering and must not rely on rendered output text.
|
|
108
|
-
|
|
109
|
-
## Acceptance Criteria
|
|
110
|
-
|
|
111
|
-
1. Add parser APIs (or equivalent methods) for token listing and selective token value resolution.
|
|
112
|
-
2. Include docs with examples for token selectors and missing-token handling.
|
|
113
|
-
3. Add tests for:
|
|
114
|
-
- nested paths,
|
|
115
|
-
- wildcard selectors,
|
|
116
|
-
- missing tokens in strict/non-strict mode,
|
|
117
|
-
- duplicate token references,
|
|
118
|
-
- mixed token kinds.
|
|
119
|
-
4. Confirm compatibility with existing template render pipeline.
|
|
120
|
-
|
|
121
|
-
## Notes
|
|
122
|
-
|
|
123
|
-
- This request is additive; it should not break existing `render()` usage.
|
|
124
|
-
- If preferred, these capabilities can be exposed under a utility namespace instead of top-level exports.
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# FuncX upstream — draft GitHub issues
|
|
2
|
-
|
|
3
|
-
Use these as copy-paste bodies when filing against **`https://github.com/x12i/funcx`** (adjust labels: `bug`, `documentation`, `enhancement` as appropriate).
|
|
4
|
-
|
|
5
|
-
**Update (@x12i/funcx ≥ 3.8.2):** Issue **#1** is largely addressed in-package via **`getRunJsonResult`**, **`isHttpRunSuccessBody`**, **`GenericExecutionEnvelope`**, **`genericExecutionEnvelopeJsonSchema`**, and **`buildAskAttribution`** exported from `@x12i/funcx/functions`. **`@exellix/ai-tasks`** depends on **`^3.8.2`** and delegates **`unwrapFuncxRunValue`** to **`getRunJsonResult`** (normalization fixes: **3.8.2**).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Issue 1 — `run()` success value shape is not formally specified or normalized (Bug / API contract)
|
|
10
|
-
|
|
11
|
-
**Status:** Superseded for normalization — use **`getRunJsonResult`** (**≥3.8.2** recommended). Remaining gap: ensure **README / migration** links every consumer to this API (Issue #5 overlap).
|
|
12
|
-
|
|
13
|
-
**Title:** `run()`: document and export stable JSON extraction for function results
|
|
14
|
-
|
|
15
|
-
**Type:** Bug (integration hazard) + Documentation
|
|
16
|
-
|
|
17
|
-
### Summary
|
|
18
|
-
|
|
19
|
-
Downstream packages (e.g. `@exellix/ai-tasks`) call `run(functionId, payload, { client })` from `@x12i/funcx/functions` and must pass the **parsed function JSON** into app-specific adapters. The **success return shape** of `run()` is not clearly guaranteed in public TypeScript types or docs: hosts may wrap the model/object as `output`, `data`, `result`, or return the object root directly.
|
|
20
|
-
|
|
21
|
-
### Current behavior
|
|
22
|
-
|
|
23
|
-
Integrators defensively unwrap multiple keys or treat the whole value as JSON, which is fragile and can silently feed adapters the wrong object.
|
|
24
|
-
|
|
25
|
-
### Expected behavior
|
|
26
|
-
|
|
27
|
-
1. **Document** the canonical success shape of `run()` for JSON-returning functions (one paragraph + example in package README or `run` JSDoc).
|
|
28
|
-
2. **Export** a small helper, e.g. `getRunJsonResult(runResult: unknown): unknown` (name TBD), that implements the **supported** unwrapping rules so consumers do not duplicate heuristics.
|
|
29
|
-
3. **Type** the resolved JSON result where possible (generic parameter or discriminated union), even if implementation stays dynamic internally.
|
|
30
|
-
|
|
31
|
-
### Acceptance criteria
|
|
32
|
-
|
|
33
|
-
- [ ] Public API + docs agree on one normalization path.
|
|
34
|
-
- [ ] At least one unit test in `@x12i/funcx` locks the behavior for JSON-mode functions.
|
|
35
|
-
- [ ] Changelog calls out any tightening if older hosts relied on ambiguous shapes.
|
|
36
|
-
|
|
37
|
-
### References
|
|
38
|
-
|
|
39
|
-
- Consumer workaround today: local `unwrapFuncxRunValue` heuristics in `@exellix/ai-tasks` (`genericExecutionFuncxEnvelope.ts`).
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Issue 2 — No published TypeScript / JSON Schema for generic execution envelope (Feature)
|
|
44
|
-
|
|
45
|
-
**Title:** Publish shared types (and optional JSON Schema) for generic `goal` / `input` / `context` / `result` / `args` / `attribution` contracts
|
|
46
|
-
|
|
47
|
-
**Type:** Feature request
|
|
48
|
-
|
|
49
|
-
### Summary
|
|
50
|
-
|
|
51
|
-
Multiple products want the same **generic FuncX envelope** for capabilities such as `execution/plan`, `execution/evaluate-result`, and `research/plan-questions`. Today each consumer re-declares structural types, which risks drift from FuncX’s actual validation and from other clients.
|
|
52
|
-
|
|
53
|
-
### Request
|
|
54
|
-
|
|
55
|
-
1. Export TypeScript types from `@x12i/funcx` (or a sibling package) for:
|
|
56
|
-
- Generic request envelope (`goal`, `input?`, `context?`, `result?`, `args?`, `attribution?`).
|
|
57
|
-
- Optional: per-function **response** types or Zod schemas where FuncX validates outputs.
|
|
58
|
-
2. Optionally publish **JSON Schema** artifacts for the same contracts (for non-TS hosts and catalog tooling).
|
|
59
|
-
|
|
60
|
-
### Acceptance criteria
|
|
61
|
-
|
|
62
|
-
- [ ] Types are importable from a documented entrypoint (e.g. `@x12i/funcx` or `@x12i/funcx/contracts`).
|
|
63
|
-
- [ ] Version SemVer policy documented (breaking changes to envelope bump major or explicit migration note).
|
|
64
|
-
|
|
65
|
-
### References
|
|
66
|
-
|
|
67
|
-
- Draft consumer types: `@exellix/ai-tasks` `genericExecutionFuncxEnvelope.ts`.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Issue 3 — Canonical catalog functions for generic execution / research planning (Feature)
|
|
72
|
-
|
|
73
|
-
**Title:** Ship and register `execution/plan`, `execution/evaluate-result`, `research/plan-questions` as first-class FuncX functions
|
|
74
|
-
|
|
75
|
-
**Type:** Feature request (blocking for generic orchestration clients)
|
|
76
|
-
|
|
77
|
-
### Summary
|
|
78
|
-
|
|
79
|
-
Orchestrators are standardizing on **capability-based** ids (`execution/plan`, etc.) with a **single generic envelope**. Consumers call `run()` with that payload. Today, npm still emphasizes legacy **`aiTasksPlanTask` / `aiTasksOptimizerEvaluate`**-style entrypoints while the ecosystem moves away from product-prefixed ids and bespoke envelopes.
|
|
80
|
-
|
|
81
|
-
### Request
|
|
82
|
-
|
|
83
|
-
1. Implement the three functions with behavior matching the published generic contract (prompting, JSON mode, validation, retries as appropriate).
|
|
84
|
-
2. Register them in the **content/catalog path** used by `run()` for typical deployments (document exact ids: slash + hyphen router forms).
|
|
85
|
-
3. Forward **`attribution`** from the inbound envelope into **every** nested `client.ask()` / `askJson` call inside those functions (for billing/trace parity).
|
|
86
|
-
4. Document migration for hosts that still register **`ai-tasks/plan-task`** (if aliases are supported, document explicitly; if not, document cutover).
|
|
87
|
-
|
|
88
|
-
### Acceptance criteria
|
|
89
|
-
|
|
90
|
-
- [ ] `run("execution/plan", payload, { client })` (and hyphen alias if applicable) returns validated JSON per spec.
|
|
91
|
-
- [ ] Same for `execution/evaluate-result` and `research/plan-questions`.
|
|
92
|
-
- [ ] Live or CI-backed test that attribution tags survive to provider-facing calls where OpenRouter/Activix expect them.
|
|
93
|
-
|
|
94
|
-
### References
|
|
95
|
-
|
|
96
|
-
- Consumer defaults: `@exellix/ai-tasks` `constants.ts` (`FUNCX_EXECUTION_*`, `FUNCX_RESEARCH_PLAN_QUESTIONS_FUNCTION_ID`).
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Issue 4 — Document attribution forwarding contract for custom FuncX functions (Documentation)
|
|
101
|
-
|
|
102
|
-
**Title:** Document: function implementations MUST propagate `payload.attribution` (or equivalent) to nested LLM calls
|
|
103
|
-
|
|
104
|
-
**Type:** Documentation (severity: high for observability)
|
|
105
|
-
|
|
106
|
-
### Summary
|
|
107
|
-
|
|
108
|
-
Generic envelopes include **`attribution`** (`runId`, `subjectId`, `actorId`, `tags`, etc.). If implementers only log the outer HTTP boundary but omit attribution on internal `ask()` calls, **usage, cost, and trace correlation** break for nested completions.
|
|
109
|
-
|
|
110
|
-
### Request
|
|
111
|
-
|
|
112
|
-
1. Add a **short “FuncX function author checklist”** section: read `attribution` from input → merge with `functionId` / `traceId` as needed → pass on `AskOptions.attribution` for every LLM call.
|
|
113
|
-
2. Reference existing helpers (`formatOpenRouterUserField`, `execAttribution`, etc.) if those are the supported path.
|
|
114
|
-
3. Optionally add a **lint or runtime warning** in dev mode when `ask()` is invoked without attribution inside functions that received a populated envelope (stretch goal).
|
|
115
|
-
|
|
116
|
-
### Acceptance criteria
|
|
117
|
-
|
|
118
|
-
- [ ] Public docs linked from `run()` / “authoring functions” guide.
|
|
119
|
-
- [ ] Example function in repo demonstrates nested attribution.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Issue 5 — Clarify relationship between direct TS exports (`aiTasksPlanTask`) and `run()` generic functions (Documentation / Deprecation)
|
|
124
|
-
|
|
125
|
-
**Title:** Migration guide: `aiTasksPlanTask` / `aiTasksOptimizerEvaluate` vs `run("execution/plan", …)` generic envelope
|
|
126
|
-
|
|
127
|
-
**Type:** Documentation + Deprecation policy (could start as docs-only)
|
|
128
|
-
|
|
129
|
-
### Summary
|
|
130
|
-
|
|
131
|
-
`@x12i/funcx/functions` still exports **direct** helpers for legacy ai-tasks-shaped payloads while new integrators use **`run()`** + generic envelope + new ids. Without an explicit migration table, teams duplicate behavior or pick the wrong integration path.
|
|
132
|
-
|
|
133
|
-
### Request
|
|
134
|
-
|
|
135
|
-
1. Document **one recommended path** for new code (generic ids + `run()` + shared types).
|
|
136
|
-
2. State whether **`aiTasksPlanTask`** / **`aiTasksOptimizerEvaluate`** are **deprecated**, **supported aliases**, or **frozen** — with semver expectations.
|
|
137
|
-
3. If generic functions supersede them, provide a **payload mapping table** (old `kind` + `request` → new `goal` + `input` + `context` + `attribution`).
|
|
138
|
-
|
|
139
|
-
### Acceptance criteria
|
|
140
|
-
|
|
141
|
-
- [ ] README or `docs/migration-generic-execution.md` committed and linked from changelog when generic functions ship.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
### Filing checklist
|
|
146
|
-
|
|
147
|
-
| Draft # | Suggested GitHub label | Blocking `@exellix/ai-tasks`? |
|
|
148
|
-
|---------|-------------------------------|-----------------------------------|
|
|
149
|
-
| 1 | `bug`, `documentation`, `api` | Yes (correctness of parsing) |
|
|
150
|
-
| 2 | `enhancement` | No (quality / drift reduction) |
|
|
151
|
-
| 3 | `enhancement` | Yes (runtime unless content-only) |
|
|
152
|
-
| 4 | `documentation` | Yes (observability parity) |
|
|
153
|
-
| 5 | `documentation` | No (clarity / migration) |
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
# Feature request: `identity` propagation + Activix identity
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
|
|
5
|
-
Add a generic, end-to-end **identity envelope** to each task run so that:
|
|
6
|
-
|
|
7
|
-
- Upstream callers can describe *what this task instance is* (domain identity, purpose, correlation).
|
|
8
|
-
- Runtime can add a **unique per-run `taskId`** and the **`skillId` used**.
|
|
9
|
-
- Downstream components that support Activix receive this identity as a **first-class Activix field**: `identity`.
|
|
10
|
-
|
|
11
|
-
This is a contract-level feature request for **`ai-gateway`** and **`ai-skills`** integrations, expressed generically so it applies to any task/skill combination.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Terminology
|
|
16
|
-
|
|
17
|
-
- **Upstream**: The caller that initiates a `runTask` request (product/app/service).
|
|
18
|
-
- **Gateway**: The LLM gateway layer (`ai-gateway`) used for model/tool calls.
|
|
19
|
-
- **Skills**: Skill resolver/executor layer (`ai-skills`) used by task execution.
|
|
20
|
-
- **Downstream**: Any component invoked during execution (LLM calls, tools, connectors). This doc focuses on **Activix-capable** downstreams.
|
|
21
|
-
- **Activix-capable**: A downstream path that records execution via Activix and can attach first-class `identity`.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## API shape (high-level)
|
|
26
|
-
|
|
27
|
-
### Upstream request addition
|
|
28
|
-
|
|
29
|
-
Task-run requests should allow an optional field:
|
|
30
|
-
|
|
31
|
-
- `identity?: object`
|
|
32
|
-
|
|
33
|
-
Constraints:
|
|
34
|
-
|
|
35
|
-
- Treat as an **opaque JSON object** (no strict schema required at first).
|
|
36
|
-
- Must be safe for logging/tracing (no secrets). If secrets are possible, either upstream must redact or the runtime must enforce redaction policy before emitting observability.
|
|
37
|
-
|
|
38
|
-
### Runtime enrichment (per execution instance)
|
|
39
|
-
|
|
40
|
-
For every execution instance, runtime must produce an **effective identity**:
|
|
41
|
-
|
|
42
|
-
- `effectiveIdentity = identity (from upstream, if present) + { taskId, skillId }`
|
|
43
|
-
|
|
44
|
-
Where:
|
|
45
|
-
|
|
46
|
-
- `taskId`: **required**, generated by runtime, unique per task-run instance.
|
|
47
|
-
- `skillId`: **required when a skill is selected/resolved**, set to the skill used for this run.
|
|
48
|
-
|
|
49
|
-
Notes:
|
|
50
|
-
|
|
51
|
-
- `identity` from upstream is **never dropped** when present.
|
|
52
|
-
- `taskId` and `skillId` **must not** be accepted from upstream as authoritative values if they are provided there; runtime-generated/selected values win.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Behavior contract
|
|
57
|
-
|
|
58
|
-
### 1) Preserve upstream identity
|
|
59
|
-
|
|
60
|
-
- If upstream sends `identity`, keep it attached to the run for the full lifecycle.
|
|
61
|
-
- If upstream does not send it, initialize identity as an empty object for the purpose of downstream propagation and enrichment.
|
|
62
|
-
|
|
63
|
-
### 2) Create a per-run `taskId`
|
|
64
|
-
|
|
65
|
-
- Create `taskId` once per `runTask` invocation.
|
|
66
|
-
- The ID must be stable across the entire run (pre/main/post steps, retries within the run, and all downstream calls spawned by this run).
|
|
67
|
-
- The ID must be unique across runs (collision-resistant).
|
|
68
|
-
|
|
69
|
-
### 3) Attach `skillId` when known
|
|
70
|
-
|
|
71
|
-
- When the runtime resolves the skill used for this run, attach `skillId` to the effective identity.
|
|
72
|
-
- If the run is “direct” (no skills), either:
|
|
73
|
-
- omit `skillId`, or
|
|
74
|
-
- set `skillId` to a documented sentinel (only if that’s already a platform convention).
|
|
75
|
-
|
|
76
|
-
### 4) Forward to all Activix-capable downstream calls
|
|
77
|
-
|
|
78
|
-
When creating Activix records, attach identity as a first-class field:
|
|
79
|
-
|
|
80
|
-
- `activixRecord.identity = effectiveIdentity`
|
|
81
|
-
|
|
82
|
-
This requires Activix to treat `identity` as a first-class, supported object field (preserved end-to-end on start/complete/fail and queryable in stored records). This is intentional: identity is part of the methodology/contract, not an ad-hoc blob nested under arbitrary meta.
|
|
83
|
-
|
|
84
|
-
This identity must be included for:
|
|
85
|
-
|
|
86
|
-
- MAIN execution calls
|
|
87
|
-
- PRE steps that call downstream (e.g., synthesis)
|
|
88
|
-
- POST steps that call downstream
|
|
89
|
-
|
|
90
|
-
If a downstream path is not Activix-capable, the runtime should still retain the identity in memory/metadata so it can be used when a later step *is* Activix-capable.
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Ownership and responsibilities
|
|
95
|
-
|
|
96
|
-
### Upstream (product/service calling `runTask`)
|
|
97
|
-
|
|
98
|
-
- Provide `identity` describing the task instance in domain terms.
|
|
99
|
-
- Do not include secrets.
|
|
100
|
-
- Do not attempt to control `taskId` generation; treat `taskId` as runtime-owned.
|
|
101
|
-
|
|
102
|
-
Examples of useful upstream fields (non-prescriptive):
|
|
103
|
-
|
|
104
|
-
- `source`: service/app identifier
|
|
105
|
-
- `purpose`: why the task was launched
|
|
106
|
-
- `correlationId`: upstream correlation ID (if already present)
|
|
107
|
-
- `user`: stable user/account identity (non-secret)
|
|
108
|
-
- `entity`: domain object reference (e.g., `{ type: "...", id: "..." }`)
|
|
109
|
-
|
|
110
|
-
### ai-skills (skill resolution/execution)
|
|
111
|
-
|
|
112
|
-
- Ensure `skillId` for the selected skill is available to the runtime and included in the effective identity.
|
|
113
|
-
- Ensure any skill-spawned downstream calls that record to Activix also receive the effective identity in Activix record `identity`.
|
|
114
|
-
|
|
115
|
-
### ai-gateway (gateway for LLM/tool calls)
|
|
116
|
-
|
|
117
|
-
- Accept and preserve an identity object on calls originating from task execution.
|
|
118
|
-
- When the gateway records to Activix, place the effective identity under top-level `identity` (do not rename/flatten fields).
|
|
119
|
-
- Do not mutate upstream identity fields except for the controlled addition/override of `taskId` and `skillId` as defined in this contract.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Activix mapping (required)
|
|
124
|
-
|
|
125
|
-
When an execution path uses Activix:
|
|
126
|
-
|
|
127
|
-
- **Input**: Upstream `identity` + runtime `{ taskId, skillId }`
|
|
128
|
-
- **Output**: `identity` equals the merged object
|
|
129
|
-
|
|
130
|
-
Merging rules:
|
|
131
|
-
|
|
132
|
-
- Start with upstream `identity` (or `{}` if missing)
|
|
133
|
-
- Add/overwrite:
|
|
134
|
-
- `taskId` (runtime generated)
|
|
135
|
-
- `skillId` (runtime resolved)
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Observability and debugging (recommended)
|
|
140
|
-
|
|
141
|
-
Expose minimal, non-sensitive observability so runs can be traced:
|
|
142
|
-
|
|
143
|
-
- `metadata.taskId` (top-level convenience mirror)
|
|
144
|
-
- `metadata.skillId` (top-level convenience mirror when present)
|
|
145
|
-
- `metadata.identityPresent: boolean`
|
|
146
|
-
|
|
147
|
-
If the full `identity` is logged, enforce redaction policy; otherwise log only safe subsets or presence flags.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Backward compatibility stance
|
|
152
|
-
|
|
153
|
-
- New field is additive: existing callers continue to work with `identity` absent.
|
|
154
|
-
- Downstream Activix paths should be tolerant to missing identity fields (but runtime should always generate `taskId` once this feature is implemented).
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## Acceptance criteria
|
|
159
|
-
|
|
160
|
-
- A `runTask` request may include `identity` and it is preserved for the full run.
|
|
161
|
-
- Each run results in a unique runtime-generated `taskId` that is stable across all downstream calls for that run.
|
|
162
|
-
- When a skill is used, the effective identity includes `skillId`.
|
|
163
|
-
- Any Activix record created by the system includes first-class `identity` populated with the effective identity.
|
|
164
|
-
- Minimal observability surfaces `taskId` (and `skillId` when applicable) so traces/logs can correlate all calls to a single run.
|
|
165
|
-
|