@tangle-network/agent-app 0.60.20 → 0.60.22

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.
Files changed (57) hide show
  1. package/dist/agent-profiles/d1.js +3 -3
  2. package/dist/agent-profiles/index.js +3 -3
  3. package/dist/agent-surfaces/cli.js +1 -1
  4. package/dist/agent-surfaces/index.js +1 -1
  5. package/dist/app-auth/index.js +3 -3
  6. package/dist/assistant/index.js +7 -7
  7. package/dist/chat-routes/index.js +7 -7
  8. package/dist/chat-store/index.js +2 -2
  9. package/dist/{chunk-MUZQUS6X.js → chunk-24Y6QVHL.js} +2 -2
  10. package/dist/{chunk-YWNK6OTQ.js → chunk-4DIO2LTR.js} +5 -5
  11. package/dist/{chunk-YWNK6OTQ.js.map → chunk-4DIO2LTR.js.map} +1 -1
  12. package/dist/{chunk-AKC5ZC4R.js → chunk-CN5HNTU6.js} +1 -1
  13. package/dist/{chunk-XPTYP3FP.js → chunk-HWJOTTEI.js} +2 -2
  14. package/dist/{chunk-KXGGCENC.js → chunk-J7TCMW2J.js} +2 -2
  15. package/dist/{chunk-XXUG4FS2.js → chunk-M36GXE2W.js} +3 -3
  16. package/dist/chunk-NV7TNF7V.js +739 -0
  17. package/dist/chunk-NV7TNF7V.js.map +1 -0
  18. package/dist/{chunk-YO6DEA5T.js → chunk-S2G5NAWV.js} +4 -4
  19. package/dist/{chunk-LECWJ33T.js → chunk-T2IESIJ7.js} +2 -2
  20. package/dist/{chunk-HTAFI247.js → chunk-WTGSLW5X.js} +4 -4
  21. package/dist/{chunk-HGKDZQ52.js → chunk-XGPINAHY.js} +9 -5
  22. package/dist/{chunk-HGKDZQ52.js.map → chunk-XGPINAHY.js.map} +1 -1
  23. package/dist/design-canvas-react/index.js +4 -4
  24. package/dist/design-canvas-react/lazy.js +1 -1
  25. package/dist/hub-approvals/index.d.ts +28 -0
  26. package/dist/hub-approvals/index.js +35 -0
  27. package/dist/hub-approvals/index.js.map +1 -0
  28. package/dist/hub-approvals/present.d.ts +26 -0
  29. package/dist/hub-approvals/result.d.ts +22 -0
  30. package/dist/hub-approvals/types.d.ts +192 -0
  31. package/dist/hub-approvals-react/dock.d.ts +40 -0
  32. package/dist/hub-approvals-react/index.d.ts +22 -0
  33. package/dist/hub-approvals-react/index.js +704 -0
  34. package/dist/hub-approvals-react/index.js.map +1 -0
  35. package/dist/hub-approvals-react/list.d.ts +14 -0
  36. package/dist/hub-approvals-react/parts.d.ts +37 -0
  37. package/dist/hub-approvals-react/preview.d.ts +11 -0
  38. package/dist/hub-approvals-react/receipt.d.ts +24 -0
  39. package/dist/hub-approvals-react/row.d.ts +19 -0
  40. package/dist/preset-cloudflare/index.js +2 -2
  41. package/dist/public-consultation/index.js +3 -3
  42. package/dist/sandbox/index.js +4 -4
  43. package/dist/tools/index.js +4 -4
  44. package/dist/web-react/index.js +15 -15
  45. package/dist/work-product/index.js +2 -2
  46. package/dist/workspace-react/companion.d.ts +7 -3
  47. package/dist/workspace-react/index.js +13 -6
  48. package/dist/workspace-react/index.js.map +1 -1
  49. package/package.json +14 -4
  50. /package/dist/{chunk-MUZQUS6X.js.map → chunk-24Y6QVHL.js.map} +0 -0
  51. /package/dist/{chunk-AKC5ZC4R.js.map → chunk-CN5HNTU6.js.map} +0 -0
  52. /package/dist/{chunk-XPTYP3FP.js.map → chunk-HWJOTTEI.js.map} +0 -0
  53. /package/dist/{chunk-KXGGCENC.js.map → chunk-J7TCMW2J.js.map} +0 -0
  54. /package/dist/{chunk-XXUG4FS2.js.map → chunk-M36GXE2W.js.map} +0 -0
  55. /package/dist/{chunk-YO6DEA5T.js.map → chunk-S2G5NAWV.js.map} +0 -0
  56. /package/dist/{chunk-LECWJ33T.js.map → chunk-T2IESIJ7.js.map} +0 -0
  57. /package/dist/{chunk-HTAFI247.js.map → chunk-WTGSLW5X.js.map} +0 -0
