@datalayer/agent-runtimes 1.3.30 → 1.3.32

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 (79) hide show
  1. package/lib/chat/ChatFloating.js +40 -8
  2. package/lib/chat/assistant/AssistantStage.d.ts +26 -7
  3. package/lib/chat/assistant/AssistantStage.js +115 -8
  4. package/lib/chat/assistant/SpeechBalloon.js +7 -3
  5. package/lib/chat/assistant/characters.d.ts +32 -1
  6. package/lib/chat/assistant/characters.js +180 -15
  7. package/lib/chat/assistant/state.d.ts +28 -0
  8. package/lib/chat/assistant/state.js +31 -0
  9. package/lib/chat/base/ChatBase.js +34 -19
  10. package/lib/chat/base/modelChoice.d.ts +27 -1
  11. package/lib/chat/base/modelChoice.js +29 -15
  12. package/lib/chat/prompt/InputPrompt.d.ts +7 -1
  13. package/lib/chat/prompt/InputPrompt.js +2 -2
  14. package/lib/chat/prompt/InputPromptBase.js +1 -1
  15. package/lib/chat/prompt/menus/ModelSelector.d.ts +13 -1
  16. package/lib/chat/prompt/menus/ModelSelector.js +17 -5
  17. package/lib/chat/useViewportDrag.d.ts +9 -1
  18. package/lib/chat/useViewportDrag.js +4 -4
  19. package/lib/components/a2ui/index.d.ts +2 -0
  20. package/lib/components/a2ui/index.js +2 -0
  21. package/lib/components/a2ui/visibility.d.ts +15 -0
  22. package/lib/components/a2ui/visibility.js +24 -0
  23. package/lib/components/a2ui/visibleWhen.d.ts +17 -0
  24. package/lib/components/a2ui/visibleWhen.js +54 -0
  25. package/lib/examples/ChatAssistantExample.d.ts +4 -0
  26. package/lib/examples/ChatAssistantExample.js +26 -5
  27. package/lib/examples/utils/owlCharacterPlugin.d.ts +7 -0
  28. package/lib/examples/utils/owlCharacterPlugin.js +44 -0
  29. package/lib/loop/apps/AppFeedback.d.ts +27 -0
  30. package/lib/loop/apps/AppFeedback.js +78 -0
  31. package/lib/loop/apps/AppRenderer.js +17 -2
  32. package/lib/loop/apps/appspec.js +6 -3
  33. package/lib/loop/apps/checks.d.ts +10 -2
  34. package/lib/loop/apps/checks.js +21 -10
  35. package/lib/loop/apps/feedback.d.ts +51 -0
  36. package/lib/loop/apps/feedback.js +61 -0
  37. package/lib/loop/apps/index.d.ts +2 -0
  38. package/lib/loop/apps/index.js +2 -0
  39. package/lib/loop/apps/rules.d.ts +14 -0
  40. package/lib/loop/apps/rules.js +24 -0
  41. package/lib/loop/core/canvasBlocks.d.ts +16 -0
  42. package/lib/loop/core/canvasBlocks.js +13 -0
  43. package/lib/loop/core/index.d.ts +7 -0
  44. package/lib/loop/core/index.js +3 -0
  45. package/lib/loop/index.d.ts +1 -1
  46. package/lib/loop/plugins/a2ui/A2uiView.js +2 -3
  47. package/lib/loop/plugins/a2ui-surface/InlineSurface.d.ts +4 -2
  48. package/lib/loop/plugins/a2ui-surface/InlineSurface.js +3 -4
  49. package/lib/loop/plugins/app-page/AppPage.js +1 -1
  50. package/lib/loop/plugins/app-page/{appPage.d.ts → appPageModel.d.ts} +1 -1
  51. package/lib/loop/plugins/app-page/index.d.ts +1 -1
  52. package/lib/loop/plugins/app-page/index.js +2 -2
  53. package/lib/loop/plugins/canvas-blocks/index.d.ts +63 -0
  54. package/lib/loop/plugins/canvas-blocks/index.js +118 -0
  55. package/lib/loop/plugins/chat/ChatView.js +7 -3
  56. package/lib/loop/plugins/chat/turnState.d.ts +5 -2
  57. package/lib/loop/plugins/chat/turnState.js +2 -1
  58. package/lib/specs/actions.js +1 -0
  59. package/lib/specs/agents/agents.js +16 -4
  60. package/lib/specs/apps.js +21 -10
  61. package/lib/specs/appspecSchema.js +13 -7
  62. package/lib/specs/models.d.ts +1 -1
  63. package/lib/specs/models.js +8 -8
  64. package/lib/specs/tools.d.ts +1 -0
  65. package/lib/specs/tools.js +19 -0
  66. package/lib/stories/loop/LoopReference.stories.d.ts +21 -0
  67. package/lib/stories/loop/LoopReference.stories.js +31 -0
  68. package/lib/stories/loop/ReferenceScreens.d.ts +53 -0
  69. package/lib/stories/loop/ReferenceScreens.js +256 -0
  70. package/lib/stories/loop/pictures-main.d.ts +1 -0
  71. package/lib/stories/loop/pictures-main.js +64 -0
  72. package/lib/types/agentspecs.d.ts +6 -1
  73. package/lib/types/chat.d.ts +5 -0
  74. package/lib/types/config.d.ts +8 -0
  75. package/package.json +9 -6
  76. package/scripts/check-cloudflare-models.py +2 -2
  77. package/scripts/codegen/generate_apps.py +2 -1
  78. package/scripts/codegen/generate_models.py +4 -4
  79. /package/lib/loop/plugins/app-page/{appPage.js → appPageModel.js} +0 -0
