Skip to content

Commit 105984c

Browse files
authored
feat(cli): add IBM Bob runtime support (#3930)
1 parent d4485b5 commit 105984c

5 files changed

Lines changed: 67 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Try a prompt like:
4949

5050
> Using `/hyperframes`, create a 10-second product intro with a fade-in title, a background video, and subtle background music.
5151
52-
The skills teach agents the HyperFrames production loop: plan the video, write valid HTML, wire seekable animations, add media, lint, preview, and render. They work with Claude Code, Cursor, Gemini CLI, Codex, and other coding agents that support skills.
52+
The skills teach agents the HyperFrames production loop: plan the video, write valid HTML, wire seekable animations, add media, lint, preview, and render. They work with IBM Bob, Claude Code, Cursor, Gemini CLI, Codex, and other coding agents that support skills.
5353

5454
## Skills
5555

‎docs/guides/skills.mdx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ Install or refresh one workflow explicitly:
5252
npx hyperframes skills update pr-to-video
5353
```
5454

55+
## Use the skills in IBM Bob
56+
57+
Run `npx hyperframes skills update`, then open or restart Bob Shell in the
58+
project folder so it discovers the skills linked under `~/.bob/skills`:
59+
60+
```bash
61+
bob
62+
```
63+
64+
Ask Bob to use `/hyperframes` for the first request. Running the update again
65+
refreshes the same global skill bundles without changing the project format.
66+
5567
## Use the skills in Google Antigravity
5668

5769
Install the skills from the root of the project you open in Antigravity:

‎packages/cli/src/telemetry/agent_runtime.test.ts‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { HINT_KEY_PATTERN } from "./agent_runtime.js";
66
// detectSandboxRuntime is exercised through a small set of node:os mocks.
77

88
const VENDOR_ENV_KEYS = [
9+
"BOBSHELL_CLI",
10+
"BOBSHELL_API_KEY",
11+
"BOBSHELL_NO_RELAUNCH",
912
"CLAUDECODE",
1013
"CLAUDE_CODE_ENTRYPOINT",
1114
"CODEX_THREAD_ID",
@@ -96,6 +99,35 @@ describe("detectAgentRuntime — base behavior", () => {
9699
});
97100
});
98101

102+
describe("detectAgentRuntime — IBM Bob Shell", () => {
103+
const savedEnv = { ...process.env };
104+
beforeEach(stripVendorEnv);
105+
afterEach(() => {
106+
process.env = { ...savedEnv };
107+
});
108+
109+
it("detects via BOBSHELL_CLI (set on both shell execution paths)", async () => {
110+
process.env["BOBSHELL_CLI"] = "1";
111+
const { detectAgentRuntime } = await import("./agent_runtime.js");
112+
expect(detectAgentRuntime()).toBe("bob");
113+
});
114+
115+
it("wins over inherited outer-agent markers as the immediate executor", async () => {
116+
process.env["BOBSHELL_CLI"] = "1";
117+
process.env["CLAUDECODE"] = "1";
118+
process.env["CODEX_THREAD_ID"] = "thread-1";
119+
const { detectAgentRuntime } = await import("./agent_runtime.js");
120+
expect(detectAgentRuntime()).toBe("bob");
121+
});
122+
123+
it("does not treat Bob authentication or relaunch state as execution proof", async () => {
124+
process.env["BOBSHELL_API_KEY"] = "secret-not-read";
125+
process.env["BOBSHELL_NO_RELAUNCH"] = "true";
126+
const { detectAgentRuntime } = await import("./agent_runtime.js");
127+
expect(detectAgentRuntime()).toBeNull();
128+
});
129+
});
130+
99131
describe("detectAgentRuntime — Claude Code", () => {
100132
const savedEnv = { ...process.env };
101133
beforeEach(stripVendorEnv);

‎packages/cli/src/telemetry/agent_runtime.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { detectWSL } from "./platform.js";
2222
export type SandboxRuntime = "gvisor" | "firecracker" | "docker" | "kvm" | "wsl" | null;
2323

2424
export type AgentRuntime =
25+
| "bob"
2526
| "claude_code"
2627
| "codex"
2728
| "cursor"
@@ -47,6 +48,18 @@ interface VendorRule {
4748
// before more generic ones (e.g. copilot_agent before a hypothetical generic
4849
// 'github_actions' rule).
4950
const VENDOR_RULES: VendorRule[] = [
51+
// IBM Bob Shell — both shell execution paths stamp BOBSHELL_CLI=1 onto the
52+
// child environment: childProcessFallback's spawn env and executeWithPty's
53+
// PTY env. Keep this ahead of other agents because Bob inherits the parent
54+
// environment, so a Bob session launched from Codex or Claude can carry both
55+
// vendors' markers; BOBSHELL_CLI identifies the immediate executor.
56+
// BOBSHELL_API_KEY is deliberately ignored: it is an authentication setting,
57+
// not proof that Bob launched the current process.
58+
// Source: IBM Bob Shell 1.0.6 bundle (lb.childProcessFallback / executeWithPty).
59+
{
60+
name: "bob",
61+
check: (env) => typeof env["BOBSHELL_CLI"] === "string",
62+
},
5063
// Anthropic Claude Code — sets CLAUDECODE=1 on every Bash/PowerShell tool
5164
// spawn (Shell.ts:321) and CLAUDE_CODE_ENTRYPOINT at startup, inherited by
5265
// every child (main.tsx:527). Both propagate to spawned subprocesses.

‎packages/cli/src/utils/skillsMirror.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe("mirrorGlobalSkills", () => {
119119
const home = makeHome();
120120
seedStore(home, ["hyperframes", "hyperframes-core"]);
121121
installMarker(home, ".cursor"); // cursor present
122+
installMarker(home, ".bob"); // IBM Bob present
122123
installMarker(home, ".config/goose"); // goose present (XDG base)
123124
// windsurf NOT installed (no ~/.codeium/windsurf)
124125

@@ -130,6 +131,7 @@ describe("mirrorGlobalSkills", () => {
130131
});
131132
const agents = mirrored.map((m) => m.agent);
132133
expect(agents).toContain("cursor");
134+
expect(agents).toContain("bob");
133135
expect(agents).toContain("goose");
134136
expect(agents).not.toContain("windsurf");
135137

@@ -139,6 +141,12 @@ describe("mirrorGlobalSkills", () => {
139141
expect(realpathSync(link)).toBe(realpathSync(join(home, ".claude", "skills", "hyperframes")));
140142
expect(existsSync(join(link, "SKILL.md"))).toBe(true);
141143

144+
const bobLink = join(home, ".bob", "skills", "hyperframes");
145+
expect(lstatSync(bobLink).isSymbolicLink()).toBe(true);
146+
expect(realpathSync(bobLink)).toBe(
147+
realpathSync(join(home, ".claude", "skills", "hyperframes")),
148+
);
149+
142150
// goose lands in the XDG config dir (~/.config/goose), not ~/.goose
143151
expect(
144152
existsSync(join(home, ".config", "goose", "skills", "hyperframes-core", "SKILL.md")),
@@ -283,6 +291,7 @@ describe("AGENT_GLOBAL_DIRS (generated table)", () => {
283291
const byAgent = new Map(AGENT_GLOBAL_DIRS.map((e) => [e.agent, e]));
284292
expect(byAgent.get("claude-code")).toMatchObject({ base: "claudeHome", sub: "skills" });
285293
expect(byAgent.get("cursor")).toMatchObject({ base: "home", sub: ".cursor/skills" });
294+
expect(byAgent.get("bob")).toMatchObject({ base: "home", sub: ".bob/skills" });
286295
expect(byAgent.get("codex")).toMatchObject({ base: "codexHome", sub: "skills" });
287296
expect(byAgent.get("goose")).toMatchObject({ base: "configHome", sub: "goose/skills" });
288297
expect(byAgent.get("windsurf")).toMatchObject({

0 commit comments

Comments
 (0)