@moldea.ai/core 4.0.0 → 5.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/README.md +6 -4
- package/dist/adapter/index.d.ts +1 -1
- package/dist/adapter/index.d.ts.map +1 -1
- package/dist/adapter-repository/index.d.ts +19 -1
- package/dist/adapter-repository/index.d.ts.map +1 -1
- package/dist/adapter-retained-memory/index.d.ts +8 -0
- package/dist/adapter-retained-memory/index.d.ts.map +1 -0
- package/dist/adapter-validation/index.d.ts.map +1 -1
- package/dist/adapter.js +21 -2
- package/dist/adapter.js.map +1 -1
- package/dist/chunks/{exceptions-C_KfCIjE.js → exceptions-HS9ofVy2.js} +15 -2
- package/dist/chunks/exceptions-HS9ofVy2.js.map +1 -0
- package/dist/contracts/index.d.ts +4 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/diagnostic-utilities/index.d.ts +5 -0
- package/dist/diagnostic-utilities/index.d.ts.map +1 -1
- package/dist/diagnostics/index.d.ts +22 -1
- package/dist/diagnostics/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +275 -120
- package/dist/index.js.map +1 -1
- package/dist/project-agent-assignments/index.d.ts +2 -2
- package/dist/project-agent-assignments/index.d.ts.map +1 -1
- package/dist/project-inspection/index.d.ts.map +1 -1
- package/dist/project-metadata/index.d.ts +2 -2
- package/dist/project-metadata/index.d.ts.map +1 -1
- package/dist/project-validation/index.d.ts.map +1 -1
- package/dist/repository-inspection-session/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/exceptions-C_KfCIjE.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { IMoldeaProjectIndex, IProjectAgentAssignmentItem } from '../contracts/index.js';
|
|
2
|
-
/**
|
|
3
|
-
export declare const
|
|
2
|
+
/** Iterates content-free agent-to-runtime assignments without retaining an intermediate array. */
|
|
3
|
+
export declare const iterateProjectAgentAssignments: (project: IMoldeaProjectIndex) => IterableIterator<IProjectAgentAssignmentItem>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-agent-assignments/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-agent-assignments/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAE9F,kGAAkG;AAClG,eAAO,MAAM,8BAA8B,GACzC,SAAS,mBAAmB,KAC3B,gBAAgB,CAAC,2BAA2B,CAO9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-inspection/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EAOxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-inspection/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EAOxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAmchE,yFAAyF;AACzF,eAAO,MAAM,uBAAuB,GAClC,OAAO,uBAAuB,EAC9B,SAAS,oBAAoB,KAC5B,OAAO,CAAC,kBAAkB,CAiC5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IMoldeaProjectIndex, IProjectMetadataItem, IProjectValidationSummary } from '../contracts/index.js';
|
|
2
|
-
/**
|
|
3
|
-
export declare const
|
|
2
|
+
/** Iterates content-free asset metadata without retaining a second project-sized collection. */
|
|
3
|
+
export declare const iterateProjectMetadata: (project: IMoldeaProjectIndex) => IterableIterator<IProjectMetadataItem>;
|
|
4
4
|
/** Creates the content-free summary for one validated project snapshot. */
|
|
5
5
|
export declare const createProjectSummary: (project: IMoldeaProjectIndex) => IProjectValidationSummary;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAkB/B,gGAAgG;AAChG,eAAO,MAAM,sBAAsB,GACjC,SAAS,mBAAmB,KAC3B,gBAAgB,CAAC,oBAAoB,CAqCvC,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAAI,SAAS,mBAAmB,KAAG,yBAc5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-validation/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-validation/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAsC,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGpG,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAwEpG,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,kCAAkC,CAAC;IAC3D,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,uBAAuB,EAC9B,SAAS,oBAAoB,KAC5B,OAAO,CAAC,uBAAuB,CAkFjC,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAC1B,OAAO,uBAAuB,EAC9B,SAAS,oBAAoB,KAC5B,OAAO,CAAC,wBAAwB,CAAwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repository-inspection-session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,gBAAgB,EAErB,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/repository-inspection-session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,gBAAgB,EAErB,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAcrE,MAAM,WAAW,gCAAiC,SAAQ,2BAA2B;IACnF,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CACnC;AAGD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CACN,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpC,cAAc,CAAC,OAAO,CAAC,EAAE,gCAAgC,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC5F,gBAAgB,CACd,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,UAAU,CAAC,CAAC;CACxB;AAGD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAE7C,qFAAqF;IACrF,gBAAgB,IAAI,kCAAkC,CAAC;IAEvD;;;;OAIG;IACH,cAAc,IAAI,IAAI,CAAC;CACxB;AAGD,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAmGD;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,GAC5C,YAAY,iBAAiB,EAC7B,QAAQ,mBAAmB,EAC3B,SAAS,WAAW,KACnB,4BAufF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Source-neutral, deterministic interpretation and indexing of moldea repositories.",
|
|
5
5
|
"homepage": "https://github.com/moldea-ai/packages/tree/main/projects/core#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions-C_KfCIjE.js","names":[],"sources":["../../src/exceptions/index.ts"],"sourcesContent":["import { Exception } from 'error-message-utils';\n\n// stable configuration and operation failure codes\nexport type ICoreConfigurationErrorCode =\n | 'DUPLICATE_ADAPTER_ID'\n | 'RESERVED_ADAPTER_ID'\n | 'INVALID_ADAPTER_DEFINITION'\n | 'INVALID_RESOURCE_LIMIT';\n\nexport type ICoreOperationErrorCode =\n | 'INVALID_ARGUMENT'\n | 'ABORTED'\n | 'RESOURCE_LIMIT_EXCEEDED'\n | 'ADAPTER_EXECUTION_FAILED'\n | 'CONTENT_INVALID';\n\nexport type ICoreOperation =\n | 'create-core'\n | 'normalize-text'\n | 'calculate-content-digest'\n | 'parse-manifest'\n | 'match-manifest-scope'\n | 'parse-decision'\n | 'create-project-inspection'\n | 'read-canonical-content-page'\n | 'validate-project'\n | 'validate-adapter';\n\n// safe construction options for exported Core exceptions\nexport interface ICoreConfigurationExceptionOptions {\n readonly code: ICoreConfigurationErrorCode;\n readonly operation: ICoreOperation;\n readonly adapterId?: string;\n readonly cause?: unknown;\n}\n\ninterface ICoreOperationExceptionOptionsBase {\n readonly operation: ICoreOperation;\n readonly adapterId?: string;\n readonly agentId?: string;\n readonly cause?: unknown;\n}\n\n// complete resource-refusal metadata required by Core 4\nexport type ICoreResourceLimitNextAction = 'reduce-input-or-increase-limit';\n\nexport type ICoreOperationExceptionOptions = ICoreOperationExceptionOptionsBase &\n (\n | {\n readonly code: 'RESOURCE_LIMIT_EXCEEDED';\n readonly limit: string;\n readonly limitMaximum: number;\n readonly nextAction: ICoreResourceLimitNextAction;\n readonly observedUsage: number;\n }\n | {\n readonly code: Exclude<ICoreOperationErrorCode, 'RESOURCE_LIMIT_EXCEEDED'>;\n readonly limit?: never;\n readonly limitMaximum?: never;\n readonly nextAction?: never;\n readonly observedUsage?: never;\n }\n );\n\nconst CONFIGURATION_ERROR_MESSAGES = {\n DUPLICATE_ADAPTER_ID: 'A runtime adapter ID is registered more than once.',\n INVALID_ADAPTER_DEFINITION: 'A runtime adapter definition is invalid.',\n INVALID_RESOURCE_LIMIT: 'A Core resource limit is invalid.',\n RESERVED_ADAPTER_ID: 'A reserved runtime adapter ID was supplied.',\n} as const satisfies Readonly<Record<ICoreConfigurationErrorCode, string>>;\n\nconst OPERATION_ERROR_MESSAGES = {\n ABORTED: 'The Core operation was aborted.',\n ADAPTER_EXECUTION_FAILED: 'A runtime adapter failed during inspection.',\n CONTENT_INVALID: 'The canonical content is not valid UTF-8 text.',\n INVALID_ARGUMENT: 'The Core operation received an invalid argument.',\n RESOURCE_LIMIT_EXCEEDED: 'A Core resource limit was exceeded.',\n} as const satisfies Readonly<Record<ICoreOperationErrorCode, string>>;\n\nconst OPERATION_ERROR_RETRYABILITY = {\n ABORTED: true,\n ADAPTER_EXECUTION_FAILED: false,\n CONTENT_INVALID: false,\n INVALID_ARGUMENT: false,\n RESOURCE_LIMIT_EXCEEDED: false,\n} as const satisfies Readonly<Record<ICoreOperationErrorCode, boolean>>;\n\nconst attachCause = (exception: Error, cause: unknown): void => {\n if (cause === undefined) {\n return;\n }\n\n Object.defineProperty(exception, 'cause', {\n configurable: true,\n enumerable: false,\n value: cause,\n writable: false,\n });\n};\n\n/** Represents invalid immutable Core configuration. */\nexport class CoreConfigurationException extends Exception {\n public override readonly code: ICoreConfigurationErrorCode;\n\n public readonly operation: ICoreOperation;\n\n public readonly adapterId: string | null;\n\n /** Creates a configuration exception with safe adapter metadata. */\n public constructor(options: ICoreConfigurationExceptionOptions) {\n super(CONFIGURATION_ERROR_MESSAGES[options.code], options.code);\n this.code = options.code;\n this.name = 'CoreConfigurationException';\n this.operation = options.operation;\n this.adapterId = options.adapterId ?? null;\n attachCause(this, options.cause);\n }\n}\n\n/** Represents an operational failure that prevented Core from completing. */\nexport class CoreOperationException extends Exception {\n public override readonly code: ICoreOperationErrorCode;\n\n public readonly operation: ICoreOperation;\n\n public readonly retryable: boolean;\n\n public readonly adapterId: string | null;\n\n public readonly agentId: string | null;\n\n public readonly limit: string | null;\n\n public readonly limitMaximum: number | null;\n\n public readonly nextAction: ICoreResourceLimitNextAction | null;\n\n public readonly observedUsage: number | null;\n\n /** Creates an operation exception with derived retry and safe scope metadata. */\n public constructor(options: ICoreOperationExceptionOptions) {\n super(OPERATION_ERROR_MESSAGES[options.code], options.code);\n this.code = options.code;\n this.name = 'CoreOperationException';\n this.operation = options.operation;\n this.retryable = OPERATION_ERROR_RETRYABILITY[options.code];\n this.adapterId = options.adapterId ?? null;\n this.agentId = options.agentId ?? null;\n this.limit = options.limit ?? null;\n this.limitMaximum = options.limitMaximum ?? null;\n this.nextAction = options.nextAction ?? null;\n this.observedUsage = options.observedUsage ?? null;\n attachCause(this, options.cause);\n }\n}\n"],"mappings":";;AAgEA,IAAM,+BAA+B;CACnC,sBAAsB;CACtB,4BAA4B;CAC5B,wBAAwB;CACxB,qBAAqB;AACvB;AAEA,IAAM,2BAA2B;CAC/B,SAAS;CACT,0BAA0B;CAC1B,iBAAiB;CACjB,kBAAkB;CAClB,yBAAyB;AAC3B;AAEA,IAAM,+BAA+B;CACnC,SAAS;CACT,0BAA0B;CAC1B,iBAAiB;CACjB,kBAAkB;CAClB,yBAAyB;AAC3B;AAEA,IAAM,eAAe,WAAkB,UAAyB;CAC9D,IAAI,UAAU,KAAA,GACZ;CAGF,OAAO,eAAe,WAAW,SAAS;EACxC,cAAc;EACd,YAAY;EACZ,OAAO;EACP,UAAU;CACZ,CAAC;AACH;;AAGA,IAAa,6BAAb,cAAgD,UAAU;CACxD;CAEA;CAEA;;CAGA,YAAmB,SAA6C;EAC9D,MAAM,6BAA6B,QAAQ,OAAO,QAAQ,IAAI;EAC9D,KAAK,OAAO,QAAQ;EACpB,KAAK,OAAO;EACZ,KAAK,YAAY,QAAQ;EACzB,KAAK,YAAY,QAAQ,aAAa;EACtC,YAAY,MAAM,QAAQ,KAAK;CACjC;AACF;;AAGA,IAAa,yBAAb,cAA4C,UAAU;CACpD;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;;CAGA,YAAmB,SAAyC;EAC1D,MAAM,yBAAyB,QAAQ,OAAO,QAAQ,IAAI;EAC1D,KAAK,OAAO,QAAQ;EACpB,KAAK,OAAO;EACZ,KAAK,YAAY,QAAQ;EACzB,KAAK,YAAY,6BAA6B,QAAQ;EACtD,KAAK,YAAY,QAAQ,aAAa;EACtC,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,QAAQ,QAAQ,SAAS;EAC9B,KAAK,eAAe,QAAQ,gBAAgB;EAC5C,KAAK,aAAa,QAAQ,cAAc;EACxC,KAAK,gBAAgB,QAAQ,iBAAiB;EAC9C,YAAY,MAAM,QAAQ,KAAK;CACjC;AACF"}
|