@fro.bot/space-bus 0.0.0 → 0.2.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
@@ -1,5 +1,21 @@
1
+ <div align="center">
2
+
3
+ <img src="./assets/banner.svg" alt="space-bus Banner" width="100%" />
4
+
1
5
  # @fro.bot/space-bus
2
6
 
7
+ > Control project agents across workspaces
8
+
9
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/fro-bot/space-bus/ci.yaml?style=for-the-badge&label=Build&labelColor=0D0216&color=00BCD4)](https://github.com/fro-bot/space-bus/actions) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fro-bot/space-bus/badge?style=for-the-badge&labelColor=0D0216&color=E91E63)](https://securityscorecards.dev/viewer/?uri=github.com/fro-bot/space-bus) [![License](https://img.shields.io/badge/License-MIT-FFC107?style=for-the-badge&labelColor=0D0216&color=FFC107)](LICENSE)
10
+
11
+ [Overview](#overview) · [Install](#install) · [Configure](#configure) · [Tools](#tools) · [Claude Desktop](#claude-desktop) · [Development](#development)
12
+
13
+ </div>
14
+
15
+ ---
16
+
17
+ ## Overview
18
+
3
19
  Workspace agent bus for OpenCode. A control agent — an ordinary OpenCode TUI running with this plugin installed — tasks dedicated agents in each project on your roster over a single `opencode serve`/`harness serve` instance, using per-request directory routing. A thin stdio MCP facade exposes the same tools to Claude Desktop.
4
20
 
5
21
  ## Install
@@ -29,9 +45,9 @@ Space Bus reads a `spacebus.json` roster from the workspace directory (the direc
29
45
  },
30
46
  "projects": [
31
47
  {
32
- "name": "agent",
33
- "path": "~/src/github.com/fro-bot/agent",
34
- "description": "Fro Bot agent runtime + gateway + Discord integration"
48
+ "name": "my-project",
49
+ "path": "~/src/my-project",
50
+ "description": "My project's agent runtime and API"
35
51
  }
36
52
  ]
37
53
  }
@@ -92,3 +108,11 @@ bun run dev # watch build to dist/
92
108
  ## Releasing
93
109
 
94
110
  PRs land a changeset via `bunx changeset`. On merge to `main`, CI opens a version PR; merging that PR publishes to npm through trusted publishing (OIDC) — no `NPM_TOKEN` involved.
111
+
112
+ ---
113
+
114
+ <div align="center">
115
+
116
+ <sub>Part of the <a href="https://github.com/fro-bot">Fro Bot</a> ecosystem</sub>
117
+
118
+ </div>
package/dist/core.d.ts CHANGED
@@ -32,13 +32,18 @@ export type DispatchResult = {
32
32
  } | {
33
33
  mode: "question-reply" | "follow-up";
34
34
  });
35
- export declare function dispatch(args: {
36
- project?: string;
35
+ export type DispatchArgs = {
37
36
  prompt: string;
38
37
  title?: string;
39
- sessionId?: string;
40
38
  directory?: string;
41
- }): Promise<Result<DispatchResult>>;
39
+ } & ({
40
+ project: string;
41
+ sessionId?: undefined;
42
+ } | {
43
+ sessionId: string;
44
+ project?: string;
45
+ });
46
+ export declare function dispatch(args: DispatchArgs): Promise<Result<DispatchResult>>;
42
47
  export type SessionStatusResult = {
43
48
  sessionId: string;
44
49
  project: string;
package/dist/index.js CHANGED
@@ -333,6 +333,9 @@ async function dispatch(args) {
333
333
  if (!ctx.ok)
334
334
  return ctx;
335
335
  const { baseUrl, projects } = ctx;
336
+ if (args.sessionId !== undefined && args.sessionId === "") {
337
+ return err("space-bus: sessionId must be a non-empty string");
338
+ }
336
339
  if (!args.sessionId) {
337
340
  if (!args.project) {
338
341
  return err("space-bus: project is required when starting a new session");
package/dist/mcp.js CHANGED
@@ -336,6 +336,9 @@ async function dispatch(args) {
336
336
  if (!ctx.ok)
337
337
  return ctx;
338
338
  const { baseUrl, projects } = ctx;
339
+ if (args.sessionId !== undefined && args.sessionId === "") {
340
+ return err("space-bus: sessionId must be a non-empty string");
341
+ }
339
342
  if (!args.sessionId) {
340
343
  if (!args.project) {
341
344
  return err("space-bus: project is required when starting a new session");
@@ -660,9 +663,10 @@ function makeBusTask(defaultDirectory) {
660
663
  }
661
664
 
662
665
  // src/mcp.ts
666
+ var version = "0.2.0";
663
667
  var server = new McpServer({
664
668
  name: "space-bus",
665
- version: "0.0.0"
669
+ version
666
670
  });
667
671
  server.registerTool("bus_roster", {
668
672
  description: BUS_ROSTER_DESCRIPTION,
@@ -682,7 +686,7 @@ server.registerTool("bus_task", {
682
686
  sessionId: z3.string().optional().describe("Existing session ID to steer instead of starting a new session")
683
687
  }
684
688
  }, async (args) => {
685
- const r = await dispatch({ ...args });
689
+ const r = await dispatch(args);
686
690
  if (!r.ok)
687
691
  return { content: [{ type: "text", text: r.error }], isError: true };
688
692
  return { content: [{ type: "text", text: formatDispatch(r) }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/space-bus",
3
- "version": "0.0.0",
3
+ "version": "0.2.0",
4
4
  "description": "Space Bus — workspace agent bus for OpenCode. One control agent tasking per-project agents over the OpenCode server API, with an MCP facade for Claude Desktop.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -47,10 +47,10 @@
47
47
  "@opencode-ai/plugin": ">=1.17.13 <2"
48
48
  },
49
49
  "devDependencies": {
50
- "@biomejs/biome": "^2.3.0",
51
- "@changesets/cli": "^2.29.0",
50
+ "@biomejs/biome": "2.5.2",
51
+ "@changesets/cli": "2.31.0",
52
52
  "@opencode-ai/plugin": "1.17.13",
53
- "@types/bun": "^1.0.0",
54
- "typescript": "^5.8.0"
53
+ "@types/bun": "1.3.14",
54
+ "typescript": "5.9.3"
55
55
  }
56
56
  }