@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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +135 -0
  3. package/dist/adapter/index.d.ts +48 -0
  4. package/dist/adapter/index.d.ts.map +1 -0
  5. package/dist/adapter-availability/index.d.ts +15 -0
  6. package/dist/adapter-availability/index.d.ts.map +1 -0
  7. package/dist/adapter-execution/index.d.ts +31 -0
  8. package/dist/adapter-execution/index.d.ts.map +1 -0
  9. package/dist/adapter-validation/index.d.ts +44 -0
  10. package/dist/adapter-validation/index.d.ts.map +1 -0
  11. package/dist/adapter.js +0 -0
  12. package/dist/agent-asset-validation/index.d.ts +34 -0
  13. package/dist/agent-asset-validation/index.d.ts.map +1 -0
  14. package/dist/agent-assets/index.d.ts +38 -0
  15. package/dist/agent-assets/index.d.ts.map +1 -0
  16. package/dist/canonical-discovery/index.d.ts +47 -0
  17. package/dist/canonical-discovery/index.d.ts.map +1 -0
  18. package/dist/canonical-discovery-validation/index.d.ts +26 -0
  19. package/dist/canonical-discovery-validation/index.d.ts.map +1 -0
  20. package/dist/constants/index.d.ts +6 -0
  21. package/dist/constants/index.d.ts.map +1 -0
  22. package/dist/contracts/index.d.ts +178 -0
  23. package/dist/contracts/index.d.ts.map +1 -0
  24. package/dist/core/index.d.ts +13 -0
  25. package/dist/core/index.d.ts.map +1 -0
  26. package/dist/decision/index.d.ts +16 -0
  27. package/dist/decision/index.d.ts.map +1 -0
  28. package/dist/decision-graph/index.d.ts +28 -0
  29. package/dist/decision-graph/index.d.ts.map +1 -0
  30. package/dist/decision-graph-validation/index.d.ts +25 -0
  31. package/dist/decision-graph-validation/index.d.ts.map +1 -0
  32. package/dist/decision-validation/index.d.ts +34 -0
  33. package/dist/decision-validation/index.d.ts.map +1 -0
  34. package/dist/diagnostic-utilities/index.d.ts +62 -0
  35. package/dist/diagnostic-utilities/index.d.ts.map +1 -0
  36. package/dist/diagnostics/index.d.ts +43 -0
  37. package/dist/diagnostics/index.d.ts.map +1 -0
  38. package/dist/exceptions/index.d.ts +38 -0
  39. package/dist/exceptions/index.d.ts.map +1 -0
  40. package/dist/format/index.d.ts +80 -0
  41. package/dist/format/index.d.ts.map +1 -0
  42. package/dist/format-validation/index.d.ts +51 -0
  43. package/dist/format-validation/index.d.ts.map +1 -0
  44. package/dist/format.js +0 -0
  45. package/dist/immutable/index.d.ts +13 -0
  46. package/dist/immutable/index.d.ts.map +1 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +4609 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/manifest/index.d.ts +32 -0
  52. package/dist/manifest/index.d.ts.map +1 -0
  53. package/dist/manifest-relationship-validation/index.d.ts +18 -0
  54. package/dist/manifest-relationship-validation/index.d.ts.map +1 -0
  55. package/dist/manifest-validation/index.d.ts +28 -0
  56. package/dist/manifest-validation/index.d.ts.map +1 -0
  57. package/dist/mirrors/index.d.ts +35 -0
  58. package/dist/mirrors/index.d.ts.map +1 -0
  59. package/dist/options/index.d.ts +26 -0
  60. package/dist/options/index.d.ts.map +1 -0
  61. package/dist/project-assets/index.d.ts +56 -0
  62. package/dist/project-assets/index.d.ts.map +1 -0
  63. package/dist/project-index/index.d.ts +20 -0
  64. package/dist/project-index/index.d.ts.map +1 -0
  65. package/dist/project-inspection/index.d.ts +23 -0
  66. package/dist/project-inspection/index.d.ts.map +1 -0
  67. package/dist/repository-inspection-session/index.d.ts +22 -0
  68. package/dist/repository-inspection-session/index.d.ts.map +1 -0
  69. package/dist/repository-reference-validation/index.d.ts +25 -0
  70. package/dist/repository-reference-validation/index.d.ts.map +1 -0
  71. package/dist/repository-text/index.d.ts +27 -0
  72. package/dist/repository-text/index.d.ts.map +1 -0
  73. package/dist/runtime-guidance/index.d.ts +32 -0
  74. package/dist/runtime-guidance/index.d.ts.map +1 -0
  75. package/dist/runtime-placeholder-validation/index.d.ts +17 -0
  76. package/dist/runtime-placeholder-validation/index.d.ts.map +1 -0
  77. package/dist/source-location/index.d.ts +11 -0
  78. package/dist/source-location/index.d.ts.map +1 -0
  79. package/dist/text/index.d.ts +33 -0
  80. package/dist/text/index.d.ts.map +1 -0
  81. package/dist/universal-project-inspection/index.d.ts +35 -0
  82. package/dist/universal-project-inspection/index.d.ts.map +1 -0
  83. package/dist/yaml/index.d.ts +40 -0
  84. package/dist/yaml/index.d.ts.map +1 -0
  85. package/package.json +62 -0
