This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "@devrunbook/domain",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"lint": "eslint src --max-warnings=0",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "24.13.3",
|
||||
"typescript": "5.9.3",
|
||||
"vitest": "4.1.10"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export const autonomyLevels = [
|
||||
'observe',
|
||||
'diagnose',
|
||||
'plan',
|
||||
'implement',
|
||||
'verify',
|
||||
'repair',
|
||||
] as const
|
||||
|
||||
export type AutonomyLevel = (typeof autonomyLevels)[number]
|
||||
|
||||
export class DomainError extends Error {
|
||||
constructor(
|
||||
readonly code: string,
|
||||
message: string,
|
||||
readonly details: Readonly<Record<string, unknown>> = {},
|
||||
) {
|
||||
super(message)
|
||||
this.name = 'DomainError'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user