@exellix/graph-composer 2.3.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +6 -3
  3. package/dist/canonicalGraphWarnings.d.ts.map +1 -1
  4. package/dist/canonicalGraphWarnings.js +2 -0
  5. package/dist/catalogMatchAssist.d.ts +1 -2
  6. package/dist/catalogMatchAssist.d.ts.map +1 -1
  7. package/dist/catalogMatchAssist.js +3 -4
  8. package/dist/cataloxCatalogBridge.d.ts +1 -2
  9. package/dist/cataloxCatalogBridge.d.ts.map +1 -1
  10. package/dist/cataloxCatalogBridge.js +2 -2
  11. package/dist/exampleGeneration.d.ts +11 -0
  12. package/dist/exampleGeneration.d.ts.map +1 -1
  13. package/dist/exampleGeneration.js +54 -0
  14. package/dist/funcxModel.d.ts +8 -0
  15. package/dist/funcxModel.d.ts.map +1 -0
  16. package/dist/funcxModel.js +10 -0
  17. package/dist/graphComposerActions.d.ts.map +1 -1
  18. package/dist/graphComposerActions.js +65 -0
  19. package/dist/graphComposerOutputValidation.d.ts +1 -0
  20. package/dist/graphComposerOutputValidation.d.ts.map +1 -1
  21. package/dist/graphComposerOutputValidation.js +1 -0
  22. package/dist/graphEntryContract.d.ts +114 -0
  23. package/dist/graphEntryContract.d.ts.map +1 -0
  24. package/dist/graphEntryContract.js +206 -0
  25. package/dist/graphEntryOutputValidation.d.ts +9 -0
  26. package/dist/graphEntryOutputValidation.d.ts.map +1 -0
  27. package/dist/graphEntryOutputValidation.js +276 -0
  28. package/dist/graphEntryPostProcess.d.ts +11 -0
  29. package/dist/graphEntryPostProcess.d.ts.map +1 -0
  30. package/dist/graphEntryPostProcess.js +114 -0
  31. package/dist/graphModelLayers.d.ts +19 -0
  32. package/dist/graphModelLayers.d.ts.map +1 -1
  33. package/dist/graphModelLayers.js +75 -0
  34. package/dist/index.d.ts +8 -4
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +8 -4
  37. package/dist/llmCallConfig.d.ts +32 -0
  38. package/dist/llmCallConfig.d.ts.map +1 -0
  39. package/dist/llmCallConfig.js +100 -0
  40. package/dist/modelConfigPatchMerge.d.ts +6 -0
  41. package/dist/modelConfigPatchMerge.d.ts.map +1 -0
  42. package/dist/modelConfigPatchMerge.js +38 -0
  43. package/dist/runGraphComposer.d.ts +3 -2
  44. package/dist/runGraphComposer.d.ts.map +1 -1
  45. package/dist/runGraphComposer.js +25 -11
  46. package/dist/scopingNeedMatchAssist.d.ts +1 -2
  47. package/dist/scopingNeedMatchAssist.d.ts.map +1 -1
  48. package/dist/scopingNeedMatchAssist.js +3 -3
  49. package/dist/studioSkillInvokePreflight.d.ts +60 -0
  50. package/dist/studioSkillInvokePreflight.d.ts.map +1 -0
  51. package/dist/studioSkillInvokePreflight.js +104 -0
  52. package/dist/types.d.ts +8 -1
  53. package/dist/types.d.ts.map +1 -1
  54. package/functions/graph-composer/meta.json +130 -4
  55. package/functions/graph-composer/prompts/README.md +8 -0
  56. package/functions/graph-composer/prompts/action-review-graph-entry-contract.md +37 -0
  57. package/functions/graph-composer/prompts/action-suggest-graph-entry-conditions.md +13 -0
  58. package/functions/graph-composer/prompts/action-suggest-graph-entry-examples.md +14 -0
  59. package/functions/graph-composer/prompts/action-suggest-graph-entry-inputs.md +14 -0
  60. package/functions/graph-composer/prompts/action-suggest-graph-execution-defaults.md +15 -0
  61. package/functions/graph-composer/prompts/action-suggest-job-knowledge-refs.md +12 -0
  62. package/functions/graph-composer/prompts/action-suggest-job-model-defaults.md +14 -0
  63. package/functions/graph-composer/prompts/shared/graph-entry-scope.md +19 -0
  64. package/functions/graph-composer/prompts/shared/graph-format.md +3 -1
  65. package/functions/graph-composer/prompts/shared/request-context.md +2 -1
  66. package/package.json +19 -7
@@ -345,3 +345,78 @@ export async function resolveGraphModelProfileName(profileName) {
345
345
  formatted,
346
346
  };
347
347
  }
