@abstractframework/observer 0.1.6 → 0.1.9

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/README.md CHANGED
@@ -6,7 +6,22 @@ What it does (implemented in `src/ui/app.tsx` + `src/lib/gateway_client.ts`):
6
6
  - **Discover** workflows/bundles exposed by an AbstractGateway
7
7
  - **Launch** or **schedule** runs (durable)
8
8
  - **Observe** runs by replaying + streaming the durable **ledger** (replay-first + SSE)
9
- - **Control** runs via durable commands (pause/resume/cancel/resume-wait)
9
+ - **Control** runs via durable commands (`pause`, `resume`, `cancel`)
10
+ - (Optional) **Voice** in run chat: gateway-based TTS + push-to-talk transcription (`src/ui/use_gateway_voice.ts`)
11
+
12
+ ## Where it fits (AbstractFramework ecosystem)
13
+ AbstractObserver is one of the browser UIs in the **AbstractFramework** ecosystem:
14
+ - AbstractFramework (ecosystem entrypoint): https://github.com/lpalbou/AbstractFramework
15
+ - AbstractRuntime (durable runtime + ledger behind the gateway): https://github.com/lpalbou/abstractruntime
16
+ - AbstractCore (LLM + tools integration used by runtime/workflows): https://github.com/lpalbou/abstractcore
17
+
18
+ ```mermaid
19
+ flowchart LR
20
+ U[User] --> O[AbstractObserver<br/>browser UI]
21
+ O -->|HTTP fetch + SSE| G[AbstractGateway<br/>/api/gateway/*]
22
+ G --> R[AbstractRuntime<br/>durable runs + append-only ledger]
23
+ R --> C[AbstractCore<br/>LLM + tools (optional)]
24
+ ```
10
25
 
11
26
  ## Quickstart (npm)
12
27
  Prereqs:
@@ -15,9 +30,11 @@ Prereqs:
15
30
 
16
31
  Run the UI server:
17
32
  ```bash
18
- npx abstractobserver
33
+ npx --yes --package @abstractframework/observer -- abstractobserver
19
34
  ```
20
35
 
36
+ Note: the npm package is `@abstractframework/observer`, and the CLI binary is `abstractobserver`.
37
+
21
38
  Open `http://localhost:3001`, then go to **Settings** and configure:
22
39
  - **Gateway URL** (usually your gateway base URL, e.g. `http://localhost:8081`)
23
40
  - Leave it blank only for same-origin deployments (reverse proxy routes `/api`) or when using `npm run dev` (Vite `/api` proxy).
@@ -26,13 +43,13 @@ Open `http://localhost:3001`, then go to **Settings** and configure:
26
43
  ## Install options
27
44
  ### Global install
28
45
  ```bash
29
- npm install -g abstractobserver
46
+ npm install -g @abstractframework/observer
30
47
  abstractobserver
31
48
  ```
32
49
 
33
50
  ### Pin a version (recommended for deployments)
34
51
  ```bash
35
- npx abstractobserver@0.1.4
52
+ npx --yes --package @abstractframework/observer@0.1.6 -- abstractobserver
36
53
  ```
37
54
 
38
55
  ### CLI configuration
@@ -44,7 +61,7 @@ The CLI is a static file server implemented in `bin/cli.js`.
44
61
  ## Features (UI pages)
45
62
  All pages share the same gateway connection settings.
46
63
 
47
- - **Observe**: ledger, graph, digest, attachments, chat
64
+ - **Observe**: ledger, graph, digest, attachments, chat (optional voice: PTT + TTS)
48
65
  - **Launch**: start runs, schedule runs, bundle upload/reload
49
66
  - **Mindmap**: knowledge-graph query UI (requires `POST /api/gateway/kg/query`)
50
67
  - **Backlog / Inbox (reports + email) / Processes**: maintainer tooling (high trust; requires additional gateway endpoints)
@@ -63,7 +80,7 @@ All pages share the same gateway connection settings.
63
80
  - Changelog: `CHANGELOG.md`
64
81
  - Contributing: `CONTRIBUTING.md`
65
82
  - Security policy (vulnerability reporting): `SECURITY.md`
66
- - Acknowledments: `ACKNOWLEDMENTS.md`
83
+ - Acknowledgments: `ACKNOWLEDGMENTS.md`
67
84
 
68
85
  ## Development (from source)
69
86
  ```bash
package/bin/cli.js CHANGED
@@ -15,9 +15,21 @@ const DIST_DIR = join(__dirname, '..', 'dist');
15
15
  const PORT = process.env.PORT || 3001;
16
16
  const HOST = process.env.HOST || '0.0.0.0';
17
17
  const ARGV = process.argv.slice(2);
18
+ function parse_bool_env(name) {
19
+ const raw = process.env[name];
20
+ if (raw === undefined || raw === null || String(raw).trim() === "") return undefined;
21
+ const normalized = String(raw).trim().toLowerCase();
22
+ if (["1", "true", "yes", "on"].includes(normalized)) return true;
23
+ if (["0", "false", "no", "off"].includes(normalized)) return false;
24
+ console.warn(`#FALLBACK: ${name}="${raw}" is not a boolean; defaulting to false.`);
25
+ return false;
26
+ }
27
+
18
28
  const MONITOR_GPU =
19
29
  ARGV.includes("--monitor-gpu") ||
20
30
  ["1", "true", "yes", "on"].includes(String(process.env.ABSTRACTOBSERVER_MONITOR_GPU || "").trim().toLowerCase());
31
+ const ENABLE_BACKLOG = parse_bool_env("ABSTRACTOBSERVER_ENABLE_BACKLOG");
32
+ const ENABLE_INBOX_TRIAGE = parse_bool_env("ABSTRACTOBSERVER_ENABLE_INBOX_TRIAGE");
21
33
 
22
34
  // MIME types for common file extensions
23
35
  const MIME_TYPES = {
@@ -40,10 +52,14 @@ function getMimeType(filePath) {
40
52
  }
41
53
 
42
54
  function inject_config_html(html) {
43
- if (!MONITOR_GPU) return html;
55
+ const ui_config = {};
56
+ if (MONITOR_GPU) ui_config.monitor_gpu = true;
57
+ if (ENABLE_BACKLOG !== undefined) ui_config.enable_backlog = ENABLE_BACKLOG;
58
+ if (ENABLE_INBOX_TRIAGE !== undefined) ui_config.enable_inbox_triage = ENABLE_INBOX_TRIAGE;
59
+ if (!Object.keys(ui_config).length) return html;
44
60
  const marker = "window.__ABSTRACT_UI_CONFIG__";
45
61
  if (html.includes(marker)) return html;
46
- const snippet = `<script>${marker}=Object.assign(${marker}||{}, { monitor_gpu: true });</script>`;
62
+ const snippet = `<script>${marker}=Object.assign(${marker}||{}, ${JSON.stringify(ui_config)});</script>`;
47
63
  if (html.includes("</head>")) return html.replace("</head>", `${snippet}\n</head>`);
48
64
  if (html.includes("</body>")) return html.replace("</body>", `${snippet}\n</body>`);
49
65
  return `${html}\n${snippet}\n`;