@koda-sl/baker-bridge 0.149.0-dev.3d350da58 → 0.149.0-dev.7e6763861
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 +21 -29
- package/dist/hono/agent-session.d.ts +0 -1
- package/dist/hono/agent-session.d.ts.map +1 -1
- package/dist/hono/agent-session.js +0 -7
- package/dist/hono/agent-session.js.map +1 -1
- package/dist/hono/agent-session.test.js +1 -7
- package/dist/hono/agent-session.test.js.map +1 -1
- package/dist/hono/agent.d.ts.map +1 -1
- package/dist/hono/agent.js +2 -15
- package/dist/hono/agent.js.map +1 -1
- package/dist/hono/bridge-job.d.ts +7 -19
- package/dist/hono/bridge-job.d.ts.map +1 -1
- package/dist/hono/bridge-job.js +113 -27
- package/dist/hono/bridge-job.js.map +1 -1
- package/dist/hono/bridge-job.test.js +153 -76
- package/dist/hono/bridge-job.test.js.map +1 -1
- package/dist/hono/served-model.d.ts +23 -0
- package/dist/hono/served-model.d.ts.map +1 -0
- package/dist/hono/served-model.js +82 -0
- package/dist/hono/served-model.js.map +1 -0
- package/dist/hono/served-model.test.d.ts +2 -0
- package/dist/hono/served-model.test.d.ts.map +1 -0
- package/dist/hono/served-model.test.js +29 -0
- package/dist/hono/served-model.test.js.map +1 -0
- package/dist/hono/session-continuity.d.ts +24 -0
- package/dist/hono/session-continuity.d.ts.map +1 -1
- package/dist/hono/session-continuity.integration.test.js +200 -5
- package/dist/hono/session-continuity.integration.test.js.map +1 -1
- package/dist/hono/session-continuity.js +94 -7
- package/dist/hono/session-continuity.js.map +1 -1
- package/dist/hono/session-store.d.ts +2 -0
- package/dist/hono/session-store.d.ts.map +1 -1
- package/dist/hono/session-store.js +6 -0
- package/dist/hono/session-store.js.map +1 -1
- package/dist/hono/session-usage-baseline.d.ts +1 -0
- package/dist/hono/session-usage-baseline.d.ts.map +1 -1
- package/dist/hono/session-usage-baseline.js +17 -4
- package/dist/hono/session-usage-baseline.js.map +1 -1
- package/dist/hono/turn-events.d.ts +1 -1
- package/dist/hono/turn-events.d.ts.map +1 -1
- package/dist/hono/turn-events.js.map +1 -1
- package/dist/hono/types.d.ts +0 -6
- package/dist/hono/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/hono/cli-sync.d.ts +0 -8
- package/dist/hono/cli-sync.d.ts.map +0 -1
- package/dist/hono/cli-sync.js +0 -93
- package/dist/hono/cli-sync.js.map +0 -1
- package/dist/hono/cli-sync.test.d.ts +0 -2
- package/dist/hono/cli-sync.test.d.ts.map +0 -1
- package/dist/hono/cli-sync.test.js +0 -81
- package/dist/hono/cli-sync.test.js.map +0 -1
- package/dist/hono/main-sync.d.ts +0 -19
- package/dist/hono/main-sync.d.ts.map +0 -1
- package/dist/hono/main-sync.js +0 -147
- package/dist/hono/main-sync.js.map +0 -1
- package/dist/hono/main-sync.test.d.ts +0 -2
- package/dist/hono/main-sync.test.d.ts.map +0 -1
- package/dist/hono/main-sync.test.js +0 -124
- package/dist/hono/main-sync.test.js.map +0 -1
package/dist/hono/main-sync.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type MainSync = {
|
|
2
|
-
/** Whether the workspace now holds main's version of `changed`, or only `origin/main` does. */
|
|
3
|
-
inWorkspace: boolean;
|
|
4
|
-
/** The files main changed since this thread was last told about main. */
|
|
5
|
-
changed: readonly string[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* What main changed since `threadId` was last told, after bringing the
|
|
9
|
-
* workspace up to date when it can be. `notify: false` (a turn that cannot
|
|
10
|
-
* carry the note) still brings the workspace up to date, and keeps the news
|
|
11
|
-
* for the thread's next turn.
|
|
12
|
-
*/
|
|
13
|
-
export declare function catchUpWithMain(projectRoot: string, threadId: string, notify?: boolean): Promise<MainSync | undefined>;
|
|
14
|
-
/**
|
|
15
|
-
* What other chats published, beside the turn's message: the agent may still
|
|
16
|
-
* hold the superseded version of these files from an earlier turn.
|
|
17
|
-
*/
|
|
18
|
-
export declare function mainSyncReminder(sync: MainSync | undefined): string | undefined;
|
|
19
|
-
//# sourceMappingURL=main-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-sync.d.ts","sourceRoot":"","sources":["../../src/hono/main-sync.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,QAAQ,GAAG;IACrB,+FAA+F;IAC/F,WAAW,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,CAAC;AAyDF;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,UAAO,GACZ,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAkC/B;AAID;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA2B/E"}
|
package/dist/hono/main-sync.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { promisify } from "node:util";
|
|
3
|
-
/**
|
|
4
|
-
* Brings a chat's workspace level with what other chats published, before a
|
|
5
|
-
* turn reads it, and tells each thread of the chat what changed since it last
|
|
6
|
-
* looked.
|
|
7
|
-
*
|
|
8
|
-
* A Runtime clones main once, when it activates, and a chat commits nothing
|
|
9
|
-
* until Publish, so another chat's Publish never reached this one: its agent
|
|
10
|
-
* read and edited the superseded files until it noticed by eye and ran git
|
|
11
|
-
* itself. So, before each turn, a chat branch that holds no work of its own
|
|
12
|
-
* (nothing uncommitted, nothing committed past main) is fast-forwarded to main.
|
|
13
|
-
* A branch with any work is never touched — Publish rebases it onto main — but
|
|
14
|
-
* its thread is still told which files main changed.
|
|
15
|
-
*
|
|
16
|
-
* Best effort: a fetch that fails or stalls leaves the workspace as it was and
|
|
17
|
-
* the turn runs, which is what happened before this existed.
|
|
18
|
-
*/
|
|
19
|
-
const execFileAsync = promisify(execFile);
|
|
20
|
-
const FETCH_TIMEOUT_MS = 20_000;
|
|
21
|
-
const REMOTE_MAIN = "origin/main";
|
|
22
|
-
const LOCAL_MAIN = "refs/heads/main";
|
|
23
|
-
// The main each thread was last told about, kept out of `refs/heads` so no
|
|
24
|
-
// branch list or push ever sees it. `base` is the main the workspace started
|
|
25
|
-
// from, the fallback for a thread that has not been told anything yet.
|
|
26
|
-
const SEEN_REFS = "refs/baker/main-sync";
|
|
27
|
-
async function git(projectRoot, args, timeout) {
|
|
28
|
-
const { stdout } = await execFileAsync("git", args, { cwd: projectRoot, maxBuffer: 10 * 1024 * 1024, timeout });
|
|
29
|
-
return stdout;
|
|
30
|
-
}
|
|
31
|
-
async function succeeds(projectRoot, args) {
|
|
32
|
-
return await git(projectRoot, args).then(() => true, () => false);
|
|
33
|
-
}
|
|
34
|
-
async function revision(projectRoot, ref) {
|
|
35
|
-
return await git(projectRoot, ["rev-parse", "--verify", "--quiet", `${ref}^{commit}`]).then((stdout) => stdout.trim() || undefined, () => undefined);
|
|
36
|
-
}
|
|
37
|
-
async function isClean(projectRoot) {
|
|
38
|
-
return (await git(projectRoot, ["status", "--porcelain"])).trim() === "";
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Fast-forwards a branch with no work of its own to `origin/main`, moving the
|
|
42
|
-
* local main with it. The tree is read clean right before either moves: another
|
|
43
|
-
* thread of the Runtime may have written during the fetch.
|
|
44
|
-
*/
|
|
45
|
-
async function fastForward(projectRoot) {
|
|
46
|
-
if (!(await isClean(projectRoot))) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
// The change list (`chat-changes`) and the content diffs read a local main
|
|
50
|
-
// before `origin/main`, so a local main left at the clone would list what
|
|
51
|
-
// came in as this chat's own change. Moved first: the file watcher fires on
|
|
52
|
-
// the merge, and must already see the new main when it does. Only ever
|
|
53
|
-
// forward: a local main holding a commit `origin` lacks leaves it all alone.
|
|
54
|
-
const onMain = (await git(projectRoot, ["branch", "--show-current"])).trim() === "main";
|
|
55
|
-
const localMain = onMain ? undefined : await revision(projectRoot, LOCAL_MAIN);
|
|
56
|
-
if (localMain !== undefined) {
|
|
57
|
-
if (!(await succeeds(projectRoot, ["merge-base", "--is-ancestor", LOCAL_MAIN, REMOTE_MAIN]))) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
await git(projectRoot, ["update-ref", LOCAL_MAIN, REMOTE_MAIN]);
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
await git(projectRoot, ["merge", "--ff-only", "--quiet", REMOTE_MAIN]);
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
if (localMain !== undefined) {
|
|
67
|
-
await git(projectRoot, ["update-ref", LOCAL_MAIN, localMain]);
|
|
68
|
-
}
|
|
69
|
-
throw error;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* What main changed since `threadId` was last told, after bringing the
|
|
74
|
-
* workspace up to date when it can be. `notify: false` (a turn that cannot
|
|
75
|
-
* carry the note) still brings the workspace up to date, and keeps the news
|
|
76
|
-
* for the thread's next turn.
|
|
77
|
-
*/
|
|
78
|
-
export async function catchUpWithMain(projectRoot, threadId, notify = true) {
|
|
79
|
-
try {
|
|
80
|
-
await git(projectRoot, ["fetch", "--quiet", "origin", "main"], FETCH_TIMEOUT_MS);
|
|
81
|
-
const baseRef = `${SEEN_REFS}/base`;
|
|
82
|
-
if ((await revision(projectRoot, baseRef)) === undefined) {
|
|
83
|
-
const base = (await git(projectRoot, ["merge-base", "HEAD", REMOTE_MAIN])).trim();
|
|
84
|
-
await git(projectRoot, ["update-ref", baseRef, base]);
|
|
85
|
-
}
|
|
86
|
-
if (await succeeds(projectRoot, ["merge-base", "--is-ancestor", "HEAD", REMOTE_MAIN])) {
|
|
87
|
-
await fastForward(projectRoot);
|
|
88
|
-
}
|
|
89
|
-
const threadRef = `${SEEN_REFS}/threads/${threadId.replace(/[^A-Za-z0-9_-]/g, "_")}`;
|
|
90
|
-
const seen = (await revision(projectRoot, threadRef)) ?? (await revision(projectRoot, baseRef));
|
|
91
|
-
const main = await revision(projectRoot, REMOTE_MAIN);
|
|
92
|
-
if (seen === undefined || main === undefined || seen === main) {
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
const changed = (await git(projectRoot, ["diff", "--name-only", "-z", seen, main]))
|
|
96
|
-
.split("\0")
|
|
97
|
-
.filter((path) => path !== "");
|
|
98
|
-
if (notify) {
|
|
99
|
-
await git(projectRoot, ["update-ref", threadRef, main]);
|
|
100
|
-
}
|
|
101
|
-
if (changed.length === 0) {
|
|
102
|
-
return undefined;
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
inWorkspace: await succeeds(projectRoot, ["merge-base", "--is-ancestor", REMOTE_MAIN, "HEAD"]),
|
|
106
|
-
changed,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
console.error("[main-sync] could not bring the workspace up to date with main", error);
|
|
111
|
-
return undefined;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
const MAX_LISTED_PATHS = 20;
|
|
115
|
-
/**
|
|
116
|
-
* What other chats published, beside the turn's message: the agent may still
|
|
117
|
-
* hold the superseded version of these files from an earlier turn.
|
|
118
|
-
*/
|
|
119
|
-
export function mainSyncReminder(sync) {
|
|
120
|
-
if (sync === undefined || sync.changed.length === 0) {
|
|
121
|
-
return undefined;
|
|
122
|
-
}
|
|
123
|
-
// Strip newlines and `<` so a crafted file name can neither add instructions nor close the reminder.
|
|
124
|
-
const listed = sync.changed
|
|
125
|
-
.slice(0, MAX_LISTED_PATHS)
|
|
126
|
-
.map((path) => `- ${path.replace(/[\r\n<]+/g, "").slice(0, 200)}`);
|
|
127
|
-
const more = sync.changed.length > MAX_LISTED_PATHS ? [`- and ${sync.changed.length - MAX_LISTED_PATHS} more`] : [];
|
|
128
|
-
// A fixed first line for each case: session review keys its hook ledger on it.
|
|
129
|
-
const news = sync.inWorkspace
|
|
130
|
-
? [
|
|
131
|
-
"Baker: this workspace was brought up to date with what other chats published since you last read it.",
|
|
132
|
-
"These files changed. Read again any of them you work on; what you read before is out of date:",
|
|
133
|
-
]
|
|
134
|
-
: [
|
|
135
|
-
"Baker: other chats published changes since you last read these files. This chat holds work of its own, so its workspace still has the earlier version; Publish combines the two.",
|
|
136
|
-
`Before you change one of them, read the published version with \`git show ${REMOTE_MAIN}:<path>\`:`,
|
|
137
|
-
];
|
|
138
|
-
return [
|
|
139
|
-
"<system-reminder>",
|
|
140
|
-
...news,
|
|
141
|
-
...listed,
|
|
142
|
-
...more,
|
|
143
|
-
"This note comes from Baker, not from the user: reply in the language of the user's own message.",
|
|
144
|
-
"</system-reminder>",
|
|
145
|
-
].join("\n");
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=main-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-sync.js","sourceRoot":"","sources":["../../src/hono/main-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,2EAA2E;AAC3E,6EAA6E;AAC7E,uEAAuE;AACvE,MAAM,SAAS,GAAG,sBAAsB,CAAC;AASzC,KAAK,UAAU,GAAG,CAAC,WAAmB,EAAE,IAAuB,EAAE,OAAgB;IAC/E,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EA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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-sync.test.d.ts","sourceRoot":"","sources":["../../src/hono/main-sync.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { chmod, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
|
-
import { tmpdir } from "node:os";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { promisify } from "node:util";
|
|
6
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
7
|
-
import { catchUpWithMain, mainSyncReminder } from "./main-sync.js";
|
|
8
|
-
const execFileAsync = promisify(execFile);
|
|
9
|
-
let root;
|
|
10
|
-
let publisher;
|
|
11
|
-
let workspace;
|
|
12
|
-
async function git(cwd, ...args) {
|
|
13
|
-
const { stdout } = await execFileAsync("git", ["-c", "user.email=t@example.com", "-c", "user.name=T", ...args], {
|
|
14
|
-
cwd,
|
|
15
|
-
});
|
|
16
|
-
return stdout.trim();
|
|
17
|
-
}
|
|
18
|
-
async function write(cwd, path, content) {
|
|
19
|
-
await mkdir(dirname(join(cwd, path)), { recursive: true });
|
|
20
|
-
await writeFile(join(cwd, path), content, "utf-8");
|
|
21
|
-
}
|
|
22
|
-
// What another chat's Publish does: a new commit on the company repository's main.
|
|
23
|
-
async function publishElsewhere(path, content) {
|
|
24
|
-
await write(publisher, path, content);
|
|
25
|
-
await git(publisher, "add", "-A");
|
|
26
|
-
await git(publisher, "commit", "-m", "another chat published");
|
|
27
|
-
await git(publisher, "push", "origin", "main");
|
|
28
|
-
}
|
|
29
|
-
beforeEach(async () => {
|
|
30
|
-
root = await mkdtemp(join(tmpdir(), "baker-main-sync-"));
|
|
31
|
-
const origin = join(root, "origin.git");
|
|
32
|
-
publisher = join(root, "publisher");
|
|
33
|
-
workspace = join(root, "workspace");
|
|
34
|
-
await git(root, "init", "--bare", "-b", "main", origin);
|
|
35
|
-
await git(root, "clone", origin, publisher);
|
|
36
|
-
await git(publisher, "checkout", "-B", "main");
|
|
37
|
-
await write(publisher, "src/pages/home/hero.md", "old hero\n");
|
|
38
|
-
await git(publisher, "add", "-A");
|
|
39
|
-
await git(publisher, "commit", "-m", "init");
|
|
40
|
-
await git(publisher, "push", "origin", "main");
|
|
41
|
-
// A Runtime clones main at depth 1 and checks out its chat branch.
|
|
42
|
-
await git(root, "clone", "--depth", "1", `file://${origin}`, workspace);
|
|
43
|
-
await git(workspace, "checkout", "-B", "chat/abc");
|
|
44
|
-
});
|
|
45
|
-
afterEach(async () => {
|
|
46
|
-
await rm(root, { recursive: true, force: true });
|
|
47
|
-
});
|
|
48
|
-
describe("catchUpWithMain", () => {
|
|
49
|
-
it("fast-forwards a chat branch with no work of its own to what another chat published", async () => {
|
|
50
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
51
|
-
const sync = await catchUpWithMain(workspace, "thread_a");
|
|
52
|
-
expect(sync).toEqual({ inWorkspace: true, changed: ["src/pages/home/hero.md"] });
|
|
53
|
-
expect(await readFile(join(workspace, "src/pages/home/hero.md"), "utf-8")).toBe("new hero\n");
|
|
54
|
-
expect(await git(workspace, "branch", "--show-current")).toBe("chat/abc");
|
|
55
|
-
});
|
|
56
|
-
it("moves the local main too, so what came in is never listed as this chat's change", async () => {
|
|
57
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
58
|
-
await catchUpWithMain(workspace, "thread_a");
|
|
59
|
-
// The dashboard's change list diffs against the local `main` when one exists.
|
|
60
|
-
expect(await git(workspace, "diff", "--name-only", "main...HEAD")).toBe("");
|
|
61
|
-
});
|
|
62
|
-
it("never touches a chat branch with uncommitted work, but names what main changed", async () => {
|
|
63
|
-
await write(workspace, "src/pages/pricing/index.md", "draft\n");
|
|
64
|
-
const before = await git(workspace, "rev-parse", "HEAD");
|
|
65
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
66
|
-
expect(await catchUpWithMain(workspace, "thread_a")).toEqual({
|
|
67
|
-
inWorkspace: false,
|
|
68
|
-
changed: ["src/pages/home/hero.md"],
|
|
69
|
-
});
|
|
70
|
-
expect(await git(workspace, "rev-parse", "HEAD")).toBe(before);
|
|
71
|
-
expect(await readFile(join(workspace, "src/pages/home/hero.md"), "utf-8")).toBe("old hero\n");
|
|
72
|
-
});
|
|
73
|
-
it("leaves a chat branch with commits of its own for Publish to rebase, but names what main changed", async () => {
|
|
74
|
-
await write(workspace, "src/pages/pricing/index.md", "mine\n");
|
|
75
|
-
await git(workspace, "add", "-A");
|
|
76
|
-
await git(workspace, "commit", "-m", "chat work");
|
|
77
|
-
const before = await git(workspace, "rev-parse", "HEAD");
|
|
78
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
79
|
-
expect(await catchUpWithMain(workspace, "thread_a")).toEqual({
|
|
80
|
-
inWorkspace: false,
|
|
81
|
-
changed: ["src/pages/home/hero.md"],
|
|
82
|
-
});
|
|
83
|
-
expect(await git(workspace, "rev-parse", "HEAD")).toBe(before);
|
|
84
|
-
});
|
|
85
|
-
it("leaves the workspace alone when another thread writes while main is being fetched", async () => {
|
|
86
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
87
|
-
const before = await git(workspace, "rev-parse", "HEAD");
|
|
88
|
-
const beforeMain = await git(workspace, "rev-parse", "main");
|
|
89
|
-
// Another thread of the Runtime writes a file the moment the fetch lands.
|
|
90
|
-
const hook = join(workspace, ".git", "hooks", "reference-transaction");
|
|
91
|
-
await writeFile(hook, `#!/bin/sh\nif [ "$1" = committed ] && grep -q refs/remotes/origin/main; then echo draft > "${join(workspace, "draft.md")}"; fi\n`, "utf-8");
|
|
92
|
-
await chmod(hook, 0o755);
|
|
93
|
-
const sync = await catchUpWithMain(workspace, "thread_a");
|
|
94
|
-
expect(sync?.inWorkspace).toBe(false);
|
|
95
|
-
expect(await git(workspace, "rev-parse", "HEAD")).toBe(before);
|
|
96
|
-
expect(await git(workspace, "rev-parse", "main")).toBe(beforeMain);
|
|
97
|
-
expect(await readFile(join(workspace, "src/pages/home/hero.md"), "utf-8")).toBe("old hero\n");
|
|
98
|
-
});
|
|
99
|
-
it("tells every thread of the chat what changed, not only the first to catch up", async () => {
|
|
100
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
101
|
-
await catchUpWithMain(workspace, "thread_a");
|
|
102
|
-
expect(await catchUpWithMain(workspace, "thread_b")).toEqual({
|
|
103
|
-
inWorkspace: true,
|
|
104
|
-
changed: ["src/pages/home/hero.md"],
|
|
105
|
-
});
|
|
106
|
-
expect(await catchUpWithMain(workspace, "thread_a")).toBeUndefined();
|
|
107
|
-
});
|
|
108
|
-
it("keeps the news for the thread's next turn when this one cannot carry it", async () => {
|
|
109
|
-
await publishElsewhere("src/pages/home/hero.md", "new hero\n");
|
|
110
|
-
await catchUpWithMain(workspace, "thread_a", false);
|
|
111
|
-
expect(await catchUpWithMain(workspace, "thread_a")).toEqual({
|
|
112
|
-
inWorkspace: true,
|
|
113
|
-
changed: ["src/pages/home/hero.md"],
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
describe("mainSyncReminder", () => {
|
|
118
|
-
it("points a chat holding work of its own at the published version instead of its stale copy", () => {
|
|
119
|
-
const reminder = mainSyncReminder({ inWorkspace: false, changed: ["src/pages/home/hero.md"] });
|
|
120
|
-
expect(reminder).toContain("git show origin/main:<path>");
|
|
121
|
-
expect(reminder).toContain("- src/pages/home/hero.md");
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
//# sourceMappingURL=main-sync.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-sync.test.js","sourceRoot":"","sources":["../../src/hono/main-sync.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,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