348
+ function formatProfileSlot(profiles, providerIds, slot, includeProviderIds) {
349
+ const name = profiles[slot]?.trim() ?? "";
350
+ if (!name)
351
+ return "—";
352
+ const resolved = providerIds?.[slot]?.trim();
353
+ if (includeProviderIds &&
354
+ resolved &&
355
+ resolved.length > 0 &&
356
+ resolved !== name) {
357
+ return `${name} (${resolved})`;
358
+ }
359
+ return name;
360
+ }
361
+ /** Read `metadata.graphModelLayers` stamped by `stampGraphModelLayersOnGraph`. */
362
+ export function readNodeGraphModelLayersFromNode(node) {
363
+ const meta = readRecord(readRecord(node)?.metadata);
364
+ const raw = meta?.graphModelLayers;
365
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
366
+ return undefined;
367
+ }
368
+ const layer = raw;
369
+ if (typeof layer.nodeId !== "string" ||
370
+ layer.winning === null ||
371
+ typeof layer.winning !== "object") {
372
+ return undefined;
373
+ }
374
+ return layer;
375
+ }
376
+ /**
377
+ * Human-readable model label for graph canvas / Agent View (graphs-studio).
378
+ * Requires `stampGraphModelLayersOnGraph` (or equivalent `metadata.graphModelLayers` on the node).
379
+ */
380
+ export function formatNodeWinningModelLabel(nodeOrLayers, options) {
381
+ const layers = nodeOrLayers !== null &&
382
+ typeof nodeOrLayers === "object" &&
383
+ "winning" in nodeOrLayers &&
384
+ "profiles" in (nodeOrLayers.winning ?? {})
385
+ ? nodeOrLayers
386
+ : readNodeGraphModelLayersFromNode(nodeOrLayers);
387
+ if (layers === undefined)
388
+ return undefined;
389
+ const includeProviderIds = options?.includeProviderIds !== false;
390
+ const mode = options?.mode ?? "main";
391
+ const { profiles, providerIds } = layers.winning;
392
+ if (!profiles)
393
+ return undefined;
394
+ if (mode === "main") {
395
+ const main = formatProfileSlot(profiles, providerIds, "skillModel", includeProviderIds);
396
+ return main === "—" ? undefined : main;
397
+ }
398
+ const triple = `PRE ${formatProfileSlot(profiles, providerIds, "preActionModel", includeProviderIds)} · MAIN ${formatProfileSlot(profiles, providerIds, "skillModel", includeProviderIds)} · POST ${formatProfileSlot(profiles, providerIds, "postActionModel", includeProviderIds)}`;
399
+ if (mode === "triple")
400
+ return triple;
401
+ const src = layers.winning.sourcePath?.trim() ||
402
+ layers.winning.source ||
403
+ "unknown";
404
+ return `${triple} — ${src}`;
405
+ }
406
+ /** Label for graph-root default from `metadata.graphModelLayersSummary`. */
407
+ export function formatGraphDefaultModelLabel(graph, options) {
408
+ const meta = readRecord(graph.metadata);
409
+ const summary = readRecord(meta?.graphModelLayersSummary);
410
+ const graphDefault = readRecord(summary?.graphDefault);
411
+ const profiles = graphDefault?.profiles;
412
+ const providerIds = graphDefault?.providerIds;
413
+ if (!profiles)
414
+ return undefined;
415
+ const includeProviderIds = options?.includeProviderIds !== false;
416
+ const mode = options?.mode ?? "triple";
417
+ if (mode === "main") {
418
+ const main = formatProfileSlot(profiles, providerIds, "skillModel", includeProviderIds);
419
+ return main === "—" ? undefined : `Job default: ${main}`;
420
+ }
421
+ return `Job default — PRE ${formatProfileSlot(profiles, providerIds, "preActionModel", includeProviderIds)} · MAIN ${formatProfileSlot(profiles, providerIds, "skillModel", includeProviderIds)} · POST ${formatProfileSlot(profiles, providerIds, "postActionModel", includeProviderIds)}`;
422
+ }
package/dist/index.d.ts CHANGED
@@ -2,25 +2,29 @@ export { composeInstructions, composeWorkerInstructions, formatSkillList, LOCKED
2
2
  export { GRAPH_COMPOSER_ACTION_REGISTRY, getActionDefinition, getActionDefinitionByToolName, requiredPromptPathsFromRegistry, loadWorkerBaseMarkdown, type GraphComposerAction, type GraphComposerActionDefinition, } from "./graphComposerActions.js";
3
3
  export { graphComposerPackRoot, readGraphComposerPromptFile, } from "./packDir.js";
4
4
  export { DEFAULT_UTILITY_SKILLS } from "./defaultUtilitySkills.js";
5
- export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, redactSecretsForLog, type RunGraphComposerOptions, } from "./runGraphComposer.js";
5
+ export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, normalizeReviewGraphEntryComposerOutput, redactSecretsForLog, type RunGraphComposerOptions, } from "./runGraphComposer.js";
6
6
  export type { LogRuntimeContext, LogLevel, PackageLogLevelsConfig, StackLoggingOptions, } from "@x12i/logxer";
7
7
  export { applyPackageLogLevelsFromEnv, configurePackageLogLevels, } from "@x12i/logxer";
8
8
  export { GRAPH_COMPOSER_LOG_ENV_PREFIX, configureGraphComposerLogging, createGraphComposerLogger, getGraphComposerLogger, getGraphComposerLoggingConfig, parseGraphComposerLogsLevel, withGraphComposerLogsLevel, type ConfigureGraphComposerLoggingOptions, type GraphComposerLoggingConfig, type GraphComposerLogsLevelInput, } from "./graphComposerLogging.js";
9
9
  export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
10
+ export { applyModelConfigPatchGuard } from "./modelConfigPatchMerge.js";
11
+ export { resolveEffectiveGraphEntry, buildGraphEntryExampleJsonSchema, validateGraphEntryPaths, isValidGraphEntryPath, findGraphEntryEntityBindingMismatches, parseJsonExampleValue, resolveGraphEntryContextFromInput, assertGraphEntryAgentSurface, GRAPH_ENTRY_PATH_PREFIX, GRAPH_ENTRY_FINDING_CATEGORIES, GRAPH_EXECUTION_PATCH_ALLOWLIST, type GraphEntryPatch, type GraphEntryInputRow, type GraphEntryExampleRow, type GraphEntryFinding, type ModelConfigPatch, type JobPagentiKnowledgePatch, type GraphExecutionPatch, type GraphResponsePatch, type GraphEntryAgentContext, type TaskNodeAgentContext, type ComposerAgentSurface, } from "./graphEntryContract.js";
10
12
  export { runGraphComposerAgent, type GraphComposerAgentResult, type GraphComposerAgentOrchestrationStep, type RunGraphComposerAgentOptions, } from "./graphComposerAgent.js";
11
13
  export type { GraphComposerInput, GraphComposerAgentInput, GraphComposerIntent, GraphComposerConstraints, SkillDescriptor, PrimaryIntentType, GraphConceptStatus, GraphConceptEntityBindings, GraphConceptPatch, GraphConceptPatchKey, GraphConceptRequirementsPatch, GraphConceptCoreTaskPatchItem, RequirementOptionCandidate, RequirementOptionEntry, CatalogCandidates, ScopingMapCandidate, NarrixTemplateCandidate, } from "./types.js";
12
14
  export { buildCatalogMatchHints, type CatalogMatchAssistOptions, } from "./catalogMatchAssist.js";
13
15
  export { buildScopingNeedMatchHints, type ScopingNeedMatchAssistOptions, } from "./scopingNeedMatchAssist.js";
