@kujolang/paperclip 0.1.3 → 0.1.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4 - 2026-09-02
4
+
5
+ - Show Kujo automatically in Paperclip's current issue view while keeping the shared detail tab for project, issue, and run pages.
6
+ - Replace the basic action list with a polished monochrome workspace, clearer action cards, stronger artifact states, and responsive controls.
7
+ - Correct the empty Context Pack state so it reports that a pack has not been generated.
8
+
3
9
  ## 0.1.3 - 2026-09-02
4
10
 
5
11
  - Resolve the installed `@kujolang/kujo-runtime` package at worker runtime instead of inlining its package resolver into the ESM worker bundle.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kujo for Paperclip
2
2
 
3
- [![Version](https://img.shields.io/badge/version-0.1.3-black)](https://github.com/kujolang/paperclip/releases/tag/v0.1.3)
3
+ [![Version](https://img.shields.io/badge/version-0.1.4-black)](https://github.com/kujolang/paperclip/releases/tag/v0.1.4)
4
4
  [![License](https://img.shields.io/badge/license-MIT-lightgrey)](LICENSE)
5
5
  [![built with Kujo](https://img.shields.io/badge/built%20with-Kujo-white.svg)](https://github.com/kujolang/kujo)
6
6
 
@@ -14,7 +14,7 @@ You need Paperclip `2026.824.1` or later and Node.js `24.11.0` or later.
14
14
  npx paperclipai plugin install @kujolang/paperclip
15
15
  ```
16
16
 
17
- Restart Paperclip if it is already running. Open a project, issue, or run and select the **Kujo** tab. The status panel should report that the runtime and all four bundled components are ready.
17
+ Restart Paperclip if it is already running. Kujo appears automatically inside Paperclip's current task view. On project and run pages, open the **Kujo** tab. You do not need to switch to the Classic Task Interface.
18
18
 
19
19
  The npm package includes the correct Kujo runtime for macOS arm64/x64, Linux arm64/x64, and Windows x64. Installation does not run `preinstall`, `install`, or `postinstall` scripts.
20
20
 
@@ -22,7 +22,7 @@ See [Installation](docs/INSTALLATION.md) for upgrades, local development install
22
22
 
23
23
  ## Use
24
24
 
25
- Open the **Kujo** tab on a project or issue to:
25
+ Open an issue to use the inline Kujo workspace, or open the **Kujo** tab on a project, issue detail page, or run to:
26
26
 
27
27
  - generate a **Review Pack** for the working tree;
28
28
  - create a task-specific **Context Pack**;
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
package/dist/manifest.js CHANGED
@@ -14527,7 +14527,7 @@ var DEFAULT_LIMITS = {
14527
14527
  maxInputLogBytes: 2e5,
14528
14528
  maxContextFileBytes: 2e3
14529
14529
  };
14530
- var PLUGIN_VERSION = "0.1.3";
14530
+ var PLUGIN_VERSION = "0.1.4";
14531
14531
  var MINIMUM_HOST_VERSION = "0.0.0";
14532
14532
 
14533
14533
  // src/config/schema.ts
@@ -14677,13 +14677,22 @@ var manifest = {
14677
14677
  description: "Request focused Context Packs before broad repository exploration."
14678
14678
  }],
14679
14679
  ui: {
14680
- slots: [{
14681
- type: "detailTab",
14682
- id: "kujo",
14683
- displayName: "Kujo",
14684
- exportName: "KujoDetailTab",
14685
- entityTypes: ["project", "issue", "run"]
14686
- }]
14680
+ slots: [
14681
+ {
14682
+ type: "detailTab",
14683
+ id: "kujo",
14684
+ displayName: "Kujo",
14685
+ exportName: "KujoDetailTab",
14686
+ entityTypes: ["project", "issue", "run"]
14687
+ },
14688
+ {
14689
+ type: "taskDetailView",
14690
+ id: "kujo-task-view",
14691
+ displayName: "Kujo",
14692
+ exportName: "KujoTaskDetailView",
14693
+ entityTypes: ["issue"]
14694
+ }
14695
+ ]
14687
14696
  }
14688
14697
  };
14689
14698
  var manifest_default = manifest;
package/dist/ui/index.js CHANGED
@@ -1,122 +1,244 @@
1
1
  // src/ui/index.tsx
2
2
  import { useState } from "react";
3
- import { StatusBadge, Spinner, usePluginAction, usePluginData } from "@paperclipai/plugin-sdk/ui";
3
+ import {
4
+ StatusBadge,
5
+ Spinner,
6
+ usePluginAction,
7
+ usePluginData
8
+ } from "@paperclipai/plugin-sdk/ui";
4
9
  import { jsx, jsxs } from "react/jsx-runtime";
5
- var card = { border: "1px solid var(--border, #ddd)", borderRadius: 8, padding: 16, display: "grid", gap: 10 };
6
- var grid = { display: "grid", gap: 16 };
7
- var metrics = { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(120px, 1fr))", gap: 12 };
8
- function ReviewSection({ review }) {
9
- if (!review) return /* @__PURE__ */ jsxs("section", { style: card, children: [
10
- /* @__PURE__ */ jsx("strong", { children: "Review Pack" }),
11
- /* @__PURE__ */ jsx("span", { children: "Not generated" })
10
+ var colors = {
11
+ ink: "var(--foreground, #111111)",
12
+ muted: "var(--muted-foreground, #6b7280)",
13
+ border: "var(--border, #e5e7eb)",
14
+ surface: "var(--card, #ffffff)",
15
+ canvas: "var(--background, #ffffff)",
16
+ soft: "var(--muted, #f5f5f5)",
17
+ danger: "var(--destructive, #b42318)"
18
+ };
19
+ var panel = {
20
+ color: colors.ink,
21
+ display: "grid",
22
+ gap: 16,
23
+ width: "100%",
24
+ fontFamily: "inherit"
25
+ };
26
+ var card = {
27
+ background: colors.surface,
28
+ border: `1px solid ${colors.border}`,
29
+ borderRadius: 14,
30
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.04)",
31
+ display: "grid",
32
+ gap: 14,
33
+ padding: 18
34
+ };
35
+ var hero = {
36
+ ...card,
37
+ alignItems: "center",
38
+ background: `linear-gradient(135deg, ${colors.surface} 0%, ${colors.soft} 100%)`,
39
+ gridTemplateColumns: "auto minmax(0, 1fr) auto"
40
+ };
41
+ var actionGrid = {
42
+ display: "grid",
43
+ gap: 14,
44
+ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))"
45
+ };
46
+ var actionCard = {
47
+ background: colors.canvas,
48
+ border: `1px solid ${colors.border}`,
49
+ borderRadius: 12,
50
+ display: "flex",
51
+ flexDirection: "column",
52
+ gap: 10,
53
+ minWidth: 0,
54
+ padding: 16
55
+ };
56
+ var input = {
57
+ background: colors.canvas,
58
+ border: `1px solid ${colors.border}`,
59
+ borderRadius: 9,
60
+ boxSizing: "border-box",
61
+ color: colors.ink,
62
+ display: "block",
63
+ font: "inherit",
64
+ fontSize: 13,
65
+ lineHeight: 1.45,
66
+ marginTop: 6,
67
+ outline: "none",
68
+ padding: "10px 12px",
69
+ resize: "vertical",
70
+ width: "100%"
71
+ };
72
+ var buttonBase = {
73
+ alignItems: "center",
74
+ borderRadius: 9,
75
+ cursor: "pointer",
76
+ display: "inline-flex",
77
+ font: "inherit",
78
+ fontSize: 13,
79
+ fontWeight: 650,
80
+ gap: 7,
81
+ justifyContent: "center",
82
+ lineHeight: 1,
83
+ minHeight: 38,
84
+ padding: "10px 14px",
85
+ transition: "opacity 120ms ease, transform 120ms ease"
86
+ };
87
+ var primaryButton = {
88
+ ...buttonBase,
89
+ background: colors.ink,
90
+ border: `1px solid ${colors.ink}`,
91
+ color: colors.canvas,
92
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.14)"
93
+ };
94
+ var secondaryButton = {
95
+ ...buttonBase,
96
+ background: colors.canvas,
97
+ border: `1px solid ${colors.border}`,
98
+ color: colors.ink
99
+ };
100
+ var dangerButton = {
101
+ ...secondaryButton,
102
+ color: colors.danger
103
+ };
104
+ var eyebrow = {
105
+ color: colors.muted,
106
+ fontSize: 11,
107
+ fontWeight: 700,
108
+ letterSpacing: "0.09em",
109
+ textTransform: "uppercase"
110
+ };
111
+ var muted = { color: colors.muted, fontSize: 13, lineHeight: 1.5 };
112
+ function KujoMark() {
113
+ return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: {
114
+ alignItems: "center",
115
+ background: colors.ink,
116
+ borderRadius: 11,
117
+ color: colors.canvas,
118
+ display: "flex",
119
+ fontSize: 15,
120
+ fontWeight: 800,
121
+ height: 42,
122
+ justifyContent: "center",
123
+ letterSpacing: "-0.04em",
124
+ width: 42
125
+ }, children: "K" });
126
+ }
127
+ function ActionButton({ children, disabled, onClick, tone = "primary" }) {
128
+ const style = tone === "primary" ? primaryButton : tone === "danger" ? dangerButton : secondaryButton;
129
+ return /* @__PURE__ */ jsx(
130
+ "button",
131
+ {
132
+ type: "button",
133
+ disabled,
134
+ onClick,
135
+ style: { ...style, ...disabled ? { cursor: "not-allowed", opacity: 0.45 } : {} },
136
+ children
137
+ }
138
+ );
139
+ }
140
+ function SectionTitle({ title, detail, badge }) {
141
+ return /* @__PURE__ */ jsxs("div", { style: { alignItems: "flex-start", display: "flex", gap: 12, justifyContent: "space-between" }, children: [
142
+ /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 4 }, children: [
143
+ /* @__PURE__ */ jsx("strong", { style: { fontSize: 15 }, children: title }),
144
+ /* @__PURE__ */ jsx("span", { style: muted, children: detail })
145
+ ] }),
146
+ badge
12
147
  ] });
148
+ }
149
+ function EmptySection({ title, detail }) {
150
+ return /* @__PURE__ */ jsx("section", { style: card, children: /* @__PURE__ */ jsx(SectionTitle, { title, detail, badge: /* @__PURE__ */ jsx(StatusBadge, { status: "pending", label: "NOT GENERATED" }) }) });
151
+ }
152
+ function ReviewSection({ review }) {
153
+ if (!review) return /* @__PURE__ */ jsx(EmptySection, { title: "Review Pack", detail: "Generate a bounded summary of the current workspace changes." });
13
154
  return /* @__PURE__ */ jsxs("section", { style: card, children: [
14
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
15
- /* @__PURE__ */ jsx("strong", { children: "Review Pack" }),
16
- /* @__PURE__ */ jsx(
17
- StatusBadge,
18
- {
19
- status: review.footprint.riskLevel === "high" ? "error" : review.footprint.riskLevel === "medium" ? "warning" : "ok",
20
- label: `${review.footprint.riskLevel.toUpperCase()} BLAST RADIUS`
21
- }
22
- )
23
- ] }),
24
- review.stale && /* @__PURE__ */ jsx("div", { role: "alert", children: "This review was generated for an earlier workspace state." }),
25
- /* @__PURE__ */ jsxs("div", { style: metrics, children: [
26
- /* @__PURE__ */ jsxs("span", { children: [
27
- /* @__PURE__ */ jsx("b", { children: review.footprint.filesChanged }),
28
- /* @__PURE__ */ jsx("br", {}),
29
- "files changed"
30
- ] }),
31
- /* @__PURE__ */ jsxs("span", { children: [
32
- /* @__PURE__ */ jsxs("b", { children: [
33
- "+",
34
- review.footprint.additions,
35
- " / -",
36
- review.footprint.deletions
37
- ] }),
38
- /* @__PURE__ */ jsx("br", {}),
39
- "lines"
40
- ] }),
41
- /* @__PURE__ */ jsxs("span", { children: [
42
- /* @__PURE__ */ jsx("b", { children: review.footprint.churn }),
43
- /* @__PURE__ */ jsx("br", {}),
44
- "lines churn"
45
- ] })
46
- ] }),
155
+ /* @__PURE__ */ jsx(
156
+ SectionTitle,
157
+ {
158
+ title: "Review Pack",
159
+ detail: "Change size, risk signals, and suggested checks.",
160
+ badge: /* @__PURE__ */ jsx(
161
+ StatusBadge,
162
+ {
163
+ status: review.footprint.riskLevel === "high" ? "error" : review.footprint.riskLevel === "medium" ? "warning" : "ok",
164
+ label: `${review.footprint.riskLevel.toUpperCase()} RISK`
165
+ }
166
+ )
167
+ }
168
+ ),
169
+ review.stale && /* @__PURE__ */ jsx("div", { role: "alert", style: { ...muted, color: colors.danger }, children: "This review is stale. Generate a new Review Pack before using it." }),
170
+ /* @__PURE__ */ jsx("div", { style: { display: "grid", gap: 10, gridTemplateColumns: "repeat(auto-fit, minmax(130px, 1fr))" }, children: [
171
+ [review.footprint.filesChanged, "Files changed"],
172
+ [`+${review.footprint.additions} / -${review.footprint.deletions}`, "Line delta"],
173
+ [review.footprint.churn, "Lines churn"]
174
+ ].map(([value, label]) => /* @__PURE__ */ jsxs("div", { style: { background: colors.soft, borderRadius: 10, display: "grid", gap: 3, padding: 12 }, children: [
175
+ /* @__PURE__ */ jsx("strong", { style: { fontSize: 18 }, children: value }),
176
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: label })
177
+ ] }, label)) }),
47
178
  review.footprint.signals.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
48
- /* @__PURE__ */ jsx("b", { children: "Signals" }),
49
- /* @__PURE__ */ jsx("ul", { children: review.footprint.signals.map((signal) => /* @__PURE__ */ jsx("li", { children: signal.message }, signal.id)) })
179
+ /* @__PURE__ */ jsx("strong", { style: { fontSize: 13 }, children: "Signals" }),
180
+ /* @__PURE__ */ jsx("ul", { style: { ...muted, marginBottom: 0, paddingLeft: 20 }, children: review.footprint.signals.map((signal) => /* @__PURE__ */ jsx("li", { children: signal.message }, signal.id)) })
50
181
  ] }),
51
182
  /* @__PURE__ */ jsxs("div", { children: [
52
- /* @__PURE__ */ jsx("b", { children: "Suggested verification" }),
53
- /* @__PURE__ */ jsx("div", { style: { fontSize: 12 }, children: "Suggestions only \u2014 no command is claimed as executed." }),
54
- /* @__PURE__ */ jsx("ul", { children: review.suggestedTests.slice(0, 12).map((test) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("code", { children: test.command }) }, test.command)) })
183
+ /* @__PURE__ */ jsx("strong", { style: { fontSize: 13 }, children: "Suggested verification" }),
184
+ /* @__PURE__ */ jsx("div", { style: muted, children: "Suggestions only. Kujo does not claim these commands ran." }),
185
+ /* @__PURE__ */ jsx("ul", { style: { marginBottom: 0, paddingLeft: 20 }, children: review.suggestedTests.slice(0, 12).map((test) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("code", { children: test.command }) }, test.command)) })
55
186
  ] }),
56
- /* @__PURE__ */ jsx("small", { children: "Generated with Kujo ChangeBucket + PatchBrief" })
187
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: "ChangeBucket + PatchBrief" })
57
188
  ] });
58
189
  }
59
190
  function FailureSection({ failure }) {
60
- if (!failure) return /* @__PURE__ */ jsxs("section", { style: card, children: [
61
- /* @__PURE__ */ jsx("strong", { children: "Failure Evidence" }),
62
- /* @__PURE__ */ jsx("span", { children: "None" })
63
- ] });
191
+ if (!failure) return /* @__PURE__ */ jsx(EmptySection, { title: "Failure Evidence", detail: "No redacted failure record has been captured." });
64
192
  return /* @__PURE__ */ jsxs("section", { style: card, children: [
65
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
66
- /* @__PURE__ */ jsx("strong", { children: "Failure Evidence" }),
67
- /* @__PURE__ */ jsx(StatusBadge, { status: "error", label: "FAILED" })
68
- ] }),
69
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("b", { children: failure.failure.title }) }),
193
+ /* @__PURE__ */ jsx(SectionTitle, { title: "Failure Evidence", detail: failure.failure.title, badge: /* @__PURE__ */ jsx(StatusBadge, { status: "error", label: "CAPTURED" }) }),
70
194
  failure.failure.command && /* @__PURE__ */ jsxs("div", { children: [
71
- /* @__PURE__ */ jsx("small", { children: "Command" }),
195
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: "Command" }),
72
196
  /* @__PURE__ */ jsx("br", {}),
73
197
  /* @__PURE__ */ jsx("code", { children: failure.failure.command })
74
198
  ] }),
75
- failure.failure.exitCode !== void 0 && /* @__PURE__ */ jsxs("div", { children: [
76
- "Exit code: ",
77
- failure.failure.exitCode
78
- ] }),
79
- /* @__PURE__ */ jsxs("div", { children: [
80
- "Redaction applied: ",
199
+ /* @__PURE__ */ jsxs("div", { style: muted, children: [
200
+ failure.failure.exitCode !== void 0 ? `Exit code ${failure.failure.exitCode} \xB7 ` : "",
81
201
  failure.redaction.redactedCount,
82
- " match(es)"
202
+ " sensitive match(es) redacted"
83
203
  ] }),
84
- failure.evidence.map((item) => /* @__PURE__ */ jsxs("details", { children: [
85
- /* @__PURE__ */ jsxs("summary", { children: [
204
+ failure.evidence.map((item) => /* @__PURE__ */ jsxs("details", { style: { background: colors.soft, borderRadius: 10, padding: 12 }, children: [
205
+ /* @__PURE__ */ jsxs("summary", { style: { cursor: "pointer", fontSize: 13, fontWeight: 650 }, children: [
86
206
  item.label,
87
- item.truncated ? " (truncated)" : ""
207
+ item.truncated ? " \xB7 truncated" : ""
88
208
  ] }),
89
- /* @__PURE__ */ jsx("pre", { style: { whiteSpace: "pre-wrap", maxHeight: 320, overflow: "auto" }, children: item.content })
209
+ /* @__PURE__ */ jsx("pre", { style: { fontSize: 12, marginBottom: 0, maxHeight: 320, overflow: "auto", whiteSpace: "pre-wrap" }, children: item.content })
90
210
  ] }, item.label)),
91
- /* @__PURE__ */ jsx("small", { children: "Captured with Kujo CaseFile" })
211
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: "CaseFile" })
92
212
  ] });
93
213
  }
94
214
  function ContextSection({ context }) {
95
- if (!context) return /* @__PURE__ */ jsxs("section", { style: card, children: [
96
- /* @__PURE__ */ jsx("strong", { children: "Context Pack" }),
97
- /* @__PURE__ */ jsx("span", { children: "Available" })
98
- ] });
215
+ if (!context) return /* @__PURE__ */ jsx(EmptySection, { title: "Context Pack", detail: "Select the files that matter before an agent reads broadly." });
99
216
  return /* @__PURE__ */ jsxs("section", { style: card, children: [
100
- /* @__PURE__ */ jsx("strong", { children: "Context Pack" }),
101
- /* @__PURE__ */ jsx("div", { children: context.task }),
102
- /* @__PURE__ */ jsxs("div", { children: [
217
+ /* @__PURE__ */ jsx(
218
+ SectionTitle,
219
+ {
220
+ title: "Context Pack",
221
+ detail: context.task,
222
+ badge: /* @__PURE__ */ jsx(StatusBadge, { status: context.stale ? "warning" : "ok", label: context.stale ? "STALE" : "READY" })
223
+ }
224
+ ),
225
+ /* @__PURE__ */ jsxs("div", { style: { ...muted, fontWeight: 600 }, children: [
103
226
  context.files.length,
104
- " relevant files \xB7 about ",
227
+ " files \xB7 about ",
105
228
  context.estimatedTokens.toLocaleString(),
106
229
  " tokens \xB7 ",
107
- context.depth
230
+ context.depth,
231
+ " depth"
108
232
  ] }),
109
- context.stale && /* @__PURE__ */ jsx("div", { role: "alert", children: "This context was generated for an earlier workspace state." }),
110
- /* @__PURE__ */ jsx("ul", { children: context.files.slice(0, 20).map((file) => /* @__PURE__ */ jsxs("li", { children: [
111
- /* @__PURE__ */ jsx("code", { children: file.path }),
112
- /* @__PURE__ */ jsx("br", {}),
113
- /* @__PURE__ */ jsx("small", { children: file.reason })
233
+ /* @__PURE__ */ jsx("div", { style: { display: "grid", gap: 8 }, children: context.files.slice(0, 20).map((file) => /* @__PURE__ */ jsxs("div", { style: { background: colors.soft, borderRadius: 9, display: "grid", gap: 3, padding: "10px 12px" }, children: [
234
+ /* @__PURE__ */ jsx("code", { style: { fontSize: 12 }, children: file.path }),
235
+ /* @__PURE__ */ jsx("span", { style: muted, children: file.reason })
114
236
  ] }, file.path)) }),
115
- context.truncated && /* @__PURE__ */ jsx("div", { children: "Selection was bounded by the configured budget." }),
116
- /* @__PURE__ */ jsx("small", { children: "Selected with Kujo Scent" })
237
+ context.truncated && /* @__PURE__ */ jsx("div", { style: muted, children: "The configured token budget bounded this selection." }),
238
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: "Scent" })
117
239
  ] });
118
240
  }
119
- function KujoDetailTab({ context }) {
241
+ function KujoPanel({ context, compact = false }) {
120
242
  const { data, loading, error, refresh } = usePluginData("detail", { entityType: context.entityType, entityId: context.entityId });
121
243
  const generateReview = usePluginAction("generate-review");
122
244
  const generateContext = usePluginAction("generate-context");
@@ -140,40 +262,112 @@ function KujoDetailTab({ context }) {
140
262
  setBusy(null);
141
263
  }
142
264
  }
143
- if (loading) return /* @__PURE__ */ jsx(Spinner, { label: "Loading Kujo artifacts" });
144
- if (error) return /* @__PURE__ */ jsxs("div", { role: "alert", children: [
145
- "Unable to load Kujo artifacts: ",
265
+ if (loading) return /* @__PURE__ */ jsx(Spinner, { label: "Loading Kujo workspace intelligence" });
266
+ if (error) return /* @__PURE__ */ jsxs("div", { role: "alert", style: { ...card, color: colors.danger }, children: [
267
+ "Unable to load Kujo: ",
146
268
  error.message
147
269
  ] });
148
- return /* @__PURE__ */ jsxs("div", { style: grid, children: [
149
- /* @__PURE__ */ jsxs("header", { children: [
150
- /* @__PURE__ */ jsx("h2", { style: { marginBottom: 4 }, children: "Kujo" }),
151
- /* @__PURE__ */ jsx("div", { children: "Scope, review, and reproduce agent work." })
270
+ const hasArtifacts = Boolean(data?.review || data?.failure || data?.context);
271
+ return /* @__PURE__ */ jsxs("div", { style: { ...panel, ...compact ? { marginTop: 12 } : {} }, children: [
272
+ /* @__PURE__ */ jsxs("header", { style: hero, children: [
273
+ /* @__PURE__ */ jsx(KujoMark, {}),
274
+ /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 3, minWidth: 0 }, children: [
275
+ /* @__PURE__ */ jsx("span", { style: eyebrow, children: "Workspace intelligence" }),
276
+ /* @__PURE__ */ jsx("strong", { style: { fontSize: compact ? 17 : 20, letterSpacing: "-0.02em" }, children: "Kujo" }),
277
+ /* @__PURE__ */ jsx("span", { style: muted, children: "Scope the work. Review the change. Preserve the evidence." })
278
+ ] }),
279
+ /* @__PURE__ */ jsx(StatusBadge, { status: "ok", label: "READY" })
152
280
  ] }),
153
- actionError && /* @__PURE__ */ jsx("div", { role: "alert", children: actionError }),
281
+ actionError && /* @__PURE__ */ jsx("div", { role: "alert", style: { ...card, borderColor: colors.danger, color: colors.danger }, children: actionError }),
154
282
  canGenerate && /* @__PURE__ */ jsxs("section", { style: card, children: [
155
- /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: 8, flexWrap: "wrap" }, children: /* @__PURE__ */ jsx("button", { disabled: busy !== null, onClick: () => run("review", () => generateReview({ entityType: context.entityType, entityId: context.entityId })), children: busy === "review" ? "Generating\u2026" : "Generate Review Pack" }) }),
156
- /* @__PURE__ */ jsxs("label", { children: [
157
- "Task for Context Pack",
158
- /* @__PURE__ */ jsx("input", { value: task, onChange: (event) => setTask(event.target.value), maxLength: 1e4, style: { display: "block", width: "100%" } })
159
- ] }),
160
- /* @__PURE__ */ jsx("button", { disabled: busy !== null || !task.trim(), onClick: () => run("context", () => generateContext({ entityType: context.entityType, entityId: context.entityId, task, depth: "focused" })), children: busy === "context" ? "Selecting\u2026" : "Generate Context Pack" }),
161
- /* @__PURE__ */ jsxs("label", { children: [
162
- "Failure title",
163
- /* @__PURE__ */ jsx("input", { value: failureTitle, onChange: (event) => setFailureTitle(event.target.value), maxLength: 200, style: { display: "block", width: "100%" } })
283
+ /* @__PURE__ */ jsxs("div", { children: [
284
+ /* @__PURE__ */ jsx("div", { style: eyebrow, children: "Actions" }),
285
+ /* @__PURE__ */ jsx("strong", { style: { display: "block", fontSize: 16, marginTop: 4 }, children: "Create a reviewable work record" })
164
286
  ] }),
165
- /* @__PURE__ */ jsxs("label", { children: [
166
- "Bounded failure log",
167
- /* @__PURE__ */ jsx("textarea", { value: failureLog, onChange: (event) => setFailureLog(event.target.value), maxLength: 2e5, rows: 5, style: { display: "block", width: "100%" } })
168
- ] }),
169
- /* @__PURE__ */ jsx("button", { disabled: busy !== null || !failureTitle.trim(), onClick: () => run("failure", () => captureFailure({ entityType: context.entityType, entityId: context.entityId, title: failureTitle, log: failureLog })), children: busy === "failure" ? "Capturing\u2026" : "Capture Failure Evidence" }),
170
- /* @__PURE__ */ jsx("button", { disabled: busy !== null, onClick: () => run("clear", () => clearArtifacts({ entityType: context.entityType, entityId: context.entityId })), children: busy === "clear" ? "Clearing\u2026" : "Clear Kujo data" })
287
+ /* @__PURE__ */ jsxs("div", { style: actionGrid, children: [
288
+ /* @__PURE__ */ jsxs("div", { style: actionCard, children: [
289
+ /* @__PURE__ */ jsx(SectionTitle, { title: "Review changes", detail: "Measure blast radius and prepare a review handoff." }),
290
+ /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
291
+ /* @__PURE__ */ jsxs(ActionButton, { disabled: busy !== null, onClick: () => run("review", () => generateReview({ entityType: context.entityType, entityId: context.entityId })), children: [
292
+ busy === "review" ? "Generating\u2026" : "Generate Review Pack",
293
+ " ",
294
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2192" })
295
+ ] })
296
+ ] }),
297
+ /* @__PURE__ */ jsxs("div", { style: actionCard, children: [
298
+ /* @__PURE__ */ jsx(SectionTitle, { title: "Select context", detail: "Build a focused, bounded file set for a task." }),
299
+ /* @__PURE__ */ jsxs("label", { style: { ...eyebrow, display: "block" }, children: [
300
+ "Task",
301
+ /* @__PURE__ */ jsx(
302
+ "textarea",
303
+ {
304
+ value: task,
305
+ onChange: (event) => setTask(event.target.value),
306
+ maxLength: 1e4,
307
+ placeholder: "What should the agent investigate?",
308
+ rows: 3,
309
+ style: input
310
+ }
311
+ )
312
+ ] }),
313
+ /* @__PURE__ */ jsxs(ActionButton, { disabled: busy !== null || !task.trim(), onClick: () => run("context", () => generateContext({ entityType: context.entityType, entityId: context.entityId, task, depth: "focused" })), children: [
314
+ busy === "context" ? "Selecting\u2026" : "Generate Context Pack",
315
+ " ",
316
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2192" })
317
+ ] })
318
+ ] }),
319
+ /* @__PURE__ */ jsxs("div", { style: actionCard, children: [
320
+ /* @__PURE__ */ jsx(SectionTitle, { title: "Capture a failure", detail: "Store bounded logs with sensitive values redacted." }),
321
+ /* @__PURE__ */ jsxs("label", { style: { ...eyebrow, display: "block" }, children: [
322
+ "Title",
323
+ /* @__PURE__ */ jsx(
324
+ "input",
325
+ {
326
+ value: failureTitle,
327
+ onChange: (event) => setFailureTitle(event.target.value),
328
+ maxLength: 200,
329
+ placeholder: "CI verification failure",
330
+ style: input
331
+ }
332
+ )
333
+ ] }),
334
+ /* @__PURE__ */ jsxs("label", { style: { ...eyebrow, display: "block" }, children: [
335
+ "Bounded log",
336
+ /* @__PURE__ */ jsx(
337
+ "textarea",
338
+ {
339
+ value: failureLog,
340
+ onChange: (event) => setFailureLog(event.target.value),
341
+ maxLength: 2e5,
342
+ placeholder: "Paste the relevant output here.",
343
+ rows: 3,
344
+ style: input
345
+ }
346
+ )
347
+ ] }),
348
+ /* @__PURE__ */ jsxs(ActionButton, { disabled: busy !== null || !failureTitle.trim(), onClick: () => run("failure", () => captureFailure({ entityType: context.entityType, entityId: context.entityId, title: failureTitle, log: failureLog })), children: [
349
+ busy === "failure" ? "Capturing\u2026" : "Capture Failure Evidence",
350
+ " ",
351
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2192" })
352
+ ] })
353
+ ] })
354
+ ] })
355
+ ] }),
356
+ /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 12 }, children: [
357
+ /* @__PURE__ */ jsx(ReviewSection, { review: data?.review ?? null }),
358
+ /* @__PURE__ */ jsx(FailureSection, { failure: data?.failure ?? null }),
359
+ /* @__PURE__ */ jsx(ContextSection, { context: data?.context ?? null })
171
360
  ] }),
172
- /* @__PURE__ */ jsx(ReviewSection, { review: data?.review ?? null }),
173
- /* @__PURE__ */ jsx(FailureSection, { failure: data?.failure ?? null }),
174
- /* @__PURE__ */ jsx(ContextSection, { context: data?.context ?? null })
361
+ hasArtifacts && /* @__PURE__ */ jsx("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx(ActionButton, { tone: "danger", disabled: busy !== null, onClick: () => run("clear", () => clearArtifacts({ entityType: context.entityType, entityId: context.entityId })), children: busy === "clear" ? "Clearing\u2026" : "Clear Kujo data" }) })
175
362
  ] });
176
363
  }
364
+ function KujoDetailTab(props) {
365
+ return /* @__PURE__ */ jsx(KujoPanel, { ...props });
366
+ }
367
+ function KujoTaskDetailView(props) {
368
+ return /* @__PURE__ */ jsx(KujoPanel, { ...props, compact: true });
369
+ }
177
370
  export {
178
- KujoDetailTab
371
+ KujoDetailTab,
372
+ KujoTaskDetailView
179
373
  };
package/dist/worker.js CHANGED
@@ -28710,7 +28710,7 @@ var CONTEXT_BUDGETS = {
28710
28710
  focused: 16e3,
28711
28711
  broad: 4e4
28712
28712
  };
28713
- var PLUGIN_VERSION = "0.1.3";
28713
+ var PLUGIN_VERSION = "0.1.4";
28714
28714
  var PAPERCLIP_API_VERSION = 1;
28715
28715
 
28716
28716
  // src/config/schema.ts
@@ -14,12 +14,13 @@
14
14
  - `projects.read`, `project.workspaces.read`: canonical workspace resolution only
15
15
  - `plugin.state.read`, `plugin.state.write`: normalized artifact persistence
16
16
  - `ui.detailTab.register`: one shared Kujo tab on project/issue/run details
17
+ - `ui.taskDetailView.register`: an inline Kujo workspace in the current issue view
17
18
  - `skills.managed`: optional Scoped Repository Context guidance
18
19
 
19
20
  The plugin requests no HTTP, secret, issue-write, approval, budget, database, job, webhook, or arbitrary local-folder capability.
20
21
 
21
22
  ## UI walkthrough
22
23
 
23
- The shared Kujo tab starts with runtime/artifact status. Issue/project views provide **Generate Review Pack**, **Generate Context Pack**, and **Capture Failure Evidence** actions. Review shows blast radius, explainable signals, and clearly labeled suggested verification. Failure Evidence shows bounded excerpts and redaction counts. Context shows selected paths, reasons, estimated tokens, depth, and stale/budget status. Run views show associated persisted evidence without exposing a terminal.
24
+ Kujo appears automatically in the current issue view and remains available as a shared detail tab on project, issue detail, and run pages. The workspace presents **Generate Review Pack**, **Generate Context Pack**, and **Capture Failure Evidence** as distinct, styled actions. Review shows blast radius, explainable signals, and clearly labeled suggested verification. Failure Evidence shows bounded excerpts and redaction counts. Context shows selected paths, reasons, estimated tokens, depth, and stale/budget status. Run views show associated persisted evidence without exposing a terminal.
24
25
 
25
26
  Catalog review should require the tagged cross-platform workflow, npm provenance for all six runtime packages and this plugin, install/upgrade/uninstall evidence on the declared minimum host, and the security assertions in `THREAT_MODEL.md`.
@@ -12,7 +12,7 @@
12
12
  npx paperclipai plugin install @kujolang/paperclip
13
13
  ```
14
14
 
15
- Restart Paperclip if it is running. Open a project, issue, or run, select the **Kujo** tab, and check the status panel.
15
+ Restart Paperclip if it is running. Open an issue and confirm that the Kujo workspace appears in the current task view. On project and run pages, open the **Kujo** tab. No Classic Task Interface setting is required.
16
16
 
17
17
  The package installs `@kujolang/kujo-runtime` and one matching optional native package. Supported targets are macOS arm64/x64, Linux arm64/x64, and Windows x64. No Kujo package uses `preinstall`, `install`, or `postinstall`.
18
18
 
package/docs/USAGE.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Paperclip UI
4
4
 
5
- Open the **Kujo** detail tab on a project or issue.
5
+ Open an issue and Kujo appears inline in Paperclip's current task view. There is no Classic Task Interface prerequisite. Project, issue detail, and run pages also expose the **Kujo** detail tab where the host supports tabs.
6
6
 
7
7
  - **Generate Review Pack** measures the current working tree and builds a handoff.
8
8
  - **Generate Context Pack** selects files for a task at minimal, focused, or broad depth.
@@ -10,6 +10,8 @@ Open the **Kujo** detail tab on a project or issue.
10
10
 
11
11
  Run views display saved evidence. They do not expose a terminal.
12
12
 
13
+ The inline workspace and detail tab use the same actions and persisted artifacts, so changing views does not create a second copy of Kujo data.
14
+
13
15
  ## Agent tools
14
16
 
15
17
  ### Review changes
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@kujolang/paperclip",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Make Paperclip agent work easier to scope, review, reproduce, and verify.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/kujolang/paperclip#readme",
7
- "bugs": { "url": "https://github.com/kujolang/paperclip/issues" },
8
- "repository": { "type": "git", "url": "git+https://github.com/kujolang/paperclip.git" },
7
+ "bugs": {
8
+ "url": "https://github.com/kujolang/paperclip/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/kujolang/paperclip.git"
13
+ },
9
14
  "type": "module",
10
15
  "engines": {
11
16
  "node": ">=24.11.0"