@octocodeai/octocode-tools-core 16.5.1 → 16.6.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 (90) hide show
  1. package/README.md +113 -95
  2. package/dist/direct.js +38 -33
  3. package/dist/github/githubAPI.d.ts +22 -0
  4. package/dist/github/history.d.ts +3 -0
  5. package/dist/github/prTransformation.d.ts +1 -1
  6. package/dist/index.d.ts +6 -8
  7. package/dist/index.js +45 -40
  8. package/dist/oql/adapters/compile.d.ts +25 -0
  9. package/dist/oql/adapters/github.d.ts +3 -0
  10. package/dist/oql/adapters/local.d.ts +7 -0
  11. package/dist/oql/adapters/materialize.d.ts +11 -0
  12. package/dist/oql/adapters/pagination.d.ts +21 -0
  13. package/dist/oql/adapters/researchTargets.d.ts +50 -0
  14. package/dist/oql/adapters/resultMap.d.ts +20 -0
  15. package/dist/oql/adapters/ruleYaml.d.ts +11 -0
  16. package/dist/oql/adapters/runner.d.ts +14 -0
  17. package/dist/oql/adapters/v2.d.ts +32 -0
  18. package/dist/oql/capabilities.d.ts +31 -0
  19. package/dist/oql/defaults.d.ts +26 -0
  20. package/dist/oql/diagnostics.d.ts +25 -0
  21. package/dist/oql/diffLanes.d.ts +29 -0
  22. package/dist/oql/envelope.d.ts +19 -0
  23. package/dist/oql/features.d.ts +7 -0
  24. package/dist/oql/index.d.ts +26 -0
  25. package/dist/oql/index.js +49 -0
  26. package/dist/oql/normalize.d.ts +5 -0
  27. package/dist/oql/planner.d.ts +7 -0
  28. package/dist/oql/research/analyze.d.ts +134 -0
  29. package/dist/oql/research/packets.d.ts +80 -0
  30. package/dist/oql/run.d.ts +32 -0
  31. package/dist/oql/schema.d.ts +1018 -0
  32. package/dist/oql/schemeText.d.ts +138 -0
  33. package/dist/oql/shorthand.d.ts +177 -0
  34. package/dist/oql/targetParams.d.ts +20 -0
  35. package/dist/oql/transformers/contract.d.ts +19 -0
  36. package/dist/oql/transformers/github/code.d.ts +17 -0
  37. package/dist/oql/transformers/github/common.d.ts +8 -0
  38. package/dist/oql/transformers/language.d.ts +1 -0
  39. package/dist/oql/transformers/registry.d.ts +16 -0
  40. package/dist/oql/transformers/types.d.ts +11 -0
  41. package/dist/oql/types.d.ts +633 -0
  42. package/dist/oql/v2params.d.ts +22 -0
  43. package/dist/providers/types.d.ts +1 -1
  44. package/dist/schema.d.ts +13 -0
  45. package/dist/schema.js +8 -0
  46. package/dist/serverConfig.d.ts +0 -1
  47. package/dist/session.d.ts +2 -24
  48. package/dist/shared/config/defaults.d.ts +1 -2
  49. package/dist/shared/config/index.d.ts +2 -3
  50. package/dist/shared/config/index.js +2 -3
  51. package/dist/shared/config/resolverSections.d.ts +1 -3
  52. package/dist/shared/config/runtimeSurface.d.ts +2 -2
  53. package/dist/shared/config/schemas.d.ts +0 -1
  54. package/dist/shared/config/types.d.ts +0 -8
  55. package/dist/shared/credentials/index.js +1 -2
  56. package/dist/shared/index.d.ts +0 -1
  57. package/dist/shared/languageSelectors.d.ts +23 -0
  58. package/dist/shared/paths.d.ts +0 -2
  59. package/dist/shared/paths.js +1 -1
  60. package/dist/shared/session/index.js +1 -2
  61. package/dist/tools/directToolCatalog.d.ts +15 -56
  62. package/dist/tools/directToolCatalog.exec.d.ts +11 -0
  63. package/dist/tools/directToolCatalog.meta.d.ts +82 -0
  64. package/dist/tools/github_clone_repo/cache.d.ts +1 -1
  65. package/dist/tools/github_clone_repo/types.d.ts +2 -0
  66. package/dist/tools/github_fetch_content/scheme.d.ts +104 -0
  67. package/dist/tools/github_fetch_content/types.d.ts +27 -0
  68. package/dist/tools/lsp/semantic_content/scheme.d.ts +170 -2
  69. package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
  70. package/dist/tools/lsp/shared/semanticTypes.d.ts +34 -5
  71. package/dist/tools/oql_search/execution.d.ts +7 -0
  72. package/dist/tools/package_search/execution.d.ts +10 -0
  73. package/dist/tools/providerMappers.d.ts +7 -7
  74. package/dist/tools/toolConfig.d.ts +1 -0
  75. package/dist/tools/toolNames.d.ts +2 -0
  76. package/dist/types/server.d.ts +0 -1
  77. package/dist/types/session.d.ts +0 -19
  78. package/dist/utils/contextUtils.d.ts +15 -1
  79. package/dist/utils/core/types.d.ts +2 -1
  80. package/dist/utils/markdownOutline.d.ts +10 -0
  81. package/dist/utils/response/groupedFinalizer.d.ts +0 -23
  82. package/package.json +11 -3
  83. package/dist/commands/BaseCommandBuilder.d.ts +0 -14
  84. package/dist/commands/FindCommandBuilder.d.ts +0 -23
  85. package/dist/commands/LsCommandBuilder.d.ts +0 -15
  86. package/dist/shared/logger/index.d.ts +0 -2
  87. package/dist/shared/logger/logger.d.ts +0 -17
  88. package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
  89. package/dist/utils/ranking/evidenceRanker.d.ts +0 -86
  90. package/dist/utils/response/structuredPagination.d.ts +0 -9
