@knowsuchagency/fulcrum 5.13.0 → 5.13.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/bin/fulcrum.js +4 -4
- package/package.json +1 -1
- package/server/index.js +75 -37
package/bin/fulcrum.js
CHANGED
|
@@ -46869,7 +46869,7 @@ async function runMcpServer(urlOverride, portOverride) {
|
|
|
46869
46869
|
const client = new FulcrumClient(urlOverride, portOverride);
|
|
46870
46870
|
const server = new McpServer({
|
|
46871
46871
|
name: "fulcrum",
|
|
46872
|
-
version: "5.13.
|
|
46872
|
+
version: "5.13.1"
|
|
46873
46873
|
});
|
|
46874
46874
|
registerTools(server, client);
|
|
46875
46875
|
const transport = new StdioServerTransport;
|
|
@@ -49218,7 +49218,7 @@ var marketplace_default = `{
|
|
|
49218
49218
|
"name": "fulcrum",
|
|
49219
49219
|
"source": "./",
|
|
49220
49220
|
"description": "Task orchestration for Claude Code",
|
|
49221
|
-
"version": "5.13.
|
|
49221
|
+
"version": "5.13.1",
|
|
49222
49222
|
"skills": [
|
|
49223
49223
|
"./skills/fulcrum"
|
|
49224
49224
|
],
|
|
@@ -49241,7 +49241,7 @@ var marketplace_default = `{
|
|
|
49241
49241
|
var plugin_default = `{
|
|
49242
49242
|
"name": "fulcrum",
|
|
49243
49243
|
"description": "Fulcrum task orchestration for Claude Code",
|
|
49244
|
-
"version": "5.13.
|
|
49244
|
+
"version": "5.13.1",
|
|
49245
49245
|
"author": {
|
|
49246
49246
|
"name": "Fulcrum"
|
|
49247
49247
|
},
|
|
@@ -50280,7 +50280,7 @@ function compareVersions(v1, v2) {
|
|
|
50280
50280
|
var package_default = {
|
|
50281
50281
|
name: "@knowsuchagency/fulcrum",
|
|
50282
50282
|
private: true,
|
|
50283
|
-
version: "5.13.
|
|
50283
|
+
version: "5.13.1",
|
|
50284
50284
|
description: "Harness Attention. Orchestrate Agents. Ship.",
|
|
50285
50285
|
license: "PolyForm-Perimeter-1.0.0",
|
|
50286
50286
|
type: "module",
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -13596,6 +13596,17 @@ class HerdrService {
|
|
|
13596
13596
|
async closeTab(tabId) {
|
|
13597
13597
|
await this.call("tab.close", { tab_id: tabId });
|
|
13598
13598
|
}
|
|
13599
|
+
async splitPane(opts) {
|
|
13600
|
+
return this.call("pane.split", {
|
|
13601
|
+
target_pane_id: opts.targetPaneId,
|
|
13602
|
+
direction: opts.direction,
|
|
13603
|
+
...opts.cwd ? { cwd: opts.cwd } : {},
|
|
13604
|
+
focus: opts.focus ?? false
|
|
13605
|
+
});
|
|
13606
|
+
}
|
|
13607
|
+
async closePane(paneId) {
|
|
13608
|
+
await this.call("pane.close", { pane_id: paneId });
|
|
13609
|
+
}
|
|
13599
13610
|
async listPanes(workspaceId) {
|
|
13600
13611
|
const r = await this.call("pane.list", workspaceId ? { workspace_id: workspaceId } : {});
|
|
13601
13612
|
return r.panes ?? [];
|
|
@@ -13744,42 +13755,65 @@ async function mirrorTerminal(terminalId) {
|
|
|
13744
13755
|
});
|
|
13745
13756
|
return;
|
|
13746
13757
|
}
|
|
13747
|
-
const
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
terminalId,
|
|
13768
|
-
paneId: tab.root_pane.pane_id,
|
|
13769
|
-
agent: target.agent
|
|
13758
|
+
const sibling = findSiblingWithPane(row.taskId, terminalId);
|
|
13759
|
+
let workspaceId;
|
|
13760
|
+
let tabId;
|
|
13761
|
+
let paneId;
|
|
13762
|
+
let isSplit = false;
|
|
13763
|
+
if (sibling) {
|
|
13764
|
+
const split = await svc.splitPane({
|
|
13765
|
+
targetPaneId: sibling.herdrPaneId,
|
|
13766
|
+
direction: "right",
|
|
13767
|
+
cwd: target.workspaceCwd,
|
|
13768
|
+
focus: false
|
|
13769
|
+
});
|
|
13770
|
+
workspaceId = sibling.herdrWorkspaceId;
|
|
13771
|
+
tabId = sibling.herdrTabId;
|
|
13772
|
+
paneId = split.pane.pane_id;
|
|
13773
|
+
isSplit = true;
|
|
13774
|
+
} else {
|
|
13775
|
+
const { workspace } = await svc.ensureWorkspace({
|
|
13776
|
+
label: target.workspaceLabel,
|
|
13777
|
+
cwd: target.workspaceCwd
|
|
13770
13778
|
});
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
error: String(err)
|
|
13779
|
+
const tab = await svc.createTab({
|
|
13780
|
+
workspaceId: workspace.workspace_id,
|
|
13781
|
+
label: target.tabLabel,
|
|
13782
|
+
cwd: target.workspaceCwd
|
|
13776
13783
|
});
|
|
13784
|
+
workspaceId = workspace.workspace_id;
|
|
13785
|
+
tabId = tab.tab.tab_id;
|
|
13786
|
+
paneId = tab.root_pane.pane_id;
|
|
13787
|
+
}
|
|
13788
|
+
const dtach = getDtachService();
|
|
13789
|
+
const socketPath = dtach.getSocketPath(terminalId);
|
|
13790
|
+
await svc.runInPane(paneId, `stty -echoctl && exec dtach -a ${socketPath} -z`);
|
|
13791
|
+
if (!isSplit) {
|
|
13792
|
+
try {
|
|
13793
|
+
await svc.reportAgent(paneId, {
|
|
13794
|
+
source: "fulcrum",
|
|
13795
|
+
agent: target.agent,
|
|
13796
|
+
state: "working",
|
|
13797
|
+
message: target.tabLabel
|
|
13798
|
+
});
|
|
13799
|
+
log2.terminal.info("herdr agent reported", {
|
|
13800
|
+
terminalId,
|
|
13801
|
+
paneId,
|
|
13802
|
+
agent: target.agent
|
|
13803
|
+
});
|
|
13804
|
+
} catch (err) {
|
|
13805
|
+
log2.terminal.warn("reportAgent failed (non-fatal)", {
|
|
13806
|
+
terminalId,
|
|
13807
|
+
paneId,
|
|
13808
|
+
error: String(err)
|
|
13809
|
+
});
|
|
13810
|
+
}
|
|
13777
13811
|
}
|
|
13778
13812
|
const now = new Date().toISOString();
|
|
13779
13813
|
db2.update(terminals).set({
|
|
13780
|
-
herdrWorkspaceId:
|
|
13781
|
-
herdrTabId:
|
|
13782
|
-
herdrPaneId:
|
|
13814
|
+
herdrWorkspaceId: workspaceId,
|
|
13815
|
+
herdrTabId: tabId,
|
|
13816
|
+
herdrPaneId: paneId,
|
|
13783
13817
|
updatedAt: now
|
|
13784
13818
|
}).where(eq(terminals.id, terminalId)).run();
|
|
13785
13819
|
log2.terminal.info("herdr mirror created", {
|
|
@@ -13787,7 +13821,8 @@ async function mirrorTerminal(terminalId) {
|
|
|
13787
13821
|
taskId: row.taskId,
|
|
13788
13822
|
workspaceLabel: target.workspaceLabel,
|
|
13789
13823
|
tabLabel: target.tabLabel,
|
|
13790
|
-
paneId
|
|
13824
|
+
paneId,
|
|
13825
|
+
split: isSplit
|
|
13791
13826
|
});
|
|
13792
13827
|
} catch (err) {
|
|
13793
13828
|
log2.terminal.warn("mirrorTerminal: failed (continuing without mirror)", {
|
|
@@ -13797,6 +13832,9 @@ async function mirrorTerminal(terminalId) {
|
|
|
13797
13832
|
});
|
|
13798
13833
|
}
|
|
13799
13834
|
}
|
|
13835
|
+
function findSiblingWithPane(taskId, selfTerminalId) {
|
|
13836
|
+
return db2.select().from(terminals).where(and(eq(terminals.taskId, taskId), ne(terminals.id, selfTerminalId), isNotNull(terminals.herdrPaneId), isNotNull(terminals.herdrTabId), isNotNull(terminals.herdrWorkspaceId))).get();
|
|
13837
|
+
}
|
|
13800
13838
|
async function closeMirror(terminalId) {
|
|
13801
13839
|
if (!isMirrorEnabled())
|
|
13802
13840
|
return;
|
|
@@ -13804,7 +13842,7 @@ async function closeMirror(terminalId) {
|
|
|
13804
13842
|
if (autoClose === false)
|
|
13805
13843
|
return;
|
|
13806
13844
|
const row = db2.select().from(terminals).where(eq(terminals.id, terminalId)).get();
|
|
13807
|
-
if (!row?.
|
|
13845
|
+
if (!row?.herdrPaneId)
|
|
13808
13846
|
return;
|
|
13809
13847
|
try {
|
|
13810
13848
|
const svc = getHerdrService();
|
|
@@ -13813,12 +13851,12 @@ async function closeMirror(terminalId) {
|
|
|
13813
13851
|
clearMirrorIds(terminalId);
|
|
13814
13852
|
return;
|
|
13815
13853
|
}
|
|
13816
|
-
await svc.
|
|
13817
|
-
log2.terminal.info("herdr mirror closed", { terminalId,
|
|
13854
|
+
await svc.closePane(row.herdrPaneId);
|
|
13855
|
+
log2.terminal.info("herdr mirror closed", { terminalId, paneId: row.herdrPaneId });
|
|
13818
13856
|
} catch (err) {
|
|
13819
13857
|
log2.terminal.warn("closeMirror: failed", {
|
|
13820
13858
|
terminalId,
|
|
13821
|
-
|
|
13859
|
+
paneId: row.herdrPaneId,
|
|
13822
13860
|
error: String(err)
|
|
13823
13861
|
});
|
|
13824
13862
|
} finally {
|
|
@@ -1282679,7 +1282717,7 @@ mcpRoutes.all("/", async (c) => {
|
|
|
1282679
1282717
|
});
|
|
1282680
1282718
|
const server2 = new McpServer({
|
|
1282681
1282719
|
name: "fulcrum",
|
|
1282682
|
-
version: "5.13.
|
|
1282720
|
+
version: "5.13.1"
|
|
1282683
1282721
|
});
|
|
1282684
1282722
|
const client3 = new FulcrumClient(`http://localhost:${port}`);
|
|
1282685
1282723
|
registerTools(server2, client3);
|