@inf-monkeys-tech/monkeys-design 1.0.68 → 1.0.69
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/dist/components/agent-workbench/index.d.mts +2 -2
- package/dist/components/agent-workbench/index.d.ts +2 -2
- package/dist/components/agent-workbench/index.js +71 -54
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +72 -56
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/{details-model-db4bd679f88e.d.mts → details-model-49d05d8a4e6d.d.mts} +27 -20
- package/dist/{details-model-db4bd679f88e.d.ts → details-model-49d05d8a4e6d.d.ts} +27 -20
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +70 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentWorkbenchQuickStartViewModel, AgentSessionViewModel, AgentSessionEvent } from '@inf-monkeys-tech/monkeys';
|
|
3
3
|
export { AgentWorkbenchQuickStartCategory, AgentWorkbenchQuickStartIcon, AgentWorkbenchQuickStartSection, AgentWorkbenchQuickStartTemplate, AgentWorkbenchQuickStartViewModel } from '@inf-monkeys-tech/monkeys';
|
|
4
|
-
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-
|
|
5
|
-
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf,
|
|
4
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-49d05d8a4e6d.mjs';
|
|
5
|
+
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, E as AgentWorkbenchApproval, F as AgentWorkbenchApprovalData, G as AgentWorkbenchApprovalProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, H as AgentWorkbenchExploreCardMedia, I as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, J as AgentWorkbenchExploreMediaTreatment, K as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-49d05d8a4e6d.mjs';
|
|
6
6
|
import { ReactNode, ComponentType } from 'react';
|
|
7
7
|
type AgentWorkbenchComposerIntent = {
|
|
8
8
|
type: 'change-mode';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { AgentWorkbenchComposerViewModel, AgentSessionPermissionProfile, AgentWorkbenchQuickStartViewModel, AgentSessionViewModel, AgentSessionEvent } from '@inf-monkeys-tech/monkeys';
|
|
3
3
|
export { AgentWorkbenchQuickStartCategory, AgentWorkbenchQuickStartIcon, AgentWorkbenchQuickStartSection, AgentWorkbenchQuickStartTemplate, AgentWorkbenchQuickStartViewModel } from '@inf-monkeys-tech/monkeys';
|
|
4
|
-
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-
|
|
5
|
-
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf,
|
|
4
|
+
import { d as AgentWorkbenchApprovalIntent, e as AgentWorkbenchArtifactIntent } from '../../details-model-49d05d8a4e6d.js';
|
|
5
|
+
export { A as AgentWorkbenchActivity, a as AgentWorkbenchActivityClassNames, b as AgentWorkbenchActivityModel, c as AgentWorkbenchActivityProps, E as AgentWorkbenchApproval, F as AgentWorkbenchApprovalData, G as AgentWorkbenchApprovalProps, f as AgentWorkbenchDetailsIntent, g as AgentWorkbenchDetailsModel, h as AgentWorkbenchDetailsState, i as AgentWorkbenchDetailsTab, j as AgentWorkbenchEventOf, H as AgentWorkbenchExploreCardMedia, I as AgentWorkbenchExploreCardMediaProps, k as AgentWorkbenchExploreGroup, l as AgentWorkbenchExploreItem, J as AgentWorkbenchExploreMediaTreatment, K as AgentWorkbenchExploreMediaVariant, m as AgentWorkbenchExploreSidebar, n as AgentWorkbenchExploreSidebarIntent, o as AgentWorkbenchExploreSidebarLabels, p as AgentWorkbenchExploreSidebarProps, q as AgentWorkbenchSidebar, r as AgentWorkbenchSidebarClassNames, s as AgentWorkbenchSidebarIntent, t as AgentWorkbenchSidebarProps, u as AgentWorkbenchTaskDetails, v as AgentWorkbenchTaskDetailsClassNames, w as AgentWorkbenchTaskDetailsProps, x as AgentWorkbenchTerminalModel, y as AgentWorkbenchTool, z as AgentWorkbenchToolClassNames, B as AgentWorkbenchToolProps, C as createAgentWorkbenchActivityModel, D as createAgentWorkbenchDetailsModel } from '../../details-model-49d05d8a4e6d.js';
|
|
6
6
|
import { ReactNode, ComponentType } from 'react';
|
|
7
7
|
type AgentWorkbenchComposerIntent = {
|
|
8
8
|
type: 'change-mode';
|
|
@@ -2092,7 +2092,70 @@ function createAgentWorkbenchActivityModel(viewModel) {
|
|
|
2092
2092
|
run: projectRun(visibleEvents)
|
|
2093
2093
|
};
|
|
2094
2094
|
}
|
|
2095
|
-
function JsonValue({ value
|
|
2095
|
+
function JsonValue({ value }) {
|
|
2096
|
+
if (value === void 0) return null;
|
|
2097
|
+
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
2098
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2099
|
+
"pre",
|
|
2100
|
+
{
|
|
2101
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground",
|
|
2102
|
+
tabIndex: 0,
|
|
2103
|
+
children: content
|
|
2104
|
+
}
|
|
2105
|
+
);
|
|
2106
|
+
}
|
|
2107
|
+
function AgentWorkbenchApproval({ approval, className, onDecision }) {
|
|
2108
|
+
const messages = useMonkeysLocaleMessages().agentWorkbench.approval;
|
|
2109
|
+
const requested = approval.status === "requested";
|
|
2110
|
+
const approved = approval.status === "approved";
|
|
2111
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2112
|
+
"article",
|
|
2113
|
+
{
|
|
2114
|
+
className: cn2("rounded-lg border border-border bg-card p-3 text-card-foreground", className),
|
|
2115
|
+
"data-agent-approval-status": approval.status,
|
|
2116
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2117
|
+
requested ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock3, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }) : approved ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "mt-0.5 size-4 shrink-0 text-primary", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "mt-0.5 size-4 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
2118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2119
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "break-words text-sm font-medium", children: approval.title }),
|
|
2120
|
+
approval.description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-wrap break-words text-sm text-muted-foreground", children: approval.description }) : null,
|
|
2121
|
+
approval.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(JsonValue, { value: approval.requestedAction }) }) : null,
|
|
2122
|
+
requested ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
2123
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2124
|
+
Button,
|
|
2125
|
+
{
|
|
2126
|
+
type: "button",
|
|
2127
|
+
size: "sm",
|
|
2128
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
2129
|
+
disabled: !onDecision,
|
|
2130
|
+
onClick: () => onDecision?.({
|
|
2131
|
+
approvalId: approval.approvalId,
|
|
2132
|
+
approved: true
|
|
2133
|
+
}),
|
|
2134
|
+
children: messages.approve
|
|
2135
|
+
}
|
|
2136
|
+
),
|
|
2137
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2138
|
+
Button,
|
|
2139
|
+
{
|
|
2140
|
+
type: "button",
|
|
2141
|
+
variant: "outline",
|
|
2142
|
+
size: "sm",
|
|
2143
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
2144
|
+
disabled: !onDecision,
|
|
2145
|
+
onClick: () => onDecision?.({
|
|
2146
|
+
approvalId: approval.approvalId,
|
|
2147
|
+
approved: false
|
|
2148
|
+
}),
|
|
2149
|
+
children: messages.reject
|
|
2150
|
+
}
|
|
2151
|
+
)
|
|
2152
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: approved ? messages.approved : messages.rejected })
|
|
2153
|
+
] })
|
|
2154
|
+
] })
|
|
2155
|
+
}
|
|
2156
|
+
);
|
|
2157
|
+
}
|
|
2158
|
+
function JsonValue2({ value, className }) {
|
|
2096
2159
|
if (value === void 0) return null;
|
|
2097
2160
|
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
2098
2161
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2179,11 +2242,11 @@ function AgentWorkbenchTool({
|
|
|
2179
2242
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2("space-y-3 border-t border-border px-3 py-3 text-sm", classNames?.content), children: [
|
|
2180
2243
|
event.payload.input !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
2181
2244
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.input }),
|
|
2182
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2245
|
+
/* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.input, className: classNames?.input })
|
|
2183
2246
|
] }) : null,
|
|
2184
2247
|
event.payload.output !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
2185
2248
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-muted-foreground", children: messages.output }),
|
|
2186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2249
|
+
/* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.output, className: classNames?.output })
|
|
2187
2250
|
] }) : null,
|
|
2188
2251
|
event.payload.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: event.payload.error }) : null
|
|
2189
2252
|
] })
|
|
@@ -2256,11 +2319,6 @@ function StatusIcon({ status }) {
|
|
|
2256
2319
|
}
|
|
2257
2320
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "size-4 text-muted-foreground", "aria-hidden": "true" });
|
|
2258
2321
|
}
|
|
2259
|
-
function JsonValue2({ value }) {
|
|
2260
|
-
if (value === void 0) return null;
|
|
2261
|
-
const content = typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
2262
|
-
return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-foreground", children: content });
|
|
2263
|
-
}
|
|
2264
2322
|
function formatDuration(durationMs) {
|
|
2265
2323
|
if (durationMs < 1e3) return "<1s";
|
|
2266
2324
|
const totalSeconds = Math.floor(durationMs / 1e3);
|
|
@@ -2386,54 +2444,12 @@ function AgentWorkbenchActivity({
|
|
|
2386
2444
|
event.payload.toolCallId
|
|
2387
2445
|
)),
|
|
2388
2446
|
approvals.map((event) => {
|
|
2389
|
-
const requested = event.payload.status === "requested";
|
|
2390
|
-
const approved = event.payload.status === "approved";
|
|
2391
2447
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2392
|
-
|
|
2448
|
+
AgentWorkbenchApproval,
|
|
2393
2449
|
{
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
),
|
|
2398
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
2399
|
-
requested ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock3, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }) : approved ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "mt-0.5 size-4 shrink-0 text-primary", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "mt-0.5 size-4 shrink-0 text-destructive-text", "aria-hidden": "true" }),
|
|
2400
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2401
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-medium", children: event.payload.title }),
|
|
2402
|
-
event.payload.description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: event.payload.description }) : null,
|
|
2403
|
-
event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
|
|
2404
|
-
requested ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
2405
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2406
|
-
Button,
|
|
2407
|
-
{
|
|
2408
|
-
type: "button",
|
|
2409
|
-
size: "sm",
|
|
2410
|
-
className: "h-auto px-3 py-1.5 text-sm",
|
|
2411
|
-
disabled: !onApprovalDecision,
|
|
2412
|
-
onClick: () => onApprovalDecision?.({
|
|
2413
|
-
approvalId: event.payload.approvalId,
|
|
2414
|
-
approved: true
|
|
2415
|
-
}),
|
|
2416
|
-
children: messages.approval.approve
|
|
2417
|
-
}
|
|
2418
|
-
),
|
|
2419
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2420
|
-
Button,
|
|
2421
|
-
{
|
|
2422
|
-
type: "button",
|
|
2423
|
-
variant: "outline",
|
|
2424
|
-
size: "sm",
|
|
2425
|
-
className: "h-auto px-3 py-1.5 text-sm",
|
|
2426
|
-
disabled: !onApprovalDecision,
|
|
2427
|
-
onClick: () => onApprovalDecision?.({
|
|
2428
|
-
approvalId: event.payload.approvalId,
|
|
2429
|
-
approved: false
|
|
2430
|
-
}),
|
|
2431
|
-
children: messages.approval.reject
|
|
2432
|
-
}
|
|
2433
|
-
)
|
|
2434
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-xs text-muted-foreground", children: approved ? messages.approval.approved : messages.approval.rejected })
|
|
2435
|
-
] })
|
|
2436
|
-
] })
|
|
2450
|
+
approval: event.payload,
|
|
2451
|
+
className: classNames?.approval,
|
|
2452
|
+
onDecision: onApprovalDecision
|
|
2437
2453
|
},
|
|
2438
2454
|
event.payload.approvalId
|
|
2439
2455
|
);
|
|
@@ -3682,6 +3698,7 @@ function AgentWorkbenchArtifactWorkspace({
|
|
|
3682
3698
|
|
|
3683
3699
|
exports.AgentWorkbenchAction = AgentWorkbenchAction;
|
|
3684
3700
|
exports.AgentWorkbenchActivity = AgentWorkbenchActivity;
|
|
3701
|
+
exports.AgentWorkbenchApproval = AgentWorkbenchApproval;
|
|
3685
3702
|
exports.AgentWorkbenchArtifactSummary = AgentWorkbenchArtifactSummary;
|
|
3686
3703
|
exports.AgentWorkbenchArtifactWorkspace = AgentWorkbenchArtifactWorkspace;
|
|
3687
3704
|
exports.AgentWorkbenchComposer = AgentWorkbenchComposer;
|