@polderlabs/bizar-omp 0.3.5 → 0.3.6
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 +3 -1
- package/dist/omp/tmux.d.ts +10 -1
- package/dist/omp/tmux.d.ts.map +1 -1
- package/dist/omp/tmux.js +31 -4
- package/dist/omp/tmux.js.map +1 -1
- package/docs/compatibility/baseline.json +1 -1
- package/docs/releases/0.3.6.md +12 -0
- package/docs/releases/native-stable.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BizarHarness OMP
|
|
2
2
|
|
|
3
|
-
Release `0.3.
|
|
3
|
+
Release `0.3.6` is the current release target; it will be published on [npm](https://www.npmjs.com/package/@polderlabs/bizar-omp) and available as a [GitHub release](https://github.com/PolderLabsVOF/BizarHarness-OMP/releases/tag/v0.3.6) after the final release gate.
|
|
4
4
|
|
|
5
5
|
BizarHarness OMP is a ground-up, native [oh-my-pi](https://github.com/can1357/oh-my-pi) extension for engineering workflows. It owns workflow intent, acceptance contracts, evidence freshness, and integration admission. OMP owns sessions, models, credentials, tools, workers, isolation, and conversation state.
|
|
6
6
|
|
|
@@ -62,6 +62,8 @@ For a session that must keep running after its visible terminal closes, Bizar au
|
|
|
62
62
|
tmux new-session -s bizar-omp -c "$PWD" omp
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
During automatic startup, Bizar starts the tmux host detached and attaches only after the original OMP process has released terminal input. This prevents tmux and the original prompt from competing over arrow keys and other escape sequences. Set `BIZAR_OMP_NO_TMUX=1` to use OMP directly in the current terminal.
|
|
66
|
+
|
|
65
67
|
Run the objective in that host, then detach with `Ctrl-b d`. Closing the terminal window or opening another OMP client does not stop the tmux host. Bizar automatically enables `collab.autoStart=control` so the host is discoverable and steerable. Later, discover and reconnect to the live host:
|
|
66
68
|
|
|
67
69
|
```sh
|
package/dist/omp/tmux.d.ts
CHANGED
|
@@ -9,6 +9,15 @@ export declare function tmuxSessionName(cwd: string, pid?: number): string;
|
|
|
9
9
|
export interface TmuxLaunchResult {
|
|
10
10
|
session: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Start a replacement OMP process without sharing the terminal with the old
|
|
14
|
+
* host, then attach only after the old host has restored the terminal.
|
|
15
|
+
*
|
|
16
|
+
* The old implementation used one foreground `tmux new-session` call with
|
|
17
|
+
* inherited stdio. OMP's session_start hook could then request shutdown while
|
|
18
|
+
* both OMP processes still had the same terminal open. Raw-mode escape
|
|
19
|
+
* sequences were consequently consumed by whichever process won the read,
|
|
20
|
+
* producing intermittent prompt-history/menu behaviour.
|
|
21
|
+
*/
|
|
13
22
|
export declare function relaunchInTmux(cwd: string, args: string[], env?: NodeJS.ProcessEnv): Promise<TmuxLaunchResult>;
|
|
14
23
|
//# sourceMappingURL=tmux.d.ts.map
|
package/dist/omp/tmux.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmux.d.ts","sourceRoot":"","sources":["../../src/omp/tmux.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAYD,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAQrF;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAc,GAAG,MAAM,CAItE;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"tmux.d.ts","sourceRoot":"","sources":["../../src/omp/tmux.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAYD,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAQrF;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAc,GAAG,MAAM,CAItE;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AASD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA4B3H"}
|
package/dist/omp/tmux.js
CHANGED
|
@@ -28,18 +28,45 @@ export function tmuxSessionName(cwd, pid = process.pid) {
|
|
|
28
28
|
const digest = createHash("sha256").update(`${cwd}\0${pid}`).digest("hex").slice(0, 10);
|
|
29
29
|
return `bizar-${label}-${digest}`.slice(0, 63);
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
const ATTACH_AFTER_PARENT_EXIT = [
|
|
32
|
+
"parent_pid=$1",
|
|
33
|
+
"shift",
|
|
34
|
+
"while kill -0 \"$parent_pid\" 2>/dev/null; do sleep 0.05; done",
|
|
35
|
+
"exec \"$@\"",
|
|
36
|
+
].join("; ");
|
|
37
|
+
/**
|
|
38
|
+
* Start a replacement OMP process without sharing the terminal with the old
|
|
39
|
+
* host, then attach only after the old host has restored the terminal.
|
|
40
|
+
*
|
|
41
|
+
* The old implementation used one foreground `tmux new-session` call with
|
|
42
|
+
* inherited stdio. OMP's session_start hook could then request shutdown while
|
|
43
|
+
* both OMP processes still had the same terminal open. Raw-mode escape
|
|
44
|
+
* sequences were consequently consumed by whichever process won the read,
|
|
45
|
+
* producing intermittent prompt-history/menu behaviour.
|
|
46
|
+
*/
|
|
32
47
|
export function relaunchInTmux(cwd, args, env = process.env) {
|
|
33
48
|
const session = tmuxSessionName(cwd);
|
|
34
49
|
const tmux = env.BIZAR_TMUX_BIN || "tmux";
|
|
35
|
-
const child = spawn(tmux, ["new-session", "-s", session, "-c", cwd, "omp", ...args], {
|
|
50
|
+
const child = spawn(tmux, ["new-session", "-d", "-s", session, "-c", cwd, "omp", ...args], {
|
|
36
51
|
cwd,
|
|
37
52
|
env: { ...env, BIZAR_OMP_NO_TMUX: "1" },
|
|
38
|
-
stdio: "
|
|
53
|
+
stdio: "ignore",
|
|
39
54
|
});
|
|
40
55
|
return new Promise((resolve, reject) => {
|
|
41
56
|
child.once("error", reject);
|
|
42
|
-
child.once("
|
|
57
|
+
child.once("close", code => {
|
|
58
|
+
if (code !== 0) {
|
|
59
|
+
reject(new Error(`tmux could not create detached session ${session} (exit ${code ?? "unknown"})`));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const attach = spawn("sh", ["-c", ATTACH_AFTER_PARENT_EXIT, "bizar-tmux-attach", String(process.pid), tmux, "attach-session", "-t", session],
|
|
63
|
+
// `tmux attach-session` does not depend on the project directory. Use
|
|
64
|
+
// the current host directory so a deleted/switched project cannot
|
|
65
|
+
// prevent the delayed handoff helper from starting.
|
|
66
|
+
{ cwd: process.cwd(), env: { ...env, BIZAR_OMP_NO_TMUX: "1" }, stdio: "inherit", detached: true });
|
|
67
|
+
attach.unref();
|
|
68
|
+
resolve({ session });
|
|
69
|
+
});
|
|
43
70
|
});
|
|
44
71
|
}
|
|
45
72
|
//# sourceMappingURL=tmux.js.map
|
package/dist/omp/tmux.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tmux.js","sourceRoot":"","sources":["../../src/omp/tmux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CA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C,EAAE,CAAC;gBACf,MAAM,CAAC,IAAI,KAAK,CAAC,0CAA0C,OAAO,UAAU,IAAI,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC;gBACnG,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,KAAK,CAClB,IAAI,EACJ,CAAC,IAAI,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,CAAC;YACjH,sEAAsE;YACtE,kEAAkE;YAClE,oDAAoD;YACpD,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAClG,CAAC;YACF,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"bizarReference": { "repository": "../BizarHarness", "commit": "e13aa131bdcd368548118464f0da1bace302e64b", "role": "reference-only" },
|
|
5
5
|
"omp": { "repository": "https://github.com/can1357/oh-my-pi", "testedVersion": "18.2.5", "testedCommit": "37273117021129e96bd05d8277b140ec3fd61990", "previouslyQualifiedVersions": ["18.2.4"], "researchedMainCommit": "dbf3afad4894bde827d90f965e77b3fe1c5a95e5", "releaseVersionSeenInResearch": "18.2.5", "releaseCommitSeenInResearch": "37273117021129e96bd05d8277b140ec3fd61990", "qualification": "The npm package was tested at 18.2.5 with integrity sha512-w9CPGYQHlXhlnjfpQkvLIxdwFHU1oQU7a291EHMxn779iQ2r97IIQlxwLG7HOFwdt7RTjAniTYnNSQmiBUuVBA==; 18.2.4 remains a separately qualified compatibility version. Package version alone does not prove source commit identity." },
|
|
6
6
|
"bun": { "minimum": "1.3.14", "probe": "bun --version is required during release qualification" },
|
|
7
|
-
"package": { "name": "@polderlabs/bizar-omp", "version": "0.3.
|
|
7
|
+
"package": { "name": "@polderlabs/bizar-omp", "version": "0.3.6", "integrity": "computed by npm pack in CI", "extensionEntry": "dist/extension.js" }
|
|
8
8
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 0.3.6
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Fix intermittent terminal input mixing when Bizar automatically hands OMP to tmux.
|
|
6
|
+
- Start the replacement host detached and delay tmux attachment until the original OMP process has exited cleanly.
|
|
7
|
+
- Preserve OMP's terminal cleanup while preventing prompt history and selector navigation from competing for arrow-key input.
|
|
8
|
+
|
|
9
|
+
## Validation
|
|
10
|
+
|
|
11
|
+
- Full typecheck, 11 test files / 40 tests, package, documentation, and security checks pass locally.
|
|
12
|
+
- Native OMP qualification remains required before publication.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Native release policy
|
|
2
2
|
|
|
3
|
-
The package is releasable when typecheck, tests, packed-install qualification, and documentation checks pass against the supported OMP/Bun baseline. A GitHub release is created from an exact `v<version>` tag; npm publication uses trusted publishing. See npm-publishing.md for setup and 0.3.
|
|
3
|
+
The package is releasable when typecheck, tests, packed-install qualification, and documentation checks pass against the supported OMP/Bun baseline. A GitHub release is created from an exact `v<version>` tag; npm publication uses trusted publishing. See npm-publishing.md for setup and 0.3.6.md for the current release notes. A passing release gate does not imply every native provider or worker route has been tested.
|