@actant/shared 0.1.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/index.d.ts +1096 -0
- package/dist/index.js +247 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/types/rpc.types.ts
|
|
9
|
+
var RPC_ERROR_CODES = {
|
|
10
|
+
PARSE_ERROR: -32700,
|
|
11
|
+
INVALID_REQUEST: -32600,
|
|
12
|
+
METHOD_NOT_FOUND: -32601,
|
|
13
|
+
INVALID_PARAMS: -32602,
|
|
14
|
+
INTERNAL_ERROR: -32603,
|
|
15
|
+
TEMPLATE_NOT_FOUND: -32001,
|
|
16
|
+
CONFIG_VALIDATION: -32002,
|
|
17
|
+
AGENT_NOT_FOUND: -32003,
|
|
18
|
+
AGENT_ALREADY_RUNNING: -32004,
|
|
19
|
+
WORKSPACE_INIT: -32005,
|
|
20
|
+
COMPONENT_REFERENCE: -32006,
|
|
21
|
+
INSTANCE_CORRUPTED: -32007,
|
|
22
|
+
AGENT_LAUNCH: -32008,
|
|
23
|
+
AGENT_ALREADY_ATTACHED: -32009,
|
|
24
|
+
AGENT_NOT_ATTACHED: -32010,
|
|
25
|
+
GENERIC_BUSINESS: -32e3
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// src/errors/base-error.ts
|
|
29
|
+
var ActantError = class extends Error {
|
|
30
|
+
timestamp;
|
|
31
|
+
context;
|
|
32
|
+
constructor(message, context) {
|
|
33
|
+
super(message);
|
|
34
|
+
this.name = this.constructor.name;
|
|
35
|
+
this.timestamp = /* @__PURE__ */ new Date();
|
|
36
|
+
this.context = context;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/errors/config-errors.ts
|
|
41
|
+
var ConfigNotFoundError = class extends ActantError {
|
|
42
|
+
code = "CONFIG_NOT_FOUND";
|
|
43
|
+
category = "configuration";
|
|
44
|
+
constructor(configPath) {
|
|
45
|
+
super(`Configuration file not found: ${configPath}`, { configPath });
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var ConfigValidationError = class extends ActantError {
|
|
49
|
+
constructor(message, validationErrors, issues) {
|
|
50
|
+
super(message, { validationErrors });
|
|
51
|
+
this.validationErrors = validationErrors;
|
|
52
|
+
this.issues = issues;
|
|
53
|
+
}
|
|
54
|
+
code = "CONFIG_VALIDATION_ERROR";
|
|
55
|
+
category = "configuration";
|
|
56
|
+
};
|
|
57
|
+
var TemplateNotFoundError = class extends ActantError {
|
|
58
|
+
code = "TEMPLATE_NOT_FOUND";
|
|
59
|
+
category = "configuration";
|
|
60
|
+
constructor(templateName) {
|
|
61
|
+
super(`Template "${templateName}" not found in registry`, {
|
|
62
|
+
templateName
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var SkillReferenceError = class extends ActantError {
|
|
67
|
+
code = "SKILL_REFERENCE_ERROR";
|
|
68
|
+
category = "configuration";
|
|
69
|
+
constructor(skillName) {
|
|
70
|
+
super(`Skill "${skillName}" not found in registry`, { skillName });
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
var ComponentReferenceError = class extends ActantError {
|
|
74
|
+
code = "COMPONENT_REFERENCE_ERROR";
|
|
75
|
+
category = "configuration";
|
|
76
|
+
constructor(componentType, componentName) {
|
|
77
|
+
super(`${componentType} "${componentName}" not found in registry`, {
|
|
78
|
+
componentType,
|
|
79
|
+
componentName
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
var CircularReferenceError = class extends ActantError {
|
|
84
|
+
code = "CIRCULAR_REFERENCE";
|
|
85
|
+
category = "configuration";
|
|
86
|
+
constructor(cyclePath) {
|
|
87
|
+
super(`Circular reference detected: ${cyclePath.join(" \u2192 ")}`, {
|
|
88
|
+
cyclePath
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// src/errors/lifecycle-errors.ts
|
|
94
|
+
var AgentLaunchError = class extends ActantError {
|
|
95
|
+
code = "AGENT_LAUNCH_ERROR";
|
|
96
|
+
category = "lifecycle";
|
|
97
|
+
constructor(instanceName, cause) {
|
|
98
|
+
super(`Failed to launch agent "${instanceName}"`, {
|
|
99
|
+
instanceName,
|
|
100
|
+
cause: cause?.message
|
|
101
|
+
});
|
|
102
|
+
if (cause) this.cause = cause;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var AgentNotFoundError = class extends ActantError {
|
|
106
|
+
code = "AGENT_NOT_FOUND";
|
|
107
|
+
category = "lifecycle";
|
|
108
|
+
constructor(instanceName) {
|
|
109
|
+
super(`Agent instance "${instanceName}" not found`, { instanceName });
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var AgentAlreadyRunningError = class extends ActantError {
|
|
113
|
+
code = "AGENT_ALREADY_RUNNING";
|
|
114
|
+
category = "lifecycle";
|
|
115
|
+
constructor(instanceName) {
|
|
116
|
+
super(`Agent "${instanceName}" is already running`, { instanceName });
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var AgentAlreadyAttachedError = class extends ActantError {
|
|
120
|
+
code = "AGENT_ALREADY_ATTACHED";
|
|
121
|
+
category = "lifecycle";
|
|
122
|
+
constructor(instanceName) {
|
|
123
|
+
super(`Agent "${instanceName}" already has an attached process`, { instanceName });
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var AgentNotAttachedError = class extends ActantError {
|
|
127
|
+
code = "AGENT_NOT_ATTACHED";
|
|
128
|
+
category = "lifecycle";
|
|
129
|
+
constructor(instanceName) {
|
|
130
|
+
super(`Agent "${instanceName}" has no attached process`, { instanceName });
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var InstanceCorruptedError = class extends ActantError {
|
|
134
|
+
code = "INSTANCE_CORRUPTED";
|
|
135
|
+
category = "lifecycle";
|
|
136
|
+
constructor(instanceName, reason) {
|
|
137
|
+
super(
|
|
138
|
+
`Agent instance "${instanceName}" is corrupted: ${reason}`,
|
|
139
|
+
{ instanceName, reason }
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
var WorkspaceInitError = class extends ActantError {
|
|
144
|
+
code = "WORKSPACE_INIT_ERROR";
|
|
145
|
+
category = "lifecycle";
|
|
146
|
+
constructor(workspacePath, cause) {
|
|
147
|
+
super(`Failed to initialize workspace at "${workspacePath}"`, {
|
|
148
|
+
workspacePath,
|
|
149
|
+
cause: cause?.message
|
|
150
|
+
});
|
|
151
|
+
if (cause) this.cause = cause;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// src/logger/logger.ts
|
|
156
|
+
import pino from "pino";
|
|
157
|
+
function resolveLogLevel() {
|
|
158
|
+
if (process.env["LOG_LEVEL"]) return process.env["LOG_LEVEL"];
|
|
159
|
+
if (process.env["VITEST"] || process.env["NODE_ENV"] === "test") return "silent";
|
|
160
|
+
return "info";
|
|
161
|
+
}
|
|
162
|
+
function createLogger(module) {
|
|
163
|
+
return pino({
|
|
164
|
+
name: module,
|
|
165
|
+
level: resolveLogLevel(),
|
|
166
|
+
formatters: {
|
|
167
|
+
level(label) {
|
|
168
|
+
return { level: label };
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
timestamp: pino.stdTimeFunctions.isoTime
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// src/platform/platform.ts
|
|
176
|
+
import { join } from "path";
|
|
177
|
+
import { homedir } from "os";
|
|
178
|
+
var IS_WINDOWS = process.platform === "win32";
|
|
179
|
+
function getDefaultIpcPath(homeDir) {
|
|
180
|
+
if (IS_WINDOWS) {
|
|
181
|
+
return "\\\\.\\pipe\\actant";
|
|
182
|
+
}
|
|
183
|
+
const base = homeDir ?? join(homedir(), ".actant");
|
|
184
|
+
return join(base, "actant.sock");
|
|
185
|
+
}
|
|
186
|
+
function getIpcPath(homeDir) {
|
|
187
|
+
if (IS_WINDOWS) {
|
|
188
|
+
const safeName = homeDir.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
189
|
+
return `\\\\.\\pipe\\actant-${safeName}`;
|
|
190
|
+
}
|
|
191
|
+
return join(homeDir, "actant.sock");
|
|
192
|
+
}
|
|
193
|
+
function ipcRequiresFileCleanup() {
|
|
194
|
+
return !IS_WINDOWS;
|
|
195
|
+
}
|
|
196
|
+
function onShutdownSignal(handler) {
|
|
197
|
+
const wrappedHandler = () => {
|
|
198
|
+
void Promise.resolve(handler());
|
|
199
|
+
};
|
|
200
|
+
process.on("SIGINT", wrappedHandler);
|
|
201
|
+
if (IS_WINDOWS) {
|
|
202
|
+
process.on("SIGBREAK", wrappedHandler);
|
|
203
|
+
} else {
|
|
204
|
+
process.on("SIGTERM", wrappedHandler);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function isWindows() {
|
|
208
|
+
return IS_WINDOWS;
|
|
209
|
+
}
|
|
210
|
+
var _isSea = false;
|
|
211
|
+
var _isSeaChecked = false;
|
|
212
|
+
function isSingleExecutable() {
|
|
213
|
+
if (_isSeaChecked) return _isSea;
|
|
214
|
+
_isSeaChecked = true;
|
|
215
|
+
try {
|
|
216
|
+
const sea = __require("sea");
|
|
217
|
+
_isSea = typeof sea.isSea === "function" ? sea.isSea() : false;
|
|
218
|
+
} catch {
|
|
219
|
+
_isSea = false;
|
|
220
|
+
}
|
|
221
|
+
return _isSea;
|
|
222
|
+
}
|
|
223
|
+
export {
|
|
224
|
+
ActantError,
|
|
225
|
+
AgentAlreadyAttachedError,
|
|
226
|
+
AgentAlreadyRunningError,
|
|
227
|
+
AgentLaunchError,
|
|
228
|
+
AgentNotAttachedError,
|
|
229
|
+
AgentNotFoundError,
|
|
230
|
+
CircularReferenceError,
|
|
231
|
+
ComponentReferenceError,
|
|
232
|
+
ConfigNotFoundError,
|
|
233
|
+
ConfigValidationError,
|
|
234
|
+
InstanceCorruptedError,
|
|
235
|
+
RPC_ERROR_CODES,
|
|
236
|
+
SkillReferenceError,
|
|
237
|
+
TemplateNotFoundError,
|
|
238
|
+
WorkspaceInitError,
|
|
239
|
+
createLogger,
|
|
240
|
+
getDefaultIpcPath,
|
|
241
|
+
getIpcPath,
|
|
242
|
+
ipcRequiresFileCleanup,
|
|
243
|
+
isSingleExecutable,
|
|
244
|
+
isWindows,
|
|
245
|
+
onShutdownSignal
|
|
246
|
+
};
|
|
247
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/rpc.types.ts","../src/errors/base-error.ts","../src/errors/config-errors.ts","../src/errors/lifecycle-errors.ts","../src/logger/logger.ts","../src/platform/platform.ts"],"sourcesContent":["import type { AgentTemplate, PermissionsInput, PermissionsConfig } from \"./template.types\";\nimport type { AgentInstanceMeta, LaunchMode, WorkspacePolicy, ResolveResult, DetachResult } from \"./agent.types\";\nimport type { SkillDefinition, PromptDefinition, McpServerDefinition, WorkflowDefinition, PluginDefinition } from \"./domain-component.types\";\nimport type { SourceEntry, SourceConfig, PresetDefinition } from \"./source.types\";\n\n// ---------------------------------------------------------------------------\n// JSON-RPC 2.0 base types\n// ---------------------------------------------------------------------------\n\nexport interface RpcRequest {\n jsonrpc: \"2.0\";\n id: number | string;\n method: string;\n params?: Record<string, unknown>;\n}\n\nexport interface RpcResponse {\n jsonrpc: \"2.0\";\n id: number | string;\n result?: unknown;\n error?: RpcError;\n}\n\nexport interface RpcError {\n code: number;\n message: string;\n data?: unknown;\n}\n\n// ---------------------------------------------------------------------------\n// Error codes — maps ActantError codes to JSON-RPC error codes\n// ---------------------------------------------------------------------------\n\nexport const RPC_ERROR_CODES = {\n PARSE_ERROR: -32700,\n INVALID_REQUEST: -32600,\n METHOD_NOT_FOUND: -32601,\n INVALID_PARAMS: -32602,\n INTERNAL_ERROR: -32603,\n\n TEMPLATE_NOT_FOUND: -32001,\n CONFIG_VALIDATION: -32002,\n AGENT_NOT_FOUND: -32003,\n AGENT_ALREADY_RUNNING: -32004,\n WORKSPACE_INIT: -32005,\n COMPONENT_REFERENCE: -32006,\n INSTANCE_CORRUPTED: -32007,\n AGENT_LAUNCH: -32008,\n AGENT_ALREADY_ATTACHED: -32009,\n AGENT_NOT_ATTACHED: -32010,\n GENERIC_BUSINESS: -32000,\n} as const;\n\nexport type RpcErrorCode = (typeof RPC_ERROR_CODES)[keyof typeof RPC_ERROR_CODES];\n\n// ---------------------------------------------------------------------------\n// Method-specific param/result types\n// ---------------------------------------------------------------------------\n\n// template.*\n\nexport type TemplateListParams = Record<string, never>;\n\nexport type TemplateListResult = AgentTemplate[];\n\nexport interface TemplateGetParams {\n name: string;\n}\n\nexport type TemplateGetResult = AgentTemplate;\n\nexport interface TemplateLoadParams {\n filePath: string;\n}\n\nexport type TemplateLoadResult = AgentTemplate;\n\nexport interface TemplateUnloadParams {\n name: string;\n}\n\nexport interface TemplateUnloadResult {\n success: boolean;\n}\n\nexport interface TemplateValidateParams {\n filePath: string;\n}\n\nexport interface TemplateValidateResult {\n valid: boolean;\n template?: AgentTemplate;\n errors?: Array<{ path: string; message: string }>;\n /** Warnings that don't prevent loading but indicate potential issues (#119) */\n warnings?: Array<{ path: string; message: string }>;\n}\n\n// agent.*\n\nexport type WorkDirConflict = \"error\" | \"overwrite\" | \"append\";\n\nexport interface AgentCreateParams {\n name: string;\n template: string;\n overrides?: {\n launchMode?: LaunchMode;\n workspacePolicy?: WorkspacePolicy;\n /** Absolute path to use as workspace directory instead of the default {instancesDir}/{name}. */\n workDir?: string;\n /** Behavior when workDir already exists. Default: \"error\". */\n workDirConflict?: WorkDirConflict;\n /** Override template permissions. Completely replaces template.permissions when set. */\n permissions?: PermissionsInput;\n metadata?: Record<string, string>;\n };\n}\n\nexport type AgentCreateResult = AgentInstanceMeta;\n\nexport interface AgentStartParams {\n name: string;\n}\n\nexport type AgentStartResult = AgentInstanceMeta;\n\nexport interface AgentStopParams {\n name: string;\n}\n\nexport type AgentStopResult = AgentInstanceMeta;\n\nexport interface AgentDestroyParams {\n name: string;\n}\n\nexport interface AgentDestroyResult {\n success: boolean;\n}\n\nexport interface AgentStatusParams {\n name: string;\n}\n\nexport type AgentStatusResult = AgentInstanceMeta;\n\nexport type AgentListParams = Record<string, never>;\n\nexport type AgentListResult = AgentInstanceMeta[];\n\nexport interface AgentUpdatePermissionsParams {\n name: string;\n permissions: PermissionsInput;\n}\n\nexport interface AgentUpdatePermissionsResult {\n effectivePermissions: PermissionsConfig;\n}\n\nexport interface AgentAdoptParams {\n path: string;\n rename?: string;\n}\n\nexport interface AgentAdoptResult {\n name: string;\n template: string;\n workspacePath: string;\n location: \"builtin\" | \"external\";\n createdAt: string;\n status: \"stopped\" | \"running\" | \"orphaned\";\n}\n\n// agent.resolve / agent.attach / agent.detach (external spawn)\n\nexport interface AgentResolveParams {\n name: string;\n template?: string;\n overrides?: {\n launchMode?: LaunchMode;\n workspacePolicy?: WorkspacePolicy;\n metadata?: Record<string, string>;\n };\n}\n\nexport type AgentResolveResult = ResolveResult;\n\nexport interface AgentAttachParams {\n name: string;\n pid: number;\n metadata?: Record<string, string>;\n}\n\nexport type AgentAttachResult = AgentInstanceMeta;\n\nexport interface AgentDetachParams {\n name: string;\n cleanup?: boolean;\n}\n\nexport type AgentDetachResult = DetachResult;\n\n// agent.run\n\nexport interface AgentRunParams {\n name: string;\n prompt: string;\n options?: {\n systemPromptFile?: string;\n appendSystemPrompt?: string;\n sessionId?: string;\n timeoutMs?: number;\n maxTurns?: number;\n model?: string;\n };\n}\n\nexport interface AgentRunResult {\n text: string;\n sessionId?: string;\n}\n\n// agent.dispatch\n\nexport interface AgentDispatchParams {\n name: string;\n prompt: string;\n priority?: string;\n}\nexport interface AgentDispatchResult {\n queued: boolean;\n}\n\n// agent.tasks\n\nexport interface AgentTasksParams {\n name: string;\n}\nexport interface AgentTasksResult {\n queued: number;\n processing: boolean;\n tasks: unknown[];\n}\n\n// agent.logs\n\nexport interface AgentLogsParams {\n name: string;\n limit?: number;\n}\nexport type AgentLogsResult = unknown[];\n\n// schedule.list\n\nexport interface ScheduleListParams {\n name: string;\n}\nexport interface ScheduleListResult {\n sources: Array<{ id: string; type: string; active: boolean }>;\n running: boolean;\n}\n\n// agent.prompt (ACP session)\n\nexport interface AgentPromptParams {\n name: string;\n message: string;\n sessionId?: string;\n}\n\nexport interface AgentPromptResult {\n response: string;\n sessionId: string;\n}\n\n// session.* (Session Lease mode)\n\nexport interface SessionCreateParams {\n agentName: string;\n clientId: string;\n idleTtlMs?: number;\n}\n\nexport interface SessionLeaseInfo {\n sessionId: string;\n agentName: string;\n clientId: string | null;\n state: \"active\" | \"idle\" | \"expired\";\n createdAt: string;\n lastActivityAt: string;\n idleTtlMs: number;\n}\n\nexport type SessionCreateResult = SessionLeaseInfo;\n\nexport interface SessionPromptParams {\n sessionId: string;\n text: string;\n}\n\nexport interface SessionPromptResult {\n stopReason: string;\n text: string;\n}\n\nexport interface SessionCancelParams {\n sessionId: string;\n}\n\nexport interface SessionCancelResult {\n ok: boolean;\n}\n\nexport interface SessionCloseParams {\n sessionId: string;\n}\n\nexport interface SessionCloseResult {\n ok: boolean;\n}\n\nexport interface SessionListParams {\n agentName?: string;\n}\n\nexport type SessionListResult = SessionLeaseInfo[];\n\n// proxy.* (legacy)\n\nexport interface ProxyConnectParams {\n agentName: string;\n envPassthrough?: boolean;\n}\n\nexport interface ProxySession {\n sessionId: string;\n agentName: string;\n envPassthrough: boolean;\n connectedAt: string;\n}\n\nexport type ProxyConnectResult = ProxySession;\n\nexport interface ProxyDisconnectParams {\n sessionId: string;\n}\n\nexport interface ProxyDisconnectResult {\n ok: boolean;\n}\n\nexport interface ProxyForwardParams {\n sessionId: string;\n acpMessage: Record<string, unknown>;\n}\n\nexport type ProxyForwardResult = Record<string, unknown>;\n\n// skill.*\n\nexport type SkillListParams = Record<string, never>;\nexport type SkillListResult = SkillDefinition[];\n\nexport interface SkillGetParams {\n name: string;\n}\nexport type SkillGetResult = SkillDefinition;\n\n// prompt.*\n\nexport type PromptListParams = Record<string, never>;\nexport type PromptListResult = PromptDefinition[];\n\nexport interface PromptGetParams {\n name: string;\n}\nexport type PromptGetResult = PromptDefinition;\n\n// mcp.*\n\nexport type McpListParams = Record<string, never>;\nexport type McpListResult = McpServerDefinition[];\n\nexport interface McpGetParams {\n name: string;\n}\nexport type McpGetResult = McpServerDefinition;\n\n// workflow.*\n\nexport type WorkflowListParams = Record<string, never>;\nexport type WorkflowListResult = WorkflowDefinition[];\n\nexport interface WorkflowGetParams {\n name: string;\n}\nexport type WorkflowGetResult = WorkflowDefinition;\n\n// plugin.*\n\nexport type PluginListParams = Record<string, never>;\nexport type PluginListResult = PluginDefinition[];\n\nexport interface PluginGetParams {\n name: string;\n}\nexport type PluginGetResult = PluginDefinition;\n\n// daemon.*\n\nexport type DaemonPingParams = Record<string, never>;\n\nexport interface DaemonPingResult {\n version: string;\n uptime: number;\n agents: number;\n}\n\nexport type DaemonShutdownParams = Record<string, never>;\n\nexport interface DaemonShutdownResult {\n success: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Gateway lease — request an ACP Gateway socket for Session Lease\n// ---------------------------------------------------------------------------\n\nexport interface GatewayLeaseParams {\n agentName: string;\n}\n\nexport interface GatewayLeaseResult {\n socketPath: string;\n}\n\nexport interface ComponentAddParams {\n component: Record<string, unknown>;\n}\n\nexport interface ComponentAddResult {\n name: string;\n}\n\nexport interface ComponentUpdateParams {\n name: string;\n patch: Record<string, unknown>;\n}\n\nexport interface ComponentUpdateResult {\n name: string;\n}\n\nexport interface ComponentRemoveParams {\n name: string;\n}\n\nexport interface ComponentRemoveResult {\n success: boolean;\n}\n\nexport interface ComponentImportParams {\n filePath: string;\n}\n\nexport interface ComponentImportResult {\n name: string;\n}\n\nexport interface ComponentExportParams {\n name: string;\n filePath: string;\n}\n\nexport interface ComponentExportResult {\n success: boolean;\n}\n\nexport type SourceListParams = Record<string, never>;\nexport type SourceListResult = SourceEntry[];\n\nexport interface SourceAddParams {\n name: string;\n config: SourceConfig;\n}\n\nexport interface SourceAddResult {\n name: string;\n components: { skills: number; prompts: number; mcp: number; workflows: number; presets: number };\n}\n\nexport interface SourceRemoveParams {\n name: string;\n}\n\nexport interface SourceRemoveResult {\n success: boolean;\n}\n\nexport interface SourceSyncParams {\n name?: string;\n}\n\nexport interface SourceSyncResult {\n synced: string[];\n /** Sync report summary (aggregated when syncing multiple sources). */\n report?: {\n addedCount: number;\n updatedCount: number;\n removedCount: number;\n hasBreakingChanges: boolean;\n };\n}\n\nexport interface PresetListParams {\n packageName?: string;\n}\n\nexport type PresetListResult = PresetDefinition[];\n\nexport interface PresetShowParams {\n qualifiedName: string;\n}\n\nexport type PresetShowResult = PresetDefinition;\n\nexport interface PresetApplyParams {\n qualifiedName: string;\n templateName: string;\n}\n\nexport type PresetApplyResult = AgentTemplate;\n\n// ---------------------------------------------------------------------------\n// Method registry type — maps method name to params/result for type safety\n// ---------------------------------------------------------------------------\n\nexport interface RpcMethodMap {\n \"template.list\": { params: TemplateListParams; result: TemplateListResult };\n \"template.get\": { params: TemplateGetParams; result: TemplateGetResult };\n \"template.load\": { params: TemplateLoadParams; result: TemplateLoadResult };\n \"template.unload\": { params: TemplateUnloadParams; result: TemplateUnloadResult };\n \"template.validate\": { params: TemplateValidateParams; result: TemplateValidateResult };\n \"agent.create\": { params: AgentCreateParams; result: AgentCreateResult };\n \"agent.start\": { params: AgentStartParams; result: AgentStartResult };\n \"agent.stop\": { params: AgentStopParams; result: AgentStopResult };\n \"agent.destroy\": { params: AgentDestroyParams; result: AgentDestroyResult };\n \"agent.status\": { params: AgentStatusParams; result: AgentStatusResult };\n \"agent.list\": { params: AgentListParams; result: AgentListResult };\n \"agent.updatePermissions\": { params: AgentUpdatePermissionsParams; result: AgentUpdatePermissionsResult };\n \"agent.adopt\": { params: AgentAdoptParams; result: AgentAdoptResult };\n \"agent.resolve\": { params: AgentResolveParams; result: AgentResolveResult };\n \"agent.attach\": { params: AgentAttachParams; result: AgentAttachResult };\n \"agent.detach\": { params: AgentDetachParams; result: AgentDetachResult };\n \"agent.run\": { params: AgentRunParams; result: AgentRunResult };\n \"agent.prompt\": { params: AgentPromptParams; result: AgentPromptResult };\n \"agent.dispatch\": { params: AgentDispatchParams; result: AgentDispatchResult };\n \"agent.tasks\": { params: AgentTasksParams; result: AgentTasksResult };\n \"agent.logs\": { params: AgentLogsParams; result: AgentLogsResult };\n \"schedule.list\": { params: ScheduleListParams; result: ScheduleListResult };\n \"session.create\": { params: SessionCreateParams; result: SessionCreateResult };\n \"session.prompt\": { params: SessionPromptParams; result: SessionPromptResult };\n \"session.cancel\": { params: SessionCancelParams; result: SessionCancelResult };\n \"session.close\": { params: SessionCloseParams; result: SessionCloseResult };\n \"session.list\": { params: SessionListParams; result: SessionListResult };\n \"proxy.connect\": { params: ProxyConnectParams; result: ProxyConnectResult };\n \"proxy.disconnect\": { params: ProxyDisconnectParams; result: ProxyDisconnectResult };\n \"proxy.forward\": { params: ProxyForwardParams; result: ProxyForwardResult };\n \"skill.list\": { params: SkillListParams; result: SkillListResult };\n \"skill.get\": { params: SkillGetParams; result: SkillGetResult };\n \"skill.add\": { params: ComponentAddParams; result: ComponentAddResult };\n \"skill.update\": { params: ComponentUpdateParams; result: ComponentUpdateResult };\n \"skill.remove\": { params: ComponentRemoveParams; result: ComponentRemoveResult };\n \"skill.import\": { params: ComponentImportParams; result: ComponentImportResult };\n \"skill.export\": { params: ComponentExportParams; result: ComponentExportResult };\n \"prompt.list\": { params: PromptListParams; result: PromptListResult };\n \"prompt.get\": { params: PromptGetParams; result: PromptGetResult };\n \"prompt.add\": { params: ComponentAddParams; result: ComponentAddResult };\n \"prompt.update\": { params: ComponentUpdateParams; result: ComponentUpdateResult };\n \"prompt.remove\": { params: ComponentRemoveParams; result: ComponentRemoveResult };\n \"prompt.import\": { params: ComponentImportParams; result: ComponentImportResult };\n \"prompt.export\": { params: ComponentExportParams; result: ComponentExportResult };\n \"mcp.list\": { params: McpListParams; result: McpListResult };\n \"mcp.get\": { params: McpGetParams; result: McpGetResult };\n \"mcp.add\": { params: ComponentAddParams; result: ComponentAddResult };\n \"mcp.update\": { params: ComponentUpdateParams; result: ComponentUpdateResult };\n \"mcp.remove\": { params: ComponentRemoveParams; result: ComponentRemoveResult };\n \"mcp.import\": { params: ComponentImportParams; result: ComponentImportResult };\n \"mcp.export\": { params: ComponentExportParams; result: ComponentExportResult };\n \"workflow.list\": { params: WorkflowListParams; result: WorkflowListResult };\n \"workflow.get\": { params: WorkflowGetParams; result: WorkflowGetResult };\n \"workflow.add\": { params: ComponentAddParams; result: ComponentAddResult };\n \"workflow.update\": { params: ComponentUpdateParams; result: ComponentUpdateResult };\n \"workflow.remove\": { params: ComponentRemoveParams; result: ComponentRemoveResult };\n \"workflow.import\": { params: ComponentImportParams; result: ComponentImportResult };\n \"workflow.export\": { params: ComponentExportParams; result: ComponentExportResult };\n \"plugin.list\": { params: PluginListParams; result: PluginListResult };\n \"plugin.get\": { params: PluginGetParams; result: PluginGetResult };\n \"plugin.add\": { params: ComponentAddParams; result: ComponentAddResult };\n \"plugin.update\": { params: ComponentUpdateParams; result: ComponentUpdateResult };\n \"plugin.remove\": { params: ComponentRemoveParams; result: ComponentRemoveResult };\n \"plugin.import\": { params: ComponentImportParams; result: ComponentImportResult };\n \"plugin.export\": { params: ComponentExportParams; result: ComponentExportResult };\n \"source.list\": { params: SourceListParams; result: SourceListResult };\n \"source.add\": { params: SourceAddParams; result: SourceAddResult };\n \"source.remove\": { params: SourceRemoveParams; result: SourceRemoveResult };\n \"source.sync\": { params: SourceSyncParams; result: SourceSyncResult };\n \"preset.list\": { params: PresetListParams; result: PresetListResult };\n \"preset.show\": { params: PresetShowParams; result: PresetShowResult };\n \"preset.apply\": { params: PresetApplyParams; result: PresetApplyResult };\n \"daemon.ping\": { params: DaemonPingParams; result: DaemonPingResult };\n \"daemon.shutdown\": { params: DaemonShutdownParams; result: DaemonShutdownResult };\n \"gateway.lease\": { params: GatewayLeaseParams; result: GatewayLeaseResult };\n}\n\nexport type RpcMethod = keyof RpcMethodMap;\n","export type ErrorCategory =\n | \"configuration\"\n | \"lifecycle\"\n | \"communication\"\n | \"cli\";\n\nexport abstract class ActantError extends Error {\n abstract readonly code: string;\n abstract readonly category: ErrorCategory;\n readonly timestamp: Date;\n readonly context?: Record<string, unknown>;\n\n constructor(message: string, context?: Record<string, unknown>) {\n super(message);\n this.name = this.constructor.name;\n this.timestamp = new Date();\n this.context = context;\n }\n}\n","import { ActantError, type ErrorCategory } from \"./base-error\";\nimport type { ValidationIssue } from \"../types/validation.types\";\n\nexport class ConfigNotFoundError extends ActantError {\n readonly code = \"CONFIG_NOT_FOUND\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(configPath: string) {\n super(`Configuration file not found: ${configPath}`, { configPath });\n }\n}\n\nexport class ConfigValidationError extends ActantError {\n readonly code = \"CONFIG_VALIDATION_ERROR\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(\n message: string,\n public readonly validationErrors: Array<{\n path: string;\n message: string;\n }>,\n /** Structured validation issues with severity (#119) */\n public readonly issues?: ValidationIssue[],\n ) {\n super(message, { validationErrors });\n }\n}\n\nexport class TemplateNotFoundError extends ActantError {\n readonly code = \"TEMPLATE_NOT_FOUND\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(templateName: string) {\n super(`Template \"${templateName}\" not found in registry`, {\n templateName,\n });\n }\n}\n\nexport class SkillReferenceError extends ActantError {\n readonly code = \"SKILL_REFERENCE_ERROR\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(skillName: string) {\n super(`Skill \"${skillName}\" not found in registry`, { skillName });\n }\n}\n\nexport class ComponentReferenceError extends ActantError {\n readonly code = \"COMPONENT_REFERENCE_ERROR\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(componentType: string, componentName: string) {\n super(`${componentType} \"${componentName}\" not found in registry`, {\n componentType,\n componentName,\n });\n }\n}\n\nexport class CircularReferenceError extends ActantError {\n readonly code = \"CIRCULAR_REFERENCE\";\n readonly category: ErrorCategory = \"configuration\";\n\n constructor(cyclePath: string[]) {\n super(`Circular reference detected: ${cyclePath.join(\" → \")}`, {\n cyclePath,\n });\n }\n}\n","import { ActantError, type ErrorCategory } from \"./base-error\";\n\nexport class AgentLaunchError extends ActantError {\n readonly code = \"AGENT_LAUNCH_ERROR\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string, cause?: Error) {\n super(`Failed to launch agent \"${instanceName}\"`, {\n instanceName,\n cause: cause?.message,\n });\n if (cause) this.cause = cause;\n }\n}\n\nexport class AgentNotFoundError extends ActantError {\n readonly code = \"AGENT_NOT_FOUND\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string) {\n super(`Agent instance \"${instanceName}\" not found`, { instanceName });\n }\n}\n\nexport class AgentAlreadyRunningError extends ActantError {\n readonly code = \"AGENT_ALREADY_RUNNING\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string) {\n super(`Agent \"${instanceName}\" is already running`, { instanceName });\n }\n}\n\nexport class AgentAlreadyAttachedError extends ActantError {\n readonly code = \"AGENT_ALREADY_ATTACHED\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string) {\n super(`Agent \"${instanceName}\" already has an attached process`, { instanceName });\n }\n}\n\nexport class AgentNotAttachedError extends ActantError {\n readonly code = \"AGENT_NOT_ATTACHED\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string) {\n super(`Agent \"${instanceName}\" has no attached process`, { instanceName });\n }\n}\n\nexport class InstanceCorruptedError extends ActantError {\n readonly code = \"INSTANCE_CORRUPTED\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(instanceName: string, reason: string) {\n super(\n `Agent instance \"${instanceName}\" is corrupted: ${reason}`,\n { instanceName, reason },\n );\n }\n}\n\nexport class WorkspaceInitError extends ActantError {\n readonly code = \"WORKSPACE_INIT_ERROR\";\n readonly category: ErrorCategory = \"lifecycle\";\n\n constructor(workspacePath: string, cause?: Error) {\n super(`Failed to initialize workspace at \"${workspacePath}\"`, {\n workspacePath,\n cause: cause?.message,\n });\n if (cause) this.cause = cause;\n }\n}\n","import pino from \"pino\";\n\nexport type Logger = pino.Logger;\n\nfunction resolveLogLevel(): string {\n if (process.env[\"LOG_LEVEL\"]) return process.env[\"LOG_LEVEL\"];\n if (process.env[\"VITEST\"] || process.env[\"NODE_ENV\"] === \"test\") return \"silent\";\n return \"info\";\n}\n\nexport function createLogger(module: string): Logger {\n return pino({\n name: module,\n level: resolveLogLevel(),\n formatters: {\n level(label: string) {\n return { level: label };\n },\n },\n timestamp: pino.stdTimeFunctions.isoTime,\n });\n}\n","import { join } from \"node:path\";\nimport { homedir } from \"node:os\";\n\nconst IS_WINDOWS = process.platform === \"win32\";\n\n/**\n * Returns the platform-appropriate IPC path for daemon communication.\n *\n * - macOS/Linux: Unix domain socket at `~/.actant/actant.sock`\n * - Windows: Named pipe at `\\\\.\\pipe\\actant`\n *\n * Named pipes are the standard Windows IPC mechanism and work with\n * Node.js `net.createServer` / `net.createConnection` transparently.\n */\nexport function getDefaultIpcPath(homeDir?: string): string {\n if (IS_WINDOWS) {\n return \"\\\\\\\\.\\\\pipe\\\\actant\";\n }\n const base = homeDir ?? join(homedir(), \".actant\");\n return join(base, \"actant.sock\");\n}\n\n/**\n * Returns the IPC path for a given home directory.\n * Used by AppContext when homeDir is explicitly provided.\n */\nexport function getIpcPath(homeDir: string): string {\n if (IS_WINDOWS) {\n const safeName = homeDir.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n return `\\\\\\\\.\\\\pipe\\\\actant-${safeName}`;\n }\n return join(homeDir, \"actant.sock\");\n}\n\n/**\n * Whether the current platform uses file-based IPC (Unix sockets)\n * that may need cleanup (unlink) before listening.\n */\nexport function ipcRequiresFileCleanup(): boolean {\n return !IS_WINDOWS;\n}\n\n/**\n * Registers graceful shutdown handlers that work across all platforms.\n *\n * - Unix: SIGINT, SIGTERM\n * - Windows: SIGINT (Ctrl+C in terminal), SIGBREAK (Ctrl+Break)\n *\n * SIGTERM is not reliably delivered on Windows, so we also listen for\n * SIGBREAK which is the closest equivalent.\n */\nexport function onShutdownSignal(handler: () => void | Promise<void>): void {\n const wrappedHandler = () => {\n void Promise.resolve(handler());\n };\n\n process.on(\"SIGINT\", wrappedHandler);\n\n if (IS_WINDOWS) {\n process.on(\"SIGBREAK\", wrappedHandler);\n } else {\n process.on(\"SIGTERM\", wrappedHandler);\n }\n}\n\nexport function isWindows(): boolean {\n return IS_WINDOWS;\n}\n\nlet _isSea = false;\nlet _isSeaChecked = false;\n\n/**\n * Detects if the process is running as a Node.js Single Executable Application.\n * Uses `node:sea` module (Node 20+) with a fallback heuristic.\n */\nexport function isSingleExecutable(): boolean {\n if (_isSeaChecked) return _isSea;\n _isSeaChecked = true;\n try {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const sea = require(\"node:sea\");\n _isSea = typeof sea.isSea === \"function\" ? sea.isSea() : false;\n } catch {\n _isSea = false;\n }\n return _isSea;\n}\n"],"mappings":";;;;;;;;AAiCO,IAAM,kBAAkB;AAAA,EAC7B,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAEhB,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,c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;AAEnC,MAAI,YAAY;AACd,YAAQ,GAAG,YAAY,cAAc;AAAA,EACvC,OAAO;AACL,YAAQ,GAAG,WAAW,cAAc;AAAA,EACtC;AACF;AAEO,SAAS,YAAqB;AACnC,SAAO;AACT;AAEA,IAAI,SAAS;AACb,IAAI,gBAAgB;AAMb,SAAS,qBAA8B;AAC5C,MAAI,cAAe,QAAO;AAC1B,kBAAgB;AAChB,MAAI;AAEF,UAAM,MAAM,UAAQ,KAAU;AAC9B,aAAS,OAAO,IAAI,UAAU,aAAa,IAAI,MAAM,IAAI;AAAA,EAC3D,QAAQ;AACN,aAAS;AAAA,EACX;AACA,SAAO;AACT;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@actant/shared",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Shared utilities and types for the Actant AI agent platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "blackplume <blackplume233@gmail.com>",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/blackplume233/Actant.git",
|
|
11
|
+
"directory": "packages/shared"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/blackplume233/Actant#readme",
|
|
14
|
+
"bugs": "https://github.com/blackplume233/Actant/issues",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"actant",
|
|
17
|
+
"ai-agent",
|
|
18
|
+
"shared"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"pino": "^10.3.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^25.3.0"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup",
|
|
42
|
+
"dev": "tsup --watch",
|
|
43
|
+
"type-check": "tsc --noEmit",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"clean": "rimraf dist"
|
|
46
|
+
}
|
|
47
|
+
}
|