hankweave 0.5.7 → 0.6.2
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/README.md +12 -11
- package/dist/base-process-manager.d.ts +30 -0
- package/dist/budget.d.ts +315 -0
- package/dist/checkpoint-git.d.ts +98 -0
- package/dist/claude-agent-sdk-manager.d.ts +144 -0
- package/dist/claude-log-parser.d.ts +63 -0
- package/dist/claude-runtime-extractor.d.ts +73 -0
- package/dist/codex-runtime-extractor.d.ts +107 -0
- package/dist/codon-runner.d.ts +278 -0
- package/dist/config-validation/model-validator.d.ts +16 -0
- package/dist/config-validation/sentinel.schema.d.ts +6967 -0
- package/dist/config.d.ts +40815 -0
- package/dist/cost-tracker.d.ts +72 -0
- package/dist/execution-planner.d.ts +62 -0
- package/dist/execution-thread.d.ts +71 -0
- package/dist/exports/schemas.d.ts +9 -0
- package/dist/exports/schemas.js +1019 -0
- package/dist/exports/types.d.ts +15 -0
- package/dist/exports/types.js +60 -0
- package/dist/file-resolver.d.ts +33 -0
- package/dist/index.js +380 -293
- package/dist/index.js.map +33 -29
- package/dist/llm/llm-provider-registry.d.ts +207 -0
- package/dist/llm/models-dev-schema.d.ts +679 -0
- package/dist/llm/provider-config.d.ts +30 -0
- package/dist/prompt-builder.d.ts +75 -0
- package/dist/prompt-frontmatter.d.ts +61 -0
- package/dist/replay-process-manager.d.ts +82 -0
- package/dist/runtime-extractor-base.d.ts +120 -0
- package/dist/schemas/event-schemas.d.ts +8389 -0
- package/dist/schemas/websocket-log-schemas.d.ts +4502 -0
- package/dist/shim-process-manager.d.ts +98 -0
- package/dist/shim-runtime-extractor.d.ts +51 -0
- package/dist/shims/codex/README.md +129 -0
- package/dist/shims/codex/THIRDPARTY.md +18 -0
- package/dist/shims/codex/VERSION +1 -0
- package/dist/shims/codex/common/package.json +24 -0
- package/dist/shims/codex/index.js +1154 -970
- package/dist/shims/codex/package.json +46 -0
- package/dist/shims/codex/tsup.config.ts +16 -0
- package/dist/shims/gemini/README.md +59 -0
- package/dist/shims/gemini/THIRDPARTY.md +32 -0
- package/dist/shims/gemini/VERSION +1 -0
- package/dist/shims/gemini/common/package.json +24 -0
- package/dist/shims/gemini/index.js +1359 -30
- package/dist/shims/gemini/package.json +37 -0
- package/dist/shims/opencode/README.md +82 -0
- package/dist/shims/opencode/THIRDPARTY.md +32 -0
- package/dist/shims/opencode/VERSION +1 -0
- package/dist/shims/opencode/common/package.json +24 -0
- package/dist/shims/opencode/index.js +1476 -0
- package/dist/shims/opencode/package.json +38 -0
- package/dist/shims/pi/README.md +87 -0
- package/dist/shims/pi/THIRDPARTY.md +24 -0
- package/dist/shims/pi/VERSION +1 -0
- package/dist/shims/pi/common/package.json +24 -0
- package/dist/shims/pi/index.js +249832 -0
- package/dist/shims/pi/package.json +53 -0
- package/dist/state-manager.d.ts +161 -0
- package/dist/state-transition-guards.d.ts +37 -0
- package/dist/telemetry/telemetry-types.d.ts +206 -0
- package/dist/typed-event-emitter.d.ts +57 -0
- package/dist/types/branded-types.d.ts +15 -0
- package/dist/types/budget-types.d.ts +82 -0
- package/dist/types/claude-session-schema.d.ts +2430 -0
- package/dist/types/error-types.d.ts +44 -0
- package/dist/types/input-ai-types.d.ts +1070 -0
- package/dist/types/llm-call-types.d.ts +3829 -0
- package/dist/types/sentinel-types.d.ts +66 -0
- package/dist/types/state-types.d.ts +1099 -0
- package/dist/types/tool-types.d.ts +86 -0
- package/dist/types/types.d.ts +367 -0
- package/dist/types/websocket-log-types.d.ts +7 -0
- package/dist/utils.d.ts +452 -0
- package/package.json +15 -2
- package/schemas/hank.schema.json +158 -3
- package/schemas/hankweave.schema.json +17 -1
- package/shims/codex/index.js +0 -1583
- package/shims/gemini/index.js +0 -31
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sentinel Types
|
|
3
|
+
*
|
|
4
|
+
* This file re-exports types from the Zod schemas to maintain a single source of truth.
|
|
5
|
+
* The schemas in server/config-validation/sentinel.schema.ts are the canonical definitions.
|
|
6
|
+
*
|
|
7
|
+
* All types are derived from the Zod schemas using z.infer<>, ensuring that:
|
|
8
|
+
* 1. TypeScript types and runtime validation are always in sync
|
|
9
|
+
* 2. We avoid dual source of truth issues
|
|
10
|
+
* 3. Changes to validation logic automatically update the types
|
|
11
|
+
*/
|
|
12
|
+
import type { ServerEvent } from "../schemas/event-schemas.js";
|
|
13
|
+
export type { Condition, ContainsCondition, CountExecution, DebounceExecution, EqualsCondition, EventTrigger, ImmediateExecution, InCondition, MatchesCondition, NumericComparisonCondition, PatternStep, SentinelConfig, SentinelExecution, SentinelTrigger, SequenceTrigger, TimeWindowExecution, } from "../config-validation/sentinel.schema.js";
|
|
14
|
+
export { getValueByPath } from "../config-validation/sentinel.schema.js";
|
|
15
|
+
export type { StructuredOutputContext } from "../types/llm-call-types.js";
|
|
16
|
+
/**
|
|
17
|
+
* Output paths configuration passed from codon to sentinel.
|
|
18
|
+
* This will eventually live in codon configuration, but for now
|
|
19
|
+
* we pass it as a parameter to SentinelManager for testing.
|
|
20
|
+
*/
|
|
21
|
+
export interface SentinelOutputPaths {
|
|
22
|
+
/**
|
|
23
|
+
* Path to append-only log file. Path convention:
|
|
24
|
+
* - Filename only (e.g., "output.md") → .hankweave/sentinel-outputs/{id}/
|
|
25
|
+
* - Path with slash (e.g., "data/output.md") → execution-dir relative
|
|
26
|
+
* Auto-generated if omitted: .hankweave/sentinel-outputs/{id}/{id}-{codon}-{timestamp}.md
|
|
27
|
+
*/
|
|
28
|
+
logFile?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Path to last-value-only file. Same path convention as logFile.
|
|
31
|
+
* Truly optional - no auto-generation.
|
|
32
|
+
*/
|
|
33
|
+
lastValueFile?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Execution strategy type extracted from SentinelExecution
|
|
37
|
+
*/
|
|
38
|
+
export type ExecutionStrategy = "immediate" | "debounce" | "count" | "timeWindow";
|
|
39
|
+
/**
|
|
40
|
+
* Represents a queued trigger waiting for execution.
|
|
41
|
+
*
|
|
42
|
+
* When a trigger matches, it's queued with its events and metadata.
|
|
43
|
+
* The queue ensures serial execution within each sentinel while
|
|
44
|
+
* maintaining semantic correctness through the queuedAt timestamp.
|
|
45
|
+
*/
|
|
46
|
+
export interface QueuedTrigger {
|
|
47
|
+
/** Unique identifier for this trigger execution */
|
|
48
|
+
id: string;
|
|
49
|
+
/** Events that caused this trigger to fire */
|
|
50
|
+
events: ServerEvent[];
|
|
51
|
+
/** Execution strategy that created this trigger */
|
|
52
|
+
strategy: ExecutionStrategy;
|
|
53
|
+
/**
|
|
54
|
+
* When this trigger was queued (NOT when it executes).
|
|
55
|
+
* This timestamp is used in template rendering to ensure semantic correctness.
|
|
56
|
+
*
|
|
57
|
+
* Examples:
|
|
58
|
+
* - immediate: When the triggering event arrived
|
|
59
|
+
* - debounce: When the quiet period ended
|
|
60
|
+
* - count: When the threshold was reached
|
|
61
|
+
* - timeWindow: When the window closed
|
|
62
|
+
*/
|
|
63
|
+
queuedAt: Date;
|
|
64
|
+
/** Optional priority for future queue sorting (not currently used) */
|
|
65
|
+
priority?: number;
|
|
66
|
+
}
|