core/src¶
Core types, errors, and utilities for the PromptScript toolchain.
This package provides the foundational types and comprehensive error handling classes used across the entire PromptScript ecosystem. It includes:
- Common Types: AST interfaces, configuration schemas, and shared type definitions.
- Error Handling: A hierarchy of typed errors (
PSError) for precise exception management. - Utilities: Shared helper functions for path manipulation and validation.
Enumerations¶
Classes¶
- CircularDependencyError
- FileNotFoundError
- ParseError
- PSError
- ResolveError
- UnexpectedTokenError
- ValidationError
Interfaces¶
- ArrayContent
- BaseNode
- Block
- Diagnostic
- ExtendBlock
- FormatDiagnosticOptions
- InheritDeclaration
- MergeOptions
- MetaBlock
- MixedContent
- ObjectContent
- OutputConvention
- PackageInfo
- ParsedPath
- PathReference
- Program
- PromptScriptConfig
- SectionRenderer
- SemVer
- SourceLocation
- SourceRange
- TargetConfig
- TextContent
- TypeExpression
- UseDeclaration
Type Aliases¶
- BlockContent
- BlockName
- BlockTypeName
- BuiltInConventionName
- ClaudeVersion
- CompareResult
- ConventionName
- DiagnosticSeverity
- GithubVersion
- PrimitiveValue
- ReservedWord
- Severity
- TargetEntry
- TargetName
- Value
Variables¶
- BLOCK_TYPES
- BUILT_IN_CONVENTIONS
- DEFAULT_MERGE_OPTIONS
- DEFAULT_OUTPUT_PATHS
- MARKDOWN_CONVENTION
- RESERVED_WORDS
- XML_CONVENTION
Functions¶
- compareVersions
- createLocation
- createPathReference
- deepClone
- deepMerge
- formatDiagnostic
- formatDiagnostics
- formatPath
- formatVersion
- getBuiltInConvention
- getFileName
- getPackageInfo
- getPackageVersion
- incrementVersion
- isAbsolutePath
- isBlockType
- isBuiltInConvention
- isPlainObject
- isRelativePath
- isReservedWord
- isTextContent
- isValidVersion
- parsePath
- parseVersion
- resolvePath