@schlenkr/ragents 0.1.8 → 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-definition.ts +24 -2
- package/apps/server/src/config-file.ts +1 -1
- package/apps/server/src/config.ts +0 -6
- package/apps/server/src/host-api.json +5 -10
- package/apps/server/src/host-api.ts +6 -7
- package/apps/server/src/plugin-build/build.ts +28 -5
- package/apps/server/src/plugin-build/plugin-description.ts +1 -1
- package/apps/server/src/plugin-build/typecheck.ts +2 -2
- package/apps/server/src/plugin-support/language-server/plugin.ts +8 -7
- package/apps/server/src/plugin-support/language-server/tools.ts +7 -6
- package/apps/server/src/plugin-support/model-aliases.ts +55 -25
- package/apps/server/src/plugin-support/process-sandbox.ts +16 -15
- package/apps/server/src/plugin-support/product-relay.ts +10 -2
- package/apps/server/src/plugin-support/workspace-sandbox-host.ts +18 -9
- package/apps/server/src/profile/bundle-manifest.ts +7 -3
- package/apps/server/src/profile/compose.ts +6 -0
- package/apps/server/src/profile/plugin-discovery.ts +6 -1
- package/apps/server/src/profile/provisioning.ts +6 -5
- package/apps/server/src/provider.ts +2 -2
- package/apps/server/src/ragents/engine.ts +2 -2
- package/apps/server/src/ragents/global-chat.ts +7 -1
- package/apps/server/src/ragents/host-services.ts +4 -0
- package/apps/server/src/ragents/session.ts +1 -1
- package/apps/server/src/server.ts +4 -1
- package/apps/server/tsconfig.json +2 -0
- 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 +26 -8
- package/apps/web/dist/help/guide-clients.md +27 -8
- package/apps/web/dist/help/guide-distributed.html +12 -4
- package/apps/web/dist/help/guide-distributed.md +12 -4
- package/apps/web/dist/help/guide-getting-started.html +12 -8
- package/apps/web/dist/help/guide-getting-started.md +12 -8
- package/apps/web/dist/help/guide-plugins.html +6 -2
- package/apps/web/dist/help/guide-plugins.md +6 -2
- package/apps/web/dist/help/guide-runtime.html +2 -1
- package/apps/web/dist/help/guide-runtime.md +2 -1
- package/apps/web/dist/help/index.html +4328 -1132
- package/apps/web/dist/help/mini-app.css +24 -0
- package/apps/web/dist/host-web.json +4 -4
- 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 +3 -3
- package/bundles/ragents.actor-programs/ragents-bundle.json +4 -4
- 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 +4 -6
- package/bundles/ragents.ask/server/index.js +42 -11
- package/bundles/ragents.ask/server/index.js.map +3 -3
- 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/chunks/chunk-WFN4374U.js +2 -0
- package/bundles/ragents.ask/web/chunks/chunk-WFN4374U.js.map +7 -0
- package/bundles/ragents.ask/web/classes.json +1 -1
- package/bundles/ragents.ask/web/exports/ask-payload.js +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/executor/index.mjs +357 -0
- package/bundles/ragents.browser/executor/index.mjs.map +7 -0
- package/bundles/ragents.browser/ragents-bundle.json +5 -8
- package/bundles/ragents.browser/server/chunks/{chunk-2GKLLCBE.js → chunk-CWLX4VA5.js} +1 -1
- package/bundles/ragents.browser/server/chunks/chunk-CWLX4VA5.js.map +7 -0
- package/bundles/ragents.browser/server/exports/server/contract.js +1 -1
- package/bundles/ragents.browser/server/index.js +20 -9
- package/bundles/ragents.browser/server/index.js.map +4 -4
- package/bundles/ragents.documents/ragents-bundle.json +3 -3
- package/bundles/ragents.lsp-fsharp/executor/index.mjs +68 -0
- package/bundles/ragents.lsp-fsharp/executor/index.mjs.map +7 -0
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +5 -9
- package/bundles/ragents.lsp-fsharp/server/index.js +21 -6
- package/bundles/ragents.lsp-fsharp/server/index.js.map +4 -4
- package/bundles/ragents.lsp-roslyn/executor/index.mjs +68 -0
- package/bundles/ragents.lsp-roslyn/executor/index.mjs.map +7 -0
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +6 -8
- package/bundles/ragents.lsp-roslyn/server/index.js +54 -15
- package/bundles/ragents.lsp-roslyn/server/index.js.map +4 -4
- package/bundles/ragents.lsp-typescript/executor/index.mjs +49 -0
- package/bundles/ragents.lsp-typescript/executor/index.mjs.map +7 -0
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +5 -7
- package/bundles/ragents.lsp-typescript/server/index.js +22 -2
- package/bundles/ragents.lsp-typescript/server/index.js.map +3 -3
- package/bundles/ragents.model-relay/ragents-bundle.json +4 -4
- package/bundles/ragents.model-relay/server/index.js +3 -2
- package/bundles/ragents.model-relay/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/ragents-bundle.json +4 -4
- 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 +4 -4
- 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 +3 -3
- package/bundles/ragents.product/ragents-bundle.json +3 -3
- package/bundles/ragents.profile-distribution/ragents-bundle.json +4 -4
- package/bundles/ragents.profile-distribution/server/index.js +1 -1
- package/bundles/ragents.profile-distribution/server/index.js.map +2 -2
- package/bundles/ragents.reference/ragents-bundle.json +3 -3
- package/bundles/ragents.todo/ragents-bundle.json +3 -3
- package/bundles/ragents.transcript/ragents-bundle.json +3 -3
- package/bundles/ragents.watch/ragents-bundle.json +3 -3
- package/bundles/ragents.workspace/ragents-bundle.json +11 -5
- package/bundles/ragents.workspace/server/index.js +105 -30
- package/bundles/ragents.workspace/server/index.js.map +3 -3
- package/bundles/ragents.workspace/web/classes.json +1 -1
- package/bundles/ragents.workspace/web/index.js +1 -1
- package/bundles/ragents.workspace/web/index.js.map +3 -3
- package/package.json +3 -3
- package/packages/agent/dist/core/agent-settings.d.ts +1 -7
- package/packages/agent/dist/core/compaction/compaction.d.ts +17 -13
- package/packages/agent/dist/core/model-runtime.d.ts +5 -4
- package/packages/agent/dist/core/provider-composer.d.ts +2 -1
- package/packages/agent/dist/core/tools/bash.d.ts +9 -3
- package/packages/agent/dist/index.d.ts +1 -1
- package/packages/agent/src/core/agent-settings.ts +1 -4
- package/packages/agent/src/core/compaction/compaction.ts +68 -30
- package/packages/agent/src/core/model-runtime.ts +12 -5
- package/packages/agent/src/core/provider-composer.ts +5 -0
- package/packages/agent/src/core/tools/bash.ts +36 -30
- package/packages/agent/src/index.ts +3 -0
- package/packages/ai/dist/types.d.ts +11 -0
- package/packages/ai/src/types.ts +12 -0
- package/packages/ragents/src/domain/event-semantics.ts +3 -0
- package/packages/ragents/src/domain/event-validation.ts +15 -2
- package/packages/ragents/src/domain/events.ts +3 -0
- package/packages/ragents/src/domain/model.ts +2 -0
- package/packages/ragents/src/domain/projection.ts +1 -0
- package/packages/ragents/src/drivers/agent-runtime.ts +1 -1
- package/packages/ragents/src/drivers/agent-turn.ts +8 -6
- 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/ragents/src/runtime/decisions/inputs.ts +6 -2
- package/packages/ragents/src/runtime/journal-storage.ts +5 -4
- package/packages/workspace-executor/package.json +0 -1
- package/packages/workspace-executor/src/bash-launch.ts +56 -10
- package/packages/workspace-executor/src/context.ts +4 -0
- package/packages/workspace-executor/src/contributions.ts +150 -0
- package/packages/workspace-executor/src/executor.ts +1 -1
- package/packages/workspace-executor/src/index.ts +16 -19
- package/packages/workspace-executor/src/language-server/host.ts +3 -0
- package/packages/workspace-executor/src/language-server/module.ts +12 -2
- package/packages/workspace-executor/src/language-server/roots.ts +0 -5
- package/packages/workspace-executor/src/managed-process.ts +28 -0
- package/packages/workspace-executor/src/modules.ts +7 -6
- package/packages/workspace-executor/src/sandbox-tools.ts +12 -12
- package/packages/workspace-executor/src/shell-platform.ts +14 -3
- package/packages/workspace-executor/src/tools.ts +0 -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/ask-payload.ts +9 -0
- package/plugins/ragents.ask/server/ask-service.ts +53 -13
- package/plugins/ragents.ask/web/AskActionView.tsx +3 -2
- package/plugins/ragents.ask/web/index.tsx +0 -6
- package/plugins/ragents.browser/executor/index.ts +5 -0
- package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/module.ts +25 -31
- package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/playwright.ts +9 -23
- package/plugins/ragents.browser/provision.ts +1 -1
- package/plugins/ragents.browser/server/browser.ts +3 -3
- package/plugins/ragents.browser/server/contract.ts +2 -2
- package/plugins/ragents.browser/server/index.ts +1 -1
- package/plugins/ragents.lsp-fsharp/executor.ts +80 -0
- package/plugins/ragents.lsp-fsharp/provision.ts +1 -1
- package/plugins/ragents.lsp-fsharp/server/index.ts +2 -2
- package/plugins/ragents.lsp-roslyn/executor.ts +64 -0
- package/plugins/ragents.lsp-roslyn/provision.ts +1 -1
- package/plugins/ragents.lsp-roslyn/server/index.ts +28 -5
- package/plugins/ragents.lsp-roslyn/server/solution-on-start.ts +18 -6
- package/plugins/ragents.lsp-typescript/executor.ts +50 -0
- package/plugins/ragents.lsp-typescript/server/index.ts +2 -2
- package/plugins/ragents.model-relay/server/config.ts +1 -1
- package/plugins/ragents.model-relay/server/relay.ts +4 -2
- 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.profile-distribution/server/archive.ts +2 -1
- package/plugins/ragents.workspace/client/workspace-client.ts +128 -32
- package/plugins/ragents.workspace/contract.ts +33 -2
- package/plugins/ragents.workspace/server/binding.ts +10 -4
- package/plugins/ragents.workspace/server/clients.ts +56 -9
- package/plugins/ragents.workspace/server/config.ts +12 -0
- package/plugins/ragents.workspace/server/index.ts +15 -5
- package/plugins/ragents.workspace/server/runtime.ts +10 -0
- package/plugins/ragents.workspace/server/shell-platform.ts +6 -5
- package/plugins/ragents.workspace/web/WorkspaceBinding.tsx +1 -1
- package/ragents.config.core.ts +4 -1
- package/ragents.config.showcase.ts +4 -1
- package/scripts/agent/journal.ts +3 -1
- package/scripts/package/build-package.ts +3 -1
- package/scripts/provision/run-provision.ts +2 -2
- package/scripts/workspace-client/run-workspace-client.ts +7 -4
- package/apps/web/dist/assets/main-C7JeZFjs.js +0 -6
- package/apps/web/dist/assets/mermaid-HWGCJPDP-DfsU5ofC.js +0 -478
- package/apps/web/dist/help/screenshots/release-checklist-vscode.png +0 -0
- package/apps/web/dist/help/screenshots/release-checklist-web.png +0 -0
- package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js +0 -2
- package/bundles/ragents.ask/web/chunks/chunk-HGFDGTNC.js.map +0 -7
- package/bundles/ragents.browser/server/chunks/chunk-2GKLLCBE.js.map +0 -7
- package/packages/workspace-executor/src/language-server/adapters/fsharp.ts +0 -60
- package/packages/workspace-executor/src/language-server/adapters/index.ts +0 -7
- package/packages/workspace-executor/src/language-server/adapters/roslyn.ts +0 -56
- package/packages/workspace-executor/src/language-server/adapters/typescript.ts +0 -74
- package/packages/workspace-executor/src/language-server/solution.ts +0 -13
- package/plugins/ragents.ask/web/QuestionSection.tsx +0 -48
- /package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/contract.ts +0 -0
- /package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/pages.ts +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var r="ragents.ask",i=t=>Array.isArray(t)&&t.every(n=>typeof n=="string")?[...t]:void 0,o=t=>{if(typeof t!="object"||t===null)return;let n=t,e=i(n.options);if(!(typeof n.question!="string"||!e))return{question:n.question,options:e,multi:n.multi===!0,...typeof n.recipient=="string"?{recipient:n.recipient}:{}}};export{r as a,o as b};
|
|
2
|
-
//# sourceMappingURL=/plugins/ragents.ask/web/chunks/chunk-HGFDGTNC.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../plugins/ragents.ask/ask-payload.ts"],
|
|
4
|
-
"sourcesContent": ["export const ASK_PLUGIN_ID = \"ragents.ask\";\n\nexport interface AskPayload {\n question: string;\n options: string[];\n multi: boolean;\n /** Der Actor, f\u00FCr den die Frage steht, wenn der Eigent\u00FCmer des Runs sie au\u00DFerhalb eines Turns stellt. */\n recipient?: string;\n}\n\nconst stringArrayOf = (value: unknown): string[] | undefined =>\n Array.isArray(value) && value.every((entry) => typeof entry === \"string\") ? [...value] : undefined;\n\nexport const askPayloadOf = (payload: unknown): AskPayload | undefined => {\n if (typeof payload !== \"object\" || payload === null) return undefined;\n const candidate = payload as Partial<AskPayload>;\n const options = stringArrayOf(candidate.options);\n if (typeof candidate.question !== \"string\" || !options) return undefined;\n return {\n question: candidate.question,\n options,\n multi: candidate.multi === true,\n ...(typeof candidate.recipient === \"string\" ? { recipient: candidate.recipient } : {}),\n };\n};\n"],
|
|
5
|
-
"mappings": "AAAO,IAAMA,EAAgB,cAUvBC,EAAiBC,GACrB,MAAM,QAAQA,CAAK,GAAKA,EAAM,MAAOC,GAAU,OAAOA,GAAU,QAAQ,EAAI,CAAC,GAAGD,CAAK,EAAI,OAE9EE,EAAgBC,GAA6C,CACxE,GAAI,OAAOA,GAAY,UAAYA,IAAY,KAAM,OACrD,IAAMC,EAAYD,EACZE,EAAUN,EAAcK,EAAU,OAAO,EAC/C,GAAI,SAAOA,EAAU,UAAa,UAAY,CAACC,GAC/C,MAAO,CACL,SAAUD,EAAU,SACpB,QAAAC,EACA,MAAOD,EAAU,QAAU,GAC3B,GAAI,OAAOA,EAAU,WAAc,SAAW,CAAE,UAAWA,EAAU,SAAU,EAAI,CAAC,CACtF,CACF",
|
|
6
|
-
"names": ["ASK_PLUGIN_ID", "stringArrayOf", "value", "entry", "askPayloadOf", "payload", "candidate", "options"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../plugins/ragents.browser/server/contract.ts"],
|
|
4
|
-
"sourcesContent": ["import { serviceToken } from \"@ragents/engine\";\nimport type { BrowserSnapshot } from \"@ragents/workspace-executor\";\n\nexport type { BrowserSnapshot, BrowserTarget } from \"@ragents/workspace-executor\";\n\nexport interface BrowserEvidence {\n checkedAt?: string;\n url?: string;\n screenshots: { name: string; url: string }[];\n currentScreenshots: { name: string; url: string }[];\n errors: string[];\n}\n\n/** Wer eine Operation an der Seite ausl\u00F6st: bei einem Werkzeugaufruf dessen Kennung, dazu der Abbruch. */\nexport interface BrowserCallOptions {\n signal?: AbortSignal;\n toolCallId?: string;\n}\n\nexport interface BrowserRuntime {\n open: (runId: string, url: string, options?: BrowserCallOptions) => Promise<BrowserSnapshot>;\n evidence: (runId: string) => BrowserEvidence;\n}\n\nexport const browserRuntimeToken = serviceToken<BrowserRuntime>(\"ragents.browser.runtime\");\n"],
|
|
5
|
-
"mappings": ";;;;AAAA,SAAS,oBAAoB;AAwBtB,IAAM,sBAAsB,aAA6B,yBAAyB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { hostToolFile } from "../../tools.js";
|
|
5
|
-
import type { LanguageServerAdapter } from "../host.js";
|
|
6
|
-
import { dotnetCommand, resolveRootFile } from "../roots.js";
|
|
7
|
-
import { solutionProjects } from "../solution.js";
|
|
8
|
-
|
|
9
|
-
export const FSHARP_SERVER_VARIABLE = "FSHARP_LANGUAGE_SERVER";
|
|
10
|
-
export const FSHARP_PLUGIN_ID = "ragents.lsp-fsharp";
|
|
11
|
-
export const FSHARP_SERVER_FILE = "fsautocomplete/fsautocomplete.dll";
|
|
12
|
-
|
|
13
|
-
const languages = { ".fs": "fsharp", ".fsi": "fsharp", ".fsx": "fsharp" } as const;
|
|
14
|
-
|
|
15
|
-
const serverPath = (): string => {
|
|
16
|
-
const configured = process.env[FSHARP_SERVER_VARIABLE];
|
|
17
|
-
if (configured) return configured;
|
|
18
|
-
const provisioned = hostToolFile(FSHARP_PLUGIN_ID, FSHARP_SERVER_FILE);
|
|
19
|
-
if (existsSync(provisioned)) return provisioned;
|
|
20
|
-
throw new Error("fsautocomplete gibt es auf diesem Rechner nicht: weder "
|
|
21
|
-
+ `${FSHARP_SERVER_VARIABLE} gesetzt noch ${provisioned} vorhanden. Ein Arbeitsplatz holt es mit `
|
|
22
|
-
+ `pnpm provision --workspace, ein Server über pnpm provision <profil>; ${FSHARP_SERVER_VARIABLE} übersteuert beides`);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const contentOf = (params: unknown): string => (params as { content?: string } | undefined)?.content ?? "";
|
|
26
|
-
|
|
27
|
-
export const fsharpAdapter: LanguageServerAdapter = {
|
|
28
|
-
id: "fsharp",
|
|
29
|
-
label: "FSAC",
|
|
30
|
-
languages,
|
|
31
|
-
rootDescription: "the .sln file (or a single .fsproj)",
|
|
32
|
-
resolveRoot: (workspaceRoot, root) => resolveRootFile(workspaceRoot, root, [".sln", ".fsproj"]),
|
|
33
|
-
rootDirectory: (root) => path.dirname(root),
|
|
34
|
-
launch: async (context, root) => ({
|
|
35
|
-
label: "FSAC",
|
|
36
|
-
...dotnetCommand(serverPath(), ["--state-directory", path.join(context.logDirectory, "fsautocomplete")]),
|
|
37
|
-
cwd: path.dirname(root),
|
|
38
|
-
env: context.env,
|
|
39
|
-
uid: context.uid,
|
|
40
|
-
gid: context.gid,
|
|
41
|
-
rootUri: pathToFileURL(path.dirname(root)).href,
|
|
42
|
-
initializationOptions: { AutomaticWorkspaceInit: false },
|
|
43
|
-
languages,
|
|
44
|
-
}),
|
|
45
|
-
open: async (session, root, timeoutMs) => {
|
|
46
|
-
const projects = root.toLowerCase().endsWith(".sln")
|
|
47
|
-
? (await solutionProjects(root)).filter((project) => project.toLowerCase().endsWith(".fsproj"))
|
|
48
|
-
: [root];
|
|
49
|
-
if (projects.length === 0) throw new Error(`${path.basename(root)} enthält keine F#-Projekte`);
|
|
50
|
-
const finished = session.waitForNotification(timeoutMs, "Projekte geladen", (method, params) =>
|
|
51
|
-
method === "fsharp/notifyWorkspace"
|
|
52
|
-
&& contentOf(params).includes("\"workspaceLoad\"")
|
|
53
|
-
&& contentOf(params).includes("\"finished\""));
|
|
54
|
-
await session.request("fsharp/workspaceLoad", {
|
|
55
|
-
textDocuments: projects.map((project) => ({ uri: pathToFileURL(project).href })),
|
|
56
|
-
});
|
|
57
|
-
await finished;
|
|
58
|
-
return `${projects.length} F#-Projekt${projects.length === 1 ? "" : "e"} aus ${path.basename(root)} geladen`;
|
|
59
|
-
},
|
|
60
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LanguageServerAdapter } from "../host.js";
|
|
2
|
-
import { fsharpAdapter } from "./fsharp.js";
|
|
3
|
-
import { roslynAdapter } from "./roslyn.js";
|
|
4
|
-
import { typescriptAdapter } from "./typescript.js";
|
|
5
|
-
|
|
6
|
-
/** Jeder Executor bietet dieselbe Menge Sprachserver an; fehlt einer auf der Maschine, scheitert erst der Aufruf. */
|
|
7
|
-
export const workspaceLanguageServers: readonly LanguageServerAdapter[] = [roslynAdapter, fsharpAdapter, typescriptAdapter];
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { hostToolFile } from "../../tools.js";
|
|
5
|
-
import type { LanguageServerAdapter } from "../host.js";
|
|
6
|
-
import { dotnetCommand, resolveRootFile } from "../roots.js";
|
|
7
|
-
|
|
8
|
-
export const ROSLYN_SERVER_VARIABLE = "ROSLYN_LANGUAGE_SERVER";
|
|
9
|
-
export const ROSLYN_PLUGIN_ID = "ragents.lsp-roslyn";
|
|
10
|
-
export const ROSLYN_SERVER_FILE = "roslyn/Microsoft.CodeAnalysis.LanguageServer.dll";
|
|
11
|
-
|
|
12
|
-
const languages = { ".cs": "csharp" } as const;
|
|
13
|
-
|
|
14
|
-
const serverPath = (): string => {
|
|
15
|
-
const configured = process.env[ROSLYN_SERVER_VARIABLE];
|
|
16
|
-
if (configured) return configured;
|
|
17
|
-
const provisioned = hostToolFile(ROSLYN_PLUGIN_ID, ROSLYN_SERVER_FILE);
|
|
18
|
-
if (existsSync(provisioned)) return provisioned;
|
|
19
|
-
throw new Error("Microsoft.CodeAnalysis.LanguageServer gibt es auf diesem Rechner nicht: weder "
|
|
20
|
-
+ `${ROSLYN_SERVER_VARIABLE} gesetzt noch ${provisioned} vorhanden. Ein Arbeitsplatz holt ihn mit `
|
|
21
|
-
+ `pnpm provision --workspace, ein Server über pnpm provision <profil>; ${ROSLYN_SERVER_VARIABLE} übersteuert beides`);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const roslynAdapter: LanguageServerAdapter = {
|
|
25
|
-
id: "roslyn",
|
|
26
|
-
label: "Roslyn",
|
|
27
|
-
languages,
|
|
28
|
-
rootDescription: "the .sln file (or a single .csproj)",
|
|
29
|
-
solutionExtensions: [".sln", ".slnx"],
|
|
30
|
-
resolveRoot: (workspaceRoot, root) => resolveRootFile(workspaceRoot, root, [".sln", ".slnx", ".csproj"]),
|
|
31
|
-
rootDirectory: (root) => path.dirname(root),
|
|
32
|
-
launch: async (context, root) => ({
|
|
33
|
-
label: "Roslyn",
|
|
34
|
-
...dotnetCommand(serverPath(), [
|
|
35
|
-
"--stdio",
|
|
36
|
-
"--logLevel", "Warning",
|
|
37
|
-
"--extensionLogDirectory", path.join(context.logDirectory, "roslyn-logs"),
|
|
38
|
-
]),
|
|
39
|
-
cwd: path.dirname(root),
|
|
40
|
-
env: context.env,
|
|
41
|
-
uid: context.uid,
|
|
42
|
-
gid: context.gid,
|
|
43
|
-
rootUri: pathToFileURL(path.dirname(root)).href,
|
|
44
|
-
languages,
|
|
45
|
-
newFileSettleMs: 2_000,
|
|
46
|
-
}),
|
|
47
|
-
open: async (session, root, timeoutMs) => {
|
|
48
|
-
const uri = pathToFileURL(root).href;
|
|
49
|
-
const loaded = session.waitForNotification(timeoutMs, "Projekte geladen",
|
|
50
|
-
(method) => method === "workspace/projectInitializationComplete");
|
|
51
|
-
if (root.toLowerCase().endsWith(".csproj")) session.notify("project/open", { projects: [uri] });
|
|
52
|
-
else session.notify("solution/open", { solution: uri });
|
|
53
|
-
await loaded;
|
|
54
|
-
return `${path.basename(root)} geladen`;
|
|
55
|
-
},
|
|
56
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { stat } from "node:fs/promises";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
-
import type { LanguageServerAdapter } from "../host.js";
|
|
6
|
-
import { resolveRootDirectory } from "../roots.js";
|
|
7
|
-
|
|
8
|
-
const languages = {
|
|
9
|
-
".ts": "typescript",
|
|
10
|
-
".tsx": "typescriptreact",
|
|
11
|
-
".mts": "typescript",
|
|
12
|
-
".cts": "typescript",
|
|
13
|
-
".js": "javascript",
|
|
14
|
-
".jsx": "javascriptreact",
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
/** Der Sprachserver liegt in den node_modules des Hosts; ohne Host gibt es ihn auf dieser Maschine nicht. */
|
|
18
|
-
const hostRequire = (hostRoot: string | undefined): NodeRequire => {
|
|
19
|
-
if (!hostRoot) {
|
|
20
|
-
throw new Error("Für TypeScript ist auf diesem Rechner kein Host bekannt, aus dem sich typescript-language-server "
|
|
21
|
-
+ "auflösen ließe. Ein Arbeitsplatz bekommt ihn mit der ersten Verbindung zu einem verteilenden Server oder über "
|
|
22
|
-
+ "die Einstellung ragents.hostPath");
|
|
23
|
-
}
|
|
24
|
-
return createRequire(path.join(hostRoot, "package.json"));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const missing = (hostRoot: string | undefined, name: string, cause: unknown): Error =>
|
|
28
|
-
new Error(`${name} liegt nicht im Host ${hostRoot}: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
29
|
-
|
|
30
|
-
const serverScript = (hostRoot: string | undefined): string => {
|
|
31
|
-
const require = hostRequire(hostRoot);
|
|
32
|
-
try {
|
|
33
|
-
return require.resolve("typescript-language-server/lib/cli.mjs");
|
|
34
|
-
} catch (cause) {
|
|
35
|
-
throw missing(hostRoot, "typescript-language-server", cause);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const bundledTypeScriptLib = (hostRoot: string | undefined): string => {
|
|
40
|
-
const require = hostRequire(hostRoot);
|
|
41
|
-
try {
|
|
42
|
-
return path.dirname(require.resolve("typescript"));
|
|
43
|
-
} catch (cause) {
|
|
44
|
-
throw missing(hostRoot, "typescript", cause);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const hasWorkspaceTypeScript = (root: string): Promise<boolean> =>
|
|
49
|
-
stat(path.join(root, "node_modules", "typescript", "lib", "tsserver.js")).then((info) => info.isFile(), () => false);
|
|
50
|
-
|
|
51
|
-
export const typescriptAdapter: LanguageServerAdapter = {
|
|
52
|
-
id: "typescript",
|
|
53
|
-
label: "TypeScript",
|
|
54
|
-
languages,
|
|
55
|
-
rootDescription: "the directory whose tsconfig.json projects should be served (e.g. src)",
|
|
56
|
-
resolveRoot: resolveRootDirectory,
|
|
57
|
-
rootDirectory: (root) => root,
|
|
58
|
-
launch: async (context, root) => ({
|
|
59
|
-
label: "TypeScript",
|
|
60
|
-
command: process.execPath,
|
|
61
|
-
args: [serverScript(context.hostRoot), "--stdio"],
|
|
62
|
-
cwd: root,
|
|
63
|
-
// Im Extension-Host ist process.execPath Electron; ohne diese Variable startet es die Anwendung statt des Skripts.
|
|
64
|
-
env: { ...context.env, ELECTRON_RUN_AS_NODE: "1" },
|
|
65
|
-
uid: context.uid,
|
|
66
|
-
gid: context.gid,
|
|
67
|
-
rootUri: pathToFileURL(root).href,
|
|
68
|
-
initializationOptions: await hasWorkspaceTypeScript(root) ? {} : { tsserver: { path: bundledTypeScriptLib(context.hostRoot) } },
|
|
69
|
-
languages,
|
|
70
|
-
publishesOnlyChangedDiagnostics: true,
|
|
71
|
-
}),
|
|
72
|
-
open: async (_session, root) =>
|
|
73
|
-
`TypeScript-Server auf ${path.basename(root)} bereit; Projekte werden je Datei aus der nächsten tsconfig.json geladen`,
|
|
74
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
const PROJECT_LINE = /^Project\("\{[^}]+\}"\)\s*=\s*"[^"]*",\s*"([^"]+)"/gm;
|
|
5
|
-
|
|
6
|
-
export const solutionProjects = async (solutionFile: string): Promise<string[]> => {
|
|
7
|
-
const text = await readFile(solutionFile, "utf8");
|
|
8
|
-
const directory = path.dirname(solutionFile);
|
|
9
|
-
return [...text.matchAll(PROJECT_LINE)]
|
|
10
|
-
.map((match) => match[1].replaceAll("\\", "/"))
|
|
11
|
-
.filter((relative) => /\.[a-z]+proj$/i.test(relative))
|
|
12
|
-
.map((relative) => path.resolve(directory, relative));
|
|
13
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useAccess } from "@ragents/web/AccessContext";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { runActorFrom, runViewFrom } from "@ragents/web/run-view";
|
|
4
|
-
import type { CardSectionContext } from "@ragents/web/PluginRegistry";
|
|
5
|
-
import { SectionLabel } from "@ragents/web/ui";
|
|
6
|
-
import { askPayloadOf, ASK_PLUGIN_ID } from "../ask-payload";
|
|
7
|
-
import { answerQuestion } from "./api";
|
|
8
|
-
import { QuestionCard } from "./QuestionCard";
|
|
9
|
-
|
|
10
|
-
export function QuestionSection({ actor, session }: CardSectionContext) {
|
|
11
|
-
const access = useAccess();
|
|
12
|
-
const [error, setError] = useState<string>();
|
|
13
|
-
const view = runViewFrom(session.runView);
|
|
14
|
-
if (!view) return null;
|
|
15
|
-
const actorId = runActorFrom(actor).id;
|
|
16
|
-
const pending = view.actions.filter((action) =>
|
|
17
|
-
action.owner === ASK_PLUGIN_ID && (askPayloadOf(action.payload)?.recipient ?? action.askedBy) === actorId && action.status === "pending");
|
|
18
|
-
if (pending.length === 0) return null;
|
|
19
|
-
|
|
20
|
-
const answer = (actionId: string, text: string) => {
|
|
21
|
-
setError(undefined);
|
|
22
|
-
answerQuestion(session.session.id, actionId, text)
|
|
23
|
-
.catch((caught: unknown) => setError(caught instanceof Error ? caught.message : String(caught)));
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<section className="grid gap-1.5">
|
|
28
|
-
<SectionLabel>
|
|
29
|
-
<span>Rückfrage</span>
|
|
30
|
-
<small>{pending.length}</small>
|
|
31
|
-
</SectionLabel>
|
|
32
|
-
{pending.map((action) => {
|
|
33
|
-
const question = askPayloadOf(action.payload);
|
|
34
|
-
return question && (
|
|
35
|
-
<div className="rounded-lg animate-ring-pulse motion-reduce:animate-none" key={action.id}>
|
|
36
|
-
{action.description && <p className="mb-1.5 text-[0.7rem] leading-[1.35] text-muted-foreground">{action.description}</p>}
|
|
37
|
-
<QuestionCard
|
|
38
|
-
onAnswer={access.can("runs.write") ? (text) => answer(action.id, text) : undefined}
|
|
39
|
-
question={question}
|
|
40
|
-
text={action.title}
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
})}
|
|
45
|
-
{error && <p className="text-[0.7rem] text-destructive" role="alert">{error}</p>}
|
|
46
|
-
</section>
|
|
47
|
-
);
|
|
48
|
-
}
|
/package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/contract.ts
RENAMED
|
File without changes
|
/package/{packages/workspace-executor/src/browser → plugins/ragents.browser/executor}/pages.ts
RENAMED
|
File without changes
|