@tangle-network/agent-app 0.60.177 → 0.60.179
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/agent-profiles/d1.js +3 -3
- package/dist/agent-profiles/index.js +11 -3
- package/dist/agent-profiles/self-management.d.ts +82 -0
- package/dist/assistant/index.js +5 -5
- package/dist/channels/index.js +1 -1
- package/dist/chat-routes/index.js +4 -4
- package/dist/{chunk-GIJY3YCH.js → chunk-3RHAF2P5.js} +11 -13
- package/dist/chunk-3RHAF2P5.js.map +1 -0
- package/dist/{chunk-ER3KSBA4.js → chunk-75ZIWV4U.js} +4 -4
- package/dist/{chunk-7PSYT35Z.js → chunk-7BYY7QKC.js} +5 -5
- package/dist/{chunk-7PSYT35Z.js.map → chunk-7BYY7QKC.js.map} +1 -1
- package/dist/chunk-A2GG4D4A.js +43 -0
- package/dist/chunk-A2GG4D4A.js.map +1 -0
- package/dist/{chunk-6CKNC32J.js → chunk-AJZ3EJB5.js} +2 -2
- package/dist/{chunk-MCAIZKQ5.js → chunk-CPNJRLPN.js} +15 -4
- package/dist/chunk-CPNJRLPN.js.map +1 -0
- package/dist/{chunk-4WEUWCA4.js → chunk-EQRVOMMS.js} +2 -2
- package/dist/{chunk-6VXBUIM5.js → chunk-KOTNMTHV.js} +65 -8
- package/dist/{chunk-6VXBUIM5.js.map → chunk-KOTNMTHV.js.map} +1 -1
- package/dist/{chunk-LSUELMHY.js → chunk-LN5RBVGP.js} +6 -33
- package/dist/{chunk-LSUELMHY.js.map → chunk-LN5RBVGP.js.map} +1 -1
- package/dist/{chunk-IAFPBYQQ.js → chunk-QGOGX3DL.js} +52 -67
- package/dist/chunk-QGOGX3DL.js.map +1 -0
- package/dist/{chunk-NO2YNV5C.js → chunk-YXLN4PXK.js} +2 -2
- package/dist/hub-approvals/index.js +1 -1
- package/dist/hub-approvals/present.d.ts +1 -1
- package/dist/hub-approvals/types.d.ts +35 -0
- package/dist/hub-approvals-react/dock.d.ts +3 -2
- package/dist/hub-approvals-react/email.d.ts +13 -0
- package/dist/hub-approvals-react/feedback.d.ts +20 -0
- package/dist/hub-approvals-react/index.d.ts +1 -0
- package/dist/hub-approvals-react/index.js +535 -286
- package/dist/hub-approvals-react/index.js.map +1 -1
- package/dist/hub-approvals-react/parts.d.ts +1 -1
- package/dist/hub-approvals-react/row.d.ts +3 -2
- package/dist/integrations-react/index.js +1 -1
- package/dist/preset-cloudflare/index.js +2 -2
- package/dist/sandbox/index.js +4 -4
- package/dist/stories/app-shell/interaction-evidence.d.ts +31 -0
- package/dist/studio-react/index.js +2 -2
- package/dist/theme/tokens.css +158 -0
- package/dist/tools/index.js +4 -4
- package/dist/web-react/action-dialog.d.ts +2 -2
- package/dist/web-react/agent-profile-editor.js +1 -1
- package/dist/web-react/agent-profile-form-kit.d.ts +1 -1
- package/dist/web-react/async/index.js +1 -1
- package/dist/web-react/index.js +5 -5
- package/dist/work-product/index.js +2 -2
- package/dist/workspace-react/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-GIJY3YCH.js.map +0 -1
- package/dist/chunk-IAFPBYQQ.js.map +0 -1
- package/dist/chunk-MCAIZKQ5.js.map +0 -1
- package/dist/chunk-QJYJOMMO.js +0 -78
- package/dist/chunk-QJYJOMMO.js.map +0 -1
- /package/dist/{chunk-ER3KSBA4.js.map → chunk-75ZIWV4U.js.map} +0 -0
- /package/dist/{chunk-6CKNC32J.js.map → chunk-AJZ3EJB5.js.map} +0 -0
- /package/dist/{chunk-4WEUWCA4.js.map → chunk-EQRVOMMS.js.map} +0 -0
- /package/dist/{chunk-NO2YNV5C.js.map → chunk-YXLN4PXK.js.map} +0 -0
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
ProfileConflictError,
|
|
3
3
|
parseProfileRevisionDiff,
|
|
4
4
|
serializeProfileRevisionDiff
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KOTNMTHV.js";
|
|
6
6
|
import "../chunk-I6BZVIRH.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-AJZ3EJB5.js";
|
|
8
8
|
import "../chunk-UGWQLQDS.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-7BYY7QKC.js";
|
|
10
10
|
|
|
11
11
|
// src/agent-profiles/d1.ts
|
|
12
12
|
import { snapshotAgentProfile } from "@tangle-network/agent-interface";
|
|
@@ -7,8 +7,11 @@ import {
|
|
|
7
7
|
addProfileKnowledgeDocument,
|
|
8
8
|
admitProfileTurn,
|
|
9
9
|
bindProfileText,
|
|
10
|
+
createDrizzleSelfMountStorage,
|
|
10
11
|
createInMemorySelfMountStorage,
|
|
12
|
+
createKVSelfMountStorage,
|
|
11
13
|
createMountProfileChangeTool,
|
|
14
|
+
createProductSelfMount,
|
|
12
15
|
createTextProfile,
|
|
13
16
|
handleProfileSwitchText,
|
|
14
17
|
parseProfileRevisionDiff,
|
|
@@ -25,16 +28,17 @@ import {
|
|
|
25
28
|
readProfileAdmission,
|
|
26
29
|
removeProfileKnowledgeDocument,
|
|
27
30
|
rollbackProfileBinding,
|
|
31
|
+
selfMountTable,
|
|
28
32
|
serializeProfileRevisionDiff,
|
|
29
33
|
switchProfile
|
|
30
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-KOTNMTHV.js";
|
|
31
35
|
import {
|
|
32
36
|
normalizeProfileName,
|
|
33
37
|
parseProfileSwitch
|
|
34
38
|
} from "../chunk-I6BZVIRH.js";
|
|
35
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-AJZ3EJB5.js";
|
|
36
40
|
import "../chunk-UGWQLQDS.js";
|
|
37
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-7BYY7QKC.js";
|
|
38
42
|
export {
|
|
39
43
|
PERMITTED_SELF_MOUNT_DIMENSIONS,
|
|
40
44
|
PROFILE_CHANGE_POLICY,
|
|
@@ -44,8 +48,11 @@ export {
|
|
|
44
48
|
addProfileKnowledgeDocument,
|
|
45
49
|
admitProfileTurn,
|
|
46
50
|
bindProfileText,
|
|
51
|
+
createDrizzleSelfMountStorage,
|
|
47
52
|
createInMemorySelfMountStorage,
|
|
53
|
+
createKVSelfMountStorage,
|
|
48
54
|
createMountProfileChangeTool,
|
|
55
|
+
createProductSelfMount,
|
|
49
56
|
createTextProfile,
|
|
50
57
|
handleProfileSwitchText,
|
|
51
58
|
normalizeProfileName,
|
|
@@ -64,6 +71,7 @@ export {
|
|
|
64
71
|
readProfileAdmission,
|
|
65
72
|
removeProfileKnowledgeDocument,
|
|
66
73
|
rollbackProfileBinding,
|
|
74
|
+
selfMountTable,
|
|
67
75
|
serializeProfileRevisionDiff,
|
|
68
76
|
switchProfile
|
|
69
77
|
};
|
|
@@ -75,3 +75,85 @@ export interface MountProfileChangeResult {
|
|
|
75
75
|
* MCP surface like any other app tool.
|
|
76
76
|
*/
|
|
77
77
|
export declare function createMountProfileChangeTool(deps: MountProfileChangeDeps): AppToolDefinition<Record<string, unknown>>;
|
|
78
|
+
/** Any drizzle database instance (structural — the adapters only use
|
|
79
|
+
* select/insert with the standard builder chain). */
|
|
80
|
+
type DrizzleLike = any;
|
|
81
|
+
/** Create (or use) the standard self-mount table in a drizzle/D1 database. */
|
|
82
|
+
export declare function selfMountTable(tableName: string): import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
83
|
+
name: string;
|
|
84
|
+
schema: undefined;
|
|
85
|
+
columns: {
|
|
86
|
+
scope: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
87
|
+
name: "scope";
|
|
88
|
+
tableName: string;
|
|
89
|
+
dataType: "string";
|
|
90
|
+
columnType: "SQLiteText";
|
|
91
|
+
data: string;
|
|
92
|
+
driverParam: string;
|
|
93
|
+
notNull: true;
|
|
94
|
+
hasDefault: false;
|
|
95
|
+
isPrimaryKey: true;
|
|
96
|
+
isAutoincrement: false;
|
|
97
|
+
hasRuntimeDefault: false;
|
|
98
|
+
enumValues: [string, ...string[]];
|
|
99
|
+
baseColumn: never;
|
|
100
|
+
identity: undefined;
|
|
101
|
+
generated: undefined;
|
|
102
|
+
}, {}, {
|
|
103
|
+
length: number | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
mounted: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
106
|
+
name: "mounted";
|
|
107
|
+
tableName: string;
|
|
108
|
+
dataType: "string";
|
|
109
|
+
columnType: "SQLiteText";
|
|
110
|
+
data: string;
|
|
111
|
+
driverParam: string;
|
|
112
|
+
notNull: true;
|
|
113
|
+
hasDefault: false;
|
|
114
|
+
isPrimaryKey: false;
|
|
115
|
+
isAutoincrement: false;
|
|
116
|
+
hasRuntimeDefault: false;
|
|
117
|
+
enumValues: [string, ...string[]];
|
|
118
|
+
baseColumn: never;
|
|
119
|
+
identity: undefined;
|
|
120
|
+
generated: undefined;
|
|
121
|
+
}, {}, {
|
|
122
|
+
length: number | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
};
|
|
125
|
+
dialect: 'sqlite';
|
|
126
|
+
}>;
|
|
127
|
+
/** A drizzle-backed SelfMountStorage against any table with the standard
|
|
128
|
+
* shape (scope primary key + mounted JSON text column). Works with the
|
|
129
|
+
* tables every product creates via {@link selfMountTable}. */
|
|
130
|
+
export declare function createDrizzleSelfMountStorage(db: DrizzleLike, table: ReturnType<typeof selfMountTable>, baseline: string): SelfMountStorage;
|
|
131
|
+
/** A KV-backed SelfMountStorage (Cloudflare KV, any namespace). */
|
|
132
|
+
export declare function createKVSelfMountStorage(kv: {
|
|
133
|
+
get(key: string): Promise<string | null>;
|
|
134
|
+
put(key: string, value: string): Promise<void>;
|
|
135
|
+
}, prefix: string, baseline: string): SelfMountStorage;
|
|
136
|
+
/** The one-call product wiring: catalog + storage + baseline + cap. */
|
|
137
|
+
export interface ProductSelfMountConfig {
|
|
138
|
+
/** The product's skill catalog (id + description per skill). */
|
|
139
|
+
skills: ReadonlyArray<{
|
|
140
|
+
id: string;
|
|
141
|
+
description: string;
|
|
142
|
+
}>;
|
|
143
|
+
/** A drizzle/D1 database (uses a self-mount table) or a KV namespace. */
|
|
144
|
+
db?: DrizzleLike;
|
|
145
|
+
kv?: {
|
|
146
|
+
get(key: string): Promise<string | null>;
|
|
147
|
+
put(key: string, value: string): Promise<void>;
|
|
148
|
+
};
|
|
149
|
+
/** The table name for drizzle storage (default: 'agent_self_mounts'). */
|
|
150
|
+
tableName?: string;
|
|
151
|
+
/** KV prefix (default: 'self-mount'). */
|
|
152
|
+
kvPrefix?: string;
|
|
153
|
+
/** The skill id that can never be removed. */
|
|
154
|
+
baseline: string;
|
|
155
|
+
/** Max simultaneous mounts (default: 12). */
|
|
156
|
+
maxMounted?: number;
|
|
157
|
+
}
|
|
158
|
+
export declare function createProductSelfMount(config: ProductSelfMountConfig): AppToolDefinition<Record<string, unknown>>;
|
|
159
|
+
export {};
|
package/dist/assistant/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ReasoningRow,
|
|
3
3
|
chatToolCallPart
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-QGOGX3DL.js";
|
|
5
|
+
import "../chunk-EQRVOMMS.js";
|
|
6
6
|
import "../chunk-3HUFJ5LO.js";
|
|
7
7
|
import "../chunk-FBVLEGEG.js";
|
|
8
8
|
import "../chunk-UDLA3NGY.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-A2GG4D4A.js";
|
|
10
10
|
import "../chunk-E4AY62T2.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-3RHAF2P5.js";
|
|
12
12
|
import "../chunk-Y6PRDUFJ.js";
|
|
13
13
|
import "../chunk-GEYACSFW.js";
|
|
14
14
|
import {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import "../chunk-RASGKEAL.js";
|
|
25
25
|
import {
|
|
26
26
|
AsyncView
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-LN5RBVGP.js";
|
|
28
28
|
import "../chunk-FQYAJYPW.js";
|
|
29
29
|
import "../chunk-WTC6AOPL.js";
|
|
30
30
|
import "../chunk-VBRUG4N5.js";
|
package/dist/channels/index.js
CHANGED
|
@@ -46,13 +46,13 @@ import {
|
|
|
46
46
|
import "../chunk-4LBCTFBP.js";
|
|
47
47
|
import "../chunk-VBRUG4N5.js";
|
|
48
48
|
import "../chunk-LWSJK546.js";
|
|
49
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-75ZIWV4U.js";
|
|
50
50
|
import "../chunk-6A7MYOUI.js";
|
|
51
51
|
import "../chunk-S5SRJJQG.js";
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-YXLN4PXK.js";
|
|
53
|
+
import "../chunk-AJZ3EJB5.js";
|
|
54
54
|
import "../chunk-UGWQLQDS.js";
|
|
55
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-7BYY7QKC.js";
|
|
56
56
|
import {
|
|
57
57
|
runProtectedRouterTurn
|
|
58
58
|
} from "../chunk-XJEIGVMQ.js";
|
|
@@ -240,7 +240,7 @@ function AgentProfileRegistryMcpSearch({ registry, disabled, existingNames, vali
|
|
|
240
240
|
|
|
241
241
|
// src/web-react/agent-profile-form-kit.tsx
|
|
242
242
|
import { useId, useState as useState2 } from "react";
|
|
243
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "@tangle-network/ui/primitives";
|
|
243
|
+
import { Card, CardContent, Collapsible, CollapsibleContent, CollapsibleTrigger, StatusPill as SharedStatusPill, Tooltip, TooltipContent, TooltipTrigger } from "@tangle-network/ui/primitives";
|
|
244
244
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
245
245
|
var formText = {
|
|
246
246
|
body: "text-sm leading-6 text-foreground",
|
|
@@ -305,6 +305,7 @@ function Chevron({ className }) {
|
|
|
305
305
|
}
|
|
306
306
|
function Section({ title, description, summary, defaultOpen = false, collapsible = false, children }) {
|
|
307
307
|
const headingId = useId();
|
|
308
|
+
const [open, setOpen] = useState2(defaultOpen);
|
|
308
309
|
const header = /* @__PURE__ */ jsxs2("span", { className: "flex min-w-0 flex-1 items-start justify-between gap-3", children: [
|
|
309
310
|
/* @__PURE__ */ jsxs2("span", { className: "min-w-0 space-y-0.5", children: [
|
|
310
311
|
/* @__PURE__ */ jsx2("span", { id: headingId, className: `block ${formText.title}`, children: title }),
|
|
@@ -312,19 +313,19 @@ function Section({ title, description, summary, defaultOpen = false, collapsible
|
|
|
312
313
|
] }),
|
|
313
314
|
(summary || collapsible) && /* @__PURE__ */ jsxs2("span", { className: `flex shrink-0 items-center gap-2 ${formText.muted}`, children: [
|
|
314
315
|
summary,
|
|
315
|
-
collapsible && /* @__PURE__ */ jsx2(Chevron, { className: "size-4
|
|
316
|
+
collapsible && /* @__PURE__ */ jsx2(Chevron, { className: "size-4 group-data-[state=open]:rotate-180" })
|
|
316
317
|
] })
|
|
317
318
|
] });
|
|
318
319
|
if (!collapsible) {
|
|
319
|
-
return /* @__PURE__ */ jsxs2(
|
|
320
|
+
return /* @__PURE__ */ jsxs2(Card, { role: "region", "aria-labelledby": headingId, className: "min-w-0", children: [
|
|
320
321
|
/* @__PURE__ */ jsx2("header", { className: "flex px-4 pt-4", children: header }),
|
|
321
|
-
/* @__PURE__ */ jsx2(
|
|
322
|
+
/* @__PURE__ */ jsx2(CardContent, { className: "min-w-0 space-y-4 p-4", children })
|
|
322
323
|
] });
|
|
323
324
|
}
|
|
324
|
-
return /* @__PURE__ */
|
|
325
|
-
/* @__PURE__ */ jsx2(
|
|
326
|
-
/* @__PURE__ */ jsx2(
|
|
327
|
-
] });
|
|
325
|
+
return /* @__PURE__ */ jsx2(Collapsible, { open, onOpenChange: setOpen, asChild: true, children: /* @__PURE__ */ jsxs2(Card, { className: "group min-w-0", children: [
|
|
326
|
+
/* @__PURE__ */ jsx2(CollapsibleTrigger, { "aria-labelledby": headingId, className: "flex w-full cursor-pointer rounded-xl p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring", children: header }),
|
|
327
|
+
/* @__PURE__ */ jsx2(CollapsibleContent, { forceMount: true, hidden: !open, asChild: true, children: /* @__PURE__ */ jsx2(CardContent, { className: "min-w-0 space-y-4 border-t border-border p-4", children }) })
|
|
328
|
+
] }) });
|
|
328
329
|
}
|
|
329
330
|
var toneClass = {
|
|
330
331
|
neutral: "text-muted-foreground",
|
|
@@ -358,10 +359,7 @@ function StatusLine({ tone, children, id }) {
|
|
|
358
359
|
] });
|
|
359
360
|
}
|
|
360
361
|
function StatusPill({ tone, children }) {
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
tone === "pending" ? /* @__PURE__ */ jsx2(StatusGlyph, { tone: "pending" }) : /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: "size-2 rounded-full bg-current" }),
|
|
363
|
-
children
|
|
364
|
-
] });
|
|
362
|
+
return /* @__PURE__ */ jsx2(SharedStatusPill, { bare: true, size: "md", tone: tone === "pending" ? "running" : tone === "error" ? "danger" : tone, children });
|
|
365
363
|
}
|
|
366
364
|
function Notice({ tone, children }) {
|
|
367
365
|
return /* @__PURE__ */ jsx2("div", { role: tone === "error" ? "alert" : "status", className: `rounded-lg border p-3 text-sm leading-6 ${tone === "error" ? "border-destructive/40 bg-destructive/5 text-foreground" : "border-border bg-muted/50 text-foreground"}`, children });
|
|
@@ -2214,4 +2212,4 @@ export {
|
|
|
2214
2212
|
AGENT_PROFILE_EDITOR_SECTIONS,
|
|
2215
2213
|
AgentProfileEditor
|
|
2216
2214
|
};
|
|
2217
|
-
//# sourceMappingURL=chunk-
|
|
2215
|
+
//# sourceMappingURL=chunk-3RHAF2P5.js.map
|