@schlenkr/ragents 0.1.9 → 0.1.10
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/apps/server/package.json +1 -1
- package/apps/server/src/access-projection.ts +6 -36
- package/apps/server/src/api/contracts.ts +5 -2
- package/apps/server/src/api/core-methods.ts +5 -3
- package/apps/server/src/config-file.ts +1 -1
- package/apps/server/src/host-api.json +2 -0
- package/apps/server/src/plugin-support/process-sandbox.ts +16 -15
- package/apps/server/src/provider.ts +2 -2
- package/apps/server/src/ragents/engine.ts +2 -1
- package/apps/server/src/ragents/global-chat.ts +7 -1
- package/apps/server/src/server.ts +3 -1
- package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-xXXhTDbh.js → highlighted-body-KPVGNVTW-BO4wLQtE.js} +1 -1
- package/apps/web/dist/assets/main-DnnqWHkH.js +11 -0
- package/apps/web/dist/assets/mermaid-HWGCJPDP-BLLeth5_.js +568 -0
- package/apps/web/dist/assets/{runPanel-ZT6TPDLM.js → runPanel-DPm7s3KM.js} +2 -2
- package/apps/web/dist/help/guide-clients.html +17 -7
- package/apps/web/dist/help/guide-clients.md +18 -7
- package/apps/web/dist/help/index.html +1911 -908
- package/apps/web/dist/help/mini-app.css +24 -0
- package/apps/web/dist/host-web.json +2 -2
- package/apps/web/dist/index.html +2 -2
- package/apps/web/dist/run-panel.html +2 -2
- package/apps/web/package.json +1 -1
- package/apps/web/src/panel/ConnectionsPage.tsx +3 -0
- package/apps/web/src/panel/StartPage.tsx +3 -0
- package/apps/web/src/panel/contract.ts +7 -0
- package/bundles/ragents.activity/ragents-bundle.json +1 -1
- package/bundles/ragents.actor-programs/ragents-bundle.json +2 -2
- package/bundles/ragents.actor-programs/server/index.js +31 -3
- package/bundles/ragents.actor-programs/server/index.js.map +4 -4
- package/bundles/ragents.actor-programs/web/index.js.map +1 -1
- package/bundles/ragents.ask/ragents-bundle.json +2 -4
- package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js → chunk-MBRPS477.js} +2 -2
- package/bundles/ragents.ask/web/chunks/{chunk-V7W3QDVS.js.map → chunk-MBRPS477.js.map} +4 -4
- package/bundles/ragents.ask/web/classes.json +1 -1
- package/bundles/ragents.ask/web/exports/web/QuestionCard.js +1 -1
- package/bundles/ragents.ask/web/index.js +1 -1
- package/bundles/ragents.ask/web/index.js.map +4 -4
- package/bundles/ragents.browser/ragents-bundle.json +1 -1
- package/bundles/ragents.documents/ragents-bundle.json +1 -1
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +1 -1
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +1 -1
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +1 -1
- package/bundles/ragents.model-relay/ragents-bundle.json +1 -1
- package/bundles/ragents.orchestration/ragents-bundle.json +2 -2
- package/bundles/ragents.orchestration/web/classes.json +1 -1
- package/bundles/ragents.orchestration/web/index.js +6 -6
- package/bundles/ragents.orchestration/web/index.js.map +3 -3
- package/bundles/ragents.overseer/ragents-bundle.json +2 -2
- package/bundles/ragents.overseer/server/index.js +1 -1
- package/bundles/ragents.overseer/server/index.js.map +2 -2
- package/bundles/ragents.processes/ragents-bundle.json +1 -1
- package/bundles/ragents.product/ragents-bundle.json +1 -1
- package/bundles/ragents.profile-distribution/ragents-bundle.json +1 -1
- package/bundles/ragents.reference/ragents-bundle.json +1 -1
- package/bundles/ragents.todo/ragents-bundle.json +1 -1
- package/bundles/ragents.transcript/ragents-bundle.json +1 -1
- package/bundles/ragents.watch/ragents-bundle.json +1 -1
- package/bundles/ragents.workspace/ragents-bundle.json +2 -2
- package/bundles/ragents.workspace/server/index.js +4 -2
- package/bundles/ragents.workspace/server/index.js.map +2 -2
- package/package.json +3 -3
- package/packages/agent/dist/core/tools/bash.d.ts +1 -1
- package/packages/agent/src/core/tools/bash.ts +1 -1
- package/packages/ragents/src/index.ts +1 -0
- package/packages/ragents/src/plugin-host.ts +46 -0
- package/packages/ragents/src/plugin-types.ts +19 -0
- package/packages/workspace-executor/src/managed-process.ts +28 -0
- package/packages/workspace-executor/src/sandbox-tools.ts +9 -3
- package/plugins/ragents.actor-programs/server/access-projections.ts +31 -0
- package/plugins/ragents.actor-programs/server/index.ts +2 -0
- package/plugins/ragents.ask/web/index.tsx +0 -6
- package/plugins/ragents.orchestration/web/ActorTile.tsx +1 -1
- package/plugins/ragents.orchestration/web/run-panel/RunPanel.tsx +8 -7
- package/plugins/ragents.orchestration/web/run-panel/sheet-status.ts +3 -3
- package/plugins/ragents.overseer/server/api.ts +2 -2
- package/plugins/ragents.workspace/client/workspace-client.ts +19 -6
- package/plugins/ragents.workspace/server/config.ts +3 -0
- package/plugins/ragents.workspace/server/index.ts +3 -2
- package/apps/web/dist/assets/main-C7JeZFjs.js +0 -6
- package/apps/web/dist/assets/mermaid-HWGCJPDP-DfsU5ofC.js +0 -478
- package/plugins/ragents.ask/web/QuestionSection.tsx +0 -48
|
@@ -4906,6 +4906,9 @@
|
|
|
4906
4906
|
.qsl\:z-\[110\] {
|
|
4907
4907
|
z-index: 110;
|
|
4908
4908
|
}
|
|
4909
|
+
.qsl\:-mx-\[16px\] {
|
|
4910
|
+
margin-inline: calc(16px * -1);
|
|
4911
|
+
}
|
|
4909
4912
|
.qsl\:mx-auto {
|
|
4910
4913
|
margin-inline: auto;
|
|
4911
4914
|
}
|
|
@@ -5019,6 +5022,9 @@
|
|
|
5019
5022
|
.qsl\:max-h-\[240px\] {
|
|
5020
5023
|
max-height: 240px;
|
|
5021
5024
|
}
|
|
5025
|
+
.qsl\:max-h-\[calc\(var\(--qsl-panel-height\,100dvh\)_\/_2\)\] {
|
|
5026
|
+
max-height: calc(var(--qsl-panel-height,100dvh) / 2);
|
|
5027
|
+
}
|
|
5022
5028
|
.qsl\:max-h-\[min\(70vh\,620px\)\] {
|
|
5023
5029
|
max-height: min(70vh, 620px);
|
|
5024
5030
|
}
|
|
@@ -5196,6 +5202,9 @@
|
|
|
5196
5202
|
.qsl\:gap-\[5px\] {
|
|
5197
5203
|
gap: 5px;
|
|
5198
5204
|
}
|
|
5205
|
+
.qsl\:gap-\[var\(--qsl-chat-dense-message-gap\,8px\)\] {
|
|
5206
|
+
gap: var(--qsl-chat-dense-message-gap,8px);
|
|
5207
|
+
}
|
|
5199
5208
|
:where(.qsl\:space-y-0 > :not(:last-child)) {
|
|
5200
5209
|
--tw-space-y-reverse: 0;
|
|
5201
5210
|
margin-block-start: 0;
|
|
@@ -5342,6 +5351,9 @@
|
|
|
5342
5351
|
.qsl\:bg-\[linear-gradient\(to_right\,var\(--qsl-scroll-cover\,var\(--qsl-background\)\)_50\%\,transparent\)_left\/20px_100\%_no-repeat_local\,linear-gradient\(to_left\,var\(--qsl-scroll-cover\,var\(--qsl-background\)\)_50\%\,transparent\)_right\/20px_100\%_no-repeat_local\,linear-gradient\(to_right\,\#00000047\,transparent\)_left\/14px_100\%_no-repeat_scroll\,linear-gradient\(to_left\,\#00000047\,transparent\)_right\/14px_100\%_no-repeat_scroll\] {
|
|
5343
5352
|
background-image: linear-gradient(to right,var(--qsl-scroll-cover,var(--qsl-background)) 50%,transparent) left/20px 100% no-repeat local,linear-gradient(to left,var(--qsl-scroll-cover,var(--qsl-background)) 50%,transparent) right/20px 100% no-repeat local,linear-gradient(to right,#00000047,transparent) left/14px 100% no-repeat scroll,linear-gradient(to left,#00000047,transparent) right/14px 100% no-repeat scroll;
|
|
5344
5353
|
}
|
|
5354
|
+
.qsl\:\[mask-image\:linear-gradient\(to_bottom\,\#000_calc\(100\%_-_var\(--qsl-chat-message-gap\,16px\)\)\,transparent\)\] {
|
|
5355
|
+
mask-image: linear-gradient(to bottom,#000 calc(100% - var(--qsl-chat-message-gap,16px)),transparent);
|
|
5356
|
+
}
|
|
5345
5357
|
.qsl\:\[mask-image\:linear-gradient\(to_bottom\,\#000_calc\(var\(--qsl-fade-edge\)_-_40px\)\,transparent_calc\(var\(--qsl-fade-edge\)_\+_16px\)\)\] {
|
|
5346
5358
|
mask-image: linear-gradient(to bottom,#000 calc(var(--qsl-fade-edge) - 40px),transparent calc(var(--qsl-fade-edge) + 16px));
|
|
5347
5359
|
}
|
|
@@ -5390,6 +5402,9 @@
|
|
|
5390
5402
|
.qsl\:px-\[7px\] {
|
|
5391
5403
|
padding-inline: 7px;
|
|
5392
5404
|
}
|
|
5405
|
+
.qsl\:px-\[16px\] {
|
|
5406
|
+
padding-inline: 16px;
|
|
5407
|
+
}
|
|
5393
5408
|
.qsl\:px-\[var\(--qsl-chat-horizontal-padding\,24px\)\] {
|
|
5394
5409
|
padding-inline: var(--qsl-chat-horizontal-padding,24px);
|
|
5395
5410
|
}
|
|
@@ -5441,6 +5456,9 @@
|
|
|
5441
5456
|
.qsl\:pb-\[calc\(var\(--qsl-composer-height\,0px\)_\+_max\(3\.25em\,40px\)\)\] {
|
|
5442
5457
|
padding-bottom: calc(var(--qsl-composer-height,0px) + max(3.25em, 40px));
|
|
5443
5458
|
}
|
|
5459
|
+
.qsl\:pb-\[var\(--qsl-chat-message-gap\,16px\)\] {
|
|
5460
|
+
padding-bottom: var(--qsl-chat-message-gap,16px);
|
|
5461
|
+
}
|
|
5444
5462
|
.qsl\:pl-1 {
|
|
5445
5463
|
padding-left: var(--qsl-spacing);
|
|
5446
5464
|
}
|
|
@@ -5735,6 +5753,9 @@
|
|
|
5735
5753
|
.qsl\:\[--qsl-scroll-cover\:var\(--qsl-secondary\)\] {
|
|
5736
5754
|
--qsl-scroll-cover: var(--qsl-secondary);
|
|
5737
5755
|
}
|
|
5756
|
+
.qsl\:\[-webkit-mask-image\:linear-gradient\(to_bottom\,\#000_calc\(100\%_-_var\(--qsl-chat-message-gap\,16px\)\)\,transparent\)\] {
|
|
5757
|
+
-webkit-mask-image: linear-gradient(to bottom,#000 calc(100% - var(--qsl-chat-message-gap,16px)),transparent);
|
|
5758
|
+
}
|
|
5738
5759
|
.qsl\:\[-webkit-mask-image\:linear-gradient\(to_bottom\,\#000_calc\(var\(--qsl-fade-edge\)_-_40px\)\,transparent_calc\(var\(--qsl-fade-edge\)_\+_16px\)\)\] {
|
|
5739
5760
|
-webkit-mask-image: linear-gradient(to bottom,#000 calc(var(--qsl-fade-edge) - 40px),transparent calc(var(--qsl-fade-edge) + 16px));
|
|
5740
5761
|
}
|
|
@@ -5770,6 +5791,9 @@
|
|
|
5770
5791
|
.qsl\:placeholder\:text-muted-foreground::placeholder {
|
|
5771
5792
|
color: var(--qsl-muted-foreground);
|
|
5772
5793
|
}
|
|
5794
|
+
.qsl\:empty\:hidden:empty {
|
|
5795
|
+
display: none;
|
|
5796
|
+
}
|
|
5773
5797
|
.qsl\:focus-within\:pointer-events-auto:focus-within {
|
|
5774
5798
|
pointer-events: auto;
|
|
5775
5799
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"inputs": {
|
|
3
|
-
"apps/server/src/api/contracts.ts": "
|
|
3
|
+
"apps/server/src/api/contracts.ts": "57f96a6d6265d3e8e45842afe200d59c12ac31e348cefd70e82de71ca2414bbb",
|
|
4
4
|
"apps/server/src/host-api.ts": "3f1044f2b7b1031996b48268a1c7243140b978b5fd5eee2023eda537e0c3363d",
|
|
5
5
|
"apps/server/src/plugin-support/actor-programs/contract.ts": "c334fd984af72a23b328da72d6154d50c68a47d6dfcca5eea10b0ed8c856389d",
|
|
6
6
|
"apps/server/src/plugin-support/chat-display-contract.ts": "2fb8aab13b5a60b4fe28f87f93cc82afb34b7d8ef1463e376bc3cbc0bcdc797b",
|
|
@@ -138,6 +138,6 @@
|
|
|
138
138
|
"packages/ragents/src/rpc/peer.ts": "9c4ace7084f93194e12bacc2865ec3430c10a9236630d84d723d3bab58672c84",
|
|
139
139
|
"packages/ragents/src/rpc/protocol.ts": "02e58cac59a66067550f384cf33bbdf6a10bf67055d8e2d33ed0fd07e247f09e",
|
|
140
140
|
"packages/ragents/src/runtime/domain-error.ts": "d6bf8fa09769c4137e616c83a84cb9c05a58bfa6c2e32c9404a1c202815837a4",
|
|
141
|
-
"pnpm-lock.yaml": "
|
|
141
|
+
"pnpm-lock.yaml": "14f0237e537aa7096dfe5c775be5dcffd7f0d87e0d21d5c4bbdf88320b7b0f12"
|
|
142
142
|
}
|
|
143
143
|
}
|
package/apps/web/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="stylesheet" href="/ragents.css" />
|
|
7
7
|
<title>RAgents</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/main-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/mermaid-HWGCJPDP-
|
|
8
|
+
<script type="module" crossorigin src="/assets/main-DnnqWHkH.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/mermaid-HWGCJPDP-BLLeth5_.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/mermaid-HWGCJPDP-BPn4aV2r.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="stylesheet" href="/ragents.css" />
|
|
7
7
|
<title>RAgents Panel</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/runPanel-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/mermaid-HWGCJPDP-
|
|
8
|
+
<script type="module" crossorigin src="/assets/runPanel-DPm7s3KM.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/mermaid-HWGCJPDP-BLLeth5_.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/mermaid-HWGCJPDP-BPn4aV2r.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/apps/web/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FolderIcon, KeyIcon, PencilIcon, PlusIcon, ServerIcon, SettingsIcon, Trash2Icon } from "lucide-react";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
+
import { cn } from "cn";
|
|
3
4
|
import { Button, ConnectionStateIcon } from "../ui";
|
|
4
5
|
import { busyState, connectionState, kindLabel, stateDetail } from "./connection-state";
|
|
5
6
|
import type { ConnectionView, PanelAction } from "./contract";
|
|
@@ -43,6 +44,7 @@ function ConnectionRow({ connection, send, onEdit, onLogin, onRemove }: {
|
|
|
43
44
|
}) {
|
|
44
45
|
const busy = busyState(connection);
|
|
45
46
|
const detail = stateDetail(connection) ?? connection.problem;
|
|
47
|
+
const notice = connection.versionNotice;
|
|
46
48
|
const profile = connection.kind === "profile";
|
|
47
49
|
return <li className="grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2.5 gap-y-1.5 border-b border-border-soft px-1 py-2.5 last:border-b-0">
|
|
48
50
|
<span aria-hidden className="grid size-[26px] flex-none place-items-center rounded-md bg-secondary text-muted-foreground">
|
|
@@ -57,6 +59,7 @@ function ConnectionRow({ connection, send, onEdit, onLogin, onRemove }: {
|
|
|
57
59
|
<span className="block truncate font-mono text-[0.68rem] text-muted-foreground" title={connection.address}>{profile ? fileNameOf(connection.address) : connection.address}</span>
|
|
58
60
|
</span>
|
|
59
61
|
{detail && <p className="col-span-2 text-[0.7rem] leading-normal text-destructive [overflow-wrap:anywhere]" role="alert">{detail}</p>}
|
|
62
|
+
{notice && <p className={cn("col-span-2 text-[0.7rem] leading-normal [overflow-wrap:anywhere]", notice.level === "error" ? "text-destructive" : "text-warning")} data-notice={notice.level} role={notice.level === "error" ? "alert" : "status"}>{notice.text}</p>}
|
|
60
63
|
<span className="col-span-2 flex flex-wrap items-center gap-1.5">
|
|
61
64
|
<RowActions busy={busy} connection={connection} onLogin={onLogin} send={send} />
|
|
62
65
|
{connection.savedLogin && <Button disabled={busy} onClick={() => send({ action: "logout", name: connection.name })} size="xs" variant="ghost">Abmelden</Button>}
|
|
@@ -131,6 +131,9 @@ export function StartPage({ state, send }: PanelPageProps) {
|
|
|
131
131
|
const loginConnection = connections.find((connection) => connection.name === login);
|
|
132
132
|
return <div className="@container/panel grid grid-cols-1 gap-4">
|
|
133
133
|
{state.problem && <p className="text-[0.8rem] leading-normal text-destructive [overflow-wrap:anywhere]" role="alert">{state.problem}</p>}
|
|
134
|
+
{connections.flatMap((connection) => connection.versionNotice ? [{ name: connection.name, notice: connection.versionNotice }] : []).map(({ name, notice }) =>
|
|
135
|
+
<p className={cn("text-[0.8rem] leading-normal [overflow-wrap:anywhere]", notice.level === "error" ? "text-destructive" : "text-warning")} data-notice={notice.level} key={name}
|
|
136
|
+
role={notice.level === "error" ? "alert" : "status"}>{marked ? `${name}: ${notice.text}` : notice.text}</p>)}
|
|
134
137
|
{connections.length === 0
|
|
135
138
|
? <div className="grid gap-3">
|
|
136
139
|
<p className="text-[0.85rem] leading-normal text-muted-foreground">Noch kein Server. Lege einen Server per Adresse oder ein lokales Profil an.</p>
|
|
@@ -72,6 +72,13 @@ export interface ConnectionView {
|
|
|
72
72
|
readonly problem?: string;
|
|
73
73
|
/** Start oder Übernahme scheiterten an dieser Umgebungsvariablen; die Zeile führt von hier zum Wert und zum neuen Versuch. */
|
|
74
74
|
readonly missingEnvironment?: MissingEnvironment;
|
|
75
|
+
/** Erweiterung und Server tragen eine andere RAgents-Fassung; ein Fehler, wenn der Arbeitsplatz deshalb nicht angemeldet ist. */
|
|
76
|
+
readonly versionNotice?: ConnectionNotice;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ConnectionNotice {
|
|
80
|
+
readonly level: "error" | "warning";
|
|
81
|
+
readonly text: string;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
/** Die vier Seiten der Erweiterung; "run" zeigt das Run-Panel statt dieser Seite. */
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"stand": "76950227a2595ee5aa386c266cfe5a251b86943efffeda64a971b986ae33faec",
|
|
26
|
-
"sourceStand": "
|
|
26
|
+
"sourceStand": "9f88ec345adcc08f5f6e58e26fbff420969a87fc466c926300b88416fff25856",
|
|
27
27
|
"server": "server/index.js",
|
|
28
28
|
"web": {
|
|
29
29
|
"entry": "web/index.js",
|
|
@@ -192,8 +192,8 @@
|
|
|
192
192
|
]
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
-
"stand": "
|
|
196
|
-
"sourceStand": "
|
|
195
|
+
"stand": "9f4086159e168300f5c86dddb24561e423e124b29fe83be88426044bc9264684",
|
|
196
|
+
"sourceStand": "fd393caa93731d31ceba033d67bf88b864d55fa3f79fb134f53e8a67d35ad346",
|
|
197
197
|
"server": "server/index.js",
|
|
198
198
|
"web": {
|
|
199
199
|
"entry": "web/index.js",
|
|
@@ -907,7 +907,7 @@ var createTestReport = async (directory) => {
|
|
|
907
907
|
let passed = 0;
|
|
908
908
|
let failed2 = 0;
|
|
909
909
|
let pending = "";
|
|
910
|
-
const
|
|
910
|
+
const record2 = (line) => {
|
|
911
911
|
if (line.trim() === "") return;
|
|
912
912
|
let parsed;
|
|
913
913
|
try {
|
|
@@ -941,10 +941,10 @@ var createTestReport = async (directory) => {
|
|
|
941
941
|
stdout: (chunk) => {
|
|
942
942
|
const lines = (pending + chunk).split("\n");
|
|
943
943
|
pending = lines.pop() ?? "";
|
|
944
|
-
lines.forEach(
|
|
944
|
+
lines.forEach(record2);
|
|
945
945
|
},
|
|
946
946
|
report: (name2, outcome) => {
|
|
947
|
-
|
|
947
|
+
record2(pending);
|
|
948
948
|
pending = "";
|
|
949
949
|
const summary = outcome.timedOut ? `Tests f\xFCr ${name2} nach Zeit\xFCberschreitung abgebrochen: ${passed} bestanden, ${failed2} fehlgeschlagen.` : `Tests f\xFCr ${name2} fehlgeschlagen: ${passed} bestanden, ${failed2} fehlgeschlagen.`;
|
|
950
950
|
const details = failures.map(describe);
|
|
@@ -2018,6 +2018,33 @@ var createProjectDiagnostics = (options) => {
|
|
|
2018
2018
|
};
|
|
2019
2019
|
};
|
|
2020
2020
|
|
|
2021
|
+
// server/access-projections.ts
|
|
2022
|
+
import { ACTOR_INVOCATIONS_STATE_ID as ACTOR_INVOCATIONS_STATE_ID2, ACTOR_PROGRAMS_STATE_ID as ACTOR_PROGRAMS_STATE_ID2 } from "@ragents/host/plugin-support/actor-programs/contract.js";
|
|
2023
|
+
var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
2024
|
+
var visibleProgram = (state) => {
|
|
2025
|
+
const program = record(record(state)?.program);
|
|
2026
|
+
if (!program) return state;
|
|
2027
|
+
const views = Array.isArray(program.views) ? program.views.map((value) => {
|
|
2028
|
+
const view = record(value);
|
|
2029
|
+
return view ? { id: view.id, key: view.key, title: view.title, visible: view.visible, placements: view.placements } : value;
|
|
2030
|
+
}) : [];
|
|
2031
|
+
return {
|
|
2032
|
+
version: 1,
|
|
2033
|
+
program: {
|
|
2034
|
+
name: program.name,
|
|
2035
|
+
title: program.title,
|
|
2036
|
+
actorId: program.actorId,
|
|
2037
|
+
actorHandle: program.actorHandle,
|
|
2038
|
+
revision: program.revision,
|
|
2039
|
+
views
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
};
|
|
2043
|
+
var actorProgramAccessProjections = [
|
|
2044
|
+
{ id: ACTOR_PROGRAMS_STATE_ID2, state: (entry) => visibleProgram(entry.state), chatEvent: () => void 0 },
|
|
2045
|
+
{ id: ACTOR_INVOCATIONS_STATE_ID2, state: (entry) => ({ version: 1, revision: entry.updatedAt }), chatEvent: () => void 0 }
|
|
2046
|
+
];
|
|
2047
|
+
|
|
2021
2048
|
// server/index.ts
|
|
2022
2049
|
var actorProgramsPlugin = (pluginHost) => ({
|
|
2023
2050
|
manifest: { id: "ragents.actor-programs" },
|
|
@@ -2061,6 +2088,7 @@ var actorProgramsPlugin = (pluginHost) => ({
|
|
|
2061
2088
|
shutdown: () => runtime.shutdown()
|
|
2062
2089
|
});
|
|
2063
2090
|
host.prompts(actorProgramSummary);
|
|
2091
|
+
host.accessProjections(...actorProgramAccessProjections);
|
|
2064
2092
|
host.functions(createControlsToolContributor(), ...createActorProgramToolContributors(runtime, diagnostics));
|
|
2065
2093
|
}
|
|
2066
2094
|
});
|