14
- export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, type OutputValidationContext, } from "./graphComposerOutputValidation.js";
16
+ export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, validateReviewGraphEntryContractOutput, validateSuggestGraphEntryInputsOutput, validateSuggestGraphEntryExamplesOutput, validateSuggestGraphEntryConditionsOutput, validateSuggestJobModelDefaultsOutput, validateSuggestJobKnowledgeRefsOutput, validateSuggestGraphExecutionDefaultsOutput, type OutputValidationContext, } from "./graphComposerOutputValidation.js";
15
17
  export type { WoroxScopingMapCatalogCreatePayload, WoroxScopedDataDocumentShape, } from "./scopingCatalogHostTypes.js";
16
18
  export { loadExampleGraph, inputExplainNetworkVulnSubnet, inputSuggestConceptObjectiveNetworkVulnSubnet, inputReviewConceptIoSmoke, } from "./exampleInputs.js";
17
- export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generateJsonExample, generateMdExample, generateContentExample, type GenerateGraphJsonInputExampleParams, type GenerateJsonExampleResult, type GenerateMdExampleParams, type GenerateMdExampleResult, type GenerateContentExampleParams, type GenerateContentExampleResult, } from "./exampleGeneration.js";
19
+ export { buildGraphInputExampleGuidance, buildGraphEntryExampleGuidance, generateGraphJsonInputExample, generateGraphEntryInputExample, generateJsonExample, generateMdExample, generateContentExample, type GenerateGraphJsonInputExampleParams, type GenerateGraphEntryInputExampleParams, type GenerateJsonExampleResult, type GenerateMdExampleParams, type GenerateMdExampleResult, type GenerateContentExampleParams, type GenerateContentExampleResult, } from "./exampleGeneration.js";
18
20
  export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
19
21
  export type { ParsedGraphConcept } from "./parseGraphConceptStory.js";
20
22
  export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, type AiTaskProfileMetadata, type TaskNodeProtocolGap, type TaskNodeProtocolIssueCode, type WebScopingNodeConfig, type InputSynthesisNodeConfig, type InputSynthesisDestination, } from "./aiTaskProfile.js";
21
23
  export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, type GraphEngineMemoryResolutionRoot, } from "./graphEngineBridge.js";
22
24
  export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
23
- export { analyzeGraphModelLayers, stampGraphModelLayersOnGraph, graphModelLayerLegend, graphModelProfileAccent, resolveGraphModelProfileName, type AnalyzeGraphModelLayersOptions, type GraphModelLayerPhase, type GraphModelLayerSource, type GraphModelLayerStackEntry, type GraphModelLayersAnalysis, type GraphModelLayersRuntimeOverlay, type GraphModelProfilesTriple, type NodeGraphModelLayers, } from "./graphModelLayers.js";
25
+ export { OPTIMIXER_REASONING_EFFORT_VALUES, collectGraphOrchestratorInvokeWarnings, isOptimixerReasoningEffort, type GraphTaskNodeLlmCallConfig, type OptimixerReasoningEffort, } from "./llmCallConfig.js";
26
+ export { FUNCX_ANALYZE_GATEWAY_INVOKE_REQUEST_ID, FUNCX_MIN_VERSION_FOR_ANALYZE_GATEWAY, analyzeRunSkillRequest, analyzeRunTaskRequest, analyzeTaskNodeRunTaskRequest, buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke, validateTaskNodeRunTaskInvokeFromGraph, pickRunSkillRequestFields, validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, analyzeSkillRequest, buildSkillRequestAnalysisPacket, formatSkillRequestAnalysisMarkdown, type AnalyzeRunTaskRequestOptions, type AnalyzeRunTaskRequestResult, type AnalyzeTaskNodeRunTaskRequestArgs, type AnalyzeTaskNodeRunTaskRequestResult, type AnalyzeSkillRequestOptions, type AnalyzeSkillRequestResult, type SkillRequestAnalysisFinding, type SkillRequestAnalysisReport, type SkillRequestAnalysisVerdict, type BuildSkillRequestAnalysisPacketResult, type ValidateTaskNodeRunTaskConfigArgs, type ValidateTaskNodeRunTaskConfigResult, type ValidateTaskNodeRunTaskInvokeArgs, type ValidateTaskNodeRunTaskInvokeResult, type BuildTaskNodeRunTaskRequestArgs, type BuildTaskNodeRunTaskRequestResult, } from "./studioSkillInvokePreflight.js";
27
+ export { analyzeGraphModelLayers, stampGraphModelLayersOnGraph, graphModelLayerLegend, graphModelProfileAccent, resolveGraphModelProfileName, readNodeGraphModelLayersFromNode, formatNodeWinningModelLabel, formatGraphDefaultModelLabel, type FormatNodeModelLabelOptions, type AnalyzeGraphModelLayersOptions, type GraphModelLayerPhase, type GraphModelLayerSource, type GraphModelLayerStackEntry, type GraphModelLayersAnalysis, type GraphModelLayersRuntimeOverlay, type GraphModelProfilesTriple, type NodeGraphModelLayers, } from "./graphModelLayers.js";
24
28
  export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, type TaskNodeInputsLayoutIssue, type TaskNodeInputsLayoutIssueCode, } from "./taskNodeTaskVariable.js";
25
29
  export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
26
30
  export type { CataloxContext, CataloxRuntimeConfig, } from "@x12i/catalox/embedder";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,0BAA0B,EAC1B,yBAAyB,EACzB,UAAU,EACV,mCAAmC,EACnC,oCAAoC,EACpC,mBAAmB,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,KAAK,oCAAoC,EACzC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,GACjC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nC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gCAAgC,EAChC,mCAAmC,EACnC,uCAAuC,EACvC,2CAA2C,EAC3C,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -2,21 +2,25 @@ export { composeInstructions, composeWorkerInstructions, formatSkillList, LOCKED
2
2
  export { GRAPH_COMPOSER_ACTION_REGISTRY, getActionDefinition, getActionDefinitionByToolName, requiredPromptPathsFromRegistry, loadWorkerBaseMarkdown, } from "./graphComposerActions.js";
3
3
  export { graphComposerPackRoot, readGraphComposerPromptFile, } from "./packDir.js";
4
4
  export { DEFAULT_UTILITY_SKILLS } from "./defaultUtilitySkills.js";
5
- export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, redactSecretsForLog, } from "./runGraphComposer.js";
5
+ export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, normalizeReviewGraphEntryComposerOutput, redactSecretsForLog, } from "./runGraphComposer.js";
6
6
  export { applyPackageLogLevelsFromEnv, configurePackageLogLevels, } from "@x12i/logxer";
