@coggit/core 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/dist/acceptance.d.ts +7 -0
- package/dist/affected.d.ts +7 -0
- package/dist/cognition/handbooks.d.ts +3 -0
- package/dist/cognition/index.d.ts +34 -0
- package/dist/cognition/templates.d.ts +3 -0
- package/dist/cognitionDiscovery.d.ts +9 -0
- package/dist/cognitionDocumentFacts.d.ts +6 -0
- package/dist/cognitionRoutes.d.ts +10 -0
- package/dist/cognitionTypes.d.ts +100 -0
- package/dist/directoryEntrySourceFact.d.ts +8 -0
- package/dist/gitignore.d.ts +28 -0
- package/dist/hash.d.ts +13 -0
- package/dist/identity.d.ts +76 -0
- package/dist/interfaces.d.ts +174 -0
- package/dist/internal.d.ts +57 -0
- package/dist/internal.js +14229 -0
- package/dist/layout.d.ts +3 -0
- package/dist/locks.d.ts +44 -0
- package/dist/logger.d.ts +17 -0
- package/dist/maintenance.d.ts +7 -0
- package/dist/maintenancePresentation.d.ts +16 -0
- package/dist/mapping.d.ts +98 -0
- package/dist/operationTypes.d.ts +45 -0
- package/dist/operations.d.ts +228 -0
- package/dist/path-utils.d.ts +26 -0
- package/dist/pathHints.d.ts +31 -0
- package/dist/project/buildSnapshot.d.ts +10 -0
- package/dist/project/discover.d.ts +32 -0
- package/dist/project/index.d.ts +8 -0
- package/dist/project/init.d.ts +22 -0
- package/dist/project/project.d.ts +44 -0
- package/dist/project/projectContext.d.ts +4 -0
- package/dist/project/workspace.d.ts +5 -0
- package/dist/projection.d.ts +34 -0
- package/dist/public.d.ts +50 -0
- package/dist/public.js +13733 -0
- package/dist/registry/inMemoryRegistryProvider.d.ts +18 -0
- package/dist/registry/index.d.ts +104 -0
- package/dist/registry/reconcile.d.ts +82 -0
- package/dist/registry/sourceRelocation.d.ts +11 -0
- package/dist/registryTypes.d.ts +52 -0
- package/dist/routesProjection.d.ts +65 -0
- package/dist/snapshot/index.d.ts +3 -0
- package/dist/snapshot/mappingIndex.d.ts +2 -0
- package/dist/snapshot/tree.d.ts +15 -0
- package/dist/snapshotTypes.d.ts +133 -0
- package/dist/sourceStructureIgnore.d.ts +4 -0
- package/dist/status/evidence.d.ts +44 -0
- package/dist/status/index.d.ts +89 -0
- package/dist/status/lookupCognition.d.ts +23 -0
- package/dist/status/statusAgentPresentation.d.ts +37 -0
- package/dist/status/statusPresentation.d.ts +43 -0
- package/dist/status/statusTriage.d.ts +50 -0
- package/dist/status/statusTypes.d.ts +240 -0
- package/dist/systemPrompt.d.ts +24 -0
- package/dist/time.d.ts +2 -0
- package/dist/types.d.ts +5 -0
- package/dist/uri-utils.d.ts +35 -0
- package/dist/watchHost.d.ts +44 -0
- package/dist/watchPipeline.d.ts +31 -0
- package/package.json +48 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@coggit/core` are documented here. Format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/); versioning is semver.
|
|
5
|
+
|
|
6
|
+
## [0.2.0] - 2026-09-05
|
|
7
|
+
|
|
8
|
+
Initial npm publish. `0.2.0` matches the monorepo split source (see ADR 0017 /
|
|
9
|
+
ADR 0019); there is no npm release for `0.1.0`.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Public `.` export surface: source/cognition freshness semantics, registry,
|
|
14
|
+
snapshot, status, and operations, assembled via `createCoggitServices` port
|
|
15
|
+
contracts.
|
|
16
|
+
- `./internal` subpath for trusted monorepo consumers (the published `coggit`
|
|
17
|
+
CLI); ships in the tarball with no third-party stability promise.
|
|
18
|
+
- Zero runtime dependencies (`yaml` is bundled at build time).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CatheadOwl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @coggit/core
|
|
2
|
+
|
|
3
|
+
CogGit core kernel: source/cognition freshness semantics, registry, snapshot,
|
|
4
|
+
status, and operations. Runtime-agnostic — filesystem, config, and registry
|
|
5
|
+
access come in through port contracts you implement.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @coggit/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Minimal usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createCoggitServices, statusOperation } from '@coggit/core';
|
|
17
|
+
|
|
18
|
+
// Assemble the kernel against your runtime's port implementations.
|
|
19
|
+
const services = createCoggitServices({
|
|
20
|
+
fs: myFileSystem, // implements the FileSystem port
|
|
21
|
+
config: myConfig, // implements the ConfigProvider port
|
|
22
|
+
registry: myRegistry, // RegistryProviderFactory
|
|
23
|
+
logger: myLogger, // optional
|
|
24
|
+
locks: myLocks, // optional
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const result = await statusOperation(services, { sourcePath: 'src/main.ts' });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Node host? Use [`@coggit/runtime-node`](../runtime-node/README.md), which
|
|
31
|
+
ships ready-made local-filesystem adapters and
|
|
32
|
+
`createNodeCoggitServices`.
|
|
33
|
+
|
|
34
|
+
## Surface notes
|
|
35
|
+
|
|
36
|
+
- The `.` export is the public contract (see `src/public.ts`).
|
|
37
|
+
- `@coggit/core/internal` is a trusted-consumer face used by the published
|
|
38
|
+
`coggit` CLI; it ships in the tarball but carries **no stability promise**
|
|
39
|
+
for third parties.
|
|
40
|
+
|
|
41
|
+
Architecture, concepts, and workflow docs live in the
|
|
42
|
+
[repository root](https://github.com/CatheadOwl/coggit#readme).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AcceptanceStore } from './interfaces';
|
|
2
|
+
import type { AcceptedPair } from './registryTypes';
|
|
3
|
+
export interface AcceptCurrentPairResult {
|
|
4
|
+
accepted: AcceptedPair | null;
|
|
5
|
+
changed: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function acceptCurrentPair(store: AcceptanceStore, rootId: string, sourceKey: string, sourceIdentity: AcceptedPair['source'], cognitionContent: string | null): AcceptCurrentPairResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AffectedResult, MappingIndex } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Given changed source or cognition paths, calculate affected source-cognition pairs.
|
|
4
|
+
* Phase 2 incremental refresh uses this to avoid full rebuilds when existing mapped
|
|
5
|
+
* files change. Unknown create/delete paths are handled by the caller as full rebuilds.
|
|
6
|
+
*/
|
|
7
|
+
export declare function calculateAffected(changedPaths: string[], mapping: MappingIndex): AffectedResult;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { FileSystem, UriComponents } from '../interfaces';
|
|
2
|
+
import type { CoggitWorkspaceRoot } from '../types';
|
|
3
|
+
import type { Registry } from '../registry/index';
|
|
4
|
+
export type CognitionKind = 'leaf' | 'skeleton';
|
|
5
|
+
export type AddCognitionKind = CognitionKind | 'auto';
|
|
6
|
+
export interface AddCognitionOptions {
|
|
7
|
+
kind?: AddCognitionKind;
|
|
8
|
+
overwrite?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface AddCognitionResult {
|
|
11
|
+
kind: CognitionKind;
|
|
12
|
+
sourcePath: string;
|
|
13
|
+
cognitionPath: string;
|
|
14
|
+
cognitionUri: UriComponents;
|
|
15
|
+
created: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface CognitionTemplate {
|
|
18
|
+
kind: CognitionKind;
|
|
19
|
+
version: 'skeleton-leaf-v3';
|
|
20
|
+
content: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CognitionHandbook {
|
|
23
|
+
kind: CognitionKind | 'all';
|
|
24
|
+
version: 'skeleton-leaf-v3';
|
|
25
|
+
content: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function addCognition(root: CoggitWorkspaceRoot, fs: FileSystem, registry: Registry | null, sourcePath: string, options?: AddCognitionOptions): Promise<AddCognitionResult>;
|
|
28
|
+
export declare function getCognitionTemplate(kind: CognitionKind): CognitionTemplate;
|
|
29
|
+
export declare function getCognitionHandbook(kind: CognitionKind): CognitionHandbook;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated The aggregate handbook is retained only for CLI compatibility.
|
|
32
|
+
* Use the node-kind handbooks ('leaf' or 'skeleton') for maintained guidance.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getCognitionHandbook(kind?: 'all'): CognitionHandbook;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FileSystem, UriComponents } from './interfaces';
|
|
2
|
+
import type { CognitionDiscoveryEntry } from './types';
|
|
3
|
+
export interface CognitionDiscoveryOptions {
|
|
4
|
+
sourceRootUri?: UriComponents;
|
|
5
|
+
checkSourceCandidates?: boolean;
|
|
6
|
+
shouldSkipDirectory?: (name: string) => boolean;
|
|
7
|
+
}
|
|
8
|
+
export type CognitionDiscovery = Map<string, CognitionDiscoveryEntry>;
|
|
9
|
+
export declare function discoverCognitionEntries(fs: FileSystem, cognitionRootUri: UriComponents, options?: CognitionDiscoveryOptions): Promise<CognitionDiscovery>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CognitionDocumentFacts, CognitionHeading } from './types';
|
|
2
|
+
export interface ParseCognitionDocumentFactsOptions {
|
|
3
|
+
mtimeMs?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function parseCognitionDocumentFacts(cognitionPath: string, content: string, options?: ParseCognitionDocumentFactsOptions): CognitionDocumentFacts;
|
|
6
|
+
export declare function extractCognitionHeadings(content: string): CognitionHeading[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileSystem } from './interfaces';
|
|
2
|
+
import type { CoggitProjectContext, CoggitWorkspaceRoot, CognitionRoutes, PathKeyRecord } from './types';
|
|
3
|
+
export interface BuildCognitionRoutesOptions {
|
|
4
|
+
includeHeadings?: boolean;
|
|
5
|
+
maxHeadingDepth?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface CognitionRoutesRegistryLookup {
|
|
8
|
+
getEntry(key: string): PathKeyRecord | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function buildCognitionRoutes(root: CoggitWorkspaceRoot, fs: FileSystem, registryLookup: CognitionRoutesRegistryLookup | null, project: CoggitProjectContext, options?: BuildCognitionRoutesOptions): Promise<CognitionRoutes>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { CoggitOperationAction, CoggitProjectContext } from './operationTypes';
|
|
2
|
+
import type { ObservedStatus } from './status/statusTypes';
|
|
3
|
+
export type CognitionDocumentKind = 'leaf' | 'folder';
|
|
4
|
+
export interface CognitionFrontmatterMetadata {
|
|
5
|
+
type?: string;
|
|
6
|
+
layer?: string;
|
|
7
|
+
module?: string;
|
|
8
|
+
kind?: string;
|
|
9
|
+
tags?: string[];
|
|
10
|
+
apiSurface?: string[];
|
|
11
|
+
retrieval?: {
|
|
12
|
+
summary?: string;
|
|
13
|
+
intents?: string[];
|
|
14
|
+
};
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface CognitionFrontmatter {
|
|
18
|
+
name: string | null;
|
|
19
|
+
description: string | null;
|
|
20
|
+
metadata: CognitionFrontmatterMetadata;
|
|
21
|
+
raw: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface CognitionHeading {
|
|
24
|
+
depth: 1 | 2 | 3 | 4 | 5 | 6;
|
|
25
|
+
text: string;
|
|
26
|
+
line: number;
|
|
27
|
+
slug: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CognitionDocumentMetrics {
|
|
30
|
+
charLength: number;
|
|
31
|
+
lineCount: number;
|
|
32
|
+
nonEmptyLineCount: number;
|
|
33
|
+
contentHash: string;
|
|
34
|
+
mtimeMs: number;
|
|
35
|
+
}
|
|
36
|
+
export interface CognitionDocumentDiagnostic {
|
|
37
|
+
code: 'missing-frontmatter' | 'malformed-frontmatter' | 'missing-name' | 'missing-description' | 'weak-description' | 'missing-metadata-type' | 'invalid-metadata-tags' | 'invalid-metadata-api-surface' | 'invalid-metadata-retrieval-intents' | 'duplicate-cognition-key' | 'source-path-outside-source-root' | 'unreadable-cognition-file';
|
|
38
|
+
severity: 'info' | 'warning' | 'error';
|
|
39
|
+
message: string;
|
|
40
|
+
}
|
|
41
|
+
export interface CognitionDocumentFacts {
|
|
42
|
+
cognitionPath: string;
|
|
43
|
+
key: string;
|
|
44
|
+
kind: CognitionDocumentKind;
|
|
45
|
+
frontmatter: CognitionFrontmatter;
|
|
46
|
+
headings: CognitionHeading[];
|
|
47
|
+
metrics: CognitionDocumentMetrics;
|
|
48
|
+
diagnostics: CognitionDocumentDiagnostic[];
|
|
49
|
+
}
|
|
50
|
+
export type CognitionMetadataQuality = 'good' | 'usable' | 'poor';
|
|
51
|
+
export type CognitionContextStaleRisk = 'low' | 'medium' | 'high' | 'unknown';
|
|
52
|
+
export interface CognitionRoutes {
|
|
53
|
+
project: CoggitProjectContext;
|
|
54
|
+
generatedAt: number;
|
|
55
|
+
entries: CognitionRoutesEntry[];
|
|
56
|
+
diagnostics: CognitionDocumentDiagnostic[];
|
|
57
|
+
}
|
|
58
|
+
export interface CognitionRoutesEntry {
|
|
59
|
+
key: string;
|
|
60
|
+
/** Bound source path, project-root-relative (from the registry binding). */
|
|
61
|
+
projectRelativeSourcePath: string | null;
|
|
62
|
+
/** Cognition document path, project-root-relative. */
|
|
63
|
+
cognitionPath: string;
|
|
64
|
+
documentKind: CognitionDocumentKind;
|
|
65
|
+
metadataType: string | null;
|
|
66
|
+
identity: CognitionContextIdentity;
|
|
67
|
+
document: CognitionContextDocumentSummary;
|
|
68
|
+
quality: CognitionContextQuality;
|
|
69
|
+
status: CognitionContextStatus;
|
|
70
|
+
diagnostics: CognitionDocumentDiagnostic[];
|
|
71
|
+
suggestedActions: CoggitOperationAction[];
|
|
72
|
+
}
|
|
73
|
+
export interface CognitionContextIdentity {
|
|
74
|
+
name: string | null;
|
|
75
|
+
description: string | null;
|
|
76
|
+
retrievalSummary: string | null;
|
|
77
|
+
retrievalIntents: string[];
|
|
78
|
+
tags: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface CognitionContextDocumentSummary {
|
|
81
|
+
metrics: CognitionDocumentMetrics;
|
|
82
|
+
headings: CognitionHeading[];
|
|
83
|
+
headingCount: number;
|
|
84
|
+
}
|
|
85
|
+
export interface CognitionContextQuality {
|
|
86
|
+
metadataQuality: CognitionMetadataQuality;
|
|
87
|
+
staleRisk: CognitionContextStaleRisk;
|
|
88
|
+
}
|
|
89
|
+
export interface CognitionContextStatus {
|
|
90
|
+
observedStatus: ObservedStatus | null;
|
|
91
|
+
staleRisk: CognitionContextStaleRisk;
|
|
92
|
+
}
|
|
93
|
+
export interface RoutesProjectionNode {
|
|
94
|
+
path: string;
|
|
95
|
+
cognition?: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
truncated?: boolean;
|
|
98
|
+
omittedChildrenCount?: number;
|
|
99
|
+
children?: RoutesProjectionNode[];
|
|
100
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FileSystem, UriComponents } from './interfaces';
|
|
2
|
+
export interface DirectoryEntrySourceFactItem {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly kind: 'file' | 'folder';
|
|
5
|
+
}
|
|
6
|
+
export declare function directoryEntryFingerprint(items: readonly DirectoryEntrySourceFactItem[]): string;
|
|
7
|
+
export declare function directoryEntryItemsFromReadDirectory(entries: readonly (readonly [string, number])[]): DirectoryEntrySourceFactItem[];
|
|
8
|
+
export declare function readDirectoryEntryFingerprint(fs: FileSystem, directoryUri: UriComponents): Promise<string | undefined>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { UriComponents } from './interfaces';
|
|
2
|
+
export interface CoggitIgnoreRuleSet {
|
|
3
|
+
rules: IgnoreRule[];
|
|
4
|
+
}
|
|
5
|
+
interface IgnoreRule {
|
|
6
|
+
basePath: string;
|
|
7
|
+
pattern: string;
|
|
8
|
+
negated: boolean;
|
|
9
|
+
directoryOnly: boolean;
|
|
10
|
+
anchored: boolean;
|
|
11
|
+
hasSlash: boolean;
|
|
12
|
+
segmentRegExp: RegExp;
|
|
13
|
+
pathRegExp: RegExp;
|
|
14
|
+
}
|
|
15
|
+
export interface FileReader {
|
|
16
|
+
readFile(uri: UriComponents): Promise<string>;
|
|
17
|
+
exists(uri: UriComponents): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
export declare function loadGitignoreRules(projectRootUri: UriComponents, directoryUri: UriComponents, inheritedRules: CoggitIgnoreRuleSet, fileReader: FileReader): Promise<CoggitIgnoreRuleSet>;
|
|
20
|
+
export declare function isIgnoredByGitignoreRules(projectRootUri: UriComponents, ruleSet: CoggitIgnoreRuleSet, uri: UriComponents, isDirectory: boolean): boolean;
|
|
21
|
+
declare function parseGitignoreRules(contents: string, basePath?: string): IgnoreRule[];
|
|
22
|
+
declare function matchesRule(rule: IgnoreRule, relativePath: string, isDirectory: boolean): boolean;
|
|
23
|
+
export declare const __testing__: {
|
|
24
|
+
parseGitignoreRules: typeof parseGitignoreRules;
|
|
25
|
+
matchesRule: typeof matchesRule;
|
|
26
|
+
isIgnoredByGitignoreRules: typeof isIgnoredByGitignoreRules;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
package/dist/hash.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SourceFactKind } from './status/statusTypes';
|
|
2
|
+
export type ContentIdentity = `sha256:v1:${string}`;
|
|
3
|
+
/** Compute the legacy unprefixed SHA-256 used by reconcile rename caches. */
|
|
4
|
+
export declare function computeBlobHash(content: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Compute the versioned CogGit identity used by freshness acceptance.
|
|
7
|
+
* Domain separation prevents the same bytes in different fact kinds from
|
|
8
|
+
* accidentally sharing an identity.
|
|
9
|
+
*/
|
|
10
|
+
export declare function computeContentIdentity(kind: 'leaf' | 'cognition' | 'folder', content: string): ContentIdentity;
|
|
11
|
+
export declare function computeSourceFactIdentity(kind: SourceFactKind, content: string): ContentIdentity;
|
|
12
|
+
export declare function computeCognitionIdentity(content: string): ContentIdentity;
|
|
13
|
+
export declare function isContentIdentity(value: unknown): value is ContentIdentity;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure path/URI-to-key conversion functions for the CogGit registry.
|
|
3
|
+
*
|
|
4
|
+
* Registry keys are cognition-root-derived identities used in
|
|
5
|
+
* .coggit/registry.json. They are path-shaped keys, not general source paths.
|
|
6
|
+
* Path anchors are specified in the registry path contract spec.
|
|
7
|
+
* No IO, no state -- just string transformations.
|
|
8
|
+
*
|
|
9
|
+
* The `.md`/`README` source↔cognition pairing convention lives in `mapping.ts`
|
|
10
|
+
* (`sourceIdentityToCognitionIdentity` / `cognitionIdentityToSourceIdentity`);
|
|
11
|
+
* this module reuses it for key derivation rather than re-deriving it.
|
|
12
|
+
*/
|
|
13
|
+
/** Minimum content length (in chars) for rename pairing to avoid false positives on empty template skeletons. */
|
|
14
|
+
export declare const MIN_RENAME_PAIRING_LENGTH = 100;
|
|
15
|
+
/**
|
|
16
|
+
* Transform a source-relative path (with extension) to a registry key.
|
|
17
|
+
*
|
|
18
|
+
* Rules:
|
|
19
|
+
* - Strip the file extension (last `.` onwards)
|
|
20
|
+
* - Normalize separators to `/`
|
|
21
|
+
* - Keep dotfiles' dot in the name (`.eslintrc.js` -> `.eslintrc`)
|
|
22
|
+
*
|
|
23
|
+
* @example sourcePathToKey("src/model/types.ts") // -> "src/model/types"
|
|
24
|
+
* @example sourcePathToKey("src/utils/helpers.js") // -> "src/utils/helpers"
|
|
25
|
+
* @example sourcePathToKey("src/index.ts") // -> "src/index"
|
|
26
|
+
* @example sourcePathToKey("foo.ts.md") // -> "foo.ts"
|
|
27
|
+
* @example sourcePathToKey(".eslintrc.js") // -> ".eslintrc"
|
|
28
|
+
* @example sourcePathToKey("noext") // -> "noext"
|
|
29
|
+
* @example sourcePathToKey(".hidden") // -> ".hidden"
|
|
30
|
+
*/
|
|
31
|
+
export declare function sourcePathToKey(relativePath: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Transform a cognition-relative path (`.md` file) to a registry key.
|
|
34
|
+
*
|
|
35
|
+
* Rules:
|
|
36
|
+
* - Strip trailing `.md`
|
|
37
|
+
* - If remaining path is `"README"` (leaf name is README) -> return `"<parent-dir>/"`
|
|
38
|
+
* (trailing slash = folder key)
|
|
39
|
+
* - If remaining path is `""` -> return `"/"` (root key)
|
|
40
|
+
*
|
|
41
|
+
* @example cognitionPathToKey("src/model/types.ts.md") // -> "src/model/types.ts"
|
|
42
|
+
* @example cognitionPathToKey("src/README.md") // -> "src/"
|
|
43
|
+
* @example cognitionPathToKey("README.md") // -> "/"
|
|
44
|
+
*/
|
|
45
|
+
export declare function cognitionPathToKey(relativePath: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Determine whether a cognition file participates in registry tracking.
|
|
48
|
+
*
|
|
49
|
+
* Tracked cognition files have a source-pairing convention:
|
|
50
|
+
* - `README.md` at any depth maps to a folder → tracked
|
|
51
|
+
* - `<name>.<ext>.md` (basename contains a source-like extension before `.md`) → tracked
|
|
52
|
+
*
|
|
53
|
+
* Free-form cognition documents (CODE_MAP.md, MODULES.md, INDEX.md, etc.) do NOT
|
|
54
|
+
* map to a specific source node and are excluded from registry tracking.
|
|
55
|
+
*
|
|
56
|
+
* @param relativePath Cognition-root-relative path (e.g. "src/CODE_MAP.md")
|
|
57
|
+
*
|
|
58
|
+
* @example isTrackedCognitionFile("README.md") // true
|
|
59
|
+
* @example isTrackedCognitionFile("src/README.md") // true
|
|
60
|
+
* @example isTrackedCognitionFile("src/types.ts.md") // true
|
|
61
|
+
* @example isTrackedCognitionFile("src/CODE_MAP.md") // false
|
|
62
|
+
* @example isTrackedCognitionFile("src/core/MODULES.md") // false
|
|
63
|
+
*/
|
|
64
|
+
export declare function isTrackedCognitionFile(relativePath: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Build the cognition-relative path from a registry key.
|
|
67
|
+
*
|
|
68
|
+
* @param key - Registry key (e.g. "src/model/types", "src/", "/")
|
|
69
|
+
* @param kind - "leaf" for individual file cognition, "folder" for folder README cognition
|
|
70
|
+
*
|
|
71
|
+
* @example keyToCognitionPath("src/model/types", "leaf") // -> "src/model/types.md"
|
|
72
|
+
* @example keyToCognitionPath("src/model/types", "folder") // -> "src/model/types/README.md"
|
|
73
|
+
* @example keyToCognitionPath("src/", "folder") // -> "src/README.md"
|
|
74
|
+
* @example keyToCognitionPath("/", "folder") // -> "README.md"
|
|
75
|
+
*/
|
|
76
|
+
export declare function keyToCognitionPath(key: string, kind: 'leaf' | 'folder'): string;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import type { AddCognitionOptions, AddCognitionResult, CognitionHandbook, CognitionKind, CognitionTemplate } from './cognition';
|
|
2
|
+
import type { CoggitSnapshot, CoggitTreeNode, CoggitWorkspaceRoot, CognitionRoutes, AcceptedPair, MaintenanceDiagnostic, MisplacedCognitionEntry, OrphanedCognitionEntry, StrayCognitionEntry, UnboundCognitionEntry, RegistryProvider } from './types';
|
|
3
|
+
import type { BuildCognitionRoutesOptions } from './cognitionRoutes';
|
|
4
|
+
import type { CoggitLogger } from './logger';
|
|
5
|
+
import type { ProjectLockManager } from './locks';
|
|
6
|
+
export interface UriComponents {
|
|
7
|
+
scheme: string;
|
|
8
|
+
authority: string;
|
|
9
|
+
path: string;
|
|
10
|
+
query: string;
|
|
11
|
+
fragment: string;
|
|
12
|
+
}
|
|
13
|
+
export type UriKey = string;
|
|
14
|
+
export interface FileSystem {
|
|
15
|
+
readFile(uri: UriComponents): Promise<string>;
|
|
16
|
+
writeFile(uri: UriComponents, content: string): Promise<void>;
|
|
17
|
+
stat(uri: UriComponents): Promise<FileStat | undefined>;
|
|
18
|
+
readDirectory(uri: UriComponents): Promise<Array<[string, number]>>;
|
|
19
|
+
exists(uri: UriComponents): Promise<boolean>;
|
|
20
|
+
createDirectory(uri: UriComponents): Promise<void>;
|
|
21
|
+
/** Delete a file at the given URI. No-op if the file does not exist. */
|
|
22
|
+
delete(uri: UriComponents): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface FileStat {
|
|
25
|
+
isDirectory: boolean;
|
|
26
|
+
mtimeMs: number;
|
|
27
|
+
}
|
|
28
|
+
export interface WorkspaceFolderInfo {
|
|
29
|
+
uri: UriComponents;
|
|
30
|
+
name: string;
|
|
31
|
+
index: number;
|
|
32
|
+
}
|
|
33
|
+
export interface ConfigProvider {
|
|
34
|
+
getWorkspaceFolders(): WorkspaceFolderInfo[];
|
|
35
|
+
findFiles(pattern: string): Promise<UriComponents[]>;
|
|
36
|
+
}
|
|
37
|
+
export interface RegistryProviderFactory {
|
|
38
|
+
create(projectRoot: UriComponents): RegistryProvider;
|
|
39
|
+
}
|
|
40
|
+
export interface AcceptanceStore {
|
|
41
|
+
/** Read the complete accepted source/cognition relationship. */
|
|
42
|
+
getAcceptedPair(rootId: string, sourceKey: string): AcceptedPair | null;
|
|
43
|
+
/** Replace the complete accepted relationship atomically in memory. */
|
|
44
|
+
acceptPair(rootId: string, sourceKey: string, pair: AcceptedPair): void;
|
|
45
|
+
/**
|
|
46
|
+
* Return whether runtime-only ordering evidence proves that the current
|
|
47
|
+
* source identity was observed before the current cognition change.
|
|
48
|
+
*/
|
|
49
|
+
hasSourceBeforeCognitionEvidence(rootId: string, sourceKey: string, pair: AcceptedPair): boolean;
|
|
50
|
+
}
|
|
51
|
+
/** @deprecated Compatibility surface for pre-v5 test adapters. */
|
|
52
|
+
export interface FreshnessEvidenceStore {
|
|
53
|
+
getFreshnessTimes(rootId: string, sourceKey: string): {
|
|
54
|
+
sourceFactMtimeMs: number | null;
|
|
55
|
+
cognitionMtimeMs: number | null;
|
|
56
|
+
verificationTimeMs: number | null;
|
|
57
|
+
sourceFactHash: string | null;
|
|
58
|
+
};
|
|
59
|
+
recordSourceFactTime(rootId: string, sourceKey: string, mtimeMs: number, sourceFactHash?: string | null): void;
|
|
60
|
+
recordCognitionTime(rootId: string, sourceKey: string, mtimeMs: number): void;
|
|
61
|
+
recordExplicitVerification(rootId: string, sourceKey: string): void;
|
|
62
|
+
}
|
|
63
|
+
export interface ResolveResult {
|
|
64
|
+
sourceKey: string;
|
|
65
|
+
accepted?: AcceptedPair;
|
|
66
|
+
/** @deprecated v4 output field; no longer persisted or used for freshness. */
|
|
67
|
+
verificationTimeMs?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface CoggitServices {
|
|
70
|
+
readonly fs: FileSystem;
|
|
71
|
+
readonly config: ConfigProvider;
|
|
72
|
+
readonly registry?: RegistryProviderFactory;
|
|
73
|
+
readonly logger?: CoggitLogger;
|
|
74
|
+
readonly locks?: ProjectLockManager;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Result of resolving a source path against a project's source tree.
|
|
78
|
+
* A shared resolution contract so status, snapshot, and routes can surface
|
|
79
|
+
* consistent "you may mean" hints instead of a bare not-found miss.
|
|
80
|
+
*/
|
|
81
|
+
export interface SourcePathResolution {
|
|
82
|
+
/** The matched node, or undefined when the path matched nothing. */
|
|
83
|
+
node: CoggitTreeNode | undefined;
|
|
84
|
+
/** Source-root-relative path used for matching, after normalization. */
|
|
85
|
+
normalizedPath: string;
|
|
86
|
+
/**
|
|
87
|
+
* Source-root-relative candidate paths available for fuzzy hinting.
|
|
88
|
+
* Present only when node is undefined.
|
|
89
|
+
*/
|
|
90
|
+
candidatePaths?: string[];
|
|
91
|
+
}
|
|
92
|
+
export interface CoggitProject {
|
|
93
|
+
readonly root: CoggitWorkspaceRoot;
|
|
94
|
+
/**
|
|
95
|
+
* Re-validate project registry freshness by scanning cognition state and
|
|
96
|
+
* reconciling under the project write coordination boundary.
|
|
97
|
+
*
|
|
98
|
+
* Idempotent: if nothing changed since the last reconcile, the scan produces
|
|
99
|
+
* no diff and the registry content remains unchanged. Safe to call from
|
|
100
|
+
* multiple concurrent MCP processes — the write lock serializes mutations
|
|
101
|
+
* and the second caller sees an already-fresh registry.
|
|
102
|
+
*
|
|
103
|
+
* Fail-closed: if the lock cannot be acquired, the registry cannot be loaded,
|
|
104
|
+
* or the flush fails, the error propagates to the caller. Callers must handle
|
|
105
|
+
* the failure explicitly rather than silently serving stale state.
|
|
106
|
+
*
|
|
107
|
+
* Callers: MCP read tools before returning authoritative results, CLI reads,
|
|
108
|
+
* VS Code project-open, future watcher triggers.
|
|
109
|
+
*/
|
|
110
|
+
ensureFresh(): Promise<void>;
|
|
111
|
+
buildSnapshot(): Promise<CoggitSnapshot>;
|
|
112
|
+
buildCognitionRoutes(options?: BuildCognitionRoutesOptions): Promise<CognitionRoutes>;
|
|
113
|
+
addCognition(sourcePath: string, options?: AddCognitionOptions): Promise<AddCognitionResult>;
|
|
114
|
+
getCognitionHandbook(kind: CognitionKind): CognitionHandbook;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated Aggregate handbook access is retained only for CLI compatibility.
|
|
117
|
+
* Use 'leaf' or 'skeleton' for maintained guidance.
|
|
118
|
+
*/
|
|
119
|
+
getCognitionHandbook(kind?: 'all'): CognitionHandbook;
|
|
120
|
+
getCognitionTemplate(kind: CognitionKind): CognitionTemplate;
|
|
121
|
+
getNode(sourcePath: string): Promise<CoggitTreeNode | undefined>;
|
|
122
|
+
/**
|
|
123
|
+
* Resolve a source path to a snapshot node, reusing one snapshot build.
|
|
124
|
+
* When the path matches nothing, also expose the normalized path and the
|
|
125
|
+
* source tree candidate paths so callers can offer fuzzy path hints.
|
|
126
|
+
*/
|
|
127
|
+
resolveSourcePath(sourcePath: string): Promise<SourcePathResolution>;
|
|
128
|
+
listUntracked(): Promise<CoggitTreeNode[]>;
|
|
129
|
+
listOrphanedCognition(): Promise<OrphanedCognitionEntry[]>;
|
|
130
|
+
listMisplacedCognition(): Promise<MisplacedCognitionEntry[]>;
|
|
131
|
+
listStrayCognition(): Promise<StrayCognitionEntry[]>;
|
|
132
|
+
listUnboundCognition(): Promise<UnboundCognitionEntry[]>;
|
|
133
|
+
/**
|
|
134
|
+
* Aggregate maintenance diagnostics from a single core-owned entry point.
|
|
135
|
+
* Runs after project freshness, so registry-backed and scan-backed slices
|
|
136
|
+
* share one reconciled view. The stray slice is a raw/pre-reconcile
|
|
137
|
+
* compatibility view and is expected to be empty in ordinary freshened
|
|
138
|
+
* flows, because reconcile auto-registers source-paired cognition.
|
|
139
|
+
* CI and adapters must consume this surface instead of reinterpreting
|
|
140
|
+
* registry JSON.
|
|
141
|
+
*/
|
|
142
|
+
listMaintenanceDiagnostics(): Promise<MaintenanceDiagnostic[]>;
|
|
143
|
+
/**
|
|
144
|
+
* Move a misplaced cognition file to its expected location.
|
|
145
|
+
* Updates both the file system and registry.
|
|
146
|
+
* Returns undefined on success, or an error message string on failure.
|
|
147
|
+
*/
|
|
148
|
+
moveCognitionToExpected(entry: MisplacedCognitionEntry): Promise<string | undefined>;
|
|
149
|
+
/**
|
|
150
|
+
* Apply a source file/folder rename to registry sourcePath metadata.
|
|
151
|
+
* Returns true when at least one registry record was updated.
|
|
152
|
+
*/
|
|
153
|
+
applySourceRename(oldUri: UriComponents, newUri: UriComponents): Promise<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* Observe a source-content watcher event without changing durable
|
|
156
|
+
* acceptance. The generation must share the caller's watcher event order.
|
|
157
|
+
* Returns true when runtime ordering evidence was recorded.
|
|
158
|
+
*/
|
|
159
|
+
recordSourceChange(uri: UriComponents, generation?: number): Promise<boolean>;
|
|
160
|
+
/**
|
|
161
|
+
* Observe a directory-entry watcher event for the parent folder/root of a
|
|
162
|
+
* changed source URI without changing durable acceptance. Returns true when
|
|
163
|
+
* runtime ordering evidence was recorded.
|
|
164
|
+
*/
|
|
165
|
+
recordDirectoryEntryChange(uri: UriComponents, generation?: number): Promise<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* Observe a cognition watcher event. Returns true when the observation
|
|
168
|
+
* passively accepts the current source/cognition pair.
|
|
169
|
+
*/
|
|
170
|
+
recordCognitionChange(uri: UriComponents, generation?: number): Promise<boolean>;
|
|
171
|
+
markResolved(sourcePath: string): Promise<ResolveResult>;
|
|
172
|
+
refreshNode(sourcePath: string): Promise<CoggitTreeNode | undefined>;
|
|
173
|
+
flush(): Promise<void>;
|
|
174
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export { initProject } from './project';
|
|
2
|
+
export { findProjectRoot } from './project';
|
|
3
|
+
export { RuntimeAcceptanceEvidence, createCoggitServices, discoverCoggitProjects, openCoggitProject, buildSnapshotFromProjects, } from './project';
|
|
4
|
+
export { projectContextFromRoot } from './project';
|
|
5
|
+
export { noOpProjectLockManager, ProjectLockError, } from './locks';
|
|
6
|
+
export { calculateAffected } from './affected';
|
|
7
|
+
export { applyWatchEventToProjects, planWatchRefresh, selectWatchRefreshMode, } from './watchPipeline';
|
|
8
|
+
export { createWatchHost, } from './watchHost';
|
|
9
|
+
export type { NormalizedWatchEvent, WatchBatchRefreshMode, WatchRefreshRoute, WatcherEventApplyResult, WatchEventDomain, WatchFileChangeKind, WatchRefreshMode, } from './watchPipeline';
|
|
10
|
+
export type { WatchHost, WatchHostObservationResult, WatchHostOptions, WatchHostRefreshIntent, WatchObservation, WatchObservationHandler, WatchObserver, WatchObserverSubscription, } from './watchHost';
|
|
11
|
+
export { ADD_OPERATION_ERROR_CODES, CORE_OPERATION_IDS, addOperation, resolveOperation, routesOperation, findProjectNode, handbookCatalog, handbookIdForCognitionKind, handbookIdForNodeKind, operationIssue, projectContext, snapshotOperation, statusOperation, } from './operations';
|
|
12
|
+
export type { AddOperationError, AddOperationErrorCode, AddOperationResult, ResolveErrorCode, ResolveOperationError, ResolveOperationResult, CoggitHandbookCatalogEntry, CoggitOperationAction, CoggitOperationIssue, CoggitProjectContext, CoreOperationId, RoutesOperationResult, SnapshotOperationResult, SnapshotOperationOptions, SnapshotOperationScope, SourcePathCandidatesExpander, StatusOperationOptions, StatusOperationResult, } from './operations';
|
|
13
|
+
export type { CoggitProjectDiscoveryOptions, RegistryInitFailurePolicy, } from './project';
|
|
14
|
+
export { getCognitionHandbook, getCognitionTemplate } from './cognition';
|
|
15
|
+
export { getCoggitSystemPrompt, MINIMAL_SYSTEM_PROMPT } from './systemPrompt';
|
|
16
|
+
export type { CoggitSystemPrompt, CoggitSystemPromptKind } from './systemPrompt';
|
|
17
|
+
export { applyTreeDepth, projectSnapshotTree, projectTreeFromSnapshot, } from './projection';
|
|
18
|
+
export { DEFAULT_ROUTES_DEPTH, assembleRoutesContent, countRouteNodes, flattenRoutesProjection, projectRoutesEntries, routeProjectionLineText, selectRoutesBySourcePath, toRoutesStructuredOutput, } from './routesProjection';
|
|
19
|
+
export type { AssembleRoutesContentOptions, RoutesPresentationContent, RoutesPresentationFormat, RoutesStructuredOutput, } from './routesProjection';
|
|
20
|
+
export { buildMappingIndex, } from './snapshot';
|
|
21
|
+
export { detectMisplacedCognitionEntries, detectOrphanedCognitionEntries, detectStrayCognitionEntries, detectUnboundCognitionEntries, } from './maintenance';
|
|
22
|
+
export { describeObservedStatus, aggregateNodeStatus, collectSubtreeIssues, computeRuntimeStatus, countSubtreeIssues, inspectNodeStatus, projectStatusIssues, projectStatusResultToNodeStatus, querySubtreeIssues, summarizeRepresentativeMtime, } from './status';
|
|
23
|
+
export { projectStatusAgentPresentation, renderStatusAgentInspectionText, renderStatusAgentPresentation, } from './status/statusAgentPresentation';
|
|
24
|
+
export type { StatusAgentActionLegendEntry, StatusAgentActionRole, StatusAgentIssueLegendEntry, StatusAgentIssueRow, StatusAgentPresentation, StatusAgentSeverityLevel, } from './status/statusAgentPresentation';
|
|
25
|
+
export { projectStatusMissPresentation, projectStatusPresentation, renderStatusPresentation, } from './status/statusPresentation';
|
|
26
|
+
export type { StatusMissPresentation, StatusPresentationFormat, StatusPresentationIssue, StatusPresentationView, } from './status/statusPresentation';
|
|
27
|
+
export { tryGetCognitionPath } from './status/lookupCognition';
|
|
28
|
+
export type { CognitionLookupHit } from './status/lookupCognition';
|
|
29
|
+
export { projectMaintenancePresentation, renderMaintenancePresentation, } from './maintenancePresentation';
|
|
30
|
+
export type { MaintenanceIssueCode, MaintenancePresentationFormat, MaintenancePresentationItem, MaintenancePresentationView, } from './maintenancePresentation';
|
|
31
|
+
export { projectStatusTriage } from './status/statusTriage';
|
|
32
|
+
export type { StatusTriageEntry, StatusTriageView, } from './status/statusTriage';
|
|
33
|
+
export { normalizeSourcePathInput, toCognitionFileUri, toCognitionFolderReadmeUri, toRelativeUriPath, } from './mapping';
|
|
34
|
+
export { PATH_HINT_MESSAGE, PATH_MISS_MESSAGE, pathHintsTryText, pathMissMessage, renderPathMissText, suggestPathHints, } from './pathHints';
|
|
35
|
+
export type { SourcePathResolution, } from './interfaces';
|
|
36
|
+
export { externalPathFromString, uriRelativePath, } from './uri-utils';
|
|
37
|
+
export { createEnvCoggitLogger, debugLog, errorLog, infoLog, logEvent, nullCoggitLogger, warnLog, } from './logger';
|
|
38
|
+
export type { CoggitLogEvent, CoggitLogLevel, CoggitLogger, } from './logger';
|
|
39
|
+
export type { AddCognitionKind, AddCognitionOptions, AddCognitionResult, CognitionHandbook, CognitionKind, CognitionTemplate, } from './cognition';
|
|
40
|
+
export type { ProjectLockContext, ProjectLockManager, } from './locks';
|
|
41
|
+
export type { CoggitSnapshot, CoggitTreeNode, CoggitWorkspaceRoot, CognitionDiscoveryEntry, LocatedStatusIssue, MaintenanceDiagnostic, MisplacedCognitionEntry, NodeStatusResult, NodeStatusTriageEntry, ObservedStatus, OrphanedCognitionEntry, SourceCandidateState, StatusIssueVisibility, StrayCognitionEntry, UnboundCognitionEntry, } from './types';
|
|
42
|
+
export { discoverWorkspaceRoots, readWorkspaceRoot } from './project';
|
|
43
|
+
export { buildSnapshot } from './project';
|
|
44
|
+
export { formatTimestamp, latestAcceptedTime } from './time';
|
|
45
|
+
export { REGISTRY_MAINTENANCE_NOTICE, REGISTRY_SCHEMA_VERSION, Registry, RegistryRevisionMismatchError, computeRegistryRevision, type RegistryCreateOptions, type RegistryRevision, } from './registry/index';
|
|
46
|
+
export { InMemoryRegistryProvider } from './registry/inMemoryRegistryProvider';
|
|
47
|
+
export { GENERATED_SOURCE_STRUCTURE_DIRECTORY_NAMES, generatedSourceStructureGlobExclude, generatedSourceStructureGlobExcludePatterns, isIgnoredSourceStructureEntry, } from './sourceStructureIgnore';
|
|
48
|
+
export { isIgnoredByGitignoreRules, loadGitignoreRules, type CoggitIgnoreRuleSet, type FileReader, __testing__ as gitignoreTesting, } from './gitignore';
|
|
49
|
+
export { __testing__ as statusTesting } from './status';
|
|
50
|
+
export { RESOLVE_ERROR_CODES } from './operations';
|
|
51
|
+
export { applyRoutesFilters, suggestRoutePathHints, } from './routesProjection';
|
|
52
|
+
export { joinUriPath } from './uri-utils';
|
|
53
|
+
export { WatchLeaseError, noOpWatchLeaseManager, type WatchLeaseHandle, type WatchLeaseManager, } from './locks';
|
|
54
|
+
export type { MappingIndex, RoutesProjectionNode, TreeProjectionNode, } from './types';
|
|
55
|
+
export { getParentDir, getProjectRootPath, inferSourceUriCandidatesFromCognitionUri, resolveConfigRoots, toCognitionFilePath, toCognitionFolderReadmePath, } from './mapping';
|
|
56
|
+
export type { EvidenceDiagnostic, StatusContext, StatusIssue, } from './status/statusTypes';
|
|
57
|
+
export type { CoggitConfig, CoggitNodeKind, } from './snapshotTypes';
|