principles-disciple 1.201.0 → 1.202.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/dist/bundle.js +166 -166
- package/dist/commands/archive-impl.d.ts +18 -0
- package/dist/commands/capabilities.d.ts +3 -0
- package/dist/commands/context.d.ts +5 -0
- package/dist/commands/disable-impl.d.ts +22 -0
- package/dist/commands/evolution-status.d.ts +4 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/focus.d.ts +14 -0
- package/dist/commands/pain.d.ts +6 -0
- package/dist/commands/principle-rollback.d.ts +4 -0
- package/dist/commands/promote-impl.d.ts +22 -0
- package/dist/commands/rollback-impl.d.ts +32 -0
- package/dist/commands/rollback.d.ts +19 -0
- package/dist/commands/samples.d.ts +2 -0
- package/dist/commands/strategy.d.ts +2 -0
- package/dist/commands/thinking-os.d.ts +2 -0
- package/dist/commands/workflow-debug.d.ts +4 -0
- package/dist/config/defaults/runtime.d.ts +58 -0
- package/dist/config/errors.d.ts +86 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/constants/tools.d.ts +17 -0
- package/dist/core/__tests__/focus-history.test.d.ts +1 -0
- package/dist/core/behavior-example-pack-assembler.d.ts +38 -0
- package/dist/core/bootstrap-rules.d.ts +50 -0
- package/dist/core/code-implementation-storage.d.ts +71 -0
- package/dist/core/config-health.d.ts +17 -0
- package/dist/core/config-service.d.ts +15 -0
- package/dist/core/config.d.ts +111 -0
- package/dist/core/control-ui-db.d.ts +117 -0
- package/dist/core/correction-cue-learner.d.ts +33 -0
- package/dist/core/correction-types.d.ts +3 -0
- package/dist/core/detection-funnel.d.ts +47 -0
- package/dist/core/detection-service.d.ts +15 -0
- package/dist/core/dictionary-service.d.ts +15 -0
- package/dist/core/dictionary.d.ts +38 -0
- package/dist/core/empathy-keyword-matcher.d.ts +5 -0
- package/dist/core/empathy-types.d.ts +2 -0
- package/dist/core/event-log.d.ts +98 -0
- package/dist/core/evolution-engine.d.ts +119 -0
- package/dist/core/evolution-logger.d.ts +137 -0
- package/dist/core/evolution-reducer.d.ts +116 -0
- package/dist/core/evolution-types.d.ts +50 -0
- package/dist/core/file-store.d.ts +41 -0
- package/dist/core/focus-history.d.ts +50 -0
- package/dist/core/hygiene/tracker.d.ts +22 -0
- package/dist/core/init.d.ts +30 -0
- package/dist/core/intent-doc-reader-adapter.d.ts +36 -0
- package/dist/core/intent-doc-reader.d.ts +89 -0
- package/dist/core/migration.d.ts +6 -0
- package/dist/core/pain-diagnostic-gate.d.ts +45 -0
- package/dist/core/pain.d.ts +24 -0
- package/dist/core/path-resolver.d.ts +60 -0
- package/dist/core/paths.d.ts +59 -0
- package/dist/core/pd-config-loader.d.ts +96 -0
- package/dist/core/pd-task-reconciler.d.ts +89 -0
- package/dist/core/pd-task-service.d.ts +2 -0
- package/dist/core/pd-task-store.d.ts +5 -0
- package/dist/core/pd-task-types.d.ts +8 -0
- package/dist/core/principle-compiler/__tests__/compiler-replay-gate.test.d.ts +1 -0
- package/dist/core/principle-compiler/code-validator.d.ts +14 -0
- package/dist/core/principle-compiler/compiler.d.ts +45 -0
- package/dist/core/principle-compiler/index.d.ts +12 -0
- package/dist/core/principle-compiler/ledger-registrar.d.ts +28 -0
- package/dist/core/principle-compiler/template-generator.d.ts +7 -0
- package/dist/core/principle-injection.d.ts +10 -0
- package/dist/core/principle-internalization/filesystem-lifecycle-datasource.d.ts +15 -0
- package/dist/core/principle-internalization/lifecycle-read-model.d.ts +17 -0
- package/dist/core/principle-internalization/lifecycle-refresh.d.ts +2 -0
- package/dist/core/principle-internalization/principle-lifecycle-service.d.ts +28 -0
- package/dist/core/principle-training-state.d.ts +47 -0
- package/dist/core/principle-tree-ledger.d.ts +30 -0
- package/dist/core/profile.d.ts +62 -0
- package/dist/core/reflection/reflection-context.d.ts +31 -0
- package/dist/core/replay-engine.d.ts +12 -0
- package/dist/core/rule-context-assembler.d.ts +45 -0
- package/dist/core/rule-host.d.ts +178 -0
- package/dist/core/rule-implementation-runtime.d.ts +18 -0
- package/dist/core/runtime-v2-prompt-activation-reader.d.ts +22 -0
- package/dist/core/session-tracker.d.ts +119 -0
- package/dist/core/signal-collector-host.d.ts +113 -0
- package/dist/core/system-logger.d.ts +24 -0
- package/dist/core/thinking-models.d.ts +25 -0
- package/dist/core/thinking-os-parser.d.ts +35 -0
- package/dist/core/trajectory-types.d.ts +247 -0
- package/dist/core/trajectory.d.ts +279 -0
- package/dist/core/workflow-funnel-loader.d.ts +72 -0
- package/dist/core/workspace-context.d.ts +114 -0
- package/dist/core/workspace-dir-validation.d.ts +11 -0
- package/dist/core/workspace-guidance-migrator.d.ts +12 -0
- package/dist/hooks/after-tool-call-helpers.d.ts +97 -0
- package/dist/hooks/after-tool-call-types.d.ts +86 -0
- package/dist/hooks/gate-block-helper.d.ts +44 -0
- package/dist/hooks/gate.d.ts +16 -0
- package/dist/hooks/lifecycle.d.ts +5 -0
- package/dist/hooks/llm.d.ts +21 -0
- package/dist/hooks/message-sanitize.d.ts +24 -0
- package/dist/hooks/pain.d.ts +35 -0
- package/dist/hooks/prompt-helpers.d.ts +105 -0
- package/dist/hooks/prompt-types.d.ts +74 -0
- package/dist/hooks/prompt.d.ts +22 -0
- package/dist/hooks/raw-observation-adapter.d.ts +16 -0
- package/dist/hooks/raw-observation-types.d.ts +11 -0
- package/dist/hooks/trajectory-collector.d.ts +41 -0
- package/dist/hooks/trajectory-evidence.d.ts +11 -0
- package/dist/hooks/triage-adapter.d.ts +58 -0
- package/dist/hooks/trigger-cooldown-tracker.d.ts +42 -0
- package/dist/i18n/commands.d.ts +26 -0
- package/dist/index.d.ts +52 -0
- package/dist/openclaw-sdk.d.ts +338 -0
- package/dist/openclaw.plugin.json +1 -1
- package/dist/rulehost-evidence.d.ts +4 -0
- package/dist/service/correction-observer-service.d.ts +19 -0
- package/dist/service/evolution-dedup.d.ts +27 -0
- package/dist/service/evolution-worker.d.ts +105 -0
- package/dist/service/internalization-auto-consumer-service.d.ts +8 -0
- package/dist/service/keyword-optimization-service.d.ts +44 -0
- package/dist/service/phase3-input-filter.d.ts +73 -0
- package/dist/service/queue-io.d.ts +30 -0
- package/dist/service/queue-migration.d.ts +84 -0
- package/dist/service/runtime-summary-service.d.ts +156 -0
- package/dist/service/subagent-workflow/subagent-error-utils.d.ts +8 -0
- package/dist/service/subagent-workflow/types.d.ts +264 -0
- package/dist/service/subagent-workflow/workflow-store.d.ts +44 -0
- package/dist/service/trajectory-service.d.ts +2 -0
- package/dist/service/workflow-watchdog.d.ts +23 -0
- package/dist/types/event-types.d.ts +2 -0
- package/dist/types/hygiene-types.d.ts +2 -0
- package/dist/types/principle-tree-schema.d.ts +29 -0
- package/dist/types/queue.d.ts +2 -0
- package/dist/types/runtime-summary.d.ts +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/utils/file-lock.d.ts +68 -0
- package/dist/utils/hashing.d.ts +9 -0
- package/dist/utils/io.d.ts +11 -0
- package/dist/utils/node-vm-polyfill.d.ts +9 -0
- package/dist/utils/retry.d.ts +210 -0
- package/dist/utils/session-key.d.ts +10 -0
- package/dist/utils/workspace-resolver.d.ts +82 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { OpenClawPluginApi } from '../openclaw-sdk.js';
|
|
2
|
+
export interface PathResolverOptions {
|
|
3
|
+
workspaceDir?: string;
|
|
4
|
+
normalizeWorkspace?: boolean;
|
|
5
|
+
logger?: {
|
|
6
|
+
debug?: (_msg: string) => void;
|
|
7
|
+
info?: (_msg: string) => void;
|
|
8
|
+
warn?: (_msg: string) => void;
|
|
9
|
+
error?: (_msg: string) => void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const PD_ENV_VARS: {
|
|
13
|
+
readonly WORKSPACE_DIR: 'PD_WORKSPACE_DIR';
|
|
14
|
+
readonly STATE_DIR: 'PD_STATE_DIR';
|
|
15
|
+
readonly DEBUG: 'DEBUG';
|
|
16
|
+
};
|
|
17
|
+
export declare const PD_ENV_DESCRIPTIONS: Record<keyof typeof PD_ENV_VARS, {
|
|
18
|
+
desc: string;
|
|
19
|
+
example: string;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function printEnvVarHelp(): void;
|
|
22
|
+
export interface PDConfig {
|
|
23
|
+
workspace?: string;
|
|
24
|
+
state?: string;
|
|
25
|
+
debug?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare class PathResolver {
|
|
28
|
+
private static extensionRoot;
|
|
29
|
+
private workspaceDir;
|
|
30
|
+
private stateDir;
|
|
31
|
+
private readonly logger?;
|
|
32
|
+
private readonly normalizeWorkspace;
|
|
33
|
+
private initialized;
|
|
34
|
+
static setExtensionRoot(extensionRootPath: string): void;
|
|
35
|
+
static getExtensionRoot(): string | null;
|
|
36
|
+
constructor(options?: PathResolverOptions);
|
|
37
|
+
private log;
|
|
38
|
+
private detectWorkspaceDir;
|
|
39
|
+
private normalizePath;
|
|
40
|
+
normalizeWorkspacePath(inputPath: string): string;
|
|
41
|
+
getWorkspaceDir(): string;
|
|
42
|
+
getStateDir(): string;
|
|
43
|
+
resolve(key: string): string;
|
|
44
|
+
ensureStateDir(): void;
|
|
45
|
+
static createFromHookContext(ctx: Record<string, unknown>): PathResolver;
|
|
46
|
+
}
|
|
47
|
+
export declare function createDefaultConfig(targetPath?: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve workspace directory via OpenClaw's official API.
|
|
50
|
+
*
|
|
51
|
+
* Replaces the removed `api.workspaceDir` field.
|
|
52
|
+
*
|
|
53
|
+
* Priority: api.runtime.agent.resolveAgentWorkspaceDir(agentId)
|
|
54
|
+
* → PathResolver.getWorkspaceDir() (PD env vars, config file, default)
|
|
55
|
+
*
|
|
56
|
+
* @param api - Plugin API instance
|
|
57
|
+
* @param agentId - Agent ID (defaults to 'main' if not provided)
|
|
58
|
+
* @returns Resolved workspace directory, or `undefined` if all resolution paths fail
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveWorkspaceDirFromApi(api: OpenClawPluginApi | undefined, agentId?: string): string | undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principles Disciple Directory Constants
|
|
3
|
+
* Establishing a logical separation between Identity, State, and Memory.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PD_DIRS: {
|
|
6
|
+
IDENTITY: string;
|
|
7
|
+
MODELS: string;
|
|
8
|
+
STATE: string;
|
|
9
|
+
MEMORY: string;
|
|
10
|
+
OKR: string;
|
|
11
|
+
LOGS: string;
|
|
12
|
+
SESSIONS: string;
|
|
13
|
+
PAIN_SAMPLES: string;
|
|
14
|
+
LOCKS: string;
|
|
15
|
+
IMPL_CODE_DIR: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Standard File Path Mappings
|
|
19
|
+
*/
|
|
20
|
+
export declare const PD_FILES: {
|
|
21
|
+
PROFILE: string;
|
|
22
|
+
PRINCIPLES: string;
|
|
23
|
+
THINKING_OS: string;
|
|
24
|
+
DECISION_POLICY: string;
|
|
25
|
+
MODELS_DIR: string;
|
|
26
|
+
STATE_DIR: string;
|
|
27
|
+
EVOLUTION_QUEUE: string;
|
|
28
|
+
EVOLUTION_DIRECTIVE: string;
|
|
29
|
+
WORKBOARD: string;
|
|
30
|
+
AGENT_SCORECARD: string;
|
|
31
|
+
PAIN_FLAG: string;
|
|
32
|
+
SYSTEM_CAPABILITIES: string;
|
|
33
|
+
PAIN_SETTINGS: string;
|
|
34
|
+
PAIN_CANDIDATES: string;
|
|
35
|
+
THINKING_OS_USAGE: string;
|
|
36
|
+
TRAJECTORY_DB: string;
|
|
37
|
+
TRAJECTORY_BLOBS_DIR: string;
|
|
38
|
+
EXPORTS_DIR: string;
|
|
39
|
+
SESSION_DIR: string;
|
|
40
|
+
DICTIONARY: string;
|
|
41
|
+
PRINCIPLE_BLACKLIST: string;
|
|
42
|
+
WORKFLOWS_YAML: string;
|
|
43
|
+
IMPL_CODE_DIR: string;
|
|
44
|
+
MEMORY_MD: string;
|
|
45
|
+
HEARTBEAT: string;
|
|
46
|
+
SYSTEM_LOG: string;
|
|
47
|
+
REFLECTION_LOG: string;
|
|
48
|
+
USER_CONTEXT: string;
|
|
49
|
+
OKR_DIR: string;
|
|
50
|
+
CURRENT_FOCUS: string;
|
|
51
|
+
WEEK_STATE: string;
|
|
52
|
+
THINKING_OS_CANDIDATES: string;
|
|
53
|
+
EVOLUTION_STREAM: string;
|
|
54
|
+
EVOLUTION_LOCK: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Resolves a PD file path within a given workspace.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolvePdPath(workspaceDir: string, fileKey: keyof typeof PD_FILES): string;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PD Config Loader (Plugin I/O boundary) — PRI-307
|
|
3
|
+
*
|
|
4
|
+
* Reads `.pd/config.yaml`, validates via core, computes effective config.
|
|
5
|
+
* Replaces the old `.pd/feature-flags.yaml` and `.state/workflows.yaml` reading
|
|
6
|
+
* for plugin production paths.
|
|
7
|
+
*
|
|
8
|
+
* ADR-0016: PD owns exactly one user config file.
|
|
9
|
+
* - Missing config → defaults with nextAction
|
|
10
|
+
* - Malformed config → fail loud with errors and nextAction
|
|
11
|
+
* - No secrets in output
|
|
12
|
+
* - Observer disabled → no start / no noisy log cycling
|
|
13
|
+
* - Observer enabled + missing setup → structured needs_setup + nextAction
|
|
14
|
+
*/
|
|
15
|
+
import type { EffectivePdConfig } from '@principles/core/runtime-v2';
|
|
16
|
+
export declare const PD_CONFIG_DIR = ".pd";
|
|
17
|
+
export declare const PD_CONFIG_FILENAME = "config.yaml";
|
|
18
|
+
export type ObserverReadiness = 'disabled' | 'needs_setup' | 'ready' | 'not_ready' | 'config_malformed';
|
|
19
|
+
export interface ObserverConfigResult {
|
|
20
|
+
/** Whether the observer feature is enabled in config */
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
/** Observer readiness state */
|
|
23
|
+
readiness: ObserverReadiness;
|
|
24
|
+
/** Config source: 'defaults' | 'user_config' | 'malformed' */
|
|
25
|
+
source: string;
|
|
26
|
+
/** Reason for current state */
|
|
27
|
+
reason: string;
|
|
28
|
+
/** What the user should do next */
|
|
29
|
+
nextAction: string;
|
|
30
|
+
/** The runtime profile ID for this observer, if configured */
|
|
31
|
+
runtimeProfileId: string | null;
|
|
32
|
+
/** The runtime profile type, if configured */
|
|
33
|
+
runtimeProfileType: string | null;
|
|
34
|
+
/** The apiKeyEnv for the runtime profile, if applicable */
|
|
35
|
+
apiKeyEnv: string | null;
|
|
36
|
+
/** Whether the apiKeyEnv is present in process.env */
|
|
37
|
+
apiKeyPresent: boolean;
|
|
38
|
+
/** Provider name from runtime profile */
|
|
39
|
+
provider: string | null;
|
|
40
|
+
/** Model name from runtime profile */
|
|
41
|
+
model: string | null;
|
|
42
|
+
/** Timeout from runtime profile */
|
|
43
|
+
timeoutMs: number | null;
|
|
44
|
+
/** Base URL from runtime profile */
|
|
45
|
+
baseUrl: string | null;
|
|
46
|
+
/** Config validation errors (only present when readiness=config_malformed) */
|
|
47
|
+
configErrors?: Array<{
|
|
48
|
+
path: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
nextAction: string;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
export interface PluginConfigLoadResult {
|
|
54
|
+
ok: boolean;
|
|
55
|
+
effective: EffectivePdConfig;
|
|
56
|
+
source: 'defaults' | 'user_config' | 'malformed';
|
|
57
|
+
configPath: string;
|
|
58
|
+
warnings: string[];
|
|
59
|
+
errors: Array<{
|
|
60
|
+
path: string;
|
|
61
|
+
reason: string;
|
|
62
|
+
nextAction: string;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
export declare function getPdConfigPath(workspaceDir: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Load and validate `.pd/config.yaml` from the workspace.
|
|
68
|
+
* Never throws on malformed input. Always provides a usable fallback.
|
|
69
|
+
*/
|
|
70
|
+
export declare function loadPdConfigForPlugin(workspaceDir: string): PluginConfigLoadResult;
|
|
71
|
+
/**
|
|
72
|
+
* Get a single feature flag's enabled state from .pd/config.yaml.
|
|
73
|
+
* Replaces the old `loadFeatureFlagFromWorkspace` which read .pd/feature-flags.yaml.
|
|
74
|
+
*/
|
|
75
|
+
export declare function loadFeatureFlagFromConfig(workspaceDir: string, flagId: string, logger?: {
|
|
76
|
+
warn?: (msg: string) => void;
|
|
77
|
+
info?: (msg: string) => void;
|
|
78
|
+
}): {
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
source: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Resolve observer configuration from .pd/config.yaml.
|
|
84
|
+
*
|
|
85
|
+
* Returns structured state:
|
|
86
|
+
* - config_malformed: config file is invalid — no guessing, fail loud
|
|
87
|
+
* - disabled: observer feature flag is off OR agent.enabled=false → no start, no noisy logs
|
|
88
|
+
* - needs_setup: observer enabled but runtime profile missing, API key not set, or unsupported profile type
|
|
89
|
+
* - ready: observer enabled and fully configured (pi-ai with key present)
|
|
90
|
+
* - not_ready: observer enabled, API key present, but runtime availability unknown
|
|
91
|
+
*/
|
|
92
|
+
export declare function resolveObserverConfig(workspaceDir: string, observerFlagId: string, observerAgentName: string, _logger?: {
|
|
93
|
+
warn?: (msg: string) => void;
|
|
94
|
+
info?: (msg: string) => void;
|
|
95
|
+
debug?: (msg: string) => void;
|
|
96
|
+
}): ObserverConfigResult;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { PDTaskSpec } from './pd-task-types.js';
|
|
2
|
+
export interface CronJobState {
|
|
3
|
+
nextRunAtMs?: number;
|
|
4
|
+
runningAtMs?: number;
|
|
5
|
+
lastRunAtMs?: number;
|
|
6
|
+
lastRunStatus?: string;
|
|
7
|
+
lastStatus?: 'ok' | 'error' | 'skipped';
|
|
8
|
+
lastError?: string;
|
|
9
|
+
lastDurationMs?: number;
|
|
10
|
+
consecutiveErrors?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CronJob {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
agentId?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
deleteAfterRun?: boolean;
|
|
19
|
+
createdAtMs: number;
|
|
20
|
+
updatedAtMs: number;
|
|
21
|
+
schedule: {
|
|
22
|
+
kind: 'every';
|
|
23
|
+
everyMs: number;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'at';
|
|
26
|
+
at: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'cron';
|
|
29
|
+
expr: string;
|
|
30
|
+
tz?: string;
|
|
31
|
+
};
|
|
32
|
+
sessionTarget: string;
|
|
33
|
+
wakeMode: string;
|
|
34
|
+
payload: {
|
|
35
|
+
kind: 'systemEvent';
|
|
36
|
+
text: string;
|
|
37
|
+
} | {
|
|
38
|
+
kind: 'agentTurn';
|
|
39
|
+
message: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
thinking?: string;
|
|
42
|
+
timeoutSeconds?: number;
|
|
43
|
+
lightContext?: boolean;
|
|
44
|
+
toolsAllow?: string[];
|
|
45
|
+
};
|
|
46
|
+
delivery?: {
|
|
47
|
+
mode: string;
|
|
48
|
+
channel?: string;
|
|
49
|
+
to?: string;
|
|
50
|
+
};
|
|
51
|
+
state: CronJobState;
|
|
52
|
+
metadata?: Record<string, string>;
|
|
53
|
+
}
|
|
54
|
+
export interface CronStoreFile {
|
|
55
|
+
version: number;
|
|
56
|
+
jobs: CronJob[];
|
|
57
|
+
}
|
|
58
|
+
export type DiffActionType = 'CREATE' | 'UPDATE' | 'DISABLE' | 'ORPHAN' | 'SKIP';
|
|
59
|
+
export interface DiffAction {
|
|
60
|
+
type: DiffActionType;
|
|
61
|
+
task?: PDTaskSpec;
|
|
62
|
+
job?: CronJob;
|
|
63
|
+
}
|
|
64
|
+
export interface ReconcileError {
|
|
65
|
+
taskId: string;
|
|
66
|
+
message: string;
|
|
67
|
+
}
|
|
68
|
+
export interface ReconcileResult {
|
|
69
|
+
created: string[];
|
|
70
|
+
updated: string[];
|
|
71
|
+
skipped: string[];
|
|
72
|
+
orphaned: string[];
|
|
73
|
+
errors: ReconcileError[];
|
|
74
|
+
}
|
|
75
|
+
export interface ReconcileOptions {
|
|
76
|
+
dryRun?: boolean;
|
|
77
|
+
workspaceDir: string;
|
|
78
|
+
logger?: {
|
|
79
|
+
info?: (_: string) => void;
|
|
80
|
+
warn?: (_: string) => void;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export declare function reconcilePDTasks(workspaceDir: string, options?: Partial<ReconcileOptions>): Promise<ReconcileResult>;
|
|
84
|
+
export declare function trigger(taskId: string, workspaceDir: string, options?: {
|
|
85
|
+
force?: boolean;
|
|
86
|
+
}): Promise<{
|
|
87
|
+
ok: boolean;
|
|
88
|
+
error?: string;
|
|
89
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PDTaskSpec } from './pd-task-types.js';
|
|
2
|
+
export declare function readTasks(workspaceDir: string): PDTaskSpec[];
|
|
3
|
+
export declare function writeTasks(workspaceDir: string, tasks: PDTaskSpec[]): Promise<void>;
|
|
4
|
+
export declare function initTaskMeta(task: PDTaskSpec): PDTaskSpec;
|
|
5
|
+
export declare function updateSyncMeta(task: PDTaskSpec, status: 'ok' | 'error', jobId?: string, error?: string): PDTaskSpec;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PDTaskSchedule as CorePDTaskSchedule, PDTaskExecution as CorePDTaskExecution, PDTaskDelivery as CorePDTaskDelivery, PDTaskMeta as CorePDTaskMeta, PDTaskSpec as CorePDTaskSpec } from '@principles/core/runtime-v2';
|
|
2
|
+
export type PDTaskSchedule = CorePDTaskSchedule;
|
|
3
|
+
export type PDTaskExecution = CorePDTaskExecution;
|
|
4
|
+
export type PDTaskDelivery = CorePDTaskDelivery;
|
|
5
|
+
export type PDTaskMeta = CorePDTaskMeta;
|
|
6
|
+
export type PDTaskSpec = CorePDTaskSpec;
|
|
7
|
+
export { PDTaskScheduleSchema, PDTaskExecutionSchema, PDTaskDeliverySchema, PDTaskMetaSchema, PDTaskSpecSchema, } from '@principles/core/runtime-v2';
|
|
8
|
+
export declare const BUILTIN_PD_TASKS: PDTaskSpec[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code Validator — Validates LLM-generated rule implementation code
|
|
3
|
+
*
|
|
4
|
+
* CHECKS:
|
|
5
|
+
* 1. Syntax: code parses without errors (VM)
|
|
6
|
+
* 2. Forbidden patterns: delegates to core checkForbiddenPatterns (PRI-44)
|
|
7
|
+
* 3. Export check: sandbox loads and exports evaluate + meta (VM)
|
|
8
|
+
* 4. Return shape: evaluate(mockInput) returns { matched: boolean } (VM)
|
|
9
|
+
*
|
|
10
|
+
* PRI-44: Forbidden pattern detection extracted to @principles/core.
|
|
11
|
+
*/
|
|
12
|
+
import { type ValidationResult } from '@principles/core/runtime-v2';
|
|
13
|
+
export type { ValidationResult } from '@principles/core/runtime-v2';
|
|
14
|
+
export declare function validateGeneratedCode(code: string): ValidationResult;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PrincipleCompiler — Orchestrator (Task 5)
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates the full compilation flow:
|
|
5
|
+
* ReflectionContextCollector.collect() → extract patterns → generateFromTemplate()
|
|
6
|
+
* → validateGeneratedCode() → [replay validation] → registerCompiledRule()
|
|
7
|
+
*
|
|
8
|
+
* DESIGN DECISIONS:
|
|
9
|
+
* - extractPatterns infers toolName from pain event reasons and session tool calls
|
|
10
|
+
* - Groups by toolName into PainPattern objects
|
|
11
|
+
* - If no patterns can be extracted, returns a 'no patterns' failure
|
|
12
|
+
* - PRI-115: Replay validation gate runs after code validation, before registration
|
|
13
|
+
*/
|
|
14
|
+
import type { TrajectoryDatabase } from '../trajectory.js';
|
|
15
|
+
import type { CompileResult } from '@principles/core/runtime-v2';
|
|
16
|
+
export type { CompileResult } from '@principles/core/runtime-v2';
|
|
17
|
+
export declare class PrincipleCompiler {
|
|
18
|
+
private readonly stateDir;
|
|
19
|
+
private readonly collector;
|
|
20
|
+
constructor(stateDir: string, trajectory: TrajectoryDatabase);
|
|
21
|
+
/**
|
|
22
|
+
* Compile a single principle into an auto-generated rule.
|
|
23
|
+
*
|
|
24
|
+
* Flow:
|
|
25
|
+
* 1. Collect reflection context
|
|
26
|
+
* 2. Extract pain patterns
|
|
27
|
+
* 3. Generate code from template
|
|
28
|
+
* 4. Validate generated code
|
|
29
|
+
* 4.5. Replay validation against GoldenTrace (PRI-115)
|
|
30
|
+
* 5. Register in ledger
|
|
31
|
+
*/
|
|
32
|
+
compileOne(principleId: string): CompileResult;
|
|
33
|
+
/**
|
|
34
|
+
* Build GoldenTrace test cases from extracted pain patterns.
|
|
35
|
+
*
|
|
36
|
+
* Generates synthetic negative/positive parameter pairs based on whether
|
|
37
|
+
* the pattern targets commands (commandRegex) or paths (pathRegex).
|
|
38
|
+
* Returns an empty array when no patterns are available.
|
|
39
|
+
*/
|
|
40
|
+
private buildGoldenTraceCases;
|
|
41
|
+
/**
|
|
42
|
+
* Compile all eligible principles (those with derivedFromPainIds).
|
|
43
|
+
*/
|
|
44
|
+
compileAll(): CompileResult[];
|
|
45
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principle Compiler — Barrel Export
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all principle-compiler components for convenient importing.
|
|
5
|
+
* PRI-44: Types and pure logic re-exported from @principles/core.
|
|
6
|
+
*/
|
|
7
|
+
export { PrincipleCompiler } from './compiler.js';
|
|
8
|
+
export type { CompileResult } from './compiler.js';
|
|
9
|
+
export { validateGeneratedCode } from './code-validator.js';
|
|
10
|
+
export type { ValidationResult } from './code-validator.js';
|
|
11
|
+
export { generateFromTemplate, type PainPattern } from './template-generator.js';
|
|
12
|
+
export { registerCompiledRule, type RegisterInput, type RegisterResult } from './ledger-registrar.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ledger Registrar (Task 4)
|
|
3
|
+
*
|
|
4
|
+
* Registers a compiled rule into the principle tree ledger:
|
|
5
|
+
* 1. Creates a LedgerRule with type 'gate', enforcement 'block', status 'proposed'
|
|
6
|
+
* 2. Creates an Implementation with type 'code', lifecycleState 'active'
|
|
7
|
+
*
|
|
8
|
+
* IDEMPOTENCY: If the rule already exists, returns existing registration.
|
|
9
|
+
* ROLLBACK: If implementation creation fails after rule creation, attempts cleanup.
|
|
10
|
+
*/
|
|
11
|
+
export interface RegisterInput {
|
|
12
|
+
principleId: string;
|
|
13
|
+
codeContent: string;
|
|
14
|
+
coversCondition: string;
|
|
15
|
+
}
|
|
16
|
+
export interface RegisterResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
ruleId: string;
|
|
19
|
+
implementationId: string;
|
|
20
|
+
codePath: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Register a compiled rule for a principle in the ledger.
|
|
24
|
+
*
|
|
25
|
+
* Idempotent: if rule already exists, returns existing registration.
|
|
26
|
+
* Atomic: if implementation creation fails, rolls back the rule.
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerCompiledRule(stateDir: string, input: RegisterInput): RegisterResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Generator — Re-export from @principles/core
|
|
3
|
+
*
|
|
4
|
+
* PRI-44: Pure template generation logic moved to core.
|
|
5
|
+
* This file re-exports for backward compatibility.
|
|
6
|
+
*/
|
|
7
|
+
export { generateFromTemplate, type PainPattern } from '@principles/core/runtime-v2';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principle Injection — Budget-Aware Principle Selection
|
|
3
|
+
*
|
|
4
|
+
* Phase: PRI-75 Prompt Injection SDK Migration Phase 2
|
|
5
|
+
*
|
|
6
|
+
* This file is now a thin re-export layer.
|
|
7
|
+
* All pure logic lives in @principles/core/prompt-builder/principle-selection.ts.
|
|
8
|
+
*/
|
|
9
|
+
export { formatPrinciple, selectPrinciplesForInjection, DEFAULT_PRINCIPLE_BUDGET, } from '@principles/core/prompt-builder';
|
|
10
|
+
export type { InjectablePrinciple, PrincipleSelectionResult } from '@principles/core/prompt-builder';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LifecycleDatasource } from '@principles/core/runtime-v2';
|
|
2
|
+
import type { LedgerTreeStore, ReplayReport, ArtifactLineageRecord } from '@principles/core/runtime-v2';
|
|
3
|
+
export declare class LineageSourceRetiredError extends Error {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare class FilesystemLifecycleDatasource implements LifecycleDatasource {
|
|
7
|
+
private readonly workspaceDir;
|
|
8
|
+
private readonly stateDir;
|
|
9
|
+
private _engine?;
|
|
10
|
+
constructor(workspaceDir: string, stateDir: string);
|
|
11
|
+
private get engine();
|
|
12
|
+
loadLedger(): LedgerTreeStore;
|
|
13
|
+
listReplayReports(implementationId: string): ReplayReport[];
|
|
14
|
+
listLineageRecords(_kind: 'behavioral-sample' | 'rule-implementation-candidate'): ArtifactLineageRecord[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle read model — re-export facade (PRI-56).
|
|
3
|
+
*
|
|
4
|
+
* All computation lives in @principles/core/runtime-v2.
|
|
5
|
+
* This file re-exports types, the core builder, and provides
|
|
6
|
+
* a backward-compatible path-based wrapper for existing consumers.
|
|
7
|
+
*/
|
|
8
|
+
export type { LifecycleClassificationTotals, RuleReplayEvidence, RuleLiveEvidence, RuleLineageEvidence, ImplementationLifecycleEvidence, RuleLifecycleEvidence, PrincipleLifecycleEvidence, LifecycleReadModel, } from '@principles/core/runtime-v2';
|
|
9
|
+
export { buildLifecycleReadModel } from '@principles/core/runtime-v2';
|
|
10
|
+
export type { LifecycleDatasource } from '@principles/core/runtime-v2';
|
|
11
|
+
export { FilesystemLifecycleDatasource, LineageSourceRetiredError } from './filesystem-lifecycle-datasource.js';
|
|
12
|
+
/**
|
|
13
|
+
* Backward-compatible wrapper — accepts directory paths like the original API.
|
|
14
|
+
* Existing consumers (lifecycle-refresh, evolution-status, nocturnal-service)
|
|
15
|
+
* continue using this without changes.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildLifecycleReadModelFromPaths(workspaceDir: string, stateDir: string): import("@principles/core/runtime-v2").LifecycleReadModel;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type LifecycleReadModel, type PrincipleLifecycleEvidence } from './lifecycle-read-model.js';
|
|
2
|
+
import { type PrincipleAdherenceResult, type RuleMetricResult } from '@principles/core/runtime-v2';
|
|
3
|
+
import { type DeprecatedReadinessAssessment } from '@principles/core/runtime-v2';
|
|
4
|
+
import { type LifecycleRouteRecommendation } from '@principles/core/runtime-v2';
|
|
5
|
+
export interface RecomputedPrincipleLifecycle {
|
|
6
|
+
principleId: string;
|
|
7
|
+
ruleMetrics: Record<string, RuleMetricResult>;
|
|
8
|
+
adherence: PrincipleAdherenceResult;
|
|
9
|
+
deprecatedReadiness: DeprecatedReadinessAssessment;
|
|
10
|
+
routeRecommendation: LifecycleRouteRecommendation;
|
|
11
|
+
}
|
|
12
|
+
export interface PrincipleLifecycleAssessment {
|
|
13
|
+
principle: PrincipleLifecycleEvidence['principle'];
|
|
14
|
+
summary: PrincipleLifecycleEvidence['summary'];
|
|
15
|
+
ruleMetrics: Record<string, RuleMetricResult>;
|
|
16
|
+
adherence: PrincipleAdherenceResult;
|
|
17
|
+
deprecatedReadiness: DeprecatedReadinessAssessment;
|
|
18
|
+
routeRecommendation: LifecycleRouteRecommendation;
|
|
19
|
+
}
|
|
20
|
+
export declare class PrincipleLifecycleService {
|
|
21
|
+
private readonly workspaceDir;
|
|
22
|
+
private readonly stateDir;
|
|
23
|
+
constructor(workspaceDir: string, stateDir: string);
|
|
24
|
+
buildReadModel(): LifecycleReadModel;
|
|
25
|
+
listAssessments(readModel?: LifecycleReadModel): PrincipleLifecycleAssessment[];
|
|
26
|
+
listRouteRecommendations(readModel?: LifecycleReadModel): LifecycleRouteRecommendation[];
|
|
27
|
+
recomputeAll(): RecomputedPrincipleLifecycle[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principle Training State Store
|
|
3
|
+
* ================================================================
|
|
4
|
+
*
|
|
5
|
+
* Legacy compatibility adapter over the hybrid principle tree ledger file.
|
|
6
|
+
* Top-level principle training records remain source-compatible for existing
|
|
7
|
+
* consumers, while `_tree` is reserved for first-class Rule/Implementation
|
|
8
|
+
* entities managed by principle-tree-ledger.ts.
|
|
9
|
+
*/
|
|
10
|
+
import type { PrincipleEvaluatorLevel } from './evolution-types.js';
|
|
11
|
+
/** File name for principle training state persistence */
|
|
12
|
+
export declare const PRINCIPLE_TRAINING_FILE = "principle_training_state.json";
|
|
13
|
+
export type InternalizationStatus = 'prompt_only' | 'needs_training' | 'in_training' | 'deployed_pending_eval' | 'internalized' | 'regressed';
|
|
14
|
+
export interface PrincipleTrainingState {
|
|
15
|
+
principleId: string;
|
|
16
|
+
evaluability: PrincipleEvaluatorLevel;
|
|
17
|
+
applicableOpportunityCount: number;
|
|
18
|
+
observedViolationCount: number;
|
|
19
|
+
complianceRate: number;
|
|
20
|
+
violationTrend: number;
|
|
21
|
+
generatedSampleCount: number;
|
|
22
|
+
approvedSampleCount: number;
|
|
23
|
+
includedTrainRunIds: string[];
|
|
24
|
+
deployedCheckpointIds: string[];
|
|
25
|
+
lastEvalScore?: number;
|
|
26
|
+
internalizationStatus: InternalizationStatus;
|
|
27
|
+
}
|
|
28
|
+
export type PrincipleTrainingStore = Record<string, PrincipleTrainingState>;
|
|
29
|
+
export declare function createDefaultPrincipleState(principleId: string): PrincipleTrainingState;
|
|
30
|
+
export declare function loadStore(stateDir: string): PrincipleTrainingStore;
|
|
31
|
+
export declare function saveStore(stateDir: string, store: PrincipleTrainingStore): void;
|
|
32
|
+
export declare function loadStoreAsync(stateDir: string): Promise<PrincipleTrainingStore>;
|
|
33
|
+
export declare function saveStoreAsync(stateDir: string, store: PrincipleTrainingStore): Promise<void>;
|
|
34
|
+
export declare function getPrincipleState(stateDir: string, principleId: string): PrincipleTrainingState;
|
|
35
|
+
export declare function setPrincipleState(stateDir: string, state: PrincipleTrainingState): void;
|
|
36
|
+
export declare function removePrincipleState(stateDir: string, principleId: string): void;
|
|
37
|
+
export declare function listPrincipleIds(stateDir: string): string[];
|
|
38
|
+
export declare function listPrinciplesByStatus(stateDir: string, status: InternalizationStatus): PrincipleTrainingState[];
|
|
39
|
+
export declare function listEvaluablePrinciples(stateDir: string): PrincipleTrainingState[];
|
|
40
|
+
/**
|
|
41
|
+
* Transition a principle's internalization status to the next valid state.
|
|
42
|
+
* Throws if the transition is not allowed.
|
|
43
|
+
*
|
|
44
|
+
* #212: This enables principles created as `prompt_only` to eventually
|
|
45
|
+
* become `needs_training` and enter the nocturnal evaluation pipeline.
|
|
46
|
+
*/
|
|
47
|
+
export declare function transitionInternalizationStatus(stateDir: string, principleId: string, nextStatus: InternalizationStatus): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Principle Tree Ledger — plugin adapter (re-export) over @principles/core.
|
|
3
|
+
*
|
|
4
|
+
* PRI-459: This file WAS a full duplicate implementation of
|
|
5
|
+
* principle_training_state.json parsing / serialization / mutation (~600
|
|
6
|
+
* lines of inlined parsers, serializers, mutators, and a parallel codec).
|
|
7
|
+
* That dual ownership caused two real failure classes:
|
|
8
|
+
*
|
|
9
|
+
* 1. Lost updates — core wrote the file UNLOCKED, the plugin wrote it WITH
|
|
10
|
+
* a lock, and neither knew the other's lock. Concurrent writers (e.g.
|
|
11
|
+
* evolution-worker async + a pd-cli command) could silently drop edits.
|
|
12
|
+
* 2. Silent field loss — the two codecs parsed the same bytes at different
|
|
13
|
+
* strictness; a field one side persisted could be dropped on the next
|
|
14
|
+
* load by the other.
|
|
15
|
+
*
|
|
16
|
+
* Both are now fixed by converging on a SINGLE source of truth in core:
|
|
17
|
+
* - parse/serialize: @principles/core/runtime-v2/principle-tree/ledger-codec
|
|
18
|
+
* - mutation (with cross-process file lock): @principles/core/principle-tree-ledger
|
|
19
|
+
*
|
|
20
|
+
* This file is now a thin re-export so existing relative imports
|
|
21
|
+
* (`from './principle-tree-ledger.js'`) keep resolving. Consumers get the
|
|
22
|
+
* exact same API surface, now backed by the locked core implementation.
|
|
23
|
+
*
|
|
24
|
+
* Do NOT reintroduce parsing / serialization / mutation logic here. The
|
|
25
|
+
* architecture-regression guard "PRI-459: single principle_training_state
|
|
26
|
+
* ledger implementation" enforces this.
|
|
27
|
+
*/
|
|
28
|
+
export { type Principle, type Rule, type Implementation, type PrincipleValueMetrics, type LedgerPrinciple, type LedgerRule, type LedgerTreeStore, type LegacyPrincipleTrainingState, type LegacyPrincipleTrainingStore, type HybridLedgerStore, type ImplementationLifecycleState, type PrincipleSubtree, TREE_NAMESPACE, LockAcquisitionError, loadLedger, saveLedger, saveLedgerAsync, updateTrainingStore, addPrincipleToLedger, createRule, createImplementation, updatePrinciple, updateRule, deleteRule, updateImplementation, deleteImplementation, listImplementationsForRule, getPrincipleSubtree, updatePrincipleValueMetrics, isValidLifecycleTransition, getAllowedTransitions, transitionImplementationState, listRuleImplementationsByState, findActiveImplementation, } from '@principles/core/principle-tree-ledger';
|
|
29
|
+
import { getLedgerFilePathPublic } from '@principles/core/principle-tree-ledger';
|
|
30
|
+
export declare const getLedgerFilePath: typeof getLedgerFilePathPublic;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const PROFILE_AUDIT_LEVELS: Set<string>;
|
|
2
|
+
export declare const PROFILE_EVOLUTION_MODES: Set<string>;
|
|
3
|
+
export declare const PROFILE_TEST_LEVELS: Set<string>;
|
|
4
|
+
export declare const PROFILE_DEFAULTS: {
|
|
5
|
+
audit_level: string;
|
|
6
|
+
risk_paths: string[];
|
|
7
|
+
evolution_mode: string;
|
|
8
|
+
gate: {
|
|
9
|
+
require_plan_for_risk_paths: boolean;
|
|
10
|
+
require_audit_before_write: boolean;
|
|
11
|
+
require_reviewer_after_write: boolean;
|
|
12
|
+
};
|
|
13
|
+
tests: {
|
|
14
|
+
on_change: string;
|
|
15
|
+
on_risk_change: string;
|
|
16
|
+
commands: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
pain: {
|
|
19
|
+
soft_capture_threshold: number;
|
|
20
|
+
adaptive: {
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
spiral_boost: number;
|
|
23
|
+
min_threshold: number;
|
|
24
|
+
max_threshold: number;
|
|
25
|
+
backlog_trigger: number;
|
|
26
|
+
hard_failure_trigger: number;
|
|
27
|
+
low_recent_success_boost: number;
|
|
28
|
+
high_recent_pain_boost: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
lifecycle: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
heartbeat_stale_hours: number;
|
|
34
|
+
};
|
|
35
|
+
progressive_gate: {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
plan_approvals: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
max_lines_override: number;
|
|
40
|
+
allowed_patterns: string[];
|
|
41
|
+
allowed_operations: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
edit_verification: {
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
max_file_size_bytes: number;
|
|
47
|
+
fuzzy_match_enabled: boolean;
|
|
48
|
+
fuzzy_match_threshold: number;
|
|
49
|
+
skip_large_file_action: "warn" | "block";
|
|
50
|
+
};
|
|
51
|
+
thinking_checkpoint: {
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
window_ms: number;
|
|
54
|
+
high_risk_tools: string[];
|
|
55
|
+
};
|
|
56
|
+
custom_guards: {
|
|
57
|
+
pattern: string;
|
|
58
|
+
message: string;
|
|
59
|
+
severity: string;
|
|
60
|
+
}[];
|
|
61
|
+
};
|
|
62
|
+
export declare function normalizeProfile(rawProfile: any): any;
|