@exellix/ai-tasks 7.8.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/.env.example +3 -0
- package/.metadata/instructions-builders/create-expected-output-instructions.md +195 -0
- package/.metadata/readme.md +48 -0
- package/.metadata/shared/audit.md +29 -0
- package/.metadata/skills/professional-answer +32 -0
- package/.metadata/skills/professional-answer.compressed.md +11 -0
- package/.metadata/skills/professional-answer.instructions +33 -0
- package/.metadata/skills/professional-answer.instructions.md +33 -0
- package/.metadata/skills/professional-answer.l2.md +28 -0
- package/.metadata/skills/professional-answer.md +32 -0
- package/.metadata/skills/professional-answer.prompt +1 -0
- package/.metadata/skills/professional-answer.prompt.md +1 -0
- package/.metadata/skills/professional-decision.md +26 -0
- package/BREAKING-CHANGES.md +43 -0
- package/CHANGELOG.md +147 -0
- package/README.md +2497 -0
- package/RUNTASK_REQUEST.md +369 -0
- package/dist/activix/activixClient.d.ts +6 -0
- package/dist/activix/activixClient.d.ts.map +1 -0
- package/dist/activix/activixClient.js +131 -0
- package/dist/activix/activixClient.js.map +1 -0
- package/dist/activix/getTaskActivities.d.ts +10 -0
- package/dist/activix/getTaskActivities.d.ts.map +1 -0
- package/dist/activix/getTaskActivities.js +17 -0
- package/dist/activix/getTaskActivities.js.map +1 -0
- package/dist/activix/phaseTracking.d.ts +17 -0
- package/dist/activix/phaseTracking.d.ts.map +1 -0
- package/dist/activix/phaseTracking.js +85 -0
- package/dist/activix/phaseTracking.js.map +1 -0
- package/dist/aiScoping/index.d.ts +6 -0
- package/dist/aiScoping/index.d.ts.map +1 -0
- package/dist/aiScoping/index.js +4 -0
- package/dist/aiScoping/index.js.map +1 -0
- package/dist/aiScoping/runAiScoping.d.ts +36 -0
- package/dist/aiScoping/runAiScoping.d.ts.map +1 -0
- package/dist/aiScoping/runAiScoping.js +100 -0
- package/dist/aiScoping/runAiScoping.js.map +1 -0
- package/dist/aiScoping/runScopingCall.d.ts +23 -0
- package/dist/aiScoping/runScopingCall.d.ts.map +1 -0
- package/dist/aiScoping/runScopingCall.js +50 -0
- package/dist/aiScoping/runScopingCall.js.map +1 -0
- package/dist/aiScoping/validateAiScoping.d.ts +7 -0
- package/dist/aiScoping/validateAiScoping.d.ts.map +1 -0
- package/dist/aiScoping/validateAiScoping.js +33 -0
- package/dist/aiScoping/validateAiScoping.js.map +1 -0
- package/dist/aiSkillsUpstreamExports.d.ts +13 -0
- package/dist/aiSkillsUpstreamExports.d.ts.map +1 -0
- package/dist/aiSkillsUpstreamExports.js +12 -0
- package/dist/aiSkillsUpstreamExports.js.map +1 -0
- package/dist/analysis/analyzeRunTaskRequest.d.ts +29 -0
- package/dist/analysis/analyzeRunTaskRequest.d.ts.map +1 -0
- package/dist/analysis/analyzeRunTaskRequest.js +85 -0
- package/dist/analysis/analyzeRunTaskRequest.js.map +1 -0
- package/dist/analysis/index.d.ts +3 -0
- package/dist/analysis/index.d.ts.map +1 -0
- package/dist/analysis/index.js +2 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/builders/task-request-builder.d.ts +310 -0
- package/dist/builders/task-request-builder.d.ts.map +1 -0
- package/dist/builders/task-request-builder.js +581 -0
- package/dist/builders/task-request-builder.js.map +1 -0
- package/dist/compile/compileTaskConfiguration.d.ts +15 -0
- package/dist/compile/compileTaskConfiguration.d.ts.map +1 -0
- package/dist/compile/compileTaskConfiguration.js +184 -0
- package/dist/compile/compileTaskConfiguration.js.map +1 -0
- package/dist/compile/index.d.ts +2 -0
- package/dist/compile/index.d.ts.map +1 -0
- package/dist/compile/index.js +2 -0
- package/dist/compile/index.js.map +1 -0
- package/dist/core/task-sdk.d.ts +36 -0
- package/dist/core/task-sdk.d.ts.map +1 -0
- package/dist/core/task-sdk.js +2432 -0
- package/dist/core/task-sdk.js.map +1 -0
- package/dist/errors/smartInputValidationError.d.ts +39 -0
- package/dist/errors/smartInputValidationError.d.ts.map +1 -0
- package/dist/errors/smartInputValidationError.js +97 -0
- package/dist/errors/smartInputValidationError.js.map +1 -0
- package/dist/errors/taskConfigurationCompileError.d.ts +16 -0
- package/dist/errors/taskConfigurationCompileError.d.ts.map +1 -0
- package/dist/errors/taskConfigurationCompileError.js +20 -0
- package/dist/errors/taskConfigurationCompileError.js.map +1 -0
- package/dist/execution-strategies/applyExecutionStrategyOutputs.d.ts +17 -0
- package/dist/execution-strategies/applyExecutionStrategyOutputs.d.ts.map +1 -0
- package/dist/execution-strategies/applyExecutionStrategyOutputs.js +63 -0
- package/dist/execution-strategies/applyExecutionStrategyOutputs.js.map +1 -0
- package/dist/execution-strategies/constants.d.ts +14 -0
- package/dist/execution-strategies/constants.d.ts.map +1 -0
- package/dist/execution-strategies/constants.js +13 -0
- package/dist/execution-strategies/constants.js.map +1 -0
- package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts +9 -0
- package/dist/execution-strategies/executionStrategyCatalogMetadata.d.ts.map +1 -0
- package/dist/execution-strategies/executionStrategyCatalogMetadata.js +37 -0
- package/dist/execution-strategies/executionStrategyCatalogMetadata.js.map +1 -0
- package/dist/execution-strategies/genericExecutionFuncxEnvelope.d.ts +94 -0
- package/dist/execution-strategies/genericExecutionFuncxEnvelope.d.ts.map +1 -0
- package/dist/execution-strategies/genericExecutionFuncxEnvelope.js +306 -0
- package/dist/execution-strategies/genericExecutionFuncxEnvelope.js.map +1 -0
- package/dist/execution-strategies/resolveExecutionStrategies.d.ts +14 -0
- package/dist/execution-strategies/resolveExecutionStrategies.d.ts.map +1 -0
- package/dist/execution-strategies/resolveExecutionStrategies.js +108 -0
- package/dist/execution-strategies/resolveExecutionStrategies.js.map +1 -0
- package/dist/execution-strategies/runFuncxExecutionStrategy.d.ts +37 -0
- package/dist/execution-strategies/runFuncxExecutionStrategy.d.ts.map +1 -0
- package/dist/execution-strategies/runFuncxExecutionStrategy.js +72 -0
- package/dist/execution-strategies/runFuncxExecutionStrategy.js.map +1 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/resolveLlmCallForXynthesis.d.ts +52 -0
- package/dist/internal/resolveLlmCallForXynthesis.d.ts.map +1 -0
- package/dist/internal/resolveLlmCallForXynthesis.js +81 -0
- package/dist/internal/resolveLlmCallForXynthesis.js.map +1 -0
- package/dist/internal/resolveRunTaskRuntimeKnobs.d.ts +19 -0
- package/dist/internal/resolveRunTaskRuntimeKnobs.d.ts.map +1 -0
- package/dist/internal/resolveRunTaskRuntimeKnobs.js +52 -0
- package/dist/internal/resolveRunTaskRuntimeKnobs.js.map +1 -0
- package/dist/internal/runPostStepLlmCall.d.ts +52 -0
- package/dist/internal/runPostStepLlmCall.d.ts.map +1 -0
- package/dist/internal/runPostStepLlmCall.js +170 -0
- package/dist/internal/runPostStepLlmCall.js.map +1 -0
- package/dist/localTasks/collectEvidence.d.ts +3 -0
- package/dist/localTasks/collectEvidence.d.ts.map +1 -0
- package/dist/localTasks/collectEvidence.js +364 -0
- package/dist/localTasks/collectEvidence.js.map +1 -0
- package/dist/localTasks/decideWebScope.d.ts +3 -0
- package/dist/localTasks/decideWebScope.d.ts.map +1 -0
- package/dist/localTasks/decideWebScope.js +56 -0
- package/dist/localTasks/decideWebScope.js.map +1 -0
- package/dist/localTasks/index.d.ts +5 -0
- package/dist/localTasks/index.d.ts.map +1 -0
- package/dist/localTasks/index.js +19 -0
- package/dist/localTasks/index.js.map +1 -0
- package/dist/localTasks/narrixAssetPlayground.d.ts +13 -0
- package/dist/localTasks/narrixAssetPlayground.d.ts.map +1 -0
- package/dist/localTasks/narrixAssetPlayground.js +161 -0
- package/dist/localTasks/narrixAssetPlayground.js.map +1 -0
- package/dist/localTasks/narrixSubnetPlayground.d.ts +14 -0
- package/dist/localTasks/narrixSubnetPlayground.d.ts.map +1 -0
- package/dist/localTasks/narrixSubnetPlayground.js +168 -0
- package/dist/localTasks/narrixSubnetPlayground.js.map +1 -0
- package/dist/localTasks/narrixVulnGroupPlayground.d.ts +13 -0
- package/dist/localTasks/narrixVulnGroupPlayground.d.ts.map +1 -0
- package/dist/localTasks/narrixVulnGroupPlayground.js +161 -0
- package/dist/localTasks/narrixVulnGroupPlayground.js.map +1 -0
- package/dist/localTasks/narrixVulnInstancePlayground.d.ts +13 -0
- package/dist/localTasks/narrixVulnInstancePlayground.d.ts.map +1 -0
- package/dist/localTasks/narrixVulnInstancePlayground.js +165 -0
- package/dist/localTasks/narrixVulnInstancePlayground.js.map +1 -0
- package/dist/localTasks/nodeCallExport.d.ts +6 -0
- package/dist/localTasks/nodeCallExport.d.ts.map +1 -0
- package/dist/localTasks/nodeCallExport.js +99 -0
- package/dist/localTasks/nodeCallExport.js.map +1 -0
- package/dist/localTasks/nodeCallExportBatch.d.ts +3 -0
- package/dist/localTasks/nodeCallExportBatch.d.ts.map +1 -0
- package/dist/localTasks/nodeCallExportBatch.js +52 -0
- package/dist/localTasks/nodeCallExportBatch.js.map +1 -0
- package/dist/localTasks/normalizeNarrixResult.d.ts +3 -0
- package/dist/localTasks/normalizeNarrixResult.d.ts.map +1 -0
- package/dist/localTasks/normalizeNarrixResult.js +106 -0
- package/dist/localTasks/normalizeNarrixResult.js.map +1 -0
- package/dist/localTasks/registry.d.ts +4 -0
- package/dist/localTasks/registry.d.ts.map +1 -0
- package/dist/localTasks/registry.js +8 -0
- package/dist/localTasks/registry.js.map +1 -0
- package/dist/localTasks/types.d.ts +28 -0
- package/dist/localTasks/types.d.ts.map +1 -0
- package/dist/localTasks/types.js +2 -0
- package/dist/localTasks/types.js.map +1 -0
- package/dist/localTasks/validateInput.d.ts +3 -0
- package/dist/localTasks/validateInput.d.ts.map +1 -0
- package/dist/localTasks/validateInput.js +66 -0
- package/dist/localTasks/validateInput.js.map +1 -0
- package/dist/methods/convenience-methods.d.ts +45 -0
- package/dist/methods/convenience-methods.d.ts.map +1 -0
- package/dist/methods/convenience-methods.js +39 -0
- package/dist/methods/convenience-methods.js.map +1 -0
- package/dist/narrix/applyNarrixScope.d.ts +10 -0
- package/dist/narrix/applyNarrixScope.d.ts.map +1 -0
- package/dist/narrix/applyNarrixScope.js +69 -0
- package/dist/narrix/applyNarrixScope.js.map +1 -0
- package/dist/narrix/buildNarrixAttachment.d.ts +9 -0
- package/dist/narrix/buildNarrixAttachment.d.ts.map +1 -0
- package/dist/narrix/buildNarrixAttachment.js +29 -0
- package/dist/narrix/buildNarrixAttachment.js.map +1 -0
- package/dist/narrix/buildWebScopeScopeInput.d.ts +39 -0
- package/dist/narrix/buildWebScopeScopeInput.d.ts.map +1 -0
- package/dist/narrix/buildWebScopeScopeInput.js +193 -0
- package/dist/narrix/buildWebScopeScopeInput.js.map +1 -0
- package/dist/narrix/flags.d.ts +4 -0
- package/dist/narrix/flags.d.ts.map +1 -0
- package/dist/narrix/flags.js +4 -0
- package/dist/narrix/flags.js.map +1 -0
- package/dist/narrix/index.d.ts +11 -0
- package/dist/narrix/index.d.ts.map +1 -0
- package/dist/narrix/index.js +14 -0
- package/dist/narrix/index.js.map +1 -0
- package/dist/narrix/narrixClient.d.ts +9 -0
- package/dist/narrix/narrixClient.d.ts.map +1 -0
- package/dist/narrix/narrixClient.js +46 -0
- package/dist/narrix/narrixClient.js.map +1 -0
- package/dist/narrix/narrixContextMarkdown.d.ts +15 -0
- package/dist/narrix/narrixContextMarkdown.d.ts.map +1 -0
- package/dist/narrix/narrixContextMarkdown.js +98 -0
- package/dist/narrix/narrixContextMarkdown.js.map +1 -0
- package/dist/narrix/narrixRunnerModule.d.ts +11 -0
- package/dist/narrix/narrixRunnerModule.d.ts.map +1 -0
- package/dist/narrix/narrixRunnerModule.js +17 -0
- package/dist/narrix/narrixRunnerModule.js.map +1 -0
- package/dist/narrix/runNarrixForChat.d.ts +3 -0
- package/dist/narrix/runNarrixForChat.d.ts.map +1 -0
- package/dist/narrix/runNarrixForChat.js +51 -0
- package/dist/narrix/runNarrixForChat.js.map +1 -0
- package/dist/narrix/runNarrixForDocs.d.ts +3 -0
- package/dist/narrix/runNarrixForDocs.d.ts.map +1 -0
- package/dist/narrix/runNarrixForDocs.js +50 -0
- package/dist/narrix/runNarrixForDocs.js.map +1 -0
- package/dist/narrix/runNarrixForRecord.d.ts +3 -0
- package/dist/narrix/runNarrixForRecord.d.ts.map +1 -0
- package/dist/narrix/runNarrixForRecord.js +47 -0
- package/dist/narrix/runNarrixForRecord.js.map +1 -0
- package/dist/narrix/runNarrixForText.d.ts +3 -0
- package/dist/narrix/runNarrixForText.d.ts.map +1 -0
- package/dist/narrix/runNarrixForText.js +49 -0
- package/dist/narrix/runNarrixForText.js.map +1 -0
- package/dist/narrix/runnerDispatch.d.ts +12 -0
- package/dist/narrix/runnerDispatch.d.ts.map +1 -0
- package/dist/narrix/runnerDispatch.js +19 -0
- package/dist/narrix/runnerDispatch.js.map +1 -0
- package/dist/narrix/seedBundleRouting.d.ts +15 -0
- package/dist/narrix/seedBundleRouting.d.ts.map +1 -0
- package/dist/narrix/seedBundleRouting.js +46 -0
- package/dist/narrix/seedBundleRouting.js.map +1 -0
- package/dist/narrix/task.d.ts +4 -0
- package/dist/narrix/task.d.ts.map +1 -0
- package/dist/narrix/task.js +143 -0
- package/dist/narrix/task.js.map +1 -0
- package/dist/narrix/types.d.ts +104 -0
- package/dist/narrix/types.d.ts.map +1 -0
- package/dist/narrix/types.js +3 -0
- package/dist/narrix/types.js.map +1 -0
- package/dist/narrix/webContextMarkdown.d.ts +54 -0
- package/dist/narrix/webContextMarkdown.d.ts.map +1 -0
- package/dist/narrix/webContextMarkdown.js +206 -0
- package/dist/narrix/webContextMarkdown.js.map +1 -0
- package/dist/narrix/webScoper.d.ts +43 -0
- package/dist/narrix/webScoper.d.ts.map +1 -0
- package/dist/narrix/webScoper.js +144 -0
- package/dist/narrix/webScoper.js.map +1 -0
- package/dist/observability/debugTrace.d.ts +31 -0
- package/dist/observability/debugTrace.d.ts.map +1 -0
- package/dist/observability/debugTrace.js +117 -0
- package/dist/observability/debugTrace.js.map +1 -0
- package/dist/observability/extractAiTasksObservability.d.ts +7 -0
- package/dist/observability/extractAiTasksObservability.d.ts.map +1 -0
- package/dist/observability/extractAiTasksObservability.js +98 -0
- package/dist/observability/extractAiTasksObservability.js.map +1 -0
- package/dist/observability/graphExecutionRunLogContract.d.ts +19 -0
- package/dist/observability/graphExecutionRunLogContract.d.ts.map +1 -0
- package/dist/observability/graphExecutionRunLogContract.js +11 -0
- package/dist/observability/graphExecutionRunLogContract.js.map +1 -0
- package/dist/packaged-tasks-client.d.ts +66 -0
- package/dist/packaged-tasks-client.d.ts.map +1 -0
- package/dist/packaged-tasks-client.js +100 -0
- package/dist/packaged-tasks-client.js.map +1 -0
- package/dist/planWebScopeQuestions/index.d.ts +78 -0
- package/dist/planWebScopeQuestions/index.d.ts.map +1 -0
- package/dist/planWebScopeQuestions/index.js +282 -0
- package/dist/planWebScopeQuestions/index.js.map +1 -0
- package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.d.ts +18 -0
- package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.d.ts.map +1 -0
- package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.js +42 -0
- package/dist/planWebScopeQuestions/runResearchPlanQuestionsFuncx.js.map +1 -0
- package/dist/post-steps/audit/loadAuditTemplates.d.ts +72 -0
- package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -0
- package/dist/post-steps/audit/loadAuditTemplates.js +62 -0
- package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts +11 -0
- package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -0
- package/dist/post-steps/audit/parseAuditOutput.js +50 -0
- package/dist/post-steps/audit/parseAuditOutput.js.map +1 -0
- package/dist/post-steps/audit/runAudit.d.ts +22 -0
- package/dist/post-steps/audit/runAudit.d.ts.map +1 -0
- package/dist/post-steps/audit/runAudit.js +406 -0
- package/dist/post-steps/audit/runAudit.js.map +1 -0
- package/dist/post-steps/audit/runAuditCall.d.ts +23 -0
- package/dist/post-steps/audit/runAuditCall.d.ts.map +1 -0
- package/dist/post-steps/audit/runAuditCall.js +32 -0
- package/dist/post-steps/audit/runAuditCall.js.map +1 -0
- package/dist/post-steps/polish/loadPolishTemplates.d.ts +35 -0
- package/dist/post-steps/polish/loadPolishTemplates.d.ts.map +1 -0
- package/dist/post-steps/polish/loadPolishTemplates.js +38 -0
- package/dist/post-steps/polish/loadPolishTemplates.js.map +1 -0
- package/dist/post-steps/polish/parsePolishOutput.d.ts +6 -0
- package/dist/post-steps/polish/parsePolishOutput.d.ts.map +1 -0
- package/dist/post-steps/polish/parsePolishOutput.js +47 -0
- package/dist/post-steps/polish/parsePolishOutput.js.map +1 -0
- package/dist/post-steps/polish/runPolish.d.ts +24 -0
- package/dist/post-steps/polish/runPolish.d.ts.map +1 -0
- package/dist/post-steps/polish/runPolish.js +147 -0
- package/dist/post-steps/polish/runPolish.js.map +1 -0
- package/dist/post-steps/polish/runPolishCall.d.ts +22 -0
- package/dist/post-steps/polish/runPolishCall.d.ts.map +1 -0
- package/dist/post-steps/polish/runPolishCall.js +32 -0
- package/dist/post-steps/polish/runPolishCall.js.map +1 -0
- package/dist/post-steps/resolvePostStepConfig.d.ts +58 -0
- package/dist/post-steps/resolvePostStepConfig.d.ts.map +1 -0
- package/dist/post-steps/resolvePostStepConfig.js +105 -0
- package/dist/post-steps/resolvePostStepConfig.js.map +1 -0
- package/dist/rendrixUpstreamExports.d.ts +7 -0
- package/dist/rendrixUpstreamExports.d.ts.map +1 -0
- package/dist/rendrixUpstreamExports.js +6 -0
- package/dist/rendrixUpstreamExports.js.map +1 -0
- package/dist/skillCatalogExports.d.ts +8 -0
- package/dist/skillCatalogExports.d.ts.map +1 -0
- package/dist/skillCatalogExports.js +8 -0
- package/dist/skillCatalogExports.js.map +1 -0
- package/dist/strategies/direct-execution-strategy.d.ts +31 -0
- package/dist/strategies/direct-execution-strategy.d.ts.map +1 -0
- package/dist/strategies/direct-execution-strategy.js +107 -0
- package/dist/strategies/direct-execution-strategy.js.map +1 -0
- package/dist/strategies/execution-strategy.interface.d.ts +31 -0
- package/dist/strategies/execution-strategy.interface.d.ts.map +1 -0
- package/dist/strategies/execution-strategy.interface.js +2 -0
- package/dist/strategies/execution-strategy.interface.js.map +1 -0
- package/dist/strategies/index.d.ts +9 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/index.js +8 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/strategies/strategy-factory.d.ts +45 -0
- package/dist/strategies/strategy-factory.d.ts.map +1 -0
- package/dist/strategies/strategy-factory.js +59 -0
- package/dist/strategies/strategy-factory.js.map +1 -0
- package/dist/synthesis/index.d.ts +9 -0
- package/dist/synthesis/index.d.ts.map +1 -0
- package/dist/synthesis/index.js +8 -0
- package/dist/synthesis/index.js.map +1 -0
- package/dist/synthesis/resolveSourceMaterial.d.ts +35 -0
- package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -0
- package/dist/synthesis/resolveSourceMaterial.js +152 -0
- package/dist/synthesis/resolveSourceMaterial.js.map +1 -0
- package/dist/synthesis/runStructuredSynthesisRobust.d.ts +42 -0
- package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -0
- package/dist/synthesis/runStructuredSynthesisRobust.js +303 -0
- package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +19 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +242 -0
- package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -0
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +171 -0
- package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -0
- package/dist/task-strategies/canonicalInputExecutionStrategies.js +117 -0
- package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -0
- package/dist/task-strategies/canonicalNarrixModes.d.ts +31 -0
- package/dist/task-strategies/canonicalNarrixModes.d.ts.map +1 -0
- package/dist/task-strategies/canonicalNarrixModes.js +35 -0
- package/dist/task-strategies/canonicalNarrixModes.js.map +1 -0
- package/dist/task-strategies/canonicalTaskStrategies.d.ts +104 -0
- package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -0
- package/dist/task-strategies/canonicalTaskStrategies.js +77 -0
- package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -0
- package/dist/task-strategies/cataloxCatalogViews.d.ts +55 -0
- package/dist/task-strategies/cataloxCatalogViews.d.ts.map +1 -0
- package/dist/task-strategies/cataloxCatalogViews.js +65 -0
- package/dist/task-strategies/cataloxCatalogViews.js.map +1 -0
- package/dist/task-strategies/constants.d.ts +49 -0
- package/dist/task-strategies/constants.d.ts.map +1 -0
- package/dist/task-strategies/constants.js +49 -0
- package/dist/task-strategies/constants.js.map +1 -0
- package/dist/task-strategies/index.d.ts +22 -0
- package/dist/task-strategies/index.d.ts.map +1 -0
- package/dist/task-strategies/index.js +13 -0
- package/dist/task-strategies/index.js.map +1 -0
- package/dist/task-strategies/listAiTaskStrategies.d.ts +43 -0
- package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -0
- package/dist/task-strategies/listAiTaskStrategies.js +74 -0
- package/dist/task-strategies/listAiTaskStrategies.js.map +1 -0
- package/dist/task-strategies/normalize.d.ts +7 -0
- package/dist/task-strategies/normalize.d.ts.map +1 -0
- package/dist/task-strategies/normalize.js +44 -0
- package/dist/task-strategies/normalize.js.map +1 -0
- package/dist/task-strategies/types.d.ts +37 -0
- package/dist/task-strategies/types.d.ts.map +1 -0
- package/dist/task-strategies/types.js +2 -0
- package/dist/task-strategies/types.js.map +1 -0
- package/dist/types/decision-contracts.d.ts +31 -0
- package/dist/types/decision-contracts.d.ts.map +1 -0
- package/dist/types/decision-contracts.js +23 -0
- package/dist/types/decision-contracts.js.map +1 -0
- package/dist/types/evidence-types.d.ts +108 -0
- package/dist/types/evidence-types.d.ts.map +1 -0
- package/dist/types/evidence-types.js +9 -0
- package/dist/types/evidence-types.js.map +1 -0
- package/dist/types/executionType.d.ts +9 -0
- package/dist/types/executionType.d.ts.map +1 -0
- package/dist/types/executionType.js +8 -0
- package/dist/types/executionType.js.map +1 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/llmCall.d.ts +121 -0
- package/dist/types/llmCall.d.ts.map +1 -0
- package/dist/types/llmCall.js +39 -0
- package/dist/types/llmCall.js.map +1 -0
- package/dist/types/task-configuration.d.ts +60 -0
- package/dist/types/task-configuration.d.ts.map +1 -0
- package/dist/types/task-configuration.js +3 -0
- package/dist/types/task-configuration.js.map +1 -0
- package/dist/types/task-types.d.ts +887 -0
- package/dist/types/task-types.d.ts.map +1 -0
- package/dist/types/task-types.js +21 -0
- package/dist/types/task-types.js.map +1 -0
- package/dist/utilities/runUtility.d.ts +3 -0
- package/dist/utilities/runUtility.d.ts.map +1 -0
- package/dist/utilities/runUtility.js +204 -0
- package/dist/utilities/runUtility.js.map +1 -0
- package/dist/utils/assertRequiredRunSkillCorrelation.d.ts +7 -0
- package/dist/utils/assertRequiredRunSkillCorrelation.d.ts.map +1 -0
- package/dist/utils/assertRequiredRunSkillCorrelation.js +17 -0
- package/dist/utils/assertRequiredRunSkillCorrelation.js.map +1 -0
- package/dist/utils/assertValidSmartInputConfig.d.ts +5 -0
- package/dist/utils/assertValidSmartInputConfig.d.ts.map +1 -0
- package/dist/utils/assertValidSmartInputConfig.js +71 -0
- package/dist/utils/assertValidSmartInputConfig.js.map +1 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.d.ts +13 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.js +65 -0
- package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -0
- package/dist/utils/extractSmartInputRenderResult.d.ts +7 -0
- package/dist/utils/extractSmartInputRenderResult.d.ts.map +1 -0
- package/dist/utils/extractSmartInputRenderResult.js +30 -0
- package/dist/utils/extractSmartInputRenderResult.js.map +1 -0
- package/dist/utils/jsonPaths.d.ts +6 -0
- package/dist/utils/jsonPaths.d.ts.map +1 -0
- package/dist/utils/jsonPaths.js +32 -0
- package/dist/utils/jsonPaths.js.map +1 -0
- package/dist/utils/normalizeSmartInputConfig.d.ts +5 -0
- package/dist/utils/normalizeSmartInputConfig.d.ts.map +1 -0
- package/dist/utils/normalizeSmartInputConfig.js +30 -0
- package/dist/utils/normalizeSmartInputConfig.js.map +1 -0
- package/dist/utils/outputValidation.d.ts +19 -0
- package/dist/utils/outputValidation.d.ts.map +1 -0
- package/dist/utils/outputValidation.js +75 -0
- package/dist/utils/outputValidation.js.map +1 -0
- package/dist/utils/runTaskRequestShape.d.ts +16 -0
- package/dist/utils/runTaskRequestShape.d.ts.map +1 -0
- package/dist/utils/runTaskRequestShape.js +80 -0
- package/dist/utils/runTaskRequestShape.js.map +1 -0
- package/dist/utils/skillTemplateVariables.d.ts +20 -0
- package/dist/utils/skillTemplateVariables.d.ts.map +1 -0
- package/dist/utils/skillTemplateVariables.js +63 -0
- package/dist/utils/skillTemplateVariables.js.map +1 -0
- package/dist/utils/xynthesizedSmartInputPaths.d.ts +16 -0
- package/dist/utils/xynthesizedSmartInputPaths.d.ts.map +1 -0
- package/dist/utils/xynthesizedSmartInputPaths.js +56 -0
- package/dist/utils/xynthesizedSmartInputPaths.js.map +1 -0
- package/dist/utils/xynthesizedWrite.d.ts +10 -0
- package/dist/utils/xynthesizedWrite.d.ts.map +1 -0
- package/dist/utils/xynthesizedWrite.js +61 -0
- package/dist/utils/xynthesizedWrite.js.map +1 -0
- package/dist/validation/analyzeExpectedRunTaskInput.d.ts +41 -0
- package/dist/validation/analyzeExpectedRunTaskInput.d.ts.map +1 -0
- package/dist/validation/analyzeExpectedRunTaskInput.js +133 -0
- package/dist/validation/analyzeExpectedRunTaskInput.js.map +1 -0
- package/dist/validation/collectSmartInputValidationIssues.d.ts +6 -0
- package/dist/validation/collectSmartInputValidationIssues.d.ts.map +1 -0
- package/dist/validation/collectSmartInputValidationIssues.js +38 -0
- package/dist/validation/collectSmartInputValidationIssues.js.map +1 -0
- package/dist/validation/helpers.d.ts +15 -0
- package/dist/validation/helpers.d.ts.map +1 -0
- package/dist/validation/helpers.js +184 -0
- package/dist/validation/helpers.js.map +1 -0
- package/dist/validation/index.d.ts +9 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +6 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/types.d.ts +51 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +5 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/validateRunTaskConfig.d.ts +8 -0
- package/dist/validation/validateRunTaskConfig.d.ts.map +1 -0
- package/dist/validation/validateRunTaskConfig.js +158 -0
- package/dist/validation/validateRunTaskConfig.js.map +1 -0
- package/dist/validation/validateRunTaskInvoke.d.ts +30 -0
- package/dist/validation/validateRunTaskInvoke.d.ts.map +1 -0
- package/dist/validation/validateRunTaskInvoke.js +108 -0
- package/dist/validation/validateRunTaskInvoke.js.map +1 -0
- package/documenations/activix-feature-request-identity.md +123 -0
- package/documenations/activix.md +175 -0
- package/documenations/bug-report-xynthesis-and-synthesis-call.md +217 -0
- package/documenations/core-runtime-tokens-and-strategies.md +123 -0
- package/documenations/downstream-environment.md +48 -0
- package/documenations/downstream-test-runtime-teardown-cleanup.md +73 -0
- package/documenations/examples/xynthesis-run-task-request.example.json +170 -0
- package/documenations/feature-request-ai-skills-raw-template-access.md +82 -0
- package/documenations/feature-request-athenix-core-directive.md +145 -0
- package/documenations/feature-request-athenix-token-extraction.md +124 -0
- package/documenations/funcx-catalog-hosting-checklist.md +107 -0
- package/documenations/funcx-scoping-integration-gaps.md +120 -0
- package/documenations/funcx-upstream-github-issues-draft.md +153 -0
- package/documenations/identity-metadata-contract.md +165 -0
- package/documenations/intermediate-steps.md +33 -0
- package/documenations/record-and-template-variables.md +32 -0
- package/documenations/run-task-execution-flow.md +153 -0
- package/documenations/run-task-single-run-checklist.md +109 -0
- package/documenations/schemas/README.md +40 -0
- package/documenations/schemas/openapi-3.1-components.yaml +24 -0
- package/documenations/schemas/v1/output-schema.json +55 -0
- package/documenations/schemas/v1/output-validation-result.json +41 -0
- package/documenations/schemas/v1/run-task-request.json +219 -0
- package/documenations/schemas/v1/synthesized-artifacts.json +133 -0
- package/documenations/synthesis-invocation-notes.md +26 -0
- package/documenations/synthesized-context-guide.md +84 -0
- package/documenations/task-core-and-core-aware-synthesis.md +58 -0
- package/documenations/upstream-feature-requests/ai-skills-llm-observability.md +129 -0
- package/documenations/upstream-feature-requests/xynthesis-llm-observability.md +125 -0
- package/documenations/upstream-feedback-request-shape-clarification.md +101 -0
- package/documenations/web-context-precedence.md +33 -0
- package/documenations/web-scoping-in-ai-tasks.md +503 -0
- package/documenations/xynthesis-activix-telemetry.md +28 -0
- package/documenations/xynthesis-upstream-fixes-checklist.md +71 -0
- package/package.json +92 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
## Web scoping in `@exellix/ai-tasks`
|
|
2
|
+
|
|
3
|
+
This document explains, in technical detail, **how web scoping is wired into ai-tasks**, how requests opt into it, what data flows through, and what guarantees / failure modes exist. It is intended for engineers integrating with ai-tasks (e.g. graph builders, skill authors) and for maintainers changing the web scoping plumbing.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. High-level overview
|
|
8
|
+
|
|
9
|
+
- **Goal**: Enrich a NARRIX run with **external web context** (via `@exellix/narrix-web-scoper`) and expose that context to local tasks through `executionMemory.webContext`.
|
|
10
|
+
- **Trigger**: A boolean flag on the task request:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
RunTaskRequest.narrix = {
|
|
14
|
+
datasetId: "...",
|
|
15
|
+
enableWebScope: true, // ← opt-in; default is false/absent
|
|
16
|
+
};
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **Where it runs**:
|
|
20
|
+
- After a NARRIX run completes successfully (CNI ingested + runner executed).
|
|
21
|
+
- Implemented in the **task SDK**, in the same flow that invokes the local NARRIX handler.
|
|
22
|
+
- **Where the result lands**:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
ctx.executionMemory.webContext: WebScoperResult
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
where `WebScoperResult` is defined by `@exellix/narrix-web-scoper` and is always present when `enableWebScope === true`, even on miss/error.
|
|
29
|
+
|
|
30
|
+
- **Failure stance**: **Lenient.** If web scoping fails or misses, the NARRIX task still runs and `_narrix` output is still attached. Web scoping only affects `executionMemory.webContext` and observability.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Request contract: enabling web scoping
|
|
35
|
+
|
|
36
|
+
### 2.1. Request shape
|
|
37
|
+
|
|
38
|
+
ai-tasks exposes NARRIX as a **local task** in the task SDK. The entry-point for callers is a `RunTaskRequest` that may include a `narrix` section used by the NARRIX pre-processor.
|
|
39
|
+
|
|
40
|
+
The relevant part of the request is:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
// src/types/task-types.ts (conceptual)
|
|
44
|
+
export interface NarrixPreProcessorConfig {
|
|
45
|
+
datasetId: string;
|
|
46
|
+
attachToField?: string;
|
|
47
|
+
enableWebScope?: boolean; // ← added for web scoping
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RunTaskRequest {
|
|
51
|
+
skillKey: string;
|
|
52
|
+
input: unknown;
|
|
53
|
+
narrix?: NarrixPreProcessorConfig;
|
|
54
|
+
// ... other fields: executionMemory, variables, etc.
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- **`narrix.datasetId`**: required; selects which NARRIX dataset / pack to run.
|
|
59
|
+
- **`narrix.enableWebScope`**:
|
|
60
|
+
- **`true`** → ai-tasks will attempt a web scoping call after NARRIX completes.
|
|
61
|
+
- **absent / `false`** → web scoping is **completely skipped** for this request.
|
|
62
|
+
|
|
63
|
+
### 2.2. Example from a graph builder (worox-graphs)
|
|
64
|
+
|
|
65
|
+
Downstream (e.g. `worox-graphs`) forwards configuration from node metadata into the NARRIX config:
|
|
66
|
+
|
|
67
|
+
```jsonc
|
|
68
|
+
{
|
|
69
|
+
"metadata": {
|
|
70
|
+
"narrix": {
|
|
71
|
+
"datasetId": "network.vuln.instances",
|
|
72
|
+
"enableWebScope": true
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
In TypeScript:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
narrix: {
|
|
82
|
+
datasetId: node.taskConfiguration.narrix.datasetId,
|
|
83
|
+
attachToField: node.taskConfiguration.narrix.attachToField,
|
|
84
|
+
enableWebScope: node.taskConfiguration.narrix.enableWebScope ?? false,
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Only when that `enableWebScope` flag is `true` will ai-tasks invoke the web scoper.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 3. Execution flow inside ai-tasks
|
|
93
|
+
|
|
94
|
+
### 3.1. NARRIX run
|
|
95
|
+
|
|
96
|
+
The normal NARRIX pipeline in ai-tasks is:
|
|
97
|
+
|
|
98
|
+
1. **Ingest** raw input into CNI via `@exellix/narrix-ingest`.
|
|
99
|
+
2. **Run** the NARRIX runner (`@exellix/narrix-runner`) with the CNI and `datasetId`.
|
|
100
|
+
3. **Attach** the NARRIX result to the task’s execution memory.
|
|
101
|
+
|
|
102
|
+
This produces a **success result** with a shape similar to:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
export interface NarrixRunOutputSuccess {
|
|
106
|
+
entity: unknown;
|
|
107
|
+
signals: unknown;
|
|
108
|
+
stories: unknown;
|
|
109
|
+
passes: unknown;
|
|
110
|
+
meta: unknown;
|
|
111
|
+
cni?: unknown; // raw CNI (typed more strictly by narrix packages)
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The success result is attached under `executionMemory._narrix` (or under `attachToField` when configured).
|
|
116
|
+
|
|
117
|
+
### 3.2. Web scoping hook
|
|
118
|
+
|
|
119
|
+
After a successful NARRIX run, the task SDK checks `narrix.enableWebScope`:
|
|
120
|
+
|
|
121
|
+
1. If **absent/false**:
|
|
122
|
+
- **No web scoping call is made.**
|
|
123
|
+
- `executionMemory.webContext` remains `undefined`.
|
|
124
|
+
2. If **true**:
|
|
125
|
+
- ai-tasks builds scope fields via **`resolveWebScopeQuestionAndTemplates`** in `src/narrix/buildWebScopeScopeInput.ts`, then either calls **`runWebScope()`** (`scopeGeneric` / `ScopeInput`) or **`runWebScopeQuestionPack()`** (`scopeQuestionPack` / explicit questions) from `src/narrix/webScoper.ts`.
|
|
126
|
+
- The result is normalized to **`WebScoperResult`** and written into `executionMemory.webContext` **regardless of hit/miss/error**.
|
|
127
|
+
|
|
128
|
+
#### 3.2.1 Search question / templates / explicit questions (ISSUE-006, `@exellix/narrix-web-scoper` 1.2.0+)
|
|
129
|
+
|
|
130
|
+
Optional fields on **`RunTaskRequest.narrix`**:
|
|
131
|
+
|
|
132
|
+
| Field | Purpose |
|
|
133
|
+
|--------|--------|
|
|
134
|
+
| **`webScopeTemplates`** | Non-empty array → passed as `ScopeInput.webScopeTemplates`. Uses **athenix-parser** token syntax in the web-scoper; **replaces** normal query planning when set. |
|
|
135
|
+
| **`webScopeObjects`** | Merged on top of an **auto-built** context (CNI `knownFacts`, common `entity.graphized.vulnerability.*` fields, `question` / `baseQuestion`, `entityKey` / `label`). |
|
|
136
|
+
| **`webScopeQuestionTemplate`** | When **`webScopeTemplates` is not set**, optional **Handlebars** string to produce the search `question` from that context plus `input` (full task input). |
|
|
137
|
+
| **`webScopeQuestions`** | When **`webScopeTemplates` is not set**, optional list of explicit scope questions. Non-empty after trim → **`scopeQuestionPack`** with `WebScopeQuestion[]` (`id` generated when omitted). Shape: `Array<{ id?: string; question: string; source?: "manual" \| "ai-driven" }>`. |
|
|
138
|
+
| **`webScoping`** | Optional slice of **`WebScoperConfig.scoping`** from `@exellix/narrix-web-scoper` (snippets, caps, raw content, `maxQueries`, `freshnessDays`, etc.). When non-empty, ai-tasks builds a scoper for that request with `createWebScoper({ enabled: true, searchAdapter, scoping: narrix.webScoping })` so behavior matches upstream docs. Omit or leave empty to use the package default scoper (backward compatible). |
|
|
139
|
+
|
|
140
|
+
**Precedence:**
|
|
141
|
+
|
|
142
|
+
1. If **`webScopeTemplates`** is set (after trimming empty entries) → scoper receives **`webScopeTemplates`** + merged **`webScopeObjects`** only (no `question` / **`webScopeQuestions`** from this resolver).
|
|
143
|
+
2. Else if **`webScopeQuestions`** is non-empty after normalization → **`runWebScopeQuestionPack`** with **`questions`** only (no single **`question`** / Handlebars path).
|
|
144
|
+
3. Else if **`webScopeQuestionTemplate`** is set → **`question`** = Handlebars render; on template error, fall back to default enrichment.
|
|
145
|
+
4. Else → **`question`** = `input.question` (or string `input`) **plus** appended **CVE / vendor / product** tokens from context when those tokens are **not** already contained in the base question (case-insensitive).
|
|
146
|
+
|
|
147
|
+
When there is no base question and no enrichable facts, **`question`** may be omitted (empty resolver result).
|
|
148
|
+
|
|
149
|
+
Conceptually, the call looks like:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import type { ScopeInput, WebScoperResult } from "@exellix/narrix-web-scoper";
|
|
153
|
+
import { runWebScope, runWebScopeQuestionPack } from "../narrix/webScoper.js";
|
|
154
|
+
import { resolveWebScopeQuestionAndTemplates } from "../narrix/buildWebScopeScopeInput.js";
|
|
155
|
+
|
|
156
|
+
const scopeFields = resolveWebScopeQuestionAndTemplates({
|
|
157
|
+
narrix: narrixConfig,
|
|
158
|
+
requestInput: request.input,
|
|
159
|
+
successResult,
|
|
160
|
+
entity: /* record medium only */,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const base = {
|
|
164
|
+
datasetId: narrixConfig.datasetId,
|
|
165
|
+
subjectId: successResult.entity.entityKey,
|
|
166
|
+
entityKind: successResult.entity.entityKind,
|
|
167
|
+
entity: /* record */,
|
|
168
|
+
cni: successResult.cni,
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const webResult: WebScoperResult = scopeFields.packQuestions?.length
|
|
172
|
+
? await runWebScopeQuestionPack({ ...base, questions: scopeFields.packQuestions })
|
|
173
|
+
: await runWebScope({ ...base, ...scopeFields } as ScopeInput);
|
|
174
|
+
|
|
175
|
+
ctx.executionMemory.webContext = webResult;
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The **NARRIX output attachment** (`executionMemory._narrix` or the configured `attachToField`) happens independently of web scoping and is not affected by web scoping failures.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 4. `runWebScope` and `WebScoperResult`
|
|
183
|
+
|
|
184
|
+
### 4.1. The `runWebScope` helper
|
|
185
|
+
|
|
186
|
+
`src/narrix/webScoper.ts` provides a thin, testable wrapper around `@exellix/narrix-web-scoper`:
|
|
187
|
+
|
|
188
|
+
- Maintains a **singleton** `NarrixWebScoper` instance in production.
|
|
189
|
+
- Allows tests to **inject** a fake scoper via `setWebScoperForTesting`.
|
|
190
|
+
- Normalizes failures into a consistent `WebScoperResult`.
|
|
191
|
+
|
|
192
|
+
The tests in `test/narrix/webScoper.test.ts` show its behavior:
|
|
193
|
+
|
|
194
|
+
- **Happy path**:
|
|
195
|
+
- When the injected scoper returns `{ available: true, context, cached: false }`,
|
|
196
|
+
- `runWebScope` forwards that as-is, and tests assert:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
assert.strictEqual(result.available, true);
|
|
200
|
+
assert.deepStrictEqual(result.context, webContext);
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
- **Miss / ineligibility**:
|
|
204
|
+
- When scoper returns `{ available: false, reason: "notEligible" }`,
|
|
205
|
+
- `runWebScope` passes this through without throwing:
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
assert.strictEqual(result.available, false);
|
|
209
|
+
assert.strictEqual(result.reason, "notEligible");
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- **Error handling**:
|
|
213
|
+
- When the scoper throws (e.g. network error, adapter unavailable),
|
|
214
|
+
- `runWebScope` **catches** the error and returns:
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
{ available: false, reason: "error", error: "<message>" }
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
- Tests assert:
|
|
221
|
+
|
|
222
|
+
```ts
|
|
223
|
+
assert.strictEqual(result.available, false);
|
|
224
|
+
assert.strictEqual(result.reason, "error");
|
|
225
|
+
assert.ok(result.error?.includes("search timed out"));
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 4.2. Result contract
|
|
229
|
+
|
|
230
|
+
The effective contract, as used by ai-tasks, is:
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
// Hit
|
|
234
|
+
{
|
|
235
|
+
available: true;
|
|
236
|
+
context: WebContext; // rich object with findings, queriesUsed, sources, timestamps, ...
|
|
237
|
+
cached: boolean;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Miss or error
|
|
241
|
+
{
|
|
242
|
+
available: false;
|
|
243
|
+
reason: WebScoperMissReason | "error";
|
|
244
|
+
error?: string; // present when reason === "error"
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
This shape is **stable from the perspective of local tasks**: they only need to check `available` and, optionally, `reason`/`error`.
|
|
249
|
+
|
|
250
|
+
### 4.3. Source bodies and snippets (`WebSource`)
|
|
251
|
+
|
|
252
|
+
Upstream behavior is implemented in **`@exellix/narrix-web-scoper`** (and Tavily field mapping in **`@exellix/search-adapter`**). ai-tasks does not map provider JSON; it forwards **`RunTaskRequest.narrix.webScoping`** into the scoper factory when set. Field names and semantics follow the **`@exellix/narrix-web-scoper` README** (current releases use first-class **`providerContent`** / **`providerRawContent`**; **`content`** / **`rawContent`** are legacy mirrors for the same roles).
|
|
253
|
+
|
|
254
|
+
When **`webScoping.includeSourceSnippets`** is **`true`**, each `WebContext.sources[]` entry may include:
|
|
255
|
+
|
|
256
|
+
- **`providerContent`** / **`providerRawContent`**: bounded excerpt and optional raw payload from the adapter (when requested).
|
|
257
|
+
- **`content`** / **`rawContent`**: deprecated mirrors of **`providerContent`** / **`providerRawContent`**.
|
|
258
|
+
- **`snippet`**: primary excerpt for the source, chosen via **`webScoping.sourceExcerptFrom`** (default **`providerContent`**, or **`providerRawContent`**, with deprecated aliases **`content`** / **`rawContent`**).
|
|
259
|
+
- **`snippetCharCount`**, **`contentOrigin`**, **`retrievalStage`**, **`contentSource`**, **`score`** / **`rank`**: provenance and metadata when the adapter supplies them (see web-scoper README).
|
|
260
|
+
|
|
261
|
+
Defaults are backward compatible: **`includeSourceSnippets` defaults to false**, so these fields are omitted unless you opt in (via **`narrix.webScoping`** or the scoper’s own defaults when extended).
|
|
262
|
+
|
|
263
|
+
Optional caps (only apply when snippets are enabled):
|
|
264
|
+
|
|
265
|
+
- **`maxSnippetCharsPerSource`**: Unicode cap applied per source to **`providerContent`**, **`providerRawContent`** (and legacy mirrors), and the text chosen for **`snippet`**. When set to a positive number, it is also forwarded as **`snippetMaxChars`** on the shared search request so the adapter can normalize earlier.
|
|
266
|
+
- **`maxTotalWebContextChars`**: additional budget applied **only** to **`WebSource.snippet`** across sources (after each snippet’s per-source cap). It does **not** shrink stored **`providerContent`** / **`providerRawContent`**.
|
|
267
|
+
|
|
268
|
+
To request raw body text from the provider, set **`webScoping.snippetIncludeRawContent`** (e.g. **`true`** or **`"markdown"`**); it is forwarded as **`includeRawContent`** on search requests. Use **`@exellix/search-adapter`** and **`@exellix/narrix-web-scoper`** versions from the same release family as this repo’s dependencies.
|
|
269
|
+
|
|
270
|
+
Example:
|
|
271
|
+
|
|
272
|
+
```ts
|
|
273
|
+
narrix: {
|
|
274
|
+
datasetId: "network.vuln.instances",
|
|
275
|
+
enableWebScope: true,
|
|
276
|
+
webScoping: {
|
|
277
|
+
includeSourceSnippets: true,
|
|
278
|
+
maxQueries: 2,
|
|
279
|
+
maxSnippetCharsPerSource: 4000,
|
|
280
|
+
snippetIncludeRawContent: false,
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 5. How `executionMemory` is affected
|
|
288
|
+
|
|
289
|
+
### 5.1. Baseline (without web scoping)
|
|
290
|
+
|
|
291
|
+
Without web scoping, for a NARRIX task, `executionMemory` will generally contain:
|
|
292
|
+
|
|
293
|
+
- `executionMemory._narrix` — NARRIX run result (entity, signals, stories, passes, meta, etc.).
|
|
294
|
+
- Any initial `executionMemory` provided by the caller (e.g. `executionMemory.input.raw` for raw records).
|
|
295
|
+
|
|
296
|
+
`executionMemory.webContext` is **undefined** and should not be relied on.
|
|
297
|
+
|
|
298
|
+
### 5.2. With `enableWebScope: true`
|
|
299
|
+
|
|
300
|
+
When `enableWebScope` is true:
|
|
301
|
+
|
|
302
|
+
- **Always present**:
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
ctx.executionMemory.webContext: WebScoperResult;
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
even when the scoper returns a miss or throws an error.
|
|
309
|
+
|
|
310
|
+
- **Never removed / mutated**:
|
|
311
|
+
- `_narrix` (or the configured attachment field) is **still present and unchanged**, even when web scoping fails.
|
|
312
|
+
- Tests explicitly assert that `_narrix` remains present in the error path.
|
|
313
|
+
|
|
314
|
+
Key behaviors from `test/narrix/webScoper.test.ts`:
|
|
315
|
+
|
|
316
|
+
- When scoper succeeds:
|
|
317
|
+
- `webContext.available === true`
|
|
318
|
+
- `_narrix` is still present.
|
|
319
|
+
- When scoper fails:
|
|
320
|
+
- `_narrix` is **still present**.
|
|
321
|
+
- `webContext` exists with `available === false` and `reason === "error"`.
|
|
322
|
+
|
|
323
|
+
### 5.3. Question forwarding and enrichment
|
|
324
|
+
|
|
325
|
+
When the caller passes a **natural-language question** in `RunTaskRequest.input.question`, the NARRIX pre-processor derives **`ScopeInput.question`** via **`resolveWebScopeQuestionAndTemplates`** (see §3.2.1): the base string is usually that field, **optionally extended** with CVE / vendor / product from CNI `knownFacts` or common `entity.graphized` paths when those tokens are not already in the question. With **`narrix.webScopeTemplates`**, the scoper uses template-driven queries instead and **`question`** may be omitted.
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
await runTask({
|
|
329
|
+
skillKey: "skills/skill.local:webScopeTestQuestion",
|
|
330
|
+
narrix: { datasetId: "test.fixture", enableWebScope: true },
|
|
331
|
+
executionMemory: { input: { raw: { id: "v3" } } },
|
|
332
|
+
input: { question: "Is this vulnerability critical?" },
|
|
333
|
+
});
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Integration tests (with `USE_NARRIX_INGEST=1`) assert the captured `question` when the fixture does not add conflicting CNI facts. Unit tests in the same file cover template precedence, Handlebars `webScopeQuestionTemplate`, and default append behavior.
|
|
337
|
+
|
|
338
|
+
This allows the scoper to tailor its search and context building to the actual question the LLM or downstream logic is trying to answer, with **entity-specific tokens** when available.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## 6. Env and configuration
|
|
343
|
+
|
|
344
|
+
### 6.1. Required env: Tavily API
|
|
345
|
+
|
|
346
|
+
The web scoper uses `@exellix/search-adapter` backed by Tavily. It requires:
|
|
347
|
+
|
|
348
|
+
- **`TAVILY_API_KEY`** — the API key for Tavily search.
|
|
349
|
+
|
|
350
|
+
Behavior:
|
|
351
|
+
|
|
352
|
+
- If `TAVILY_API_KEY` is **missing or invalid**:
|
|
353
|
+
- The scoper returns `available: false` with an appropriate `reason` (e.g. `"error"`).
|
|
354
|
+
- ai-tasks surfaces this as `executionMemory.webContext` with `available: false`.
|
|
355
|
+
- The task **continues** normally using NARRIX output only; `_narrix` is still present.
|
|
356
|
+
|
|
357
|
+
### 6.2. Other relevant flags
|
|
358
|
+
|
|
359
|
+
- `USE_NARRIX_INGEST`:
|
|
360
|
+
- When `"1"`, NARRIX ingest + runner are enabled and web scoping is meaningful.
|
|
361
|
+
- When not set, NARRIX-related flows (including web scoping) may be skipped or disabled in tests/playgrounds.
|
|
362
|
+
|
|
363
|
+
Optional per-request **`narrix.webScoping`** forwards snippet/cap/raw-content and query limits into `@exellix/narrix-web-scoper` (see §4.3). The main on/off switch remains **`enableWebScope`**.
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## 7. Error handling and observability
|
|
368
|
+
|
|
369
|
+
Web scoping is explicitly designed to **never crash the task**:
|
|
370
|
+
|
|
371
|
+
- Any exception in the scoper is caught by `runWebScope`.
|
|
372
|
+
- The task SDK:
|
|
373
|
+
- Continues to attach `_narrix` as usual.
|
|
374
|
+
- Stores a structured error in `executionMemory.webContext` for debugging.
|
|
375
|
+
|
|
376
|
+
This gives you:
|
|
377
|
+
|
|
378
|
+
- Reliable signals in logs / memory:
|
|
379
|
+
- `webContext.available === false`
|
|
380
|
+
- `webContext.reason === "error"`
|
|
381
|
+
- `webContext.error` contains a human-readable message.
|
|
382
|
+
- Freedom to treat web scoping as an **optional enhancement** while still observing its behavior in production.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## 8. How to consume web scoping from local tasks
|
|
387
|
+
|
|
388
|
+
From the perspective of a **local task handler**, web scoping is just another field on `ctx.executionMemory`:
|
|
389
|
+
|
|
390
|
+
```ts
|
|
391
|
+
type LocalTaskHandler = (args: {
|
|
392
|
+
input: any;
|
|
393
|
+
ctx: {
|
|
394
|
+
executionMemory?: {
|
|
395
|
+
webContext?: WebScoperResult;
|
|
396
|
+
_narrix?: unknown;
|
|
397
|
+
// ...
|
|
398
|
+
};
|
|
399
|
+
// ...other context fields...
|
|
400
|
+
};
|
|
401
|
+
}) => Promise<any>;
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### 8.1. Recommended consumption pattern
|
|
405
|
+
|
|
406
|
+
1. **Check for presence**:
|
|
407
|
+
|
|
408
|
+
```ts
|
|
409
|
+
const webContext = ctx.executionMemory?.webContext;
|
|
410
|
+
if (!webContext) {
|
|
411
|
+
// web scoping was not enabled for this task
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
2. **Branch on `available`**:
|
|
416
|
+
|
|
417
|
+
```ts
|
|
418
|
+
if (!webContext.available) {
|
|
419
|
+
// Option A: log / record reason and proceed without web data
|
|
420
|
+
// Option B: degrade gracefully (e.g. fallback to CNI-only reasoning)
|
|
421
|
+
} else {
|
|
422
|
+
// Safe to use webContext.context to enrich reasoning
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
3. **Do not rely on web scoping for correctness**:
|
|
427
|
+
- Handlers should behave sensibly even when `webContext` is absent or `available === false`.
|
|
428
|
+
- Web scoping is an **augmentation**, not a hard dependency.
|
|
429
|
+
|
|
430
|
+
### 8.2. Example usage (pseudocode)
|
|
431
|
+
|
|
432
|
+
```ts
|
|
433
|
+
registerLocalTask("skills/skill.local:example", async ({ input, ctx }) => {
|
|
434
|
+
const narrix = ctx.executionMemory?._narrix;
|
|
435
|
+
const web = ctx.executionMemory?.webContext;
|
|
436
|
+
|
|
437
|
+
if (web?.available) {
|
|
438
|
+
// Combine NARRIX narrative with fresh web evidence
|
|
439
|
+
return buildExplanationWithWeb(narrix, web.context);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// Fallback: only NARRIX narrative
|
|
443
|
+
return buildExplanationFromNarrixOnly(narrix);
|
|
444
|
+
});
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### 8.3. LLM tasks (`runTask` DIRECT) and synthesized-context
|
|
448
|
+
|
|
449
|
+
For skills executed through the task SDK with **`includeContextInPrompt: true`**, when NARRIX is in play ai-tasks appends a **Web sources (primary evidence)** markdown section derived from **`executionMemory.webContext`** (when **`available === true`**), using per-source **`providerRawContent`** → **`rawContent`** → **`providerContent`** → **`content`** → **`snippet`**, and labeling **`summary`** / **`findings`** as hints only. The same markdown is merged into source material for the **`synthesized-context`** PRE step under **`narrix-only`** / **`narrix+memory`** (with **`executionMemory.webContext`** stripped from the JSON memory slice when **`narrix+memory`** to avoid duplication). Implementation: **`src/narrix/webContextMarkdown.ts`**. Optional env **`WEB_CONTEXT_MARKDOWN_MAX_CHARS`** caps the size of that markdown string.
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## 9. Testing strategy and guarantees
|
|
454
|
+
|
|
455
|
+
ai-tasks contains tests that exercise both **unit-level** and **integration-level** web scoping behavior:
|
|
456
|
+
|
|
457
|
+
- `test/narrix/webScoper.test.ts`:
|
|
458
|
+
- Unit-tests **`buildWebScopeTemplateContext`** / **`resolveWebScopeQuestionAndTemplates`** (question enrichment, Handlebars template, `webScopeTemplates` precedence).
|
|
459
|
+
- Unit-tests `runWebScope` with mocked `NarrixWebScoper`.
|
|
460
|
+
- Verifies:
|
|
461
|
+
- Pass-through of `available: true` and `context`.
|
|
462
|
+
- Stable miss handling (`available: false`, specific `reason`).
|
|
463
|
+
- Error → `available: false`, `reason: "error"`, populated `error`.
|
|
464
|
+
- Singleton reset behavior (`resetWebScoperSingleton`, `setWebScoperForTesting`).
|
|
465
|
+
- Integration with `runTask`:
|
|
466
|
+
- When `enableWebScope` is **absent**:
|
|
467
|
+
- `executionMemory.webContext` remains `undefined`.
|
|
468
|
+
- When `enableWebScope === true` and scoper returns success:
|
|
469
|
+
- `executionMemory.webContext.available === true`.
|
|
470
|
+
- `_narrix` is still present.
|
|
471
|
+
- When scoper throws:
|
|
472
|
+
- `_narrix` is still present.
|
|
473
|
+
- `webContext.available === false`, `webContext.reason === "error"`.
|
|
474
|
+
- When a question is provided (and `webScopeTemplates` is not set):
|
|
475
|
+
- `ScopeInput.question` equals `request.input.question` when there are no extra CNI/entity tokens to append; otherwise it is the **enriched** string (see §3.2.1).
|
|
476
|
+
- When `webScopeTemplates` is set:
|
|
477
|
+
- `ScopeInput.webScopeTemplates` / `webScopeObjects` are passed through as configured (merged with auto-built context).
|
|
478
|
+
|
|
479
|
+
These tests define the **public contract** of web scoping within ai-tasks: any change that breaks their assertions is a breaking change to web scoping behavior.
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
## 10. Summary of contracts
|
|
484
|
+
|
|
485
|
+
- **Opt-in**:
|
|
486
|
+
- `RunTaskRequest.narrix.enableWebScope === true` is required to trigger web scoping.
|
|
487
|
+
- **Data flow**:
|
|
488
|
+
- NARRIX → success result (`_narrix`) → web scoper via `ScopeInput` → `executionMemory.webContext`.
|
|
489
|
+
- **Consumer surface**:
|
|
490
|
+
- Local tasks read `ctx.executionMemory.webContext` and `_narrix`.
|
|
491
|
+
- **Failure behavior**:
|
|
492
|
+
- Web scoping is **non-fatal**.
|
|
493
|
+
- `_narrix` is always attached on success, independent of web scoping.
|
|
494
|
+
- `webContext` is always present when enabled, with `available` + `reason`/`error` for observability.
|
|
495
|
+
- **Config**:
|
|
496
|
+
- Controlled by per-request `enableWebScope`, optional `webScopeTemplates` / `webScopeObjects` / `webScopeQuestionTemplate` / **`webScoping`** on `narrix`, and `TAVILY_API_KEY` env.
|
|
497
|
+
|
|
498
|
+
With this, integrators should have enough detail to:
|
|
499
|
+
|
|
500
|
+
- Correctly enable web scoping from graphs / callers.
|
|
501
|
+
- Reliably consume `executionMemory.webContext` in local tasks.
|
|
502
|
+
- Understand and debug web scoping behavior in logs and execution memory without diving into the entire codebase.
|
|
503
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Xynthesis Activix telemetry (Mongo)
|
|
2
|
+
|
|
3
|
+
For **hosts** of `@exellix/ai-tasks` and other orchestrators using **`@exellix/xynthesis`**.
|
|
4
|
+
|
|
5
|
+
## Symptom
|
|
6
|
+
|
|
7
|
+
With **`MONGO_URI`** or **`MONGO_LOGS_URI`** set, logs may show Activix init failures mentioning **`activix-collections`**, **`diagnostics.owner`**, or **`collectionRegistry.owner`**. Synthesis calls might still return text while **Mongo telemetry** for xynthesis does not initialize.
|
|
8
|
+
|
|
9
|
+
## Root cause
|
|
10
|
+
|
|
11
|
+
**`@x12i/activix`** enables the collection registry by default; that path requires **`diagnostics.owner`** (or **`collectionRegistry.owner`**) on the **`Activix`** constructor. If xynthesis builds Activix **without** `diagnostics`, **`init()`** fails in database mode.
|
|
12
|
+
|
|
13
|
+
## Required upstream change
|
|
14
|
+
|
|
15
|
+
In **`exellix/xynthesis`** (`src/activix.ts`, `getActivix`), pass **`diagnostics`** with at least **`owner: "@exellix/xynthesis"`** (and optional **`XYNTHESIS_ACTIVIX_DIAGNOSTICS_OWNER`** override). Details and test ideas: **[`xynthesis-upstream-fixes-checklist.md`](./xynthesis-upstream-fixes-checklist.md)** §1.
|
|
16
|
+
|
|
17
|
+
## Operational knobs
|
|
18
|
+
|
|
19
|
+
| Env | Effect |
|
|
20
|
+
|-----|--------|
|
|
21
|
+
| **`XYNTHESIS_ACTIVIX=FALSE`** | Disable xynthesis Mongo telemetry. |
|
|
22
|
+
| **`XYNTHESIS_ACTIVIX_DIAGNOSTICS_OWNER`** | Override **`diagnostics.owner`**. |
|
|
23
|
+
| **`XYNTHESIS_ACTIVIX_COLLECTION`** | Override default collection **`xynthesis-actions`**. |
|
|
24
|
+
|
|
25
|
+
## Related
|
|
26
|
+
|
|
27
|
+
- Gateway-side Activix (**`@x12i/ai-gateway`**) is separate from xynthesis’ singleton.
|
|
28
|
+
- ai-tasks **`ACTIVIX_ENABLED`** / **`src/activix/activixClient.ts`** is separate from xynthesis telemetry.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# `@exellix/xynthesis` — fixes and tests to implement (upstream)
|
|
2
|
+
|
|
3
|
+
This document lists **what to change and verify in the xynthesis repo** (`exellix/xynthesis`). It is **not** guidance to pin or downgrade xynthesis in consumers; hosts should track **current** published `@exellix/xynthesis` once these items are merged and released.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Activix Mongo init: `diagnostics.owner`
|
|
8
|
+
|
|
9
|
+
**Symptom:** With `MONGO_URI` / `MONGO_LOGS_URI` set, Activix fails init with messages about **`activix-collections`** / **`diagnostics.owner`** / **`collectionRegistry.owner`**.
|
|
10
|
+
|
|
11
|
+
**Cause:** `getActivix()` builds `new Activix({ ... })` without **`diagnostics`**, while `@x12i/activix` expects an owning package id for the default collection registry.
|
|
12
|
+
|
|
13
|
+
**Fix (source: `src/activix.ts`):**
|
|
14
|
+
|
|
15
|
+
- Pass **`diagnostics: { owner, component, instanceLabel, workerId }`** on the Activix constructor.
|
|
16
|
+
- Default **`owner`** to **`@exellix/xynthesis`**; allow override via env **`XYNTHESIS_ACTIVIX_DIAGNOSTICS_OWNER`** for multi-service Mongo deployments.
|
|
17
|
+
|
|
18
|
+
**Tests to add in xynthesis:**
|
|
19
|
+
|
|
20
|
+
- With a test Mongo URI (or mocked store if you have hooks), **`getActivix().init()`** completes without the registry error.
|
|
21
|
+
- Optional: assert legend / registry behavior matches Activix docs.
|
|
22
|
+
|
|
23
|
+
**Related consumer doc:** [`xynthesis-activix-telemetry.md`](./xynthesis-activix-telemetry.md) (symptom and verification from an app’s perspective).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. `runSidekickGatewayCall`: do not call `.trim()` on undefined `jobId` / `taskId`
|
|
28
|
+
|
|
29
|
+
**Symptom:** `TypeError: Cannot read properties of undefined (reading 'trim')` at `runSidekickGatewayCall` (e.g. `sidekickGateway.js` line ~41) when **`RunSidekickExecConfig.jobId`** or **`taskId`** is missing.
|
|
30
|
+
|
|
31
|
+
**Reproducer:** Call **`runStructuredSynthesisGatewayCall`** with **`jobId` set but `taskId` omitted** (invalid for the public contract, but easy to do in tests or loose JS).
|
|
32
|
+
|
|
33
|
+
**Fix (source: `src/sidekickGateway.ts`):**
|
|
34
|
+
|
|
35
|
+
- Treat missing non-strings as empty before trim, e.g.
|
|
36
|
+
`const jobIdTrim = typeof execConfig.jobId === "string" ? execConfig.jobId.trim() : "";`
|
|
37
|
+
(same for **`taskId`**).
|
|
38
|
+
- Prefer **after** that: if either is empty, **`throw`** a clear, named error (e.g. *“runSidekickGatewayCall requires non-empty jobId and taskId on RunSidekickExecConfig”*) instead of failing later or only logging a warn.
|
|
39
|
+
|
|
40
|
+
**Tests to add in xynthesis:**
|
|
41
|
+
|
|
42
|
+
- Missing **`taskId`** → deterministic error message (no `TypeError` on `trim`).
|
|
43
|
+
- Missing **`jobId`** → same.
|
|
44
|
+
- Valid pair → path proceeds (mock invoker if needed).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 3. Types vs runtime for structured synthesis params
|
|
49
|
+
|
|
50
|
+
**Fix:** Ensure **`RunStructuredSynthesisParams`** / exported **`RunSidekickExecConfig`** types mark **`jobId`** and **`taskId`** as **required** everywhere they flow into **`runSidekickGatewayCall`**, so TypeScript catches omissions in TS callers.
|
|
51
|
+
|
|
52
|
+
**Tests:** Compile-time is enough for TS; add a short note in JSDoc that both fields are mandatory for Activix / work-scoped logging.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## What is *not* a xynthesis bug (ai-tasks E2E context)
|
|
57
|
+
|
|
58
|
+
Failures like **`CataloxSkillNotFoundError`** for **`skills/test-intermediate-steps`** or **“could not resolve raw instructions/prompt templates”** for that skill key come from **Catalox / ai-skills content registry**: the test skill must exist in the environment’s catalog, or the E2E must use a skill key that is registered. Track that under **ai-tasks E2E prerequisites** or seed Catalox for CI—not under xynthesis code changes.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Suggested release QA (xynthesis)
|
|
63
|
+
|
|
64
|
+
1. Activix init against real Mongo URI with registry enabled — **no** owner error.
|
|
65
|
+
2. **`runStructuredSynthesisGatewayCall`** with full **`jobId` + `taskId`** — returns parsed payload (with mocked or real gateway as you do today).
|
|
66
|
+
3. **`runStructuredSynthesisGatewayCall`** with **`taskId` omitted** — **clear thrown error**, not `TypeError` on `trim`.
|
|
67
|
+
|
|
68
|
+
## Follow-up (same class of bug)
|
|
69
|
+
|
|
70
|
+
Audit other entrypoints that do **`opts.jobId.trim()`** / **`input.taskId.trim()`** without a type guard (e.g. **`runSynthesisCall.ts`**, **`finalize.ts`**, **`synthesisErrors.ts`**) so missing IDs never produce **`Cannot read properties of undefined`**.
|
|
71
|
+
|