@@ -0,0 +1,25 @@
1
+ import type { DiagnosticCode, Predicate } from '../types.js';
2
+ export interface CompiledMatch {
3
+ keywords?: string;
4
+ fixedString?: boolean;
5
+ perlRegex?: boolean;
6
+ caseInsensitive?: boolean;
7
+ caseSensitive?: boolean;
8
+ wholeWord?: boolean;
9
+ multiline?: boolean;
10
+ multilineDotall?: boolean;
11
+ mode?: 'structural';
12
+ pattern?: string;
13
+ rule?: unknown;
14
+ langType?: string;
15
+ }
16
+ export interface CompileResult {
17
+ match?: CompiledMatch;
18
+ negate?: boolean;
19
+ unsupported?: {
20
+ code: DiagnosticCode;
21
+ message: string;
22
+ predicateId?: string;
23
+ };
24
+ }
25
+ export declare function compileWhere(where: Predicate): CompileResult;
@@ -0,0 +1,3 @@
1
+ import type { AdapterResult } from './local.js';
2
+ import type { OqlQuery } from '../types.js';
3
+ export declare function executeGithub(query: OqlQuery): Promise<AdapterResult>;
@@ -0,0 +1,7 @@
1
+ import { type MappedResult } from './resultMap.js';
2
+ import type { OqlDiagnostic, OqlProvenance, OqlQuery } from '../types.js';
3
+ export interface AdapterResult extends MappedResult {
4
+ diagnostics: OqlDiagnostic[];
5
+ provenance: OqlProvenance[];
6
+ }
7
+ export declare function executeLocal(query: OqlQuery): Promise<AdapterResult>;
@@ -0,0 +1,11 @@
1
+ import { type AdapterResult } from './local.js';
2
+ import type { OqlQuery } from '../types.js';
3
+ export declare function executeMaterialize(query: OqlQuery): Promise<AdapterResult>;
4
+ /**
5
+ * `target:"materialize"` — addressable materialization. Clone/cache a bounded
6
+ * corpus once and return a stable local checkpoint row (localPath, repoRoot,
7
+ * source, ref, cache, complete) that downstream queries can root at via the
8
+ * `next.search` / `next.structure` / `next.fetch` continuations (attached in
9
+ * run.ts). This makes materialization a first-class step, not a search side-effect.
10
+ */
11
+ export declare function executeMaterializeCheckpoint(query: OqlQuery): Promise<AdapterResult>;
@@ -0,0 +1,21 @@
1
+ import type { Pagination } from '../types.js';
2
+ export interface ToolPaginationPayload {
3
+ currentPage?: number;
4
+ totalPages?: number;
5
+ nextPage?: number;
6
+ hasMore?: boolean;
7
+ itemsPerPage?: number;
8
+ entriesPerPage?: number;
9
+ filesPerPage?: number;
10
+ perPage?: number;
11
+ totalItems?: number;
12
+ totalEntries?: number;
13
+ totalFiles?: number;
14
+ totalMatches?: number;
15
+ reportedTotalMatches?: number;
16
+ reachableTotalMatches?: number;
17
+ totalMatchesKind?: string;
18
+ totalMatchesCapped?: boolean;
19
+ uniqueFileCount?: number;
20
+ }
21
+ export declare function toOqlPagination(pagination: ToolPaginationPayload | undefined, fallbackHasMore?: boolean): Pagination | undefined;
@@ -0,0 +1,50 @@
1
+ import type { AdapterResult } from './local.js';
2
+ import type { OqlQuery } from '../types.js';
3
+ export declare function executeRepositories(query: OqlQuery): Promise<AdapterResult>;
4
+ export declare function executePackages(query: OqlQuery): Promise<AdapterResult>;
5
+ export declare function executeHistory(query: OqlQuery): Promise<AdapterResult>;
6
+ /**
7
+ * Keep only commit records whose message contains `needle` (case-insensitive
8
+ * substring), spotlight where it matched, and surface honest diagnostics — a
9
+ * `partialResult` when some were dropped, `zeroMatches` when none matched.
10
+ * Mirrors {@link filterPullRequestsByMatch}; commit text is the commit message.
11
+ */
12
+ export declare function filterCommitsByMatch(result: AdapterResult, needle: string): AdapterResult;
13
+ export interface PullRequestMatch {
14
+ needle: string;
15
+ scope: 'body' | 'title' | 'comments' | 'reviews' | 'all';
16
+ }
17
+ /**
18
+ * Keep only PR records whose scope text contains `matchString` (case-insensitive
19
+ * substring), spotlight where each matched, and surface honest diagnostics: a
20
+ * `partialResult` when some were dropped, `zeroMatches` when none matched.
21
+ */
22
+ export declare function filterPullRequestsByMatch(result: AdapterResult, match: PullRequestMatch): AdapterResult;
23
+ /**
24
+ * `target:"diff"` has two typed lanes, discriminated by params shape:
25
+ * - PR patch: { prNumber, files? } -> ghHistoryResearch patches
26
+ * - direct file: { baseRef, headRef, path } -> two ghGetFileContent reads
27
+ * + a pure local line diff
28
+ * A request that fits neither returns a repair diagnostic rather than silently
29
+ * falling through to a PR-patch call.
30
+ */
31
+ export declare function executeDiff(query: OqlQuery): Promise<AdapterResult>;
32
+ export interface LineDiff {
33
+ additions: number;
34
+ deletions: number;
35
+ unchanged: number;
36
+ /** Unified-style patch text (`+`/`-`/` ` line prefixes). */
37
+ patch: string;
38
+ }
39
+ /**
40
+ * Minimal LCS-based line diff between two file bodies. Pure and dependency-free
41
+ * so it is unit-testable without any backend. Not a byte-perfect git patch —
42
+ * a line-granular additions/deletions view for direct two-ref comparison.
43
+ */
44
+ export declare function computeLineDiff(baseText: string, headText: string): LineDiff;
45
+ export declare function executeArtifacts(query: OqlQuery): Promise<AdapterResult>;
46
+ export declare function executeSemantics(query: OqlQuery): Promise<AdapterResult>;
47
+ export declare function executeResearch(query: OqlQuery): Promise<AdapterResult>;
48
+ export declare function executeGraph(query: OqlQuery): Promise<AdapterResult>;
49
+ /** Dispatch map: target -> adapter. */
50
+ export declare const RESEARCH_TARGET_ADAPTERS: Record<string, (q: OqlQuery) => Promise<AdapterResult>>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Map typed tool results into OQL result rows + pagination. Pure functions —
3
+ * no I/O — so they are unit-testable without backends.
4
+ */
5
+ import type { LocalFindFilesToolResult, LocalGetFileContentToolResult, LocalSearchCodeToolResult, LocalViewStructureToolResult } from '@octocodeai/octocode-core/extra-types';
6
+ import type { OqlContentResultRow, OqlResultRow, Pagination, QuerySource } from '../types.js';
7
+ export interface MappedResult {
8
+ results: OqlResultRow[];
9
+ pagination?: Pagination;
10
+ }
11
+ export declare function mapCodeResult(result: LocalSearchCodeToolResult, source: QuerySource): MappedResult;
12
+ export declare function mapFilesResult(result: LocalFindFilesToolResult, source: QuerySource): MappedResult;
13
+ export declare function mapStructureResult(result: LocalViewStructureToolResult, source: QuerySource): MappedResult;
14
+ export declare function mapContentResult(result: LocalGetFileContentToolResult, source: QuerySource, path: string,
15
+ /**
16
+ * The view the OQL query *requested*. The backing tool does not reliably echo
17
+ * the minify mode back (e.g. a `symbols` read reports `standard`), so the row
18
+ * must report the requested view to satisfy "report the view used".
19
+ */
20
+ requestedView?: OqlContentResultRow['contentView']): MappedResult;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Serialize an OQL JSON `StructuralRule` into the engine's YAML rule string.
3
+ *
4
+ * The structural engine's `rule` field is a YAML string with a top-level
5
+ * `rule:` key (matching the `search --rule` surface). OQL accepts that YAML
6
+ * string directly, or this JSON object form for typed callers. Covers the
7
+ * currently supported rule fields: pattern, kind, inside, has, not, all, any,
8
+ * stopBy.
9
+ */
10
+ import type { StructuralRule } from '../types.js';
11
+ export declare function structuralRuleToYaml(rule: StructuralRule): string;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Single entry for OQL adapters to invoke a backing tool.
3
+ *
4
+ * Routes through `executeDirectTool` — the SAME path the CLI's `tools <name>`
5
+ * uses — so OQL gets identical credential resolution (withSecurityValidation),
6
+ * provider initialization, input validation, and secret sanitization. Calling
7
+ * the bulk runners directly bypassed auth (the CLI runs `runOqlSearch` without
8
+ * an MCP `authInfo`), which silently failed GitHub/npm calls.
9
+ *
10
+ * GitHub/package tools require `mainResearchGoal`; we fill OQL defaults.
11
+ */
12
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
13
+ /** Run one backing tool with a single query, via the shared direct-tool path. */
14
+ export declare function runDirect(name: string, query: Record<string, unknown>): Promise<CallToolResult>;
@@ -0,0 +1,32 @@
1
+ import type { AdapterResult } from './local.js';
2
+ import type { OqlQuery } from '../types.js';
3
+ export declare function executeRepositories(query: OqlQuery): Promise<AdapterResult>;
4
+ export declare function executePackages(query: OqlQuery): Promise<AdapterResult>;
5
+ export declare function executeHistory(query: OqlQuery): Promise<AdapterResult>;
6
+ /**
7
+ * `target:"diff"` has two typed lanes, discriminated by params shape:
8
+ * - PR patch: { prNumber, files? } -> ghHistoryResearch patches
9
+ * - direct file: { baseRef, headRef, path } -> two ghGetFileContent reads
10
+ * + a pure local line diff
11
+ * A request that fits neither returns a repair diagnostic rather than silently
12
+ * falling through to a PR-patch call (see OCTOCODE_SEARCH_PARITY_CHECKLIST.md gap log #8).
13
+ */
14
+ export declare function executeDiff(query: OqlQuery): Promise<AdapterResult>;
15
+ export interface LineDiff {
16
+ additions: number;
17
+ deletions: number;
18
+ unchanged: number;
19
+ /** Unified-style patch text (`+`/`-`/` ` line prefixes). */
20
+ patch: string;
21
+ }
22
+ /**
23
+ * Minimal LCS-based line diff between two file bodies. Pure and dependency-free
24
+ * so it is unit-testable without any backend. Not a byte-perfect git patch —
25
+ * a line-granular additions/deletions view for direct two-ref comparison.
26
+ */
27
+ export declare function computeLineDiff(baseText: string, headText: string): LineDiff;
28
+ export declare function executeArtifacts(query: OqlQuery): Promise<AdapterResult>;
29
+ export declare function executeSemantics(query: OqlQuery): Promise<AdapterResult>;
30
+ export declare function executeResearch(query: OqlQuery): Promise<AdapterResult>;
31
+ /** Dispatch map: V2 target -> adapter. */
32
+ export declare const V2_ADAPTERS: Record<string, (q: OqlQuery) => Promise<AdapterResult>>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * OQL capability registry — makes backend limits explicit and testable.
3
+ *
4
+ * Given the source kind, target, materialization stance, and a single leaf
5
+ * predicate, decide how that predicate can be evaluated:
6
+ * PUSHDOWN backend evaluates it directly (exact or approximate)
7
+ * RESIDUAL fetch bounded candidates and filter locally
8
+ * ROUTE move to another lane (materialize -> local)
9
+ * UNSUPPORTED cannot be evaluated; emit a diagnostic
10
+ *
11
+ * This is intentionally conservative: anything that cannot be proven exactly is
12
+ * flagged so the planner never reports `proof` it cannot back.
13
+ */
14
+ import type { DiagnosticCode, LeafPredicate, MaterializePolicy, OqlActiveTarget, PlanRoute, QuerySource } from './types.js';
15
+ export interface CapabilityContext {
16
+ sourceKind: QuerySource['kind'];
17
+ target: OqlActiveTarget;
18
+ materialize: MaterializePolicy | undefined;
19
+ }
20
+ export interface CapabilityDecision {
21
+ route: PlanRoute;
22
+ backend: string;
23
+ /** Whether the backend evaluates the predicate exactly (proof-grade). */
24
+ exact: boolean;
25
+ reason: string;
26
+ diagnostic?: {
27
+ code: DiagnosticCode;
28
+ message: string;
29
+ };
30
+ }
31
+ export declare function routeLeafPredicate(ctx: CapabilityContext, predicate: LeafPredicate, inNegation?: boolean): CapabilityDecision;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * OQL defaults (see OCTOCODE_QUERY_LANGUAGE.md §defaults). `--explain` must
3
+ * surface every applied default, so they live in one place.
4
+ */
5
+ import type { OqlQuery } from './types.js';
6
+ export declare const DEFAULTS: {
7
+ schema: "oql";
8
+ view: "paginated";
9
+ page: number;
10
+ itemsPerPage: number;
11
+ githubMaterializeMode: "never";
12
+ textCase: "smart";
13
+ regexDialectLocal: "rust";
14
+ regexCase: "smart";
15
+ contentView: "compact";
16
+ contentCharLength: number;
17
+ matchContentLength: number;
18
+ maxPlanNodes: number;
19
+ maxBooleanExpansion: number;
20
+ normalCodeContext: number;
21
+ detailedCodeContext: number;
22
+ localSearchSort: "relevance";
23
+ localRankingProfile: "auto";
24
+ };
25
+ /** The subset of defaults actually applied to (or relevant for) this query. */
26
+ export declare function appliedDefaults(query: OqlQuery): Record<string, unknown>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * OQL diagnostic helpers. Diagnostics are first-class typed output, not prose
3
+ * hints. `blocksAnswer:true` marks diagnostics that prevent `proof`.
4
+ */
5
+ import type { DiagnosticCode, OqlContinuation, OqlDiagnostic, OqlSearchInput } from './types.js';
6
+ export interface DiagnosticOptions {
7
+ queryPath?: string;
8
+ predicateId?: string;
9
+ backend?: string;
10
+ blocksAnswer?: boolean;
11
+ severity?: OqlDiagnostic['severity'];
12
+ repair?: {
13
+ message: string;
14
+ suggestedQuery?: OqlSearchInput;
15
+ };
16
+ continuation?: OqlContinuation;
17
+ }
18
+ export declare function diagnostic(code: DiagnosticCode, message: string, options?: DiagnosticOptions): OqlDiagnostic;
19
+ export declare function blocksAnswer(diagnostics: OqlDiagnostic[]): boolean;
20
+ export declare function hasErrors(diagnostics: OqlDiagnostic[]): boolean;
21
+ /** Error raised when validation/normalization cannot produce a canonical query. */
22
+ export declare class OqlValidationError extends Error {
23
+ readonly diagnostics: OqlDiagnostic[];
24
+ constructor(diagnostics: OqlDiagnostic[]);
25
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Single source of truth for the `target:"diff"` lane discriminant.
3
+ *
4
+ * `target:"diff"` has two typed execution lanes plus an invalid shape:
5
+ * - prPatch: { prNumber, files? } -> ghHistoryResearch (PR patches)
6
+ * - directFile: { baseRef, headRef, path } -> 2× ghGetFileContent + line diff
7
+ * - neither: repair diagnostic, no call
8
+ *
9
+ * Both the planner (to announce the right backend in `--explain --dry-run`) and
10
+ * the diff adapter (to dispatch execution) classify a query off this one
11
+ * helper, so the plan can never contradict execution. Pure: no imports beyond
12
+ * its own return types.
13
+ */
14
+ export type DiffLane = {
15
+ kind: 'prPatch';
16
+ prNumber: number;
17
+ files?: string[];
18
+ } | {
19
+ kind: 'directFile';
20
+ baseRef: string;
21
+ headRef: string;
22
+ path: string;
23
+ } | {
24
+ kind: 'neither';
25
+ };
26
+ /** Unified lane discriminant for target:"diff". Single source of truth. */
27
+ export declare function classifyDiffLane(params: Record<string, unknown> | undefined): DiffLane;
28
+ /** Backend name the planner should announce for a lane (`''` = no call). */
29
+ export declare function diffLaneBackend(lane: DiffLane): string;
@@ -0,0 +1,19 @@
1
+ import type { OqlBackendCall, OqlDiagnostic, OqlExplainPlan, OqlProofGradedResultRow, OqlProvenance, OqlResultEnvelope, Pagination } from './types.js';
2
+ export interface BuildEnvelopeArgs {
3
+ queryId?: string;
4
+ queryIndex?: number;
5
+ results: OqlProofGradedResultRow[];
6
+ pagination?: Pagination;
7
+ next?: OqlResultEnvelope['next'];
8
+ diagnostics: OqlDiagnostic[];
9
+ provenance: OqlProvenance[];
10
+ /** Whether the plan was executable (no UNSUPPORTED nodes / blocking errors). */
11
+ executable: boolean;
12
+ /** Whether any backend call was approximate (exact:false). */
13
+ approximate?: boolean;
14
+ plan?: OqlExplainPlan;
15
+ }
16
+ export declare function buildEnvelope(args: BuildEnvelopeArgs): OqlResultEnvelope;
17
+ export declare function backendsApproximate(calls: OqlBackendCall[]): boolean;
18
+ /** Envelope for a query that failed validation/planning (no execution). */
19
+ export declare function unsupportedEnvelope(diagnostics: OqlDiagnostic[], plan?: OqlExplainPlan, queryId?: string, queryIndex?: number, next?: OqlResultEnvelope['next']): OqlResultEnvelope;
@@ -0,0 +1,7 @@
1
+ import type { OqlDiagnostic, OqlQuery } from './types.js';
2
+ /**
3
+ * Diagnose requested-but-unbackable output features. Pure; emits zero or more
4
+ * non-blocking diagnostics. Called by the planner so the limitation rides in the
5
+ * plan and the envelope alike.
6
+ */
7
+ export declare function checkOutputFeatures(query: OqlQuery): OqlDiagnostic[];
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Octocode Query Language (OQL) public surface.
3
+ *
4
+ * `octocode search` (CLI) and the OQL MCP tool both consume this module:
5
+ * - `runOqlSearch` executes a query/batch and returns a typed envelope.
6
+ * - `normalizeInput` / `planQuery` expose the normalize + explain stages.
7
+ * - `oqlSchemaText()` / `OQL_SCHEMA_JSON` back `octocode search --scheme`.
8
+ *
9
+ * Schemas/types co-locate here for now (tools-core). They may migrate to
10
+ * `@octocodeai/octocode-core/oql` once a second consumer needs OQL validation
11
+ * without the rest of tools-core.
12
+ */
13
+ export * from './types.js';
14
+ export { OqlQuerySchema, OqlBatchSchema, OqlCanonicalInputSchema, OqlInputQuerySchema, OqlInputBatchSchema, OqlSearchInputSchema, PredicateSchema, QuerySourceSchema, StructuralRuleSchema, } from './schema.js';
15
+ export { normalizeInput, normalizeQuery } from './normalize.js';
16
+ export { planQuery, type PlanQueryResult } from './planner.js';
17
+ export { DEFAULTS, appliedDefaults } from './defaults.js';
18
+ export { diagnostic, blocksAnswer, hasErrors, OqlValidationError, } from './diagnostics.js';
19
+ export { buildEnvelope, unsupportedEnvelope, backendsApproximate, } from './envelope.js';
20
+ export { runOqlSearch, type RunOptions } from './run.js';
21
+ export { buildShorthandInput, type SearchShorthand, type ShorthandCorpus, type ShorthandResult, } from './shorthand.js';
22
+ export { listTransformerEntries, findTransformerById, findTransformerEntry, backendCallsForTransformer, } from './transformers/registry.js';
23
+ export type { TransformerRegistryEntry, TransformerStatus, } from './transformers/contract.js';
24
+ export { oqlSchemaText, OQL_SCHEMA_DOC } from './schemeText.js';
25
+ export { analyzeResearchFlow, type AnalyzeResearchOptions, type ResearchAnalysisResult, type ResearchDependencyIssue, type ResearchFileIssue, type ResearchFlowStep, type ResearchIntent, type ResearchManifestSummary, type ResearchMode, type ResearchSymbolRow, type ResearchSymbolVerdict, } from './research/analyze.js';
26
+ export { buildResearchPackets, type EvidenceClaim, type EvidenceConfidence, type EvidenceEdge, type EvidenceFact, type EvidenceFlag, type EvidenceLocation, type EvidenceRelation, type EvidenceSource, type EvidenceSubject, type MissingProof, type MissingProofKind, type PacketProofStatus, type PacketVerdict, type ResearchEvidencePacket, type ResearchGraphSummary, type ResearchPacketBundle, } from './research/packets.js';