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.
Files changed (140) hide show
  1. package/dist/bundle.js +166 -166
  2. package/dist/commands/archive-impl.d.ts +18 -0
  3. package/dist/commands/capabilities.d.ts +3 -0
  4. package/dist/commands/context.d.ts +5 -0
  5. package/dist/commands/disable-impl.d.ts +22 -0
  6. package/dist/commands/evolution-status.d.ts +4 -0
  7. package/dist/commands/export.d.ts +2 -0
  8. package/dist/commands/focus.d.ts +14 -0
  9. package/dist/commands/pain.d.ts +6 -0
  10. package/dist/commands/principle-rollback.d.ts +4 -0
  11. package/dist/commands/promote-impl.d.ts +22 -0
  12. package/dist/commands/rollback-impl.d.ts +32 -0
  13. package/dist/commands/rollback.d.ts +19 -0
  14. package/dist/commands/samples.d.ts +2 -0
  15. package/dist/commands/strategy.d.ts +2 -0
  16. package/dist/commands/thinking-os.d.ts +2 -0
  17. package/dist/commands/workflow-debug.d.ts +4 -0
  18. package/dist/config/defaults/runtime.d.ts +58 -0
  19. package/dist/config/errors.d.ts +86 -0
  20. package/dist/config/index.d.ts +7 -0
  21. package/dist/constants/tools.d.ts +17 -0
  22. package/dist/core/__tests__/focus-history.test.d.ts +1 -0
  23. package/dist/core/behavior-example-pack-assembler.d.ts +38 -0
  24. package/dist/core/bootstrap-rules.d.ts +50 -0
  25. package/dist/core/code-implementation-storage.d.ts +71 -0
  26. package/dist/core/config-health.d.ts +17 -0
  27. package/dist/core/config-service.d.ts +15 -0
  28. package/dist/core/config.d.ts +111 -0
  29. package/dist/core/control-ui-db.d.ts +117 -0
  30. package/dist/core/correction-cue-learner.d.ts +33 -0
  31. package/dist/core/correction-types.d.ts +3 -0
  32. package/dist/core/detection-funnel.d.ts +47 -0
  33. package/dist/core/detection-service.d.ts +15 -0
  34. package/dist/core/dictionary-service.d.ts +15 -0
  35. package/dist/core/dictionary.d.ts +38 -0
  36. package/dist/core/empathy-keyword-matcher.d.ts +5 -0
  37. package/dist/core/empathy-types.d.ts +2 -0
  38. package/dist/core/event-log.d.ts +98 -0
  39. package/dist/core/evolution-engine.d.ts +119 -0
  40. package/dist/core/evolution-logger.d.ts +137 -0
  41. package/dist/core/evolution-reducer.d.ts +116 -0
  42. package/dist/core/evolution-types.d.ts +50 -0
  43. package/dist/core/file-store.d.ts +41 -0
  44. package/dist/core/focus-history.d.ts +50 -0
  45. package/dist/core/hygiene/tracker.d.ts +22 -0
  46. package/dist/core/init.d.ts +30 -0
  47. package/dist/core/intent-doc-reader-adapter.d.ts +36 -0
  48. package/dist/core/intent-doc-reader.d.ts +89 -0
  49. package/dist/core/migration.d.ts +6 -0
  50. package/dist/core/pain-diagnostic-gate.d.ts +45 -0
  51. package/dist/core/pain.d.ts +24 -0
  52. package/dist/core/path-resolver.d.ts +60 -0
  53. package/dist/core/paths.d.ts +59 -0
  54. package/dist/core/pd-config-loader.d.ts +96 -0
  55. package/dist/core/pd-task-reconciler.d.ts +89 -0
  56. package/dist/core/pd-task-service.d.ts +2 -0
  57. package/dist/core/pd-task-store.d.ts +5 -0
  58. package/dist/core/pd-task-types.d.ts +8 -0
  59. package/dist/core/principle-compiler/__tests__/compiler-replay-gate.test.d.ts +1 -0
  60. package/dist/core/principle-compiler/code-validator.d.ts +14 -0
  61. package/dist/core/principle-compiler/compiler.d.ts +45 -0
  62. package/dist/core/principle-compiler/index.d.ts +12 -0
  63. package/dist/core/principle-compiler/ledger-registrar.d.ts +28 -0
  64. package/dist/core/principle-compiler/template-generator.d.ts +7 -0
  65. package/dist/core/principle-injection.d.ts +10 -0
  66. package/dist/core/principle-internalization/filesystem-lifecycle-datasource.d.ts +15 -0
  67. package/dist/core/principle-internalization/lifecycle-read-model.d.ts +17 -0
  68. package/dist/core/principle-internalization/lifecycle-refresh.d.ts +2 -0
  69. package/dist/core/principle-internalization/principle-lifecycle-service.d.ts +28 -0
  70. package/dist/core/principle-training-state.d.ts +47 -0
  71. package/dist/core/principle-tree-ledger.d.ts +30 -0
  72. package/dist/core/profile.d.ts +62 -0
  73. package/dist/core/reflection/reflection-context.d.ts +31 -0
  74. package/dist/core/replay-engine.d.ts +12 -0
  75. package/dist/core/rule-context-assembler.d.ts +45 -0
  76. package/dist/core/rule-host.d.ts +178 -0
  77. package/dist/core/rule-implementation-runtime.d.ts +18 -0
  78. package/dist/core/runtime-v2-prompt-activation-reader.d.ts +22 -0
  79. package/dist/core/session-tracker.d.ts +119 -0
  80. package/dist/core/signal-collector-host.d.ts +113 -0
  81. package/dist/core/system-logger.d.ts +24 -0
  82. package/dist/core/thinking-models.d.ts +25 -0
  83. package/dist/core/thinking-os-parser.d.ts +35 -0
  84. package/dist/core/trajectory-types.d.ts +247 -0
  85. package/dist/core/trajectory.d.ts +279 -0
  86. package/dist/core/workflow-funnel-loader.d.ts +72 -0
  87. package/dist/core/workspace-context.d.ts +114 -0
  88. package/dist/core/workspace-dir-validation.d.ts +11 -0
  89. package/dist/core/workspace-guidance-migrator.d.ts +12 -0
  90. package/dist/hooks/after-tool-call-helpers.d.ts +97 -0
  91. package/dist/hooks/after-tool-call-types.d.ts +86 -0
  92. package/dist/hooks/gate-block-helper.d.ts +44 -0
  93. package/dist/hooks/gate.d.ts +16 -0
  94. package/dist/hooks/lifecycle.d.ts +5 -0
  95. package/dist/hooks/llm.d.ts +21 -0
  96. package/dist/hooks/message-sanitize.d.ts +24 -0
  97. package/dist/hooks/pain.d.ts +35 -0
  98. package/dist/hooks/prompt-helpers.d.ts +105 -0
  99. package/dist/hooks/prompt-types.d.ts +74 -0
  100. package/dist/hooks/prompt.d.ts +22 -0
  101. package/dist/hooks/raw-observation-adapter.d.ts +16 -0
  102. package/dist/hooks/raw-observation-types.d.ts +11 -0
  103. package/dist/hooks/trajectory-collector.d.ts +41 -0
  104. package/dist/hooks/trajectory-evidence.d.ts +11 -0
  105. package/dist/hooks/triage-adapter.d.ts +58 -0
  106. package/dist/hooks/trigger-cooldown-tracker.d.ts +42 -0
  107. package/dist/i18n/commands.d.ts +26 -0
  108. package/dist/index.d.ts +52 -0
  109. package/dist/openclaw-sdk.d.ts +338 -0
  110. package/dist/openclaw.plugin.json +1 -1
  111. package/dist/rulehost-evidence.d.ts +4 -0
  112. package/dist/service/correction-observer-service.d.ts +19 -0
  113. package/dist/service/evolution-dedup.d.ts +27 -0
  114. package/dist/service/evolution-worker.d.ts +105 -0
  115. package/dist/service/internalization-auto-consumer-service.d.ts +8 -0
  116. package/dist/service/keyword-optimization-service.d.ts +44 -0
  117. package/dist/service/phase3-input-filter.d.ts +73 -0
  118. package/dist/service/queue-io.d.ts +30 -0
  119. package/dist/service/queue-migration.d.ts +84 -0
  120. package/dist/service/runtime-summary-service.d.ts +156 -0
  121. package/dist/service/subagent-workflow/subagent-error-utils.d.ts +8 -0
  122. package/dist/service/subagent-workflow/types.d.ts +264 -0
  123. package/dist/service/subagent-workflow/workflow-store.d.ts +44 -0
  124. package/dist/service/trajectory-service.d.ts +2 -0
  125. package/dist/service/workflow-watchdog.d.ts +23 -0
  126. package/dist/types/event-types.d.ts +2 -0
  127. package/dist/types/hygiene-types.d.ts +2 -0
  128. package/dist/types/principle-tree-schema.d.ts +29 -0
  129. package/dist/types/queue.d.ts +2 -0
  130. package/dist/types/runtime-summary.d.ts +1 -0
  131. package/dist/types.d.ts +13 -0
  132. package/dist/utils/file-lock.d.ts +68 -0
  133. package/dist/utils/hashing.d.ts +9 -0
  134. package/dist/utils/io.d.ts +11 -0
  135. package/dist/utils/node-vm-polyfill.d.ts +9 -0
  136. package/dist/utils/retry.d.ts +210 -0
  137. package/dist/utils/session-key.d.ts +10 -0
  138. package/dist/utils/workspace-resolver.d.ts +82 -0
  139. package/openclaw.plugin.json +1 -1
  140. package/package.json +3 -2
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Unified Retry Utilities
3
+ *
4
+ * Provides a centralized retry mechanism for all async operations that may fail
5
+ * due to transient errors (network timeouts, resource locks, rate limits, etc).
6
+ *
7
+ * @module utils/retry
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { retryAsync, isRetryableError } from '../utils/retry.js';
12
+ *
13
+ * const result = await retryAsync(
14
+ * () => llmClient.generate(prompt),
15
+ * { maxRetries: 3, operation: 'llm-generate' }
16
+ * );
17
+ * ```
18
+ */
19
+ export interface RetryOptions {
20
+ /** Maximum number of retry attempts (default: 3) */
21
+ maxRetries?: number;
22
+ /** Initial delay in ms before first retry (default: 1000) */
23
+ initialDelayMs?: number;
24
+ /** Maximum delay in ms between retries (default: 30000) */
25
+ maxDelayMs?: number;
26
+ /** Backoff multiplier (default: 2 for exponential) */
27
+ backoffMultiplier?: number;
28
+ /** Operation name for logging */
29
+ operation?: string;
30
+ /** Logger instance (optional, defaults to console) */
31
+ logger?: RetryLogger;
32
+ isRetryable?: (_error: unknown) => boolean;
33
+ }
34
+ export interface RetryLogger {
35
+ warn?: (_message: string) => void;
36
+ info?: (_message: string) => void;
37
+ debug?: (_message: string) => void;
38
+ }
39
+ export interface RetryResult<T> {
40
+ /** The result value if successful */
41
+ value: T;
42
+ /** Number of attempts made (including successful one) */
43
+ attempts: number;
44
+ /** Total time spent in ms */
45
+ totalTimeMs: number;
46
+ }
47
+ /**
48
+ * Determines if an error is retryable based on common patterns.
49
+ *
50
+ * @param error - The error to check
51
+ * @returns true if the error is likely transient and worth retrying
52
+ */
53
+ export declare function isRetryableError(error: unknown): boolean;
54
+ /**
55
+ * Execute an async function with automatic retry on failure.
56
+ *
57
+ * Uses exponential backoff with configurable parameters.
58
+ * Automatically detects retryable errors (timeouts, rate limits, etc).
59
+ *
60
+ * @param fn - The async function to execute
61
+ * @param options - Retry configuration
62
+ * @returns The result of the function
63
+ * @throws The last error if all retries fail
64
+ */
65
+ export declare function retryAsync<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
66
+ /**
67
+ * Execute an async function with retry, returning detailed result info.
68
+ *
69
+ * @param fn - The async function to execute
70
+ * @param options - Retry configuration
71
+ * @returns Detailed result including attempts and timing
72
+ */
73
+ export declare function retryAsyncWithInfo<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<RetryResult<T>>;
74
+ /**
75
+ * Create a retry wrapper for a function.
76
+ * Useful for wrapping LLM calls or API clients.
77
+ *
78
+ * @param fn - The async function to wrap
79
+ * @param options - Default retry configuration
80
+ * @returns A wrapped function with retry built-in
81
+ */
82
+ export declare function withRetry<T, Args extends unknown[]>(fn: (...args: Args) => Promise<T>, options?: RetryOptions): (...args: Args) => Promise<T>;
83
+ /**
84
+ * Retry an LLM API call with appropriate defaults.
85
+ * LLM calls often timeout or hit rate limits.
86
+ */
87
+ export declare function retryLLMCall<T>(fn: () => Promise<T>, operation?: string): Promise<T>;
88
+ /**
89
+ * Retry a file operation with appropriate defaults.
90
+ * File operations may fail due to locks or concurrent access.
91
+ */
92
+ export declare function retryFileOperation<T>(fn: () => Promise<T>, operation?: string): Promise<T>;
93
+ /**
94
+ * Retry a network request with appropriate defaults.
95
+ * Network requests may fail due to transient connectivity issues.
96
+ */
97
+ export declare function retryNetworkRequest<T>(fn: () => Promise<T>, operation?: string): Promise<T>;
98
+ /** Minimum samples needed before trusting learned timeout values */
99
+ export declare const MIN_SAMPLES = 3;
100
+ /** Number of recent completion durations to consider */
101
+ export declare const LOOKBACK_WINDOW = 50;
102
+ /** Safety multiplier applied to P95 */
103
+ export declare const SAFETY_MULTIPLIER = 1.5;
104
+ /** Absolute minimum timeout — never go below this (10s) */
105
+ export declare const MIN_TIMEOUT_MS = 10000;
106
+ /** Absolute maximum timeout cap — never exceed this (5min) */
107
+ export declare const MAX_TIMEOUT_MS = 300000;
108
+ /** Maximum retry attempts for workflow timeout */
109
+ export declare const MAX_TIMEOUT_RETRIES = 2;
110
+ /** Backoff multiplier for retry schedule */
111
+ export declare const RETRY_BACKOFF_MULTIPLIER = 2;
112
+ /**
113
+ * Interface for a data source that provides historical workflow durations.
114
+ * Compatible with WorkflowStore's getCompletionDurations API.
115
+ * This is the primary interface used by WorkflowManager.
116
+ */
117
+ export interface DurationDataSource {
118
+ getCompletionDurations(workflowType: string, limit: number): number[];
119
+ }
120
+ /**
121
+ * Interface for duration history storage (simpler alternative).
122
+ */
123
+ export interface DurationHistorySource {
124
+ /** Get recent completion durations in ms */
125
+ getDurations(limit: number): number[];
126
+ /** Record a new completion duration */
127
+ recordDuration(durationMs: number): void;
128
+ }
129
+ /**
130
+ * Options for adaptive retry with dynamic timeout.
131
+ */
132
+ export interface AdaptiveRetryOptions extends RetryOptions {
133
+ /** Source for historical duration data */
134
+ durationHistory?: DurationHistorySource;
135
+ /** Minimum samples before using adaptive timeout */
136
+ minSamples?: number;
137
+ /** Percentile to use (default: 95) */
138
+ percentile?: number;
139
+ /** Safety multiplier for computed timeout (default: 1.5) */
140
+ safetyMultiplier?: number;
141
+ /** Minimum allowed timeout in ms (default: 10000) */
142
+ minTimeoutMs?: number;
143
+ /** Maximum allowed timeout in ms (default: 300000) */
144
+ maxTimeoutMs?: number;
145
+ }
146
+ /**
147
+ * Calculates P95 (or any percentile) from an array of numbers.
148
+ * Falls back to median for small samples (< 10).
149
+ *
150
+ * @param values - Array of duration values
151
+ * @param p - Percentile to compute (0-100)
152
+ * @returns The computed percentile value
153
+ */
154
+ export declare function percentile(values: number[], p: number): number;
155
+ /**
156
+ * Clamp timeout to safe bounds.
157
+ */
158
+ export declare function clampTimeout(ms: number): number;
159
+ /**
160
+ * Computes an adaptive timeout for a workflow type based on historical data.
161
+ *
162
+ * Algorithm:
163
+ * 1. Fetch last LOOKBACK_WINDOW completion durations
164
+ * 2. If < MIN_SAMPLES: fall back to the provided defaultTimeout
165
+ * 3. Otherwise: P95(durations) × SAFETY_MULTIPLIER
166
+ * 4. Clamp to [MIN_TIMEOUT_MS, MAX_TIMEOUT_MS]
167
+ *
168
+ * This is the primary function used by WorkflowManager.
169
+ *
170
+ * @param dataSource - Source for historical duration data
171
+ * @param workflowType - e.g. 'empathy-observer', 'deep-reflect'
172
+ * @param defaultTimeout - Fallback when insufficient data (from spec)
173
+ * @returns Computed timeout in milliseconds
174
+ */
175
+ export declare function computeDynamicTimeout(dataSource: DurationDataSource, workflowType: string, defaultTimeout: number): number;
176
+ /**
177
+ * Computes retry timeout schedule for a workflow.
178
+ * Returns an array of timeout values for each attempt (including initial).
179
+ *
180
+ * Example output: [30000, 60000, 120000] for 3 attempts with base 30s
181
+ *
182
+ * @param baseTimeoutMs - Base timeout in milliseconds
183
+ * @param maxRetries - Maximum retry attempts (default: MAX_TIMEOUT_RETRIES)
184
+ * @returns Array of timeout values for each attempt
185
+ */
186
+ export declare function computeRetrySchedule(baseTimeoutMs: number, maxRetries?: number): number[];
187
+ /**
188
+ * Compute adaptive timeout from historical data (simplified API).
189
+ * Alternative to computeDynamicTimeout for simpler use cases.
190
+ */
191
+ export declare function computeAdaptiveTimeout(history: number[], fallbackMs: number, options?: {
192
+ minSamples?: number;
193
+ percentile?: number;
194
+ safetyMultiplier?: number;
195
+ minTimeoutMs?: number;
196
+ maxTimeoutMs?: number;
197
+ }): number;
198
+ /**
199
+ * Execute an async function with adaptive timeout and retry.
200
+ *
201
+ * Combines:
202
+ * 1. Dynamic timeout based on P95 of historical completions
203
+ * 2. Exponential backoff on retry
204
+ * 3. Automatic duration recording after success
205
+ *
206
+ * @param fn - The async function to execute
207
+ * @param options - Configuration including history source
208
+ * @returns The result of the function
209
+ */
210
+ export declare function retryWithAdaptiveTimeout<T>(fn: () => Promise<T>, options?: AdaptiveRetryOptions): Promise<T>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Session key parsing utilities.
3
+ *
4
+ * Session key format: "agent:{agentId}:{type}:{uuid}" or "agent:{agentId}:{uuid}"
5
+ */
6
+ /**
7
+ * Extract agentId from a sessionKey.
8
+ * Returns `undefined` if sessionKey is missing, malformed, or has whitespace-only agentId.
9
+ */
10
+ export declare function extractAgentIdFromSessionKey(sessionKey: string | undefined): string | undefined;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Workspace Directory Resolution Utilities
3
+ *
4
+ * Shared helpers for resolving workspace directories across commands and hooks.
5
+ *
6
+ * Hook resolution priority (PRI-259): PD canonical config → OpenClaw fallback.
7
+ * PD canonical sources: PD_WORKSPACE_DIR env → OPENCLAW_WORKSPACE env →
8
+ * principles-disciple.json → ~/.openclaw/workspace default.
9
+ * OpenClaw fallback: ctx.workspaceDir → api.runtime.agent.resolveAgentWorkspaceDir().
10
+ */
11
+ import type { OpenClawPluginApi, PluginCommandContext } from '../openclaw-sdk.js';
12
+ import { type WorkspaceResolutionContext } from '../core/workspace-dir-validation.js';
13
+ /**
14
+ * Resolve workspace directory for command execution.
15
+ *
16
+ * Chain: ctx.workspaceDir → resolveWorkspaceDirFromApi (official OpenClaw API + env vars)
17
+ *
18
+ * CRITICAL: Throws if workspaceDir cannot be resolved. Silent failures are dangerous
19
+ * because commands might operate on the wrong directory.
20
+ */
21
+ export declare function resolveCommandWorkspaceDir(api: OpenClawPluginApi, ctx: {
22
+ workspaceDir?: string;
23
+ }): string;
24
+ /**
25
+ * Resolve workspace directory for plugin command execution.
26
+ *
27
+ * Chain: ctx.workspaceDir (canonical) → ctx.config.workspaceDir (dispatcher fallback)
28
+ *
29
+ * CRITICAL: Throws if workspaceDir cannot be resolved. Commands must NEVER silently
30
+ * fall back to process.cwd() as this masks configuration errors and can corrupt
31
+ * the wrong workspace.
32
+ *
33
+ * @param ctx - Plugin command context (has workspaceDir + config properties)
34
+ * @param source - Source label for error messages (e.g. 'evolution-status', 'pain')
35
+ */
36
+ export declare function resolvePluginCommandWorkspaceDir(ctx: PluginCommandContext, source: string): string;
37
+ export type CanonicalWorkspaceSource = 'pd_env' | 'openclaw_env' | 'pd_config' | 'pd_default';
38
+ export interface CanonicalWorkspaceResult {
39
+ workspaceDir: string;
40
+ source: CanonicalWorkspaceSource;
41
+ }
42
+ export declare function resolveCanonicalWorkspaceDir(): CanonicalWorkspaceResult | null;
43
+ export type HookWorkspaceSource = CanonicalWorkspaceSource | 'openclaw_context' | 'openclaw_api';
44
+ export interface HookWorkspaceResolutionSuccess {
45
+ ok: true;
46
+ workspaceDir: string;
47
+ source: HookWorkspaceSource;
48
+ consistencyWarning?: string;
49
+ }
50
+ export interface HookWorkspaceResolutionFailure {
51
+ ok: false;
52
+ reason: string;
53
+ nextAction: string;
54
+ message: string;
55
+ }
56
+ export type HookWorkspaceResolutionResult = HookWorkspaceResolutionSuccess | HookWorkspaceResolutionFailure;
57
+ export interface HookWorkspaceResolutionOptions {
58
+ canonicalResolver?: () => CanonicalWorkspaceResult | null;
59
+ explicitPdResolver?: () => CanonicalWorkspaceResult | null;
60
+ }
61
+ export declare function resolveHookWorkspaceDir(ctx: WorkspaceResolutionContext, api: OpenClawPluginApi, source: string, options?: HookWorkspaceResolutionOptions): HookWorkspaceResolutionResult;
62
+ /**
63
+ * Resolve workspace directory for tool hook execution (safe version).
64
+ * Returns undefined instead of throwing if resolution fails.
65
+ *
66
+ * PRI-259: Uses PD canonical config as primary source, OpenClaw as fallback.
67
+ */
68
+ export declare function resolveToolHookWorkspaceDirSafe(ctx: WorkspaceResolutionContext, api: OpenClawPluginApi, source: string, options?: HookWorkspaceResolutionOptions): string | undefined;
69
+ export declare class WorkspaceResolutionError extends Error {
70
+ readonly reason: string;
71
+ readonly nextAction: string;
72
+ constructor(message: string, reason: string, nextAction: string);
73
+ toJSON(): {
74
+ ok: false;
75
+ reason: string;
76
+ message: string;
77
+ nextAction: string;
78
+ };
79
+ }
80
+ export declare function resolveWorkspaceDirForRuntimeV2(ctx: {
81
+ workspaceDir?: string;
82
+ }, api: OpenClawPluginApi | undefined, source: string): string;
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
5
- "version": "1.201.0",
5
+ "version": "1.202.0",
6
6
  "activation": {
7
7
  "onCapabilities": [
8
8
  "hook"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "principles-disciple",
3
- "version": "1.201.0",
3
+ "version": "1.202.0",
4
4
  "description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -57,7 +57,8 @@
57
57
  "build": "tsc",
58
58
  "build:bundle": "node esbuild.config.js",
59
59
  "build:production": "node esbuild.config.js --production && node scripts/verify-build.mjs",
60
- "prepack": "npm run build:production",
60
+ "build:types": "tsc --emitDeclarationOnly",
61
+ "prepack": "npm run build:production && npm run build:types",
61
62
  "test": "vitest run",
62
63
  "test:unit": "vitest run --config vitest.unit.config.ts tests/core tests/service tests/hooks tests/commands tests/utils tests/scripts --exclude tests/commands/evolver.test.ts",
63
64
  "test:integration": "vitest run tests/integration/",