openwork-server 0.18.62 → 0.18.64
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 +2 -2
- package/dist/opencode-plugin-deps-1.18.33.tgz +0 -0
- package/dist/opencode-plugins/approval-loopback-fetch.js +18 -0
- package/dist/opencode-plugins/drive-file-tools.js +20 -5
- package/dist/opencode-plugins/managed-policy-next.js +7782 -1886
- package/dist/opencode-plugins/openwork-agent-permissions-v2.js +7912 -1896
- package/dist/opencode-plugins/openwork-auto-route-v2.js +19657 -0
- package/dist/opencode-plugins/openwork-capabilities-knowledge.js +7800 -1911
- package/dist/opencode-plugins/openwork-chrome-devtools.js +25294 -1914
- package/dist/opencode-plugins/openwork-cloud-skills-v2.js +54 -31
- package/dist/opencode-plugins/openwork-computer-use.js +25259 -1881
- package/dist/opencode-plugins/openwork-context-v2.js +25523 -1891
- package/dist/opencode-plugins/openwork-extensions-preview.js +8804 -2150
- package/dist/opencode-plugins/openwork-gateway-quota-v2.js +7748 -1846
- package/dist/opencode-plugins/openwork-gateway-quota.js +7755 -1853
- package/dist/opencode-plugins/openwork-pdf-attachments.js +8032 -2145
- package/dist/opencode-plugins/openwork-provider-adapters.js +65 -6
- package/dist/opencode-plugins/openwork-provider-sync-v2.js +459 -139
- package/dist/opencode-plugins/openwork-session-groups.js +5 -4
- package/dist/opencode-plugins/openwork-spreadsheets.js +7809 -1922
- package/dist/opencode-plugins/openwork-ui-bridge.js +6 -3
- package/dist/opencode-plugins/openwork-visible-reasoning-v2.js +153 -0
- package/dist/opencode-plugins/provider-safe-tool-schema.js +57 -0
- package/dist/opencode-plugins/session-read-detail.js +475 -0
- package/dist/openwork-server.mjs +21238 -10377
- package/package.json +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-DJzrT8Ql.js → abnfDiagram-VCTEODGH-j_pTDiqz.js} +1 -1
- package/web/assets/{app-_2KkkZIM.js → app-Bzky4OVl.js} +489 -454
- package/web/assets/app-C32roy8y.css +32 -0
- package/web/assets/{arc-KehB1xN5.js → arc-CaQNh7ZT.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-C_GL2639.js → architectureDiagram-5GKGNRK7-wMx5wEbF.js} +1 -1
- package/web/assets/{artifact-code-view-CYn_58gV.js → artifact-code-view-DCMMpJxD.js} +1 -1
- package/web/assets/{artifact-spreadsheet-editor-f6V-tYvi.js → artifact-spreadsheet-editor-DNHOxqPc.js} +1 -1
- package/web/assets/{artifact-text-editor-CiSlW3kl.js → artifact-text-editor-o6WCLEmo.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-DErH-7gY.js → blockDiagram-OSKFZWR5-BYAM-sb8.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-aML4z_n9.js → c4Diagram-7LVT6UL2-pOXGVuIa.js} +1 -1
- package/web/assets/channel-DR4AKESO.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-Dw_IH9rW.js → chunk-2Q5K7J3B-A7RWrtFk.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-aeJEQ945.js → chunk-5VM5RSS4-BbhM53lO.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-hZwti-Oc.js → chunk-F27PBJKO-Aoti2mfN.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-JFNzm3Ge.js → chunk-HLEWEB6X-h1a1fijx.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-B34hvYk7.js → chunk-JWPE2WC7-CtyBiDJt.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-CDqgEp-q.js → chunk-POPQ4Y6H-d6pjL5RD.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-B65ta9aQ.js → chunk-SVP7TREG-DnzaR7AG.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DjTi6c9m.js → chunk-XXDRQBXY-B9hkBiar.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-CbviXFvb.js → chunk-ZLD2IHE6-DzJ1_fxy.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-B0y8HxEN.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-B0y8HxEN.js +1 -0
- package/web/assets/{cose-bilkent-JH36ORCC-Cl9SO5zd.js → cose-bilkent-JH36ORCC-BhvTRFRe.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-CAcz2tHt.js → cynefin-OW5HDTMX-fGckFsSU.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-BJHft4FO.js → cynefinDiagram-5FMLGOSQ-BzW--hKZ.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-DbdnY1uS.js → dagre-OS7QT2EB-BnhLgL07.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-C07WD5Lc.js → diagram-S7CK7UJ4-Cu-md7dS.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-D8VCjq9x.js → diagram-UQ7AKVKN-DXQdcUqJ.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-D1XSfMnK.js → diagram-VSXAHHWV-C0TNG60H.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-3GZe-yrf.js → diagram-VX7I27RA-z9AkHrlD.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-CI43WcIB.js → diagram-Z3DM3KII-CB0wN1mx.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-CTzouade.js → ebnfDiagram-PWID7BFC-k6ofa2S7.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-CNcqsnqx.js → erDiagram-2YWLMYGG-DH0LRcXA.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-pomAqjgF.js → flowDiagram-T62WH6J4-BRVNnCPG.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-C1dNaxxj.js → ganttDiagram-EL5Y4UJY-BnEWMV5l.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-Ni8GECg1.js → gitGraphDiagram-WWUBYQGX-COrkPeQK.js} +1 -1
- package/web/assets/{infoDiagram-FKFFQAWI-C0kvE7Zu.js → infoDiagram-FKFFQAWI-DZuH1fmc.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-CxmP_irp.js → ishikawaDiagram-5VMMS53U-CaJUJ6Ff.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-60GkPgH5.js → journeyDiagram-EYS64GPL-BE6Fv_rV.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-ByxcB0T_.js → kanban-definition-UXKFOSKX-B4bPGzK6.js} +1 -1
- package/web/assets/{layout-BD9ef90s.js → layout-or_42uvc.js} +1 -1
- package/web/assets/{linear-Dp9l0lBr.js → linear-5PXMsdhe.js} +1 -1
- package/web/assets/{mermaid.core-FKm3Akes.js → mermaid.core-DW6D3RPJ.js} +6 -6
- package/web/assets/{mindmap-definition-THT77NOG-i7WJlWHV.js → mindmap-definition-THT77NOG-CyTLW_BU.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-DfI-LsJq.js → pegDiagram-XKGWAZYB-7JUI9VKo.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-kcgWYBSb.js → pieDiagram-E7YTZNPT-Bp-lNUXy.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-DVyziZnc.js → quadrantDiagram-AXDQQJYC-BHzbyOLv.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-CWgHq9nv.js → railroadDiagram-O6MQD6OU-DUbwyc8J.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-B7fgi4lz.js → requirementDiagram-IS5BZ75X-C6vHvRXL.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-D1-pD_qh.js → sankeyDiagram-P5KCCOFB-rhUrZHvo.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-B6oeRmVj.js → sequenceDiagram-WJ2MYXX4-CbKw45qx.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-BTpKGFt5.js → sizeCapture-INFHLROL-BzYRidKe.js} +1 -1
- package/web/assets/{stateDiagram-XQSTLZYL-zXJRxE6h.js → stateDiagram-XQSTLZYL-CY_NqfCu.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-ZplxpnyH.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-Dc7MXPb3.js → swimlanes-V6O3JKXN-DsuNS06S.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BgYXaTmf.js +8 -0
- package/web/assets/{timeline-definition-24CTP7MA-DYhgbnjW.js → timeline-definition-24CTP7MA-Bw7piZjw.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-DRnme7za.js → vennDiagram-4TSXK5OY-3QO9enN9.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-wAoo4GsZ.js → wardleyDiagram-VM6X3IG4-u2wsdzR8.js} +1 -1
- package/web/assets/{workspace-file-tree-DmAwvqtx.js → workspace-file-tree-B0RW5c5J.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-_Z_TOWBn.js → xychartDiagram-S5SC5T6Z-YVqX-MzU.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/app-CkmqBm_1.css +0 -32
- package/web/assets/channel-7oM0ncHI.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-BkidFauP.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-BkidFauP.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-CmwZ6tXj.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BXoJEx2b.js +0 -8
package/README.md
CHANGED
|
@@ -194,7 +194,7 @@ Token management (scoped tokens):
|
|
|
194
194
|
File injection / artifacts:
|
|
195
195
|
|
|
196
196
|
- `OPENWORK_INBOX_ENABLED` (`1` | `0`)
|
|
197
|
-
- `OPENWORK_INBOX_MAX_BYTES` (default:
|
|
197
|
+
- `OPENWORK_INBOX_MAX_BYTES` (default: 10GB)
|
|
198
198
|
- `OPENWORK_OUTBOX_ENABLED` (`1` | `0`)
|
|
199
199
|
|
|
200
200
|
Sandbox advertisement (for capability discovery):
|
|
@@ -235,7 +235,7 @@ Token management (collaborator or owner bearer token):
|
|
|
235
235
|
|
|
236
236
|
Inbox/outbox:
|
|
237
237
|
|
|
238
|
-
- `POST /workspace/:id/inbox
|
|
238
|
+
- `POST /workspace/:id/inbox?path=<path>` (streams the raw body into `.opencode/openwork/inbox/`; multipart is also accepted, up to 250MB)
|
|
239
239
|
- `GET /workspace/:id/artifacts`
|
|
240
240
|
- `GET /workspace/:id/artifacts/:artifactId`
|
|
241
241
|
- `POST /workspace/:id/files/sessions`
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Agent, fetch as undiciFetch } from "undici";
|
|
2
|
+
// Approval-capable RPCs send their response only after the person answers.
|
|
3
|
+
// Native fetch's default 300 s headers timeout cuts off the desktop's 600 s
|
|
4
|
+
// approval wait even when the caller supplied no AbortSignal deadline.
|
|
5
|
+
// Scope this dispatcher to these local RPCs, never external website traffic.
|
|
6
|
+
const approvalDispatcher = new Agent({ headersTimeout: 0, bodyTimeout: 0 });
|
|
7
|
+
/**
|
|
8
|
+
* A cancellable loopback RPC that may wait for human approval. The caller's
|
|
9
|
+
* AbortSignal and the approval owner's own deadline bound its lifetime; do not
|
|
10
|
+
* add an unrelated HTTP parser deadline while the person is still deciding.
|
|
11
|
+
*/
|
|
12
|
+
export async function approvalLoopbackFetch(input, init) {
|
|
13
|
+
const url = new URL(input);
|
|
14
|
+
if (url.protocol !== "http:" || !["127.0.0.1", "localhost", "[::1]"].includes(url.hostname) || url.username || url.password) {
|
|
15
|
+
throw new Error("Approval requests require a local HTTP endpoint.");
|
|
16
|
+
}
|
|
17
|
+
return undiciFetch(input, { ...init, redirect: "error", dispatcher: approvalDispatcher });
|
|
18
|
+
}
|
|
@@ -8,7 +8,7 @@ export const drivePullFileArgs = z.object({
|
|
|
8
8
|
fileId: z.string().min(1).max(2048).describe("Google Drive file ID or link, or a OneDrive, SharePoint or Teams file link or item id."),
|
|
9
9
|
driveId: z.string().min(1).max(512).optional().describe("Microsoft 365 only: the driveId that came with the item id from a search or folder listing."),
|
|
10
10
|
provider: z.enum(["google-workspace", "microsoft-365"]).optional().describe("Only needed for a Microsoft item id without driveId; links and driveId identify Microsoft 365 files."),
|
|
11
|
-
path: workspacePath.optional().describe("Workspace path to save to. Defaults to drive/<file name>."),
|
|
11
|
+
path: workspacePath.optional().describe("Workspace path to save to. Defaults to drive/<file name>. Any folder outside drive/ asks the person first."),
|
|
12
12
|
format: z.string().regex(/^[a-z]{2,5}$/).optional().describe("Docs, Sheets, Slides and Drawings: xlsx, csv (first tab only), docx, md, txt, pptx, pdf, png or svg. OneDrive and SharePoint: pdf converts an Office file."),
|
|
13
13
|
connectionId,
|
|
14
14
|
overwrite: z.boolean().optional().describe("Replace a local copy even if it has edits not in Drive. Asks the person first."),
|
|
@@ -21,10 +21,25 @@ export const drivePushFileArgs = z.object({
|
|
|
21
21
|
mode: z.enum(["replace", "copy"]).optional().describe("replace (default for stored files) updates the same file; copy saves a new file next to it."),
|
|
22
22
|
name: z.string().min(1).max(255).optional().describe("Name for a copy."),
|
|
23
23
|
}).strict();
|
|
24
|
+
/** What the model sees for each tool; v1 tools and the v2 context plugin share these. */
|
|
25
|
+
export const DRIVE_FILE_TOOLS = {
|
|
26
|
+
drive_pull_file: {
|
|
27
|
+
description: "Save a Google Drive, OneDrive or SharePoint file into the workspace and return its path and revision, never its content. Use it to analyze or edit Office, PDF, CSV or any large file with shell tools. Docs, Sheets and Slides arrive as docx, xlsx and pptx unless format says otherwise.",
|
|
28
|
+
args: drivePullFileArgs,
|
|
29
|
+
},
|
|
30
|
+
drive_file_status: {
|
|
31
|
+
description: "For files pulled with drive_pull_file, report whether the local copy has edits not saved back and whether the file changed in Drive, OneDrive or SharePoint since the pull.",
|
|
32
|
+
args: driveFileStatusArgs,
|
|
33
|
+
},
|
|
34
|
+
drive_push_file: {
|
|
35
|
+
description: "Save a pulled file back to where it came from when the person asks. Asks the person first. Stored files, including Office files in OneDrive and SharePoint, are replaced in place as a new version; Google Docs, Sheets and Slides and PDF conversions are saved as a new file next to the original. Returns drive_conflict, and changes nothing, when someone changed the file since the pull: pull it again and reapply the edits, or save a copy.",
|
|
36
|
+
args: drivePushFileArgs,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
24
39
|
function isRecord(value) {
|
|
25
40
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26
41
|
}
|
|
27
|
-
/** Engine permissions check writes; Desktop separately confirms
|
|
42
|
+
/** Engine permissions check writes; Desktop separately confirms saves, replaced copies and pulls outside drive/ at the host boundary. */
|
|
28
43
|
async function askPermission(context, permission, patterns, metadata) {
|
|
29
44
|
const ask = isRecord(context) && typeof context.ask === "function" ? context.ask : null;
|
|
30
45
|
if (!ask)
|
|
@@ -35,7 +50,7 @@ async function askPermission(context, permission, patterns, metadata) {
|
|
|
35
50
|
export function createDriveFileTools(call) {
|
|
36
51
|
return {
|
|
37
52
|
drive_pull_file: {
|
|
38
|
-
description:
|
|
53
|
+
description: DRIVE_FILE_TOOLS.drive_pull_file.description,
|
|
39
54
|
args: drivePullFileArgs.shape,
|
|
40
55
|
async execute(rawArgs, context) {
|
|
41
56
|
const args = drivePullFileArgs.parse(rawArgs ?? {});
|
|
@@ -45,14 +60,14 @@ export function createDriveFileTools(call) {
|
|
|
45
60
|
},
|
|
46
61
|
},
|
|
47
62
|
drive_file_status: {
|
|
48
|
-
description:
|
|
63
|
+
description: DRIVE_FILE_TOOLS.drive_file_status.description,
|
|
49
64
|
args: driveFileStatusArgs.shape,
|
|
50
65
|
async execute(rawArgs, context) {
|
|
51
66
|
return JSON.stringify(await call("drive_file_status", driveFileStatusArgs.parse(rawArgs ?? {}), context), null, 2);
|
|
52
67
|
},
|
|
53
68
|
},
|
|
54
69
|
drive_push_file: {
|
|
55
|
-
description:
|
|
70
|
+
description: DRIVE_FILE_TOOLS.drive_push_file.description,
|
|
56
71
|
args: drivePushFileArgs.shape,
|
|
57
72
|
async execute(rawArgs, context) {
|
|
58
73
|
const args = drivePushFileArgs.parse(rawArgs ?? {});
|