@@ -0,0 +1,192 @@
1
+ /**
2
+ * The vocabulary of a Hub action that waits on a person: where it stands, what
3
+ * it will do in the owner's words, and what it did once it ran.
4
+ */
5
+ /** Where one held action stands, as the dock, the list and the transcript show it. */
6
+ export type HubApprovalPhase =
7
+ /** Held by Hub; the viewer can decide it. */
8
+ 'waiting'
9
+ /** Held by Hub; someone else (the workspace owner) decides it. */
10
+ | 'blocked'
11
+ /** Approved here; the run has not started. */
12
+ | 'queued'
13
+ /** Approved; Hub is running the call. */
14
+ | 'running' | 'done'
15
+ /** Approved, but Hub could not run it. */
16
+ | 'failed' | 'denied' | 'expired';
17
+ /** Phases that still need someone's decision. */
18
+ export declare const HUB_APPROVAL_OPEN_PHASES: ReadonlySet<HubApprovalPhase>;
19
+ /** Phases between a decision and its result. */
20
+ export declare const HUB_APPROVAL_ACTIVE_PHASES: ReadonlySet<HubApprovalPhase>;
21
+ /** A file a held write changes. Counts stay undefined until someone has read them. */
22
+ export interface HubActionFile {
23
+ path: string;
24
+ /** A rename reads as a modification of its new path. */
25
+ change: 'added' | 'modified' | 'deleted';
26
+ additions?: number;
27
+ deletions?: number;
28
+ }
29
+ /**
30
+ * The change a held call serves, when it is one step of a larger change such
31
+ * as a pull request. The dock then names the change rather than the step.
32
+ */
33
+ export interface HubActionBundle {
34
+ /** What the whole change does, e.g. `Open PR: Fix the hero on acme/site`. */
35
+ title: string;
36
+ steps?: ReadonlyArray<{
37
+ label: string;
38
+ state: 'done' | 'current' | 'upcoming';
39
+ }>;
40
+ }
41
+ /** One held Hub action and its decision, in the form every surface renders. */
42
+ export interface HubApprovalItem {
43
+ /** Stable within a conversation, such as `<messageId>:<partId>`. */
44
+ id: string;
45
+ /** `provider.action`, e.g. `github.pulls.propose`. */
46
+ actionPath: string;
47
+ providerId: string;
48
+ /** The call's input as Hub received it. */
49
+ input: unknown;
50
+ phase: HubApprovalPhase;
51
+ /** The connected account the action runs as, e.g. `octocat` or `ops@acme.com`. */
52
+ account?: string | null;
53
+ requestedAt?: string | null;
54
+ /** When the decision window closes. */
55
+ expiresAt?: string | null;
56
+ /** Hub's result, or a bounded projection of it from {@link summarizeHubResult}. */
57
+ result?: unknown;
58
+ error?: string | null;
59
+ /** The standing permission granted with the approval. */
60
+ grant?: {
61
+ scope: string;
62
+ expiresAt: string | null;
63
+ } | null;
64
+ /** Set when a permissions mode, not a person, approved it. */
65
+ autoApproved?: string | null;
66
+ /** Files with line counts read by the host, replacing those the input declares. */
67
+ files?: readonly HubActionFile[];
68
+ bundle?: HubActionBundle | null;
69
+ }
70
+ /** A labelled value on a preview or a receipt. */
71
+ export interface HubActionField {
72
+ label: string;
73
+ value: string;
74
+ href?: string;
75
+ /** Render in the monospace face: shas, ids, paths. */
76
+ mono?: boolean;
77
+ }
78
+ /** What a held call will do, shaped for its integration's renderer. */
79
+ export type HubActionPreview = {
80
+ kind: 'pull-request';
81
+ repository?: string;
82
+ title?: string;
83
+ body?: string;
84
+ head?: string;
85
+ base?: string;
86
+ draft?: boolean;
87
+ files: readonly HubActionFile[];
88
+ } | {
89
+ kind: 'commit';
90
+ repository?: string;
91
+ message?: string;
92
+ tree?: string;
93
+ parents: readonly string[];
94
+ } | {
95
+ kind: 'branch';
96
+ repository?: string;
97
+ branch?: string;
98
+ sha?: string;
99
+ } | {
100
+ kind: 'files';
101
+ repository?: string;
102
+ files: readonly HubActionFile[];
103
+ } | {
104
+ kind: 'issue';
105
+ repository?: string;
106
+ number?: number;
107
+ title?: string;
108
+ body?: string;
109
+ verdict?: string;
110
+ } | {
111
+ kind: 'email';
112
+ to: readonly string[];
113
+ cc: readonly string[];
114
+ bcc: readonly string[];
115
+ subject?: string;
116
+ body?: string;
117
+ html: boolean;
118
+ reply: boolean;
119
+ } | {
120
+ kind: 'post';
121
+ channel: 'x' | 'linkedin' | 'slack';
122
+ text: string;
123
+ /** The post's place, such as a Slack channel. */
124
+ where?: string;
125
+ link?: {
126
+ url: string;
127
+ title?: string;
128
+ description?: string;
129
+ };
130
+ } | {
131
+ kind: 'payment';
132
+ label: string;
133
+ amount?: number;
134
+ currency?: string;
135
+ customer?: string;
136
+ description?: string;
137
+ } | {
138
+ kind: 'speech';
139
+ text: string;
140
+ voice?: string;
141
+ seconds?: number;
142
+ } | {
143
+ kind: 'call';
144
+ to?: string;
145
+ from?: string;
146
+ purpose?: string;
147
+ } | {
148
+ kind: 'event';
149
+ title?: string;
150
+ start?: string;
151
+ end?: string;
152
+ location?: string;
153
+ attendees: readonly string[];
154
+ description?: string;
155
+ } | {
156
+ kind: 'fields';
157
+ fields: readonly HubActionField[];
158
+ };
159
+ /** A held call in the owner's words. */
160
+ export interface HubActionPresentation {
161
+ provider: {
162
+ id: string;
163
+ name: string;
164
+ };
165
+ /** The imperative, e.g. `Open pull request`. */
166
+ action: string;
167
+ /** One line naming the action and its object, e.g. `Open PR: Fix the hero on acme/site`. */
168
+ title: string;
169
+ /** Where it acts: a repository, recipients, a channel or a customer. */
170
+ target?: string;
171
+ preview: HubActionPreview;
172
+ }
173
+ /** What a decided call did, as its receipt shows it. */
174
+ export interface HubActionReceipt {
175
+ provider: {
176
+ id: string;
177
+ name: string;
178
+ };
179
+ /** The result in past tense, e.g. `Opened PR #123` or `Sent email to ada@acme.com`. */
180
+ title: string;
181
+ /** The result's own page, when it has one: the pull request, the post, the event. */
182
+ href?: string;
183
+ status: 'done' | 'failed' | 'denied' | 'expired' | 'running' | 'waiting';
184
+ fields: readonly HubActionField[];
185
+ files?: readonly HubActionFile[];
186
+ media?: {
187
+ kind: 'audio';
188
+ src: string;
189
+ seconds?: number;
190
+ };
191
+ error?: string;
192
+ }
@@ -0,0 +1,40 @@
1
+ import { type HubApprovalItem } from '../hub-approvals';
2
+ /** The owner's answer to one held call. `allow` also grants a standing permission. */
3
+ export type HubApprovalDecision = {
4
+ kind: 'approve';
5
+ } | {
6
+ kind: 'deny';
7
+ } | {
8
+ kind: 'allow';
9
+ duration: '24h' | 'always';
10
+ scope: string;
11
+ };
12
+ /** What a standing permission for one call may cover, or why none can. */
13
+ export type HubApprovalPermissions = {
14
+ scopes: ReadonlyArray<{
15
+ id: string;
16
+ label: string;
17
+ }>;
18
+ } | {
19
+ never: string;
20
+ };
21
+ export interface HubApprovalDockProps {
22
+ /** Every held call in the conversation; the dock shows the open and running ones. */
23
+ items: readonly HubApprovalItem[];
24
+ onDecide: (item: HubApprovalItem, decision: HubApprovalDecision) => Promise<void>;
25
+ /** Standing-permission choices for a call; omit when the host offers none. */
26
+ permissions?: (item: HubApprovalItem) => HubApprovalPermissions | null;
27
+ /** Show the call where the agent made it. */
28
+ onOpen?: (item: HubApprovalItem) => void;
29
+ /** Bring one call to the front, e.g. after it was picked in the Approvals list. */
30
+ focusId?: string | null;
31
+ className?: string;
32
+ }
33
+ /**
34
+ * The calls waiting on the owner, pinned above the composer so a held action
35
+ * never scrolls away. Each shows what it does, where, as which account, and a
36
+ * preview drawn like its integration; Approve, Deny and the standing
37
+ * permissions a host offers sit beside it. Approving shows the run in place —
38
+ * starting, running, then the result — without leaving the conversation.
39
+ */
40
+ export declare function HubApprovalDock({ items, onDecide, permissions, onOpen, focusId, className }: HubApprovalDockProps): import("react").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `./hub-approvals-react` — the approval surfaces every agent app shares:
3
+ *
4
+ * - {@link HubApprovalDock}, pinned above the composer, holds the calls waiting
5
+ * on the owner with their preview, decision and in-place progress;
6
+ * - {@link HubApprovalsList}, beside the conversation, lists every call by
7
+ * where it stands;
8
+ * - {@link HubApprovalRow} marks a call where the agent made it;
9
+ * - {@link HubApprovalReceipts} stands in for the message that resumes the
10
+ * agent, as receipts instead of a chat bubble.
11
+ *
12
+ * The components never fetch: a host maps its held calls into
13
+ * `HubApprovalItem`s (`./hub-approvals`) and supplies the decision transport.
14
+ * Logos come from Sandbox UI's provider icon set; file changes render with
15
+ * `ui/run`'s `ApprovalDiffSummary`.
16
+ */
17
+ export { HubApprovalDock, type HubApprovalDecision, type HubApprovalDockProps, type HubApprovalPermissions } from './dock';
18
+ export { HubApprovalsList, type HubApprovalsListProps } from './list';
19
+ export { HubApprovalRow, type HubApprovalRowProps } from './row';
20
+ export { HubActionReceiptCard, HubApprovalReceipts, type HubActionReceiptCardProps, type HubApprovalReceiptsProps } from './receipt';
21
+ export { HubActionPreviewView } from './preview';
22
+ export { HubApprovalPhasePill, HubProviderMark } from './parts';