7
7
  export { GRAPH_COMPOSER_LOG_ENV_PREFIX, configureGraphComposerLogging, createGraphComposerLogger, getGraphComposerLogger, getGraphComposerLoggingConfig, parseGraphComposerLogsLevel, withGraphComposerLogsLevel, } from "./graphComposerLogging.js";
8
8
  export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
9
+ export { applyModelConfigPatchGuard } from "./modelConfigPatchMerge.js";
10
+ export { resolveEffectiveGraphEntry, buildGraphEntryExampleJsonSchema, validateGraphEntryPaths, isValidGraphEntryPath, findGraphEntryEntityBindingMismatches, parseJsonExampleValue, resolveGraphEntryContextFromInput, assertGraphEntryAgentSurface, GRAPH_ENTRY_PATH_PREFIX, GRAPH_ENTRY_FINDING_CATEGORIES, GRAPH_EXECUTION_PATCH_ALLOWLIST, } from "./graphEntryContract.js";
9
11
  export { runGraphComposerAgent, } from "./graphComposerAgent.js";
10
12
  export { buildCatalogMatchHints, } from "./catalogMatchAssist.js";
11
13
  export { buildScopingNeedMatchHints, } from "./scopingNeedMatchAssist.js";
12
- export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, } from "./graphComposerOutputValidation.js";
14
+ export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, validateReviewGraphEntryContractOutput, validateSuggestGraphEntryInputsOutput, validateSuggestGraphEntryExamplesOutput, validateSuggestGraphEntryConditionsOutput, validateSuggestJobModelDefaultsOutput, validateSuggestJobKnowledgeRefsOutput, validateSuggestGraphExecutionDefaultsOutput, } from "./graphComposerOutputValidation.js";
13
15
  export { loadExampleGraph, inputExplainNetworkVulnSubnet, inputSuggestConceptObjectiveNetworkVulnSubnet, inputReviewConceptIoSmoke, } from "./exampleInputs.js";
14
- export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generateJsonExample, generateMdExample, generateContentExample, } from "./exampleGeneration.js";
16
+ export { buildGraphInputExampleGuidance, buildGraphEntryExampleGuidance, generateGraphJsonInputExample, generateGraphEntryInputExample, generateJsonExample, generateMdExample, generateContentExample, } from "./exampleGeneration.js";
15
17
  export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
16
18
  export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, } from "./aiTaskProfile.js";
17
19
  export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, DEFAULT_GRAPH_AI_MODEL_PROFILE_CONFIG, looksLikeConcreteModelId, isGraphAiProfileName, } from "./graphEngineBridge.js";
18
20
  export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
19
- export { analyzeGraphModelLayers, stampGraphModelLayersOnGraph, graphModelLayerLegend, graphModelProfileAccent, resolveGraphModelProfileName, } from "./graphModelLayers.js";
21
+ export { OPTIMIXER_REASONING_EFFORT_VALUES, collectGraphOrchestratorInvokeWarnings, isOptimixerReasoningEffort, } from "./llmCallConfig.js";
22
+ export { FUNCX_ANALYZE_GATEWAY_INVOKE_REQUEST_ID, FUNCX_MIN_VERSION_FOR_ANALYZE_GATEWAY, analyzeRunSkillRequest, analyzeRunTaskRequest, analyzeTaskNodeRunTaskRequest, buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke, validateTaskNodeRunTaskInvokeFromGraph, pickRunSkillRequestFields, validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, analyzeSkillRequest, buildSkillRequestAnalysisPacket, formatSkillRequestAnalysisMarkdown, } from "./studioSkillInvokePreflight.js";
23
+ export { analyzeGraphModelLayers, stampGraphModelLayersOnGraph, graphModelLayerLegend, graphModelProfileAccent, resolveGraphModelProfileName, readNodeGraphModelLayersFromNode, formatNodeWinningModelLabel, formatGraphDefaultModelLabel, } from "./graphModelLayers.js";
20
24
  export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, } from "./taskNodeTaskVariable.js";
21
25
  export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