@@ -0,0 +1,51 @@
1
+ import { type IRepositoryPath } from '@moldea.ai/repository';
2
+ import type { IRepositoryReference } from '../format/index.js';
3
+ /** Determines whether a code point belongs to the Repository Format version 1 whitespace set. */
4
+ export declare const isRepositoryFormatWhitespace: (codePoint: number) => boolean;
5
+ /** Compares strings by exact Unicode code-point order without locale behavior. */
6
+ export declare const compareExactStrings: (left: string, right: string) => number;
7
+ /** Counts Unicode scalar values in valid JavaScript text. */
8
+ export declare const countUnicodeScalars: (value: string) => number;
9
+ /** Determines whether a JavaScript string contains only Unicode scalar values. */
10
+ export declare const isUnicodeScalarText: (value: string) => boolean;
11
+ /** Determines whether a value contains at least one non-whitespace scalar. */
12
+ export declare const hasNonWhitespace: (value: string) => boolean;
13
+ /** Determines whether a value begins or ends with version 1 whitespace. */
14
+ export declare const hasSurroundingWhitespace: (value: string) => boolean;
15
+ /** Removes only Repository Format version 1 whitespace from both edges. */
16
+ export declare const trimRepositoryFormatWhitespace: (value: string) => string;
17
+ /** Determines whether a string is non-empty and contains no line break. */
18
+ export declare const isNonEmptySingleLine: (value: string) => boolean;
19
+ /** Determines whether a value satisfies stable moldea ID syntax. */
20
+ export declare const isStableId: (value: string) => boolean;
21
+ /** Determines whether an otherwise valid stable ID is filesystem-reserved. */
22
+ export declare const isReservedId: (value: string) => boolean;
23
+ /** Determines whether a value satisfies runtime-variable ID syntax. */
24
+ export declare const isVariableId: (value: string) => boolean;
25
+ /** Determines whether a parsed capability description satisfies version 1 limits. */
26
+ export declare const isCapabilityDescription: (value: string) => boolean;
27
+ /** Parses a non-root repository-format logical path without throwing. */
28
+ export declare const parseManifestPath: (value: string) => IRepositoryPath | null;
29
+ /** Determines whether a path is the canonical manifest path. */
30
+ export declare const isCanonicalManifestPath: (path: IRepositoryPath) => boolean;
31
+ /** Extracts the stable millisecond ID from one canonical immediate decision path. */
32
+ export declare const parseDecisionIdFromPath: (path: IRepositoryPath) => string | null;
33
+ /** Determines whether a path is an allowed focused-context relationship key. */
34
+ export declare const isContextPath: (path: IRepositoryPath, allowProject: boolean) => boolean;
35
+ /** Determines whether a path has the canonical immediate decision filename shape. */
36
+ export declare const isDecisionPath: (path: IRepositoryPath) => boolean;
37
+ /** Determines whether a path is canonical runtime guidance. */
38
+ export declare const isRuntimeGuidancePath: (path: IRepositoryPath) => boolean;
39
+ /** Determines whether a mirror path is outside canonical moldea content. */
40
+ export declare const isMirrorPath: (path: IRepositoryPath) => boolean;
41
+ /** Determines whether an impact path contains prohibited glob metacharacters. */
42
+ export declare const hasUnsupportedGlobMetacharacter: (value: string) => boolean;
43
+ /** Determines whether a string satisfies the version 1 simple-glob grammar. */
44
+ export declare const isSimpleGlob: (value: string) => boolean;
45
+ /** Determines whether a repository-reference symbol has the common safe shape. */
46
+ export declare const isRepositorySymbol: (value: string) => boolean;
47
+ /** Determines whether a canonical moldea reference incorrectly carries a symbol. */
48
+ export declare const isCanonicalMoldeaPath: (path: IRepositoryPath) => boolean;
49
+ /** Sorts repository references by path and then optional symbol. */
50
+ export declare const sortRepositoryReferences: (references: readonly IRepositoryReference[]) => IRepositoryReference[];
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/format-validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AA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AChF,eAAO,MAAM,aAAa,GAAI,MAAM,eAAe,EAAE,cAAc,OAAO,KAAG,OAM5E,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,cAAc,GAAI,MAAM,eAAe,KAAG,OAEtD,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,GAAI,MAAM,eAAe,KAAG,OAE7D,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,YAAY,GAAI,MAAM,eAAe,KAAG,OAEpD,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,GAAI,OAAO,MAAM,KAAG,OAE/D,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAY5C,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OAElD,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,GAAI,MAAM,eAAe,KAAG,OAE7D,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,wBAAwB,GACnC,YAAY,SAAS,oBAAoB,EAAE,KAC1C,oBAAoB,EAOtB,CAAC"}
package/dist/format.js ADDED
File without changes
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Recursively freezes a Core-owned value without cloning it.
3
+ * @param value The detached acyclic value whose already-frozen objects are deeply frozen.
4
+ * @returns The same value with every mutable reachable object frozen.
5
+ */
6
+ export declare const freezeRecursively: <Value>(value: Value) => Readonly<Value>;
7
+ /**
8
+ * Creates a record that cannot collide with prototype-chain properties.
9
+ * @param entries The own string-keyed entries to assign.
10
+ * @returns A mutable null-prototype record for later normalization and freezing.
11
+ */
12
+ export declare const createNullPrototypeRecord: <Value>(entries: Iterable<readonly [string, Value]>) => Record<string, Value>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/immutable/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,EAAE,OAAO,KAAK,KAAG,QAAQ,CAAC,KAAK,CAWrE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,EAC7C,SAAS,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAC1C,MAAM,CAAC,MAAM,EAAE,KAAK,CAQtB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type { IRuntimeAdapterEvidence, IRuntimeAdapterEvidenceKind } from './adapter/index.js';
2
+ export { DEFAULT_CORE_RESOURCE_LIMITS, SUPPORTED_REPOSITORY_FORMAT_VERSIONS, } from './constants/index.js';
3
+ export type { IContentDigest, IContentDigestResult, ICore, ICoreOptions, ICoreResourceLimits, IDecisionParseResult, IIndexedAgent, IIndexedContextAsset, IIndexedDecision, IIndexedDescriptionAsset, IIndexedManifest, IIndexedMirror, IIndexedRuntimeGuidance, IIndexedTextAsset, IManifestParseResult, IMoldeaProjectIndex, INormalizedText, IProjectInspectionInput, IProjectInspectionResult, ITextDocumentContent, ITextDocumentInput, ITextNormalizationResult, } from './contracts/index.js';
4
+ export { createCore } from './core/index.js';
5
+ export type { IAdapterDiagnostic, ICoreDiagnostic, ICoreDiagnosticCode, IDiagnostic, IDiagnosticDetails, IDiagnosticEntity, ISourcePosition, ISourceRange, } from './diagnostics/index.js';
6
+ export type { ICoreConfigurationErrorCode, ICoreConfigurationExceptionOptions, ICoreOperation, ICoreOperationErrorCode, ICoreOperationExceptionOptions, } from './exceptions/index.js';
7
+ export { CoreConfigurationException, CoreOperationException } from './exceptions/index.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAG/F,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,MAAM,wBAAwB,CAAC;AAGhC,YAAY,EACV,2BAA2B,EAC3B,kCAAkC,EAClC,cAAc,EACd,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}