@mgamadeus/ddd-agents 0.16.1 → 0.17.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/README.md +113 -10
- package/boundary.json +15 -1
- package/dist/admin-chat-widgets.js +158 -0
- package/dist/admin-chat-widgets.js.map +1 -0
- package/dist/admin.js +92 -65
- package/dist/admin.js.map +1 -1
- package/dist/chat.js +19 -19
- package/dist/chat.js.map +1 -1
- package/dist/chunks/AgentScheduleOrderDraftPanel-DM6pz_hc.js +304 -0
- package/dist/chunks/AgentScheduleOrderDraftPanel-DM6pz_hc.js.map +1 -0
- package/dist/chunks/{ConversationMarkdown-DNQcVuz-.js → ConversationMarkdown-dj0EF6bu.js} +5 -5
- package/dist/chunks/{ConversationMarkdown-DNQcVuz-.js.map → ConversationMarkdown-dj0EF6bu.js.map} +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-BlpIule7.js → ConversationMessageInputComposerWidgets-ClgCwnVW.js} +6 -6
- package/dist/chunks/{ConversationMessageInputComposerWidgets-BlpIule7.js.map → ConversationMessageInputComposerWidgets-ClgCwnVW.js.map} +1 -1
- package/dist/chunks/{VoiceBarsIcon-eODB_UTI.js → VoiceBarsIcon-B6VTVtdB.js} +4 -4
- package/dist/chunks/{VoiceBarsIcon-eODB_UTI.js.map → VoiceBarsIcon-B6VTVtdB.js.map} +1 -1
- package/dist/chunks/{WebSearchResultsConversationWidget-l9Aek_lG.js → WebSearchResultsConversationWidget-BVMwJfhL.js} +73 -64
- package/dist/chunks/WebSearchResultsConversationWidget-BVMwJfhL.js.map +1 -0
- package/dist/chunks/{agents-http-trace-mappers-rsbGAf2_.js → agents-http-trace-mappers-CuGZOFu-.js} +53 -14
- package/dist/chunks/agents-http-trace-mappers-CuGZOFu-.js.map +1 -0
- package/dist/chunks/{browser-request-interception-D678IemW.js → browser-request-interception-BnOQWLaJ.js} +2 -2
- package/dist/chunks/{browser-request-interception-D678IemW.js.map → browser-request-interception-BnOQWLaJ.js.map} +1 -1
- package/dist/chunks/{canvas-label-context-C1Pc_Ldo.js → canvas-label-context-5yvbmK-V.js} +3 -3
- package/dist/chunks/{canvas-label-context-C1Pc_Ldo.js.map → canvas-label-context-5yvbmK-V.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-BYArW_Ji.js → canvas-reducers-133Kl1QH.js} +2 -2
- package/dist/chunks/{canvas-reducers-BYArW_Ji.js.map → canvas-reducers-133Kl1QH.js.map} +1 -1
- package/dist/chunks/{canvasBodies-BpLPp-S8.js → canvasBodies-B2M6aWao.js} +4 -4
- package/dist/chunks/{canvasBodies-BpLPp-S8.js.map → canvasBodies-B2M6aWao.js.map} +1 -1
- package/dist/chunks/{canvasStorage-DSspwRMg.js → canvasStorage-B69JHOLd.js} +2 -2
- package/dist/chunks/{canvasStorage-DSspwRMg.js.map → canvasStorage-B69JHOLd.js.map} +1 -1
- package/dist/chunks/{content-from-unified-diff-DWyBHRSy.js → content-from-unified-diff-BKdgop63.js} +39 -5
- package/dist/chunks/content-from-unified-diff-BKdgop63.js.map +1 -0
- package/dist/chunks/{contract-DtFmOk91.js → contract-CQ6PO_e8.js} +2 -2
- package/dist/chunks/{contract-DtFmOk91.js.map → contract-CQ6PO_e8.js.map} +1 -1
- package/dist/chunks/{conversation-Cbrqtx-_.js → conversation-VosmRbsr.js} +4 -2
- package/dist/chunks/{conversation-Cbrqtx-_.js.map → conversation-VosmRbsr.js.map} +1 -1
- package/dist/chunks/conversation-trace-fVeh6Lg6.js.map +1 -1
- package/dist/chunks/{widget-name-resolver-DXIE9JUr.js → conversationWidgetRegistry-webrYtkI.js} +810 -530
- package/dist/chunks/conversationWidgetRegistry-webrYtkI.js.map +1 -0
- package/dist/chunks/{index-DZovGMpG.js → index-DAEGct6X.js} +61 -61
- package/dist/chunks/index-DAEGct6X.js.map +1 -0
- package/dist/chunks/{link-navigation-a_sRfmsj.js → link-navigation-DQWyeNkx.js} +2 -2
- package/dist/chunks/{link-navigation-a_sRfmsj.js.map → link-navigation-DQWyeNkx.js.map} +1 -1
- package/dist/chunks/{withPollingChangeSubscription-Cz3Diolr.js → withPollingChangeSubscription-Ct8kjmlL.js} +19 -2
- package/dist/chunks/withPollingChangeSubscription-Ct8kjmlL.js.map +1 -0
- package/dist/client-testing.js +39 -5
- package/dist/client-testing.js.map +1 -1
- package/dist/client.js +43 -14
- package/dist/client.js.map +1 -1
- package/dist/contract.js +4 -3
- package/dist/files/i18n-keys.json +619 -15
- package/dist/files/widgets/DriveFilesConversationWidget/DriveFilesConversationWidget.md +4 -2
- package/dist/files/widgets/OwnerStepConfirmationConversationWidget/OwnerStepConfirmationConversationWidget.md +54 -0
- package/dist/files/widgets/OwnerStepConfirmationConversationWidget/owner-step-confirmation.preview-fixtures.json +16 -0
- package/dist/image-render.js +8 -8
- package/dist/index.js +16 -16
- package/dist/kit.js +2 -2
- package/dist/preview.js +124 -117
- package/dist/preview.js.map +1 -1
- package/dist/provider.js +2 -2
- package/dist/renderer.js +53 -52
- package/dist/styles.css +46 -0
- package/dist/types/admin/connections/connection-parts.d.ts +2 -1
- package/dist/types/admin/schedules/AgentScheduleOrderDraftPanel.d.ts +45 -0
- package/dist/types/admin/schedules/AgentSchedulesPanel.d.ts +11 -3
- package/dist/types/admin/schedules/agent-schedules-api.d.ts +38 -2
- package/dist/types/admin/schedules/agent-schedules-format.d.ts +22 -1
- package/dist/types/admin/schedules/agent-schedules-types.d.ts +91 -1
- package/dist/types/admin-chat-widgets/ScheduleOrderApprovalConversationWidget.d.ts +37 -0
- package/dist/types/admin-chat-widgets/registerScheduleOrderApprovalWidget.d.ts +11 -0
- package/dist/types/chat/trace/TurnMetaLine.d.ts +5 -3
- package/dist/types/chat/trace/trace-counts.d.ts +2 -0
- package/dist/types/chat/trace/trace-types.d.ts +4 -0
- package/dist/types/client/AgentsConversationClient.d.ts +17 -1
- package/dist/types/client/http/agents-http-mappers.d.ts +4 -2
- package/dist/types/client/http/agents-http-trace-wire.d.ts +2 -0
- package/dist/types/client/http/agents-http-wire.d.ts +24 -0
- package/dist/types/client/testing/createInMemoryAgentsConversationClient.d.ts +13 -1
- package/dist/types/contract/conversation-trace.d.ts +4 -0
- package/dist/types/contract/conversation.d.ts +43 -0
- package/dist/types/entries/admin-chat-widgets.d.ts +2 -0
- package/dist/types/entries/admin.d.ts +4 -2
- package/dist/types/entries/renderer.d.ts +1 -1
- package/dist/types/renderer/widget-tree/composed-node-schema.d.ts +20 -3
- package/dist/types/widgets/DriveFilesConversationWidget/shared/drive-files.d.ts +3 -1
- package/dist/voice.js +2 -2
- package/dist/widgets.js +4 -4
- package/package.json +7 -1
- package/public-api.json +39 -0
- package/dist/chunks/WebSearchResultsConversationWidget-l9Aek_lG.js.map +0 -1
- package/dist/chunks/agents-http-trace-mappers-rsbGAf2_.js.map +0 -1
- package/dist/chunks/content-from-unified-diff-DWyBHRSy.js.map +0 -1
- package/dist/chunks/index-DZovGMpG.js.map +0 -1
- package/dist/chunks/widget-name-resolver-DXIE9JUr.js.map +0 -1
- package/dist/chunks/withPollingChangeSubscription-Cz3Diolr.js.map +0 -1
|
@@ -19,8 +19,10 @@ blocked …) and the actions:
|
|
|
19
19
|
- **Open** in a new tab — files a browser shows itself (PDF, images, video, text). An office file (pptx, docx, xlsx …)
|
|
20
20
|
opens its PDF twin from the same block (same folder, same name, `.pdf`); without one it only downloads.
|
|
21
21
|
- **Download** — the store's attachment URL.
|
|
22
|
-
- **Show in the drive** — the card's `openLink` when it is a path of this app
|
|
23
|
-
`buildDriveScreenHref(card)`; hidden when neither gives a link.
|
|
22
|
+
- **Show in the drive** — the card's `openLink` when it is a path of this app (one that resolves to this origin) or a
|
|
23
|
+
same-origin URL, else the source's `buildDriveScreenHref(card)`; hidden when neither gives a link. A link with a
|
|
24
|
+
control character (tab, line feed, carriage return) is refused: the browser drops it and could leave the app.
|
|
25
|
+
Opened through the host's `onNavigate`.
|
|
24
26
|
|
|
25
27
|
Card URLs are short-lived: the widget asks the source for a URL at every click and reads the block's cards again when
|
|
26
28
|
they had expired (`urlsExpireAt`), so thumbnails renew too.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: OwnerStepConfirmation
|
|
3
|
+
emitter: tool
|
|
4
|
+
summary: One stored step that waits for the owner's click — what it does, what follows, its state — with "Run" and "Discard".
|
|
5
|
+
description: Written by the consent step of a tool (never by the model) when `AI.ownerConsent.stepConfirmation.byButtonInChat` is on. The block names the stored step and the hash it was written for; the widget reads the step through the conversation client (`getStepConfirmation`) and shows its two lines (translated from their text keys), its state as a chip with a word, and once it ran the start of its result. "Run" runs exactly the step shown, with the hash of what was read; "Discard" says no. No chat message is sent: the server signals the conversation and the agent continues. A step that changed since is shown again with a notice and confirmed anew. Without the client functions the widget is one line that the step cannot be confirmed here.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# OwnerStepConfirmationConversationWidget
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
A compact surface: the step's target line (what it does) and its consequence line (what follows) beside a state chip,
|
|
12
|
+
the start of the result once it ran, and two buttons while it waits.
|
|
13
|
+
|
|
14
|
+
The lines come as text keys (`targetText`, `consequenceText`: an English template and its values); the widget
|
|
15
|
+
translates the template through the app's texts (`AgentsEnvironment.texts.translate(template, replacements)`) and shows
|
|
16
|
+
the English line the tool wrote (`targetLine`, `consequenceLine`) for a free line. The values and the result excerpt
|
|
17
|
+
are data, shown as written.
|
|
18
|
+
|
|
19
|
+
| State | Chip | Shown |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `OPEN` | "Waiting for you" | "Run" and "Discard" while the message is interactive |
|
|
22
|
+
| `RUNNING` | "Running" | read again every 3 s until it ran |
|
|
23
|
+
| `EXECUTED` | "Done" | the start of the result |
|
|
24
|
+
| `FAILED` | "Failed" | the start of the failure |
|
|
25
|
+
| `DISCARDED` | "Discarded" | — |
|
|
26
|
+
| `EXPIRED` (or `OPEN` past `expiresAt`) | "Expired" | — |
|
|
27
|
+
| `SUPERSEDED` | "Replaced" | "A newer request replaced this step." |
|
|
28
|
+
|
|
29
|
+
"Run" sends the `contentHash` of the step as READ from the server (`executeStepConfirmation`); the block's own hash is
|
|
30
|
+
only compared. A stored hash that differs from the block's, or a run the server refuses with HTTP 400 (the step
|
|
31
|
+
changed), shows "This step changed meanwhile. Check it again before you run it." over the step as it stands now. A run
|
|
32
|
+
refused with 403 (no longer open) and every other failure reads the step again, so the chip tells why; a failed action
|
|
33
|
+
adds a line ("The step could not be run." / "The step could not be discarded."). A second click while an action runs
|
|
34
|
+
does nothing; after each action the step is read again. Not in an e-mail capture: there the buttons are left out.
|
|
35
|
+
|
|
36
|
+
The widget reports `failed` (`INVALID_PROP`) and shows "This step cannot be confirmed here." when the block names no
|
|
37
|
+
step or hash, the chat names no conversation (`conversationId` of the widget callbacks), or the conversation client
|
|
38
|
+
has no `getStepConfirmation`. With `getStepConfirmation` but without `executeStepConfirmation` and
|
|
39
|
+
`discardStepConfirmation` it shows the step and, while it waits, the same line instead of the buttons.
|
|
40
|
+
|
|
41
|
+
## Data structure
|
|
42
|
+
```ts
|
|
43
|
+
interface OwnerStepConfirmationPayload {
|
|
44
|
+
stepConfirmationId: number; // the stored step (`AgentStepConfirmation`), above 0
|
|
45
|
+
contentHash: string; // the hash of the stored call the tool wrote the block for
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## App duty
|
|
50
|
+
Mount `AgentConversationStepConfirmationsTrait` in the controller of the chat (beside the reads and writes) when the
|
|
51
|
+
setting is on. `createAgentsHttpConversationClient` binds the three port functions to its routes
|
|
52
|
+
(`GET /{id}/stepConfirmations/{stepId}`, `POST …/execute` with `{ contentHash }`, `POST …/discard`); a binding of its
|
|
53
|
+
own implements `getStepConfirmation`, `executeStepConfirmation` and `discardStepConfirmation`
|
|
54
|
+
(`mapWireStepConfirmation` maps the answer). The server refuses a click of anyone but the conversation's owner.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"wireName": "OwnerStepConfirmation",
|
|
3
|
+
"fixtures": [
|
|
4
|
+
{
|
|
5
|
+
"name": "without-conversation-client",
|
|
6
|
+
"description": "The block outside a chat whose conversation client reads step confirmations (the preview has none): one line that the step cannot be confirmed here; the block reports itself failed.",
|
|
7
|
+
"payload": {
|
|
8
|
+
"stepConfirmationId": 41,
|
|
9
|
+
"contentHash": "preview-step"
|
|
10
|
+
},
|
|
11
|
+
"locale": "de",
|
|
12
|
+
"expectedState": "error",
|
|
13
|
+
"width": 390
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
package/dist/image-render.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React, { useRef, useEffect } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { bl, bm, bn } from "./chunks/WebSearchResultsConversationWidget-
|
|
8
|
-
import { r as readWidgetImageReadiness, p as publishWidgetImageReadiness, i as interceptXMLHttpRequests, a as interceptFetchRequests, c as createHeaderlessResponse, t as toSameRealmFetchInput } from "./chunks/browser-request-interception-
|
|
9
|
-
import { W, b } from "./chunks/browser-request-interception-
|
|
10
|
-
import { Q as getGoogleMapWidgetNames, V as getWidgetImageCaptureReadPathPrefix } from "./chunks/index-
|
|
4
|
+
import { H as resolveWidgetName, j as conversationWidgetRegistry } from "./chunks/conversationWidgetRegistry-webrYtkI.js";
|
|
5
|
+
import { I } from "./chunks/conversationWidgetRegistry-webrYtkI.js";
|
|
6
|
+
import { B as ConversationWidgetRenderContext, bi as WidgetImageReadinessContext, R as ReadOnlyConversationWidgetProvider, bj as WidgetImageRenderContext, bk as WidgetImageLiveHydrationContext, E as buildWidgetAgentSpaceKeyProps } from "./chunks/WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
7
|
+
import { bl, bm, bn } from "./chunks/WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
8
|
+
import { r as readWidgetImageReadiness, p as publishWidgetImageReadiness, i as interceptXMLHttpRequests, a as interceptFetchRequests, c as createHeaderlessResponse, t as toSameRealmFetchInput } from "./chunks/browser-request-interception-BnOQWLaJ.js";
|
|
9
|
+
import { W, b } from "./chunks/browser-request-interception-BnOQWLaJ.js";
|
|
10
|
+
import { Q as getGoogleMapWidgetNames, V as getWidgetImageCaptureReadPathPrefix } from "./chunks/index-DAEGct6X.js";
|
|
11
11
|
const root = "agents_root_prMo3u";
|
|
12
12
|
const styles = {
|
|
13
13
|
root
|
|
@@ -366,7 +366,7 @@ export {
|
|
|
366
366
|
installLiveWidgetRequests,
|
|
367
367
|
isGoogleMapCapture,
|
|
368
368
|
publishWidgetImageReadiness,
|
|
369
|
-
|
|
369
|
+
I as readComposedViewDataTimes,
|
|
370
370
|
bl as readFrozenHydration,
|
|
371
371
|
readWidgetImageReadiness,
|
|
372
372
|
b as readWidgetImageReadinessGlobalNames,
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { r as registerCanvasBodies, c as canvasBodies } from "./chunks/canvasBodies-
|
|
4
|
-
import { g, a, b } from "./chunks/canvasBodies-
|
|
5
|
-
import {
|
|
6
|
-
import { r,
|
|
2
|
+
import { i, h } from "./chunks/conversationWidgetRegistry-webrYtkI.js";
|
|
3
|
+
import { r as registerCanvasBodies, c as canvasBodies } from "./chunks/canvasBodies-B2M6aWao.js";
|
|
4
|
+
import { g, a, b } from "./chunks/canvasBodies-B2M6aWao.js";
|
|
5
|
+
import { b as isPackageCanvasId, d as declareCanvasKind, f as forgetCanvasKind } from "./chunks/WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
6
|
+
import { r, c, e, g as g2, h as h2, j } from "./chunks/WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
7
7
|
import { r as registerCanvasFeatureFlags, c as canvasFeatureFlags } from "./chunks/canvas-feature-flags-Cn8xBliA.js";
|
|
8
8
|
import { A, i as i2 } from "./chunks/icon-names-C5PeVvkJ.js";
|
|
9
9
|
import { A as A2, f } from "./chunks/host-color-scheme-Jhb7JZR7.js";
|
|
10
|
-
import { A as A3, u } from "./chunks/link-navigation-
|
|
11
|
-
import { A as A4, B, C, a as a2, D, b as
|
|
10
|
+
import { A as A3, u } from "./chunks/link-navigation-DQWyeNkx.js";
|
|
11
|
+
import { A as A4, B, C, a as a2, D, b as b2, c as c2, d, e as e2, G, H, f as f2, I, g as g3, L, M, h as h3, i as i3, j as j2, P, R, k, S, l, m, n, o, p, q, T, r as r2, s, t, u as u2, v, W, w, x, y, z, E, F, J, K, N, O, Q, U, V, X, Y, Z, _, $, a0, a1, a2 as a22, a3, a4, a5, a6, a7, a8, a9 } from "./chunks/index-DAEGct6X.js";
|
|
12
12
|
import { u as u3, a as a10 } from "./chunks/AgentsConversationClientContext-B_UJSLXU.js";
|
|
13
13
|
const registerCanvasKind = (kind) => {
|
|
14
14
|
if (isPackageCanvasId(kind.canvasId)) {
|
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
C as Checkbox,
|
|
37
37
|
a2 as ConversationSearchResultsList,
|
|
38
38
|
D as DEFAULT_AGENTS_COMPONENTS,
|
|
39
|
-
|
|
39
|
+
b2 as DEFAULT_AGENTS_TEXTS,
|
|
40
40
|
c2 as DEFAULT_WIDGET_IMAGE_CAPTURE_READ_PATH_PREFIX,
|
|
41
41
|
d as DEFAULT_WIDGET_SELF_HYDRATION_KEY_FIELD_NAME,
|
|
42
42
|
e2 as DateInput,
|
|
@@ -49,7 +49,7 @@ export {
|
|
|
49
49
|
M as Map,
|
|
50
50
|
h3 as MapMarker,
|
|
51
51
|
i3 as Markdown,
|
|
52
|
-
|
|
52
|
+
j2 as ModalLayer,
|
|
53
53
|
P as ProgressBar,
|
|
54
54
|
R as RadioGroup,
|
|
55
55
|
k as RangeSlider,
|
|
@@ -90,14 +90,14 @@ export {
|
|
|
90
90
|
registerCanvasBodies,
|
|
91
91
|
registerCanvasFeatureFlags,
|
|
92
92
|
registerCanvasKind,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
i as registerComposedViewDataSourceFetcher,
|
|
94
|
+
c as registerConceptExplainerTypes,
|
|
95
|
+
h as registerConversationWidgets,
|
|
96
|
+
e as registerDriveFileCanvasOpener,
|
|
97
|
+
g2 as registerDriveFileCardsSource,
|
|
98
98
|
b as registerEntityDetailBodies,
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
h2 as registerFilePreviewSource,
|
|
100
|
+
j as registerWidgetHydrator,
|
|
101
101
|
Z as reportRunningTurn,
|
|
102
102
|
_ as reportWidgetCrash,
|
|
103
103
|
$ as setAgentsEnvironment,
|
package/dist/kit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A, C, a, b, c, d, e, E, r, f, u, g } from "./chunks/
|
|
3
|
-
import { M } from "./chunks/WebSearchResultsConversationWidget-
|
|
2
|
+
import { A, C, a, b, c, d, e, E, r, f, u, g } from "./chunks/conversationWidgetRegistry-webrYtkI.js";
|
|
3
|
+
import { M } from "./chunks/WebSearchResultsConversationWidget-BVMwJfhL.js";
|
|
4
4
|
import { E as E2, u as u2 } from "./chunks/entity-detail-name-3A82gDAp.js";
|
|
5
5
|
export {
|
|
6
6
|
A as ApexChart,
|