@revealui/harnesses 0.1.0 → 0.1.3

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,231 @@
1
+ import { z } from 'zod';
2
+
3
+ interface ResolverContext {
4
+ projectRoot: string;
5
+ projectName?: string;
6
+ phase?: string;
7
+ packageManager?: string;
8
+ nodeVersion?: string;
9
+ }
10
+ type ResolverFn = (ctx: ResolverContext) => string;
11
+
12
+ declare const AgentSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ description: z.ZodString;
16
+ tier: z.ZodDefault<z.ZodEnum<{
17
+ oss: "oss";
18
+ pro: "pro";
19
+ }>>;
20
+ isolation: z.ZodDefault<z.ZodEnum<{
21
+ worktree: "worktree";
22
+ none: "none";
23
+ }>>;
24
+ tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
25
+ content: z.ZodString;
26
+ }, z.core.$strip>;
27
+ type Agent = z.infer<typeof AgentSchema>;
28
+
29
+ declare const CommandSchema: z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ description: z.ZodString;
33
+ tier: z.ZodDefault<z.ZodEnum<{
34
+ oss: "oss";
35
+ pro: "pro";
36
+ }>>;
37
+ disableModelInvocation: z.ZodDefault<z.ZodBoolean>;
38
+ argumentHint: z.ZodOptional<z.ZodString>;
39
+ content: z.ZodString;
40
+ }, z.core.$strip>;
41
+ type Command = z.infer<typeof CommandSchema>;
42
+
43
+ declare const ManifestSchema: z.ZodObject<{
44
+ version: z.ZodLiteral<1>;
45
+ generatedAt: z.ZodString;
46
+ rules: z.ZodArray<z.ZodObject<{
47
+ id: z.ZodString;
48
+ name: z.ZodString;
49
+ description: z.ZodString;
50
+ scope: z.ZodEnum<{
51
+ global: "global";
52
+ project: "project";
53
+ }>;
54
+ preambleTier: z.ZodDefault<z.ZodNumber>;
55
+ tier: z.ZodDefault<z.ZodEnum<{
56
+ oss: "oss";
57
+ pro: "pro";
58
+ }>>;
59
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
60
+ content: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ commands: z.ZodArray<z.ZodObject<{
63
+ id: z.ZodString;
64
+ name: z.ZodString;
65
+ description: z.ZodString;
66
+ tier: z.ZodDefault<z.ZodEnum<{
67
+ oss: "oss";
68
+ pro: "pro";
69
+ }>>;
70
+ disableModelInvocation: z.ZodDefault<z.ZodBoolean>;
71
+ argumentHint: z.ZodOptional<z.ZodString>;
72
+ content: z.ZodString;
73
+ }, z.core.$strip>>;
74
+ agents: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodString;
76
+ name: z.ZodString;
77
+ description: z.ZodString;
78
+ tier: z.ZodDefault<z.ZodEnum<{
79
+ oss: "oss";
80
+ pro: "pro";
81
+ }>>;
82
+ isolation: z.ZodDefault<z.ZodEnum<{
83
+ worktree: "worktree";
84
+ none: "none";
85
+ }>>;
86
+ tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
87
+ content: z.ZodString;
88
+ }, z.core.$strip>>;
89
+ skills: z.ZodArray<z.ZodObject<{
90
+ id: z.ZodString;
91
+ name: z.ZodString;
92
+ description: z.ZodString;
93
+ tier: z.ZodDefault<z.ZodEnum<{
94
+ oss: "oss";
95
+ pro: "pro";
96
+ }>>;
97
+ disableModelInvocation: z.ZodDefault<z.ZodBoolean>;
98
+ skipFrontmatter: z.ZodDefault<z.ZodBoolean>;
99
+ filePatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
100
+ bashPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
101
+ references: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
102
+ content: z.ZodString;
103
+ }, z.core.$strip>>;
104
+ preambles: z.ZodArray<z.ZodObject<{
105
+ tier: z.ZodNumber;
106
+ name: z.ZodString;
107
+ description: z.ZodString;
108
+ ruleIds: z.ZodArray<z.ZodString>;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>;
111
+ type Manifest = z.infer<typeof ManifestSchema>;
112
+
113
+ declare const PreambleTierSchema: z.ZodObject<{
114
+ tier: z.ZodNumber;
115
+ name: z.ZodString;
116
+ description: z.ZodString;
117
+ ruleIds: z.ZodArray<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ type PreambleTier = z.infer<typeof PreambleTierSchema>;
120
+
121
+ declare const RuleSchema: z.ZodObject<{
122
+ id: z.ZodString;
123
+ name: z.ZodString;
124
+ description: z.ZodString;
125
+ scope: z.ZodEnum<{
126
+ global: "global";
127
+ project: "project";
128
+ }>;
129
+ preambleTier: z.ZodDefault<z.ZodNumber>;
130
+ tier: z.ZodDefault<z.ZodEnum<{
131
+ oss: "oss";
132
+ pro: "pro";
133
+ }>>;
134
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
135
+ content: z.ZodString;
136
+ }, z.core.$strip>;
137
+ type Rule = z.infer<typeof RuleSchema>;
138
+
139
+ declare const SkillSchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ name: z.ZodString;
142
+ description: z.ZodString;
143
+ tier: z.ZodDefault<z.ZodEnum<{
144
+ oss: "oss";
145
+ pro: "pro";
146
+ }>>;
147
+ disableModelInvocation: z.ZodDefault<z.ZodBoolean>;
148
+ skipFrontmatter: z.ZodDefault<z.ZodBoolean>;
149
+ filePatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
150
+ bashPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
151
+ references: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
152
+ content: z.ZodString;
153
+ }, z.core.$strip>;
154
+ type Skill = z.infer<typeof SkillSchema>;
155
+
156
+ interface GeneratedFile {
157
+ /** Relative path from project root (e.g. '.claude/rules/biome.md') */
158
+ relativePath: string;
159
+ content: string;
160
+ }
161
+ interface DiffEntry {
162
+ relativePath: string;
163
+ status: 'added' | 'modified' | 'deleted' | 'unchanged';
164
+ expected?: string;
165
+ actual?: string;
166
+ }
167
+ interface ContentGenerator {
168
+ readonly id: string;
169
+ readonly outputDir: string;
170
+ generateRule(rule: Rule, ctx: ResolverContext): GeneratedFile[];
171
+ generateCommand(cmd: Command, ctx: ResolverContext): GeneratedFile[];
172
+ generateAgent(agent: Agent, ctx: ResolverContext): GeneratedFile[];
173
+ generateSkill(skill: Skill, ctx: ResolverContext): GeneratedFile[];
174
+ generateAll(manifest: Manifest, ctx: ResolverContext): GeneratedFile[];
175
+ }
176
+
177
+ /** Build a complete manifest from all canonical definitions. */
178
+ declare function buildManifest(): Manifest;
179
+
180
+ /** Get a generator by ID. */
181
+ declare function getGenerator(id: string): ContentGenerator | undefined;
182
+ /** Register a custom generator. */
183
+ declare function registerGenerator(generator: ContentGenerator): void;
184
+ /** List all registered generator IDs. */
185
+ declare function listGenerators(): string[];
186
+
187
+ /** Register a custom resolver. Overwrites existing entries with the same key. */
188
+ declare function registerResolver(key: string, fn: ResolverFn): void;
189
+ /** Resolve all `{{PLACEHOLDER}}` markers in a string using the resolver registry. */
190
+ declare function resolveTemplate(template: string, ctx: ResolverContext): string;
191
+ /** List all registered resolver keys. */
192
+ declare function listResolvers(): string[];
193
+
194
+ /**
195
+ * @revealui/harnesses/content — Canonical Content Layer
196
+ *
197
+ * Tool-agnostic definitions for AI guidance content (rules, commands, agents, skills).
198
+ * Generators produce tool-specific output (Claude Code, Cursor, etc.) from canonical definitions.
199
+ *
200
+ * @example
201
+ * ```ts
202
+ * import { buildManifest, validateManifest, generateContent, diffContent } from '@revealui/harnesses/content';
203
+ *
204
+ * const manifest = buildManifest();
205
+ * const validation = validateManifest(manifest);
206
+ * const files = generateContent('claude-code', manifest, { projectRoot: '/path/to/project' });
207
+ * ```
208
+ */
209
+
210
+ interface ValidationResult {
211
+ valid: boolean;
212
+ errors: string[];
213
+ }
214
+ interface ContentSummary {
215
+ rules: number;
216
+ commands: number;
217
+ agents: number;
218
+ skills: number;
219
+ preambles: number;
220
+ total: number;
221
+ }
222
+ /** Validate a manifest object against the Zod schema. */
223
+ declare function validateManifest(manifest: unknown): ValidationResult;
224
+ /** Generate content files for a specific generator. */
225
+ declare function generateContent(generatorId: string, manifest: Manifest, ctx: ResolverContext): GeneratedFile[];
226
+ /** Compare generated content against existing files on disk. */
227
+ declare function diffContent(generatorId: string, manifest: Manifest, ctx: ResolverContext, projectRoot: string): DiffEntry[];
228
+ /** Get a summary of all content in the manifest. */
229
+ declare function listContent(manifest?: Manifest): ContentSummary;
230
+
231
+ export { type Agent, AgentSchema, type Command, CommandSchema, type ContentGenerator, type ContentSummary, type DiffEntry, type GeneratedFile, type Manifest, ManifestSchema, type PreambleTier, PreambleTierSchema, type ResolverContext, type ResolverFn, type Rule, RuleSchema, type Skill, SkillSchema, type ValidationResult, buildManifest, diffContent, generateContent, getGenerator, listContent, listGenerators, listResolvers, registerGenerator, registerResolver, resolveTemplate, validateManifest };
@@ -0,0 +1,40 @@
1
+ import {
2
+ AgentSchema,
3
+ CommandSchema,
4
+ ManifestSchema,
5
+ PreambleTierSchema,
6
+ RuleSchema,
7
+ SkillSchema,
8
+ buildManifest,
9
+ diffContent,
10
+ generateContent,
11
+ getGenerator,
12
+ listContent,
13
+ listGenerators,
14
+ listResolvers,
15
+ registerGenerator,
16
+ registerResolver,
17
+ resolveTemplate,
18
+ validateManifest
19
+ } from "../chunk-JDI6B2IB.js";
20
+ import "../chunk-DGUM43GV.js";
21
+ export {
22
+ AgentSchema,
23
+ CommandSchema,
24
+ ManifestSchema,
25
+ PreambleTierSchema,
26
+ RuleSchema,
27
+ SkillSchema,
28
+ buildManifest,
29
+ diffContent,
30
+ generateContent,
31
+ getGenerator,
32
+ listContent,
33
+ listGenerators,
34
+ listResolvers,
35
+ registerGenerator,
36
+ registerResolver,
37
+ resolveTemplate,
38
+ validateManifest
39
+ };
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,132 +1,8 @@
1
+ import { HarnessAdapter, HarnessCapabilities, HarnessInfo, HarnessCommand, HarnessCommandResult, HarnessEvent, ConfigDiffEntry, ConfigSyncDirection, ConfigSyncResult, HealthCheckResult, HarnessProcessInfo } from './types/index.js';
2
+ export { Agent, Command, ContentGenerator, ContentSummary, DiffEntry, GeneratedFile, Manifest, PreambleTier, ResolverContext, Rule, Skill, ValidationResult, buildManifest, diffContent, generateContent, listContent, validateManifest } from './content/index.js';
1
3
  import { WorkboardManager } from './workboard/index.js';
2
- export { ConflictResult, SessionType, WorkboardEntry, WorkboardSession, WorkboardState, deriveSessionId, detectSessionType } from './workboard/index.js';
3
-
4
- /**
5
- * Core types for the AI harness integration system.
6
- * Mirrors packages/editors/src/types/core.ts for the harness domain.
7
- */
8
- interface HarnessCapabilities {
9
- /** Can generate code from a prompt */
10
- generateCode: boolean;
11
- /** Can analyze/explain existing code */
12
- analyzeCode: boolean;
13
- /** Can apply inline code edits */
14
- applyEdit: boolean;
15
- /** Can sync configuration files */
16
- applyConfig: boolean;
17
- /** Can query workboard state */
18
- readWorkboard: boolean;
19
- /** Can write workboard state */
20
- writeWorkboard: boolean;
21
- }
22
- type ConfigSyncDirection = 'push' | 'pull';
23
- type HarnessCommand = {
24
- type: 'generate-code';
25
- prompt: string;
26
- context?: string;
27
- language?: string;
28
- } | {
29
- type: 'analyze-code';
30
- filePath: string;
31
- question?: string;
32
- } | {
33
- type: 'apply-edit';
34
- filePath: string;
35
- diff: string;
36
- } | {
37
- type: 'apply-config';
38
- configPath: string;
39
- content: string;
40
- } | {
41
- type: 'get-status';
42
- } | {
43
- type: 'get-running-instances';
44
- } | {
45
- type: 'sync-config';
46
- direction: ConfigSyncDirection;
47
- } | {
48
- type: 'diff-config';
49
- } | {
50
- type: 'read-workboard';
51
- } | {
52
- type: 'update-workboard';
53
- sessionId: string;
54
- task?: string;
55
- files?: string[];
56
- };
57
- interface HarnessCommandResult {
58
- success: boolean;
59
- command: HarnessCommand['type'];
60
- message?: string;
61
- data?: unknown;
62
- }
63
- type HarnessEvent = {
64
- type: 'harness-connected';
65
- harnessId: string;
66
- } | {
67
- type: 'harness-disconnected';
68
- harnessId: string;
69
- } | {
70
- type: 'generation-started';
71
- taskId: string;
72
- } | {
73
- type: 'generation-completed';
74
- taskId: string;
75
- output: string;
76
- } | {
77
- type: 'error';
78
- harnessId: string;
79
- message: string;
80
- };
81
- interface HarnessInfo {
82
- id: string;
83
- name: string;
84
- version?: string;
85
- capabilities: HarnessCapabilities;
86
- }
87
- interface HarnessProcessInfo {
88
- pid: number;
89
- command: string;
90
- harnessId: string;
91
- }
92
- interface ConfigSyncResult {
93
- success: boolean;
94
- harnessId: string;
95
- direction: ConfigSyncDirection;
96
- message?: string;
97
- }
98
- interface ConfigDiffEntry {
99
- harnessId: string;
100
- localExists: boolean;
101
- ssdExists: boolean;
102
- identical: boolean;
103
- }
104
-
105
- /**
106
- * Contract every AI harness adapter must satisfy.
107
- * Mirrors EditorAdapter from packages/editors.
108
- *
109
- * AI tools are external executables — never linked libraries.
110
- * Communication is data-only: commands in, results out.
111
- */
112
- interface HarnessAdapter {
113
- /** Unique stable identifier, e.g. "claude-code", "cursor", "copilot" */
114
- readonly id: string;
115
- /** Human-readable display name */
116
- readonly name: string;
117
- /** Returns the static capability set for this harness */
118
- getCapabilities(): HarnessCapabilities;
119
- /** Returns live info (version, etc.) — may shell out */
120
- getInfo(): Promise<HarnessInfo>;
121
- /** True if the harness executable is on PATH and accessible */
122
- isAvailable(): Promise<boolean>;
123
- /** Execute a typed command against this harness */
124
- execute(command: HarnessCommand): Promise<HarnessCommandResult>;
125
- /** Subscribe to harness events; returns an unsubscribe function */
126
- onEvent(handler: (event: HarnessEvent) => void): () => void;
127
- /** Release all resources held by this adapter */
128
- dispose(): Promise<void>;
129
- }
4
+ export { ConflictResult, SessionType, WorkboardEntry, WorkboardSession, WorkboardState, acquireLock, atomicWriteSync, deriveSessionId, detectSessionType, lockPathFor, releaseLock, withLock, withLockAsync } from './workboard/index.js';
5
+ import 'zod';
130
6
 
131
7
  /**
132
8
  * Adapter for Anthropic Claude Code (CLI: `claude`).
@@ -147,42 +23,67 @@ declare class ClaudeCodeAdapter implements HarnessAdapter {
147
23
  getCapabilities(): HarnessCapabilities;
148
24
  getInfo(): Promise<HarnessInfo>;
149
25
  isAvailable(): Promise<boolean>;
26
+ notifyRegistered(): void;
27
+ notifyUnregistering(): void;
150
28
  execute(command: HarnessCommand): Promise<HarnessCommandResult>;
29
+ private executeInner;
151
30
  onEvent(handler: (event: HarnessEvent) => void): () => void;
152
31
  dispose(): Promise<void>;
32
+ private emit;
153
33
  }
154
34
 
155
35
  /**
156
- * Stub adapter for GitHub Copilot.
36
+ * Adapter for Cursor IDE.
157
37
  *
158
- * Copilot has no standalone CLI it runs as a VS Code extension.
159
- * This adapter is a stub for future integration once Copilot exposes
160
- * a programmatic interface.
38
+ * Cursor is a VS Code fork with built-in AI capabilities.
39
+ * This adapter detects Cursor via `cursor --version` and provides
40
+ * workboard read/write when REVEALUI_WORKBOARD_PATH is set.
161
41
  */
162
- declare class CopilotAdapter implements HarnessAdapter {
163
- readonly id = "copilot";
164
- readonly name = "GitHub Copilot";
42
+ declare class CursorAdapter implements HarnessAdapter {
43
+ readonly id = "cursor";
44
+ readonly name = "Cursor";
165
45
  private readonly eventHandlers;
46
+ private readonly workboardPath;
47
+ constructor(workboardPath?: string);
166
48
  getCapabilities(): HarnessCapabilities;
167
49
  getInfo(): Promise<HarnessInfo>;
168
50
  isAvailable(): Promise<boolean>;
51
+ notifyRegistered(): void;
52
+ notifyUnregistering(): void;
169
53
  execute(command: HarnessCommand): Promise<HarnessCommandResult>;
54
+ private executeInner;
170
55
  onEvent(handler: (event: HarnessEvent) => void): () => void;
171
56
  dispose(): Promise<void>;
57
+ private emit;
172
58
  }
173
59
 
174
60
  /**
175
- * Syncs harness config between local filesystem and SSD backup.
61
+ * Syncs harness config between local filesystem and root backup.
176
62
  * Mirrors config-sync.ts from packages/editors.
177
63
  */
178
- declare function syncConfig(harnessId: string, direction: ConfigSyncDirection, ssdBase?: string): ConfigSyncResult;
179
- /** Compares local vs SSD config for a harness. */
180
- declare function diffConfig(harnessId: string, ssdBase?: string): ConfigDiffEntry;
64
+ declare function syncConfig(harnessId: string, direction: ConfigSyncDirection, root?: string): ConfigSyncResult;
65
+ /** Compares local vs root config for a harness. */
66
+ declare function diffConfig(harnessId: string, root?: string): ConfigDiffEntry;
67
+ /**
68
+ * Sync all known harness configs in a given direction.
69
+ * Returns results for each harness.
70
+ */
71
+ declare function syncAllConfigs(direction: ConfigSyncDirection, root?: string): ConfigSyncResult[];
72
+ /**
73
+ * Diff all known harness configs.
74
+ * Returns diff entries for each harness.
75
+ */
76
+ declare function diffAllConfigs(root?: string): ConfigDiffEntry[];
77
+ /**
78
+ * Validate that a config file contains parseable JSON.
79
+ * Returns null if valid, or an error message if invalid.
80
+ */
81
+ declare function validateConfigJson(harnessId: string): string | null;
181
82
 
182
83
  /** Returns the local config file path for a given harness id, or undefined if unknown. */
183
84
  declare function getLocalConfigPath(harnessId: string): string | undefined;
184
- /** Returns the SSD config file path for a given harness id, or undefined if unknown. */
185
- declare function getSsdConfigPath(harnessId: string, ssdBase?: string): string | undefined;
85
+ /** Returns the root config file path for a given harness id, or undefined if unknown. */
86
+ declare function getRootConfigPath(harnessId: string, root?: string): string | undefined;
186
87
  /** Returns ids of all harnesses with known config paths. */
187
88
  declare function getConfigurableHarnesses(): string[];
188
89
 
@@ -242,6 +143,8 @@ declare class HarnessCoordinator {
242
143
  getWorkboard(): WorkboardManager;
243
144
  /** Register a custom adapter (must be called before start()). */
244
145
  registerAdapter(adapter: HarnessAdapter): void;
146
+ /** Run a health check across all registered harnesses and the workboard. */
147
+ healthCheck(): Promise<HealthCheckResult>;
245
148
  }
246
149
 
247
150
  /**
@@ -276,14 +179,18 @@ declare function findClaudeCodeSockets(): Promise<string[]>;
276
179
  * harness.listRunning → HarnessProcessInfo[]
277
180
  * harness.syncConfig → ConfigSyncResult
278
181
  * harness.diffConfig → ConfigDiffEntry
182
+ * harness.health → HealthCheckResult
279
183
  */
280
184
  declare class RpcServer {
281
185
  private readonly registry;
282
186
  private readonly socketPath;
283
187
  private server;
188
+ private healthCheckFn;
284
189
  constructor(registry: HarnessRegistry, socketPath: string);
285
190
  private handleLine;
286
191
  private dispatch;
192
+ /** Set the health check function (called by coordinator after construction). */
193
+ setHealthCheck(fn: () => Promise<unknown>): void;
287
194
  start(): Promise<void>;
288
195
  stop(): Promise<void>;
289
196
  }
@@ -292,14 +199,14 @@ declare class RpcServer {
292
199
  * @revealui/harnesses — AI Harness Integration System (Server-side)
293
200
  *
294
201
  * Adapters, registry, workboard coordination, and JSON-RPC server for
295
- * integrating AI coding tools (Claude Code, Cursor, Copilot) into the
202
+ * integrating AI coding tools (Claude Code, Cursor) into the
296
203
  * RevealUI development workflow.
297
204
  *
298
- * Pro tier feature: gated behind isFeatureEnabled("harnesses").
205
+ * Pro tier feature: gated behind isFeatureEnabled("ai").
299
206
  *
300
207
  * @packageDocumentation
301
208
  */
302
209
  /** Check whether the harnesses feature is licensed for this installation. */
303
210
  declare function checkHarnessesLicense(): Promise<boolean>;
304
211
 
305
- export { ClaudeCodeAdapter, type ConfigDiffEntry, type ConfigSyncDirection, type ConfigSyncResult, type CoordinatorOptions, CopilotAdapter, type HarnessAdapter, type HarnessCapabilities, type HarnessCommand, type HarnessCommandResult, HarnessCoordinator, type HarnessEvent, type HarnessInfo, type HarnessProcessInfo, HarnessRegistry, RpcServer, WorkboardManager, autoDetectHarnesses, checkHarnessesLicense, diffConfig, findAllHarnessProcesses, findClaudeCodeSockets, findHarnessProcesses, findProcesses, getConfigurableHarnesses, getLocalConfigPath, getSsdConfigPath, syncConfig };
212
+ export { ClaudeCodeAdapter, ConfigDiffEntry, ConfigSyncDirection, ConfigSyncResult, type CoordinatorOptions, CursorAdapter, HarnessAdapter, HarnessCapabilities, HarnessCommand, HarnessCommandResult, HarnessCoordinator, HarnessEvent, HarnessInfo, HarnessProcessInfo, HarnessRegistry, HealthCheckResult, RpcServer, WorkboardManager, autoDetectHarnesses, checkHarnessesLicense, diffAllConfigs, diffConfig, findAllHarnessProcesses, findClaudeCodeSockets, findHarnessProcesses, findProcesses, getConfigurableHarnesses, getLocalConfigPath, getRootConfigPath, syncAllConfigs, syncConfig, validateConfigJson };
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  ClaudeCodeAdapter,
3
- CopilotAdapter,
3
+ CursorAdapter,
4
4
  HarnessCoordinator,
5
5
  HarnessRegistry,
6
6
  RpcServer,
7
7
  autoDetectHarnesses,
8
+ checkHarnessesLicense,
9
+ diffAllConfigs,
8
10
  diffConfig,
9
11
  findAllHarnessProcesses,
10
12
  findClaudeCodeSockets,
@@ -12,50 +14,63 @@ import {
12
14
  findProcesses,
13
15
  getConfigurableHarnesses,
14
16
  getLocalConfigPath,
15
- getSsdConfigPath,
16
- syncConfig
17
- } from "./chunk-BDA7D725.js";
18
- import "./chunk-JUNNIQS3.js";
17
+ getRootConfigPath,
18
+ syncAllConfigs,
19
+ syncConfig,
20
+ validateConfigJson
21
+ } from "./chunk-HH2PJYQN.js";
22
+ import {
23
+ buildManifest,
24
+ diffContent,
25
+ generateContent,
26
+ listContent,
27
+ validateManifest
28
+ } from "./chunk-JDI6B2IB.js";
19
29
  import {
20
30
  WorkboardManager,
31
+ acquireLock,
32
+ atomicWriteSync,
21
33
  deriveSessionId,
22
- detectSessionType
23
- } from "./chunk-PG4RAOWS.js";
24
-
25
- // src/index.ts
26
- import { isFeatureEnabled } from "@revealui/core/features";
27
- import { initializeLicense } from "@revealui/core/license";
28
- import { logger } from "@revealui/core/observability/logger";
29
- async function checkHarnessesLicense() {
30
- await initializeLicense();
31
- if (!isFeatureEnabled("harnesses")) {
32
- logger.warn(
33
- "[@revealui/harnesses] AI harness integration requires a Pro or Enterprise license. Visit https://revealui.com/pricing for details.",
34
- { feature: "harnesses" }
35
- );
36
- return false;
37
- }
38
- return true;
39
- }
34
+ detectSessionType,
35
+ lockPathFor,
36
+ releaseLock,
37
+ withLock,
38
+ withLockAsync
39
+ } from "./chunk-FJGN6DTH.js";
40
+ import "./chunk-DGUM43GV.js";
40
41
  export {
41
42
  ClaudeCodeAdapter,
42
- CopilotAdapter,
43
+ CursorAdapter,
43
44
  HarnessCoordinator,
44
45
  HarnessRegistry,
45
46
  RpcServer,
46
47
  WorkboardManager,
48
+ acquireLock,
49
+ atomicWriteSync,
47
50
  autoDetectHarnesses,
51
+ buildManifest,
48
52
  checkHarnessesLicense,
49
53
  deriveSessionId,
50
54
  detectSessionType,
55
+ diffAllConfigs,
51
56
  diffConfig,
57
+ diffContent,
52
58
  findAllHarnessProcesses,
53
59
  findClaudeCodeSockets,
54
60
  findHarnessProcesses,
55
61
  findProcesses,
62
+ generateContent,
56
63
  getConfigurableHarnesses,
57
64
  getLocalConfigPath,
58
- getSsdConfigPath,
59
- syncConfig
65
+ getRootConfigPath,
66
+ listContent,
67
+ lockPathFor,
68
+ releaseLock,
69
+ syncAllConfigs,
70
+ syncConfig,
71
+ validateConfigJson,
72
+ validateManifest,
73
+ withLock,
74
+ withLockAsync
60
75
  };
61
76
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @revealui/harnesses — AI Harness Integration System (Server-side)\n *\n * Adapters, registry, workboard coordination, and JSON-RPC server for\n * integrating AI coding tools (Claude Code, Cursor, Copilot) into the\n * RevealUI development workflow.\n *\n * Pro tier feature: gated behind isFeatureEnabled(\"harnesses\").\n *\n * @packageDocumentation\n */\n\nimport { isFeatureEnabled } from '@revealui/core/features'\nimport { initializeLicense } from '@revealui/core/license'\nimport { logger } from '@revealui/core/observability/logger'\n\n/** Check whether the harnesses feature is licensed for this installation. */\nexport async function checkHarnessesLicense(): Promise<boolean> {\n await initializeLicense()\n if (!isFeatureEnabled('harnesses')) {\n logger.warn(\n '[@revealui/harnesses] AI harness integration requires a Pro or Enterprise license. ' +\n 'Visit https://revealui.com/pricing for details.',\n { feature: 'harnesses' },\n )\n return false\n }\n return true\n}\n\n// Adapters\nexport { ClaudeCodeAdapter } from './adapters/claude-code-adapter.js'\nexport { CopilotAdapter } from './adapters/copilot-adapter.js'\n\n// Config\nexport { diffConfig, syncConfig } from './config/config-sync.js'\nexport {\n getConfigurableHarnesses,\n getLocalConfigPath,\n getSsdConfigPath,\n} from './config/harness-config-paths.js'\nexport type { CoordinatorOptions } from './coordinator.js'\n// Coordinator\nexport { HarnessCoordinator } from './coordinator.js'\n\n// Detection\nexport { autoDetectHarnesses } from './detection/auto-detector.js'\nexport {\n findAllHarnessProcesses,\n findClaudeCodeSockets,\n findHarnessProcesses,\n findProcesses,\n} from './detection/process-detector.js'\n\n// Registry\nexport { HarnessRegistry } from './registry/harness-registry.js'\n\n// Server\nexport { RpcServer } from './server/rpc-server.js'\nexport type { HarnessAdapter } from './types/adapter.js'\n\n// Types — harness core\nexport type {\n ConfigDiffEntry,\n ConfigSyncDirection,\n ConfigSyncResult,\n HarnessCapabilities,\n HarnessCommand,\n HarnessCommandResult,\n HarnessEvent,\n HarnessInfo,\n HarnessProcessInfo,\n} from './types/core.js'\n// Workboard\nexport {\n deriveSessionId,\n detectSessionType,\n WorkboardManager,\n} from './workboard/index.js'\n// Types — session identity\nexport type { SessionType } from './workboard/session-identity.js'\n// Types — workboard protocol\nexport type {\n ConflictResult,\n WorkboardEntry,\n WorkboardSession,\n WorkboardState,\n} from './workboard/workboard-protocol.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,cAAc;AAGvB,eAAsB,wBAA0C;AAC9D,QAAM,kBAAkB;AACxB,MAAI,CAAC,iBAAiB,WAAW,GAAG;AAClC,WAAO;AAAA,MACL;AAAA,MAEA,EAAE,SAAS,YAAY;AAAA,IACzB;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}