@moldea.ai/core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +135 -0
- package/dist/adapter/index.d.ts +48 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/adapter-availability/index.d.ts +15 -0
- package/dist/adapter-availability/index.d.ts.map +1 -0
- package/dist/adapter-execution/index.d.ts +31 -0
- package/dist/adapter-execution/index.d.ts.map +1 -0
- package/dist/adapter-validation/index.d.ts +44 -0
- package/dist/adapter-validation/index.d.ts.map +1 -0
- package/dist/adapter.js +0 -0
- package/dist/agent-asset-validation/index.d.ts +34 -0
- package/dist/agent-asset-validation/index.d.ts.map +1 -0
- package/dist/agent-assets/index.d.ts +38 -0
- package/dist/agent-assets/index.d.ts.map +1 -0
- package/dist/canonical-discovery/index.d.ts +47 -0
- package/dist/canonical-discovery/index.d.ts.map +1 -0
- package/dist/canonical-discovery-validation/index.d.ts +26 -0
- package/dist/canonical-discovery-validation/index.d.ts.map +1 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/contracts/index.d.ts +178 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/decision/index.d.ts +16 -0
- package/dist/decision/index.d.ts.map +1 -0
- package/dist/decision-graph/index.d.ts +28 -0
- package/dist/decision-graph/index.d.ts.map +1 -0
- package/dist/decision-graph-validation/index.d.ts +25 -0
- package/dist/decision-graph-validation/index.d.ts.map +1 -0
- package/dist/decision-validation/index.d.ts +34 -0
- package/dist/decision-validation/index.d.ts.map +1 -0
- package/dist/diagnostic-utilities/index.d.ts +62 -0
- package/dist/diagnostic-utilities/index.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +43 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/exceptions/index.d.ts +38 -0
- package/dist/exceptions/index.d.ts.map +1 -0
- package/dist/format/index.d.ts +80 -0
- package/dist/format/index.d.ts.map +1 -0
- package/dist/format-validation/index.d.ts +51 -0
- package/dist/format-validation/index.d.ts.map +1 -0
- package/dist/format.js +0 -0
- package/dist/immutable/index.d.ts +13 -0
- package/dist/immutable/index.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4609 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest/index.d.ts +32 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest-relationship-validation/index.d.ts +18 -0
- package/dist/manifest-relationship-validation/index.d.ts.map +1 -0
- package/dist/manifest-validation/index.d.ts +28 -0
- package/dist/manifest-validation/index.d.ts.map +1 -0
- package/dist/mirrors/index.d.ts +35 -0
- package/dist/mirrors/index.d.ts.map +1 -0
- package/dist/options/index.d.ts +26 -0
- package/dist/options/index.d.ts.map +1 -0
- package/dist/project-assets/index.d.ts +56 -0
- package/dist/project-assets/index.d.ts.map +1 -0
- package/dist/project-index/index.d.ts +20 -0
- package/dist/project-index/index.d.ts.map +1 -0
- package/dist/project-inspection/index.d.ts +23 -0
- package/dist/project-inspection/index.d.ts.map +1 -0
- package/dist/repository-inspection-session/index.d.ts +22 -0
- package/dist/repository-inspection-session/index.d.ts.map +1 -0
- package/dist/repository-reference-validation/index.d.ts +25 -0
- package/dist/repository-reference-validation/index.d.ts.map +1 -0
- package/dist/repository-text/index.d.ts +27 -0
- package/dist/repository-text/index.d.ts.map +1 -0
- package/dist/runtime-guidance/index.d.ts +32 -0
- package/dist/runtime-guidance/index.d.ts.map +1 -0
- package/dist/runtime-placeholder-validation/index.d.ts +17 -0
- package/dist/runtime-placeholder-validation/index.d.ts.map +1 -0
- package/dist/source-location/index.d.ts +11 -0
- package/dist/source-location/index.d.ts.map +1 -0
- package/dist/text/index.d.ts +33 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/universal-project-inspection/index.d.ts +35 -0
- package/dist/universal-project-inspection/index.d.ts.map +1 -0
- package/dist/yaml/index.d.ts +40 -0
- package/dist/yaml/index.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
2
|
+
import type { IManifestParseResult, ITextDocumentInput } from '../contracts/index.js';
|
|
3
|
+
import type { ICoreOperation } from '../exceptions/index.js';
|
|
4
|
+
import { type IRuntimeManifestLocation } from '../manifest-validation/index.js';
|
|
5
|
+
export interface IManifestDocumentInspectionResult extends IManifestParseResult {
|
|
6
|
+
readonly formatVersion: 1 | null;
|
|
7
|
+
readonly runtimeLocations: readonly IRuntimeManifestLocation[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Inspects one complete manifest while retaining an independently trustworthy supported version.
|
|
11
|
+
* @param input The canonical logical path and exact manifest text or bytes.
|
|
12
|
+
* @param options The immutable Core limits and adapter snapshots.
|
|
13
|
+
* @param operation The owning public or repository-level operation for typed failures.
|
|
14
|
+
* @returns Frozen inspection state with all-or-nothing manifest assets and values.
|
|
15
|
+
* @throws
|
|
16
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
17
|
+
* - INVALID_ARGUMENT: The Core operation received an invalid argument.
|
|
18
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.
|
|
19
|
+
*/
|
|
20
|
+
export declare const inspectManifestDocument: (input: ITextDocumentInput, options: ICoreOptionsSnapshot, operation?: Extract<ICoreOperation, "parse-manifest" | "inspect-project">) => Promise<IManifestDocumentInspectionResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Parses and validates one complete version 1 manifest document.
|
|
23
|
+
* @param input The canonical logical path and exact manifest text or bytes.
|
|
24
|
+
* @param options The immutable Core limits and adapter snapshots.
|
|
25
|
+
* @returns A frozen all-or-nothing manifest parse result.
|
|
26
|
+
* @throws
|
|
27
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
28
|
+
* - INVALID_ARGUMENT: The Core operation received an invalid argument.
|
|
29
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.
|
|
30
|
+
*/
|
|
31
|
+
export declare const parseManifestDocument: (input: ITextDocumentInput, options: ICoreOptionsSnapshot) => Promise<IManifestParseResult>;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAEV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAMzC,MAAM,WAAW,iCAAkC,SAAQ,oBAAoB;IAC7E,QAAQ,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAChE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,kBAAkB,EACzB,SAAS,oBAAoB,EAC7B,YAAW,OAAO,CAAC,cAAc,EAAE,gBAAgB,GAAG,iBAAiB,CAAoB,KAC1F,OAAO,CAAC,iCAAiC,CA8D3C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,kBAAkB,EACzB,SAAS,oBAAoB,KAC5B,OAAO,CAAC,oBAAoB,CAS9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type IRepositoryPath } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICanonicalDiscoveryResult } from '../canonical-discovery/index.js';
|
|
3
|
+
import type { ICoreResourceLimits } from '../contracts/index.js';
|
|
4
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
5
|
+
import type { IMoldeaManifestV1, IParsedDecision } from '../format/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Validates manifest and agent relationships against canonical discovery and parsed decisions.
|
|
8
|
+
* @param manifestPath The canonical manifest path used for relationship diagnostics.
|
|
9
|
+
* @param manifest The normalized manifest contract to validate.
|
|
10
|
+
* @param discovery The canonical repository discovery result.
|
|
11
|
+
* @param decisions The successfully parsed canonical decisions.
|
|
12
|
+
* @param limits The resource limits applied to emitted diagnostics.
|
|
13
|
+
* @returns The frozen deterministic relationship diagnostics.
|
|
14
|
+
* @throws
|
|
15
|
+
* - RESOURCE_LIMIT_EXCEEDED: The repository-level diagnostic budget was exceeded.
|
|
16
|
+
*/
|
|
17
|
+
export declare const validateManifestRelationships: (manifestPath: IRepositoryPath, manifest: IMoldeaManifestV1, discovery: ICanonicalDiscoveryResult, decisions: readonly Pick<IParsedDecision, "id" | "path" | "status">[], limits: ICoreResourceLimits) => readonly ICoreDiagnostic[];
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest-relationship-validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,yBAAyB,CAAC;AAElF,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAyF7E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GACxC,cAAc,eAAe,EAC7B,UAAU,iBAAiB,EAC3B,WAAW,yBAAyB,EACpC,WAAW,SAAS,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC,EAAE,EACrE,QAAQ,mBAAmB,KAC1B,SAAS,eAAe,EAuE1B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
2
|
+
import { type ICoreDiagnosticCollector } from '../diagnostic-utilities/index.js';
|
|
3
|
+
import type { ISourceRange } from '../diagnostics/index.js';
|
|
4
|
+
import type { IMoldeaManifestV1, IRepositoryFormatVersion } from '../format/index.js';
|
|
5
|
+
import type { IYamlNode } from '../yaml/index.js';
|
|
6
|
+
export interface IRuntimeManifestLocation {
|
|
7
|
+
readonly adapterId: string;
|
|
8
|
+
readonly agentId: string;
|
|
9
|
+
readonly path: IRepositoryPath;
|
|
10
|
+
readonly pointer: string;
|
|
11
|
+
readonly range: ISourceRange;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Detects a supported repository-format version without treating the remaining manifest as valid.
|
|
15
|
+
* @param node The trustworthy strict-YAML manifest root.
|
|
16
|
+
* @returns The supported parsed version when its declaration is independently unambiguous.
|
|
17
|
+
*/
|
|
18
|
+
export declare const detectSupportedManifestVersion: (node: IYamlNode) => IRepositoryFormatVersion | null;
|
|
19
|
+
/**
|
|
20
|
+
* Validates and normalizes a strict YAML document as a version 1 moldea manifest.
|
|
21
|
+
* @param node The parser-neutral YAML root node.
|
|
22
|
+
* @param path The canonical or caller-supplied logical manifest path.
|
|
23
|
+
* @param diagnostics The operation diagnostic collector.
|
|
24
|
+
* @param runtimeLocations Mutable private source locations populated for repository inspection.
|
|
25
|
+
* @returns The normalized manifest when its supported version can be interpreted.
|
|
26
|
+
*/
|
|
27
|
+
export declare const validateManifest: (node: IYamlNode, path: IRepositoryPath, diagnostics: ICoreDiagnosticCollector, runtimeLocations: IRuntimeManifestLocation[]) => IMoldeaManifestV1 | null;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest-validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAoB/E,OAAO,KAAK,EAIV,iBAAiB,EAEjB,wBAAwB,EAOzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,kBAAkB,CAAC;AAUnE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAy+BD;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,MAAM,SAAS,KACd,wBAAwB,GAAG,IAQ7B,CAAC;AAmNF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,MAAM,SAAS,EACf,MAAM,eAAe,EACrB,aAAa,wBAAwB,EACrC,kBAAkB,wBAAwB,EAAE,KAC3C,iBAAiB,GAAG,IA+EtB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IRepositoryPath, IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { IInspectedAgentAssets } from '../agent-assets/index.js';
|
|
3
|
+
import type { IIndexedMirror } from '../contracts/index.js';
|
|
4
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
5
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
6
|
+
export interface IAgentMirrorInspection {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly mirrors: readonly IIndexedMirror[];
|
|
9
|
+
}
|
|
10
|
+
export interface IMirrorInspectionResult {
|
|
11
|
+
readonly valid: boolean;
|
|
12
|
+
readonly agentMirrors: readonly IAgentMirrorInspection[];
|
|
13
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Compares every declared mirror with its available normalized canonical instruction.
|
|
17
|
+
* @param repository The budget-aware reader for the active inspection session.
|
|
18
|
+
* @param manifestPath The canonical manifest path used for declaration diagnostics.
|
|
19
|
+
* @param agents The registered agent assets and normalized instruction prerequisites.
|
|
20
|
+
* @param options The immutable Core configuration snapshot.
|
|
21
|
+
* @param signal Optional cancellation forwarded to every mirror lookup and read.
|
|
22
|
+
* @returns Deeply immutable index-ready mirrors and deterministic diagnostics.
|
|
23
|
+
* @throws
|
|
24
|
+
* - INVALID_REPOSITORY_PATH: A repository path is invalid.
|
|
25
|
+
* - ENTRY_NOT_FOUND: A confirmed mirror file disappeared from the reader snapshot.
|
|
26
|
+
* - ENTRY_NOT_FILE: A confirmed mirror file changed type during inspection.
|
|
27
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
28
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
29
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during mirror inspection.
|
|
30
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
31
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
32
|
+
* - ABORTED: Mirror inspection or a repository operation was aborted.
|
|
33
|
+
*/
|
|
34
|
+
export declare const inspectMirrors: (repository: IRepositoryReader, manifestPath: IRepositoryPath, agents: readonly IInspectedAgentAssets[], options: ICoreOptionsSnapshot, signal?: AbortSignal) => Promise<IMirrorInspectionResult>;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mirrors/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,eAAe,EACf,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,uBAAuB,CAAC;AAM/E,OAAO,KAAK,EAAE,eAAe,EAAuB,MAAM,yBAAyB,CAAC;AAGpF,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIpG,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAqHD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,GACzB,YAAY,iBAAiB,EAC7B,cAAc,eAAe,EAC7B,QAAQ,SAAS,qBAAqB,EAAE,EACxC,SAAS,oBAAoB,EAC7B,SAAS,WAAW,KACnB,OAAO,CAAC,uBAAuB,CA2CjC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IRuntimeAdapterContext, IRuntimeAdapterResult } from '../adapter/index.js';
|
|
2
|
+
import type { ICoreOptions, ICoreResourceLimits } from '../contracts/index.js';
|
|
3
|
+
import type { IRepositoryFormatVersion } from '../format/index.js';
|
|
4
|
+
export interface IRuntimeAdapterSnapshot {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly supportedRepositoryFormatVersions: readonly IRepositoryFormatVersion[];
|
|
7
|
+
readonly inspect: (context: IRuntimeAdapterContext) => Promise<IRuntimeAdapterResult>;
|
|
8
|
+
}
|
|
9
|
+
export interface ICoreOptionsSnapshot {
|
|
10
|
+
readonly adapters: readonly IRuntimeAdapterSnapshot[];
|
|
11
|
+
readonly limits: ICoreResourceLimits;
|
|
12
|
+
}
|
|
13
|
+
/** Creates an operation-local options view with one shared raw-diagnostic budget. */
|
|
14
|
+
export declare const createCoreOperationOptionsSnapshot: (options: ICoreOptionsSnapshot) => ICoreOptionsSnapshot;
|
|
15
|
+
/**
|
|
16
|
+
* Validates and snapshots caller-owned Core construction options.
|
|
17
|
+
* @param options The optional adapters and resource-limit overrides.
|
|
18
|
+
* @returns A deeply frozen, deterministically ordered configuration snapshot.
|
|
19
|
+
* @throws
|
|
20
|
+
* - DUPLICATE_ADAPTER_ID: A runtime adapter ID is registered more than once.
|
|
21
|
+
* - RESERVED_ADAPTER_ID: A reserved runtime adapter ID was supplied.
|
|
22
|
+
* - INVALID_ADAPTER_DEFINITION: A runtime adapter definition is invalid.
|
|
23
|
+
* - INVALID_RESOURCE_LIMIT: A Core resource limit is invalid.
|
|
24
|
+
*/
|
|
25
|
+
export declare const normalizeCoreOptions: (options: ICoreOptions | undefined) => ICoreOptionsSnapshot;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/options/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAInE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,iCAAiC,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAChF,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACvF;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;CACtC;AAED,qFAAqF;AACrF,eAAO,MAAM,kCAAkC,GAC7C,SAAS,oBAAoB,KAC5B,oBAKF,CAAC;AAiMF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,YAAY,GAAG,SAAS,KAAG,oBASxE,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IRepositoryPath, IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICanonicalDiscoveryResult } from '../canonical-discovery/index.js';
|
|
3
|
+
import type { IIndexedContextAsset, IIndexedTextAsset } from '../contracts/index.js';
|
|
4
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
5
|
+
import type { IMoldeaManifestV1 } from '../format/index.js';
|
|
6
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
7
|
+
export interface IProjectAssetInspectionResult {
|
|
8
|
+
readonly valid: boolean;
|
|
9
|
+
readonly project: IIndexedTextAsset | null;
|
|
10
|
+
readonly context: readonly IIndexedContextAsset[];
|
|
11
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
12
|
+
}
|
|
13
|
+
export interface IProjectFileInspectionResult {
|
|
14
|
+
readonly valid: boolean;
|
|
15
|
+
readonly project: IIndexedTextAsset | null;
|
|
16
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Reads and validates the project foundation before canonical enumeration.
|
|
20
|
+
* @param repository The coherent source-neutral reader for the active inspection session.
|
|
21
|
+
* @param path The canonical project path when its exact entry is a regular file.
|
|
22
|
+
* @param options The immutable Core configuration snapshot.
|
|
23
|
+
* @param signal Optional cancellation forwarded to the repository read.
|
|
24
|
+
* @returns The deeply immutable project asset or deterministic content diagnostics.
|
|
25
|
+
* @throws
|
|
26
|
+
* - ENTRY_NOT_FOUND: The located project file disappeared from the snapshot.
|
|
27
|
+
* - ENTRY_NOT_FILE: The located project entry changed type during inspection.
|
|
28
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
29
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
30
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during the project read.
|
|
31
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
32
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
33
|
+
* - ABORTED: Project inspection or the repository read was aborted.
|
|
34
|
+
*/
|
|
35
|
+
export declare const readProjectFile: (repository: IRepositoryReader, path: IRepositoryPath | null, options: ICoreOptionsSnapshot, signal?: AbortSignal) => Promise<IProjectFileInspectionResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Reads the project foundation and every discovered focused-context asset.
|
|
38
|
+
* @param repository The coherent source-neutral reader for the active inspection session.
|
|
39
|
+
* @param manifest The normalized manifest used to attach context relationships, when valid.
|
|
40
|
+
* @param discovery The canonical inventory and path-owned structural diagnostics.
|
|
41
|
+
* @param options The immutable Core configuration snapshot.
|
|
42
|
+
* @param signal Optional cancellation forwarded to every repository read.
|
|
43
|
+
* @param projectFile Optional project foundation already read before canonical enumeration.
|
|
44
|
+
* @returns Deeply immutable valid assets and deterministic content diagnostics.
|
|
45
|
+
* @throws
|
|
46
|
+
* - ENTRY_NOT_FOUND: A discovered project or context file disappeared from the snapshot.
|
|
47
|
+
* - ENTRY_NOT_FILE: A discovered project or context entry changed type during inspection.
|
|
48
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
49
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
50
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during asset reads.
|
|
51
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
52
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
53
|
+
* - ABORTED: Project asset inspection or a repository operation was aborted.
|
|
54
|
+
*/
|
|
55
|
+
export declare const readProjectAssets: (repository: IRepositoryReader, manifest: IMoldeaManifestV1 | null, discovery: ICanonicalDiscoveryResult, options: ICoreOptionsSnapshot, signal?: AbortSignal, projectFile?: IProjectFileInspectionResult) => Promise<IProjectAssetInspectionResult>;
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-assets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAKrF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIpG,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAClD,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAGD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,iBAAiB,EAC7B,MAAM,eAAe,GAAG,IAAI,EAC5B,SAAS,oBAAoB,EAC7B,SAAS,WAAW,KACnB,OAAO,CAAC,4BAA4B,CAyBtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,iBAAiB,EAC7B,UAAU,iBAAiB,GAAG,IAAI,EAClC,WAAW,yBAAyB,EACpC,SAAS,oBAAoB,EAC7B,SAAS,WAAW,EACpB,cAAc,4BAA4B,KACzC,OAAO,CAAC,6BAA6B,CAoCvC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IInspectedAgentAssets } from '../agent-assets/index.js';
|
|
2
|
+
import type { IIndexedContextAsset, IIndexedManifest, IIndexedRuntimeGuidance, IIndexedTextAsset, IMoldeaProjectIndex } from '../contracts/index.js';
|
|
3
|
+
import type { IParsedDecision } from '../format/index.js';
|
|
4
|
+
import type { IAgentMirrorInspection } from '../mirrors/index.js';
|
|
5
|
+
export interface IProjectIndexInput {
|
|
6
|
+
readonly manifest: IIndexedManifest;
|
|
7
|
+
readonly project: IIndexedTextAsset;
|
|
8
|
+
readonly context: readonly IIndexedContextAsset[];
|
|
9
|
+
readonly decisions: readonly IParsedDecision[];
|
|
10
|
+
readonly runtimes: readonly IIndexedRuntimeGuidance[];
|
|
11
|
+
readonly agents: readonly IInspectedAgentAssets[];
|
|
12
|
+
readonly agentMirrors: readonly IAgentMirrorInspection[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Constructs one deterministic provisional index from complete universal validation outputs.
|
|
16
|
+
* @param input The normalized assets and relationships retained by universal inspection.
|
|
17
|
+
* @returns The deeply immutable project index, or null when a required asset is unavailable.
|
|
18
|
+
*/
|
|
19
|
+
export declare const createProjectIndex: (input: IProjectIndexInput) => IMoldeaProjectIndex | null;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-index/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAEV,oBAAoB,EAEpB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAClD,QAAQ,CAAC,YAAY,EAAE,SAAS,sBAAsB,EAAE,CAAC;CAC1D;AAkDD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,kBAAkB,KAAG,mBAAmB,GAAG,IAuBpF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IProjectInspectionInput, IProjectInspectionResult } from '../contracts/index.js';
|
|
2
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Inspects one coherent repository snapshot through universal and adapter validation.
|
|
5
|
+
* @param input The untrusted source-neutral reader and optional cancellation signal.
|
|
6
|
+
* @param options The immutable Core configuration snapshot.
|
|
7
|
+
* @returns A promise resolving to the frozen all-or-nothing project inspection result.
|
|
8
|
+
* @throws
|
|
9
|
+
* - INVALID_ARGUMENT: The Core operation received an invalid argument.
|
|
10
|
+
* - INVALID_REPOSITORY_PATH: A repository path is invalid.
|
|
11
|
+
* - ENTRY_NOT_FOUND: A discovered file disappeared from the reader snapshot.
|
|
12
|
+
* - ENTRY_NOT_FILE: A discovered file changed type during inspection.
|
|
13
|
+
* - ENTRY_NOT_DIRECTORY: A discovered directory changed type during inspection.
|
|
14
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
15
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
16
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during inspection.
|
|
17
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
18
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
19
|
+
* - ABORTED: Project inspection or a repository operation was aborted.
|
|
20
|
+
* - ADAPTER_EXECUTION_FAILED: A runtime adapter failed or returned an invalid result.
|
|
21
|
+
*/
|
|
22
|
+
export declare const inspectProject: (input: IProjectInspectionInput, options: ICoreOptionsSnapshot) => Promise<IProjectInspectionResult>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-inspection/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAG/F,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAgEpG;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,uBAAuB,EAC9B,SAAS,oBAAoB,KAC5B,OAAO,CAAC,wBAAwB,CAyDlC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICoreResourceLimits } from '../contracts/index.js';
|
|
3
|
+
export interface IRepositoryInspectionSession {
|
|
4
|
+
readonly reader: IRepositoryReader;
|
|
5
|
+
/**
|
|
6
|
+
* Stops work at an inspection boundary when cancellation was requested.
|
|
7
|
+
* @throws
|
|
8
|
+
* - ABORTED: Repository inspection was aborted.
|
|
9
|
+
*/
|
|
10
|
+
throwIfAborted(): void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates the isolated reader state for one repository inspection.
|
|
14
|
+
* @param repository The source-neutral reader bound to one coherent snapshot.
|
|
15
|
+
* @param limits The immutable resource limits for the inspection.
|
|
16
|
+
* @param signal Optional cancellation shared by every inspection operation.
|
|
17
|
+
* @returns A frozen session whose reader owns inspection-local budgets and byte caching.
|
|
18
|
+
* @throws
|
|
19
|
+
* - ABORTED: Repository inspection was aborted before the session was created.
|
|
20
|
+
*/
|
|
21
|
+
export declare const createRepositoryInspectionSession: (repository: IRepositoryReader, limits: ICoreResourceLimits, signal?: AbortSignal) => IRepositoryInspectionSession;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repository-inspection-session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQjE,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEnC;;;;OAIG;IACH,cAAc,IAAI,IAAI,CAAC;CACxB;AAsED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,GAC5C,YAAY,iBAAiB,EAC7B,QAAQ,mBAAmB,EAC3B,SAAS,WAAW,KACnB,4BAsLF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type IRepositoryPath, type IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICanonicalDiscoveryResult } from '../canonical-discovery/index.js';
|
|
3
|
+
import type { ICoreResourceLimits } from '../contracts/index.js';
|
|
4
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
5
|
+
import type { IMoldeaManifestV1 } from '../format/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Validates every manifest repository reference, binding, and exact impact path.
|
|
8
|
+
* @param repository The budget-aware reader for the active inspection session.
|
|
9
|
+
* @param manifestPath The canonical manifest path used for diagnostics.
|
|
10
|
+
* @param manifest The normalized valid manifest contract to inspect.
|
|
11
|
+
* @param discovery Canonical discovery state used to suppress dependent path diagnostics.
|
|
12
|
+
* @param limits The resource limits applied to emitted diagnostics.
|
|
13
|
+
* @param signal Optional cancellation forwarded to exact repository lookups.
|
|
14
|
+
* @returns Deeply immutable deterministic repository-reference diagnostics.
|
|
15
|
+
* @throws
|
|
16
|
+
* - INVALID_REPOSITORY_PATH: A repository path is invalid.
|
|
17
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
18
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
19
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during validation.
|
|
20
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
21
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
22
|
+
* - ABORTED: Repository inspection or a repository lookup was aborted.
|
|
23
|
+
*/
|
|
24
|
+
export declare const validateRepositoryReferences: (repository: IRepositoryReader, manifestPath: IRepositoryPath, manifest: IMoldeaManifestV1, discovery: ICanonicalDiscoveryResult, limits: ICoreResourceLimits, signal?: AbortSignal) => Promise<readonly ICoreDiagnostic[]>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repository-reference-validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAMjE,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAEV,iBAAiB,EAMlB,MAAM,oBAAoB,CAAC;AAqX5B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B,GACvC,YAAY,iBAAiB,EAC7B,cAAc,eAAe,EAC7B,UAAU,iBAAiB,EAC3B,WAAW,yBAAyB,EACpC,QAAQ,mBAAmB,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,SAAS,eAAe,EAAE,CA2BpC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type IRepositoryPath, type IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICoreResourceLimits, IIndexedTextAsset } from '../contracts/index.js';
|
|
3
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
4
|
+
export interface IRepositoryTextResult {
|
|
5
|
+
readonly valid: boolean;
|
|
6
|
+
readonly asset: IIndexedTextAsset | null;
|
|
7
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reads and normalizes one canonical Markdown asset through a repository reader.
|
|
11
|
+
* @param repository The coherent source-neutral repository reader.
|
|
12
|
+
* @param path The discovered regular-file path to read exactly once.
|
|
13
|
+
* @param limits The Core limits applied to the source bytes and diagnostics.
|
|
14
|
+
* @param signal Optional cancellation forwarded to the repository read.
|
|
15
|
+
* @returns A deeply immutable indexed asset or its deterministic text diagnostics.
|
|
16
|
+
* @throws
|
|
17
|
+
* - ENTRY_NOT_FOUND: The discovered file disappeared from the reader snapshot.
|
|
18
|
+
* - ENTRY_NOT_FILE: The discovered entry is no longer a regular file.
|
|
19
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
20
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
21
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during the read.
|
|
22
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
23
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
24
|
+
* - ABORTED: Repository inspection or the repository read was aborted.
|
|
25
|
+
*/
|
|
26
|
+
export declare const readRepositoryTextAsset: (repository: IRepositoryReader, path: IRepositoryPath, limits: ICoreResourceLimits, signal?: AbortSignal) => Promise<IRepositoryTextResult>;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repository-text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAK/D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAClC,YAAY,iBAAiB,EAC7B,MAAM,eAAe,EACrB,QAAQ,mBAAmB,EAC3B,SAAS,WAAW,KACnB,OAAO,CAAC,qBAAqB,CA8B/B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IRepositoryPath, IRepositoryReader } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICanonicalDiscoveryResult } from '../canonical-discovery/index.js';
|
|
3
|
+
import type { IIndexedRuntimeGuidance } from '../contracts/index.js';
|
|
4
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
5
|
+
import type { IMoldeaManifestV1 } from '../format/index.js';
|
|
6
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
7
|
+
export interface IRuntimeGuidanceResult {
|
|
8
|
+
readonly valid: boolean;
|
|
9
|
+
readonly runtimes: readonly IIndexedRuntimeGuidance[];
|
|
10
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Reads all discovered runtime guidance and validates every manifest guidance relationship.
|
|
14
|
+
* @param repository The coherent source-neutral repository reader.
|
|
15
|
+
* @param manifestPath The canonical manifest path used for relationship diagnostics.
|
|
16
|
+
* @param manifest The normalized manifest declaring optional agent guidance paths, when valid.
|
|
17
|
+
* @param discovery The canonical inventory and path-owned structural diagnostics.
|
|
18
|
+
* @param options The immutable Core configuration snapshot.
|
|
19
|
+
* @param signal Optional cancellation forwarded to every repository read.
|
|
20
|
+
* @returns Deeply immutable valid guidance assets and deterministic diagnostics.
|
|
21
|
+
* @throws
|
|
22
|
+
* - ENTRY_NOT_FOUND: A discovered guidance file disappeared from the reader snapshot.
|
|
23
|
+
* - ENTRY_NOT_FILE: A discovered guidance entry is no longer a regular file.
|
|
24
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
25
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
26
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during guidance reads.
|
|
27
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
28
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
29
|
+
* - ABORTED: Guidance inspection or a repository operation was aborted.
|
|
30
|
+
*/
|
|
31
|
+
export declare const readRuntimeGuidance: (repository: IRepositoryReader, manifestPath: IRepositoryPath, manifest: IMoldeaManifestV1 | null, discovery: ICanonicalDiscoveryResult, options: ICoreOptionsSnapshot, signal?: AbortSignal) => Promise<IRuntimeGuidanceResult>;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime-guidance/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAMrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAIpG,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AA8BD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,iBAAiB,EAC7B,cAAc,eAAe,EAC7B,UAAU,iBAAiB,GAAG,IAAI,EAClC,WAAW,yBAAyB,EACpC,SAAS,oBAAoB,EAC7B,SAAS,WAAW,KACnB,OAAO,CAAC,sBAAsB,CAsDhC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICoreResourceLimits, IIndexedTextAsset } from '../contracts/index.js';
|
|
3
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
4
|
+
import type { IRuntimeVariableManifestEntry } from '../format/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Validates runtime-variable placeholders in one normalized canonical agent instruction.
|
|
7
|
+
* @param manifestPath The canonical manifest path containing variable declarations.
|
|
8
|
+
* @param agentId The owning agent ID.
|
|
9
|
+
* @param instruction The normalized non-empty canonical instruction asset.
|
|
10
|
+
* @param declaredVariables The owning agent's normalized variable declarations.
|
|
11
|
+
* @param limits The resource limits applied to emitted diagnostics.
|
|
12
|
+
* @returns Frozen deterministic placeholder diagnostics.
|
|
13
|
+
* @throws
|
|
14
|
+
* - RESOURCE_LIMIT_EXCEEDED: The repository-level diagnostic budget was exceeded.
|
|
15
|
+
*/
|
|
16
|
+
export declare const validateRuntimePlaceholders: (manifestPath: IRepositoryPath, agentId: string, instruction: IIndexedTextAsset, declaredVariables: Readonly<Record<string, IRuntimeVariableManifestEntry>>, limits: ICoreResourceLimits) => readonly ICoreDiagnostic[];
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime-placeholder-validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAMpF,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,yBAAyB,CAAC;AAE7E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAiFxE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,GACtC,cAAc,eAAe,EAC7B,SAAS,MAAM,EACf,aAAa,iBAAiB,EAC9B,mBAAmB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC,EAC1E,QAAQ,mBAAmB,KAC1B,SAAS,eAAe,EA0K1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ISourceRange } from '../diagnostics/index.js';
|
|
2
|
+
export interface ISourceLocator {
|
|
3
|
+
locateRange(startOffset: number, endOffset: number): ISourceRange;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Creates an efficient UTF-16-offset to Unicode-scalar source locator.
|
|
7
|
+
* @param value The already-normalized valid Unicode scalar text.
|
|
8
|
+
* @returns A locator producing one-based lines and columns with zero-based scalar offsets.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createSourceLocator: (value: string) => ISourceLocator;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/source-location/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG7E,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAAC;CACnE;AAmBD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,cA4CnD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IContentDigest, IContentDigestResult, ICoreResourceLimits, INormalizedText, ITextDocumentInput, ITextNormalizationResult } from '../contracts/index.js';
|
|
2
|
+
import { type ICoreOperation } from '../exceptions/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Validates and normalizes one text document under an operation-specific resource budget.
|
|
5
|
+
* @param input The logical path and decoded string or exact source bytes.
|
|
6
|
+
* @param limits The immutable Core resource limits.
|
|
7
|
+
* @param operation The public Core operation requesting normalization.
|
|
8
|
+
* @param limit The source-byte limit applied by the operation.
|
|
9
|
+
* @returns A frozen normalized result or structural text diagnostics.
|
|
10
|
+
* @throws
|
|
11
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
12
|
+
* - INVALID_ARGUMENT: The Core operation received an invalid argument.
|
|
13
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeTextDocument: (input: ITextDocumentInput, limits: ICoreResourceLimits, operation: ICoreOperation, limit?: "maxFileBytes" | "maxManifestBytes") => ITextNormalizationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Calculates the canonical digest for already-normalized text.
|
|
18
|
+
* @param text The validated normalized text to encode and hash.
|
|
19
|
+
* @returns A promise resolving to the canonical lowercase SHA-256 digest.
|
|
20
|
+
*/
|
|
21
|
+
export declare const calculateNormalizedTextDigest: (text: INormalizedText) => Promise<IContentDigest>;
|
|
22
|
+
/**
|
|
23
|
+
* Calculates the normalized SHA-256 digest for one text document.
|
|
24
|
+
* @param input The logical path and decoded string or exact source bytes.
|
|
25
|
+
* @param limits The immutable Core resource limits.
|
|
26
|
+
* @returns A promise resolving to a frozen digest result or structural text diagnostics.
|
|
27
|
+
* @throws
|
|
28
|
+
* - INVALID_REPOSITORY_PATH: The repository path is invalid.
|
|
29
|
+
* - INVALID_ARGUMENT: The Core operation received an invalid argument.
|
|
30
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core resource limit was exceeded.
|
|
31
|
+
*/
|
|
32
|
+
export declare const calculateContentDigest: (input: ITextDocumentInput, limits: ICoreResourceLimits) => Promise<IContentDigestResult>;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA4MrF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,kBAAkB,EACzB,QAAQ,mBAAmB,EAC3B,WAAW,cAAc,EACzB,QAAO,cAAc,GAAG,kBAAmC,KAC1D,wBA6BF,CAAC;AAYF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,GACxC,MAAM,eAAe,KACpB,OAAO,CAAC,cAAc,CAKxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,kBAAkB,EACzB,QAAQ,mBAAmB,KAC1B,OAAO,CAAC,oBAAoB,CAoB9B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IMoldeaProjectIndex } from '../contracts/index.js';
|
|
2
|
+
import type { ICoreDiagnostic } from '../diagnostics/index.js';
|
|
3
|
+
import type { IRepositoryFormatVersion } from '../format/index.js';
|
|
4
|
+
import type { IRuntimeManifestLocation } from '../manifest-validation/index.js';
|
|
5
|
+
import { type ICoreOptionsSnapshot } from '../options/index.js';
|
|
6
|
+
import type { IRepositoryInspectionSession } from '../repository-inspection-session/index.js';
|
|
7
|
+
export interface IUniversalProjectInspectionResult {
|
|
8
|
+
readonly formatVersion: IRepositoryFormatVersion | null;
|
|
9
|
+
readonly project: IMoldeaProjectIndex | null;
|
|
10
|
+
readonly diagnostics: readonly ICoreDiagnostic[];
|
|
11
|
+
readonly runtimeLocations: readonly IRuntimeManifestLocation[];
|
|
12
|
+
}
|
|
13
|
+
export interface IUniversalProjectInspectionContext {
|
|
14
|
+
readonly session: IRepositoryInspectionSession;
|
|
15
|
+
readonly signal?: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Executes every universal repository-format phase before runtime adapter validation.
|
|
19
|
+
* @param context The shared inspection session and optional cancellation signal.
|
|
20
|
+
* @param options The immutable Core configuration snapshot.
|
|
21
|
+
* @returns The frozen provisional index only when no universal diagnostic remains.
|
|
22
|
+
* @throws
|
|
23
|
+
* - INVALID_REPOSITORY_PATH: A repository path is invalid.
|
|
24
|
+
* - ENTRY_NOT_FOUND: A discovered file disappeared from the reader snapshot.
|
|
25
|
+
* - ENTRY_NOT_FILE: A discovered file changed type during inspection.
|
|
26
|
+
* - ENTRY_NOT_DIRECTORY: A discovered directory changed type during inspection.
|
|
27
|
+
* - ACCESS_DENIED: Access to the repository source was denied.
|
|
28
|
+
* - SOURCE_UNAVAILABLE: The repository source is unavailable.
|
|
29
|
+
* - SNAPSHOT_CHANGED: The repository snapshot changed during inspection.
|
|
30
|
+
* - INVALID_SOURCE_DATA: The repository reader returned invalid contract data.
|
|
31
|
+
* - RESOURCE_LIMIT_EXCEEDED: A Core or repository resource limit was exceeded.
|
|
32
|
+
* - ABORTED: Project inspection or a repository operation was aborted.
|
|
33
|
+
*/
|
|
34
|
+
export declare const inspectUniversalProject: (context: IUniversalProjectInspectionContext, options: ICoreOptionsSnapshot) => Promise<IUniversalProjectInspectionResult>;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/universal-project-inspection/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAMnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAInE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGpG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAS9F,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,aAAa,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACxD,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;IACjD,QAAQ,CAAC,gBAAgB,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAChE;AAGD,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,kCAAkC,EAC3C,SAAS,oBAAoB,KAC5B,OAAO,CAAC,iCAAiC,CAwJ3C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IRepositoryPath } from '@moldea.ai/repository';
|
|
2
|
+
import type { ICoreDiagnosticCollector } from '../diagnostic-utilities/index.js';
|
|
3
|
+
import type { ISourceRange } from '../diagnostics/index.js';
|
|
4
|
+
import type { ISourceLocator } from '../source-location/index.js';
|
|
5
|
+
export type IYamlNode = IYamlMappingNode | IYamlSequenceNode | IYamlScalarNode;
|
|
6
|
+
export interface IYamlMappingEntry {
|
|
7
|
+
readonly key: IYamlNode;
|
|
8
|
+
readonly value: IYamlNode;
|
|
9
|
+
}
|
|
10
|
+
export interface IYamlMappingNode {
|
|
11
|
+
readonly kind: 'mapping';
|
|
12
|
+
readonly entries: readonly IYamlMappingEntry[];
|
|
13
|
+
readonly range: ISourceRange;
|
|
14
|
+
}
|
|
15
|
+
export interface IYamlSequenceNode {
|
|
16
|
+
readonly kind: 'sequence';
|
|
17
|
+
readonly items: readonly IYamlNode[];
|
|
18
|
+
readonly range: ISourceRange;
|
|
19
|
+
}
|
|
20
|
+
export interface IYamlScalarNode {
|
|
21
|
+
readonly kind: 'scalar';
|
|
22
|
+
readonly range: ISourceRange;
|
|
23
|
+
readonly source: string;
|
|
24
|
+
readonly style: string | null;
|
|
25
|
+
readonly value: string | number | bigint | boolean | null;
|
|
26
|
+
}
|
|
27
|
+
export interface IStrictYamlParseResult {
|
|
28
|
+
readonly valid: boolean;
|
|
29
|
+
readonly value: IYamlNode | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parses one normalized YAML 1.2 Core Schema document into parser-neutral nodes.
|
|
33
|
+
* @param value The normalized manifest text.
|
|
34
|
+
* @param path The logical source path used by diagnostics.
|
|
35
|
+
* @param locator The scalar-aware source locator for the normalized text.
|
|
36
|
+
* @param diagnostics The operation diagnostic collector.
|
|
37
|
+
* @returns The private parsed tree only when the YAML substrate is trustworthy.
|
|
38
|
+
*/
|
|
39
|
+
export declare const parseStrictYaml: (value: string, path: IRepositoryPath, locator: ISourceLocator, diagnostics: ICoreDiagnosticCollector) => IStrictYamlParseResult;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/yaml/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE/E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC;AA2OD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,MAAM,EACb,MAAM,eAAe,EACrB,SAAS,cAAc,EACvB,aAAa,wBAAwB,KACpC,sBAqEF,CAAC"}
|