openwork-server 0.18.50 → 0.18.56

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.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/bin/openwork-server.mjs +28 -22
  3. package/bin/platform.mjs +28 -0
  4. package/dist/opencode-plugin-deps-1.18.30.tgz +0 -0
  5. package/dist/opencode-plugins/openwork-context-v2.js +84 -0
  6. package/dist/opencode-plugins/openwork-extensions-preview.js +589 -268
  7. package/dist/opencode-plugins/openwork-gateway-quota-v2.js +12 -1
  8. package/dist/opencode-plugins/openwork-gateway-quota.js +12 -1
  9. package/dist/opencode-plugins/openwork-mcp-results-v2.js +154 -0
  10. package/dist/opencode-plugins/openwork-office-attachments.js +135 -130
  11. package/dist/opencode-plugins/openwork-provider-adapters.js +2 -2
  12. package/dist/opencode-plugins/openwork-provider-filters-v2.js +69 -0
  13. package/dist/opencode-plugins/openwork-read-transport.js +2 -0
  14. package/dist/opencode-plugins/openwork-spreadsheets.js +136 -2
  15. package/dist/openwork-server.mjs +114735 -0
  16. package/dist/pdfium.wasm +0 -0
  17. package/package.json +7 -1
  18. package/web/assets/{abnfDiagram-VCTEODGH-BgnyE_Jl.js → abnfDiagram-VCTEODGH-Dr1YMfll.js} +1 -1
  19. package/web/assets/{app-CyCqD289.js → app-D9Nvta88.js} +474 -424
  20. package/web/assets/{arc-jSgX49-e.js → arc-7SoIBvT7.js} +1 -1
  21. package/web/assets/{architectureDiagram-5GKGNRK7-DD_aGn4v.js → architectureDiagram-5GKGNRK7-BZwevfH9.js} +1 -1
  22. package/web/assets/{artifact-code-view-DFIq0k-c.js → artifact-code-view-WLwX_I1h.js} +1 -1
  23. package/web/assets/{artifact-spreadsheet-editor-DFVCYrL7.js → artifact-spreadsheet-editor-BvEnxKsm.js} +1 -1
  24. package/web/assets/{artifact-text-editor-DBngc6bx.js → artifact-text-editor-BHyVrNyR.js} +1 -1
  25. package/web/assets/{blockDiagram-OSKFZWR5-CBcZLjLp.js → blockDiagram-OSKFZWR5-Cvqr9DPi.js} +1 -1
  26. package/web/assets/{c4Diagram-7LVT6UL2-DMrhFCLj.js → c4Diagram-7LVT6UL2-CWTWC9C1.js} +1 -1
  27. package/web/assets/channel-BkgEJbR-.js +1 -0
  28. package/web/assets/{chunk-2Q5K7J3B-Ce1X-FJQ.js → chunk-2Q5K7J3B-DpJkzZ5x.js} +1 -1
  29. package/web/assets/{chunk-5VM5RSS4-BS48ZtVI.js → chunk-5VM5RSS4-BtTBnr9m.js} +1 -1
  30. package/web/assets/{chunk-F27PBJKO-COdFZJ-M.js → chunk-F27PBJKO-BbAvFJAg.js} +1 -1
  31. package/web/assets/{chunk-HLEWEB6X-Cdw4ABX3.js → chunk-HLEWEB6X-DX5mKBrj.js} +1 -1
  32. package/web/assets/{chunk-JWPE2WC7-FVVDYZmE.js → chunk-JWPE2WC7-CugB1e5O.js} +1 -1
  33. package/web/assets/{chunk-POPQ4Y6H-C7acdUF3.js → chunk-POPQ4Y6H-BQ-bWmmo.js} +1 -1
  34. package/web/assets/{chunk-SVP7TREG-BUun0UWD.js → chunk-SVP7TREG-szCI_Kz9.js} +1 -1
  35. package/web/assets/{chunk-XXDRQBXY-DLgpJmat.js → chunk-XXDRQBXY-C5UTO899.js} +1 -1
  36. package/web/assets/{chunk-ZLD2IHE6-BdMQ5Cr0.js → chunk-ZLD2IHE6-D5v_jiDg.js} +1 -1
  37. package/web/assets/classDiagram-CYGNFDIV-BHINh3-f.js +1 -0
  38. package/web/assets/classDiagram-v2-TLXNO2FR-BHINh3-f.js +1 -0
  39. package/web/assets/{cose-bilkent-JH36ORCC-CqWy3Swy.js → cose-bilkent-JH36ORCC-BhG_zAfo.js} +1 -1
  40. package/web/assets/{cynefin-OW5HDTMX-DslesE5Y.js → cynefin-OW5HDTMX-DSTjm6jO.js} +1 -1
  41. package/web/assets/{cynefinDiagram-5FMLGOSQ-B54uZJn_.js → cynefinDiagram-5FMLGOSQ-Dqkgb6tF.js} +1 -1
  42. package/web/assets/{dagre-OS7QT2EB-Bkahh4gZ.js → dagre-OS7QT2EB-BZMseQyA.js} +1 -1
  43. package/web/assets/{diagram-S7CK7UJ4-CXQl7SfF.js → diagram-S7CK7UJ4-Cs2hsmEJ.js} +1 -1
  44. package/web/assets/{diagram-UQ7AKVKN-BA0V8tjK.js → diagram-UQ7AKVKN-CDnRP_yz.js} +1 -1
  45. package/web/assets/{diagram-VSXAHHWV-DlcR8qeO.js → diagram-VSXAHHWV-DxKXQXAC.js} +1 -1
  46. package/web/assets/{diagram-VX7I27RA-ewm16zDI.js → diagram-VX7I27RA-BJKoseDf.js} +1 -1
  47. package/web/assets/{diagram-Z3DM3KII-Bc2lRc88.js → diagram-Z3DM3KII-DDcMvRxo.js} +1 -1
  48. package/web/assets/{ebnfDiagram-PWID7BFC-JwCaf6cT.js → ebnfDiagram-PWID7BFC-C2uUm-CC.js} +1 -1
  49. package/web/assets/{erDiagram-2YWLMYGG-DOqO-9Yf.js → erDiagram-2YWLMYGG-B0Mdv5WO.js} +1 -1
  50. package/web/assets/{flowDiagram-T62WH6J4-CCZxvIjW.js → flowDiagram-T62WH6J4-CUnt9AMo.js} +1 -1
  51. package/web/assets/{ganttDiagram-EL5Y4UJY-BczG7RIu.js → ganttDiagram-EL5Y4UJY-CENsUToC.js} +1 -1
  52. package/web/assets/{gitGraphDiagram-WWUBYQGX-GOecDN3g.js → gitGraphDiagram-WWUBYQGX-CrbKh94B.js} +1 -1
  53. package/web/assets/index-CyyMNIC_.css +1 -0
  54. package/web/assets/{infoDiagram-FKFFQAWI-BbgIVsQp.js → infoDiagram-FKFFQAWI-B-U-x_qU.js} +1 -1
  55. package/web/assets/{ishikawaDiagram-5VMMS53U-xutQo5Ip.js → ishikawaDiagram-5VMMS53U-jNVSJSu1.js} +1 -1
  56. package/web/assets/{journeyDiagram-EYS64GPL-BIbzPGaa.js → journeyDiagram-EYS64GPL-De3j0gPh.js} +1 -1
  57. package/web/assets/{kanban-definition-UXKFOSKX-BCTiRzck.js → kanban-definition-UXKFOSKX-Bbc8wjhq.js} +1 -1
  58. package/web/assets/{layout-Wpfi54TB.js → layout-BIjP2nup.js} +1 -1
  59. package/web/assets/{linear-DLJHPikh.js → linear-lvQZOiHM.js} +1 -1
  60. package/web/assets/{mermaid.core-CDRJkis7.js → mermaid.core-LJPf4T7o.js} +5 -5
  61. package/web/assets/{mindmap-definition-THT77NOG-DtphSFs_.js → mindmap-definition-THT77NOG-DiboHsg8.js} +1 -1
  62. package/web/assets/{overlay-zA9qjYXH.js → overlay-DA5SOee-.js} +1 -1
  63. package/web/assets/{pegDiagram-XKGWAZYB-CzbjpqK7.js → pegDiagram-XKGWAZYB-DO_edVtr.js} +1 -1
  64. package/web/assets/{pieDiagram-E7YTZNPT-tjxtWWT7.js → pieDiagram-E7YTZNPT-bPvBuBuG.js} +1 -1
  65. package/web/assets/{quadrantDiagram-AXDQQJYC-CFC1qey-.js → quadrantDiagram-AXDQQJYC-BGyrQhlH.js} +1 -1
  66. package/web/assets/{railroadDiagram-O6MQD6OU-73_BXhNP.js → railroadDiagram-O6MQD6OU-XhPIuoOE.js} +1 -1
  67. package/web/assets/{requirementDiagram-IS5BZ75X-B8i4BL2A.js → requirementDiagram-IS5BZ75X-atdASt4G.js} +1 -1
  68. package/web/assets/{sankeyDiagram-P5KCCOFB-Dll4Naj0.js → sankeyDiagram-P5KCCOFB-BV9prEKy.js} +1 -1
  69. package/web/assets/{sequenceDiagram-WJ2MYXX4-B8Rvjhb5.js → sequenceDiagram-WJ2MYXX4-Csfm-fZ-.js} +1 -1
  70. package/web/assets/{sizeCapture-INFHLROL-h8YDF-c3.js → sizeCapture-INFHLROL-CLmH-AjF.js} +1 -1
  71. package/web/assets/{stateDiagram-XQSTLZYL-COorU6Ga.js → stateDiagram-XQSTLZYL-yiSt2fJK.js} +1 -1
  72. package/web/assets/stateDiagram-v2-IH3M54BS-BEhxOujx.js +1 -0
  73. package/web/assets/{swimlanes-V6O3JKXN-CAghInFw.js → swimlanes-V6O3JKXN-BpXNggx9.js} +1 -1
  74. package/web/assets/swimlanesDiagram-JKAHXJPX-DWqwFv9F.js +8 -0
  75. package/web/assets/{timeline-definition-24CTP7MA-Dum2N-ex.js → timeline-definition-24CTP7MA-C8X71OnL.js} +1 -1
  76. package/web/assets/{vennDiagram-4TSXK5OY-D-JeJumX.js → vennDiagram-4TSXK5OY-BZo-99ra.js} +1 -1
  77. package/web/assets/{wardleyDiagram-VM6X3IG4-d99FKQIG.js → wardleyDiagram-VM6X3IG4-BHwH6ZLg.js} +1 -1
  78. package/web/assets/{workspace-file-tree-CAuhntUr.js → workspace-file-tree-C8iSfvPt.js} +3 -3
  79. package/web/assets/{xychartDiagram-S5SC5T6Z-DdmevfkD.js → xychartDiagram-S5SC5T6Z-BieEi319.js} +1 -1
  80. package/web/ext-github.svg +1 -0
  81. package/web/ext-hubspot.svg +1 -0
  82. package/web/ext-slack.svg +1 -0
  83. package/web/index.html +4 -3
  84. package/web/overlay.html +3 -3
  85. package/dist/bin/openwork-server +0 -4
  86. package/web/assets/channel-BE8JEd1U.js +0 -1
  87. package/web/assets/classDiagram-CYGNFDIV-Cy8V0GW-.js +0 -1
  88. package/web/assets/classDiagram-v2-TLXNO2FR-Cy8V0GW-.js +0 -1
  89. package/web/assets/index-BZgplq0g.css +0 -1
  90. package/web/assets/stateDiagram-v2-IH3M54BS-BAu05WuT.js +0 -1
  91. package/web/assets/swimlanesDiagram-JKAHXJPX-CpJNl3pn.js +0 -8
  92. /package/web/assets/{index-_gYIQM_z.js → index-D6FUvVB1.js} +0 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@ npm install -g openwork-server
