openplanr 2.2641.2 → 3.0.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/CHANGELOG.md +33 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +19 -4
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +15 -11
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/error-boundary.d.ts.map +1 -1
- package/dist/cli/error-boundary.js +2 -1
- package/dist/cli/error-boundary.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/{index-DI_TKz9J.js → index-n08LJ6bK.js} +2 -2
- package/dist/dashboard/assets/{index-DI_TKz9J.js.map → index-n08LJ6bK.js.map} +1 -1
- package/dist/dashboard/dashboard-manifest.json +8 -8
- package/dist/dashboard/index.html +1 -1
- package/dist/services/claude-plugin-service.d.ts +9 -0
- package/dist/services/claude-plugin-service.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.js +12 -0
- package/dist/services/claude-plugin-service.js.map +1 -1
- package/dist/services/runtime-change-summary.d.ts +4 -0
- package/dist/services/runtime-change-summary.d.ts.map +1 -1
- package/dist/services/runtime-change-summary.js +7 -0
- package/dist/services/runtime-change-summary.js.map +1 -1
- package/dist/services/runtime-manager/doctor.js +1 -1
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/runtime-package.d.ts +15 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +50 -10
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager-service.d.ts +11 -0
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +88 -16
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/upgrade-report.d.ts +2 -2
- package/dist/services/upgrade-report.d.ts.map +1 -1
- package/dist/services/upgrade-report.js +14 -2
- package/dist/services/upgrade-report.js.map +1 -1
- package/dist/services/upgrade-service.d.ts +22 -2
- package/dist/services/upgrade-service.d.ts.map +1 -1
- package/dist/services/upgrade-service.js +108 -20
- package/dist/services/upgrade-service.js.map +1 -1
- package/docs/CLI.md +4 -1
- package/docs/TROUBLESHOOTING.md +9 -6
- package/install.ps1 +3 -3
- package/install.sh +3 -3
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +1 -1
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +2 -2
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +21 -21
- package/lib/host-packages/claude/openplanr/README.md +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +238 -68
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/capsule-contract.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +3 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +2 -2
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +20 -20
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/capsule-contract.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +8 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +4 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +238 -68
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +20 -20
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +238 -68
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +6 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/references/capsule-contract.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +3 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +2 -2
- package/lib/node-runtime.d.mts +1 -1
- package/lib/node-runtime.mjs +2 -7
- package/package.json +5 -6
- package/bin/planr.js +0 -7
|
@@ -32,6 +32,34 @@
|
|
|
32
32
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { x: "127", y: "71", width: "18", height: "18", rx: "3", fill: "currentColor" })
|
|
33
33
|
] }) }) });
|
|
34
34
|
}
|
|
35
|
+
function inlineGap(element) {
|
|
36
|
+
const view = element?.ownerDocument.defaultView;
|
|
37
|
+
return view && element ? parseFloat(view.getComputedStyle(element).gap) || 0 : 0;
|
|
38
|
+
}
|
|
39
|
+
function measureLeadingFloor(leading) {
|
|
40
|
+
const view = leading.ownerDocument.defaultView;
|
|
41
|
+
if (!view) return 128;
|
|
42
|
+
const leadingControls = [...leading.children].filter(
|
|
43
|
+
(node) => node instanceof view.HTMLElement && !node.classList.contains("planr-brand") && node.getClientRects().length > 0
|
|
44
|
+
);
|
|
45
|
+
const branding = [
|
|
46
|
+
...leading.querySelectorAll(".planr-mark,.design-wordmark")
|
|
47
|
+
].filter((node) => node.getClientRects().length);
|
|
48
|
+
const brandGap = inlineGap(leading.querySelector(".planr-brand"));
|
|
49
|
+
const brandingWidth = branding.reduce(
|
|
50
|
+
(total, node) => total + node.getBoundingClientRect().width + brandGap,
|
|
51
|
+
0
|
|
52
|
+
);
|
|
53
|
+
const titleBlock = leading.querySelector(".planr-title-block");
|
|
54
|
+
const badge = titleBlock?.querySelector(".studio-type-badge");
|
|
55
|
+
const title = titleBlock?.querySelector("strong,.de-title");
|
|
56
|
+
const titleFloor = Math.max(36, parseFloat(view.getComputedStyle(title ?? leading).fontSize) * 3);
|
|
57
|
+
const identityFloor = Math.max(
|
|
58
|
+
128,
|
|
59
|
+
(badge?.getBoundingClientRect().width || 0) + inlineGap(titleBlock) + titleFloor
|
|
60
|
+
);
|
|
61
|
+
return identityFloor + brandingWidth + leadingControls.reduce((total, control) => total + control.getBoundingClientRect().width, 0) + leadingControls.length * inlineGap(leading);
|
|
62
|
+
}
|
|
35
63
|
function StudioToolbar({
|
|
36
64
|
title,
|
|
37
65
|
titleNode,
|
|
@@ -44,38 +72,123 @@
|
|
|
44
72
|
viewPicker,
|
|
45
73
|
status,
|
|
46
74
|
actions,
|
|
75
|
+
secondaryActions,
|
|
47
76
|
className = ""
|
|
48
77
|
}) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
const toolbar = (0, import_react3.useRef)(null);
|
|
79
|
+
(0, import_react3.useLayoutEffect)(() => {
|
|
80
|
+
const element = toolbar.current;
|
|
81
|
+
const window2 = element?.ownerDocument.defaultView;
|
|
82
|
+
if (!element || !window2) return;
|
|
83
|
+
const center = element.querySelector(".studio-toolbar-center");
|
|
84
|
+
const trailing = element.querySelector(".studio-toolbar-trailing");
|
|
85
|
+
const leading2 = element.querySelector(".studio-toolbar-leading");
|
|
86
|
+
const secondary = element.querySelector(".studio-toolbar-secondary");
|
|
87
|
+
if (!center || !trailing || !leading2) return;
|
|
88
|
+
const measure = () => {
|
|
89
|
+
const width = element.getBoundingClientRect().width;
|
|
90
|
+
if (!width) return;
|
|
91
|
+
element.dataset.studioDensity = width <= 680 ? "narrow" : "regular";
|
|
92
|
+
const style = window2.getComputedStyle(element);
|
|
93
|
+
const available = width - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
|
|
94
|
+
const gap = Math.max(12, parseFloat(style.columnGap) || 0);
|
|
95
|
+
element.dataset.studioCenter = "true";
|
|
96
|
+
const centerWidth = center.scrollWidth;
|
|
97
|
+
element.dataset.studioCenter = String(centerWidth > 0);
|
|
98
|
+
const controlSelector = 'button,a,summary,input,select,output,[role="status"]';
|
|
99
|
+
const controls = [
|
|
100
|
+
...trailing.querySelectorAll(controlSelector),
|
|
101
|
+
...secondary?.querySelectorAll(controlSelector) ?? []
|
|
102
|
+
].filter(
|
|
103
|
+
(control) => control.getClientRects().length && !control.closest('[role="menu"],.studio-tooltip,[role="dialog"]') && (!control.closest("details") || !!control.closest("summary")) && !control.parentElement?.closest(controlSelector)
|
|
104
|
+
);
|
|
105
|
+
const actionWidth = controls.reduce((total, control) => {
|
|
106
|
+
if (secondary?.contains(control) && control.getAttribute("role") === "status") {
|
|
107
|
+
const range = element.ownerDocument.createRange();
|
|
108
|
+
range.selectNodeContents(control);
|
|
109
|
+
const textWidth = range.getBoundingClientRect().width;
|
|
110
|
+
const controlStyle = window2.getComputedStyle(control);
|
|
111
|
+
return total + textWidth + (parseFloat(controlStyle.paddingLeft) || 0) + (parseFloat(controlStyle.paddingRight) || 0);
|
|
112
|
+
}
|
|
113
|
+
return total + control.getBoundingClientRect().width;
|
|
114
|
+
}, 0) + Math.max(0, controls.length - 1) * (parseFloat(window2.getComputedStyle(trailing).gap) || 8);
|
|
115
|
+
const leadingFloor = measureLeadingFloor(leading2);
|
|
116
|
+
const outerWidth = Math.max(leadingFloor, actionWidth);
|
|
117
|
+
element.dataset.studioLayout = centerWidth > 0 ? width <= 680 || centerWidth + outerWidth * 2 + gap * 2 > available ? "compact" : "inline" : leadingFloor + actionWidth + gap > available ? "compact" : "inline";
|
|
118
|
+
};
|
|
119
|
+
measure();
|
|
120
|
+
let frame = 0;
|
|
121
|
+
const scheduleMeasure = () => {
|
|
122
|
+
if (frame) return;
|
|
123
|
+
frame = window2.requestAnimationFrame(() => {
|
|
124
|
+
frame = 0;
|
|
125
|
+
measure();
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
const resize = typeof window2.ResizeObserver === "function" ? new window2.ResizeObserver(scheduleMeasure) : null;
|
|
129
|
+
for (const node of [element, center, trailing, secondary]) if (node) resize?.observe(node);
|
|
130
|
+
const mutations = new window2.MutationObserver(scheduleMeasure);
|
|
131
|
+
mutations.observe(element, {
|
|
132
|
+
subtree: true,
|
|
133
|
+
childList: true,
|
|
134
|
+
characterData: true,
|
|
135
|
+
attributes: true,
|
|
136
|
+
attributeFilter: ["hidden"]
|
|
137
|
+
});
|
|
138
|
+
window2.addEventListener("resize", scheduleMeasure);
|
|
139
|
+
let active = true;
|
|
140
|
+
void element.ownerDocument.fonts?.ready.then(() => {
|
|
141
|
+
if (active) scheduleMeasure();
|
|
142
|
+
});
|
|
143
|
+
return () => {
|
|
144
|
+
active = false;
|
|
145
|
+
resize?.disconnect();
|
|
146
|
+
mutations.disconnect();
|
|
147
|
+
window2.cancelAnimationFrame(frame);
|
|
148
|
+
window2.removeEventListener("resize", scheduleMeasure);
|
|
149
|
+
};
|
|
150
|
+
}, [Tag]);
|
|
151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
152
|
+
Tag,
|
|
153
|
+
{
|
|
154
|
+
ref: (node) => {
|
|
155
|
+
toolbar.current = node;
|
|
156
|
+
},
|
|
157
|
+
className: `planr-toolbar studio-toolbar ${className}`,
|
|
158
|
+
"data-studio-react-chrome": "true",
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "studio-toolbar-leading design-toolbar-leading", children: [
|
|
161
|
+
leading,
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "planr-brand", children: [
|
|
163
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StudioMark, {}),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "design-wordmark", children: [
|
|
166
|
+
"Open",
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: "Planr" })
|
|
168
|
+
] })
|
|
169
|
+
] }),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "studio-identity", children: [
|
|
171
|
+
hierarchy.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("nav", { className: "studio-hierarchy", "aria-label": "Project path", children: hierarchy.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
172
|
+
index2 > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: " / " }),
|
|
173
|
+
item.href ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: item.href, children: item.label }) : item.label
|
|
174
|
+
] }, item.href ?? item.label)) }),
|
|
175
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "planr-title-block", children: [
|
|
176
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StudioBadge, { children: kind === "artifact" ? "Artifact" : kind === "diagram" ? "Diagram" : "Design" }),
|
|
177
|
+
titleNode ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { title, children: title })
|
|
178
|
+
] }),
|
|
179
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "studio-subtitle", children: subtitle })
|
|
180
|
+
] })
|
|
58
181
|
] })
|
|
59
182
|
] }),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "studio-subtitle", children: subtitle })
|
|
70
|
-
] })
|
|
71
|
-
] })
|
|
72
|
-
] }),
|
|
73
|
-
viewPicker,
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "studio-toolbar-trailing design-toolbar-trailing", children: [
|
|
75
|
-
status,
|
|
76
|
-
actions
|
|
77
|
-
] })
|
|
78
|
-
] });
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "studio-toolbar-center", children: viewPicker }),
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "studio-toolbar-trailing design-toolbar-trailing", children: [
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "studio-toolbar-status", children: status }),
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "studio-toolbar-actions", children: actions })
|
|
187
|
+
] }),
|
|
188
|
+
secondaryActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "studio-toolbar-secondary", children: secondaryActions })
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
);
|
|
79
192
|
}
|
|
80
193
|
function StudioMenu({
|
|
81
194
|
label,
|
|
@@ -86,49 +199,106 @@
|
|
|
86
199
|
onOpenChange
|
|
87
200
|
}) {
|
|
88
201
|
const trigger = (0, import_react3.useRef)(null);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
202
|
+
const mousePosition = (0, import_react3.useRef)(null);
|
|
203
|
+
const keyboardPosition = (0, import_react3.useRef)(null);
|
|
204
|
+
(0, import_react3.useLayoutEffect)(() => {
|
|
205
|
+
const ownerDocument = trigger.current?.ownerDocument;
|
|
206
|
+
if (!ownerDocument) return;
|
|
207
|
+
const move = (event) => {
|
|
208
|
+
if (event.pointerType !== "mouse") return;
|
|
209
|
+
const position = { x: event.clientX, y: event.clientY };
|
|
210
|
+
const previous = keyboardPosition.current;
|
|
211
|
+
if (previous && (previous.x !== position.x || previous.y !== position.y))
|
|
212
|
+
keyboardPosition.current = null;
|
|
213
|
+
mousePosition.current = position;
|
|
214
|
+
};
|
|
215
|
+
const down = (event) => {
|
|
216
|
+
keyboardPosition.current = null;
|
|
217
|
+
if (event.pointerType === "mouse")
|
|
218
|
+
mousePosition.current = { x: event.clientX, y: event.clientY };
|
|
219
|
+
};
|
|
220
|
+
ownerDocument.addEventListener("pointermove", move, true);
|
|
221
|
+
ownerDocument.addEventListener("pointerdown", down, true);
|
|
222
|
+
return () => {
|
|
223
|
+
ownerDocument.removeEventListener("pointermove", move, true);
|
|
224
|
+
ownerDocument.removeEventListener("pointerdown", down, true);
|
|
225
|
+
};
|
|
226
|
+
}, []);
|
|
227
|
+
const retainKeyboardFocus = (event) => {
|
|
228
|
+
const position = keyboardPosition.current;
|
|
229
|
+
if (event.pointerType === "mouse" && position?.x === event.clientX && position.y === event.clientY)
|
|
230
|
+
event.preventDefault();
|
|
231
|
+
};
|
|
232
|
+
const keyboardInput = () => {
|
|
233
|
+
keyboardPosition.current = mousePosition.current;
|
|
234
|
+
};
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
236
|
+
dist_exports5.Root,
|
|
237
|
+
{
|
|
238
|
+
modal: false,
|
|
239
|
+
open,
|
|
240
|
+
onOpenChange: (value) => {
|
|
241
|
+
if (!value) keyboardPosition.current = null;
|
|
242
|
+
onOpenChange?.(value);
|
|
243
|
+
},
|
|
244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: `studio-menu ${className}`, children: [
|
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(dist_exports5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
246
|
+
StudioButton,
|
|
247
|
+
{
|
|
248
|
+
"aria-label": label,
|
|
249
|
+
title: label,
|
|
250
|
+
...triggerAttributes,
|
|
251
|
+
ref: trigger,
|
|
252
|
+
onKeyDownCapture: keyboardInput,
|
|
253
|
+
children: [
|
|
254
|
+
label,
|
|
255
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: "⌄" })
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
) }),
|
|
259
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
260
|
+
dist_exports5.Content,
|
|
112
261
|
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
262
|
+
className: "studio-menu-content",
|
|
263
|
+
align: "end",
|
|
264
|
+
sideOffset: 8,
|
|
265
|
+
collisionPadding: 8,
|
|
266
|
+
onKeyDownCapture: keyboardInput,
|
|
267
|
+
onCloseAutoFocus: (event) => {
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
const content = event.target;
|
|
270
|
+
const ownerDocument = content?.ownerDocument;
|
|
271
|
+
const active = ownerDocument?.activeElement;
|
|
272
|
+
if (active?.isConnected && active !== ownerDocument?.body && active !== ownerDocument?.documentElement && !content?.contains(active))
|
|
273
|
+
return;
|
|
274
|
+
if (trigger.current?.isConnected) trigger.current.focus();
|
|
275
|
+
},
|
|
276
|
+
children: items.map((item, index2) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
277
|
+
dist_exports5.Item,
|
|
118
278
|
{
|
|
119
|
-
|
|
120
|
-
className: `studio-menu-item${index2 > 0 && item.group !== items[index2 - 1].group ? " studio-menu-group-start" : ""}`,
|
|
279
|
+
asChild: true,
|
|
121
280
|
disabled: item.disabled,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
281
|
+
onSelect: item.onSelect,
|
|
282
|
+
onPointerMove: retainKeyboardFocus,
|
|
283
|
+
onPointerLeave: retainKeyboardFocus,
|
|
284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
285
|
+
"button",
|
|
286
|
+
{
|
|
287
|
+
type: "button",
|
|
288
|
+
className: `studio-menu-item${index2 > 0 && item.group !== items[index2 - 1].group ? " studio-menu-group-start" : ""}`,
|
|
289
|
+
disabled: item.disabled,
|
|
290
|
+
...item.attributes,
|
|
291
|
+
children: item.label
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
},
|
|
295
|
+
item.id
|
|
296
|
+
))
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] })
|
|
300
|
+
}
|
|
301
|
+
);
|
|
132
302
|
}
|
|
133
303
|
function StudioPanelDialog({
|
|
134
304
|
open,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"kind": "openplanr-runtime-asset-sources",
|
|
3
3
|
"schemaVersion": "1.0.0",
|
|
4
4
|
"asset": "studio.js",
|
|
5
|
-
"bytes":
|
|
6
|
-
"sha256": "
|
|
5
|
+
"bytes": 1146075,
|
|
6
|
+
"sha256": "f649b59fe0a31ec9055d6e5bf5b68425c1fe4e996224c35603d84f91021949cf",
|
|
7
7
|
"scopes": [
|
|
8
8
|
{
|
|
9
9
|
"id": "bundle",
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"packages/design/lib/design/ui/enhancements.mjs",
|
|
144
144
|
"packages/design/lib/design/ui/handoff-center.mjs"
|
|
145
145
|
],
|
|
146
|
-
"bytes":
|
|
147
|
-
"sha256": "
|
|
146
|
+
"bytes": 152776,
|
|
147
|
+
"sha256": "9e2ac3d6b99028c7335aacf548f9e04fdf709d15f889db3e35bbebc389631000"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"path": "studio.js.sources/13-studio-shell.js",
|
|
@@ -238,8 +238,8 @@
|
|
|
238
238
|
"packages/artifact/lib/artifact/ui/studio-shell-components.mjs",
|
|
239
239
|
"packages/artifact/lib/artifact/ui/studio-shell-mount-impl.mjs"
|
|
240
240
|
],
|
|
241
|
-
"bytes":
|
|
242
|
-
"sha256": "
|
|
241
|
+
"bytes": 27277,
|
|
242
|
+
"sha256": "81af29a6a5a15fd4f0ef41fc48e1eca63c30b3745fd1d92830ba83f7cf2ba603"
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"path": "studio.js.sources/17-design-studio.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openplanr/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Canonical OpenPlanr schemas, registries, typed errors, and portable contract validation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -115,6 +115,10 @@
|
|
|
115
115
|
"./sharing-security-contracts": {
|
|
116
116
|
"types": "./src/sharing-security-contracts.d.mts",
|
|
117
117
|
"import": "./src/sharing-security-contracts.mjs"
|
|
118
|
+
},
|
|
119
|
+
"./enterprise-journey-contracts": {
|
|
120
|
+
"types": "./src/enterprise-journey-contracts.d.mts",
|
|
121
|
+
"import": "./src/enterprise-journey-contracts.mjs"
|
|
118
122
|
}
|
|
119
123
|
},
|
|
120
124
|
"files": [
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
"test": "node --test ../../tests/protocol/*.test.mjs"
|
|
133
137
|
},
|
|
134
138
|
"engines": {
|
|
135
|
-
"node": ">=
|
|
139
|
+
"node": ">=22.13.0"
|
|
136
140
|
},
|
|
137
141
|
"repository": {
|
|
138
142
|
"type": "git",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openplanr/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Canonical OpenPlanr schemas, registries, typed errors, and portable contract validation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -115,6 +115,10 @@
|
|
|
115
115
|
"./sharing-security-contracts": {
|
|
116
116
|
"types": "./src/sharing-security-contracts.d.mts",
|
|
117
117
|
"import": "./src/sharing-security-contracts.mjs"
|
|
118
|
+
},
|
|
119
|
+
"./enterprise-journey-contracts": {
|
|
120
|
+
"types": "./src/enterprise-journey-contracts.d.mts",
|
|
121
|
+
"import": "./src/enterprise-journey-contracts.mjs"
|
|
118
122
|
}
|
|
119
123
|
},
|
|
120
124
|
"files": [
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
"test": "node --test ../../tests/protocol/*.test.mjs"
|
|
133
137
|
},
|
|
134
138
|
"engines": {
|
|
135
|
-
"node": ">=
|
|
139
|
+
"node": ">=22.13.0"
|
|
136
140
|
},
|
|
137
141
|
"repository": {
|
|
138
142
|
"type": "git",
|
|
@@ -16,7 +16,7 @@ Ordinary implementation remains with `planr-ship`.
|
|
|
16
16
|
Resolve [runner.mjs](scripts/runner.mjs) from this installed skill. Call it through
|
|
17
17
|
Node as `node <installed-skill>/scripts/runner.mjs <action>`, with one JSON object
|
|
18
18
|
on stdin. Alternatively, include `action` in that object and omit the command-line
|
|
19
|
-
action; conflicting actions are rejected. `probe` discovers Node
|
|
19
|
+
action; conflicting actions are rejected. `probe` discovers Node 22+, Git, installed
|
|
20
20
|
CLIs and optional profiles; an OpenPlanr checkout or public CLI command is not
|
|
21
21
|
needed. Reuse normal signed-in authentication. Preserve selection precedence:
|
|
22
22
|
explicit engine/profile, saved choice, then a sole compatible native choice; ask
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Delegation context capsule v1
|
|
2
2
|
|
|
3
|
-
`context.mjs` is an internal, Node
|
|
3
|
+
`context.mjs` is an internal, Node 22+ package resource. It gathers **work context** only. It does not select a profile, grant a writable path, launch an agent, or authorize publication. The orchestrator must show `previewContextCapsule` alongside the selected writable repository, native engine/model selection, configuration trust and known provider or native-managed routing before dispatch.
|
|
4
4
|
|
|
5
5
|
## API
|
|
6
6
|
|
|
@@ -58,7 +58,7 @@ async function inspectWorktreeDependencies(worktreePath) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export async function probeDelegateHost({ repositoryRoot, env = process.env } = {}) {
|
|
61
|
-
const nodeReady = Number(process.versions.node.split('.')[0]) >=
|
|
61
|
+
const nodeReady = Number(process.versions.node.split('.')[0]) >= 22;
|
|
62
62
|
const options = {
|
|
63
63
|
env: { PATH: env.PATH, HOME: env.HOME, USER: env.USER, TMPDIR: env.TMPDIR },
|
|
64
64
|
cwd: repositoryRoot,
|
|
@@ -128,7 +128,7 @@ export async function probeDelegateHost({ repositoryRoot, env = process.env } =
|
|
|
128
128
|
}
|
|
129
129
|
return {
|
|
130
130
|
ready: nodeReady && gitReady,
|
|
131
|
-
node: { ready: nodeReady, minimumMajor:
|
|
131
|
+
node: { ready: nodeReady, minimumMajor: 22 },
|
|
132
132
|
git: { ready: gitReady, ...(gitDiagnostic ? { diagnostic: gitDiagnostic } : {}) },
|
|
133
133
|
repository,
|
|
134
134
|
engines,
|
|
@@ -167,7 +167,7 @@ export async function prepareDelegateRun({
|
|
|
167
167
|
if (!host.ready || !host.repository?.ready)
|
|
168
168
|
throw new DelegateRunError(
|
|
169
169
|
'E_DELEGATE_PREREQUISITE',
|
|
170
|
-
'Node
|
|
170
|
+
'Node 22+, Git, and a repository with a commit are required before task collection.',
|
|
171
171
|
null,
|
|
172
172
|
host,
|
|
173
173
|
);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Run the linked design helper from the skill entrypoint relative to the skill's
|
|
4
4
|
directory. It contains deterministic operations and all required assets. It needs
|
|
5
|
-
Node
|
|
5
|
+
Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
|
|
6
6
|
Use `--help` to inspect the installed command interface before writing documents
|
|
7
7
|
or invoking operations; the installed contract is authoritative.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Run the linked design helper from the skill entrypoint relative to the skill's
|
|
4
4
|
directory. It contains deterministic operations and all required assets. It needs
|
|
5
|
-
Node
|
|
5
|
+
Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
|
|
6
6
|
Use `--help` to inspect the installed command interface before writing documents
|
|
7
7
|
or invoking operations; the installed contract is authoritative.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Run the linked design helper from the skill entrypoint relative to the skill's
|
|
4
4
|
directory. It contains deterministic operations and all required assets. It needs
|
|
5
|
-
Node
|
|
5
|
+
Node.js 22.13 or later, with no global CLI, provider credentials or runtime downloads.
|
|
6
6
|
Use `--help` to inspect the installed command interface before writing documents
|
|
7
7
|
or invoking operations; the installed contract is authoritative.
|
|
8
8
|
|
|
@@ -37,7 +37,10 @@ skill's job, then reporting what actually changed — never what was merely
|
|
|
37
37
|
attempted.
|
|
38
38
|
|
|
39
39
|
1. **Decide.** Run `openplanr upgrade status --json` and read `status`. If it is
|
|
40
|
-
`aligned` or `unknown`, there is nothing to drive —
|
|
40
|
+
`aligned` or `unknown` with empty `nextSteps`, there is nothing to drive —
|
|
41
|
+
report it and stop. If it is `agents-behind`, or `aligned` with `nextSteps`,
|
|
42
|
+
the CLI is already current: run its `nextSteps` commands in order, as step 3
|
|
43
|
+
describes, without upgrading the CLI.
|
|
41
44
|
Record the reported `installed` versions; that is the before state.
|
|
42
45
|
2. **Own half, prescribe half.** If `status` is `upgrade-available` or
|
|
43
46
|
`incompatible`, confirm with the user (this upgrades the npm CLI), then run
|
|
@@ -52,6 +52,10 @@ Shape (the fields this skill reads):
|
|
|
52
52
|
- `upgrade-available` or `incompatible` → act. First **record the `installed`
|
|
53
53
|
block as the before state** — the honest diff at the end depends on it. When
|
|
54
54
|
only `nextSteps` is non-empty, skip to step 3.
|
|
55
|
+
- `agents-behind` → the CLI is current and a coding agent's OpenPlanr install
|
|
56
|
+
needs updating. Record the `installed` block, then skip to step 3.
|
|
57
|
+
- `aligned` with non-empty `nextSteps` → the versions match, but an install needs
|
|
58
|
+
the `openplanr doctor` commands listed. Skip to step 3.
|
|
55
59
|
|
|
56
60
|
## 2. Upgrade the CLI and obtain the next steps
|
|
57
61
|
|
|
@@ -90,6 +94,10 @@ this file.** Other shapes:
|
|
|
90
94
|
`openplanr upgrade status --json` and use its `nextSteps`.
|
|
91
95
|
- An `openplanr doctor` command: planning that agent's update failed, and `detail`
|
|
92
96
|
says why. Relay it and run `openplanr doctor --json`.
|
|
97
|
+
- An `openplanr doctor --fix` command: a file in that agent's runtime package was
|
|
98
|
+
changed outside OpenPlanr, and `detail` names it. Run it, show the user the
|
|
99
|
+
repair preview, and rerun it with `--yes` only after they confirm. The changed
|
|
100
|
+
files are backed up before they are replaced.
|
|
93
101
|
|
|
94
102
|
`pluginHalfCommands` repeats the commands for older readers; read `nextSteps`.
|
|
95
103
|
|
|
@@ -118,8 +118,8 @@ instead of repeating every path in chat.
|
|
|
118
118
|
- **Checks:** frontmatter, ID and acceptance coverage checks actually performed.
|
|
119
119
|
- **Issues:** unresolved inputs or material assumptions, with their impact and recovery step; omit when empty.
|
|
120
120
|
- **Next:** the exact ready task selector and a copy-ready host-native
|
|
121
|
-
invocation such as
|
|
122
|
-
|
|
121
|
+
invocation such as `/planr:ship T-NNN` (Claude Code), `$planr:ship T-NNN`
|
|
122
|
+
(Codex/ChatGPT) or the `planr-ship` rule (Cursor).
|
|
123
123
|
|
|
124
124
|
Mention the planning layout or consulted lenses only when they explain a material
|
|
125
125
|
choice. Different summary wording never requires another planning run.
|