dsh-wsr-execution 0.2.9 → 0.2.10
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/lib/client.js +5 -4
- package/package.json +4 -4
- package/src/client/delivery-inventory/sidebar.js +6 -5
- package/src/intake/plugin.js +14 -7
package/README.md
CHANGED
|
@@ -21,6 +21,6 @@ and exact MIT provenance are documented under
|
|
|
21
21
|
`src/client/delivery-inventory/UPSTREAM.md`.
|
|
22
22
|
|
|
23
23
|
The compatible `wsr-execution@^0.2.0` peer comes from the immutable GitHub
|
|
24
|
-
`0.2.
|
|
24
|
+
`0.2.7` release asset recorded in `package.json`, not ambient npm resolution. Install that
|
|
25
25
|
asset as an explicit DSH profile root alongside this adapter; its required
|
|
26
|
-
SHA-256 is `
|
|
26
|
+
SHA-256 is `bb3718360946d114251def2f1a975ee783974c2c0d959dbb4289e8955f4b5acc`.
|
package/lib/client.js
CHANGED
|
@@ -3364,7 +3364,7 @@ function projectDeliveryInventory(state, { selectedSessionId } = {}) {
|
|
|
3364
3364
|
|
|
3365
3365
|
// packages/execution/src/client/delivery-inventory/sidebar.js
|
|
3366
3366
|
var STYLE_ID = "dsh-wsr-execution-delivery-inventory";
|
|
3367
|
-
var CSS = ".wsr-sidebar-resources{min-height:0;flex:1;display:flex;flex-direction:column;gap:4px}.wsr-sidebar-resource{min-height:0;display:flex;flex-direction:column}.wsr-sidebar-resource:
|
|
3367
|
+
var CSS = ".wsr-sidebar-resources{box-sizing:border-box;height:100%;min-height:0;flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;gap:4px}.wsr-sidebar-resource{min-height:36px;flex:0 0 auto;overflow:hidden;display:flex;flex-direction:column}.wsr-sidebar-resource[data-expanded=true]{min-height:0;flex:1 1 0}.wsr-sidebar-resource-content{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain}.wsr-sidebar-resource-header{box-sizing:border-box;width:100%;height:36px;flex:0 0 36px;cursor:pointer;color:var(--dsw-alias-label-tertiary);background:transparent;border:0;border-radius:8px;display:flex;align-items:center;gap:6px;padding:0 8px;font-size:13px;text-align:left}.wsr-sidebar-resource-header:hover{background:var(--dsw-alias-interactive-bg-hover)}.wsr-delivery-row{box-sizing:border-box;width:100%;height:32px;cursor:pointer;color:var(--dsw-alias-label-primary);background:transparent;border:0;border-radius:8px;display:flex;align-items:center;gap:6px;padding:0 8px;font-size:14px;line-height:20px;text-align:left}.wsr-delivery-row:hover,.wsr-delivery-row[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.wsr-delivery-row:disabled{cursor:default}.wsr-delivery-row>span:first-child{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden;flex:1}.wsr-delivery-status{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px}.wsr-delivery-status-recoverable{color:var(--dsw-alias-state-warning-primary)}";
|
|
3368
3368
|
function installStyle() {
|
|
3369
3369
|
if (typeof document === "undefined" || document.getElementById(STYLE_ID) !== null) return;
|
|
3370
3370
|
const tag = document.createElement("style");
|
|
@@ -3421,16 +3421,17 @@ function createSidebarResources(React2, WorkspaceBrowser, inventory) {
|
|
|
3421
3421
|
{ className: "wsr-sidebar-resources", "data-wsr-sidebar-resources": "true" },
|
|
3422
3422
|
React2.createElement(
|
|
3423
3423
|
"section",
|
|
3424
|
-
{ className: "wsr-sidebar-resource", "aria-label": "Workspace" },
|
|
3424
|
+
{ className: "wsr-sidebar-resource", "data-expanded": workspaceExpanded, "aria-label": "Workspace" },
|
|
3425
3425
|
header("wsr-sidebar-workspace", "Workspace", workspaceExpanded, "workspace"),
|
|
3426
|
-
workspaceExpanded && React2.createElement("div", { id: "wsr-sidebar-workspace" }, React2.createElement(WorkspaceBrowser, props))
|
|
3426
|
+
workspaceExpanded && React2.createElement("div", { id: "wsr-sidebar-workspace", className: "wsr-sidebar-resource-content" }, React2.createElement(WorkspaceBrowser, props))
|
|
3427
3427
|
),
|
|
3428
3428
|
React2.createElement(
|
|
3429
3429
|
"section",
|
|
3430
|
-
{ className: "wsr-sidebar-resource", "aria-label": "Delivery" },
|
|
3430
|
+
{ className: "wsr-sidebar-resource", "data-expanded": deliveryExpanded, "aria-label": "Delivery" },
|
|
3431
3431
|
header("wsr-sidebar-delivery", "Delivery", deliveryExpanded, "delivery"),
|
|
3432
3432
|
deliveryExpanded && React2.createElement("div", {
|
|
3433
3433
|
id: "wsr-sidebar-delivery",
|
|
3434
|
+
className: "wsr-sidebar-resource-content",
|
|
3434
3435
|
role: view.kind === "error" ? "alert" : "region",
|
|
3435
3436
|
"aria-live": "polite"
|
|
3436
3437
|
}, view.kind === "ready" ? React2.createElement("div", { role: "list", "aria-label": "Deliveries" }, view.rows.map((row) => React2.createElement("button", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-wsr-execution",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "DeepSeek Harness adapter bundle for WSR Intake, Delivery resources, Session state, Actions, and final results.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"displayName": "WSR",
|
|
40
40
|
"role": "execution-adapter",
|
|
41
41
|
"foundationOnly": false,
|
|
42
|
-
"ownerRevision": "
|
|
42
|
+
"ownerRevision": "de2335c7a869aff7c010100bcb809fe2d499dced",
|
|
43
43
|
"ownerAsset": {
|
|
44
|
-
"url": "https://github.com/firestige/wsr-execution/releases/download/0.2.
|
|
45
|
-
"sha256": "
|
|
44
|
+
"url": "https://github.com/firestige/wsr-execution/releases/download/0.2.7/wsr-execution-0.2.7.tgz",
|
|
45
|
+
"sha256": "bb3718360946d114251def2f1a975ee783974c2c0d959dbb4289e8955f4b5acc"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { projectDeliveryInventory } from "./model.js";
|
|
2
2
|
|
|
3
3
|
const STYLE_ID = "dsh-wsr-execution-delivery-inventory";
|
|
4
|
-
const CSS = ".wsr-sidebar-resources{min-height:0;flex:1;display:flex;flex-direction:column;gap:4px}.wsr-sidebar-resource{min-height:0;display:flex;flex-direction:column}.wsr-sidebar-resource:
|
|
4
|
+
const CSS = ".wsr-sidebar-resources{box-sizing:border-box;height:100%;min-height:0;flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;gap:4px}.wsr-sidebar-resource{min-height:36px;flex:0 0 auto;overflow:hidden;display:flex;flex-direction:column}.wsr-sidebar-resource[data-expanded=true]{min-height:0;flex:1 1 0}.wsr-sidebar-resource-content{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain}.wsr-sidebar-resource-header{box-sizing:border-box;width:100%;height:36px;flex:0 0 36px;cursor:pointer;color:var(--dsw-alias-label-tertiary);background:transparent;border:0;border-radius:8px;display:flex;align-items:center;gap:6px;padding:0 8px;font-size:13px;text-align:left}.wsr-sidebar-resource-header:hover{background:var(--dsw-alias-interactive-bg-hover)}.wsr-delivery-row{box-sizing:border-box;width:100%;height:32px;cursor:pointer;color:var(--dsw-alias-label-primary);background:transparent;border:0;border-radius:8px;display:flex;align-items:center;gap:6px;padding:0 8px;font-size:14px;line-height:20px;text-align:left}.wsr-delivery-row:hover,.wsr-delivery-row[aria-current=page]{background:var(--dsw-alias-interactive-bg-hover)}.wsr-delivery-row:disabled{cursor:default}.wsr-delivery-row>span:first-child{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden;flex:1}.wsr-delivery-status{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px}.wsr-delivery-status-recoverable{color:var(--dsw-alias-state-warning-primary)}";
|
|
5
5
|
|
|
6
6
|
function installStyle() {
|
|
7
7
|
if (typeof document === "undefined" || document.getElementById(STYLE_ID) !== null) return;
|
|
@@ -50,13 +50,14 @@ export function createSidebarResources(React, WorkspaceBrowser, inventory) {
|
|
|
50
50
|
},
|
|
51
51
|
}, React.createElement("span", { "aria-hidden": "true" }, expanded ? "▾" : "▸"), label);
|
|
52
52
|
return React.createElement("div", { className: "wsr-sidebar-resources", "data-wsr-sidebar-resources": "true" },
|
|
53
|
-
React.createElement("section", { className: "wsr-sidebar-resource", "aria-label": "Workspace" },
|
|
53
|
+
React.createElement("section", { className: "wsr-sidebar-resource", "data-expanded": workspaceExpanded, "aria-label": "Workspace" },
|
|
54
54
|
header("wsr-sidebar-workspace", "Workspace", workspaceExpanded, "workspace"),
|
|
55
|
-
workspaceExpanded && React.createElement("div", { id: "wsr-sidebar-workspace" }, React.createElement(WorkspaceBrowser, props))),
|
|
56
|
-
React.createElement("section", { className: "wsr-sidebar-resource", "aria-label": "Delivery" },
|
|
55
|
+
workspaceExpanded && React.createElement("div", { id: "wsr-sidebar-workspace", className: "wsr-sidebar-resource-content" }, React.createElement(WorkspaceBrowser, props))),
|
|
56
|
+
React.createElement("section", { className: "wsr-sidebar-resource", "data-expanded": deliveryExpanded, "aria-label": "Delivery" },
|
|
57
57
|
header("wsr-sidebar-delivery", "Delivery", deliveryExpanded, "delivery"),
|
|
58
58
|
deliveryExpanded && React.createElement("div", {
|
|
59
|
-
id: "wsr-sidebar-delivery",
|
|
59
|
+
id: "wsr-sidebar-delivery", className: "wsr-sidebar-resource-content",
|
|
60
|
+
role: view.kind === "error" ? "alert" : "region", "aria-live": "polite",
|
|
60
61
|
}, view.kind === "ready"
|
|
61
62
|
? React.createElement("div", { role: "list", "aria-label": "Deliveries" }, view.rows.map((row) => React.createElement("button", {
|
|
62
63
|
key: row.deliveryId, type: "button", role: "listitem", className: "wsr-delivery-row",
|
package/src/intake/plugin.js
CHANGED
|
@@ -181,6 +181,16 @@ export function recordConsumedActionReply(agent, message) {
|
|
|
181
181
|
agent.session.append("user/message", message, { surfaceOp: "append" });
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
export function consumeWsrCommandBeforeModel(payload) {
|
|
185
|
+
const messages = Array.isArray(payload?.messages)
|
|
186
|
+
? payload.messages.filter((message) => message?.source?.kind === "user")
|
|
187
|
+
: [];
|
|
188
|
+
const command = messages.find((message) => message.source?.workflowCommand === "wsr");
|
|
189
|
+
if (command === undefined) return false;
|
|
190
|
+
recordConsumedActionReply(payload.agent, command);
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
|
|
184
194
|
const PRESENTATION_VERSION = "wsr.presentation@1.0.0";
|
|
185
195
|
const PRESENTATION_KINDS = new Set(["command-accepted", "delivery-running", "delivery-list", "delivery-status", "action-output", "action-input-request", "terminal-result", "error"]);
|
|
186
196
|
|
|
@@ -502,7 +512,7 @@ function commandTurn(rawInput) {
|
|
|
502
512
|
}
|
|
503
513
|
|
|
504
514
|
export async function recordWsrCommandInput(agent, rawInput, attachments = [], createId = () => `message-workflow-execution-${randomUUID()}`) {
|
|
505
|
-
if (agent === null || typeof agent !== "object" || typeof agent.
|
|
515
|
+
if (agent === null || typeof agent !== "object" || typeof agent.followup !== "function" || typeof agent.whenIdle !== "function"
|
|
506
516
|
|| typeof rawInput !== "string" || !Array.isArray(attachments) || typeof createId !== "function") {
|
|
507
517
|
throw new TypeError("DSH_INTAKE_USER_INPUT_INVALID");
|
|
508
518
|
}
|
|
@@ -515,7 +525,8 @@ export async function recordWsrCommandInput(agent, rawInput, attachments = [], c
|
|
|
515
525
|
...attachments,
|
|
516
526
|
]),
|
|
517
527
|
});
|
|
518
|
-
agent.
|
|
528
|
+
agent.followup(message);
|
|
529
|
+
await agent.whenIdle();
|
|
519
530
|
return message;
|
|
520
531
|
}
|
|
521
532
|
|
|
@@ -615,11 +626,7 @@ export async function apply(ctx, config) {
|
|
|
615
626
|
}));
|
|
616
627
|
const preStep = ctx.on?.("agent/pre-step", async (payload, next) => {
|
|
617
628
|
const messages = payload.messages.filter((message) => message.source?.kind === "user");
|
|
618
|
-
|
|
619
|
-
if (command !== undefined) {
|
|
620
|
-
recordConsumedActionReply(payload.agent, command);
|
|
621
|
-
return { kind: "reject" };
|
|
622
|
-
}
|
|
629
|
+
if (consumeWsrCommandBeforeModel(payload)) return { kind: "reject" };
|
|
623
630
|
if (await runtime.bindings.bySession(String(payload.agent.id)) === undefined) return next();
|
|
624
631
|
if (messages.length !== 1) return next();
|
|
625
632
|
try {
|