@holdpoint/types 0.1.0-alpha.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.
@@ -0,0 +1,90 @@
1
+ /** Lifecycle hook that fires the check. Currently only "before_done". */
2
+ type HookEvent = "before_done";
3
+ /** Named file-scope filter. Custom regexes are plain strings not in this union. */
4
+ type WhenScope = "frontend" | "backend" | "socket" | "visual" | "python" | "go" | "rust" | "java" | "ruby" | "database" | "prisma" | "testing" | "infra" | "ci" | "docs" | "structural";
5
+ type ConditionOperator = "file_exists" | "file_contains" | "env_var_set" | "shell_returns_0";
6
+ interface ConditionDef {
7
+ id: string;
8
+ operator: ConditionOperator;
9
+ /** Path glob for file_exists / file_contains */
10
+ path?: string;
11
+ /** Substring to look for in file_contains */
12
+ contains?: string;
13
+ /** Env var name for env_var_set */
14
+ envVar?: string;
15
+ /** Shell command for shell_returns_0 */
16
+ cmd?: string;
17
+ }
18
+ interface CheckDef {
19
+ id: string;
20
+ label: string;
21
+ /** Lifecycle hook — defaults to "before_done" when absent */
22
+ on?: HookEvent;
23
+ /** File filter: a named WhenScope or a regex string. Absent = run always. */
24
+ when?: string;
25
+ /** Shell command — task (runs automatically) */
26
+ cmd?: string;
27
+ /** Structured prompt/instruction the agent must read and act on before finishing */
28
+ prompt?: string;
29
+ /** Reference to a ConditionDef id */
30
+ conditionId?: string;
31
+ }
32
+ interface HoldpointContext {
33
+ guides: Record<string, string>;
34
+ }
35
+ interface HoldpointConfig {
36
+ version: number;
37
+ context: HoldpointContext;
38
+ conditions: ConditionDef[];
39
+ /** All checks — each has `on`, optional `when`, and either `cmd` (task) or `prompt` (agent instruction). */
40
+ checks: CheckDef[];
41
+ /**
42
+ * Named regex patterns for use in `when:` fields.
43
+ * Keys are human-readable names (e.g. "checks-file", "api-routes").
44
+ * Values are regex strings matched against changed file paths.
45
+ * Built-in scope names (frontend, backend, structural, etc.) cannot be overridden here.
46
+ */
47
+ patterns?: Record<string, string>;
48
+ /**
49
+ * Files to inject as `additionalContext` at the start of every agent session.
50
+ * Paths are repo-root-relative. Useful for injecting MASTER_PROMPT.md, AGENT_CONTEXT.md, etc.
51
+ */
52
+ session_context_files?: string[];
53
+ }
54
+ type CheckStatus = "pass" | "fail" | "skip" | "pending";
55
+ interface CheckResult {
56
+ check: CheckDef;
57
+ status: CheckStatus;
58
+ /** stdout/stderr from a deterministic check */
59
+ output?: string;
60
+ /** Exit code from a deterministic check */
61
+ exitCode?: number;
62
+ /** Human-readable reason for skip */
63
+ skipReason?: string;
64
+ }
65
+ interface ValidationError {
66
+ path: string;
67
+ message: string;
68
+ }
69
+ interface ValidationResult {
70
+ valid: boolean;
71
+ errors: ValidationError[];
72
+ }
73
+ type AgentType = "copilot" | "claude" | "cursor" | "unknown";
74
+ type StackType = "typescript" | "python" | "go" | "nextjs" | "fullstack" | "unknown";
75
+ type NodeKind = "trigger" | "filter" | "task" | "prompt" | "condition";
76
+ interface CanvasNodeData {
77
+ [key: string]: unknown;
78
+ kind: NodeKind;
79
+ label: string;
80
+ /** Lifecycle hook on the trigger node */
81
+ on?: HookEvent;
82
+ /** File filter on the trigger node */
83
+ when?: string;
84
+ cmd?: string;
85
+ prompt?: string;
86
+ condition?: ConditionDef;
87
+ conditionId?: string;
88
+ }
89
+
90
+ export type { AgentType, CanvasNodeData, CheckDef, CheckResult, CheckStatus, ConditionDef, ConditionOperator, HoldpointConfig, HoldpointContext, HookEvent, NodeKind, StackType, ValidationError, ValidationResult, WhenScope };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@holdpoint/types",
3
+ "version": "0.1.0-alpha.0",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "tag": "alpha"
7
+ },
8
+ "description": "Shared TypeScript types for Holdpoint",
9
+ "homepage": "https://holdpoint.dev",
10
+ "bugs": {
11
+ "url": "https://github.com/holdpoint-dev/holdpoint/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/holdpoint-dev/holdpoint.git",
16
+ "directory": "packages/types"
17
+ },
18
+ "license": "MIT",
19
+ "keywords": [
20
+ "holdpoint",
21
+ "ai",
22
+ "agents",
23
+ "claude-code",
24
+ "github-copilot",
25
+ "cursor",
26
+ "eval",
27
+ "checkpoints",
28
+ "ci",
29
+ "yaml"
30
+ ],
31
+ "type": "module",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
+ }
37
+ },
38
+ "main": "./dist/index.js",
39
+ "types": "./dist/index.d.ts",
40
+ "files": [
41
+ "dist",
42
+ "README.md",
43
+ "LICENSE"
44
+ ],
45
+ "scripts": {
46
+ "build": "tsup",
47
+ "typecheck": "tsc --noEmit",
48
+ "clean": "rm -rf dist *.tsbuildinfo"
49
+ },
50
+ "devDependencies": {
51
+ "tsup": "^8.3.5",
52
+ "typescript": "^5.7.2"
53
+ }
54
+ }