agent-office 0.4.8 → 0.5.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 +51 -51
- package/dist/commands/communicator.js +2 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22,7 +22,57 @@ program
|
|
|
22
22
|
const { serve } = await import("./commands/serve.js");
|
|
23
23
|
await serve(options);
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
program
|
|
26
|
+
.command("manage")
|
|
27
|
+
.description("[HUMAN ONLY] Launch the interactive TUI to manage sessions")
|
|
28
|
+
.option("--url <url>", "URL of the agent-office server (e.g. http://127.0.0.1:7654)", process.env.AGENT_OFFICE_URL ?? "http://127.0.0.1:7654")
|
|
29
|
+
.option("--password <password>", "REQUIRED. API password", process.env.AGENT_OFFICE_PASSWORD)
|
|
30
|
+
.action(async (options) => {
|
|
31
|
+
const { manage } = await import("./commands/manage.js");
|
|
32
|
+
await manage(options.url, options);
|
|
33
|
+
});
|
|
34
|
+
const appCmd = program
|
|
35
|
+
.command("app")
|
|
36
|
+
.description("[HUMAN ONLY] Interactive visual applications");
|
|
37
|
+
appCmd
|
|
38
|
+
.command("chat")
|
|
39
|
+
.description("Web chat interface for human to chat to coworkers")
|
|
40
|
+
.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")
|
|
41
|
+
.option("--password <password>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD ?? "secret")
|
|
42
|
+
.option("--host <host>", "Host to bind the web server to", "127.0.0.1")
|
|
43
|
+
.option("--port <port>", "Port to run the web server on", "7655")
|
|
44
|
+
.option("--xai-key <key>", "xAI API key for voice chat (enables voice button)", process.env.XAI_API_KEY)
|
|
45
|
+
.action(async (options) => {
|
|
46
|
+
const { appCoworkerChatWeb } = await import("./commands/communicator.js");
|
|
47
|
+
await appCoworkerChatWeb(options);
|
|
48
|
+
});
|
|
49
|
+
appCmd.command("screensaver")
|
|
50
|
+
.description("3D visualization of recent mail activity")
|
|
51
|
+
.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")
|
|
52
|
+
.option("--password <password>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD ?? "secret")
|
|
53
|
+
.option("--host <host>", "Host to bind the screensaver web server to", "127.0.0.1")
|
|
54
|
+
.option("--port <port>", "Port to run the screensaver web server on", "7656")
|
|
55
|
+
.action(async (options) => {
|
|
56
|
+
const { appScreensaver } = await import("./commands/screensaver.js");
|
|
57
|
+
await appScreensaver(options);
|
|
58
|
+
});
|
|
59
|
+
appCmd
|
|
60
|
+
.command('notifier')
|
|
61
|
+
.description('Notify human by email when unread messages have been waiting over certain amount of time')
|
|
62
|
+
.option('--agent-office-url <url>', 'Agent Office server URL', process.env.AGENT_OFFICE_URL ?? 'http://127.0.0.1:7654')
|
|
63
|
+
.option('--password <pw>', 'API password', process.env.AGENT_OFFICE_PASSWORD)
|
|
64
|
+
.option('--to-email <email>', 'Recipient email address', process.env.TO_EMAIL)
|
|
65
|
+
.option('--resend-api-key <key>', 'Resend API key', process.env.RESEND_API_KEY)
|
|
66
|
+
.option('--domain <domain>', 'Sender domain (e.g. coworker.innercontext.com)', process.env.EMAIL_DOMAIN)
|
|
67
|
+
.option('--wait-minutes <minutes>', 'Minutes a message must be unread before notifying', '15')
|
|
68
|
+
.action(async (options) => {
|
|
69
|
+
const { notifier } = await import('./commands/notifier.js');
|
|
70
|
+
await notifier(options);
|
|
71
|
+
});
|
|
72
|
+
const workerCmd = program
|
|
73
|
+
.command("worker")
|
|
74
|
+
.description("Worker agent commands");
|
|
75
|
+
const taskBoardCmd = workerCmd
|
|
26
76
|
.command("task-board")
|
|
27
77
|
.description("Manage a kanban-style task board with columns for task lifecycle tracking. Supports full CRUD operations, search, and analytics. Requires database connection (--database-url or --sqlite).")
|
|
28
78
|
.option("--database-url <url>", "PostgreSQL database connection string for storing task data", process.env.DATABASE_URL)
|
|
@@ -110,56 +160,6 @@ taskBoardCmd
|
|
|
110
160
|
const options = taskBoardCmd.opts();
|
|
111
161
|
await showStats(options);
|
|
112
162
|
});
|
|
113
|
-
program
|
|
114
|
-
.command("manage")
|
|
115
|
-
.description("[HUMAN ONLY] Launch the interactive TUI to manage sessions")
|
|
116
|
-
.option("--url <url>", "URL of the agent-office server (e.g. http://127.0.0.1:7654)", process.env.AGENT_OFFICE_URL ?? "http://127.0.0.1:7654")
|
|
117
|
-
.option("--password <password>", "REQUIRED. API password", process.env.AGENT_OFFICE_PASSWORD)
|
|
118
|
-
.action(async (options) => {
|
|
119
|
-
const { manage } = await import("./commands/manage.js");
|
|
120
|
-
await manage(options.url, options);
|
|
121
|
-
});
|
|
122
|
-
const appCmd = program
|
|
123
|
-
.command("app")
|
|
124
|
-
.description("[HUMAN ONLY] Interactive visual applications");
|
|
125
|
-
appCmd
|
|
126
|
-
.command("chat")
|
|
127
|
-
.description("Web chat interface for human to chat to coworkers")
|
|
128
|
-
.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")
|
|
129
|
-
.option("--password <password>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD ?? "secret")
|
|
130
|
-
.option("--host <host>", "Host to bind the web server to", "127.0.0.1")
|
|
131
|
-
.option("--port <port>", "Port to run the web server on", "7655")
|
|
132
|
-
.option("--xai-key <key>", "xAI API key for voice chat (enables voice button)", process.env.XAI_API_KEY)
|
|
133
|
-
.action(async (options) => {
|
|
134
|
-
const { appCoworkerChatWeb } = await import("./commands/communicator.js");
|
|
135
|
-
await appCoworkerChatWeb(options);
|
|
136
|
-
});
|
|
137
|
-
appCmd.command("screensaver")
|
|
138
|
-
.description("3D visualization of recent mail activity")
|
|
139
|
-
.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")
|
|
140
|
-
.option("--password <password>", "API password for the agent-office server", process.env.AGENT_OFFICE_PASSWORD ?? "secret")
|
|
141
|
-
.option("--host <host>", "Host to bind the screensaver web server to", "127.0.0.1")
|
|
142
|
-
.option("--port <port>", "Port to run the screensaver web server on", "7656")
|
|
143
|
-
.action(async (options) => {
|
|
144
|
-
const { appScreensaver } = await import("./commands/screensaver.js");
|
|
145
|
-
await appScreensaver(options);
|
|
146
|
-
});
|
|
147
|
-
appCmd
|
|
148
|
-
.command('notifier')
|
|
149
|
-
.description('Notify human by email when unread messages have been waiting over certain amount of time')
|
|
150
|
-
.option('--agent-office-url <url>', 'Agent Office server URL', process.env.AGENT_OFFICE_URL ?? 'http://127.0.0.1:7654')
|
|
151
|
-
.option('--password <pw>', 'API password', process.env.AGENT_OFFICE_PASSWORD)
|
|
152
|
-
.option('--to-email <email>', 'Recipient email address', process.env.TO_EMAIL)
|
|
153
|
-
.option('--resend-api-key <key>', 'Resend API key', process.env.RESEND_API_KEY)
|
|
154
|
-
.option('--domain <domain>', 'Sender domain (e.g. coworker.innercontext.com)', process.env.EMAIL_DOMAIN)
|
|
155
|
-
.option('--wait-minutes <minutes>', 'Minutes a message must be unread before notifying', '15')
|
|
156
|
-
.action(async (options) => {
|
|
157
|
-
const { notifier } = await import('./commands/notifier.js');
|
|
158
|
-
await notifier(options);
|
|
159
|
-
});
|
|
160
|
-
const workerCmd = program
|
|
161
|
-
.command("worker")
|
|
162
|
-
.description("Worker agent commands");
|
|
163
163
|
workerCmd
|
|
164
164
|
.command("list-coworkers")
|
|
165
165
|
.description("List all other workers (coworkers)")
|
|
@@ -1946,6 +1946,7 @@ export async function appCoworkerChatWeb(options) {
|
|
|
1946
1946
|
// Build voice instructions based on the coworker
|
|
1947
1947
|
const instructions = [
|
|
1948
1948
|
`You are ${escapeHtml(coworker)}, an AI coworker in the agent office.`,
|
|
1949
|
+
`Your token code is: ${coworker}@${agentUrl}`,
|
|
1949
1950
|
status ? `Your current status is: "${status}".` : "",
|
|
1950
1951
|
`You are having a voice conversation with your human manager ${humanName}.`,
|
|
1951
1952
|
`Be helpful, collaborative, and keep your responses concise since this is a voice conversation.`,
|
|
@@ -2064,7 +2065,7 @@ export async function appCoworkerChatWeb(options) {
|
|
|
2064
2065
|
const timeoutSec = Math.min(120, Number(args.timeout) || 30);
|
|
2065
2066
|
const timeout = timeoutSec * 1000;
|
|
2066
2067
|
result = await new Promise((resolve) => {
|
|
2067
|
-
exec(command, { timeout, maxBuffer: 1024 * 1024, cwd: process.cwd() }, (err, stdout, stderr) => {
|
|
2068
|
+
exec(command, { timeout, maxBuffer: 1024 * 1024, cwd: process.cwd(), env: process.env }, (err, stdout, stderr) => {
|
|
2068
2069
|
const out = (stdout || "").trim();
|
|
2069
2070
|
const errOut = (stderr || "").trim();
|
|
2070
2071
|
if (err && err.killed) {
|