opencode-hive 1.3.1 → 1.3.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/dist/hive-core/src/index.d.ts +4 -0
- package/dist/hive-core/src/services/agentsMdService.d.ts +32 -0
- package/dist/hive-core/src/services/configService.d.ts +78 -0
- package/dist/hive-core/src/services/contextService.d.ts +25 -0
- package/dist/hive-core/src/services/dockerSandboxService.d.ts +76 -0
- package/dist/hive-core/src/services/featureService.d.ts +19 -0
- package/dist/hive-core/src/services/index.d.ts +16 -0
- package/dist/hive-core/src/services/planService.d.ts +15 -0
- package/dist/hive-core/src/services/reviewService.d.ts +12 -0
- package/dist/hive-core/src/services/sessionService.d.ts +18 -0
- package/dist/hive-core/src/services/subtaskService.d.ts +17 -0
- package/dist/hive-core/src/services/taskDependencyGraph.d.ts +41 -0
- package/dist/hive-core/src/services/taskService.d.ts +124 -0
- package/dist/hive-core/src/services/worktreeService.d.ts +66 -0
- package/dist/hive-core/src/types.d.ts +221 -0
- package/dist/hive-core/src/utils/detection.d.ts +14 -0
- package/dist/hive-core/src/utils/paths.d.ts +105 -0
- package/dist/index.js +17007 -16691
- package/dist/{agents → opencode-hive/src/agents}/architect.d.ts +1 -1
- package/dist/opencode-hive/src/agents/hive.d.ts +12 -0
- package/dist/opencode-hive/src/agents/swarm.d.ts +12 -0
- package/package.json +1 -1
- package/skills/writing-plans/SKILL.md +15 -1
- package/dist/agents/hive.d.ts +0 -12
- package/dist/agents/swarm.d.ts +0 -12
- /package/dist/{agents → opencode-hive/src/agents}/custom-agents.d.ts +0 -0
- /package/dist/{agents → opencode-hive/src/agents}/forager.d.ts +0 -0
- /package/dist/{agents → opencode-hive/src/agents}/hygienic.d.ts +0 -0
- /package/dist/{agents → opencode-hive/src/agents}/index.d.ts +0 -0
- /package/dist/{agents → opencode-hive/src/agents}/scout.d.ts +0 -0
- /package/dist/{hooks → opencode-hive/src/hooks}/system-hook.d.ts +0 -0
- /package/dist/{hooks → opencode-hive/src/hooks}/variant-hook.d.ts +0 -0
- /package/dist/{index.d.ts → opencode-hive/src/index.d.ts} +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/ast-grep.d.ts +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/context7.d.ts +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/grep-app.d.ts +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/index.d.ts +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/types.d.ts +0 -0
- /package/dist/{mcp → opencode-hive/src/mcp}/websearch.d.ts +0 -0
- /package/dist/{skills → opencode-hive/src/skills}/builtin.d.ts +0 -0
- /package/dist/{skills → opencode-hive/src/skills}/file-loader.d.ts +0 -0
- /package/dist/{skills → opencode-hive/src/skills}/index.d.ts +0 -0
- /package/dist/{skills → opencode-hive/src/skills}/registry.generated.d.ts +0 -0
- /package/dist/{skills → opencode-hive/src/skills}/types.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/compaction-prompt.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/format.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/prompt-budgeting.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/prompt-file.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/prompt-observability.d.ts +0 -0
- /package/dist/{utils → opencode-hive/src/utils}/worker-prompt.d.ts +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
export type FeatureStatusType = 'planning' | 'approved' | 'executing' | 'completed';
|
|
2
|
+
export interface FeatureJson {
|
|
3
|
+
name: string;
|
|
4
|
+
status: FeatureStatusType;
|
|
5
|
+
ticket?: string;
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
approvedAt?: string;
|
|
9
|
+
completedAt?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FeatureDirectoryInfo {
|
|
12
|
+
directoryName: string;
|
|
13
|
+
logicalName: string;
|
|
14
|
+
index: number | null;
|
|
15
|
+
}
|
|
16
|
+
export type TaskStatusType = 'pending' | 'in_progress' | 'done' | 'cancelled' | 'blocked' | 'failed' | 'partial';
|
|
17
|
+
export type TaskOrigin = 'plan' | 'manual';
|
|
18
|
+
export type SubtaskType = 'test' | 'implement' | 'review' | 'verify' | 'research' | 'debug' | 'custom';
|
|
19
|
+
export interface Subtask {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
folder: string;
|
|
23
|
+
status: TaskStatusType;
|
|
24
|
+
type?: SubtaskType;
|
|
25
|
+
createdAt?: string;
|
|
26
|
+
completedAt?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SubtaskStatus {
|
|
29
|
+
status: TaskStatusType;
|
|
30
|
+
type?: SubtaskType;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
completedAt?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Worker session information for background task execution */
|
|
35
|
+
export interface WorkerSession {
|
|
36
|
+
/** Background task ID from OMO-Slim */
|
|
37
|
+
taskId?: string;
|
|
38
|
+
/** Unique session identifier */
|
|
39
|
+
sessionId: string;
|
|
40
|
+
/** Worker instance identifier */
|
|
41
|
+
workerId?: string;
|
|
42
|
+
/** Agent type handling this task */
|
|
43
|
+
agent?: string;
|
|
44
|
+
/** Execution mode: inline (same session) or delegate (background) */
|
|
45
|
+
mode?: 'inline' | 'delegate';
|
|
46
|
+
/** ISO timestamp of last heartbeat */
|
|
47
|
+
lastHeartbeatAt?: string;
|
|
48
|
+
/** Current attempt number (1-based) */
|
|
49
|
+
attempt?: number;
|
|
50
|
+
/** Number of messages exchanged in session */
|
|
51
|
+
messageCount?: number;
|
|
52
|
+
}
|
|
53
|
+
export interface TaskStatus {
|
|
54
|
+
/** Schema version for forward compatibility (default: 1) */
|
|
55
|
+
schemaVersion?: number;
|
|
56
|
+
status: TaskStatusType;
|
|
57
|
+
origin: TaskOrigin;
|
|
58
|
+
planTitle?: string;
|
|
59
|
+
summary?: string;
|
|
60
|
+
startedAt?: string;
|
|
61
|
+
completedAt?: string;
|
|
62
|
+
baseCommit?: string;
|
|
63
|
+
subtasks?: Subtask[];
|
|
64
|
+
/** Idempotency key for safe retries */
|
|
65
|
+
idempotencyKey?: string;
|
|
66
|
+
/** Worker session info for background execution */
|
|
67
|
+
workerSession?: WorkerSession;
|
|
68
|
+
/**
|
|
69
|
+
* Task dependencies expressed as task folder names (e.g., '01-setup', '02-core-api').
|
|
70
|
+
* A task cannot start until all its dependencies have status 'done'.
|
|
71
|
+
* Resolved from plan.md dependency annotations during hive_tasks_sync.
|
|
72
|
+
*/
|
|
73
|
+
dependsOn?: string[];
|
|
74
|
+
}
|
|
75
|
+
export type ReviewDocument = 'plan' | 'overview';
|
|
76
|
+
export interface ReviewThread {
|
|
77
|
+
id: string;
|
|
78
|
+
line: number;
|
|
79
|
+
body: string;
|
|
80
|
+
replies: string[];
|
|
81
|
+
}
|
|
82
|
+
export interface CommentsJson {
|
|
83
|
+
threads: ReviewThread[];
|
|
84
|
+
}
|
|
85
|
+
export interface ReviewCounts {
|
|
86
|
+
plan: number;
|
|
87
|
+
overview: number;
|
|
88
|
+
}
|
|
89
|
+
export type PlanComment = ReviewThread;
|
|
90
|
+
export interface PlanReadResult {
|
|
91
|
+
content: string;
|
|
92
|
+
status: FeatureStatusType;
|
|
93
|
+
comments: ReviewThread[];
|
|
94
|
+
}
|
|
95
|
+
export interface TasksSyncResult {
|
|
96
|
+
created: string[];
|
|
97
|
+
removed: string[];
|
|
98
|
+
kept: string[];
|
|
99
|
+
manual: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface TaskInfo {
|
|
102
|
+
folder: string;
|
|
103
|
+
name: string;
|
|
104
|
+
status: TaskStatusType;
|
|
105
|
+
origin: TaskOrigin;
|
|
106
|
+
planTitle?: string;
|
|
107
|
+
summary?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface FeatureInfo {
|
|
110
|
+
name: string;
|
|
111
|
+
status: FeatureStatusType;
|
|
112
|
+
tasks: TaskInfo[];
|
|
113
|
+
hasPlan: boolean;
|
|
114
|
+
hasOverview: boolean;
|
|
115
|
+
commentCount: number;
|
|
116
|
+
reviewCounts: ReviewCounts;
|
|
117
|
+
}
|
|
118
|
+
export interface ContextFile {
|
|
119
|
+
name: string;
|
|
120
|
+
content: string;
|
|
121
|
+
updatedAt: string;
|
|
122
|
+
}
|
|
123
|
+
export interface SessionInfo {
|
|
124
|
+
sessionId: string;
|
|
125
|
+
taskFolder?: string;
|
|
126
|
+
startedAt: string;
|
|
127
|
+
lastActiveAt: string;
|
|
128
|
+
messageCount?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface SessionsJson {
|
|
131
|
+
master?: string;
|
|
132
|
+
sessions: SessionInfo[];
|
|
133
|
+
}
|
|
134
|
+
export interface TaskSpec {
|
|
135
|
+
taskFolder: string;
|
|
136
|
+
featureName: string;
|
|
137
|
+
planSection: string;
|
|
138
|
+
context: string;
|
|
139
|
+
priorTasks: Array<{
|
|
140
|
+
folder: string;
|
|
141
|
+
summary?: string;
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
144
|
+
/** Agent model/temperature configuration */
|
|
145
|
+
export interface AgentModelConfig {
|
|
146
|
+
/** Model to use - format: "provider/model-id" (e.g., 'anthropic/claude-sonnet-4-20250514') */
|
|
147
|
+
model?: string;
|
|
148
|
+
/** Temperature for generation (0-2) */
|
|
149
|
+
temperature?: number;
|
|
150
|
+
/** Skills to enable for this agent */
|
|
151
|
+
skills?: string[];
|
|
152
|
+
/** Skills to auto-load for this agent */
|
|
153
|
+
autoLoadSkills?: string[];
|
|
154
|
+
/** Variant key for model reasoning/effort level (e.g., 'low', 'medium', 'high', 'max') */
|
|
155
|
+
variant?: string;
|
|
156
|
+
}
|
|
157
|
+
export declare const BUILT_IN_AGENT_NAMES: readonly ["hive-master", "architect-planner", "swarm-orchestrator", "scout-researcher", "forager-worker", "hygienic-reviewer"];
|
|
158
|
+
export type BuiltInAgentName = (typeof BUILT_IN_AGENT_NAMES)[number];
|
|
159
|
+
export declare const CUSTOM_AGENT_BASES: readonly ["forager-worker", "hygienic-reviewer"];
|
|
160
|
+
export type CustomAgentBase = (typeof CUSTOM_AGENT_BASES)[number];
|
|
161
|
+
export declare const CUSTOM_AGENT_RESERVED_NAMES: readonly ["hive-master", "architect-planner", "swarm-orchestrator", "scout-researcher", "forager-worker", "hygienic-reviewer", "hive", "architect", "swarm", "scout", "forager", "hygienic", "receiver", "build", "plan", "code"];
|
|
162
|
+
export interface CustomAgentConfig {
|
|
163
|
+
baseAgent: CustomAgentBase;
|
|
164
|
+
description: string;
|
|
165
|
+
model?: string;
|
|
166
|
+
temperature?: number;
|
|
167
|
+
variant?: string;
|
|
168
|
+
autoLoadSkills?: string[];
|
|
169
|
+
}
|
|
170
|
+
export interface ResolvedCustomAgentConfig extends AgentModelConfig {
|
|
171
|
+
baseAgent: CustomAgentBase;
|
|
172
|
+
description: string;
|
|
173
|
+
}
|
|
174
|
+
export interface HiveConfig {
|
|
175
|
+
/** Schema reference for config file */
|
|
176
|
+
$schema?: string;
|
|
177
|
+
/** Enable hive tools for specific features */
|
|
178
|
+
enableToolsFor?: string[];
|
|
179
|
+
/** Globally disable specific skills (won't appear in hive_skill tool) */
|
|
180
|
+
disableSkills?: string[];
|
|
181
|
+
/** Globally disable specific MCP servers. Available: websearch, context7, grep_app, ast_grep */
|
|
182
|
+
disableMcps?: string[];
|
|
183
|
+
/** Enable OMO-Slim delegation (optional integration) */
|
|
184
|
+
omoSlimEnabled?: boolean;
|
|
185
|
+
/** Choose between unified or dedicated agent modes */
|
|
186
|
+
agentMode?: 'unified' | 'dedicated';
|
|
187
|
+
/** Agent configuration */
|
|
188
|
+
agents?: {
|
|
189
|
+
/** Hive Master (hybrid planner + orchestrator) */
|
|
190
|
+
'hive-master'?: AgentModelConfig;
|
|
191
|
+
/** Architect Planner (planning-only) */
|
|
192
|
+
'architect-planner'?: AgentModelConfig;
|
|
193
|
+
/** Swarm Orchestrator */
|
|
194
|
+
'swarm-orchestrator'?: AgentModelConfig;
|
|
195
|
+
/** Scout Researcher */
|
|
196
|
+
'scout-researcher'?: AgentModelConfig;
|
|
197
|
+
/** Forager Worker */
|
|
198
|
+
'forager-worker'?: AgentModelConfig;
|
|
199
|
+
/** Hygienic Reviewer */
|
|
200
|
+
'hygienic-reviewer'?: AgentModelConfig;
|
|
201
|
+
};
|
|
202
|
+
customAgents?: Record<string, CustomAgentConfig>;
|
|
203
|
+
/** Sandbox mode for worker isolation */
|
|
204
|
+
sandbox?: 'none' | 'docker';
|
|
205
|
+
/** Docker image to use when sandbox is 'docker' (optional explicit override) */
|
|
206
|
+
dockerImage?: string;
|
|
207
|
+
/** Reuse Docker containers per worktree (default: true when sandbox is 'docker') */
|
|
208
|
+
persistentContainers?: boolean;
|
|
209
|
+
/** Hook execution cadence (number of turns between hook invocations). Key = hook name, Value = cadence (1 = every turn, 3 = every 3rd turn) */
|
|
210
|
+
hook_cadence?: Record<string, number>;
|
|
211
|
+
}
|
|
212
|
+
/** Default models for Hive agents */
|
|
213
|
+
export declare const DEFAULT_AGENT_MODELS: {
|
|
214
|
+
readonly 'hive-master': "github-copilot/claude-opus-4.5";
|
|
215
|
+
readonly 'architect-planner': "github-copilot/gpt-5.2-codex";
|
|
216
|
+
readonly 'swarm-orchestrator': "github-copilot/claude-opus-4.5";
|
|
217
|
+
readonly 'scout-researcher': "zai-coding-plan/glm-4.7";
|
|
218
|
+
readonly 'forager-worker': "github-copilot/gpt-5.2-codex";
|
|
219
|
+
readonly 'hygienic-reviewer': "github-copilot/gpt-5.2-codex";
|
|
220
|
+
};
|
|
221
|
+
export declare const DEFAULT_HIVE_CONFIG: HiveConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FeatureJson } from '../types.js';
|
|
2
|
+
export interface DetectionResult {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
feature: string | null;
|
|
5
|
+
task: string | null;
|
|
6
|
+
isWorktree: boolean;
|
|
7
|
+
mainProjectRoot: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function detectContext(cwd: string): DetectionResult;
|
|
10
|
+
export declare function listFeatures(projectRoot: string): string[];
|
|
11
|
+
export declare function getActiveFeatureName(projectRoot: string): string | null;
|
|
12
|
+
export declare function resolveActiveFeatureName(projectRoot: string): string | null;
|
|
13
|
+
export declare function getFeatureData(projectRoot: string, featureName: string): FeatureJson | null;
|
|
14
|
+
export declare function findProjectRoot(startDir: string): string | null;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { FeatureDirectoryInfo, ReviewDocument } from '../types.js';
|
|
2
|
+
export declare function normalizePath(filePath: string): string;
|
|
3
|
+
export declare function getHivePath(projectRoot: string): string;
|
|
4
|
+
export declare function getFeaturesPath(projectRoot: string): string;
|
|
5
|
+
export declare function getActiveFeaturePath(projectRoot: string): string;
|
|
6
|
+
export declare function listFeatureDirectories(projectRoot: string): FeatureDirectoryInfo[];
|
|
7
|
+
export declare function resolveFeatureDirectoryName(projectRoot: string, featureName: string): string;
|
|
8
|
+
export declare function getNextIndexedFeatureDirectoryName(projectRoot: string, featureName: string): string;
|
|
9
|
+
export declare function getFeaturePath(projectRoot: string, featureName: string): string;
|
|
10
|
+
export declare function getPlanPath(projectRoot: string, featureName: string): string;
|
|
11
|
+
export declare function getCommentsPath(projectRoot: string, featureName: string): string;
|
|
12
|
+
export declare function getReviewCommentsPath(projectRoot: string, featureName: string, document: ReviewDocument): string;
|
|
13
|
+
export declare function getFeatureJsonPath(projectRoot: string, featureName: string): string;
|
|
14
|
+
export declare function getContextPath(projectRoot: string, featureName: string): string;
|
|
15
|
+
export declare function getOverviewPath(projectRoot: string, featureName: string): string;
|
|
16
|
+
export declare function getTasksPath(projectRoot: string, featureName: string): string;
|
|
17
|
+
export declare function getTaskPath(projectRoot: string, featureName: string, taskFolder: string): string;
|
|
18
|
+
export declare function getTaskStatusPath(projectRoot: string, featureName: string, taskFolder: string): string;
|
|
19
|
+
export declare function getTaskReportPath(projectRoot: string, featureName: string, taskFolder: string): string;
|
|
20
|
+
export declare function getTaskSpecPath(projectRoot: string, featureName: string, taskFolder: string): string;
|
|
21
|
+
export declare function getApprovedPath(projectRoot: string, featureName: string): string;
|
|
22
|
+
export declare function getSubtasksPath(projectRoot: string, featureName: string, taskFolder: string): string;
|
|
23
|
+
export declare function getSubtaskPath(projectRoot: string, featureName: string, taskFolder: string, subtaskFolder: string): string;
|
|
24
|
+
export declare function getSubtaskStatusPath(projectRoot: string, featureName: string, taskFolder: string, subtaskFolder: string): string;
|
|
25
|
+
export declare function getSubtaskSpecPath(projectRoot: string, featureName: string, taskFolder: string, subtaskFolder: string): string;
|
|
26
|
+
export declare function getSubtaskReportPath(projectRoot: string, featureName: string, taskFolder: string, subtaskFolder: string): string;
|
|
27
|
+
export declare function ensureDir(dirPath: string): void;
|
|
28
|
+
export declare function fileExists(filePath: string): boolean;
|
|
29
|
+
export declare function readJson<T>(filePath: string): T | null;
|
|
30
|
+
export declare function writeJson<T>(filePath: string, data: T): void;
|
|
31
|
+
/** Lock acquisition options */
|
|
32
|
+
export interface LockOptions {
|
|
33
|
+
/** Maximum time to wait for lock acquisition (ms). Default: 5000 */
|
|
34
|
+
timeout?: number;
|
|
35
|
+
/** Time between lock acquisition attempts (ms). Default: 50 */
|
|
36
|
+
retryInterval?: number;
|
|
37
|
+
/** Time after which a stale lock is broken (ms). Default: 30000 */
|
|
38
|
+
staleLockTTL?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the lock file path for a given file
|
|
42
|
+
*/
|
|
43
|
+
export declare function getLockPath(filePath: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Acquire an exclusive lock on a file.
|
|
46
|
+
* Uses exclusive file creation (O_EXCL) for atomic lock acquisition.
|
|
47
|
+
*
|
|
48
|
+
* @param filePath - Path to the file to lock
|
|
49
|
+
* @param options - Lock acquisition options
|
|
50
|
+
* @returns A release function to call when done
|
|
51
|
+
* @throws Error if lock cannot be acquired within timeout
|
|
52
|
+
*/
|
|
53
|
+
export declare function acquireLock(filePath: string, options?: LockOptions): Promise<() => void>;
|
|
54
|
+
/**
|
|
55
|
+
* Synchronous version of acquireLock for simpler use cases
|
|
56
|
+
*/
|
|
57
|
+
export declare function acquireLockSync(filePath: string, options?: LockOptions): () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Write a file atomically using write-to-temp-then-rename pattern.
|
|
60
|
+
* This ensures no partial writes are visible to readers.
|
|
61
|
+
*
|
|
62
|
+
* @param filePath - Destination file path
|
|
63
|
+
* @param content - Content to write
|
|
64
|
+
*/
|
|
65
|
+
export declare function writeAtomic(filePath: string, content: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Write JSON atomically
|
|
68
|
+
*/
|
|
69
|
+
export declare function writeJsonAtomic<T>(filePath: string, data: T): void;
|
|
70
|
+
/**
|
|
71
|
+
* Write JSON with exclusive lock (async version).
|
|
72
|
+
* Ensures only one process writes at a time and writes are atomic.
|
|
73
|
+
*
|
|
74
|
+
* @param filePath - Path to JSON file
|
|
75
|
+
* @param data - Data to write
|
|
76
|
+
* @param options - Lock options
|
|
77
|
+
*/
|
|
78
|
+
export declare function writeJsonLocked<T>(filePath: string, data: T, options?: LockOptions): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Synchronous version of writeJsonLocked
|
|
81
|
+
*/
|
|
82
|
+
export declare function writeJsonLockedSync<T>(filePath: string, data: T, options?: LockOptions): void;
|
|
83
|
+
/**
|
|
84
|
+
* Deep merge utility that explicitly handles nested objects.
|
|
85
|
+
* - Arrays are replaced, not merged
|
|
86
|
+
* - Undefined values in patch are ignored (don't delete existing keys)
|
|
87
|
+
* - Null values explicitly set to null
|
|
88
|
+
*/
|
|
89
|
+
export declare function deepMerge<T extends Record<string, unknown>>(target: T, patch: Partial<T>): T;
|
|
90
|
+
/**
|
|
91
|
+
* Read-modify-write JSON with lock protection.
|
|
92
|
+
* Reads current content, applies patch via deep merge, writes atomically.
|
|
93
|
+
*
|
|
94
|
+
* @param filePath - Path to JSON file
|
|
95
|
+
* @param patch - Partial update to merge
|
|
96
|
+
* @param options - Lock options
|
|
97
|
+
* @returns The merged result
|
|
98
|
+
*/
|
|
99
|
+
export declare function patchJsonLocked<T extends object>(filePath: string, patch: Partial<T>, options?: LockOptions): Promise<T>;
|
|
100
|
+
/**
|
|
101
|
+
* Synchronous version of patchJsonLocked
|
|
102
|
+
*/
|
|
103
|
+
export declare function patchJsonLockedSync<T extends object>(filePath: string, patch: Partial<T>, options?: LockOptions): T;
|
|
104
|
+
export declare function readText(filePath: string): string | null;
|
|
105
|
+
export declare function writeText(filePath: string, content: string): void;
|