@schlenkr/ragents 0.1.0 → 0.1.2

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 (108) hide show
  1. package/README.md +10 -4
  2. package/apps/server/src/plugin-support/language-server/contract.ts +6 -1
  3. package/apps/server/src/plugin-support/language-server/tools.ts +29 -4
  4. package/apps/server/src/plugin-support/run-scripts.ts +4 -1
  5. package/apps/server/src/plugin-support/start-entries-contract.ts +4 -3
  6. package/apps/server/src/plugin-support/workspace-sandbox-host.ts +2 -0
  7. package/apps/server/src/profile-target.ts +25 -0
  8. package/apps/server/src/web-build.ts +82 -0
  9. package/apps/server/tsconfig.json +38 -0
  10. package/apps/web/column.html +12 -0
  11. package/apps/web/index.html +12 -0
  12. package/apps/web/src/App.tsx +0 -10
  13. package/apps/web/src/PluginChat.tsx +8 -8
  14. package/apps/web/src/PluginRegistry.tsx +0 -12
  15. package/apps/web/src/StartSurface.tsx +2 -2
  16. package/apps/web/src/ThemeSettings.tsx +1 -1
  17. package/apps/web/src/column/ColumnApp.tsx +83 -7
  18. package/apps/web/src/column/clipboard.ts +64 -0
  19. package/apps/web/src/column/host-contract.ts +10 -0
  20. package/apps/web/src/column.tsx +2 -0
  21. package/apps/web/src/panel/LoginForm.tsx +9 -3
  22. package/apps/web/src/panel/OverviewPage.tsx +187 -62
  23. package/apps/web/src/panel/PanelDialogs.tsx +115 -0
  24. package/apps/web/src/panel/PanelPage.tsx +1 -1
  25. package/apps/web/src/panel/SettingsPage.tsx +75 -79
  26. package/apps/web/src/panel/contract.ts +17 -9
  27. package/apps/web/src/panel/target-state.ts +27 -2
  28. package/apps/web/src/ui/theme.css +4 -0
  29. package/apps/web/tsconfig.json +41 -0
  30. package/apps/web/vite.config.ts +140 -0
  31. package/package.json +6 -2
  32. package/packages/ragents/src/plugin-host.ts +5 -2
  33. package/packages/ragents/src/plugin-types.ts +3 -2
  34. package/packages/workspace-executor/src/context.ts +4 -0
  35. package/packages/workspace-executor/src/executor.ts +9 -2
  36. package/packages/workspace-executor/src/index.ts +2 -0
  37. package/packages/workspace-executor/src/language-server/adapters/fsharp.ts +1 -0
  38. package/packages/workspace-executor/src/language-server/adapters/roslyn.ts +1 -0
  39. package/packages/workspace-executor/src/language-server/adapters/typescript.ts +34 -6
  40. package/packages/workspace-executor/src/language-server/contract.ts +7 -3
  41. package/packages/workspace-executor/src/language-server/host.ts +275 -138
  42. package/plugins/ragents.actor-programs/contract.ts +1 -1
  43. package/plugins/ragents.actor-programs/prompt.hbs +4 -4
  44. package/plugins/ragents.actor-programs/server/app-project.ts +0 -2
  45. package/plugins/ragents.actor-programs/server/runtime.ts +1 -1
  46. package/plugins/ragents.actor-programs/web/AppsPanel.tsx +3 -5
  47. package/plugins/ragents.actor-programs/web/EmbeddedApps.tsx +7 -39
  48. package/plugins/ragents.actor-programs/web/api.ts +1 -10
  49. package/plugins/ragents.lsp-roslyn/web/language-server-plugin.tsx +73 -44
  50. package/plugins/ragents.orchestration/canvas.hbs +28 -44
  51. package/plugins/ragents.orchestration/contract.ts +17 -287
  52. package/plugins/ragents.orchestration/server/canvas-tool.ts +18 -123
  53. package/plugins/ragents.orchestration/tiled-layout.ts +12 -4
  54. package/plugins/ragents.orchestration/web/ActorCanvasControls.tsx +23 -47
  55. package/plugins/ragents.orchestration/web/ActorChatPreview.tsx +3 -9
  56. package/plugins/ragents.orchestration/web/ActorShortcut.tsx +3 -5
  57. package/plugins/ragents.orchestration/web/ActorTile.tsx +3 -2
  58. package/plugins/ragents.orchestration/web/CanvasTiles.tsx +3 -3
  59. package/plugins/ragents.orchestration/web/Center.tsx +28 -463
  60. package/plugins/ragents.orchestration/web/MaterialBody.tsx +6 -87
  61. package/plugins/ragents.orchestration/web/TiledCanvas.tsx +2 -3
  62. package/plugins/ragents.orchestration/web/canvas-view-settings.ts +7 -13
  63. package/plugins/ragents.orchestration/web/column/RunColumn.tsx +44 -19
  64. package/plugins/ragents.orchestration/web/column/column-state.ts +13 -4
  65. package/plugins/ragents.orchestration/web/constants.ts +0 -2
  66. package/plugins/ragents.orchestration/web/index.tsx +0 -6
  67. package/plugins/ragents.orchestration/web/tile-docking.ts +7 -1
  68. package/plugins/ragents.orchestration/web/tiled-view-settings.ts +7 -9
  69. package/plugins/ragents.overseer/server/coordinator-prompt.ts +1 -1
  70. package/plugins/ragents.profile-distribution/server/web.ts +3 -27
  71. package/plugins/ragents.reference/examples.ts +1 -2
  72. package/plugins/ragents.reference/run-scripts/balcony-wizard/RUN.md +1 -1
  73. package/plugins/ragents.reference/run-scripts/balcony-wizard/actors/balcony-app/package.json +1 -1
  74. package/plugins/ragents.reference/run-scripts/balcony-wizard/src/server.ts +1 -1
  75. package/plugins/ragents.reference/run-scripts/balcony-wizard/tests/program.test.ts +2 -2
  76. package/plugins/ragents.reference/run-scripts/conversation-circle/RUN.md +3 -4
  77. package/plugins/ragents.reference/run-scripts/conversation-circle/src/server.ts +9 -15
  78. package/plugins/ragents.reference/run-scripts/conversation-circle/tests/program.test.ts +5 -3
  79. package/plugins/ragents.reference/run-scripts/learning-afternoon/package.json +1 -1
  80. package/plugins/ragents.reference/run-scripts/learning-afternoon/src/server.ts +14 -4
  81. package/plugins/ragents.reference/run-scripts/word-game/src/server.ts +1 -1
  82. package/plugins/ragents.reference/skills/210-moderator-handover/SKILL.md +1 -1
  83. package/plugins/ragents.reference/walkthroughs.ts +14 -14
  84. package/plugins/ragents.workspace/client/workspace-client.ts +4 -1
  85. package/scripts/agent/agent-cli.ts +9 -24
  86. package/scripts/package/build-package.ts +18 -5
  87. package/scripts/package/publish-package.ts +24 -10
  88. package/scripts/package/ragents.mjs +3 -2
  89. package/scripts/remote/connect.ts +16 -5
  90. package/scripts/remote/start.ts +33 -15
  91. package/scripts/workspace-client/run-workspace-client.ts +3 -1
  92. package/apps/web/src/MaterialSettings.tsx +0 -40
  93. package/apps/web/src/material-settings.ts +0 -104
  94. package/plugins/ragents.orchestration/web/ActorNet.tsx +0 -607
  95. package/plugins/ragents.orchestration/web/CardSizeSettings.tsx +0 -42
  96. package/plugins/ragents.orchestration/web/ScriptActorCard.tsx +0 -56
  97. package/plugins/ragents.orchestration/web/ZoomSettings.tsx +0 -38
  98. package/plugins/ragents.orchestration/web/canvas-layout-storage.ts +0 -39
  99. package/plugins/ragents.orchestration/web/canvas-layout.ts +0 -326
  100. package/plugins/ragents.orchestration/web/canvas-scene.ts +0 -311
  101. package/plugins/ragents.orchestration/web/card-size-settings.ts +0 -36
  102. package/plugins/ragents.orchestration/web/keyboard-navigation.ts +0 -55
  103. package/plugins/ragents.orchestration/web/material-layout.ts +0 -14
  104. package/plugins/ragents.orchestration/web/useCanvasMeasurements.ts +0 -78
  105. package/plugins/ragents.orchestration/web/zoom-settings.ts +0 -28
  106. package/plugins/ragents.reference/skills/120-canvas-conversation-circle/SKILL.md +0 -12
  107. package/plugins/ragents.reference/skills/130-canvas-pipeline-with-approval/SKILL.md +0 -12
  108. package/plugins/ragents.reference/skills/140-canvas-team-tree-and-topic-grid/SKILL.md +0 -12
