@miadi/tide 0.6.5 → 0.6.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/package.json +1 -1
- package/src/annotate.ts +10 -3
package/package.json
CHANGED
package/src/annotate.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// review into its tmux pane — the web leg of the plannotator review loop.
|
|
3
3
|
//
|
|
4
4
|
// This module owns NO resolution and NO delivery logic of its own. Both belong
|
|
5
|
-
// to
|
|
5
|
+
// to the review script (jgwill/gaia#80; installed by miadi-tide in /usr/lib/miadi-tide),
|
|
6
6
|
// which already proves the reply belongs to the pane, keeps every run in a
|
|
7
7
|
// durable vessel, refuses to paste while a human is typing, and pastes with
|
|
8
8
|
// bracketed paste so a multi-line review does not submit itself line by line.
|
|
@@ -53,6 +53,9 @@ import type {
|
|
|
53
53
|
|
|
54
54
|
const pExecFile = promisify(execFile)
|
|
55
55
|
|
|
56
|
+
/** The copy the miadi-tide package installs, beside its pane-write guard. */
|
|
57
|
+
export const PACKAGED_REVIEW_SCRIPT = "/usr/lib/miadi-tide/plannotator-tmux-review.sh"
|
|
58
|
+
/** The source checkout on gaia, used when the package is not installed. */
|
|
56
59
|
export const DEFAULT_REVIEW_SCRIPT = "/opt/gaia/linux_migration/11-plannotator-tmux-review.sh"
|
|
57
60
|
export const REVIEW_SCRIPT_ENV = "PLANNOTATOR_TMUX_REVIEW_SCRIPT"
|
|
58
61
|
/** The script's own override for where run vessels live. Same name, same meaning. */
|
|
@@ -150,8 +153,12 @@ export interface DeliverResult extends DeliverOutcome {
|
|
|
150
153
|
log: string[]
|
|
151
154
|
}
|
|
152
155
|
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
/** `$PLANNOTATOR_TMUX_REVIEW_SCRIPT` → the miadi-tide package's copy → gaia's checkout. */
|
|
157
|
+
export function resolveReviewScript(
|
|
158
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
159
|
+
exists: (p: string) => boolean = existsSync,
|
|
160
|
+
): string {
|
|
161
|
+
return env[REVIEW_SCRIPT_ENV]?.trim() || (exists(PACKAGED_REVIEW_SCRIPT) ? PACKAGED_REVIEW_SCRIPT : DEFAULT_REVIEW_SCRIPT)
|
|
155
162
|
}
|
|
156
163
|
|
|
157
164
|
/** Mirrors the script: `$PLANNOTATOR_TMUX_REVIEW_DIR` → `$XDG_STATE_HOME/…` → `~/.local/state/…`. */
|