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 +26 -10
- package/dist/commands/communicator.d.ts +1 -1
- package/dist/commands/communicator.js +1 -1
- package/dist/commands/screensaver.d.ts +8 -0
- package/dist/commands/screensaver.js +1236 -0
- package/dist/commands/serve.d.ts +2 -1
- package/dist/commands/serve.js +22 -15
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.js +2 -0
- package/dist/db/migrate.d.ts +2 -2
- package/dist/db/migrate.js +2 -124
- package/dist/db/postgresql-storage.d.ts +41 -0
- package/dist/db/postgresql-storage.js +366 -0
- package/dist/db/sqlite-storage.d.ts +42 -0
- package/dist/db/sqlite-storage.js +471 -0
- package/dist/db/storage-base.d.ts +65 -0
- package/dist/db/storage-base.js +113 -0
- package/dist/db/storage.d.ts +51 -0
- package/dist/db/storage.js +1 -0
- package/dist/lib/agentic-coding-server.d.ts +11 -0
- package/dist/lib/opencode-coding-server.d.ts +2 -1
- package/dist/lib/opencode-coding-server.js +26 -11
- package/dist/manage/components/SessionList.js +68 -64
- package/dist/server/cron.d.ts +3 -3
- package/dist/server/cron.js +15 -29
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/routes.d.ts +3 -3
- package/dist/server/routes.js +151 -306
- package/package.json +3 -2
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("--
|
|
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
|
|
32
|
-
.command("
|
|
33
|
-
.description("[HUMAN ONLY]
|
|
34
|
-
|
|
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
|
|
41
|
-
.option("--port <port>", "Port to run the
|
|
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 {
|
|
48
|
-
await
|
|
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
|
|
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
|
|
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) {
|