@@ -1,104 +0,0 @@
1
- import { useSyncExternalStore } from "react";
2
- import { subscribeStorageChanges } from "./lib/local-storage-setting";
3
-
4
- export interface MaterialSettings {
5
- steps: number;
6
- }
7
-
8
- export const DEFAULT_MATERIAL_SETTINGS: MaterialSettings = Object.freeze({ steps: 1 });
9
- export const MATERIAL_SETTINGS_LIMITS = { minSteps: 0, maxSteps: 5 };
10
- export const MATERIAL_DEPTH_PER_STEP = 12;
11
- export const MATERIAL_SETTINGS_STORAGE_KEY = "ragents.material-settings";
12
-
13
- interface MaterialSettingsSnapshot {
14
- settings: MaterialSettings;
15
- error?: string;
16
- }
17
-
18
- export function parseMaterialSettings(raw: string | null): MaterialSettings {
19
- if (raw === null) return DEFAULT_MATERIAL_SETTINGS;
20
- const value: unknown = JSON.parse(raw);
21
- if (!value || typeof value !== "object" || !("steps" in value)
22
- || typeof value.steps !== "number" || !Number.isInteger(value.steps) || value.steps < MATERIAL_SETTINGS_LIMITS.minSteps || value.steps > MATERIAL_SETTINGS_LIMITS.maxSteps) {
23
- throw new Error("Ungültiges Material: Tiefenstufen müssen eine ganze Zahl von 0 bis 5 sein. Bitte die Materialeinstellungen zurücksetzen.");
24
- }
25
- return Object.freeze({ steps: value.steps });
26
- }
27
-
28
- const errorMessage = (cause: unknown) => cause instanceof Error ? cause.message : String(cause);
29
- const serverSnapshot: MaterialSettingsSnapshot = { settings: DEFAULT_MATERIAL_SETTINGS };
30
- const getServerSnapshot = () => serverSnapshot;
31
- const subscribeServer = () => () => {};
32
-
33
- export function createMaterialSettingsStore(browser: Window) {
34
- let snapshot: MaterialSettingsSnapshot;
35
- try {
36
- snapshot = { settings: parseMaterialSettings(browser.localStorage.getItem(MATERIAL_SETTINGS_STORAGE_KEY)) };
37
- } catch (cause) {
38
- snapshot = { settings: DEFAULT_MATERIAL_SETTINGS, error: `Das gespeicherte Material konnte nicht geladen werden. Die Standardwerte werden angezeigt. ${errorMessage(cause)}` };
39
- }
40
- const listeners = new Set<() => void>();
41
- let disposed = false;
42
- const publish = (next: MaterialSettingsSnapshot) => {
43
- if (snapshot.settings.steps === next.settings.steps && snapshot.error === next.error) return;
44
- snapshot = next;
45
- for (const listener of listeners) listener();
46
- };
47
- const report = (message: string) => publish({ ...snapshot, error: message });
48
- const storageChanged = (event: StorageEvent) => {
49
- try {
50
- const storage = browser.localStorage;
51
- if (event.storageArea !== storage) return;
52
- publish({ settings: parseMaterialSettings(storage.getItem(MATERIAL_SETTINGS_STORAGE_KEY)) });
53
- } catch (cause) {
54
- report(`Das Material aus einem anderen Browser-Tab konnte nicht übernommen werden. ${errorMessage(cause)}`);
55
- }
56
- };
57
- const unsubscribeStorage = subscribeStorageChanges(browser, (key) => key === MATERIAL_SETTINGS_STORAGE_KEY, storageChanged);
58
- return {
59
- getSnapshot: () => snapshot,
60
- subscribe(listener: () => void) {
61
- if (disposed) throw new Error("Die Materialeinstellungen wurden bereits beendet.");
62
- listeners.add(listener);
63
- return () => { listeners.delete(listener); };
64
- },
65
- save(settings: MaterialSettings) {
66
- if (disposed) throw new Error("Die Materialeinstellungen wurden bereits beendet.");
67
- try {
68
- const next = parseMaterialSettings(JSON.stringify(settings));
69
- browser.localStorage.setItem(MATERIAL_SETTINGS_STORAGE_KEY, JSON.stringify(next));
70
- publish({ settings: next });
71
- } catch (cause) {
72
- report(`Das Material konnte nicht gespeichert werden. ${errorMessage(cause)}`);
73
- }
74
- },
75
- reset() {
76
- if (disposed) throw new Error("Die Materialeinstellungen wurden bereits beendet.");
77
- try {
78
- browser.localStorage.removeItem(MATERIAL_SETTINGS_STORAGE_KEY);
79
- publish({ settings: DEFAULT_MATERIAL_SETTINGS });
80
- return true;
81
- } catch (cause) {
82
- report(`Das Material konnte nicht zurückgesetzt werden. ${errorMessage(cause)}`);
83
- return false;
84
- }
85
- },
86
- dispose() {
87
- if (disposed) return;
88
- disposed = true;
89
- unsubscribeStorage();
90
- listeners.clear();
91
- },
92
- };
93
- }
94
-
95
- let activeStore: ReturnType<typeof createMaterialSettingsStore> | undefined;
96
- const materialSettingsStore = () => activeStore ??= createMaterialSettingsStore(window);
97
-
98
- export function useMaterialSettings(): MaterialSettingsSnapshot {
99
- const store = typeof window === "undefined" ? undefined : materialSettingsStore();
100
- return useSyncExternalStore(store?.subscribe ?? subscribeServer, store?.getSnapshot ?? getServerSnapshot, getServerSnapshot);
101
- }
102
-
103
- export const saveMaterialSettings = (settings: MaterialSettings): void => materialSettingsStore().save(settings);
104
- export const resetMaterialSettings = (): boolean => materialSettingsStore().reset();