openvole 0.1.0 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -36,6 +36,8 @@ interface ToolSummary {
36
36
  name: string;
37
37
  description: string;
38
38
  pawName: string;
39
+ /** Parameter schema (Zod) — passed to Brain Paw for function calling */
40
+ parameters?: unknown;
39
41
  }
40
42
  /** A Skill whose required tools are all satisfied (compact — Brain reads full instructions on demand) */
41
43
  interface ActiveSkill {
@@ -225,7 +227,6 @@ interface LoopConfig {
225
227
  taskConcurrency: number;
226
228
  /** Max messages before triggering compact hooks (0 = disabled) */
227
229
  compactThreshold: number;
228
- logLevel: 'debug' | 'info' | 'warn' | 'error';
229
230
  /** Rate limits (undefined = no limits) */
230
231
  rateLimits?: RateLimits;
231
232
  }
@@ -240,6 +241,15 @@ interface ToolProfile {
240
241
  interface HeartbeatConfig {
241
242
  enabled: boolean;
242
243
  intervalMinutes: number;
244
+ /** If true, run heartbeat immediately on startup (default: false) */
245
+ runOnStart?: boolean;
246
+ }
247
+ /** Security configuration */
248
+ interface SecurityConfig {
249
+ /** If true, paws can only access files inside .openvole/ directory. Default: true */
250
+ sandboxFilesystem?: boolean;
251
+ /** Additional paths paws are allowed to access outside .openvole/ */
252
+ allowedPaths?: string[];
243
253
  }
244
254
  /** The full OpenVole configuration */
245
255
  interface VoleConfig {
@@ -250,6 +260,8 @@ interface VoleConfig {
250
260
  heartbeat: HeartbeatConfig;
251
261
  /** Tool profiles per task source — restrict which tools can be used */
252
262
  toolProfiles?: Record<string, ToolProfile>;
263
+ /** Security settings */
264
+ security?: SecurityConfig;
253
265
  }
254
266
  /** CLI-managed lock file — tracks installed paws and skills */
255
267
  interface VoleLock {
@@ -378,7 +390,8 @@ interface QueryableScheduler {
378
390
  list(): Array<{
379
391
  id: string;
380
392
  input: string;
381
- intervalMinutes: number;
393
+ cron: string;
394
+ nextRun?: string;
382
395
  createdAt: number;
383
396
  }>;
384
397
  }
@@ -589,22 +602,62 @@ interface LoopDependencies {
589
602
  */
590
603
  declare function runAgentLoop(task: AgentTask, deps: LoopDependencies): Promise<void>;
591
604
 
592
- /** In-memory store for brain-created recurring schedules */
605
+ /** Persistent store for recurring schedules using cron expressions */
593
606
  declare class SchedulerStore {
594
607
  private schedules;
608
+ private savePath;
609
+ private tickHandler;
610
+ /** Set the file path for persistence */
611
+ setPersistence(filePath: string): void;
612
+ /** Set the handler called when a schedule ticks */
613
+ setTickHandler(handler: (input: string) => void): void;
614
+ /** Load schedule data from disk without starting cron jobs (for read-only access) */
615
+ loadFromDisk(): Promise<void>;
616
+ /** Load persisted schedules from disk and restart their jobs */
617
+ restore(): Promise<void>;
595
618
  /** Create or replace a recurring schedule */
596
- add(id: string, input: string, intervalMinutes: number, onTick: () => void): void;
619
+ add(id: string, input: string, cron: string, onTick: () => void, createdAt?: number, immediate?: boolean): void;
597
620
  /** Cancel a schedule by ID */
598
- cancel(id: string): boolean;
621
+ cancel(id: string, skipPersist?: boolean): boolean;
599
622
  /** List all active schedules */
600
623
  list(): Array<{
601
624
  id: string;
602
625
  input: string;
603
- intervalMinutes: number;
626
+ cron: string;
627
+ nextRun?: string;
604
628
  createdAt: number;
605
629
  }>;
606
630
  /** Clear all schedules (for shutdown) */
607
631
  clearAll(): void;
632
+ /** Save schedules to disk */
633
+ private persist;
634
+ }
635
+
636
+ interface VaultEntry {
637
+ value: string;
638
+ source: 'user' | 'tool' | 'brain';
639
+ createdAt: number;
640
+ /** Optional metadata — context about the stored value (service, handle, url, etc.) */
641
+ meta?: Record<string, string>;
642
+ }
643
+ declare class Vault {
644
+ private entries;
645
+ private vaultPath;
646
+ private encryptionKey?;
647
+ constructor(vaultPath: string, encryptionKey?: string);
648
+ init(): Promise<void>;
649
+ store(key: string, value: string, source?: string, meta?: Record<string, string>): Promise<boolean>;
650
+ get(key: string): Promise<string | null>;
651
+ list(): Promise<Array<{
652
+ key: string;
653
+ source: string;
654
+ createdAt: number;
655
+ meta?: Record<string, string>;
656
+ }>>;
657
+ delete(key: string): Promise<boolean>;
658
+ private save;
659
+ private encrypt;
660
+ private decrypt;
608
661
  }
609
662
 
610
663
  /**
@@ -673,4 +726,4 @@ declare function createEngine(projectRoot: string, options?: {
673
726
  configPath?: string;
674
727
  }): Promise<VoleEngine>;
675
728
 
676
- export { type ActionError, type ActionErrorCode, type ActionResult, type ActiveSkill, type AgentContext, type AgentMessage, type AgentPlan, type AgentTask, type BootstrapHook, type BusEvents, type CompactHook, type EffectivePermissions, type HeartbeatConfig, type LoopConfig, type LoopDependencies, type LoopPhase, type MessageBus, type ObserveHook, PHASE_ORDER, type PawConfig, type PawDefinition, type PawInstance, type PawManifest, PawRegistry, type PerceiveHook, type PlannedAction, RateLimiter, type RateLimits, type ScheduleHook, SchedulerStore, type SkillDefinition, type SkillInstance, SkillRegistry, TaskQueue, type TaskStatus, type ToolDefinition, ToolRegistry, type ToolRegistryEntry, type ToolSummary, type TransportType, type VoleConfig, type VoleEngine, type VoleIO, type VoleLock, addPawToLock, addSkillToLock, buildActiveSkills, computeEffectivePermissions, createActionError, createAgentContext, createEngine, createMessageBus, createTtyIO, defineConfig, failureResult, loadConfig, readLockFile, readPawManifest, removePawFromLock, removeSkillFromLock, resolvePawPath, resolveSkills, runAgentLoop, successResult, validatePermissions, writeLockFile };
729
+ export { type ActionError, type ActionErrorCode, type ActionResult, type ActiveSkill, type AgentContext, type AgentMessage, type AgentPlan, type AgentTask, type BootstrapHook, type BusEvents, type CompactHook, type EffectivePermissions, type HeartbeatConfig, type LoopConfig, type LoopDependencies, type LoopPhase, type MessageBus, type ObserveHook, PHASE_ORDER, type PawConfig, type PawDefinition, type PawInstance, type PawManifest, PawRegistry, type PerceiveHook, type PlannedAction, RateLimiter, type RateLimits, type ScheduleHook, SchedulerStore, type SkillDefinition, type SkillInstance, SkillRegistry, TaskQueue, type TaskStatus, type ToolDefinition, ToolRegistry, type ToolRegistryEntry, type ToolSummary, type TransportType, Vault, type VaultEntry, type VoleConfig, type VoleEngine, type VoleIO, type VoleLock, addPawToLock, addSkillToLock, buildActiveSkills, computeEffectivePermissions, createActionError, createAgentContext, createEngine, createMessageBus, createTtyIO, defineConfig, failureResult, loadConfig, readLockFile, readPawManifest, removePawFromLock, removeSkillFromLock, resolvePawPath, resolveSkills, runAgentLoop, successResult, validatePermissions, writeLockFile };