@koda-sl/baker-bridge 0.149.0-dev.3d350da58 → 0.152.0-dev.1a19b1876
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 +9 -3
- package/dist/hono/agent.js +1 -1
- package/dist/hono/agent.js.map +1 -1
- package/dist/hono/bridge-job.d.ts +1 -1
- package/dist/hono/bridge-job.d.ts.map +1 -1
- package/dist/hono/bridge-job.js +10 -7
- package/dist/hono/bridge-job.js.map +1 -1
- package/dist/hono/bridge-job.test.js +65 -1
- package/dist/hono/bridge-job.test.js.map +1 -1
- package/dist/hono/cli-sync.d.ts +0 -2
- package/dist/hono/cli-sync.d.ts.map +1 -1
- package/dist/hono/cli-sync.js +45 -30
- package/dist/hono/cli-sync.js.map +1 -1
- package/dist/hono/cli-sync.test.js +45 -4
- package/dist/hono/cli-sync.test.js.map +1 -1
- package/dist/hono/main-sync.d.ts +6 -5
- package/dist/hono/main-sync.d.ts.map +1 -1
- package/dist/hono/main-sync.js +21 -18
- package/dist/hono/main-sync.js.map +1 -1
- package/dist/hono/main-sync.test.js +17 -8
- package/dist/hono/main-sync.test.js.map +1 -1
- package/package.json +3 -1
|
@@ -1329,6 +1329,38 @@ describe("BridgeJobExecutor", () => {
|
|
|
1329
1329
|
}, activeControls());
|
|
1330
1330
|
expect(queryInputs[0]?.prompt).toBe("/audit-google-ads-account 3865083115");
|
|
1331
1331
|
});
|
|
1332
|
+
it("keeps a skill command leading when catching up with main is what brought the skill in", async () => {
|
|
1333
|
+
const workspace = await mkdtemp(join(tmpdir(), "baker-job-skill-caught-up-"));
|
|
1334
|
+
await mkdir(join(workspace, ".claude", "skills", "landing"), { recursive: true });
|
|
1335
|
+
projectRootMock.value = workspace;
|
|
1336
|
+
const queryInputs = [];
|
|
1337
|
+
let told = 0;
|
|
1338
|
+
const executor = createExecutor({
|
|
1339
|
+
queryInputs,
|
|
1340
|
+
queryResults: [scriptedMessages(resultMessage(0, "session_skill_caught_up"))],
|
|
1341
|
+
catchUpWithMain: async () => {
|
|
1342
|
+
await mkdir(join(workspace, ".claude", "skills", "audit-google-ads-account"), { recursive: true });
|
|
1343
|
+
return {
|
|
1344
|
+
inWorkspace: true,
|
|
1345
|
+
changed: [".claude/skills/audit-google-ads-account/SKILL.md"],
|
|
1346
|
+
told: () => {
|
|
1347
|
+
told += 1;
|
|
1348
|
+
return Promise.resolve();
|
|
1349
|
+
},
|
|
1350
|
+
};
|
|
1351
|
+
},
|
|
1352
|
+
});
|
|
1353
|
+
await executor.execute({
|
|
1354
|
+
threadId: "thread_skill_caught_up",
|
|
1355
|
+
turnId: "turn_skill_caught_up",
|
|
1356
|
+
prompt: "/audit-google-ads-account 3865083115",
|
|
1357
|
+
history: history([]),
|
|
1358
|
+
currentSender: { name: "Dana", userId: "user_dana" },
|
|
1359
|
+
}, activeControls());
|
|
1360
|
+
expect(queryInputs[0]?.prompt).toBe("/audit-google-ads-account 3865083115");
|
|
1361
|
+
expect(queryInputs[0]?.reminder).toBeUndefined();
|
|
1362
|
+
expect(told).toBe(0);
|
|
1363
|
+
});
|
|
1332
1364
|
it("passes per-turn MCP servers into Agent SDK query options with the acting user", async () => {
|
|
1333
1365
|
const queryInputs = [];
|
|
1334
1366
|
const calls = [];
|
|
@@ -1654,9 +1686,17 @@ describe("BridgeJobExecutor", () => {
|
|
|
1654
1686
|
});
|
|
1655
1687
|
it("tells the agent which files another chat's publish just brought into its workspace", async () => {
|
|
1656
1688
|
const queryInputs = [];
|
|
1689
|
+
let told = 0;
|
|
1657
1690
|
const executor = createExecutor({
|
|
1658
1691
|
queryInputs,
|
|
1659
|
-
catchUpWithMain: async () => ({
|
|
1692
|
+
catchUpWithMain: async () => ({
|
|
1693
|
+
inWorkspace: true,
|
|
1694
|
+
changed: ["src/pages/home/hero.md"],
|
|
1695
|
+
told: () => {
|
|
1696
|
+
told += 1;
|
|
1697
|
+
return Promise.resolve();
|
|
1698
|
+
},
|
|
1699
|
+
}),
|
|
1660
1700
|
});
|
|
1661
1701
|
await executor.execute({
|
|
1662
1702
|
threadId: "thread_caught_up",
|
|
@@ -1674,6 +1714,30 @@ describe("BridgeJobExecutor", () => {
|
|
|
1674
1714
|
expect(queryInputs[0]?.prompt).toContain("Sin entrada, paga en 24 meses");
|
|
1675
1715
|
expect(queryInputs[0]?.reminder).toContain("Read again any of them you work on");
|
|
1676
1716
|
expect(queryInputs[0]?.reminder).toContain("- src/pages/home/hero.md");
|
|
1717
|
+
expect(told).toBe(1);
|
|
1718
|
+
});
|
|
1719
|
+
it("keeps the note for the next turn when the user stops this one while the workspace catches up", async () => {
|
|
1720
|
+
const queryInputs = [];
|
|
1721
|
+
const controls = activeControls();
|
|
1722
|
+
let told = 0;
|
|
1723
|
+
const executor = createExecutor({
|
|
1724
|
+
queryInputs,
|
|
1725
|
+
catchUpWithMain: () => {
|
|
1726
|
+
controls.deactivate();
|
|
1727
|
+
return Promise.resolve({
|
|
1728
|
+
inWorkspace: false,
|
|
1729
|
+
changed: ["src/pages/home/hero.md"],
|
|
1730
|
+
told: () => {
|
|
1731
|
+
told += 1;
|
|
1732
|
+
return Promise.resolve();
|
|
1733
|
+
},
|
|
1734
|
+
});
|
|
1735
|
+
},
|
|
1736
|
+
});
|
|
1737
|
+
const outcome = await executor.execute({ threadId: "thread_stopped", turnId: "turn_stopped", prompt: "Cambia el hero", history: history([]) }, controls);
|
|
1738
|
+
expect(outcome.kind).toBe("cancelled");
|
|
1739
|
+
expect(queryInputs).toHaveLength(0);
|
|
1740
|
+
expect(told).toBe(0);
|
|
1677
1741
|
});
|
|
1678
1742
|
it("leaves the workspace of a finished Session alone while it is reviewed", async () => {
|
|
1679
1743
|
let caughtUp = false;
|