@hivelore/core 0.31.0 → 0.33.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/index.d.ts CHANGED
@@ -43,6 +43,8 @@ declare const SensorSchema: z.ZodObject<{
43
43
  flags: z.ZodOptional<z.ZodString>;
44
44
  /** Shell/test command to run (for kind=shell|test). Executed by the CLI, never by core. */
45
45
  command: z.ZodOptional<z.ZodString>;
46
+ /** Max runtime for kind=shell|test commands (default 120000). The executor kills on expiry. */
47
+ timeout_ms: z.ZodOptional<z.ZodNumber>;
46
48
  /** Glob-ish path prefixes the sensor applies to. Falls back to the memory's anchor paths when empty. */
47
49
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
50
  /** LLM-facing self-correction message: what was done wrong and what to do instead. */
@@ -64,6 +66,7 @@ declare const SensorSchema: z.ZodObject<{
64
66
  absent?: string | undefined;
65
67
  flags?: string | undefined;
66
68
  command?: string | undefined;
69
+ timeout_ms?: number | undefined;
67
70
  }, {
68
71
  message: string;
69
72
  paths?: string[] | undefined;
@@ -72,6 +75,7 @@ declare const SensorSchema: z.ZodObject<{
72
75
  absent?: string | undefined;
73
76
  flags?: string | undefined;
74
77
  command?: string | undefined;
78
+ timeout_ms?: number | undefined;
75
79
  severity?: "warn" | "block" | undefined;
76
80
  autogen?: boolean | undefined;
77
81
  last_fired?: string | null | undefined;
@@ -138,6 +142,8 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
138
142
  flags: z.ZodOptional<z.ZodString>;
139
143
  /** Shell/test command to run (for kind=shell|test). Executed by the CLI, never by core. */
140
144
  command: z.ZodOptional<z.ZodString>;
145
+ /** Max runtime for kind=shell|test commands (default 120000). The executor kills on expiry. */
146
+ timeout_ms: z.ZodOptional<z.ZodNumber>;
141
147
  /** Glob-ish path prefixes the sensor applies to. Falls back to the memory's anchor paths when empty. */
142
148
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
143
149
  /** LLM-facing self-correction message: what was done wrong and what to do instead. */
@@ -159,6 +165,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
159
165
  absent?: string | undefined;
160
166
  flags?: string | undefined;
161
167
  command?: string | undefined;
168
+ timeout_ms?: number | undefined;
162
169
  }, {
163
170
  message: string;
164
171
  paths?: string[] | undefined;
@@ -167,6 +174,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
167
174
  absent?: string | undefined;
168
175
  flags?: string | undefined;
169
176
  command?: string | undefined;
177
+ timeout_ms?: number | undefined;
170
178
  severity?: "warn" | "block" | undefined;
171
179
  autogen?: boolean | undefined;
172
180
  last_fired?: string | null | undefined;
@@ -248,6 +256,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
248
256
  absent?: string | undefined;
249
257
  flags?: string | undefined;
250
258
  command?: string | undefined;
259
+ timeout_ms?: number | undefined;
251
260
  } | undefined;
252
261
  activation?: {
253
262
  keywords: string[];
@@ -277,6 +286,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
277
286
  absent?: string | undefined;
278
287
  flags?: string | undefined;
279
288
  command?: string | undefined;
289
+ timeout_ms?: number | undefined;
280
290
  severity?: "warn" | "block" | undefined;
281
291
  autogen?: boolean | undefined;
282
292
  last_fired?: string | null | undefined;
@@ -330,6 +340,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
330
340
  absent?: string | undefined;
331
341
  flags?: string | undefined;
332
342
  command?: string | undefined;
343
+ timeout_ms?: number | undefined;
333
344
  } | undefined;
334
345
  activation?: {
335
346
  keywords: string[];
@@ -359,6 +370,7 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
359
370
  absent?: string | undefined;
360
371
  flags?: string | undefined;
361
372
  command?: string | undefined;
373
+ timeout_ms?: number | undefined;
362
374
  severity?: "warn" | "block" | undefined;
363
375
  autogen?: boolean | undefined;
364
376
  last_fired?: string | null | undefined;
@@ -1851,6 +1863,8 @@ interface CommandSensorSpec {
1851
1863
  message: string;
1852
1864
  /** Anchor/scoped paths this sensor cares about (for reporting). */
1853
1865
  paths: string[];
1866
+ /** Max runtime in ms (executor default applies when unset). */
1867
+ timeout_ms?: number;
1854
1868
  }
1855
1869
  /**
1856
1870
  * Select the shell/test sensors that apply to `changedPaths`. With no changed paths (or a sensor
package/dist/index.js CHANGED
@@ -43,6 +43,8 @@ var SensorSchema = z.object({
43
43
  flags: z.string().optional(),
44
44
  /** Shell/test command to run (for kind=shell|test). Executed by the CLI, never by core. */
45
45
  command: z.string().optional(),
46
+ /** Max runtime for kind=shell|test commands (default 120000). The executor kills on expiry. */
47
+ timeout_ms: z.number().int().positive().optional(),
46
48
  /** Glob-ish path prefixes the sensor applies to. Falls back to the memory's anchor paths when empty. */
47
49
  paths: z.array(z.string()).default([]),
48
50
  /** LLM-facing self-correction message: what was done wrong and what to do instead. */
@@ -3865,7 +3867,8 @@ function selectCommandSensors(memories, changedPaths) {
3865
3867
  kind: sensor.kind,
3866
3868
  severity: sensor.severity,
3867
3869
  message: sensor.message,
3868
- paths: sensor.paths.length > 0 ? sensor.paths : anchorPaths
3870
+ paths: sensor.paths.length > 0 ? sensor.paths : anchorPaths,
3871
+ ...sensor.timeout_ms ? { timeout_ms: sensor.timeout_ms } : {}
3869
3872
  });
3870
3873
  }
3871
3874
  return specs;