@fro.bot/space-bus 0.3.0 → 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/README.md CHANGED
@@ -63,7 +63,7 @@ Set `SPACE_BUS_CONFIG` to override roster discovery — it must be an absolute p
63
63
  ## Tools
64
64
 
65
65
  - `bus_roster` — List the space-bus manifest projects with live session status per project.
66
- - `bus_task` — Dispatch a prompt to an agent in the given space-bus manifest project, or steer an existing session by passing `sessionId` (answers its pending question, else sends a follow-up prompt). Returns immediately; does not wait for completion.
66
+ - `bus_task` — Dispatch a prompt to an agent in the given space-bus manifest project, or steer an existing session by passing `sessionId` (answers its pending question, else sends a follow-up prompt). Returns immediately; does not wait for completion. Alongside the formatted text, results carry structured `{sessionId, project, mode}` metadata — plugin `ToolResult.metadata` on the tool surface, MCP `structuredContent` on the stdio surface — for callers that want the dispatch outcome without parsing the string.
67
67
  - `bus_status` — Report a space-bus session's status plus a summary of its latest todo and diff. Also reports when the session is blocked on an interactive question awaiting a reply.
68
68
  - `bus_result` — Return a completed space-bus session's final assistant message and diff. Errors if the session is still running — use `bus_status` to check first.
69
69
 
@@ -73,7 +73,7 @@ Experimental subpath exports expose the bus's semantics directly — the same fu
73
73
 
74
74
  - `@fro.bot/space-bus/core` — browser-safe; no Node builtins, no ambient env reads. Every exported function takes a `context: BusContext` (`{ roster, credentials? }`) that you build yourself and pass in — core never resolves it for you. Includes `snapshot()`, a one-call composite of roster + per-project status + pending questions with bounded fan-out.
75
75
  - `@fro.bot/space-bus/config` — Node-only. `loadContext(directory?)` reads `spacebus.json` (honoring `SPACE_BUS_CONFIG` the same as the plugin) and returns a ready-to-use `BusContext`, with per-project `exists` flags and env-derived credentials attached. Build a fresh context per call; it's per-call/short-lived by contract, not meant to be cached across filesystem changes.
76
- - `@fro.bot/space-bus/contract` — the zod schemas (and inferred types) behind the OpenCode API and `BusContext`, for consumers hitting the server directly and wanting the same shapes.
76
+ - `@fro.bot/space-bus/contract` — the zod schemas (and inferred types) behind the OpenCode API and `BusContext`, for consumers hitting the server directly and wanting the same shapes. Schemas are zod v4.
77
77
  - `@fro.bot/space-bus/format` — the pure formatters the tools use to render output, for tool-identical text.
78
78
 
79
79
  Node example (`/config` + `/core`):
package/dist/config.d.ts CHANGED
@@ -2,44 +2,14 @@ import { z } from "zod";
2
2
  import type { BusContext } from "./contract";
3
3
  export declare const manifestSchema: z.ZodObject<{
4
4
  server: z.ZodObject<{
5
- baseUrl: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- baseUrl: string;
8
- }, {
9
- baseUrl: string;
10
- }>;
5
+ baseUrl: z.ZodURL;
6
+ }, z.core.$strip>;
11
7
  projects: z.ZodArray<z.ZodObject<{
12
8
  name: z.ZodString;
13
9
  path: z.ZodString;
14
10
  description: z.ZodString;
15
- }, "strip", z.ZodTypeAny, {
16
- path: string;
17
- name: string;
18
- description: string;
19
- }, {
20
- path: string;
21
- name: string;
22
- description: string;
23
- }>, "many">;
24
- }, "strip", z.ZodTypeAny, {
25
- server: {
26
- baseUrl: string;
27
- };
28
- projects: {
29
- path: string;
30
- name: string;
31
- description: string;
32
- }[];
33
- }, {
34
- server: {
35
- baseUrl: string;
36
- };
37
- projects: {
38
- path: string;
39
- name: string;
40
- description: string;
41
- }[];
42
- }>;
11
+ }, z.core.$strip>>;
12
+ }, z.core.$strip>;
43
13
  export type Manifest = z.infer<typeof manifestSchema>;
44
14
  export declare function expandHome(path: string): string;
45
15
  /**
package/dist/config.js CHANGED
@@ -4,7 +4,7 @@ import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { z } from "zod";
6
6
  var manifestSchema = z.object({
7
- server: z.object({ baseUrl: z.string().url() }),
7
+ server: z.object({ baseUrl: z.url() }),
8
8
  projects: z.array(z.object({
9
9
  name: z.string(),
10
10
  path: z.string(),