@octocodeai/octocode-tools-core 17.0.2 → 18.0.1
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/README.md +48 -38
- package/dist/direct.js +52 -35
- package/dist/github/canonicalRepo.d.ts +14 -0
- package/dist/github/codeSearch/matchPositions.d.ts +11 -0
- package/dist/github/codeSearch.d.ts +2 -1
- package/dist/github/compare.d.ts +42 -0
- package/dist/github/dateWindow.d.ts +4 -0
- package/dist/github/discussions.d.ts +45 -0
- package/dist/github/githubAPI.d.ts +7 -13
- package/dist/github/history/commitFiles.d.ts +39 -0
- package/dist/github/history.d.ts +1 -0
- package/dist/github/issues/types.d.ts +8 -8
- package/dist/github/prTransformation.d.ts +24 -25
- package/dist/github/queryBuilders/base.d.ts +0 -1
- package/dist/github/queryBuilders/issues.d.ts +0 -6
- package/dist/github/releases.d.ts +9 -1
- package/dist/github/responseHeaders.d.ts +6 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js +56 -39
- package/dist/providers/github/githubPullRequests.d.ts +9 -0
- package/dist/providers/github/paginationMetadata.d.ts +6 -5
- package/dist/providers/providerQueries.d.ts +11 -6
- package/dist/providers/providerResults.d.ts +9 -1
- package/dist/schema.d.ts +0 -1
- package/dist/schema.js +1 -2
- package/dist/scheme/pagination.d.ts +5 -13
- package/dist/scheme/responseEnvelope.d.ts +28 -22
- package/dist/security/bridge.d.ts +3 -2
- package/dist/shared/config/index.d.ts +0 -1
- package/dist/shared/config/index.js +1 -1
- package/dist/shared/languageSelectors/classify.d.ts +2 -2
- package/dist/shared/languageSelectors/data.d.ts +4 -4
- package/dist/shared/languageSelectors.d.ts +1 -1
- package/dist/shared/paths.d.ts +1 -4
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +10 -11
- package/dist/tools/directToolCatalog/toolCatalogFormatters.d.ts +12 -0
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/github_clone_repo/contentSize.d.ts +9 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +26 -96
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +2 -3
- package/dist/tools/github_fetch_content/scheme.d.ts +92 -140
- package/dist/tools/github_fetch_content/types.d.ts +2 -1
- package/dist/tools/github_search_code/scheme.d.ts +39 -87
- package/dist/tools/github_search_discussions/execution.d.ts +15 -0
- package/dist/tools/github_search_discussions/scheme.d.ts +16 -0
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +2 -16
- package/dist/tools/github_search_pull_requests/scheme.d.ts +97 -119
- package/dist/tools/github_search_pull_requests/splitExecutions.d.ts +8 -0
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +216 -0
- package/dist/tools/github_search_pull_requests/types.d.ts +28 -29
- package/dist/tools/github_search_repos/execution.d.ts +0 -2
- package/dist/tools/github_search_repos/scheme.d.ts +36 -64
- package/dist/tools/github_view_repo_structure/scheme.d.ts +37 -66
- package/dist/tools/local_dead_code/deadCodeScan.d.ts +26 -0
- package/dist/tools/local_dead_code/entrypoints.d.ts +16 -0
- package/dist/tools/local_dead_code/execution.d.ts +4 -0
- package/dist/tools/local_dead_code/graphBuilder.d.ts +43 -0
- package/dist/tools/local_dead_code/importResolver.d.ts +6 -0
- package/dist/tools/local_dead_code/local_dead_code.d.ts +5 -0
- package/dist/tools/local_dead_code/reachability.d.ts +21 -0
- package/dist/tools/local_dead_code/retention.d.ts +22 -0
- package/dist/tools/local_dead_code/scheme.d.ts +51 -0
- package/dist/tools/local_dead_code/types.d.ts +56 -0
- package/dist/tools/local_fetch_content/execution.d.ts +0 -1
- package/dist/tools/local_fetch_content/fetchContent/extraction.d.ts +6 -0
- package/dist/tools/local_fetch_content/fetchContent/validation.d.ts +9 -1
- package/dist/tools/local_fetch_content/fetchContent.d.ts +0 -1
- package/dist/tools/local_fetch_content/scheme.d.ts +28 -90
- package/dist/tools/local_find_files/execution.d.ts +0 -1
- package/dist/tools/local_find_files/findFiles.d.ts +0 -3
- package/dist/tools/local_find_files/findFilesNext.d.ts +26 -0
- package/dist/tools/local_find_files/pathPatternBraces.d.ts +20 -0
- package/dist/tools/local_find_files/scheme.d.ts +19 -81
- package/dist/tools/local_ripgrep/captureBudget.d.ts +25 -0
- package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -0
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +1 -0
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -1
- package/dist/tools/local_ripgrep/scheme.d.ts +89 -190
- package/dist/tools/local_view_structure/execution.d.ts +0 -1
- package/dist/tools/local_view_structure/local_view_structure.d.ts +0 -1
- package/dist/tools/local_view_structure/scheme.d.ts +34 -87
- package/dist/tools/local_view_structure/structureFilters.d.ts +2 -4
- package/dist/tools/local_view_structure/structureResponse.d.ts +1 -0
- package/dist/tools/local_view_structure/viewStructureNext.d.ts +25 -0
- package/dist/tools/lsp/semantic_content/index.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/scheme.d.ts +167 -642
- package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +8 -2
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +17 -1
- package/dist/tools/lsp/semantic_content/semanticNext.d.ts +2 -0
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -1
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +14 -2
- package/dist/tools/lsp/shared/semanticTypes.d.ts +14 -1
- package/dist/tools/package_search/execution.d.ts +9 -6
- package/dist/tools/package_search/queryHelpers.d.ts +8 -0
- package/dist/tools/package_search/scheme.d.ts +30 -86
- package/dist/tools/providerMappers/codeSearch.d.ts +0 -1
- package/dist/tools/providerMappers/pullRequests.d.ts +0 -13
- package/dist/tools/providerMappers/repoSearch.d.ts +1 -5
- package/dist/tools/providerMappers/repoStructure.d.ts +4 -0
- package/dist/tools/toolCatalogFactory.d.ts +25 -0
- package/dist/tools/toolConfig.d.ts +9 -24
- package/dist/tools/toolNames.d.ts +2 -2
- package/dist/tools/toolSchemaImports.d.ts +3 -1
- package/dist/types/execution.d.ts +1 -0
- package/dist/types/toolOutput.d.ts +38 -0
- package/dist/utils/contextUtils.d.ts +6 -0
- package/dist/utils/core/types.d.ts +4 -0
- package/dist/utils/jsSymbolNames.d.ts +6 -0
- package/package.json +4 -8
- package/dist/oql/adapters/compile.d.ts +0 -25
- package/dist/oql/adapters/github/execute.d.ts +0 -16
- package/dist/oql/adapters/github/provider-diagnostics.d.ts +0 -14
- package/dist/oql/adapters/github/shared.d.ts +0 -75
- package/dist/oql/adapters/github.d.ts +0 -14
- package/dist/oql/adapters/graphProof.d.ts +0 -6
- package/dist/oql/adapters/graphView/filters.d.ts +0 -25
- package/dist/oql/adapters/graphView/nativeEdges.d.ts +0 -5
- package/dist/oql/adapters/graphView.d.ts +0 -29
- package/dist/oql/adapters/local/code.d.ts +0 -3
- package/dist/oql/adapters/local/codeBoolean.d.ts +0 -3
- package/dist/oql/adapters/local/fileRowOps.d.ts +0 -11
- package/dist/oql/adapters/local/files.d.ts +0 -3
- package/dist/oql/adapters/local/filesBoolean.d.ts +0 -10
- package/dist/oql/adapters/local/filesContentLeaf.d.ts +0 -12
- package/dist/oql/adapters/local/filesUniverse.d.ts +0 -6
- package/dist/oql/adapters/local/findToolType.d.ts +0 -10
- package/dist/oql/adapters/local/predicates.d.ts +0 -18
- package/dist/oql/adapters/local/scope.d.ts +0 -14
- package/dist/oql/adapters/local/searchToolType.d.ts +0 -7
- package/dist/oql/adapters/local/structureContent.d.ts +0 -6
- package/dist/oql/adapters/local/types.d.ts +0 -34
- package/dist/oql/adapters/local.d.ts +0 -4
- package/dist/oql/adapters/materialize.d.ts +0 -11
- package/dist/oql/adapters/pagination.d.ts +0 -21
- package/dist/oql/adapters/researchTargets/diff.d.ts +0 -16
- package/dist/oql/adapters/researchTargets/graph.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/history.d.ts +0 -20
- package/dist/oql/adapters/researchTargets/pagination.d.ts +0 -54
- package/dist/oql/adapters/researchTargets/repositories.d.ts +0 -4
- package/dist/oql/adapters/researchTargets/research.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/rows.d.ts +0 -16
- package/dist/oql/adapters/researchTargets/semantics.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/shared.d.ts +0 -11
- package/dist/oql/adapters/researchTargets.d.ts +0 -8
- package/dist/oql/adapters/resultMap.d.ts +0 -27
- package/dist/oql/adapters/ruleYaml.d.ts +0 -11
- package/dist/oql/adapters/runner.d.ts +0 -21
- package/dist/oql/capabilities.d.ts +0 -31
- package/dist/oql/defaults.d.ts +0 -26
- package/dist/oql/diagnostics.d.ts +0 -25
- package/dist/oql/diffLanes.d.ts +0 -29
- package/dist/oql/envelope.d.ts +0 -21
- package/dist/oql/features.d.ts +0 -7
- package/dist/oql/index.d.ts +0 -27
- package/dist/oql/index.js +0 -47
- package/dist/oql/normalize/batch.d.ts +0 -2
- package/dist/oql/normalize/materialize.d.ts +0 -2
- package/dist/oql/normalize/params.d.ts +0 -2
- package/dist/oql/normalize/query.d.ts +0 -2
- package/dist/oql/normalize/scope.d.ts +0 -2
- package/dist/oql/normalize/shared.d.ts +0 -7
- package/dist/oql/normalize/source.d.ts +0 -2
- package/dist/oql/normalize/where.d.ts +0 -2
- package/dist/oql/normalize.d.ts +0 -20
- package/dist/oql/planner/planDiagnostics.d.ts +0 -13
- package/dist/oql/planner/predicateRouting.d.ts +0 -35
- package/dist/oql/planner.d.ts +0 -7
- package/dist/oql/predicateUtils.d.ts +0 -3
- package/dist/oql/research/analyze/manifest-scan.d.ts +0 -4
- package/dist/oql/research/analyze/source-graph.d.ts +0 -7
- package/dist/oql/research/analyze/symbol-scoring.d.ts +0 -4
- package/dist/oql/research/analyze/types.d.ts +0 -163
- package/dist/oql/research/analyze/utils.d.ts +0 -16
- package/dist/oql/research/analyze.d.ts +0 -3
- package/dist/oql/research/packets/builders.d.ts +0 -4
- package/dist/oql/research/packets/types.d.ts +0 -91
- package/dist/oql/research/packets.d.ts +0 -21
- package/dist/oql/run/batch.d.ts +0 -3
- package/dist/oql/run/continuations/records.d.ts +0 -19
- package/dist/oql/run/continuations/registry.d.ts +0 -22
- package/dist/oql/run/continuations/semantics.d.ts +0 -3
- package/dist/oql/run/continuations/types.d.ts +0 -12
- package/dist/oql/run/dryRun.d.ts +0 -11
- package/dist/oql/run/paths.d.ts +0 -15
- package/dist/oql/run/proofGrades.d.ts +0 -8
- package/dist/oql/run/select.d.ts +0 -10
- package/dist/oql/run/single.d.ts +0 -22
- package/dist/oql/run.d.ts +0 -5
- package/dist/oql/schema/predicates.d.ts +0 -12
- package/dist/oql/schema.d.ts +0 -1049
- package/dist/oql/schemeText.d.ts +0 -152
- package/dist/oql/shorthand/predicates.d.ts +0 -15
- package/dist/oql/shorthand/query-controls.d.ts +0 -18
- package/dist/oql/shorthand/target-params.d.ts +0 -9
- package/dist/oql/shorthand/types.d.ts +0 -159
- package/dist/oql/shorthand/utils.d.ts +0 -7
- package/dist/oql/shorthand.d.ts +0 -8
- package/dist/oql/targetParams.d.ts +0 -7
- package/dist/oql/transformers/contract.d.ts +0 -19
- package/dist/oql/transformers/github/code.d.ts +0 -9
- package/dist/oql/transformers/github/common.d.ts +0 -14
- package/dist/oql/transformers/language.d.ts +0 -1
- package/dist/oql/transformers/registry.d.ts +0 -16
- package/dist/oql/transformers/types.d.ts +0 -11
- package/dist/oql/types/diagnostics.d.ts +0 -22
- package/dist/oql/types/envelope.d.ts +0 -78
- package/dist/oql/types/guards.d.ts +0 -9
- package/dist/oql/types/planner.d.ts +0 -46
- package/dist/oql/types/predicates.d.ts +0 -93
- package/dist/oql/types/query.d.ts +0 -143
- package/dist/oql/types/recordData.d.ts +0 -127
- package/dist/oql/types/recordRows.d.ts +0 -48
- package/dist/oql/types/results.d.ts +0 -118
- package/dist/oql/types/targets.d.ts +0 -22
- package/dist/oql/types.d.ts +0 -27
- package/dist/tools/oql_search/execution.d.ts +0 -7
- package/dist/tools/toolMetadata/descriptionOverrides.d.ts +0 -4
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { MaterializePolicy, OqlInputQuery, OqlQuery, Predicate, QuerySource } from '../types.js';
|
|
2
|
-
export declare function normalizeMaterialize(raw: OqlInputQuery, from: QuerySource | undefined, where: Predicate | undefined, target: OqlQuery['target']): MaterializePolicy | undefined;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared helpers used across the normalize/* submodules: the `fail()`
|
|
3
|
-
* diagnostic-throw shorthand and zod-error formatting.
|
|
4
|
-
*/
|
|
5
|
-
import { diagnostic } from '../diagnostics.js';
|
|
6
|
-
export declare function fail(...diagnostics: ReturnType<typeof diagnostic>[]): never;
|
|
7
|
-
export declare function formatZodError(error: unknown): string;
|
package/dist/oql/normalize.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OQL normalizer: raw sugar in, strict canonical OQL out.
|
|
3
|
-
*
|
|
4
|
-
* Rules (see OCTOCODE_QUERY_LANGUAGE.md §normalization):
|
|
5
|
-
* - sugar is accepted only when it has a deterministic rewrite;
|
|
6
|
-
* - ambiguous sugar fails with `ambiguousSugar`;
|
|
7
|
-
* - reserved targets fail with `unsupportedTarget`;
|
|
8
|
-
* - unknown fields fail with `unknownField`;
|
|
9
|
-
* - canonical output contains no shorthand fields.
|
|
10
|
-
*
|
|
11
|
-
* Predicate IDs are NOT injected here — the planner derives stable IDs from
|
|
12
|
-
* node position (or a user-provided `id`) so the canonical `where` stays clean.
|
|
13
|
-
*
|
|
14
|
-
* This file is a thin barrel/orchestrator: the actual per-clause
|
|
15
|
-
* normalization logic lives under ./normalize/* (source, scope, where,
|
|
16
|
-
* materialize, params, query orchestration, batch handling).
|
|
17
|
-
*/
|
|
18
|
-
import type { OqlCanonicalInput, OqlSearchInput } from './types.js';
|
|
19
|
-
export { normalizeQuery } from './normalize/query.js';
|
|
20
|
-
export declare function normalizeInput(input: OqlSearchInput): OqlCanonicalInput;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { MaterializePolicy, OqlDiagnostic, OqlPlanNode, OqlQuery } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* A `controls.search.sort` value outside the target lane's executable set is
|
|
4
|
-
* IGNORED by the backend (files: localFindFiles sortBy; code: search ranking).
|
|
5
|
-
* Warn instead of silently returning default ordering — non-blocking because
|
|
6
|
-
* ordering never changes WHICH rows exist, only their sequence.
|
|
7
|
-
*/
|
|
8
|
-
export declare function sortApplicabilityDiagnostics(query: OqlQuery): OqlDiagnostic[];
|
|
9
|
-
export declare function adapterValidationDiagnostics(query: OqlQuery, nodes: OqlPlanNode[]): OqlDiagnostic[];
|
|
10
|
-
export declare function decideMaterialization(query: OqlQuery, diagnostics: OqlDiagnostic[]): (MaterializePolicy & {
|
|
11
|
-
required: boolean;
|
|
12
|
-
reason: string;
|
|
13
|
-
}) | undefined;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Predicate-tree walking + transformer routing for the OQL planner.
|
|
3
|
-
*
|
|
4
|
-
* Responsible for:
|
|
5
|
-
* - walking the predicate tree and routing every leaf/boolean node
|
|
6
|
-
* (invariant: pushed + residual + routed + unsupported == all predicate
|
|
7
|
-
* nodes);
|
|
8
|
-
* - recording backend calls and transformer traces as routing decisions are
|
|
9
|
-
* made, including the GitHub materialization fallback for multi-leaf
|
|
10
|
-
* booleans and unrouted `files`/`code` targets;
|
|
11
|
-
* - picking the transformer registry entry for a given query/source pair.
|
|
12
|
-
*/
|
|
13
|
-
import { type CapabilityContext } from '../capabilities.js';
|
|
14
|
-
import type { TransformerRegistryEntry } from '../transformers/contract.js';
|
|
15
|
-
import type { OqlBackendCall, OqlDiagnostic, OqlExplainPlan, OqlPlanNode, OqlQuery, PlanRoute, Predicate, QuerySource } from '../types.js';
|
|
16
|
-
export interface WalkResult {
|
|
17
|
-
nodes: OqlPlanNode[];
|
|
18
|
-
diagnostics: OqlDiagnostic[];
|
|
19
|
-
backendCalls: OqlBackendCall[];
|
|
20
|
-
transformers: OqlExplainPlan['transformers'];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Walk the predicate tree, routing every leaf and recording a node per
|
|
24
|
-
* predicate (boolean nodes included). Boolean nodes are routed by composing
|
|
25
|
-
* child routes.
|
|
26
|
-
*/
|
|
27
|
-
export declare function walkPredicate(query: OqlQuery, predicate: Predicate, path: string, ctx: CapabilityContext, out: WalkResult, inNegation?: boolean): PlanRoute;
|
|
28
|
-
export declare function addBackendCall(calls: OqlBackendCall[], call: OqlBackendCall): void;
|
|
29
|
-
export declare function addTransformerTrace(out: WalkResult, transformer: TransformerRegistryEntry | undefined): void;
|
|
30
|
-
export declare function addTransformerBackendCalls(out: WalkResult, transformer: TransformerRegistryEntry | undefined, source?: QuerySource): boolean;
|
|
31
|
-
export declare function addGithubFilesMaterializationCalls(out: WalkResult, source: QuerySource): boolean;
|
|
32
|
-
export declare function addGithubMaterializationCalls(out: WalkResult, source: QuerySource, target: OqlQuery['target'], localTransformer?: TransformerRegistryEntry | undefined): boolean;
|
|
33
|
-
export declare function containsStructuralPredicate(predicate: Predicate | undefined): boolean;
|
|
34
|
-
export declare function localTransformerForRoutedQuery(query: OqlQuery): TransformerRegistryEntry | undefined;
|
|
35
|
-
export declare function transformerForQuery(query: OqlQuery, source: QuerySource): TransformerRegistryEntry | undefined;
|
package/dist/oql/planner.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { OqlExplainPlan, OqlQuery } from './types.js';
|
|
2
|
-
export interface PlanQueryResult {
|
|
3
|
-
plan: OqlExplainPlan;
|
|
4
|
-
/** True when no node is UNSUPPORTED and no blocking diagnostic exists. */
|
|
5
|
-
executable: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function planQuery(query: OqlQuery, rawInput: unknown): PlanQueryResult;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type Manifest, type ResearchDependencyIssue, type SourceFile } from './types.js';
|
|
2
|
-
export declare function walkFiles(root: string, maxFiles: number): Promise<string[]>;
|
|
3
|
-
export declare function readManifests(paths: readonly string[]): Promise<Manifest[]>;
|
|
4
|
-
export declare function collectDependencyIssues(root: string, manifests: readonly Manifest[], sourceFiles: readonly SourceFile[], workspacePackages: ReadonlySet<string>): readonly ResearchDependencyIssue[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type GraphFactCapability } from '../../../utils/contextUtils.js';
|
|
2
|
-
import { type Manifest, type ResearchGraphCapabilitySummary, type ResearchGraphFactFile, type SourceFile } from './types.js';
|
|
3
|
-
export declare function readSourceFiles(root: string, files: readonly string[]): Promise<SourceFile[]>;
|
|
4
|
-
export declare function summarizeGraphCapabilities(sourceFiles: readonly SourceFile[], graphFacts: readonly ResearchGraphFactFile[], capabilities: readonly GraphFactCapability[]): ResearchGraphCapabilitySummary;
|
|
5
|
-
export declare function buildFileGraph(sourceFiles: readonly SourceFile[]): ReadonlyMap<string, readonly string[]>;
|
|
6
|
-
export declare function collectEntrypoints(root: string, manifests: readonly Manifest[], sourceFiles: readonly SourceFile[]): readonly string[];
|
|
7
|
-
export declare function reachableFiles(entrypoints: readonly string[], graph: ReadonlyMap<string, readonly string[]>): ReadonlySet<string>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExportSymbol, ResearchSymbolRow, SourceFile } from './types.js';
|
|
2
|
-
export declare function collectExportSymbols(sourceFiles: readonly SourceFile[]): Promise<ExportSymbol[]>;
|
|
3
|
-
export declare function scoreSymbols(symbols: readonly ExportSymbol[], sourceFiles: readonly SourceFile[], reachable: ReadonlySet<string>): readonly ResearchSymbolRow[];
|
|
4
|
-
export declare function cacheTokens(sourceFiles: readonly SourceFile[]): Promise<void>;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
export declare const FALLBACK_SOURCE_EXTENSIONS: readonly [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"];
|
|
2
|
-
export declare const MANIFEST_NAME = "package.json";
|
|
3
|
-
export declare const DEFAULT_EXCLUDE_DIRS: Set<string>;
|
|
4
|
-
export declare const NODE_BUILTINS: Set<string>;
|
|
5
|
-
export type ResearchIntent = 'general' | 'reachability' | 'dependencies' | 'symbols';
|
|
6
|
-
export type ResearchMode = 'plan' | 'analyze' | 'prove';
|
|
7
|
-
export type ResearchFlowStep = {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly purpose: string;
|
|
10
|
-
readonly tools: readonly string[];
|
|
11
|
-
readonly produces: readonly string[];
|
|
12
|
-
readonly evidence: 'heuristic' | 'proof';
|
|
13
|
-
};
|
|
14
|
-
export type ResearchSymbolVerdict = 'reachable' | 'candidate-unused-export' | 'transitive-dead' | 'unused-export' | 'unknown';
|
|
15
|
-
export type ResearchRetentionSource = 'ast' | 'ripgrep';
|
|
16
|
-
export type ResearchSymbolRow = {
|
|
17
|
-
readonly symbol: string;
|
|
18
|
-
readonly kind: string;
|
|
19
|
-
readonly file: string;
|
|
20
|
-
readonly line: number;
|
|
21
|
-
readonly evidenceSource: 'ast' | 'regex';
|
|
22
|
-
/** How cross-file retention was established. Prefer `ast`; `ripgrep` is lexical fallback only. */
|
|
23
|
-
readonly retentionSource: ResearchRetentionSource;
|
|
24
|
-
readonly directRefs: number;
|
|
25
|
-
readonly externalRefs: number;
|
|
26
|
-
readonly retainedBy: readonly string[];
|
|
27
|
-
readonly verdict: ResearchSymbolVerdict;
|
|
28
|
-
};
|
|
29
|
-
export type ResearchGraphFactFile = {
|
|
30
|
-
readonly file: string;
|
|
31
|
-
readonly source: 'native-ast';
|
|
32
|
-
readonly language: string;
|
|
33
|
-
readonly declarations: readonly {
|
|
34
|
-
readonly name: string;
|
|
35
|
-
readonly kind: string;
|
|
36
|
-
readonly line: number;
|
|
37
|
-
readonly exported: boolean;
|
|
38
|
-
readonly parent?: string;
|
|
39
|
-
}[];
|
|
40
|
-
readonly imports: readonly {
|
|
41
|
-
readonly specifier: string;
|
|
42
|
-
readonly line: number;
|
|
43
|
-
readonly importKind: string;
|
|
44
|
-
readonly localName?: string;
|
|
45
|
-
readonly importedName?: string;
|
|
46
|
-
}[];
|
|
47
|
-
readonly exports: readonly {
|
|
48
|
-
readonly name: string;
|
|
49
|
-
readonly line: number;
|
|
50
|
-
readonly exportKind: string;
|
|
51
|
-
readonly localName?: string;
|
|
52
|
-
readonly source?: string;
|
|
53
|
-
}[];
|
|
54
|
-
readonly calls: readonly {
|
|
55
|
-
readonly caller: string;
|
|
56
|
-
readonly callee: string;
|
|
57
|
-
readonly line: number;
|
|
58
|
-
readonly kind: string;
|
|
59
|
-
}[];
|
|
60
|
-
readonly edges: readonly {
|
|
61
|
-
readonly from: string;
|
|
62
|
-
readonly to: string;
|
|
63
|
-
readonly relation: string;
|
|
64
|
-
readonly source: string;
|
|
65
|
-
readonly line: number;
|
|
66
|
-
}[];
|
|
67
|
-
readonly diagnostics: readonly string[];
|
|
68
|
-
};
|
|
69
|
-
export type ResearchFileIssue = {
|
|
70
|
-
readonly kind: 'unusedFile';
|
|
71
|
-
readonly file: string;
|
|
72
|
-
readonly retainedBy: readonly string[];
|
|
73
|
-
readonly verdict: 'unused-file';
|
|
74
|
-
};
|
|
75
|
-
export type ResearchDependencyIssue = {
|
|
76
|
-
readonly kind: 'unlistedDependency' | 'unusedDependency' | 'duplicateDependency';
|
|
77
|
-
readonly packageName: string;
|
|
78
|
-
readonly manifest: string;
|
|
79
|
-
readonly usedBy: readonly string[];
|
|
80
|
-
readonly declaredIn: readonly string[];
|
|
81
|
-
readonly verdict: string;
|
|
82
|
-
};
|
|
83
|
-
export type ResearchManifestSummary = {
|
|
84
|
-
readonly manifest: string;
|
|
85
|
-
readonly name?: string;
|
|
86
|
-
readonly entrypoints: readonly string[];
|
|
87
|
-
readonly dependencyCount: number;
|
|
88
|
-
};
|
|
89
|
-
export type ResearchGraphCapabilitySummary = {
|
|
90
|
-
readonly graphFactExtensions: readonly string[];
|
|
91
|
-
readonly capabilityCount: number;
|
|
92
|
-
readonly factFamilies: readonly string[];
|
|
93
|
-
readonly sourceFilesByLanguage: Readonly<Record<string, number>>;
|
|
94
|
-
readonly graphFilesByLanguage: Readonly<Record<string, number>>;
|
|
95
|
-
readonly missingGraphFacts: readonly {
|
|
96
|
-
readonly extension: string;
|
|
97
|
-
readonly files: number;
|
|
98
|
-
readonly reason: string;
|
|
99
|
-
}[];
|
|
100
|
-
};
|
|
101
|
-
export type ResearchAnalysisResult = {
|
|
102
|
-
readonly kind: 'researchFlow';
|
|
103
|
-
readonly goal: string;
|
|
104
|
-
readonly intent: ResearchIntent;
|
|
105
|
-
readonly facets: readonly string[];
|
|
106
|
-
readonly mode: ResearchMode;
|
|
107
|
-
readonly root: string;
|
|
108
|
-
readonly flow: readonly ResearchFlowStep[];
|
|
109
|
-
readonly summary: {
|
|
110
|
-
readonly manifests: number;
|
|
111
|
-
readonly sourceFiles: number;
|
|
112
|
-
readonly entrypoints: number;
|
|
113
|
-
readonly reachableFiles: number;
|
|
114
|
-
readonly unusedFiles: number;
|
|
115
|
-
readonly unlistedDependencies: number;
|
|
116
|
-
readonly unusedDependencies: number;
|
|
117
|
-
readonly duplicateDependencies: number;
|
|
118
|
-
readonly exportedSymbols: number;
|
|
119
|
-
readonly candidateUnusedExports: number;
|
|
120
|
-
readonly transitiveDeadExports: number;
|
|
121
|
-
readonly nativeGraphFiles: number;
|
|
122
|
-
readonly nativeGraphDeclarations: number;
|
|
123
|
-
readonly nativeGraphCalls: number;
|
|
124
|
-
};
|
|
125
|
-
readonly manifests: readonly ResearchManifestSummary[];
|
|
126
|
-
readonly files: readonly ResearchFileIssue[];
|
|
127
|
-
readonly dependencies: readonly ResearchDependencyIssue[];
|
|
128
|
-
readonly symbols: readonly ResearchSymbolRow[];
|
|
129
|
-
readonly graphFacts: readonly ResearchGraphFactFile[];
|
|
130
|
-
readonly graphCapabilities: ResearchGraphCapabilitySummary;
|
|
131
|
-
readonly caveats: readonly string[];
|
|
132
|
-
};
|
|
133
|
-
export type AnalyzeResearchOptions = {
|
|
134
|
-
readonly root: string;
|
|
135
|
-
readonly goal?: string;
|
|
136
|
-
readonly intent?: string;
|
|
137
|
-
readonly facets?: readonly string[];
|
|
138
|
-
readonly mode?: ResearchMode;
|
|
139
|
-
readonly maxFiles?: number;
|
|
140
|
-
};
|
|
141
|
-
export type Manifest = {
|
|
142
|
-
readonly path: string;
|
|
143
|
-
readonly dir: string;
|
|
144
|
-
readonly name?: string;
|
|
145
|
-
readonly deps: ReadonlyMap<string, readonly string[]>;
|
|
146
|
-
readonly entrypoints: readonly string[];
|
|
147
|
-
};
|
|
148
|
-
export type SourceFile = {
|
|
149
|
-
readonly path: string;
|
|
150
|
-
readonly rel: string;
|
|
151
|
-
readonly extension: string;
|
|
152
|
-
readonly language: string;
|
|
153
|
-
readonly imports: readonly string[];
|
|
154
|
-
readonly externalPackages: readonly string[];
|
|
155
|
-
readonly graphFacts?: ResearchGraphFactFile;
|
|
156
|
-
};
|
|
157
|
-
export type ExportSymbol = {
|
|
158
|
-
readonly symbol: string;
|
|
159
|
-
readonly kind: string;
|
|
160
|
-
readonly file: string;
|
|
161
|
-
readonly line: number;
|
|
162
|
-
readonly evidenceSource: 'ast' | 'regex';
|
|
163
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type GraphFactCapability } from '../../../utils/contextUtils.js';
|
|
2
|
-
export declare function sourceExtensions(): ReadonlySet<string>;
|
|
3
|
-
export declare function graphFactCapabilities(): readonly GraphFactCapability[];
|
|
4
|
-
export declare function countBy<T>(items: readonly T[], key: (item: T) => string): Readonly<Record<string, number>>;
|
|
5
|
-
export declare function resolveImport(dir: string, specifier: string, known: ReadonlySet<string>): string | undefined;
|
|
6
|
-
export declare function resolveExistingPath(base: string, known: ReadonlySet<string>): string | undefined;
|
|
7
|
-
export declare function isRelativeSpecifier(specifier: string): boolean;
|
|
8
|
-
export declare function packageNameFromSpecifier(specifier: string): string | undefined;
|
|
9
|
-
export declare function recordValue(value: unknown): Record<string, unknown> | undefined;
|
|
10
|
-
export declare function stringValue(value: unknown): string | undefined;
|
|
11
|
-
export declare function isNonEmptyString(value: string | undefined): value is string;
|
|
12
|
-
export declare function isString(value: unknown): value is string;
|
|
13
|
-
export declare function uniqueStrings(values: readonly string[]): readonly string[];
|
|
14
|
-
export declare function relative(root: string, file: string): string;
|
|
15
|
-
export declare function exportKind(line: string): string;
|
|
16
|
-
export declare function calleeRefersToSymbol(callee: string, symbol: string): boolean;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { AnalyzeResearchOptions, ResearchAnalysisResult } from './analyze/types.js';
|
|
2
|
-
export type { AnalyzeResearchOptions, ResearchAnalysisResult, ResearchDependencyIssue, ResearchFileIssue, ResearchFlowStep, ResearchGraphCapabilitySummary, ResearchGraphFactFile, ResearchIntent, ResearchManifestSummary, ResearchMode, ResearchRetentionSource, ResearchSymbolRow, ResearchSymbolVerdict, } from './analyze/types.js';
|
|
3
|
-
export declare function analyzeResearchFlow(options: AnalyzeResearchOptions): Promise<ResearchAnalysisResult>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ResearchAnalysisResult } from '../analyze.js';
|
|
2
|
-
import type { ResearchEvidencePacket, ResearchGraphSummary, ResearchPacketBundle } from './types.js';
|
|
3
|
-
export declare function tallyPacketVerdicts(packets: readonly ResearchEvidencePacket[]): Pick<ResearchGraphSummary, 'byVerdict' | 'facts' | 'edges'>;
|
|
4
|
-
export declare function buildResearchPackets(analysis: ResearchAnalysisResult): ResearchPacketBundle;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Evidence model for research packets.
|
|
3
|
-
*
|
|
4
|
-
* Pure type/interface definitions describing the evidence graph — subjects,
|
|
5
|
-
* facts, edges, verdicts, and the `ResearchEvidencePacket` shape itself. No
|
|
6
|
-
* construction logic here; see `./builders.ts` for how `ResearchAnalysisResult`
|
|
7
|
-
* is turned into packets built from these types.
|
|
8
|
-
*
|
|
9
|
-
* HONESTY CONTRACT: this layer never invents proof. Native AST facts can prove
|
|
10
|
-
* syntax-level declarations/imports/exports, but cross-file references remain
|
|
11
|
-
* heuristic until LSP proof is attached by the graph adapter or followed via
|
|
12
|
-
* `next.semantic`.
|
|
13
|
-
*/
|
|
14
|
-
import type { OqlContinuation } from '../../types.js';
|
|
15
|
-
export type EvidenceSource = 'ripgrep' | 'regex' | 'ast' | 'symbols' | 'lsp' | 'manifest' | 'graph' | 'exactRead';
|
|
16
|
-
export type EvidenceConfidence = 'exact' | 'heuristic' | 'partial';
|
|
17
|
-
export interface EvidenceLocation {
|
|
18
|
-
uri: string;
|
|
19
|
-
range?: {
|
|
20
|
-
start: {
|
|
21
|
-
line: number;
|
|
22
|
-
character?: number;
|
|
23
|
-
};
|
|
24
|
-
end?: {
|
|
25
|
-
line: number;
|
|
26
|
-
character?: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface EvidenceSubject extends EvidenceLocation {
|
|
31
|
-
id: string;
|
|
32
|
-
kind: 'file' | 'symbol' | 'function' | 'class' | 'method' | 'interface' | 'type' | 'dependency' | 'package' | 'entrypoint';
|
|
33
|
-
name?: string;
|
|
34
|
-
symbolKind?: number | string;
|
|
35
|
-
language?: string;
|
|
36
|
-
}
|
|
37
|
-
export type EvidenceClaim = 'defines' | 'declares' | 'exports' | 'imports' | 'references' | 'calls' | 'extends' | 'implements' | 'typeUses' | 'entrypoint' | 'unresolved' | 'textMatch' | 'structuralMatch';
|
|
38
|
-
export type EvidenceFlag = 'same-file' | 'external' | 'type-only' | 'test-only' | 'dynamic' | 'string-only' | 'unreachable' | 'generated' | 'declaration';
|
|
39
|
-
export interface EvidenceFact {
|
|
40
|
-
id: string;
|
|
41
|
-
subject: EvidenceSubject;
|
|
42
|
-
claim: EvidenceClaim;
|
|
43
|
-
source: EvidenceSource;
|
|
44
|
-
confidence: EvidenceConfidence;
|
|
45
|
-
flags?: EvidenceFlag[];
|
|
46
|
-
value?: unknown;
|
|
47
|
-
}
|
|
48
|
-
export type EvidenceRelation = 'contains' | 'defines' | 'exports' | 'imports' | 'references' | 'calls' | 'constructs' | 'extends' | 'implements' | 'typeUses' | 'retains' | 'reachableFrom' | 'declaresDependency' | 'usesDependency';
|
|
49
|
-
export interface EvidenceEdge {
|
|
50
|
-
id: string;
|
|
51
|
-
from: EvidenceSubject;
|
|
52
|
-
to: EvidenceSubject;
|
|
53
|
-
relation: EvidenceRelation;
|
|
54
|
-
source: EvidenceSource;
|
|
55
|
-
confidence: EvidenceConfidence;
|
|
56
|
-
flags?: EvidenceFlag[];
|
|
57
|
-
via?: EvidenceLocation;
|
|
58
|
-
}
|
|
59
|
-
export type PacketVerdict = 'reachable' | 'candidate-dead' | 'transitive-dead' | 'candidate-unused-file' | 'candidate-unused-dependency' | 'unknown';
|
|
60
|
-
export type PacketProofStatus = 'candidate' | 'confirmed-by-lsp' | 'confirmed-by-ast-and-lsp' | 'needs-framework-graph' | 'conflicting-evidence';
|
|
61
|
-
export type MissingProofKind = 'lsp-unavailable' | 'dynamic-import-unresolved' | 'framework-entrypoint-unknown' | 'tsconfig-paths-unresolved' | 'manifest-rule-missing' | 'parser-failed' | 'pagination-open';
|
|
62
|
-
export interface MissingProof {
|
|
63
|
-
kind: MissingProofKind;
|
|
64
|
-
severity: 'low' | 'medium' | 'high';
|
|
65
|
-
location?: EvidenceLocation;
|
|
66
|
-
}
|
|
67
|
-
export interface ResearchEvidencePacket {
|
|
68
|
-
subject: EvidenceSubject;
|
|
69
|
-
verdict: PacketVerdict;
|
|
70
|
-
proofStatus: PacketProofStatus;
|
|
71
|
-
why: EvidenceFact[];
|
|
72
|
-
retainedBy: EvidenceEdge[];
|
|
73
|
-
retains?: EvidenceEdge[];
|
|
74
|
-
missingProof: MissingProof[];
|
|
75
|
-
proof?: Record<string, unknown>;
|
|
76
|
-
risk: {
|
|
77
|
-
deleteRisk: 'low' | 'medium' | 'high' | 'unknown';
|
|
78
|
-
reason: string;
|
|
79
|
-
};
|
|
80
|
-
next: Record<string, OqlContinuation>;
|
|
81
|
-
}
|
|
82
|
-
export interface ResearchGraphSummary {
|
|
83
|
-
subjects: number;
|
|
84
|
-
facts: number;
|
|
85
|
-
edges: number;
|
|
86
|
-
byVerdict: Record<PacketVerdict, number>;
|
|
87
|
-
}
|
|
88
|
-
export interface ResearchPacketBundle {
|
|
89
|
-
packets: ResearchEvidencePacket[];
|
|
90
|
-
graphSummary: ResearchGraphSummary;
|
|
91
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Research evidence packets.
|
|
3
|
-
*
|
|
4
|
-
* Transforms the heuristic `ResearchAnalysisResult` (reachability + reference +
|
|
5
|
-
* dependency analysis) into compact, decision-grade `ResearchEvidencePacket`s —
|
|
6
|
-
* the agent's unit for "what looks dead, why, what keeps it alive, what proof is
|
|
7
|
-
* missing, and is it safe to delete".
|
|
8
|
-
*
|
|
9
|
-
* HONESTY CONTRACT: this layer never invents proof. Native AST facts can prove
|
|
10
|
-
* syntax-level declarations/imports/exports, but cross-file references remain
|
|
11
|
-
* heuristic until LSP proof is attached by the graph adapter or followed via
|
|
12
|
-
* `next.semantic`.
|
|
13
|
-
*
|
|
14
|
-
* This module is a thin barrel: the evidence model (types/interfaces) lives in
|
|
15
|
-
* `./packets/types.ts`, and the packet-construction logic (including
|
|
16
|
-
* `buildResearchPackets`/`tallyPacketVerdicts`) lives in `./packets/builders.ts`.
|
|
17
|
-
* Both are re-exported here so existing `from '.../research/packets.js'`
|
|
18
|
-
* imports keep working unchanged.
|
|
19
|
-
*/
|
|
20
|
-
export type { EvidenceSource, EvidenceConfidence, EvidenceLocation, EvidenceSubject, EvidenceClaim, EvidenceFlag, EvidenceFact, EvidenceRelation, EvidenceEdge, PacketVerdict, PacketProofStatus, MissingProofKind, MissingProof, ResearchEvidencePacket, ResearchGraphSummary, ResearchPacketBundle, } from './packets/types.js';
|
|
21
|
-
export { buildResearchPackets, tallyPacketVerdicts, } from './packets/builders.js';
|
package/dist/oql/run/batch.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-row continuation builders for code/content rows and record rows
|
|
3
|
-
* (materialized/research/graph). See registry.ts for how these are
|
|
4
|
-
* wired into ROW_CONTINUATION_BUILDERS and attached to result rows.
|
|
5
|
-
*/
|
|
6
|
-
import type { OqlContinuation, OqlResultRow } from '../../types.js';
|
|
7
|
-
import type { ContinuationCtx } from './types.js';
|
|
8
|
-
export declare function buildCodeContinuations(row: OqlResultRow, ctx: ContinuationCtx): Record<string, OqlContinuation> | undefined;
|
|
9
|
-
export declare function buildContentContinuations(row: OqlResultRow, ctx: ContinuationCtx): Record<string, OqlContinuation> | undefined;
|
|
10
|
-
export declare function buildMaterializedContinuations(row: OqlResultRow): Record<string, OqlContinuation> | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* `target:"research"` stays candidate-grade — it never runs LSP internally — but
|
|
13
|
-
* it emits a one-call `next.graph` upgrade. `target:"graph"` emits the same
|
|
14
|
-
* upgrade when an analyze row still has missing proof. The upgrade is page-aligned
|
|
15
|
-
* and bounded by `proofLimit`, so agents can close proof without losing the
|
|
16
|
-
* research/graph honesty boundary.
|
|
17
|
-
*/
|
|
18
|
-
export declare function buildResearchContinuations(row: OqlResultRow, ctx: ContinuationCtx): Record<string, OqlContinuation> | undefined;
|
|
19
|
-
export declare function buildGraphContinuations(row: OqlResultRow, ctx: ContinuationCtx): Record<string, OqlContinuation> | undefined;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Emit executable `next.*` continuations (contract Gate 10). Every continuation
|
|
3
|
-
* is a full canonical OQL query runnable as-is.
|
|
4
|
-
*
|
|
5
|
-
* Envelope-level:
|
|
6
|
-
* - next.page — more result pages remain
|
|
7
|
-
* - next.matchPage — per-file matches were capped
|
|
8
|
-
*
|
|
9
|
-
* Per-row continuations are produced by a registry keyed by row kind (and, for
|
|
10
|
-
* record rows, recordType) so adding a new row's continuations is one entry,
|
|
11
|
-
* never another `else if`:
|
|
12
|
-
* - code → next.fetch (read exact content) [+ next.semantic on local]
|
|
13
|
-
* - content → next.charRange (page the body)
|
|
14
|
-
* - materialized→ next.structure / next.files rooted at the checkpoint path
|
|
15
|
-
* - semantics → next.fetch (read the code at a symbol location)
|
|
16
|
-
* - graph → next.graph (bounded LSP proof for candidate graph pages)
|
|
17
|
-
*/
|
|
18
|
-
import type { AdapterResult } from '../../adapters/local.js';
|
|
19
|
-
import type { OqlContinuation, OqlContinuationHint, OqlQuery, OqlResultRow } from '../../types.js';
|
|
20
|
-
export declare function attachContinuations(query: OqlQuery, exec: AdapterResult): Record<string, OqlContinuation>;
|
|
21
|
-
export declare function compactRowContinuationHints(results: OqlResultRow[]): Record<string, OqlContinuationHint> | undefined;
|
|
22
|
-
export declare function hintsEqual(left: OqlContinuationHint, right: OqlContinuationHint): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared types for the per-row continuation builders (registry.ts, records.ts,
|
|
3
|
-
* semantics.ts). Split out so builder modules can share the context/type shape
|
|
4
|
-
* without creating a runtime circular import with the registry.
|
|
5
|
-
*/
|
|
6
|
-
import type { OqlContinuation, OqlQuery, OqlResultRow } from '../../types.js';
|
|
7
|
-
export interface ContinuationCtx {
|
|
8
|
-
query: OqlQuery;
|
|
9
|
-
/** code rows: rebuild an absolute `from` from a relativized row path. */
|
|
10
|
-
fileFrom?: (rowPath: string) => OqlQuery['from'];
|
|
11
|
-
}
|
|
12
|
-
export type RowContinuationBuilder = (row: OqlResultRow, ctx: ContinuationCtx) => Record<string, OqlContinuation> | undefined;
|
package/dist/oql/run/dryRun.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PlanQueryResult } from '../planner.js';
|
|
2
|
-
import type { OqlQuery, OqlResultEnvelope } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* `target:"files"` over a GitHub source with no `where` cannot be enumerated by
|
|
5
|
-
* the provider, so the plan is non-executable (audit #6). Instead of a dead end,
|
|
6
|
-
* hand the agent a runnable next.materialize query — clone a bounded corpus and
|
|
7
|
-
* list files from the materialized checkpoint — mirroring the providerUnindexed
|
|
8
|
-
* recovery path.
|
|
9
|
-
*/
|
|
10
|
-
export declare function blockedMaterializeContinuation(query?: OqlQuery): OqlResultEnvelope['next'] | undefined;
|
|
11
|
-
export declare function unsupportedEnvelopeFromPlan(planned: PlanQueryResult, plan: OqlResultEnvelope['plan'], queryId?: string, queryIndex?: number, dryRun?: boolean, query?: OqlQuery): OqlResultEnvelope;
|
package/dist/oql/run/paths.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { OqlQuery, OqlResultRow } from '../types.js';
|
|
2
|
-
export declare function relativizeBase(root: string): string;
|
|
3
|
-
export declare function queryLocalRoot(query: OqlQuery): string | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* Relativize absolute local result paths to the query root (see relativizeBase),
|
|
6
|
-
* keeping `search` aligned with the former grep/ls shortcuts and far less verbose. Provider
|
|
7
|
-
* (GitHub) paths are already repo-relative and left untouched.
|
|
8
|
-
*/
|
|
9
|
-
export declare function relativizeResultPaths(query: OqlQuery, results: OqlResultRow[]): void;
|
|
10
|
-
/**
|
|
11
|
-
* For local/materialized sources, return a builder that turns a relativized
|
|
12
|
-
* row path back into an absolute-file `from` (relativization stripped exactly
|
|
13
|
-
* `dirname(resolve(root)) + '/'`, so re-adding it round-trips).
|
|
14
|
-
*/
|
|
15
|
-
export declare function localFileSource(query: OqlQuery): ((rowPath: string) => OqlQuery['from']) | undefined;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Proof-grade inference: labels every result row with how strong its evidence
|
|
3
|
-
* is (structural/text/semantic/graph/candidate/missing), defaulting any row a
|
|
4
|
-
* backend didn't already grade.
|
|
5
|
-
*/
|
|
6
|
-
import type { OqlProofGradedResultRow, OqlQuery, OqlResultRow } from '../types.js';
|
|
7
|
-
export declare function applyProofGrades(query: OqlQuery, results: OqlResultRow[]): asserts results is OqlProofGradedResultRow[];
|
|
8
|
-
export declare function hasMissingProof(data: Record<string, unknown>): boolean;
|
package/dist/oql/run/select.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OqlQuery, OqlResultEnvelope, OqlResultRow } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Project result rows to the requested `select` fields. Projection only: it
|
|
4
|
-
* filters which fields/continuations appear, never adds data or changes the
|
|
5
|
-
* result domain. Identity fields always survive. Unknown selectors yield a
|
|
6
|
-
* non-blocking `unknownField` diagnostic. Dotted record-data selectors
|
|
7
|
-
* (e.g. `data.summary`) are accepted but not sub-projected (the whole `data`
|
|
8
|
-
* stays if `data` is selected).
|
|
9
|
-
*/
|
|
10
|
-
export declare function applySelect(query: OqlQuery, results: OqlResultRow[]): OqlResultEnvelope['diagnostics'];
|
package/dist/oql/run/single.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Single-query execution: normalize -> plan -> (explain) -> execute via
|
|
3
|
-
* adapter -> envelope. Also the per-result-set helpers (pagination window,
|
|
4
|
-
* shared-ref pruning, uniform-source stripping) that only apply within one
|
|
5
|
-
* query's result set.
|
|
6
|
-
*/
|
|
7
|
-
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
8
|
-
import type { OqlQuery, OqlResultEnvelope, OqlResultRow } from '../types.js';
|
|
9
|
-
export interface RunOptions {
|
|
10
|
-
authInfo?: AuthInfo;
|
|
11
|
-
/** Plan only; do not execute. Maps to `octocode search --dry-run`. */
|
|
12
|
-
dryRun?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Per-row `source` is identical for every row of a single-source query (one
|
|
16
|
-
* `from`), so repeating it on each row is pure token noise — the source already
|
|
17
|
-
* lives once in `provenance`. Strip it when uniform. A merged cross-source batch
|
|
18
|
-
* has rows from different sources (NOT uniform) → kept, so mergeChildren's
|
|
19
|
-
* rowKey dedup stays exact. Always runs AFTER merge.
|
|
20
|
-
*/
|
|
21
|
-
export declare function stripUniformSource(results: OqlResultRow[]): void;
|
|
22
|
-
export declare function runSingle(query: OqlQuery, rawInput: unknown, options: RunOptions, queryIndex?: number): Promise<OqlResultEnvelope>;
|
package/dist/oql/run.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type OqlRunResult, type OqlSearchInput } from './types.js';
|
|
2
|
-
import { type RunOptions } from './run/single.js';
|
|
3
|
-
export type { RunOptions };
|
|
4
|
-
export type { ContinuationCtx } from './run/continuations/types.js';
|
|
5
|
-
export declare function runOqlSearch(input: OqlSearchInput, options?: RunOptions): Promise<OqlRunResult>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OQL predicate-tree Zod schemas.
|
|
3
|
-
*
|
|
4
|
-
* Split out of `../schema.ts` (kept as a barrel) so that file stays under the
|
|
5
|
-
* repo's `max-lines: 400` ESLint rule. This group is self-contained: the
|
|
6
|
-
* predicate tree (`PredicateSchema`) and its leaf kinds (text/regex/structural
|
|
7
|
-
* /field) don't depend on anything else in the OQL schema module.
|
|
8
|
-
*/
|
|
9
|
-
import { z } from 'zod';
|
|
10
|
-
export declare const StructuralRuleSchema: z.ZodType;
|
|
11
|
-
export declare const StructuralRuleInputSchema: z.ZodUnion<readonly [z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodString]>;
|
|
12
|
-
export declare const PredicateSchema: z.ZodType;
|