elsemeet-bridge 0.1.0 → 0.1.1
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/dist/elsemeet-bridge.mjs +7 -5
- package/package.json +1 -1
package/dist/elsemeet-bridge.mjs
CHANGED
|
@@ -41,11 +41,13 @@ var MAX_STARTS_PER_HOUR = 6;
|
|
|
41
41
|
var WAIT_SECONDS = 50;
|
|
42
42
|
var NO_SHIP = ["git push", "vercel", "npm publish", "gh"].flatMap((c) => [`Bash(${c}:*)`, `PowerShell(${c}:*)`]);
|
|
43
43
|
var RUN_SETTINGS = JSON.stringify({ permissions: { blockReadsOutsideWorkingDirectories: true } });
|
|
44
|
-
|
|
44
|
+
var RUN_WAIT_MINUTES = 45;
|
|
45
|
+
function runNote(pushYes, startedAt = /* @__PURE__ */ new Date()) {
|
|
46
|
+
const until = new Date(startedAt.getTime() + RUN_WAIT_MINUTES * 6e4).toISOString();
|
|
45
47
|
return [
|
|
46
48
|
"This /work was started by Elsemeet Bridge on the user\u2019s computer; nobody is watching this terminal.",
|
|
47
|
-
|
|
48
|
-
pushYes ? "The project\u2019s Owner said yes to a push on the board: this run may push what that yes covers, as Work says." : "This run cannot push, deploy or publish (the Bridge blocks it). Leave any push mark open \u2014 do not answer it: the Bridge then starts a run that can push."
|
|
49
|
+
`Step 6 applies as it says \u2014 wait at wait_for_work while they are on Talk or the Work page \u2014 with one limit: this run started at ${startedAt.toISOString()} and its sign-in lasts an hour, so once it is past ${until}, do not wait again: end, saying in a line what you did (check the time with the shell). The Bridge starts you again when something new comes. When wait_for_work says away or enough, end.`,
|
|
50
|
+
pushYes ? "The project\u2019s Owner said yes to a push on the board: this run may push what that yes covers, as Work says." : "This run cannot push, deploy or publish (the Bridge blocks it). Leave any push mark open \u2014 do not answer it \u2014 and when a wait brings a push mark, end at once: the Bridge then starts a run that can push."
|
|
49
51
|
].join(" ");
|
|
50
52
|
}
|
|
51
53
|
function noPushEnv(env) {
|
|
@@ -187,7 +189,7 @@ function git(cwd, args) {
|
|
|
187
189
|
const r = spawnSync("git", args, { cwd, encoding: "utf8", windowsHide: true });
|
|
188
190
|
return r.status === 0 ? (r.stdout ?? "").trim() : "";
|
|
189
191
|
}
|
|
190
|
-
function agentCommand(p, mcpConfig, pushYes = false) {
|
|
192
|
+
function agentCommand(p, mcpConfig, pushYes = false, startedAt = /* @__PURE__ */ new Date()) {
|
|
191
193
|
const agent = AGENTS[p.agent];
|
|
192
194
|
if (!agent) throw new Error(`Unknown agent: ${p.agent}`);
|
|
193
195
|
return {
|
|
@@ -204,7 +206,7 @@ function agentCommand(p, mcpConfig, pushYes = false) {
|
|
|
204
206
|
"--settings",
|
|
205
207
|
RUN_SETTINGS,
|
|
206
208
|
"--append-system-prompt",
|
|
207
|
-
runNote(pushYes),
|
|
209
|
+
runNote(pushYes, startedAt),
|
|
208
210
|
...pushYes ? [] : ["--disallowedTools", ...NO_SHIP],
|
|
209
211
|
"--output-format",
|
|
210
212
|
"stream-json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elsemeet-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Starts your Claude Code on /work when your Elsemeet project has something for it — connect once, in your project folder: npx elsemeet-bridge",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "elsemeet-bridge": "dist/elsemeet-bridge.mjs" },
|