@uluops/core 0.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 (167) hide show
  1. package/README.md +543 -0
  2. package/definitions/starter/code-validator.agent.yaml +134 -0
  3. package/definitions/starter/docs-validator.agent.yaml +142 -0
  4. package/definitions/starter/public-interface-validator.agent.yaml +138 -0
  5. package/definitions/starter/security-analyst.agent.yaml +144 -0
  6. package/definitions/starter/test-architect.agent.yaml +137 -0
  7. package/dist/ai/AIProvider.d.ts +198 -0
  8. package/dist/ai/AIProvider.d.ts.map +1 -0
  9. package/dist/ai/AIProvider.js +557 -0
  10. package/dist/ai/AIProvider.js.map +1 -0
  11. package/dist/ai/ModelCatalog.d.ts +78 -0
  12. package/dist/ai/ModelCatalog.d.ts.map +1 -0
  13. package/dist/ai/ModelCatalog.js +193 -0
  14. package/dist/ai/ModelCatalog.js.map +1 -0
  15. package/dist/ai/ShellExecutor.d.ts +42 -0
  16. package/dist/ai/ShellExecutor.d.ts.map +1 -0
  17. package/dist/ai/ShellExecutor.js +62 -0
  18. package/dist/ai/ShellExecutor.js.map +1 -0
  19. package/dist/ai/TokenBudgetTracker.d.ts +49 -0
  20. package/dist/ai/TokenBudgetTracker.d.ts.map +1 -0
  21. package/dist/ai/TokenBudgetTracker.js +61 -0
  22. package/dist/ai/TokenBudgetTracker.js.map +1 -0
  23. package/dist/ai/ToolAdapter.d.ts +25 -0
  24. package/dist/ai/ToolAdapter.d.ts.map +1 -0
  25. package/dist/ai/ToolAdapter.js +135 -0
  26. package/dist/ai/ToolAdapter.js.map +1 -0
  27. package/dist/ai/index.d.ts +6 -0
  28. package/dist/ai/index.d.ts.map +1 -0
  29. package/dist/ai/index.js +4 -0
  30. package/dist/ai/index.js.map +1 -0
  31. package/dist/client/UluOpsClient.d.ts +111 -0
  32. package/dist/client/UluOpsClient.d.ts.map +1 -0
  33. package/dist/client/UluOpsClient.js +329 -0
  34. package/dist/client/UluOpsClient.js.map +1 -0
  35. package/dist/constants.d.ts +6 -0
  36. package/dist/constants.d.ts.map +1 -0
  37. package/dist/constants.js +9 -0
  38. package/dist/constants.js.map +1 -0
  39. package/dist/errors/UluOpsError.d.ts +10 -0
  40. package/dist/errors/UluOpsError.d.ts.map +1 -0
  41. package/dist/errors/UluOpsError.js +13 -0
  42. package/dist/errors/UluOpsError.js.map +1 -0
  43. package/dist/errors/index.d.ts +64 -0
  44. package/dist/errors/index.d.ts.map +1 -0
  45. package/dist/errors/index.js +93 -0
  46. package/dist/errors/index.js.map +1 -0
  47. package/dist/executor/AgentExecutor.d.ts +57 -0
  48. package/dist/executor/AgentExecutor.d.ts.map +1 -0
  49. package/dist/executor/AgentExecutor.js +331 -0
  50. package/dist/executor/AgentExecutor.js.map +1 -0
  51. package/dist/executor/CommandExecutor.d.ts +33 -0
  52. package/dist/executor/CommandExecutor.d.ts.map +1 -0
  53. package/dist/executor/CommandExecutor.js +183 -0
  54. package/dist/executor/CommandExecutor.js.map +1 -0
  55. package/dist/executor/PipelineExecutor.d.ts +55 -0
  56. package/dist/executor/PipelineExecutor.d.ts.map +1 -0
  57. package/dist/executor/PipelineExecutor.js +273 -0
  58. package/dist/executor/PipelineExecutor.js.map +1 -0
  59. package/dist/executor/ToolHandler.d.ts +47 -0
  60. package/dist/executor/ToolHandler.d.ts.map +1 -0
  61. package/dist/executor/ToolHandler.js +615 -0
  62. package/dist/executor/ToolHandler.js.map +1 -0
  63. package/dist/executor/WorkflowExecutor.d.ts +55 -0
  64. package/dist/executor/WorkflowExecutor.d.ts.map +1 -0
  65. package/dist/executor/WorkflowExecutor.js +368 -0
  66. package/dist/executor/WorkflowExecutor.js.map +1 -0
  67. package/dist/executor/preflight.d.ts +8 -0
  68. package/dist/executor/preflight.d.ts.map +1 -0
  69. package/dist/executor/preflight.js +102 -0
  70. package/dist/executor/preflight.js.map +1 -0
  71. package/dist/executor/symbols.d.ts +13 -0
  72. package/dist/executor/symbols.d.ts.map +1 -0
  73. package/dist/executor/symbols.js +102 -0
  74. package/dist/executor/symbols.js.map +1 -0
  75. package/dist/index.d.ts +32 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +25 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/parser/OutputExtractor.d.ts +52 -0
  80. package/dist/parser/OutputExtractor.d.ts.map +1 -0
  81. package/dist/parser/OutputExtractor.js +818 -0
  82. package/dist/parser/OutputExtractor.js.map +1 -0
  83. package/dist/parser/outputSchemas.d.ts +223 -0
  84. package/dist/parser/outputSchemas.d.ts.map +1 -0
  85. package/dist/parser/outputSchemas.js +73 -0
  86. package/dist/parser/outputSchemas.js.map +1 -0
  87. package/dist/registry/RegistryClient.d.ts +75 -0
  88. package/dist/registry/RegistryClient.d.ts.map +1 -0
  89. package/dist/registry/RegistryClient.js +419 -0
  90. package/dist/registry/RegistryClient.js.map +1 -0
  91. package/dist/registry/index.d.ts +2 -0
  92. package/dist/registry/index.d.ts.map +1 -0
  93. package/dist/registry/index.js +2 -0
  94. package/dist/registry/index.js.map +1 -0
  95. package/dist/types/agent.d.ts +406 -0
  96. package/dist/types/agent.d.ts.map +1 -0
  97. package/dist/types/agent.js +2 -0
  98. package/dist/types/agent.js.map +1 -0
  99. package/dist/types/ai.d.ts +14 -0
  100. package/dist/types/ai.d.ts.map +1 -0
  101. package/dist/types/ai.js +2 -0
  102. package/dist/types/ai.js.map +1 -0
  103. package/dist/types/command.d.ts +153 -0
  104. package/dist/types/command.d.ts.map +1 -0
  105. package/dist/types/command.js +2 -0
  106. package/dist/types/command.js.map +1 -0
  107. package/dist/types/config.d.ts +136 -0
  108. package/dist/types/config.d.ts.map +1 -0
  109. package/dist/types/config.js +2 -0
  110. package/dist/types/config.js.map +1 -0
  111. package/dist/types/execution.d.ts +172 -0
  112. package/dist/types/execution.d.ts.map +1 -0
  113. package/dist/types/execution.js +2 -0
  114. package/dist/types/execution.js.map +1 -0
  115. package/dist/types/index.d.ts +12 -0
  116. package/dist/types/index.d.ts.map +1 -0
  117. package/dist/types/index.js +2 -0
  118. package/dist/types/index.js.map +1 -0
  119. package/dist/types/parser.d.ts +75 -0
  120. package/dist/types/parser.d.ts.map +1 -0
  121. package/dist/types/parser.js +2 -0
  122. package/dist/types/parser.js.map +1 -0
  123. package/dist/types/pipeline.d.ts +155 -0
  124. package/dist/types/pipeline.d.ts.map +1 -0
  125. package/dist/types/pipeline.js +2 -0
  126. package/dist/types/pipeline.js.map +1 -0
  127. package/dist/types/registry.d.ts +232 -0
  128. package/dist/types/registry.d.ts.map +1 -0
  129. package/dist/types/registry.js +2 -0
  130. package/dist/types/registry.js.map +1 -0
  131. package/dist/types/tools.d.ts +29 -0
  132. package/dist/types/tools.d.ts.map +1 -0
  133. package/dist/types/tools.js +2 -0
  134. package/dist/types/tools.js.map +1 -0
  135. package/dist/types/validation.d.ts +237 -0
  136. package/dist/types/validation.d.ts.map +1 -0
  137. package/dist/types/validation.js +2 -0
  138. package/dist/types/validation.js.map +1 -0
  139. package/dist/types/workflow.d.ts +131 -0
  140. package/dist/types/workflow.d.ts.map +1 -0
  141. package/dist/types/workflow.js +2 -0
  142. package/dist/types/workflow.js.map +1 -0
  143. package/dist/utils/formatError.d.ts +6 -0
  144. package/dist/utils/formatError.d.ts.map +1 -0
  145. package/dist/utils/formatError.js +10 -0
  146. package/dist/utils/formatError.js.map +1 -0
  147. package/dist/utils/parseRef.d.ts +11 -0
  148. package/dist/utils/parseRef.d.ts.map +1 -0
  149. package/dist/utils/parseRef.js +16 -0
  150. package/dist/utils/parseRef.js.map +1 -0
  151. package/dist/utils/sumTokenMetrics.d.ts +9 -0
  152. package/dist/utils/sumTokenMetrics.d.ts.map +1 -0
  153. package/dist/utils/sumTokenMetrics.js +20 -0
  154. package/dist/utils/sumTokenMetrics.js.map +1 -0
  155. package/dist/utils/topoSort.d.ts +24 -0
  156. package/dist/utils/topoSort.d.ts.map +1 -0
  157. package/dist/utils/topoSort.js +60 -0
  158. package/dist/utils/topoSort.js.map +1 -0
  159. package/dist/validation/ValidationClient.d.ts +51 -0
  160. package/dist/validation/ValidationClient.d.ts.map +1 -0
  161. package/dist/validation/ValidationClient.js +179 -0
  162. package/dist/validation/ValidationClient.js.map +1 -0
  163. package/dist/validation/index.d.ts +2 -0
  164. package/dist/validation/index.d.ts.map +1 -0
  165. package/dist/validation/index.js +2 -0
  166. package/dist/validation/index.js.map +1 -0
  167. package/package.json +76 -0
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Symbol extraction from source files.
3
+ * Extracts exported/private functions, classes, interfaces, types, constants.
4
+ */
5
+ export function extractSymbols(lines, ext, includePrivate) {
6
+ const symbols = [];
7
+ const isTS = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'].includes(ext);
8
+ const isPython = ext === '.py';
9
+ if (isTS) {
10
+ extractTSSymbols(lines, symbols);
11
+ }
12
+ else if (isPython) {
13
+ extractPythonSymbols(lines, symbols);
14
+ }
15
+ if (!includePrivate) {
16
+ return symbols.filter((s) => s.exported);
17
+ }
18
+ return symbols;
19
+ }
20
+ function extractTSSymbols(lines, symbols) {
21
+ const patterns = [
22
+ { regex: /^export\s+(async\s+)?function\s+(\w+)/, type: 'function' },
23
+ { regex: /^export\s+class\s+(\w+)/, type: 'class' },
24
+ { regex: /^export\s+interface\s+(\w+)/, type: 'interface' },
25
+ { regex: /^export\s+type\s+(\w+)/, type: 'type' },
26
+ { regex: /^export\s+(?:const|let|var)\s+(\w+)/, type: 'const' },
27
+ { regex: /^export\s+enum\s+(\w+)/, type: 'enum' },
28
+ { regex: /^export\s+default\s+(?:class|function)\s*(\w*)/, type: 'default' },
29
+ // Non-exported
30
+ { regex: /^(?:async\s+)?function\s+(\w+)/, type: 'function' },
31
+ { regex: /^class\s+(\w+)/, type: 'class' },
32
+ { regex: /^interface\s+(\w+)/, type: 'interface' },
33
+ { regex: /^type\s+(\w+)/, type: 'type' },
34
+ { regex: /^(?:const|let|var)\s+(\w+)/, type: 'const' },
35
+ { regex: /^enum\s+(\w+)/, type: 'enum' },
36
+ ];
37
+ for (let i = 0; i < lines.length; i++) {
38
+ const line = lines[i].trim();
39
+ for (const p of patterns) {
40
+ const match = p.regex.exec(line);
41
+ if (match) {
42
+ const exported = line.startsWith('export');
43
+ // For function patterns with async, name is in group 2 for exported, else group 1
44
+ let name;
45
+ if (p.type === 'function' && exported) {
46
+ name = match[2] ?? match[1] ?? '';
47
+ }
48
+ else {
49
+ name = match[1] ?? '';
50
+ }
51
+ if (!name)
52
+ continue;
53
+ // Build signature for functions
54
+ let signature;
55
+ if (p.type === 'function') {
56
+ // Capture up to closing paren and return type
57
+ const sigMatch = /function\s+\w+\s*(\([^)]*\)(?:\s*:\s*\S+)?)/.exec(line);
58
+ if (sigMatch) {
59
+ signature = `${name}${sigMatch[1]}`;
60
+ }
61
+ }
62
+ symbols.push({
63
+ type: p.type,
64
+ name,
65
+ line: i + 1,
66
+ exported,
67
+ ...(signature ? { signature } : {}),
68
+ });
69
+ break; // Only match first pattern per line
70
+ }
71
+ }
72
+ }
73
+ }
74
+ function extractPythonSymbols(lines, symbols) {
75
+ for (let i = 0; i < lines.length; i++) {
76
+ const line = lines[i];
77
+ // Top-level functions (no indentation)
78
+ const funcMatch = /^(async\s+)?def\s+(\w+)\s*\(([^)]*)\)/.exec(line);
79
+ if (funcMatch) {
80
+ const name = funcMatch[2];
81
+ symbols.push({
82
+ type: 'function',
83
+ name,
84
+ line: i + 1,
85
+ exported: !name.startsWith('_'),
86
+ signature: `${name}(${funcMatch[3]})`,
87
+ });
88
+ continue;
89
+ }
90
+ // Top-level classes (no indentation)
91
+ const classMatch = /^class\s+(\w+)/.exec(line);
92
+ if (classMatch) {
93
+ symbols.push({
94
+ type: 'class',
95
+ name: classMatch[1],
96
+ line: i + 1,
97
+ exported: !classMatch[1].startsWith('_'),
98
+ });
99
+ }
100
+ }
101
+ }
102
+ //# sourceMappingURL=symbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.js","sourceRoot":"","sources":["../../src/executor/sym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AC;QAC/C,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,UAAU,CAAC,CAAC,CAAE;gBACpB,IAAI,EAAE,CAAC,GAAG,CAAC;gBACX,QAAQ,EAAE,CAAC,UAAU,CAAC,CAAC,CAAE,CAAC,UAAU,CAAC,GAAG,CAAC;aAC1C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,32 @@
1
+ export { UluOpsClient } from './client/UluOpsClient.js';
2
+ export { AgentExecutor } from './executor/AgentExecutor.js';
3
+ export { CommandExecutor } from './executor/CommandExecutor.js';
4
+ export { WorkflowExecutor } from './executor/WorkflowExecutor.js';
5
+ export { PipelineExecutor } from './executor/PipelineExecutor.js';
6
+ export { RegistryClient } from './registry/RegistryClient.js';
7
+ export { ValidationClient } from './validation/ValidationClient.js';
8
+ export { AIProvider } from './ai/AIProvider.js';
9
+ export type { AIGenerateResult, AIGenerateOptions } from './ai/AIProvider.js';
10
+ export { ModelCatalog } from './ai/ModelCatalog.js';
11
+ export type { ResolvedModel, ResolveOptions } from './ai/ModelCatalog.js';
12
+ export { ToolAdapter } from './ai/ToolAdapter.js';
13
+ export { TokenBudgetTracker } from './ai/TokenBudgetTracker.js';
14
+ export { OutputExtractor } from './parser/OutputExtractor.js';
15
+ export { ToolHandler } from './executor/ToolHandler.js';
16
+ export { parseRef } from './utils/parseRef.js';
17
+ export { STARTER_DEFINITIONS_DIR } from './constants.js';
18
+ export type { UluOpsConfig, AIConfig, AIProviderCredentials, ResolvedConfig, ResolvedAIConfig } from './types/config.js';
19
+ export type { DefinitionType, ExecutionType, Domain, AgentType, ExecutionInput, ExecutionResult, ExecutionMetrics, ExecutionOptions, ResolvedExecutionContext, Recommendation, } from './types/execution.js';
20
+ export type { AgentDefinition, AgentInterface, AgentDefaults, AgentMission, AgentScoring, AgentDecisions, AgentTasks, AgentCompletion, AgentOutput, ScoringCategory, ScoringCriterion, AgentResult, ValidatorAgentResult, ExecutorAgentResult, } from './types/agent.js';
21
+ export type { CommandDefinition, CommandResult, CommandMetrics, CategoryResult, Finding, Issue, ArtifactResult, PreflightCheck, PostflightAction, } from './types/command.js';
22
+ export type { WorkflowDefinition, WorkflowResult, WorkflowMetrics, PhaseDefinition, PhaseResult, CommandMetricsSummary, } from './types/workflow.js';
23
+ export type { PipelineDefinition, PipelineResult, PipelineMetrics, StageDefinition, StageResult, TriggerDefinition, TriggerInfo, PipelineArtifact, PipelineHandle, PipelineState, } from './types/pipeline.js';
24
+ export type { ResolvedDefinition, DefinitionSummary, Reference, } from './types/registry.js';
25
+ export type { RunSubmission, RunSubmissionResponse, RunHistoryEntry, ValidationQueryOptions, FingerprintedRecommendation, RegressionInfo, } from './types/validation.js';
26
+ export type { ParsedOutput, ParsedCategory, ParsedFinding, ExtractionOptions, ExtractionResult, } from './types/parser.js';
27
+ export type { Tool, ToolUseBlock, ToolResult } from './types/tools.js';
28
+ export type { UsageMetrics } from './types/ai.js';
29
+ export type { Logger } from '@uluops/sdk-core';
30
+ export { UluOpsError, ExecutionError, PreflightError, ConfigurationError, ModelNotFoundError, CapabilityError, ValidationError, ValidationErrorCodes, type ValidationErrorCode, WorkflowError, PipelineError, ParseError, } from './errors/index.js';
31
+ export { SdkApiError, RateLimitError, UnauthorizedError, ForbiddenError, NotFoundError, ServiceUnavailableError, NetworkError, TimeoutError, } from './errors/index.js';
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,E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ACP,KAAK,EACL,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,EACf,WAAW,EACX,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,cAAc,GACf,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,YAAY,EACZ,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGvE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,YAAY,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,aAAa,EACb,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ // ─── Main Client ──────────────────────────────────────────────────────────────
2
+ export { UluOpsClient } from './client/UluOpsClient.js';
3
+ // ─── Executors (for advanced usage) ───────────────────────────────────────────
4
+ export { AgentExecutor } from './executor/AgentExecutor.js';
5
+ export { CommandExecutor } from './executor/CommandExecutor.js';
6
+ export { WorkflowExecutor } from './executor/WorkflowExecutor.js';
7
+ export { PipelineExecutor } from './executor/PipelineExecutor.js';
8
+ // ─── Service Clients ──────────────────────────────────────────────────────────
9
+ export { RegistryClient } from './registry/RegistryClient.js';
10
+ export { ValidationClient } from './validation/ValidationClient.js';
11
+ // ─── AI SDK Integration ───────────────────────────────────────────────────────
12
+ export { AIProvider } from './ai/AIProvider.js';
13
+ export { ModelCatalog } from './ai/ModelCatalog.js';
14
+ export { ToolAdapter } from './ai/ToolAdapter.js';
15
+ export { TokenBudgetTracker } from './ai/TokenBudgetTracker.js';
16
+ // ─── Utilities ────────────────────────────────────────────────────────────────
17
+ export { OutputExtractor } from './parser/OutputExtractor.js';
18
+ export { ToolHandler } from './executor/ToolHandler.js';
19
+ export { parseRef } from './utils/parseRef.js';
20
+ export { STARTER_DEFINITIONS_DIR } from './constants.js';
21
+ // ─── Errors: Core SDK ─────────────────────────────────────────────────────────
22
+ export { UluOpsError, ExecutionError, PreflightError, ConfigurationError, ModelNotFoundError, CapabilityError, ValidationError, ValidationErrorCodes, WorkflowError, PipelineError, ParseError, } from './errors/index.js';
23
+ // ─── Errors: Re-exported from @uluops/sdk-core ───────────────────────────────
24
+ export { SdkApiError, RateLimitError, UnauthorizedError, ForbiddenError, NotFoundError, ServiceUnavailableError, NetworkError, TimeoutError, } from './errors/index.js';
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,iFAAiF;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,iFAAiF;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,iFAAiF;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,iFAAiF;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA6GzD,iFAAiF;AACjF,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,oBAAoB,EAEpB,aAAa,EACb,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,gFAAgF;AAChF,OAAO,EACL,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { AgentType } from '../types/execution.js';
2
+ import type { ParsedOutput, ExtractionOptions, ExtractionResult } from '../types/parser.js';
3
+ /**
4
+ * Extracts structured output from LLM responses using a 3-strategy fallback:
5
+ * 1. JSON code fence (highest confidence)
6
+ * 2. Inline JSON detection
7
+ * 3. Structured text pattern matching (lowest confidence)
8
+ */
9
+ export declare class OutputExtractor {
10
+ private static readonly INLINE_JSON_PATTERN;
11
+ private static readonly STRUCTURED_PATTERNS;
12
+ /**
13
+ * Extract structured output from LLM response text
14
+ */
15
+ extract(content: string, agentType: AgentType, options?: ExtractionOptions): ParsedOutput;
16
+ /**
17
+ * Extract with full metadata about extraction method and confidence
18
+ */
19
+ extractWithMetadata(content: string, agentType: AgentType, options?: ExtractionOptions): ExtractionResult;
20
+ private extractFromCodeFence;
21
+ private extractWholeJson;
22
+ private extractInlineJson;
23
+ private extractBalancedJson;
24
+ private extractFromStructuredText;
25
+ private extractIssuesFromText;
26
+ private inferPriorityFromContext;
27
+ private inferSeverityFromContext;
28
+ /** Resolved source objects from common nesting patterns. Reduces parameter passing across resolve methods. */
29
+ private buildParseSources;
30
+ private normalizeOutput;
31
+ private resolveValidatorFields;
32
+ private attachFlatIssues;
33
+ private asRecord;
34
+ /**
35
+ * Scan all top-level object values for one that contains 'score' or 'decision'.
36
+ * Handles arbitrary wrapper names (validation, validations, validationResults, etc.)
37
+ * without whitelisting specific field names.
38
+ */
39
+ private findWrapperWithScoreOrDecision;
40
+ private resolveDecisionField;
41
+ private resolveScoreField;
42
+ private resolveCategories;
43
+ private resolveIssuesFlat;
44
+ private normalizeDecision;
45
+ private parseCategories;
46
+ private parseFindings;
47
+ private parseIssues;
48
+ private parseArtifacts;
49
+ private normalizePriority;
50
+ private normalizeSeverity;
51
+ }
52
+ //# sourceMappingURL=OutputExtractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutputExtractor.d.ts","sourceRoot":"","sources":["../../src/parser/OutputExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EACV,YAAY,EAGZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAG5B;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC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