22
26
  export { loadCatalogCandidatesFromCatalox, unifiedCatalogItemToSkillDescriptor, unifiedCatalogItemToScopingMapCandidate, unifiedCatalogItemToNarrixTemplateCandidate, } from "./cataloxCatalogBridge.js";
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Graph authoring contract for MAIN invoke tuning (`node.taskConfiguration.llmCall`).
3
+ * Runtime: graph-engine merges `llmCall` with resolved `skillModel`; ai-tasks forwards to ai-skills Optimixer.
4
+ *
5
+ * Hosts send: model (runtime-resolved), temperature, topP, reasoningEffort, timeoutMs, outputExpectation.
6
+ * Hosts do not send: maxTokens / max_completion_tokens on modelConfig or as a literal completion budget on llmCall.
7
+ */
8
+ /** Mirrors `@x12i/optimixer` — kept local so graph-composer does not depend on optimixer directly. */
9
+ export type OptimixerReasoningEffort = "not-applicable" | "none" | "low" | "medium" | "high";
10
+ export declare const OPTIMIXER_REASONING_EFFORT_VALUES: readonly OptimixerReasoningEffort[];
11
+ /** Authoring shape for `taskConfiguration.llmCall` on graph JSON (model set at runtime by graph-engine). */
12
+ export type GraphTaskNodeLlmCallConfig = {
13
+ /** Ignored on graph JSON — graph-engine sets from resolved skillModel at runTask. */
14
+ model?: string;
15
+ temperature?: number;
16
+ topP?: number;
17
+ reasoningEffort?: OptimixerReasoningEffort;
18
+ maxOutputLength?: number;
19
+ timeoutMs?: number;
20
+ outputExpectation?: Record<string, unknown>;
21
+ /** @deprecated Use outputExpectation; literal caps are Optimixer-owned at invoke. */
22
+ maxTokensCap?: number;
23
+ /** @deprecated Optimixer-owned; do not author on new graphs. */
24
+ maxTokens?: number;
25
+ max_tokens?: number;
26
+ max_completion_tokens?: number;
27
+ max_output_tokens?: number;
28
+ };
29
+ export declare function isOptimixerReasoningEffort(value: unknown): value is OptimixerReasoningEffort;
30
+ /** Warn-only checks for orchestrator invoke contract on static graph JSON. */
31
+ export declare function collectGraphOrchestratorInvokeWarnings(graph: object): string[];
32
+ //# sourceMappingURL=llmCallConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llmCallConfig.d.ts","sourceRoot":"","sources":["../src/llmCallConfig.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,sGAAsG;AACtG,MAAM,MAAM,wBAAwB,GAChC,gBAAgB,GAChB,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,CAAC;AAEX,eAAO,MAAM,iCAAiC,EAAE,SAAS,wBAAwB,EAMvE,CAAC;AAEX,4GAA4G;AAC5G,MAAM,MAAM,0BAA0B,GAAG;IACvC,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAwBF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAK5F;AAED,8EAA8E;AAC9E,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4E9E"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Graph authoring contract for MAIN invoke tuning (`node.taskConfiguration.llmCall`).
3
+ * Runtime: graph-engine merges `llmCall` with resolved `skillModel`; ai-tasks forwards to ai-skills Optimixer.
4
+ *
5
+ * Hosts send: model (runtime-resolved), temperature, topP, reasoningEffort, timeoutMs, outputExpectation.
6
+ * Hosts do not send: maxTokens / max_completion_tokens on modelConfig or as a literal completion budget on llmCall.
7
+ */
8
+ export const OPTIMIXER_REASONING_EFFORT_VALUES = [
9
+ "not-applicable",
10
+ "none",
11
+ "low",
12
+ "medium",
13
+ "high",
14
+ ];
15
+ const LEGACY_LLM_CALL_TOKEN_KEYS = [
16
+ "maxTokens",
17
+ "max_tokens",
18
+ "max_completion_tokens",
19
+ "max_output_tokens",
20
+ ];
21
+ const FORBIDDEN_MODEL_CONFIG_TOKEN_KEYS = [
22
+ "maxTokens",
23
+ "max_tokens",
24
+ "max_completion_tokens",
25
+ "max_output_tokens",
26
+ "maxTokensCap",
27
+ ];
28
+ function readRecord(v) {
29
+ if (v === null || v === undefined || typeof v !== "object" || Array.isArray(v)) {
30
+ return undefined;
31
+ }
32
+ return v;
33
+ }
34
+ export function isOptimixerReasoningEffort(value) {
35
+ return (typeof value === "string" &&
36
+ OPTIMIXER_REASONING_EFFORT_VALUES.includes(value));
37
+ }
38
+ /** Warn-only checks for orchestrator invoke contract on static graph JSON. */
39
+ export function collectGraphOrchestratorInvokeWarnings(graph) {
40
+ const warnings = [];
41
+ const g = graph;
42
+ const nodes = g.nodes;
43
+ if (!Array.isArray(nodes))
44
+ return warnings;
45
+ for (let i = 0; i < nodes.length; i++) {
46
+ const node = readRecord(nodes[i]);
47
+ if (node === undefined)
48
+ continue;
49
+ const nodeId = typeof node.id === "string" ? node.id : `nodes[${i}]`;
50
+ const prefix = `node "${nodeId}"`;
51
+ const tc = readRecord(node.taskConfiguration);
52
+ const llmCall = readRecord(tc?.llmCall);
53
+ if (llmCall !== undefined) {
54
+ for (const key of LEGACY_LLM_CALL_TOKEN_KEYS) {
55
+ if (key in llmCall) {
56
+ warnings.push(`${prefix}: taskConfiguration.llmCall.${key} is deprecated — token budget is Optimixer-owned at invoke; use outputExpectation / reasoningEffort instead.`);
57
+ }
58
+ }
59
+ if ("maxTokensCap" in llmCall) {
60
+ warnings.push(`${prefix}: taskConfiguration.llmCall.maxTokensCap is deprecated in ai-tasks 8.6+ — use outputExpectation; step retry may still bump caps at runtime only.`);
61
+ }
62
+ if (llmCall.reasoningEffort !== undefined &&
63
+ !isOptimixerReasoningEffort(llmCall.reasoningEffort)) {
64
+ warnings.push(`${prefix}: taskConfiguration.llmCall.reasoningEffort must be one of ${OPTIMIXER_REASONING_EFFORT_VALUES.join(", ")}.`);
65
+ }
66
+ if (typeof llmCall.model === "string" && llmCall.model.trim() !== "") {
67
+ warnings.push(`${prefix}: taskConfiguration.llmCall.model is ignored on graph JSON — graph-engine sets llmCall.model from resolved skillModel.`);
68
+ }
69
+ }
70
+ const modelConfigSel = readRecord(tc?.modelConfig);
71
+ if (modelConfigSel?.cases && Array.isArray(modelConfigSel.cases)) {
72
+ for (let c = 0; c < modelConfigSel.cases.length; c++) {
73
+ const caseRow = readRecord(modelConfigSel.cases[c]);
74
+ const triple = readRecord(caseRow?.modelConfig);
75
+ if (triple === undefined)
76
+ continue;
77
+ for (const key of FORBIDDEN_MODEL_CONFIG_TOKEN_KEYS) {
78
+ if (key in triple) {
79
+ warnings.push(`${prefix}: taskConfiguration.modelConfig.cases[${c}].modelConfig.${key} is forbidden — profile triple only (preActionModel, skillModel, postActionModel).`);
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ const rootSel = readRecord(g.modelConfig);
86
+ if (rootSel?.cases && Array.isArray(rootSel.cases)) {
87
+ for (let c = 0; c < rootSel.cases.length; c++) {
88
+ const caseRow = readRecord(rootSel.cases[c]);
89
+ const triple = readRecord(caseRow?.modelConfig);
90
+ if (triple === undefined)
91
+ continue;
92
+ for (const key of FORBIDDEN_MODEL_CONFIG_TOKEN_KEYS) {
93
+ if (key in triple) {
94
+ warnings.push(`graph.modelConfig.cases[${c}].modelConfig.${key} is forbidden — profile triple only.`);
95
+ }
96
+ }
97
+ }
98
+ }
99
+ return warnings;
100
+ }
@@ -0,0 +1,6 @@
1
+ import type { ModelConfigPatch } from "./graphEntryContract.js";
2
+ /**
3
+ * Apply modelConfigPatch without dropping existing cases unless replaceMode (FR-G6).
4
+ */
5
+ export declare function applyModelConfigPatchGuard(patch: ModelConfigPatch, existingGraph: object): ModelConfigPatch;
6
+ //# sourceMappingURL=modelConfigPatchMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelConfigPatchMerge.d.ts","sourceRoot":"","sources":["../src/modelConfigPatchMerge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQhE;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,gBAAgB,EACvB,aAAa,EAAE,MAAM,GACpB,gBAAgB,CAiClB"}
@@ -0,0 +1,38 @@
1
+ function asObject(v) {
2
+ return v !== null && typeof v === "object" && !Array.isArray(v)
3
+ ? v
4
+ : undefined;
5
+ }
6
+ /**
7
+ * Apply modelConfigPatch without dropping existing cases unless replaceMode (FR-G6).
8
+ */
9
+ export function applyModelConfigPatchGuard(patch, existingGraph) {
10
+ const graph = asObject(existingGraph);
11
+ const existing = asObject(graph?.modelConfig);
12
+ const existingCases = Array.isArray(existing?.cases) ? existing.cases : [];
13
+ if (patch.mode === "replaceDefault" && patch.modelConfig) {
14
+ return patch;
15
+ }
16
+ if (patch.cases && patch.cases.length > 0) {
17
+ if (patch.mode === "appendCase" || existingCases.length === 0) {
18
+ return patch;
19
+ }
20
+ return {
21
+ ...patch,
22
+ mode: "appendCase",
23
+ cases: [...existingCases, ...patch.cases],
24
+ };
25
+ }
26
+ if (patch.modelConfig && existingCases.length > 0) {
27
+ return {
28
+ mode: "appendCase",
29
+ cases: [
30
+ ...existingCases,
31
+ {
32
+ modelConfig: patch.modelConfig,
33
+ },
34
+ ],
35
+ };
36
+ }
37
+ return patch;
38
+ }
@@ -1,7 +1,6 @@
1
1
  import { type LogRuntimeContext } from "@x12i/logxer";
2
2
  import { type GraphComposerLogsLevelInput, type StackLoggingOptions } from "./graphComposerLogging.js";
3
3
  import type { Client } from "@x12i/funcx";
4
- import { type LlmMode } from "@x12i/funcx/functions";
5
4
  import type { GraphComposerInput } from "./types.js";
6
5
  import { redactSecretsForLog } from "./redactForLog.js";
7
6
  export { redactSecretsForLog };
@@ -10,6 +9,7 @@ export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
10
9
  * Maps `suggestedCatalogArtifacts` to `catalogProposals` when the latter is empty
11
10
  * or missing (consumer contract alias). No-op for other actions.
12
11
  */
12
+ export { normalizeReviewGraphEntryComposerOutput } from "./graphEntryPostProcess.js";
13
13
  export declare function normalizeReviewConceptComposerOutput(out: Record<string, unknown>): void;
14
14
  /**
15
15
  * If `action` is `explain` and known fields are flattened at the top level, moves them under `explanation` (see `functions/graph-composer/meta.json`). Maps `perNode` / `perNodeDescriptions` to `nodeDescriptions`. No-op for other actions or when `explanation` is already an object.
@@ -30,7 +30,8 @@ export type RunGraphComposerOptions = {
30
30
  * If you pass `client`, set `connectTimeoutMs` on your own `createClient` instead; this field is then ignored.
31
31
  */
32
32
  connectTimeoutMs?: number;
33
- mode?: LlmMode;
33
+ /** Legacy alias for {@link model} (funcx 4.4+). */
34
+ mode?: string;
34
35
  model?: string;
35
36
  temperature?: number;
36
37
  maxTokens?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"runGraphComposer.d.ts","sourceRoot":"","sources":["../src/runGraphComposer.ts"],"names":[],"mappings":"AAEA,OAAO,EAK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AC,EAAE,OAAO,CAAC;IAClC,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAmDF,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,uBAAuB,GAC/B,MAAM,GAAG,SAAS,CA4BpB;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAYR;AA0LD,wBAAsB,cAAc,CAClC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,OAAO,CAAC,CAYlB;AAED,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,OAAO,CAAC,CAElB;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
@@ -4,6 +4,7 @@ import { DebugLogAbstract, exceptionEvidence, fieldEvidence, runWithLogContext,
4
4
  import { getGraphComposerLogger, withGraphComposerLogsLevel, } from "./graphComposerLogging.js";
5
5
  import { createClient } from "@x12i/funcx";
6
6
  import { buildRequestPrompt, executeFuncx as invokeFuncxPack, } from "@x12i/funcx/functions";
7
+ import { resolveFuncxModel } from "./funcxModel.js";
7
8
  import { composeWorkerInstructions } from "./composeInstructions.js";
8
9
  import { buildCatalogMatchHints } from "./catalogMatchAssist.js";
9
10
  import { buildScopingNeedMatchHints } from "./scopingNeedMatchAssist.js";
@@ -14,6 +15,7 @@ import { isGraphConceptStoryDescription, parseGraphConceptStory, } from "./parse
14
15
  import { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
15
16
  import { redactSecretsForLog } from "./redactForLog.js";
16
17
  import { validateReviewConceptOutputAgainstInput } from "./graphComposerOutputValidation.js";
18
+ import { normalizeReviewGraphEntryComposerOutput, processSuggestGraphEntryExamplesOutput, processSuggestJobModelDefaultsOutput, } from "./graphEntryPostProcess.js";
17
19
  export { redactSecretsForLog };
18
20
  export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
19
21
  function processSuggestConceptObjectiveOutput(shaped, intent, existingGraph) {
@@ -102,6 +104,7 @@ function assertInputShape(input) {
102
104
  * Maps `suggestedCatalogArtifacts` to `catalogProposals` when the latter is empty
103
105
  * or missing (consumer contract alias). No-op for other actions.
104
106
  */
107
+ export { normalizeReviewGraphEntryComposerOutput } from "./graphEntryPostProcess.js";
105
108
  export function normalizeReviewConceptComposerOutput(out) {
106
109
  const cur = out.catalogProposals;
107
110
  const hasProposals = Array.isArray(cur) && cur.length > 0;
@@ -137,7 +140,13 @@ function unwrapComposerPayload(result) {
137
140
  io.findings !== undefined ||
138
141
  io.catalogProposals !== undefined ||
139
142
  io.suggestedCatalogArtifacts !== undefined ||
140
- io.requirementOptions !== undefined) {
143
+ io.requirementOptions !== undefined ||
144
+ io.graphEntryPatch !== undefined ||
145
+ io.suggestedGraphEntryPatch !== undefined ||
146
+ io.modelConfigPatch !== undefined ||
147
+ io.jobPagentiKnowledgePatch !== undefined ||
148
+ io.graphExecutionPatch !== undefined ||
149
+ io.graphResponsePatch !== undefined) {
141
150
  return inner;
142
151
  }
143
152
  }
@@ -329,13 +338,7 @@ async function runGraphWorkerInner(input, options) {
329
338
  getActionDefinition(action);
330
339
  const rules = loadRules();
331
340
  const system = composeWorkerInstructions(action, normalized.aiSkills, normalized.utilitySkills, normalized.skillMode);
332
- /** Per-mode system text for aifunctions-js (same pack for all tiers unless you add ultra-specific prompts). */
333
- const instructions = {
334
- weak: system,
335
- normal: system,
336
- strong: system,
337
- ultra: system,
338
- };
341
+ const instructions = system;
339
342
  const client = resolveGraphComposerClient(options);
340
343
  let requestForPrompt = normalized;
341
344
  const assist = options.catalogMatchListsAssist !== false &&
@@ -391,7 +394,7 @@ async function runGraphWorkerInner(input, options) {
391
394
  composedInstructionChars: system.length,
392
395
  debugKind: DebugLogAbstract.EVENT,
393
396
  });
394
- const mode = options.mode ?? "strong";
397
+ const model = resolveFuncxModel({ model: options.model, mode: options.mode ?? "strong" });
395
398
  try {
396
399
  // One @x12i/funcx function-pack LLM call for this intent.action (not a DAG node skill).
397
400
  const result = await invokeFuncxPack({
@@ -400,8 +403,7 @@ async function runGraphWorkerInner(input, options) {
400
403
  instructions,
401
404
  rules,
402
405
  client,
403
- mode,
404
- model: options.model,
406
+ model,
405
407
  temperature: options.temperature,
406
408
  maxTokens: options.maxTokens,
407
409
  });
@@ -414,9 +416,21 @@ async function runGraphWorkerInner(input, options) {
414
416
  if (action === "reviewConcept") {
415
417
  normalizeReviewConceptComposerOutput(o);
416
418
  }
419
+ if (action === "reviewGraphEntryContract") {
420
+ normalizeReviewGraphEntryComposerOutput(o);
421
+ }
417
422
  if (action === "suggestConceptObjective") {
418
423
  processSuggestConceptObjectiveOutput(o, normalized.intent, normalized.existingGraph);
419
424
  }
425
+ if (action === "suggestJobModelDefaults") {
426
+ processSuggestJobModelDefaultsOutput(o, normalized.existingGraph);
427
+ }
428
+ if (action === "suggestGraphEntryExamples") {
429
+ await processSuggestGraphEntryExamplesOutput(o, normalized, {
430
+ repairWithLlm: false,
431
+ });
432
+ delete o._graphEntryExamplesIncomplete;
433
+ }
420
434
  validateGraphComposerOutput(action, shaped, normalized);
421
435
  if (action === "reviewConcept") {
422
436
  validateReviewConceptOutputAgainstInput(shaped, {
@@ -1,9 +1,8 @@
1
1
  import type { Client } from "@x12i/funcx";
2
- import type { LlmMode } from "@x12i/funcx/functions";
3
2
  import type { GraphComposerInput } from "./types.js";
4
3
  export type ScopingNeedMatchAssistOptions = {
5
4
  client: Client;
6
- mode?: LlmMode;
5
+ mode?: string;
7
6
  model?: string;
8
7
  };
9
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"scopingNeedMatchAssist.d.ts","sourceRoot":"","sources":["../src/scopingNeedMatchAssist.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AA0BpB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,kBAAkB,EACzB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAqC9C"}
1
+ {"version":3,"file":"scopingNeedMatchAssist.d.ts","sourceRoot":"","sources":["../src/scopingNeedMatchAssist.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AA0BpB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,kBAAkB,EACzB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAoC9C"}
@@ -1,4 +1,5 @@
1
1
  import { matchLists } from "@x12i/funcx/functions";
2
+ import { resolveFuncxModel } from "./funcxModel.js";
2
3
  function scopingCatalogItems(maps) {
3
4
  return maps.map((m) => ({
4
5
  scopingMapId: m.scopingMapId,
@@ -45,14 +46,13 @@ export async function buildScopingNeedMatchHints(input, opts) {
45
46
  ...(hint !== undefined ? { graphHint: hint } : {}),
46
47
  },
47
48
  ];
48
- const { client, mode, model } = opts;
49
+ const { client } = opts;
49
50
  const r = await matchLists({
50
51
  list1,
51
52
  list2: scopingCatalogItems(maps),
52
53
  guidance: "Match the data need to the single best scoping map or questionId candidate. Prefer precise title/description fit over generic maps. Use reason briefly.",
53
- mode,
54
54
  client,
55
- model,
55
+ model: resolveFuncxModel(opts),
56
56
  }, { rules: [] });
57
57
  return { matches: r.matches, unmatched: r.unmatched };
58
58
  }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Studio / graphs-composer preflight — skill invoke analysis and RunTask validation.
3
+ *
4
+ * Moved out of `@exellix/graph-engine` and `@exellix/ai-tasks` runtime exports (8.6+).
5
+ * Studio should depend on `@exellix/graph-composer` for these checks, not graph-engine execute paths.
6
+ */
7
+ import type { Catalox } from "@x12i/catalox";
8
+ import type { Logxer } from "@x12i/logxer";
9
+ import type { RunTaskRequest } from "@exellix/ai-tasks";
10
+ import { pickRunSkillRequestFields, validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, type RunTaskValidationIssue, type ValidateRunTaskInvokeParams } from "@exellix/ai-tasks";
11
+ import { buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke } from "@exellix/graph-engine";
12
+ import type { BuildTaskNodeRunTaskRequestArgs, BuildTaskNodeRunTaskRequestResult, ValidateTaskNodeRunTaskConfigArgs, ValidateTaskNodeRunTaskConfigResult, ValidateTaskNodeRunTaskInvokeArgs, ValidateTaskNodeRunTaskInvokeResult } from "@exellix/graph-engine";
13
+ import { analyzeSkillRequest } from "@exellix/ai-skills/dist/analysis/analyze-skill-request.js";
14
+ import { buildSkillRequestAnalysisPacket } from "@exellix/ai-skills/dist/analysis/build-skill-request-analysis-packet.js";
15
+ import { formatSkillRequestAnalysisMarkdown } from "@exellix/ai-skills/dist/analysis/format-skill-request-analysis-markdown.js";
16
+ import type { AnalyzeSkillRequestOptions, AnalyzeSkillRequestResult, BuildSkillRequestAnalysisPacketResult, SkillRequestAnalysisFinding, SkillRequestAnalysisReport, SkillRequestAnalysisVerdict } from "@exellix/ai-skills/dist/analysis/types.js";
17
+ /** FuncX optional LLM review step (see `@x12i/funcx` GATEWAY-INVOKE-ANALYSIS). */
18
+ export declare const FUNCX_ANALYZE_GATEWAY_INVOKE_REQUEST_ID: "ai-skills/analyze-gateway-invoke-request";
19
+ export declare const FUNCX_MIN_VERSION_FOR_ANALYZE_GATEWAY: "4.3.3";
20
+ export type { AnalyzeSkillRequestOptions, AnalyzeSkillRequestResult, BuildSkillRequestAnalysisPacketResult, SkillRequestAnalysisFinding, SkillRequestAnalysisReport, SkillRequestAnalysisVerdict, BuildTaskNodeRunTaskRequestArgs, BuildTaskNodeRunTaskRequestResult, ValidateTaskNodeRunTaskConfigArgs, ValidateTaskNodeRunTaskConfigResult, ValidateTaskNodeRunTaskInvokeArgs, ValidateTaskNodeRunTaskInvokeResult, };
21
+ export { buildTaskNodeRunTaskRequest, validateTaskNodeRunTaskConfig, validateTaskNodeRunTaskInvoke, pickRunSkillRequestFields, validateRunTaskConfig, validateRunTaskInvoke, analyzeExpectedRunTaskInput, checkExpectedInputAgainstRequest, analyzeSkillRequest, buildSkillRequestAnalysisPacket, formatSkillRequestAnalysisMarkdown, };
22
+ export type AnalyzeRunTaskRequestOptions = AnalyzeSkillRequestOptions & {
23
+ logger?: Logxer;
24
+ /** When true (default), merge validateRunTaskConfig into the analysis report. */
25
+ includeAiTasksConfigValidation?: boolean;
26
+ };
27
+ export type AnalyzeRunTaskRequestResult = AnalyzeSkillRequestResult & {
28
+ aiTasksConfigValidation?: {
29
+ ok: boolean;
30
+ issues: RunTaskValidationIssue[];
31
+ };
32
+ };
33
+ /** Preflight on a flat {@link RunSkillRequest} slice (Catalox templates + deterministic checks). */
34
+ export declare function analyzeRunSkillRequest(catalox: Catalox, skillRequest: Parameters<typeof analyzeSkillRequest>[1], options?: AnalyzeSkillRequestOptions & {
35
+ logger?: Logxer;
36
+ }): Promise<AnalyzeSkillRequestResult>;
37
+ /**
38
+ * Preflight for a graph-built or hand-authored {@link RunTaskRequest}.
39
+ * Does not invoke runTask, xynthesis, or the gateway.
40
+ */
41
+ export declare function analyzeRunTaskRequest(catalox: Catalox, request: RunTaskRequest, options?: AnalyzeRunTaskRequestOptions): Promise<AnalyzeRunTaskRequestResult>;
42
+ export type AnalyzeTaskNodeRunTaskRequestArgs = BuildTaskNodeRunTaskRequestArgs & {
43
+ catalox: Catalox;
44
+ analyzeOptions?: AnalyzeRunTaskRequestOptions;
45
+ };
46
+ export type AnalyzeTaskNodeRunTaskRequestResult = {
47
+ skipped: true;
48
+ skillKey: string;
49
+ reason: "local_skill" | "finalizer";
50
+ } | ({
51
+ skipped: false;
52
+ skillKey: string;
53
+ request: RunTaskRequest;
54
+ } & AnalyzeRunTaskRequestResult);
55
+ /** Build the same RunTaskRequest as graph-engine executeNode, then run studio preflight. */
56
+ export declare function analyzeTaskNodeRunTaskRequest(args: AnalyzeTaskNodeRunTaskRequestArgs): Promise<AnalyzeTaskNodeRunTaskRequestResult>;
57
+ export type ValidateTaskNodeRunTaskInvokeWithTemplatesArgs = ValidateTaskNodeRunTaskInvokeArgs & Omit<ValidateRunTaskInvokeParams, "request">;
58
+ /** validateTaskNodeRunTaskInvoke re-export with stable name for studio imports. */
59
+ export { validateTaskNodeRunTaskInvoke as validateTaskNodeRunTaskInvokeFromGraph };
60
+ //# sourceMappingURL=studioSkillInvokePreflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studioSkillInvokePreflight.d.ts","sourceRoot":"","sources":["../src/studioSkillInvokePreflight.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EACjC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,+BAA+B,EAC/B,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,EACnC,iCAAiC,EACjC,mCAAmC,EACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAChG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yEAAyE,CAAC;AAC1H,OAAO,EAAE,kCAAkC,EAAE,MAAM,4EAA4E,CAAC;AAChI,OAAO,KAAK,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,qCAAqC,EACrC,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,2CAA2C,CAAC;AAEnD,kFAAkF;AAClF,eAAO,MAAM,uCAAuC,EAClD,0CAAmD,CAAC;AAEtD,eAAO,MAAM,qCAAqC,EAAG,OAAgB,CAAC;AAEtE,YAAY,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,qCAAqC,EACrC,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,+BAA+B,EAC/B,iCAA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