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.
Classes¶
- CircularDependencyError
- CircularGuardRequiresError
- FileNotFoundError
- GitAuthError
- GitCloneError
- GitRefNotFoundError
- LockfileIntegrityError
- MissingParamError
- OfflineResolveError
- ParamTypeMismatchError
- ParseError
- PSError
- RateLimitError
- RegistryPathNotFoundError
- ResolveError
- SemverNoMatchError
- UndefinedVariableError
- UnexpectedTokenError
- UnknownAliasError
- UnknownParamError
- ValidationError
Interfaces¶
- ArrayContent
- BaseNode
- BasePolicyDefinition
- Block
- CatalogEntry
- ComposedPhase
- DetectionHints
- Diagnostic
- ExampleDefinition
- ExtendBlock
- FormatDiagnosticOptions
- FormattingConfig
- InheritDeclaration
- InlineUseDeclaration
- LayerBoundaryPolicy
- Lockfile
- LockfileDependency
- LockfileReference
- Logger
- MetaBlock
- MixedContent
- NamespaceDefinition
- ObjectContent
- OutputConvention
- ParamArgument
- ParamDefinition
- PathReference
- PolicyViolation
- PrettierMarkdownOptions
- Program
- ProjectContext
- PromptScriptConfig
- PropertyProtectionPolicy
- RegistryAliasEntry
- RegistryAllowlistPolicy
- RegistryManifest
- RegistryMeta
- SectionRenderer
- SkillContractField
- SkillDefinition
- SourceAttribution
- SourceLocation
- SourceRange
- SuggestionAction
- SuggestionCondition
- SuggestionReasoning
- SuggestionResult
- SuggestionRule
- SyntaxVersionDef
- TargetConfig
- TemplateContext
- TemplateExpression
- TextContent
- TypeExpression
- UseDeclaration
- UserConfig
Type Aliases¶
- BlockContent
- BlockName
- BlockTypeName
- BuiltInConventionName
- ClaudeVersion
- ConventionName
- CustomTarget
- DiagnosticSeverity
- GithubVersion
- KnownTarget
- ManifestTarget
- ParamType
- PolicyDefinition
- PolicyKind
- PolicySeverity
- PrimitiveValue
- RegistriesConfig
- ReservedWord
- Severity
- TargetEntry
- TargetName
- Value
Variables¶
- BLOCK_TYPES
- BUILT_IN_CONVENTIONS
- DEFAULT_OUTPUT_PATHS
- DEFAULT_PRETTIER_OPTIONS
- KNOWN_TARGETS
- LATEST_SYNTAX_VERSION
- LOCKFILE_VERSION
- MARKDOWN_CONVENTION
- noopLogger
- RESERVED_WORDS
- SYNTAX_VERSIONS
- XML_CONVENTION
Functions¶
- bindParams
- compareVersions
- createLocation
- createLogger
- createPathReference
- customTarget
- deepClone
- deepMerge
- findClosestMatch
- formatDiagnostic
- formatDiagnostics
- formatPath
- formatVersion
- getBlocksForVersion
- getBuiltInConvention
- getFileName
- getLatestSyntaxVersion
- getMinimumVersionForBlock
- getPackageInfo
- getPackageVersion
- incrementVersion
- interpolateAST
- interpolateContent
- interpolateText
- isAbsolutePath
- isBlockType
- isBuiltInConvention
- isKnownSyntaxVersion
- isKnownTarget
- isPlainObject
- isRelativePath
- isReservedWord
- isTemplateExpression
- isTextContent
- isValidLockfile
- isValidVersion
- levenshteinDistance
- parsePath
- parseVersion
- resolvePath