@exellix/ai-tasks 9.1.0 → 10.0.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.
- package/CHANGELOG.md +34 -4
- package/README.md +2 -2
- package/RUNTASK_REQUEST.md +32 -17
- package/dist/builders/task-request-builder.d.ts.map +1 -1
- package/dist/builders/task-request-builder.js +2 -1
- package/dist/builders/task-request-builder.js.map +1 -1
- 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 +148 -180
- package/dist/core/task-sdk.js.map +1 -1
- package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
- package/dist/errors/runTaskExecutionError.js +0 -2
- package/dist/errors/runTaskExecutionError.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/invocation/types.d.ts +1 -1
- package/dist/narrix/applyWebScopeToRequest.d.ts +9 -0
- package/dist/narrix/applyWebScopeToRequest.d.ts.map +1 -0
- package/dist/narrix/applyWebScopeToRequest.js +156 -0
- package/dist/narrix/applyWebScopeToRequest.js.map +1 -0
- package/dist/narrix/narrixUnitExecution.d.ts.map +1 -1
- package/dist/narrix/narrixUnitExecution.js +8 -3
- package/dist/narrix/narrixUnitExecution.js.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.d.ts +6 -0
- package/dist/node-execution/buildRequestFromNodePlan.d.ts.map +1 -1
- package/dist/node-execution/buildRequestFromNodePlan.js +4 -16
- 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/createNodeExecutionHost.d.ts.map +1 -1
- package/dist/node-execution/createNodeExecutionHost.js +97 -26
- package/dist/node-execution/createNodeExecutionHost.js.map +1 -1
- package/dist/node-execution/dispatchExecutionUnit.d.ts.map +1 -1
- package/dist/node-execution/dispatchExecutionUnit.js +4 -2
- package/dist/node-execution/dispatchExecutionUnit.js.map +1 -1
- package/dist/node-execution/orchestration/runPostOrchestration.d.ts +11 -0
- package/dist/node-execution/orchestration/runPostOrchestration.d.ts.map +1 -0
- package/dist/node-execution/orchestration/runPostOrchestration.js +123 -0
- package/dist/node-execution/orchestration/runPostOrchestration.js.map +1 -0
- package/dist/node-execution/orchestration/runPreOrchestration.d.ts +3 -0
- package/dist/node-execution/orchestration/runPreOrchestration.d.ts.map +1 -0
- package/dist/node-execution/orchestration/runPreOrchestration.js +110 -0
- package/dist/node-execution/orchestration/runPreOrchestration.js.map +1 -0
- package/dist/node-execution/orchestration/shardContext.d.ts +12 -0
- package/dist/node-execution/orchestration/shardContext.d.ts.map +1 -0
- package/dist/node-execution/orchestration/shardContext.js +71 -0
- package/dist/node-execution/orchestration/shardContext.js.map +1 -0
- package/dist/node-execution/orchestration/types.d.ts +21 -0
- package/dist/node-execution/orchestration/types.d.ts.map +1 -0
- package/dist/node-execution/orchestration/types.js +2 -0
- package/dist/node-execution/orchestration/types.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/observability/classifyRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/classifyRunTaskFailure.js +4 -3
- package/dist/observability/classifyRunTaskFailure.js.map +1 -1
- package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
- package/dist/observability/logRunTaskFailure.js +0 -2
- package/dist/observability/logRunTaskFailure.js.map +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/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -1
- package/dist/synthesis/runStructuredSynthesisRobust.js +24 -4
- package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -1
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +3 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -1
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +28 -4
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +4 -4
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.js +2 -1
- package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -1
- package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts +42 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts.map +1 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.js +47 -0
- package/dist/task-strategies/canonicalOrchestrationStrategies.js.map +1 -0
- package/dist/task-strategies/canonicalTaskStrategies.d.ts +2 -1
- package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -1
- package/dist/task-strategies/canonicalTaskStrategies.js +2 -1
- package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -1
- package/dist/task-strategies/constants.d.ts +9 -1
- package/dist/task-strategies/constants.d.ts.map +1 -1
- package/dist/task-strategies/constants.js +9 -1
- package/dist/task-strategies/constants.js.map +1 -1
- package/dist/task-strategies/index.d.ts +5 -3
- package/dist/task-strategies/index.d.ts.map +1 -1
- package/dist/task-strategies/index.js +4 -3
- package/dist/task-strategies/index.js.map +1 -1
- package/dist/task-strategies/listAiTaskStrategies.d.ts +10 -1
- package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -1
- package/dist/task-strategies/listAiTaskStrategies.js +17 -2
- package/dist/task-strategies/listAiTaskStrategies.js.map +1 -1
- package/dist/types/task-types.d.ts +4 -11
- 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/resolveRunTaskModelReferences.d.ts.map +1 -1
- package/dist/utils/resolveRunTaskModelReferences.js +0 -32
- package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
- package/dist/utils/runTaskRequestShape.d.ts.map +1 -1
- package/dist/utils/runTaskRequestShape.js +4 -26
- package/dist/utils/runTaskRequestShape.js.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 +3 -66
- 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/skill-orchestration-strategy-cr-fr.md +147 -0
- 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 +10 -9
- 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,249 +0,0 @@
|
|
|
1
|
-
# Skillix — Skill Library Spec
|
|
2
|
-
|
|
3
|
-
**Package:** `@skillices/skillix`
|
|
4
|
-
**Git org:** `Skillices`
|
|
5
|
-
**Consumer:** `@woroces/ai-tasks`
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 1. What Is Skillix
|
|
10
|
-
|
|
11
|
-
Skillix is the **registry of skill definitions** — every skill that ai-tasks can execute lives here as a **Skillix entry**. Each entry carries the skill's **prompt**, **instructions path**, metadata, and execution defaults.
|
|
12
|
-
|
|
13
|
-
ai-tasks ships a **built-in default registry**. Upstream packages ("skills packages") published under `@skillices/` can be installed and **merged** into that default, extending the library without forking ai-tasks.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 2. Architecture: Default + Upstream Merge
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
┌──────────────────────────────────┐
|
|
21
|
-
│ @skillices/skillix │ ← the core library (types, merge, lookup)
|
|
22
|
-
│ exports: types, mergeRegistries │
|
|
23
|
-
│ exports: findSkillix, listKeys │
|
|
24
|
-
└──────────────────────────────────┘
|
|
25
|
-
|
|
26
|
-
┌──────────────────────────────────┐
|
|
27
|
-
│ @skillices/skillix-security │ ← upstream skills package (example)
|
|
28
|
-
│ exports: REGISTRY (partial) │
|
|
29
|
-
└──────────────────────────────────┘
|
|
30
|
-
|
|
31
|
-
┌──────────────────────────────────┐
|
|
32
|
-
│ @woroces/ai-tasks │
|
|
33
|
-
│ • has DEFAULT_REGISTRY (built-in)│
|
|
34
|
-
│ • imports @skillices/skillix │
|
|
35
|
-
│ • optionally imports upstream │
|
|
36
|
-
│ skills packages and merges │
|
|
37
|
-
│ • uses merged registry at runtime│
|
|
38
|
-
└──────────────────────────────────┘
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**Flow:**
|
|
42
|
-
|
|
43
|
-
1. ai-tasks defines `DEFAULT_REGISTRY` — its own built-in skills.
|
|
44
|
-
2. At init, ai-tasks calls `mergeRegistries(DEFAULT_REGISTRY, ...upstreamRegistries)` to produce the **active registry**.
|
|
45
|
-
3. Upstream skills packages are regular npm deps (`@skillices/skillix-security`, `@skillices/skillix-ops`, etc.) that each export a partial registry.
|
|
46
|
-
4. Merge rule: **upstream wins** on key collision (upstream is more specific / fresher). ai-tasks can invert this if needed.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 3. Skillix Entry Shape
|
|
51
|
-
|
|
52
|
-
Every skill in the registry is a `SkillixEntry`:
|
|
53
|
-
|
|
54
|
-
```ts
|
|
55
|
-
interface SkillixEntry {
|
|
56
|
-
/** Stable unique id (slug or UUID). */
|
|
57
|
-
id: string;
|
|
58
|
-
|
|
59
|
-
/** Skill key as used in RunTaskRequest.skillKey (e.g. "tasks/security-risk-summary"). */
|
|
60
|
-
key: string;
|
|
61
|
-
|
|
62
|
-
/** Human-readable name. */
|
|
63
|
-
name: string;
|
|
64
|
-
|
|
65
|
-
/** Short description — what this skill does. */
|
|
66
|
-
description: string;
|
|
67
|
-
|
|
68
|
-
/** The prompt template. The actual instructions sent to the LLM. */
|
|
69
|
-
prompt: string;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Path to an external instructions file (relative to package root or absolute).
|
|
73
|
-
* When set, the file content is the prompt; `prompt` field may be empty or a fallback.
|
|
74
|
-
* Consumer loads the file at runtime or build time.
|
|
75
|
-
*/
|
|
76
|
-
instructionsPath?: string;
|
|
77
|
-
|
|
78
|
-
/** Optional tags for filtering and discovery. */
|
|
79
|
-
tags?: string[];
|
|
80
|
-
|
|
81
|
-
/** Default execution type when request doesn't specify one. */
|
|
82
|
-
defaultExecutionType?: string;
|
|
83
|
-
|
|
84
|
-
/** Optional JSON Schema for task input validation. */
|
|
85
|
-
inputSchema?: object;
|
|
86
|
-
|
|
87
|
-
/** Optional hints for execution bindings (model, db, etc.). */
|
|
88
|
-
bindingHints?: Record<string, unknown>;
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### What matters most
|
|
93
|
-
|
|
94
|
-
Every skillix entry **must** have either `prompt` (inline) or `instructionsPath` (file reference) — that is the skill's core content. Everything else is metadata and defaults.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 4. Package API (`@skillices/skillix`)
|
|
99
|
-
|
|
100
|
-
### 4.1 Types
|
|
101
|
-
|
|
102
|
-
```ts
|
|
103
|
-
export type { SkillixEntry };
|
|
104
|
-
export type SkillixRegistry = Record<string, SkillixEntry>; // keyed by SkillixEntry.key
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 4.2 Registry Operations
|
|
108
|
-
|
|
109
|
-
```ts
|
|
110
|
-
/** Merge multiple registries. Later registries win on key collision. */
|
|
111
|
-
export function mergeRegistries(...registries: SkillixRegistry[]): SkillixRegistry;
|
|
112
|
-
|
|
113
|
-
/** Find a skillix entry by key or taskId (normalized lookup). */
|
|
114
|
-
export function findSkillix(key: string, registry: SkillixRegistry): SkillixEntry | undefined;
|
|
115
|
-
|
|
116
|
-
/** List all keys in a registry. */
|
|
117
|
-
export function listKeys(registry: SkillixRegistry): string[];
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### 4.3 Key Normalization
|
|
121
|
-
|
|
122
|
-
Consumers may pass `"security-risk-summary"` or `"tasks/security-risk-summary"`. `findSkillix` tries:
|
|
123
|
-
1. Exact match on `key`.
|
|
124
|
-
2. Prefixed with `tasks/`.
|
|
125
|
-
3. Prefixed with `skills/`.
|
|
126
|
-
|
|
127
|
-
First match wins.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## 5. Upstream Skills Packages
|
|
132
|
-
|
|
133
|
-
A skills package is any npm package under `@skillices/` that exports a `SkillixRegistry`:
|
|
134
|
-
|
|
135
|
-
```ts
|
|
136
|
-
// @skillices/skillix-security/index.ts
|
|
137
|
-
import type { SkillixRegistry } from "@skillices/skillix";
|
|
138
|
-
|
|
139
|
-
export const REGISTRY: SkillixRegistry = {
|
|
140
|
-
"tasks/security-risk-summary": {
|
|
141
|
-
id: "security-risk-summary-v1",
|
|
142
|
-
key: "tasks/security-risk-summary",
|
|
143
|
-
name: "Security risk summary",
|
|
144
|
-
description: "Summarize security risks from context.",
|
|
145
|
-
prompt: "You are a security analyst. Given the following context:\n\n{{context}}\n\nProduce a risk summary...",
|
|
146
|
-
instructionsPath: "instructions/security-risk-summary.md",
|
|
147
|
-
tags: ["security", "summary"],
|
|
148
|
-
defaultExecutionType: "DIRECT",
|
|
149
|
-
},
|
|
150
|
-
// ... more entries
|
|
151
|
-
};
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
That's it — flat registry export, no runtime logic. The package just holds skill definitions.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## 6. How ai-tasks Uses Skillix
|
|
159
|
-
|
|
160
|
-
### 6.1 Setup (once, at init)
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
import { mergeRegistries, findSkillix } from "@skillices/skillix";
|
|
164
|
-
import { REGISTRY as securitySkills } from "@skillices/skillix-security"; // upstream
|
|
165
|
-
import { DEFAULT_REGISTRY } from "./skillix/defaults.js"; // built-in
|
|
166
|
-
|
|
167
|
-
const ACTIVE_REGISTRY = mergeRegistries(DEFAULT_REGISTRY, securitySkills);
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### 6.2 At runTask Time
|
|
171
|
-
|
|
172
|
-
```ts
|
|
173
|
-
const skillix = findSkillix(request.skillKey, ACTIVE_REGISTRY);
|
|
174
|
-
|
|
175
|
-
if (skillix) {
|
|
176
|
-
// Apply defaults (request takes precedence)
|
|
177
|
-
if (!request.executionType && skillix.defaultExecutionType) {
|
|
178
|
-
request.executionType = skillix.defaultExecutionType;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// Resolve prompt: instructionsPath (file) takes priority, fallback to inline prompt
|
|
182
|
-
const prompt = skillix.instructionsPath
|
|
183
|
-
? await loadInstructions(skillix.instructionsPath)
|
|
184
|
-
: skillix.prompt;
|
|
185
|
-
|
|
186
|
-
// Inject prompt into execution context
|
|
187
|
-
request.context = prompt + (request.context ? "\n\n" + request.context : "");
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Continue with existing runTask flow...
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### 6.3 When Skill Not in Registry
|
|
194
|
-
|
|
195
|
-
No change to current behavior. ai-tasks continues as today — the request is used as-is. Skillix only adds defaults and prompt when the skill is found.
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## 7. Built-In Default Registry in ai-tasks
|
|
200
|
-
|
|
201
|
-
ai-tasks maintains its own `DEFAULT_REGISTRY` for skills that ship with it:
|
|
202
|
-
|
|
203
|
-
```
|
|
204
|
-
src/skillix/
|
|
205
|
-
defaults.ts ← DEFAULT_REGISTRY
|
|
206
|
-
instructions/ ← .md files referenced by instructionsPath
|
|
207
|
-
my-built-in.md
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
This is not the `@skillices/skillix` package. It's ai-tasks' own set of skillix entries that exist without installing any upstream skills package.
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## 8. Implementation Checklist
|
|
215
|
-
|
|
216
|
-
### Phase 1: Create `@skillices/skillix`
|
|
217
|
-
|
|
218
|
-
- [ ] New repo under `Skillices` org.
|
|
219
|
-
- [ ] Export `SkillixEntry`, `SkillixRegistry` types.
|
|
220
|
-
- [ ] Implement `mergeRegistries`, `findSkillix`, `listKeys`.
|
|
221
|
-
- [ ] Key normalization (exact → `tasks/` → `skills/` prefix fallback).
|
|
222
|
-
- [ ] Publish to registry.
|
|
223
|
-
|
|
224
|
-
### Phase 2: Wire into ai-tasks
|
|
225
|
-
|
|
226
|
-
- [ ] Add `@skillices/skillix` dependency.
|
|
227
|
-
- [ ] Create `src/skillix/defaults.ts` with `DEFAULT_REGISTRY`.
|
|
228
|
-
- [ ] Create `src/skillix/instructions/` for built-in prompt files.
|
|
229
|
-
- [ ] In `task-sdk.ts`: resolve skillix entry, apply defaults + prompt.
|
|
230
|
-
- [ ] Graceful fallback when skill not in registry.
|
|
231
|
-
|
|
232
|
-
### Phase 3: First upstream skills package
|
|
233
|
-
|
|
234
|
-
- [ ] Create `@skillices/skillix-<domain>` (e.g. `skillix-security`).
|
|
235
|
-
- [ ] Export partial `SkillixRegistry` with entries and instruction files.
|
|
236
|
-
- [ ] In ai-tasks: add dep, merge at init.
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
## 9. Summary
|
|
241
|
-
|
|
242
|
-
| Concern | Where |
|
|
243
|
-
|---------|-------|
|
|
244
|
-
| Types + merge + lookup | `@skillices/skillix` |
|
|
245
|
-
| Built-in skills | `ai-tasks/src/skillix/defaults.ts` |
|
|
246
|
-
| Upstream skill definitions | `@skillices/skillix-*` packages |
|
|
247
|
-
| Prompt / instructions | `SkillixEntry.prompt` (inline) or `SkillixEntry.instructionsPath` (file) |
|
|
248
|
-
| Merge strategy | `mergeRegistries()` — later wins, request always overrides |
|
|
249
|
-
| Key resolution | `findSkillix()` — exact, then `tasks/`, then `skills/` prefix |
|