@exellix/graph-composer 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +66 -0
- package/LICENSE +21 -0
- package/README.md +329 -0
- package/dist/aiTaskProfile.d.ts +66 -0
- package/dist/aiTaskProfile.d.ts.map +1 -0
- package/dist/aiTaskProfile.js +179 -0
- package/dist/canonicalGraphDocument.d.ts +8 -0
- package/dist/canonicalGraphDocument.d.ts.map +1 -0
- package/dist/canonicalGraphDocument.js +344 -0
- package/dist/canonicalGraphWarnings.d.ts +6 -0
- package/dist/canonicalGraphWarnings.d.ts.map +1 -0
- package/dist/canonicalGraphWarnings.js +140 -0
- package/dist/catalogMatchAssist.d.ts +20 -0
- package/dist/catalogMatchAssist.d.ts.map +1 -0
- package/dist/catalogMatchAssist.js +203 -0
- package/dist/cataloxCatalogBridge.d.ts +103 -0
- package/dist/cataloxCatalogBridge.d.ts.map +1 -0
- package/dist/cataloxCatalogBridge.js +222 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +43 -0
- package/dist/composeInstructions.d.ts +11 -0
- package/dist/composeInstructions.d.ts.map +1 -0
- package/dist/composeInstructions.js +39 -0
- package/dist/defaultUtilitySkills.d.ts +4 -0
- package/dist/defaultUtilitySkills.d.ts.map +1 -0
- package/dist/defaultUtilitySkills.js +5 -0
- package/dist/exampleGeneration.d.ts +15 -0
- package/dist/exampleGeneration.d.ts.map +1 -0
- package/dist/exampleGeneration.js +72 -0
- package/dist/exampleInputs.d.ts +12 -0
- package/dist/exampleInputs.d.ts.map +1 -0
- package/dist/exampleInputs.js +181 -0
- package/dist/graphComposerActions.d.ts +22 -0
- package/dist/graphComposerActions.d.ts.map +1 -0
- package/dist/graphComposerActions.js +168 -0
- package/dist/graphComposerAgent.d.ts +26 -0
- package/dist/graphComposerAgent.d.ts.map +1 -0
- package/dist/graphComposerAgent.js +175 -0
- package/dist/graphComposerOutputValidation.d.ts +23 -0
- package/dist/graphComposerOutputValidation.d.ts.map +1 -0
- package/dist/graphComposerOutputValidation.js +709 -0
- package/dist/graphConceptPatchMerge.d.ts +10 -0
- package/dist/graphConceptPatchMerge.d.ts.map +1 -0
- package/dist/graphConceptPatchMerge.js +40 -0
- package/dist/graphEngineBridge.d.ts +7 -0
- package/dist/graphEngineBridge.d.ts.map +1 -0
- package/dist/graphEngineBridge.js +5 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/openRouterConnectTimeout.d.ts +3 -0
- package/dist/openRouterConnectTimeout.d.ts.map +1 -0
- package/dist/openRouterConnectTimeout.js +48 -0
- package/dist/packDir.d.ts +7 -0
- package/dist/packDir.d.ts.map +1 -0
- package/dist/packDir.js +23 -0
- package/dist/parseGraphConceptStory.d.ts +21 -0
- package/dist/parseGraphConceptStory.d.ts.map +1 -0
- package/dist/parseGraphConceptStory.js +105 -0
- package/dist/redactForLog.d.ts +2 -0
- package/dist/redactForLog.d.ts.map +1 -0
- package/dist/redactForLog.js +37 -0
- package/dist/runGraphComposer.d.ts +54 -0
- package/dist/runGraphComposer.d.ts.map +1 -0
- package/dist/runGraphComposer.js +444 -0
- package/dist/scopingCatalogHostTypes.d.ts +28 -0
- package/dist/scopingCatalogHostTypes.d.ts.map +1 -0
- package/dist/scopingCatalogHostTypes.js +6 -0
- package/dist/scopingNeedMatchAssist.d.ts +14 -0
- package/dist/scopingNeedMatchAssist.d.ts.map +1 -0
- package/dist/scopingNeedMatchAssist.js +58 -0
- package/dist/taskNodeTaskVariable.d.ts +44 -0
- package/dist/taskNodeTaskVariable.d.ts.map +1 -0
- package/dist/taskNodeTaskVariable.js +347 -0
- package/dist/types.d.ts +174 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/examples/network-vuln-subnet-triage.v2.json +389 -0
- package/functions/graph-composer/meta.json +607 -0
- package/functions/graph-composer/prompts/README.md +46 -0
- package/functions/graph-composer/prompts/action-create.md +51 -0
- package/functions/graph-composer/prompts/action-explain.md +26 -0
- package/functions/graph-composer/prompts/action-modify.md +32 -0
- package/functions/graph-composer/prompts/action-review-concept.md +97 -0
- package/functions/graph-composer/prompts/action-suggest-catalog-creations.md +31 -0
- package/functions/graph-composer/prompts/action-suggest-catalog-resolution.md +42 -0
- package/functions/graph-composer/prompts/action-suggest-concept-objective.md +38 -0
- package/functions/graph-composer/prompts/action-suggest-scoping-map-creation.md +31 -0
- package/functions/graph-composer/prompts/action-suggest-scoping-need-match.md +25 -0
- package/functions/graph-composer/prompts/default-utility-skills.json +22 -0
- package/functions/graph-composer/prompts/judge-rules.md +30 -0
- package/functions/graph-composer/prompts/orchestrator-system.md +21 -0
- package/functions/graph-composer/prompts/shared/graph-format.md +124 -0
- package/functions/graph-composer/prompts/shared/request-context.md +12 -0
- package/functions/graph-composer/prompts/shared/skill-selection.md +6 -0
- package/functions/graph-composer/prompts/shared/structural-validation.md +19 -0
- package/functions/graph-composer/prompts/skill-catalog-ai-header.md +3 -0
- package/functions/graph-composer/prompts/skill-catalog-utility-header.md +3 -0
- package/functions/graph-composer/prompts/skill-mode-extensible.md +7 -0
- package/functions/graph-composer/prompts/skill-mode-locked.md +7 -0
- package/functions/graph-composer/test-cases.json +52 -0
- package/package.json +86 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GraphConceptPatchKey } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Drops patch keys listed in `onlyIfEmpty` when the existing graph already has
|
|
4
|
+
* a non-empty string at `metadata.graphConcept.<key>`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function applyGraphConceptPatchOnlyIfEmpty(patch: Record<string, unknown>, onlyIfEmpty: GraphConceptPatchKey[] | undefined, existingGraph: object): {
|
|
7
|
+
patch: Record<string, unknown>;
|
|
8
|
+
skipped: GraphConceptPatchKey[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=graphConceptPatchMerge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphConceptPatchMerge.d.ts","sourceRoot":"","sources":["../src/graphConceptPatchMerge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA+BvD;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,WAAW,EAAE,oBAAoB,EAAE,GAAG,SAAS,EAC/C,aAAa,EAAE,MAAM,GACpB;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAcrE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function readMetadataGraphConcept(existingGraph) {
|
|
2
|
+
const root = existingGraph;
|
|
3
|
+
const meta = root.metadata;
|
|
4
|
+
if (meta === null || meta === undefined || typeof meta !== "object") {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
const gc = meta.graphConcept;
|
|
8
|
+
if (gc === null ||
|
|
9
|
+
gc === undefined ||
|
|
10
|
+
typeof gc !== "object" ||
|
|
11
|
+
Array.isArray(gc)) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
return gc;
|
|
15
|
+
}
|
|
16
|
+
function graphConceptFieldNonEmpty(concept, key) {
|
|
17
|
+
if (!concept)
|
|
18
|
+
return false;
|
|
19
|
+
const v = concept[key];
|
|
20
|
+
return typeof v === "string" && v.trim().length > 0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Drops patch keys listed in `onlyIfEmpty` when the existing graph already has
|
|
24
|
+
* a non-empty string at `metadata.graphConcept.<key>`.
|
|
25
|
+
*/
|
|
26
|
+
export function applyGraphConceptPatchOnlyIfEmpty(patch, onlyIfEmpty, existingGraph) {
|
|
27
|
+
if (!onlyIfEmpty?.length) {
|
|
28
|
+
return { patch: { ...patch }, skipped: [] };
|
|
29
|
+
}
|
|
30
|
+
const concept = readMetadataGraphConcept(existingGraph);
|
|
31
|
+
const out = { ...patch };
|
|
32
|
+
const skipped = [];
|
|
33
|
+
for (const key of onlyIfEmpty) {
|
|
34
|
+
if (graphConceptFieldNonEmpty(concept, key) && key in out) {
|
|
35
|
+
delete out[key];
|
|
36
|
+
skipped.push(key);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return { patch: out, skipped };
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports from `@exellix/graph-engine` so hosts validate graphs with the same
|
|
3
|
+
* rules as runtime — do not fork gap codes or memory path allowlists here.
|
|
4
|
+
*/
|
|
5
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "@exellix/graph-engine";
|
|
6
|
+
export type { GraphEngineMemoryResolutionRoot } from "@exellix/graph-engine";
|
|
7
|
+
//# sourceMappingURL=graphEngineBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphEngineBridge.d.ts","sourceRoot":"","sources":["../src/graphEngineBridge.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,EACnC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,iCAAiC,EACjC,qDAAqD,GACtD,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports from `@exellix/graph-engine` so hosts validate graphs with the same
|
|
3
|
+
* rules as runtime — do not fork gap codes or memory path allowlists here.
|
|
4
|
+
*/
|
|
5
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "@exellix/graph-engine";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { composeInstructions, composeWorkerInstructions, formatSkillList, LOCKED_GATE_TEXT, EXTENSIBLE_GATE_TEXT, } from "./composeInstructions.js";
|
|
2
|
+
export { GRAPH_COMPOSER_ACTION_REGISTRY, getActionDefinition, getActionDefinitionByToolName, requiredPromptPathsFromRegistry, loadWorkerBaseMarkdown, type GraphComposerAction, type GraphComposerActionDefinition, } from "./graphComposerActions.js";
|
|
3
|
+
export { graphComposerPackRoot, readGraphComposerPromptFile, } from "./packDir.js";
|
|
4
|
+
export { DEFAULT_UTILITY_SKILLS } from "./defaultUtilitySkills.js";
|
|
5
|
+
export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, redactSecretsForLog, type RunGraphComposerOptions, } from "./runGraphComposer.js";
|
|
6
|
+
export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
|
|
7
|
+
export { runGraphComposerAgent, type GraphComposerAgentResult, type GraphComposerAgentOrchestrationStep, type RunGraphComposerAgentOptions, } from "./graphComposerAgent.js";
|
|
8
|
+
export type { GraphComposerInput, GraphComposerAgentInput, GraphComposerIntent, GraphComposerConstraints, SkillDescriptor, PrimaryIntentType, GraphConceptStatus, GraphConceptEntityBindings, GraphConceptPatch, GraphConceptPatchKey, GraphConceptRequirementsPatch, GraphConceptCoreTaskPatchItem, RequirementOptionCandidate, RequirementOptionEntry, CatalogCandidates, ScopingMapCandidate, NarrixTemplateCandidate, } from "./types.js";
|
|
9
|
+
export { buildCatalogMatchHints, type CatalogMatchAssistOptions, } from "./catalogMatchAssist.js";
|
|
10
|
+
export { buildScopingNeedMatchHints, type ScopingNeedMatchAssistOptions, } from "./scopingNeedMatchAssist.js";
|
|
11
|
+
export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, type OutputValidationContext, } from "./graphComposerOutputValidation.js";
|
|
12
|
+
export type { WoroxScopingMapCatalogCreatePayload, WoroxScopedDataDocumentShape, } from "./scopingCatalogHostTypes.js";
|
|
13
|
+
export { loadExampleGraph, inputExplainNetworkVulnSubnet, inputSuggestConceptObjectiveNetworkVulnSubnet, inputReviewConceptIoSmoke, } from "./exampleInputs.js";
|
|
14
|
+
export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generateJsonExample, generateMdExample, generateContentExample, type GenerateGraphJsonInputExampleParams, type GenerateJsonExampleResult, type GenerateMdExampleParams, type GenerateMdExampleResult, type GenerateContentExampleParams, type GenerateContentExampleResult, } from "./exampleGeneration.js";
|
|
15
|
+
export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
|
|
16
|
+
export type { ParsedGraphConcept } from "./parseGraphConceptStory.js";
|
|
17
|
+
export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, type AiTaskProfileMetadata, type TaskNodeProtocolGap, type TaskNodeProtocolIssueCode, type WebScopingNodeConfig, type InputSynthesisNodeConfig, type InputSynthesisDestination, } from "./aiTaskProfile.js";
|
|
18
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, type GraphEngineMemoryResolutionRoot, } from "./graphEngineBridge.js";
|
|
19
|
+
export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
|
|
20
|
+
export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, type TaskNodeInputsLayoutIssue, type TaskNodeInputsLayoutIssueCode, } from "./taskNodeTaskVariable.js";
|
|
21
|
+
export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
|
|
22
|
+
export type { CataloxContext, CataloxRuntimeConfig, } from "@x12i/catalox/embedder";
|
|
23
|
+
export { loadCatalogCandidatesFromCatalox, unifiedCatalogItemToSkillDescriptor, unifiedCatalogItemToScopingMapCandidate, unifiedCatalogItemToNarrixTemplateCandidate, type CataloxCatalogBridgeCatalogIds, type CataloxCatalogBridgeContextByKey, type CataloxCatalogBridgeListOptions, type CataloxCatalogBridgeAiItemMatch, type CataloxCatalogBridgeOptions, } from "./cataloxCatalogBridge.js";
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,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,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
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { composeInstructions, composeWorkerInstructions, formatSkillList, LOCKED_GATE_TEXT, EXTENSIBLE_GATE_TEXT, } from "./composeInstructions.js";
|
|
2
|
+
export { GRAPH_COMPOSER_ACTION_REGISTRY, getActionDefinition, getActionDefinitionByToolName, requiredPromptPathsFromRegistry, loadWorkerBaseMarkdown, } from "./graphComposerActions.js";
|
|
3
|
+
export { graphComposerPackRoot, readGraphComposerPromptFile, } from "./packDir.js";
|
|
4
|
+
export { DEFAULT_UTILITY_SKILLS } from "./defaultUtilitySkills.js";
|
|
5
|
+
export { runGraphComposer, runGraphWorker, resolveGraphComposerClient, getGraphComposerLlmClient, getPackDir, normalizeGraphComposerExplainOutput, normalizeReviewConceptComposerOutput, redactSecretsForLog, } from "./runGraphComposer.js";
|
|
6
|
+
export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
|
|
7
|
+
export { runGraphComposerAgent, } from "./graphComposerAgent.js";
|
|
8
|
+
export { buildCatalogMatchHints, } from "./catalogMatchAssist.js";
|
|
9
|
+
export { buildScopingNeedMatchHints, } from "./scopingNeedMatchAssist.js";
|
|
10
|
+
export { validateCreateModifyOutput, validateSuggestCatalogResolutionOutput, validateSuggestCatalogCreationsOutput, validateSuggestScopingNeedMatchOutput, validateSuggestScopingMapCreationOutput, validateReviewConceptOutput, validateReviewConceptOutputAgainstInput, } from "./graphComposerOutputValidation.js";
|
|
11
|
+
export { loadExampleGraph, inputExplainNetworkVulnSubnet, inputSuggestConceptObjectiveNetworkVulnSubnet, inputReviewConceptIoSmoke, } from "./exampleInputs.js";
|
|
12
|
+
export { buildGraphInputExampleGuidance, generateGraphJsonInputExample, generateJsonExample, generateMdExample, generateContentExample, } from "./exampleGeneration.js";
|
|
13
|
+
export { parseGraphConceptStory, parseGraphConceptStoryBody, isGraphConceptStoryDescription, GRAPH_CONCEPT_STORY_MARKER, } from "./parseGraphConceptStory.js";
|
|
14
|
+
export { reportTaskNodeProtocolGaps, DEFAULT_LOCAL_SKILL_KEYS, } from "./aiTaskProfile.js";
|
|
15
|
+
export { assertCanonicalGraphDocument, getCanonicalGraphDocumentViolations, CANONICAL_GRAPH_TOP_LEVEL_KEYS, GRAPH_ENGINE_MEMORY_PATH_ROOTS, isAllowedGraphEngineMemoryPath, collectAiTasksNodeExtensionIssues, assertAiTasksNodeExtensionsValid, resolveGraphEngineMemoryPathValue, buildGraphEngineMemoryResolutionRootFromWorkingMemory, } from "./graphEngineBridge.js";
|
|
16
|
+
export { collectCanonicalGraphWarnings } from "./canonicalGraphWarnings.js";
|
|
17
|
+
export { resolveTaskNodeInputs, resolveTaskNodeInputsConfig, resolveTaskNodeTaskVariable, canonicalizeGraphTaskNodeTaskVariable, canonicalizeGraphModel, reportTaskNodeInputsLayoutIssues, taskNodeInputsLayoutWarningMessage, isTaskVariablePathRef, isTaskNode, isFinalizerNode, } from "./taskNodeTaskVariable.js";
|
|
18
|
+
export { createCatalox, bindCataloxContext, Catalox, CataloxBound, } from "@x12i/catalox/embedder";
|
|
19
|
+
export { loadCatalogCandidatesFromCatalox, unifiedCatalogItemToSkillDescriptor, unifiedCatalogItemToScopingMapCandidate, unifiedCatalogItemToNarrixTemplateCandidate, } from "./cataloxCatalogBridge.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Run `fn` with undici connect timeout (ms) applied to `fetch` in this async context. */
|
|
2
|
+
export declare function runWithOpenRouterConnectTimeout<T>(connectTimeoutMs: number | undefined, fn: () => Promise<T>): Promise<T>;
|
|
3
|
+
//# sourceMappingURL=openRouterConnectTimeout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openRouterConnectTimeout.d.ts","sourceRoot":"","sources":["../src/openRouterConnectTimeout.ts"],"names":[],"mappings":"AAgDA,0FAA0F;AAC1F,wBAAgB,+BAA+B,CAAC,CAAC,EAC/C,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAIZ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { Agent } from "undici";
|
|
3
|
+
function initHasDispatcher(init) {
|
|
4
|
+
return (init !== undefined &&
|
|
5
|
+
typeof init === "object" &&
|
|
6
|
+
"dispatcher" in init &&
|
|
7
|
+
init.dispatcher !== undefined);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Node's global `fetch` (undici) defaults to a 10s TCP connect timeout, separate from
|
|
11
|
+
* request/response `timeoutMs` in aifunctions-js. Until that library forwards connect
|
|
12
|
+
* options, we attach an undici `Agent` with a higher `connectTimeout` for the duration
|
|
13
|
+
* of `runGraphComposer` via AsyncLocalStorage-scoped `fetch` wrapping.
|
|
14
|
+
*/
|
|
15
|
+
const connectTimeoutMsAls = new AsyncLocalStorage();
|
|
16
|
+
const agentByMs = new Map();
|
|
17
|
+
function agentFor(ms) {
|
|
18
|
+
let a = agentByMs.get(ms);
|
|
19
|
+
if (!a) {
|
|
20
|
+
a = new Agent({ connectTimeout: ms });
|
|
21
|
+
agentByMs.set(ms, a);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
let installed = false;
|
|
26
|
+
const innerFetch = globalThis.fetch.bind(globalThis);
|
|
27
|
+
function installFetchWrapper() {
|
|
28
|
+
if (installed)
|
|
29
|
+
return;
|
|
30
|
+
installed = true;
|
|
31
|
+
globalThis.fetch = ((input, init) => {
|
|
32
|
+
const ms = connectTimeoutMsAls.getStore();
|
|
33
|
+
if (ms === undefined || initHasDispatcher(init)) {
|
|
34
|
+
return innerFetch(input, init);
|
|
35
|
+
}
|
|
36
|
+
return innerFetch(input, {
|
|
37
|
+
...init,
|
|
38
|
+
dispatcher: agentFor(ms),
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Run `fn` with undici connect timeout (ms) applied to `fetch` in this async context. */
|
|
43
|
+
export function runWithOpenRouterConnectTimeout(connectTimeoutMs, fn) {
|
|
44
|
+
if (connectTimeoutMs === undefined)
|
|
45
|
+
return fn();
|
|
46
|
+
installFetchWrapper();
|
|
47
|
+
return connectTimeoutMsAls.run(connectTimeoutMs, fn);
|
|
48
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Root of the shipped `functions/graph-composer` pack (contains `prompts/`, `meta.json`, …). */
|
|
2
|
+
export declare function graphComposerPackRoot(): string;
|
|
3
|
+
/** Read a file from `functions/graph-composer/prompts/`. */
|
|
4
|
+
export declare function readGraphComposerPromptFile(name: string): string;
|
|
5
|
+
/** First fenced ``` / ```json block in markdown (trimmed inner text). */
|
|
6
|
+
export declare function extractFirstFencedJsonBlock(markdown: string): string;
|
|
7
|
+
//# sourceMappingURL=packDir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packDir.d.ts","sourceRoot":"","sources":["../src/packDir.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,wBAAgB,qBAAqB,IAAI,MAAM,CAM9C;AAED,4DAA4D;AAC5D,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED,yEAAyE;AACzE,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMpE"}
|
package/dist/packDir.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
/** Root of the shipped `functions/graph-composer` pack (contains `prompts/`, `meta.json`, …). */
|
|
5
|
+
export function graphComposerPackRoot() {
|
|
6
|
+
return path.join(fileURLToPath(new URL("..", import.meta.url)), "functions", "graph-composer");
|
|
7
|
+
}
|
|
8
|
+
/** Read a file from `functions/graph-composer/prompts/`. */
|
|
9
|
+
export function readGraphComposerPromptFile(name) {
|
|
10
|
+
const p = path.join(graphComposerPackRoot(), "prompts", name);
|
|
11
|
+
if (!existsSync(p)) {
|
|
12
|
+
throw new Error(`Missing pack prompt file: ${p}`);
|
|
13
|
+
}
|
|
14
|
+
return readFileSync(p, "utf-8");
|
|
15
|
+
}
|
|
16
|
+
/** First fenced ``` / ```json block in markdown (trimmed inner text). */
|
|
17
|
+
export function extractFirstFencedJsonBlock(markdown) {
|
|
18
|
+
const m = markdown.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
19
|
+
if (!m) {
|
|
20
|
+
throw new Error("No fenced ```json block found in markdown");
|
|
21
|
+
}
|
|
22
|
+
return m[1].trim();
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic parser for the "graph concept story" text format used in
|
|
3
|
+
* intent.description (marker line + key: value lines and multiline "|" blocks).
|
|
4
|
+
*/
|
|
5
|
+
/** Structured concept fields produced by {@link parseGraphConceptStory}. */
|
|
6
|
+
export type ParsedGraphConcept = Record<string, unknown>;
|
|
7
|
+
/** Match a line that starts the graph concept story section. */
|
|
8
|
+
export declare const GRAPH_CONCEPT_STORY_MARKER: RegExp;
|
|
9
|
+
/** True when `text` contains a graph concept story marker line. */
|
|
10
|
+
export declare function isGraphConceptStoryDescription(text: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Parse graph concept story body (comments should already be stripped, or use
|
|
13
|
+
* {@link parseGraphConceptStory} which strips full-line `#` comments).
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseGraphConceptStoryBody(text: string): ParsedGraphConcept;
|
|
16
|
+
/**
|
|
17
|
+
* Strip full-line `#` comments, then parse key / multiline `|` blocks into a
|
|
18
|
+
* flat object plus `coreTasks` array entries merged from `coreTasks.N.field` keys.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseGraphConceptStory(text: string): ParsedGraphConcept;
|
|
21
|
+
//# sourceMappingURL=parseGraphConceptStory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseGraphConceptStory.d.ts","sourceRoot":"","sources":["../src/parseGraphConceptStory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,gEAAgE;AAChE,eAAO,MAAM,0BAA0B,QAAoC,CAAC;AAE5E,mEAAmE;AACnE,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKpE;AA0CD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAmD3E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEvE"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic parser for the "graph concept story" text format used in
|
|
3
|
+
* intent.description (marker line + key: value lines and multiline "|" blocks).
|
|
4
|
+
*/
|
|
5
|
+
/** Match a line that starts the graph concept story section. */
|
|
6
|
+
export const GRAPH_CONCEPT_STORY_MARKER = /^\s*#\s*graphConcept\s+story\b/i;
|
|
7
|
+
/** True when `text` contains a graph concept story marker line. */
|
|
8
|
+
export function isGraphConceptStoryDescription(text) {
|
|
9
|
+
for (const line of text.split(/\r?\n/)) {
|
|
10
|
+
if (GRAPH_CONCEPT_STORY_MARKER.test(line))
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
/** Line looks like `key:` or `key: rest` (key may contain dots). */
|
|
16
|
+
const KEY_LINE_RE = /^([a-zA-Z_][\w.]*):\s*(.*)$/;
|
|
17
|
+
function stripFullLineComments(text) {
|
|
18
|
+
return text
|
|
19
|
+
.split(/\r?\n/)
|
|
20
|
+
.filter((line) => {
|
|
21
|
+
const t = line.trim();
|
|
22
|
+
return t.length === 0 || !t.startsWith("#");
|
|
23
|
+
})
|
|
24
|
+
.join("\n");
|
|
25
|
+
}
|
|
26
|
+
function looksLikeKeyLine(trimmed) {
|
|
27
|
+
return KEY_LINE_RE.test(trimmed);
|
|
28
|
+
}
|
|
29
|
+
function assignValue(out, fullKey, value) {
|
|
30
|
+
const m = /^coreTasks\.(\d+)\.(.+)$/.exec(fullKey);
|
|
31
|
+
if (m) {
|
|
32
|
+
const idx = parseInt(m[1], 10);
|
|
33
|
+
const field = m[2];
|
|
34
|
+
let arr = out.coreTasks;
|
|
35
|
+
if (!Array.isArray(arr)) {
|
|
36
|
+
arr = [];
|
|
37
|
+
out.coreTasks = arr;
|
|
38
|
+
}
|
|
39
|
+
const a = arr;
|
|
40
|
+
while (a.length <= idx)
|
|
41
|
+
a.push({});
|
|
42
|
+
const prev = a[idx] ?? {};
|
|
43
|
+
a[idx] = { ...prev, [field]: value };
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
out[fullKey] = value;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Parse graph concept story body (comments should already be stripped, or use
|
|
50
|
+
* {@link parseGraphConceptStory} which strips full-line `#` comments).
|
|
51
|
+
*/
|
|
52
|
+
export function parseGraphConceptStoryBody(text) {
|
|
53
|
+
const lines = text.split(/\r?\n/);
|
|
54
|
+
const out = {};
|
|
55
|
+
let i = 0;
|
|
56
|
+
while (i < lines.length) {
|
|
57
|
+
const raw = lines[i];
|
|
58
|
+
const trimmed = raw.trim();
|
|
59
|
+
if (trimmed.length === 0) {
|
|
60
|
+
i += 1;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const km = KEY_LINE_RE.exec(trimmed);
|
|
64
|
+
if (!km) {
|
|
65
|
+
i += 1;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const key = km[1];
|
|
69
|
+
const restRaw = km[2];
|
|
70
|
+
const inline = restRaw.trim();
|
|
71
|
+
i += 1;
|
|
72
|
+
if (inline.length > 0) {
|
|
73
|
+
assignValue(out, key, inline);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (i >= lines.length) {
|
|
77
|
+
assignValue(out, key, "");
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const nextTrim = lines[i].trim();
|
|
81
|
+
if (nextTrim === "|") {
|
|
82
|
+
i += 1;
|
|
83
|
+
const bodyLines = [];
|
|
84
|
+
while (i < lines.length) {
|
|
85
|
+
const lt = lines[i].trim();
|
|
86
|
+
if (looksLikeKeyLine(lt))
|
|
87
|
+
break;
|
|
88
|
+
bodyLines.push(lines[i]);
|
|
89
|
+
i += 1;
|
|
90
|
+
}
|
|
91
|
+
assignValue(out, key, bodyLines.join("\n").replace(/\s+$/, ""));
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
assignValue(out, key, "");
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Strip full-line `#` comments, then parse key / multiline `|` blocks into a
|
|
101
|
+
* flat object plus `coreTasks` array entries merged from `coreTasks.N.field` keys.
|
|
102
|
+
*/
|
|
103
|
+
export function parseGraphConceptStory(text) {
|
|
104
|
+
return parseGraphConceptStoryBody(stripFullLineComments(text));
|
|
105
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redactForLog.d.ts","sourceRoot":"","sources":["../src/redactForLog.ts"],"names":[],"mappings":"AAgBA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAoB3D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-clone plain JSON-like trees and replace values for sensitive-looking keys
|
|
3
|
+
* so request/response payloads can be logged safely.
|
|
4
|
+
*/
|
|
5
|
+
function shouldRedactKey(key) {
|
|
6
|
+
const k = key.toLowerCase();
|
|
7
|
+
return (k.includes("apikey") ||
|
|
8
|
+
k.includes("openrouterapikey") ||
|
|
9
|
+
k === "authorization" ||
|
|
10
|
+
k.includes("password") ||
|
|
11
|
+
k === "token" ||
|
|
12
|
+
k.includes("secret"));
|
|
13
|
+
}
|
|
14
|
+
export function redactSecretsForLog(value) {
|
|
15
|
+
if (value === null || value === undefined)
|
|
16
|
+
return value;
|
|
17
|
+
const t = typeof value;
|
|
18
|
+
if (t === "string" || t === "number" || t === "boolean")
|
|
19
|
+
return value;
|
|
20
|
+
if (Array.isArray(value)) {
|
|
21
|
+
return value.map((x) => redactSecretsForLog(x));
|
|
22
|
+
}
|
|
23
|
+
if (t === "object") {
|
|
24
|
+
const o = value;
|
|
25
|
+
const out = {};
|
|
26
|
+
for (const [k, v] of Object.entries(o)) {
|
|
27
|
+
if (shouldRedactKey(k)) {
|
|
28
|
+
out[k] = "[redacted]";
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
out[k] = redactSecretsForLog(v);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return out;
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Client } from "@x12i/funcx";
|
|
2
|
+
import { type LlmMode } from "@x12i/funcx/functions";
|
|
3
|
+
import type { GraphComposerInput } from "./types.js";
|
|
4
|
+
import { redactSecretsForLog } from "./redactForLog.js";
|
|
5
|
+
export { redactSecretsForLog };
|
|
6
|
+
export { applyGraphConceptPatchOnlyIfEmpty } from "./graphConceptPatchMerge.js";
|
|
7
|
+
/**
|
|
8
|
+
* Maps `suggestedCatalogArtifacts` to `catalogProposals` when the latter is empty
|
|
9
|
+
* or missing (consumer contract alias). No-op for other actions.
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeReviewConceptComposerOutput(out: Record<string, unknown>): void;
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeGraphComposerExplainOutput(result: unknown): unknown;
|
|
16
|
+
export type RunGraphComposerOptions = {
|
|
17
|
+
client?: Client;
|
|
18
|
+
/**
|
|
19
|
+
* When true (default), `suggestCatalog*` actions with `catalogCandidates` may run
|
|
20
|
+
* `matchLists` pre-pass and inject `catalogMatchHints` into the worker prompt.
|
|
21
|
+
*/
|
|
22
|
+
catalogMatchListsAssist?: boolean;
|
|
23
|
+
/** When set, wraps the OpenRouter client so each `ask` uses at least this timeout (ms). */
|
|
24
|
+
askTimeoutMs?: number;
|
|
25
|
+
/**
|
|
26
|
+
* TCP/TLS connect timeout for OpenRouter (ms), forwarded to @x12i/funcx
|
|
27
|
+
* `createClient({ openrouter: { connectTimeoutMs } })` when this package creates the client.
|
|
28
|
+
* If you pass `client`, set `connectTimeoutMs` on your own `createClient` instead; this field is then ignored.
|
|
29
|
+
*/
|
|
30
|
+
connectTimeoutMs?: number;
|
|
31
|
+
mode?: LlmMode;
|
|
32
|
+
model?: string;
|
|
33
|
+
temperature?: number;
|
|
34
|
+
maxTokens?: number;
|
|
35
|
+
/**
|
|
36
|
+
* When true, `reviewConcept` logs redacted serialized request and raw LLM result at `info`.
|
|
37
|
+
* When false (default), the same traces use `debug` (enable via `GRAPH_COMPOSER_LOGS_LEVEL=debug`).
|
|
38
|
+
*/
|
|
39
|
+
traceReviewConceptIo?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export declare function resolveGraphComposerClient(options: RunGraphComposerOptions): Client | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Returns a concrete OpenRouter client for flows that require `client.ask` (e.g. orchestrator).
|
|
44
|
+
* Unlike `resolveGraphComposerClient`, this always returns a `Client` when OpenRouter is configured.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getGraphComposerLlmClient(options?: RunGraphComposerOptions): Client;
|
|
47
|
+
/**
|
|
48
|
+
* Run a single graph-composer worker (`intent.action`) with the per-action system prompt.
|
|
49
|
+
* Shared by `runGraphComposer` and `runGraphComposerAgent`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function runGraphWorker(input: GraphComposerInput, options?: RunGraphComposerOptions): Promise<unknown>;
|
|
52
|
+
export declare function runGraphComposer(input: GraphComposerInput, options?: RunGraphComposerOptions): Promise<unknown>;
|
|
53
|
+
export declare function getPackDir(): string;
|
|
54
|
+
//# sourceMappingURL=runGraphComposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runGraphComposer.d.ts","sourceRoot":"","sources":["../src/runGraphComposer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAIL,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAC;AAc/B,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAsHhF;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,IAAI,CASN;AAuDD;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,OAAO,GACd,OAAO,CAKT;AA0ED,MAAM,MAAM,uBAAuB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