agent-office 0.2.4 → 0.3.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/cli.js CHANGED
@@ -10,11 +10,12 @@ program
10
10
  .command("serve")
11
11
  .description("[HUMAN ONLY] Start the agent-office HTTP server")
12
12
  .option("--database-url <url>", "PostgreSQL connection string", process.env.DATABASE_URL)
13
- .option("--opencode-url <url>", "OpenCode server URL", process.env.OPENCODE_URL ?? "http://localhost:4096")
13
+ .option("--sqlite <path>", "SQLite database file path (alternative to PostgreSQL)", process.env.AGENT_OFFICE_SQLITE)
14
14
  .option("--host <host>", "Host to bind to", "127.0.0.1")
15
15
  .option("--port <port>", "Port to serve on", "7654")
16
16
  .option("--memory-path <path>", "Directory for memory storage (default: ./.memory)", "./.memory")
17
17
  .option("--password <password>", "REQUIRED. API password", process.env.AGENT_OFFICE_PASSWORD)
18
+ .option("--opencode-url <url>", "URL of the OpenCode server (default: http://127.0.0.1:4096)", process.env.OPENCODE_URL ?? "http://127.0.0.1:4096")
18
19
  .action(async (options) => {
19
20
  const { serve } = await import("./commands/serve.js");
20
21
  await serve(options);
@@ -28,24 +29,39 @@ program
28
29
  const { manage } = await import("./commands/manage.js");
29
30
  await manage(options.url, options);
30
31
  });
31
- const communicatorCmd = program
32
- .command("communicator")
33
- .description("[HUMAN ONLY] Communicator interfaces for talking with coworkers");
34
- communicatorCmd
35
- .command("web")
32
+ const appCmd = program
33
+ .command("app")
34
+ .description("[HUMAN ONLY] Interactive visual applications");
35
+ appCmd
36
+ .command("coworker-chat-web")
36
37
  .description("[HUMAN ONLY] Launch a web chat interface for a single coworker")
37
38
  .argument("<coworker>", "Name of the coworker to chat with (e.g. 'Howard Roark')")
38
39
  .option("--url <url>", "URL of the agent-office serve endpoint (e.g. http://127.0.0.1:7654)", process.env.AGENT_OFFICE_URL ?? "http://127.0.0.1:7654")
39
40
  .option("--secret <secret>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD)
40
- .option("--host <host>", "Host to bind the communicator web server to", "127.0.0.1")
41
- .option("--port <port>", "Port to run the communicator web server on", "7655")
41
+ .option("--host <host>", "Host to bind the web server to", "127.0.0.1")
42
+ .option("--port <port>", "Port to run the web server on", "7655")
42
43
  .action(async (coworker, options) => {
43
44
  if (!options.secret) {
44
45
  console.error("Error: --secret is required (or set AGENT_OFFICE_PASSWORD)");
45
46
  process.exit(1);
46
47
  }
47
- const { communicatorWeb } = await import("./commands/communicator.js");
48
- await communicatorWeb(coworker, options);
48
+ const { appCoworkerChatWeb } = await import("./commands/communicator.js");
49
+ await appCoworkerChatWeb(coworker, options);
50
+ });
51
+ appCmd
52
+ .command("screensaver")
53
+ .description("[HUMAN ONLY] Launch a visualization of recent mail activity (live screensaver)")
54
+ .option("--url <url>", "URL of the agent-office serve endpoint (e.g. http://127.0.0.1:7654)", process.env.AGENT_OFFICE_URL ?? "http://127.0.0.1:7654")
55
+ .option("--secret <secret>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD)
56
+ .option("--host <host>", "Host to bind the screensaver web server to", "127.0.0.1")
57
+ .option("--port <port>", "Port to run the screensaver web server on", "7656")
58
+ .action(async (options) => {
59
+ if (!options.secret) {
60
+ console.error("Error: --secret is required (or set AGENT_OFFICE_PASSWORD)");
61
+ process.exit(1);
62
+ }
63
+ const { appScreensaver } = await import("./commands/screensaver.js");
64
+ await appScreensaver(options);
49
65
  });
50
66
  const workerCmd = program
51
67
  .command("worker")
@@ -4,5 +4,5 @@ interface CommunicatorOptions {
4
4
  host: string;
5
5
  port: string;
6
6
  }
7
- export declare function communicatorWeb(coworker: string, options: CommunicatorOptions): Promise<void>;
7
+ export declare function appCoworkerChatWeb(coworker: string, options: CommunicatorOptions): Promise<void>;
8
8
  export {};
@@ -589,7 +589,7 @@ function renderPage(coworker, msgs, humanName) {
589
589
  </html>`;
590
590
  }
591
591
  // ── Express app ───────────────────────────────────────────────────────────────
592
- export async function communicatorWeb(coworker, options) {
592
+ export async function appCoworkerChatWeb(coworker, options) {
593
593
  const { url: agentUrl, secret, host, port: portStr } = options;
594
594
  const port = parseInt(portStr, 10);
595
595
  if (isNaN(port) || port < 1 || port > 65535) {
@@ -0,0 +1,8 @@
1
+ interface ScreensaverOptions {
2
+ url: string;
3
+ secret: string;
4
+ host: string;
5
+ port: string;
6
+ }
7
+ export declare function appScreensaver(options: ScreensaverOptions): Promise<void>;
8
+ export {};