9
9
  openwork-server --workspace /path/to/workspace --approval auto
10
10
  ```
11
11
 
12
- `openwork-server` ships as a compiled binary, so Bun is not required at runtime.
12
+ The npm package runs on Node.js 22.13 or newer on macOS, Linux, and Windows (arm64 or x64); Bun is not required at runtime.
13
13
 
14
14
  ### Self-hosted web UI
15
15
 
@@ -2,21 +2,18 @@
2
2
 
3
3
  import { spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
- import { basename } from "node:path";
6
- import { fileURLToPath } from "node:url";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
+ import { MIN_NODE_VERSION, nodeVersionSupported, serverBinaryName } from "./platform.mjs";
7
7
 
8
8
  const packageRoot = fileURLToPath(new URL("..", import.meta.url));
9
+ const fromPackage = (relative) => fileURLToPath(new URL(relative, `${new URL("../", import.meta.url)}`));
9
10
  const args = process.argv.slice(2);
10
11
 
11
- const binaryName = process.platform === "win32" ? "openwork-server.exe" : "openwork-server";
12
- const compiledBinary = fileURLToPath(new URL(`./dist/bin/${binaryName}`, `${new URL("../", import.meta.url)}`));
13
- const builtCli = fileURLToPath(new URL("./dist/cli.js", `${new URL("../", import.meta.url)}`));
14
- const sourceCli = fileURLToPath(new URL("./src/cli.ts", `${new URL("../", import.meta.url)}`));
12
+ // Lets `openwork-server web` find the bundled web UI and plugins in this package.
13
+ process.env.OPENWORK_PACKAGE_ROOT = process.env.OPENWORK_PACKAGE_ROOT?.trim() || packageRoot;
15
14
 
16
15
  function run(command, commandArgs) {
17
- // Lets `openwork-server web` find the bundled web UI and plugins next to this launcher.
18
- const env = { ...process.env, OPENWORK_PACKAGE_ROOT: process.env.OPENWORK_PACKAGE_ROOT ?? packageRoot };
19
- const result = spawnSync(command, commandArgs, { stdio: "inherit", env });
16
+ const result = spawnSync(command, commandArgs, { stdio: "inherit", env: process.env });
20
17
  if (result.error) {
21
18
  if (result.error.code === "ENOENT") {
22
19
  console.error(`Missing runtime dependency: ${command}`);
@@ -27,19 +24,28 @@ function run(command, commandArgs) {
27
24
  process.exit(result.status ?? 1);
28
25
  }
29
26
 
30
- if (existsSync(compiledBinary)) {
31
- run(compiledBinary, args);
32
- }
27
+ // The published package: one Node bundle for every OS and CPU.
28
+ const nodeBundle = fromPackage("./dist/openwork-server.mjs");
29
+ if (existsSync(nodeBundle)) {
30
+ if (!nodeVersionSupported(process.versions.node)) {
31
+ console.error(
32
+ `openwork-server needs Node.js ${MIN_NODE_VERSION} or newer (found ${process.versions.node}). Install a current Node.js LTS and try again.`,
33
+ );
34
+ process.exit(1);
35
+ }
36
+ await import(pathToFileURL(nodeBundle).href);
37
+ } else {
38
+ // Source checkout: a compiled binary from `build:bin`, then Bun.
39
+ const binaryName = serverBinaryName(process.platform, process.arch);
40
+ const compiledBinary = binaryName ? fromPackage(`./dist/bin/${binaryName}`) : null;
41
+ if (compiledBinary && existsSync(compiledBinary)) run(compiledBinary, args);
33
42
 
34
- if (existsSync(builtCli)) {
35
- run("bun", [builtCli, ...args]);
36
- }
43
+ const builtCli = fromPackage("./dist/cli.js");
44
+ if (existsSync(builtCli)) run("bun", [builtCli, ...args]);
37
45
 
38
- if (existsSync(sourceCli)) {
39
- run("bun", [sourceCli, ...args]);
40
- }
46
+ const sourceCli = fromPackage("./src/cli.ts");
47
+ if (existsSync(sourceCli)) run("bun", [sourceCli, ...args]);
41
48
 
42
- console.error(
43
- `Unable to find an OpenWork server entrypoint in ${basename(packageRoot)}. Build the package or run it from a source checkout with Bun available.`,
44
- );
45
- process.exit(1);
49
+ console.error("OpenWork server is not built in this checkout. Run: pnpm --filter openwork-server build");
50
+ process.exit(1);
51
+ }
@@ -0,0 +1,28 @@
1
+ // Compiled Bun binaries built by `build:bin` / `build:bin:all` in a source
2
+ // checkout. The npm package does not ship them: it runs the Node bundle in
3
+ // dist/openwork-server.mjs, which works on every OS and CPU.
4
+ export const SERVER_BINARY_TARGETS = [
5
+ { platform: "darwin", arch: "arm64", target: "bun-darwin-arm64" },
6
+ { platform: "darwin", arch: "x64", target: "bun-darwin-x64" },
7
+ { platform: "linux", arch: "arm64", target: "bun-linux-arm64" },
8
+ { platform: "linux", arch: "x64", target: "bun-linux-x64" },
9
+ { platform: "win32", arch: "arm64", target: "bun-windows-arm64" },
10
+ { platform: "win32", arch: "x64", target: "bun-windows-x64" },
11
+ ];
12
+
13
+ export function serverBinaryName(platform, arch) {
14
+ const target = SERVER_BINARY_TARGETS.find((entry) => entry.platform === platform && entry.arch === arch);
15
+ if (!target) return null;
16
+ return `openwork-server-${target.target}${platform === "win32" ? ".exe" : ""}`;
17
+ }
18
+
19
+ // node:sqlite (the server's runtime database) is available without a flag
20
+ // from Node 22.13 and 23.4.
21
+ export const MIN_NODE_VERSION = "22.13.0";
22
+
23
+ export function nodeVersionSupported(version) {
24
+ const [major, minor] = version.replace(/^v/, "").split(".").map(Number);
25
+ if (major === 22) return minor >= 13;
26
+ if (major === 23) return minor >= 4;
27
+ return major > 23;
28
+ }
@@ -0,0 +1,84 @@
1
+ import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
12
+ var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
20
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
21
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ if (canCache)
29
+ cache.set(mod, to);
30
+ return to;
31
+ };
32
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, {
40
+ get: all[name],
41
+ enumerable: true,
42
+ configurable: true,
43
+ set: __exportSetter.bind(all, name)
44
+ });
45
+ };
46
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
47
+
48
+ // src/opencode-plugins/openwork-context-v2.ts
49
+ var openwork_context_v2_default = {
50
+ id: "openwork.context",
51
+ async setup(context) {
52
+ const registration = await context.tool.transform((editor) => {
53
+ for (const name of ["openwork_context", "openwork_query"]) {
54
+ editor.add({
55
+ name,
56
+ description: name === "openwork_context" ? "Read OpenWork app context and available read-only affordances. Use this to discover session.search and session.read for other conversations." : "Read an OpenWork affordance without changing the app or navigating. Use the exact id and arguments from openwork_context; session.read includes live background-agent activity.",
57
+ input: name === "openwork_context" ? { type: "object", properties: {}, additionalProperties: false } : {
58
+ type: "object",
59
+ properties: { id: { type: "string" }, args: { type: "object", additionalProperties: true } },
60
+ required: ["id"],
61
+ additionalProperties: false
62
+ },
63
+ options: { codemode: false },
64
+ async execute(input, call) {
65
+ const response = await fetch(context.options.url, {
66
+ method: "POST",
67
+ redirect: "error",
68
+ signal: call.signal,
69
+ headers: { Authorization: `Bearer ${context.options.token}`, "Content-Type": "application/json" },
70
+ body: JSON.stringify({ name, input })
71
+ });
72
+ if (!response.ok)
73
+ throw new Error(`OpenWork read failed (${response.status})`);
74
+ return { content: [{ type: "text", text: await response.text() }] };
75
+ }
76
+ });
77
+ }
78
+ });
79
+ return () => registration.dispose();
80
+ }
81
+ };
82
+ export {
83
+ openwork_context_v2_default as default
84
+ };