@@ -58,6 +58,14 @@ export interface RemoteConfig {
58
58
  modelsSource?: 'ai-inference' | 'local';
59
59
  /** That decision in a sentence. */
60
60
  modelsNote?: string;
61
+ /**
62
+ * The typed-decision models ai-inference serves (Jev), apart from `models`:
63
+ * a decision asks them, no agent runs on them, so they are never offered
64
+ * as the agent's model.
65
+ */
66
+ decisionModels: ModelConfig[];
67
+ /** What a typed-decision model is for, in a sentence. */
68
+ decisionsNote: string;
61
69
  defaultModel?: string;
62
70
  builtinTools: BuiltinTool[];
63
71
  mcpServers?: MCPServerConfig[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.3.30",
3
+ "version": "1.3.32",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -118,6 +118,8 @@
118
118
  "test:all": "vitest run",
119
119
  "test:coverage": "vitest run --coverage --project=unit --project=general",
120
120
  "test:integration": "vitest run --project=integration",
121
+ "test:pictures": "playwright test -c pictures/playwright.config.ts",
122
+ "test:pictures:accept": "playwright test -c pictures/playwright.config.ts --update-snapshots=changed",
121
123
  "test:ui": "vitest --ui --project=unit --project=general",
122
124
  "test:unit": "vitest run --project=unit",
123
125
  "test:watch": "vitest --project=unit --project=general",
@@ -131,9 +133,9 @@
131
133
  },
132
134
  "dependencies": {
133
135
  "@a2a-js/sdk": "^0.3.6",
134
- "@a2ui/markdown-it": "0.1.1",
135
- "@a2ui/react": "0.11.0",
136
- "@a2ui/web_core": "0.10.7",
136
+ "@a2ui/markdown-it": "0.2.0",
137
+ "@a2ui/react": "0.12.0",
138
+ "@a2ui/web_core": "0.12.0",
137
139
  "@ag-ui/client": "^0.0.42",
138
140
  "@ag-ui/core": "^0.0.57",
139
141
  "@ag-ui/encoder": "^0.0.57",
@@ -276,6 +278,7 @@
276
278
  "@copilotkit/runtime": "1.10.6",
277
279
  "@datalayer/reactor-graph": "^1.0.4",
278
280
  "@eslint/js": "^10.0.1",
281
+ "@playwright/test": "^1.63.0",
279
282
  "@storybook/addon-a11y": "^9.1.1",
280
283
  "@storybook/addon-docs": "^9.1.1",
281
284
  "@storybook/addon-onboarding": "^9.1.1",
@@ -329,7 +332,7 @@
329
332
  "vitest": "^3.2.4"
330
333
  },
331
334
  "resolutions": {
332
- "@a2ui/web_core": "0.10.7",
335
+ "@a2ui/web_core": "0.12.0",
333
336
  "@langchain/core": "^0.3.80",
334
337
  "@ai-sdk/react": "4.0.93",
335
338
  "@microsoft/fast-colors": "5.3.1",
@@ -348,7 +351,7 @@
348
351
  "typescript": "5.9.3"
349
352
  },
350
353
  "overrides": {
351
- "@a2ui/web_core": "0.10.7",
354
+ "@a2ui/web_core": "0.12.0",
352
355
  "@langchain/core": "^0.3.80",
353
356
  "@ai-sdk/react": "4.0.93",
354
357
  "@microsoft/fast-colors": "5.3.1",
@@ -69,14 +69,14 @@ def served(account: str, token: str) -> dict[str, dict]:
69
69
  def specs() -> list[dict]:
70
70
  """The Workers AI specs (``cloudflare-wrk-*.yaml``) that name a model Cloudflare
71
71
  hosts under ``@cf/``. The gateway flavour (``cloudflare-gtw-*``) and the typed
72
- judgment models (``typesafe/jev``, with no ``@cf/`` namespace) are not in the
72
+ decision models (``typesafe/jev``, with no ``@cf/`` namespace) are not in the
73
73
  account's model listing and are left out.
74
74
  """
75
75
  found = []
76
76
  for path in sorted(SPECS.glob("cloudflare-wrk-*.yaml")):
77
77
  with open(path) as handle:
78
78
  data = yaml.safe_load(handle) or {}
79
- if "judgments" in (data.get("capabilities") or []):
79
+ if "decisions" in (data.get("capabilities") or []):
80
80
  continue
81
81
  found.append({"file": path.name, **data})
82
82
  return found
@@ -47,10 +47,11 @@ CAMEL = {
47
47
  "ready_at": "readyAt",
48
48
  "keep_for": "keepFor",
49
49
  "retention_days": "retentionDays",
50
+ "suggest_tests": "suggestTests",
50
51
  "composed_by": "composedBy",
51
52
  "composed_at": "composedAt",
52
53
  "min_confidence": "minConfidence",
53
- "judgment_model": "judgmentModel",
54
+ "decision_model": "decisionModel",
54
55
  }
55
56
 
56
57
  #: The keys whose value is carried as it is written: a component tree, weights by name.
@@ -327,11 +327,11 @@ def generate_python_code(specs: list[dict[str, Any]]) -> str:
327
327
  "",
328
328
  "",
329
329
  "def is_chat_model(model: AIModel) -> bool:",
330
- ' """A model a chat can run on: not a typed-judgment model (Jev), which',
330
+ ' """A model a chat can run on: not a typed-decision model (Jev), which',
331
331
  " answers typed questions about a state and nothing else. A spec that",
332
332
  " states no capability is read as a chat model.",
333
333
  ' """',
334
- ' return "judgments" not in model.capabilities',
334
+ ' return "decisions" not in model.capabilities',
335
335
  "",
336
336
  "",
337
337
  "def list_chat_models() -> list[AIModel]:",
@@ -504,12 +504,12 @@ def generate_typescript_code(specs: list[dict[str, Any]]) -> str:
504
504
  "}",
505
505
  "",
506
506
  "/**",
507
- " * A model a chat can run on: not a typed-judgment model (Jev), which",
507
+ " * A model a chat can run on: not a typed-decision model (Jev), which",
508
508
  " * answers typed questions about a state and nothing else. A spec that",
509
509
  " * states no capability is read as a chat model.",
510
510
  " */",
511
511
  "export function isChatModel(model: AIModel): boolean {",
512
- " return !(model.capabilities ?? []).includes('judgments');",
512
+ " return !(model.capabilities ?? []).includes('decisions');",
513
513
  "}",
514
514
  "",
515
515
  "/** The models a person choosing a chat model is offered from. */",