omnara 0.1.10 → 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.
Files changed (45) hide show
  1. package/bin/omnara.js +2 -2
  2. package/dist/auth/auth-provider.d.ts +9 -2
  3. package/dist/auth/cli-auth-service.d.ts +0 -1
  4. package/dist/auth/credential-manager.d.ts +10 -1
  5. package/dist/auth/credentials-store.d.ts +4 -1
  6. package/dist/auth/ensure-cli-credentials.d.ts +13 -0
  7. package/dist/cli.js +5132 -1478
  8. package/dist/cli.js.map +4 -4
  9. package/dist/commands/agent.d.ts +3 -2
  10. package/dist/commands/daemon.d.ts +2 -0
  11. package/dist/commands/index.d.ts +2 -1
  12. package/dist/config/omnara-config.d.ts +2 -17
  13. package/dist/daemon/config-store.d.ts +37 -0
  14. package/dist/daemon/daemon-client.d.ts +26 -0
  15. package/dist/daemon/daemon-launcher.d.ts +30 -0
  16. package/dist/daemon/daemon-service.d.ts +30 -0
  17. package/dist/daemon/directory-registry.d.ts +17 -0
  18. package/dist/daemon/file-logger.d.ts +24 -0
  19. package/dist/daemon/local-control-server.d.ts +37 -0
  20. package/dist/daemon/machine-supervisor.d.ts +60 -0
  21. package/dist/daemon/paths.d.ts +9 -0
  22. package/dist/daemon/run-daemon.d.ts +1 -0
  23. package/dist/daemon/session-log-manager.d.ts +10 -0
  24. package/dist/daemon/session-pid-registry.d.ts +5 -0
  25. package/dist/daemon/session-runner.d.ts +28 -0
  26. package/dist/daemon/state-store.d.ts +14 -0
  27. package/dist/http/machines.d.ts +3 -0
  28. package/dist/http/user-sessions.d.ts +5 -2
  29. package/dist/http/workspaces.d.ts +4 -0
  30. package/dist/orchestrator/agent-orchestrator.d.ts +7 -1
  31. package/dist/orchestrator/ai-client.d.ts +3 -0
  32. package/dist/orchestrator/orchestrator-prompt.md +171 -43
  33. package/dist/orchestrator/utils/completions-manager.d.ts +8 -0
  34. package/dist/orchestrator/utils/worktree-manager.d.ts +30 -1
  35. package/dist/orchestrator/worker-manager.d.ts +9 -4
  36. package/dist/orchestrator-prompt.md +171 -43
  37. package/dist/package-info.d.ts +3 -0
  38. package/dist/relay/relay-bridge.d.ts +12 -0
  39. package/dist/schemas/index.d.ts +2 -2
  40. package/dist/utils/claude-code-check.d.ts +1 -20
  41. package/dist/utils/version-check.d.ts +1 -5
  42. package/package.json +6 -4
  43. package/scripts/copy-assets.mjs +41 -0
  44. package/dist/repl/terminal-repl.d.ts +0 -9
  45. package/dist/voice/voice-service.d.ts +0 -19
@@ -6,6 +6,9 @@ export interface RelayBridgeOptions {
6
6
  logger?: Console;
7
7
  backendUrl: string;
8
8
  frontendUrl?: string;
9
+ workspaceId?: string;
10
+ userSessionId?: string;
11
+ agentSessionId?: string;
9
12
  }
10
13
  export declare class RelayBridge extends EventEmitter {
11
14
  private readonly orchestrator;
@@ -13,6 +16,7 @@ export declare class RelayBridge extends EventEmitter {
13
16
  private readonly logger;
14
17
  private readonly backendUrl;
15
18
  private readonly frontendUrl?;
19
+ private readonly workspaceId;
16
20
  private connectionHandle;
17
21
  private ws;
18
22
  private stopped;
@@ -22,7 +26,10 @@ export declare class RelayBridge extends EventEmitter {
22
26
  private authProviderPromise;
23
27
  private userSessionId;
24
28
  private currentAgentSessionId;
29
+ private readonly attachAgentSessionId;
25
30
  private browserOpened;
31
+ private canceled;
32
+ private waitingForLogin;
26
33
  constructor(orchestrator: AgentOrchestrator, options: RelayBridgeOptions);
27
34
  start(): Promise<void>;
28
35
  stop(): Promise<void>;
@@ -41,6 +48,10 @@ export declare class RelayBridge extends EventEmitter {
41
48
  private handleSessionBootstrap;
42
49
  private handleSessionInitAck;
43
50
  private handleSessionAnnounce;
51
+ private handleCancelAgent;
52
+ private handleSessionClosed;
53
+ private handleGitDiffRequest;
54
+ private handleRelayRequest;
44
55
  private handleMessageEnvelope;
45
56
  private isTextContent;
46
57
  private buildUserTextEnvelope;
@@ -55,5 +66,6 @@ export declare class RelayBridge extends EventEmitter {
55
66
  private enqueue;
56
67
  private flushQueue;
57
68
  private startPingTimer;
69
+ private clearLoginWait;
58
70
  private closeCurrentSocket;
59
71
  }
@@ -1,2 +1,2 @@
1
- export type { ControlMessage, MessageEnvelope, ControlMessageSchema, MessageEnvelopeSchema, ValidationError, } from '@omnara/shared-js/schemas';
2
- export { validateControlMessage, validateMessageEnvelope } from '@omnara/shared-js/schemas';
1
+ export type { ControlMessage, MessageEnvelope, ControlMessageSchema, MessageEnvelopeSchema, MachineMessage, ValidationError, } from '@omnara/shared-js/schemas';
2
+ export { validateControlMessage, validateMessageEnvelope, validateMachineMessage, } from '@omnara/shared-js/schemas';
@@ -1,25 +1,6 @@
1
- /**
2
- * Checks if Claude Code is installed and available in the system
3
- */
4
- export declare function checkClaudeCodeInstallation(): boolean;
5
- /**
6
- * Checks if ANTHROPIC_API_KEY environment variable is set
7
- */
8
- export declare function checkAnthropicApiKey(): boolean;
9
- /**
10
- * Displays a warning message if neither authentication method is available
11
- */
12
- export declare function displayClaudeCodeWarning(): void;
13
1
  /**
14
2
  * Performs the Claude Code check and displays warning if needed
15
3
  * @param options - Optional configuration for the check
16
4
  * @returns boolean indicating if either authentication method is available
17
5
  */
18
- export declare function performClaudeCodeCheck(options?: {
19
- silent?: boolean;
20
- exitOnMissing?: boolean;
21
- }): boolean;
22
- /**
23
- * Gets Claude Code version if installed
24
- */
25
- export declare function getClaudeCodeVersion(): string | null;
6
+ export declare function performClaudeCodeCheck(): Promise<boolean>;
@@ -2,8 +2,4 @@
2
2
  * Checks if a newer version is available and logs a message if so.
3
3
  * This function is non-blocking and will not throw errors.
4
4
  */
5
- export declare function checkForUpdates(): Promise<void>;
6
- /**
7
- * Checks for updates in the background without blocking
8
- */
9
- export declare function checkForUpdatesInBackground(): void;
5
+ export declare function attemptUpdate(): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnara",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Command-line interface for Omnara.",
6
6
  "main": "dist/cli.js",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "build": "npm run build:types && node build.mjs && npm run copy-assets",
13
13
  "build:types": "tsc --emitDeclarationOnly --project tsconfig.json",
14
- "copy-assets": "mkdir -p dist dist/orchestrator && cp -r src/orchestrator/*.md dist/ && cp -r src/orchestrator/*.md dist/orchestrator/",
14
+ "copy-assets": "node scripts/copy-assets.mjs",
15
15
  "preinstall": "node scripts/preinstall.js"
16
16
  },
17
17
  "keywords": [
@@ -27,14 +27,16 @@
27
27
  "README.md"
28
28
  ],
29
29
  "dependencies": {
30
- "@anthropic-ai/claude-agent-sdk": "^0.1.23",
30
+ "@anthropic-ai/claude-agent-sdk": "^0.1.42",
31
31
  "@anthropic-ai/sdk": "^0.67.0",
32
32
  "@modelcontextprotocol/sdk": "^1.20.1",
33
33
  "@supabase/supabase-js": "^2.76.1",
34
+ "@types/glob": "^8.1.0",
34
35
  "ajv": "^8.17.1",
35
36
  "ajv-formats": "^2.1.1",
36
37
  "chalk": "^4.1.2",
37
38
  "commander": "^11.1.0",
39
+ "glob": "^9.3.5",
38
40
  "jsonc-parser": "^3.3.1",
39
41
  "simple-git": "^3.30.0",
40
42
  "ws": "^8.18.3",
@@ -56,6 +58,6 @@
56
58
  "typescript-eslint": "^8.46.2"
57
59
  },
58
60
  "engines": {
59
- "node": ">=18"
61
+ "node": ">=20"
60
62
  }
61
63
  }
@@ -0,0 +1,41 @@
1
+ import { mkdir, copyFile } from 'fs/promises';
2
+ import { basename, join } from 'path';
3
+ import { cwd } from 'process';
4
+ import { glob } from 'glob';
5
+
6
+ async function main() {
7
+ const projectRoot = cwd();
8
+ const mdFiles = await glob('src/orchestrator/*.md', {
9
+ cwd: projectRoot,
10
+ absolute: true,
11
+ });
12
+
13
+ if (mdFiles.length === 0) {
14
+ return;
15
+ }
16
+
17
+ const distDir = join(projectRoot, 'dist');
18
+ const orchestratorDistDir = join(distDir, 'orchestrator');
19
+
20
+ await Promise.all([
21
+ mkdir(distDir, { recursive: true }),
22
+ mkdir(orchestratorDistDir, { recursive: true }),
23
+ ]);
24
+
25
+ await Promise.all(
26
+ mdFiles.flatMap((file) => {
27
+ const fileName = basename(file);
28
+ const targets = [
29
+ join(distDir, fileName),
30
+ join(orchestratorDistDir, fileName),
31
+ ];
32
+
33
+ return targets.map((target) => copyFile(file, target));
34
+ }),
35
+ );
36
+ }
37
+
38
+ main().catch((error) => {
39
+ console.error('[copy-assets] Failed to copy markdown assets:', error);
40
+ process.exit(1);
41
+ });
@@ -1,9 +0,0 @@
1
- export interface ReplOptions {
2
- url?: string;
3
- headers?: Record<string, string>;
4
- initialSessionId?: string;
5
- parentSessionId?: string;
6
- initialMetadata?: Record<string, unknown>;
7
- initializeSession?: boolean;
8
- }
9
- export declare function runTerminalRepl(options?: Partial<ReplOptions>): Promise<void>;
@@ -1,19 +0,0 @@
1
- import { ApiClient } from '../http/api-client.js';
2
- export interface VoiceLaunchResult {
3
- sessionId: string;
4
- roomName: string;
5
- livekitUrl: string;
6
- accessToken: string;
7
- accessTokenIdentity: string;
8
- relayWsUrl: string;
9
- relayToken: string;
10
- relayTokenExpiresIn: number;
11
- dispatchId: string;
12
- dispatchMetadata: Record<string, unknown>;
13
- }
14
- export interface LaunchVoiceOptions {
15
- sessionId: string;
16
- force?: boolean;
17
- roomName?: string;
18
- }
19
- export declare function launchVoiceForSession(client: ApiClient, accessToken: string, options: LaunchVoiceOptions): Promise<VoiceLaunchResult>;