@k2b/cloud 0.25.0 → 0.27.0

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 (93) hide show
  1. package/package.json +3 -3
  2. package/src/_internal/capabilities.ts +12 -0
  3. package/src/_internal/define-app.ts +8 -1
  4. package/src/_internal/process-identity.ts +7 -1
  5. package/src/_internal/registry-validation.ts +3 -0
  6. package/src/_internal/registry.ts +1 -0
  7. package/src/_internal/runtime-context.ts +1 -0
  8. package/src/access/GroupCoverage.tsx +175 -0
  9. package/src/access/PermissionEditor.tsx +119 -99
  10. package/src/access/messages.ts +30 -0
  11. package/src/ai/admin.ts +1 -0
  12. package/src/ai/approval-routes.ts +5 -5
  13. package/src/ai/browser-code-contracts.ts +14 -2
  14. package/src/ai/browser.ts +8 -1
  15. package/src/ai/capabilities.ts +115 -33
  16. package/src/ai/chat/blocks.tsx +86 -179
  17. package/src/ai/chat/builtin-tools.tsx +83 -48
  18. package/src/ai/chat/file-tools.tsx +4 -1
  19. package/src/ai/chat/live-turn.browser-harness.tsx +44 -0
  20. package/src/ai/chat/message-actions.tsx +6 -2
  21. package/src/ai/chat/message-utils.ts +17 -14
  22. package/src/ai/chat/messages.ts +330 -2
  23. package/src/ai/chat/presentation.tsx +278 -104
  24. package/src/ai/chat/tool-groups.ts +55 -35
  25. package/src/ai/chat/turn-layout.ts +141 -0
  26. package/src/ai/chat/turn-view.tsx +644 -0
  27. package/src/ai/client/controller.ts +60 -31
  28. package/src/ai/client/file-source.ts +20 -3
  29. package/src/ai/client/projection.ts +42 -6
  30. package/src/ai/code-mode-skill.ts +27 -27
  31. package/src/ai/code-runtime-tools.ts +10 -1
  32. package/src/ai/code-source-contracts.ts +54 -4
  33. package/src/ai/code-source-tools.ts +10 -3
  34. package/src/ai/credentials.ts +17 -3
  35. package/src/ai/data-analysis-skill.ts +2 -2
  36. package/src/ai/default-tools.ts +2 -2
  37. package/src/ai/executor.ts +177 -80
  38. package/src/ai/file-context.ts +14 -2
  39. package/src/ai/file-tools.ts +17 -3
  40. package/src/ai/files-store.ts +134 -11
  41. package/src/ai/grids-skill.ts +2 -2
  42. package/src/ai/index.ts +7 -0
  43. package/src/ai/memories.ts +14 -0
  44. package/src/ai/migrate.ts +125 -0
  45. package/src/ai/model-request-settings.ts +98 -0
  46. package/src/ai/protocol.ts +26 -4
  47. package/src/ai/provider-fetch.ts +67 -15
  48. package/src/ai/provider-retry.ts +105 -0
  49. package/src/ai/provider.ts +7 -1
  50. package/src/ai/quota-provider.ts +16 -7
  51. package/src/ai/request-headers.ts +117 -0
  52. package/src/ai/routes.ts +34 -6
  53. package/src/ai/runtime.ts +1 -1
  54. package/src/ai/settings.ts +19 -2
  55. package/src/ai/skill-seeds.ts +31 -3
  56. package/src/ai/skills.ts +26 -0
  57. package/src/ai/solid.ts +1 -1
  58. package/src/ai/store.ts +202 -59
  59. package/src/ai/stream.ts +182 -37
  60. package/src/ai/structured.ts +20 -5
  61. package/src/ai/system-prompt.ts +25 -0
  62. package/src/ai/timeline.ts +9 -11
  63. package/src/ai/tool-call-names.ts +45 -0
  64. package/src/ai/turn-policy.ts +247 -0
  65. package/src/ai/turn-timing.ts +31 -3
  66. package/src/ai/types.ts +36 -5
  67. package/src/api/admin-ai-quotas.ts +36 -1
  68. package/src/api/admin-core-settings.ts +16 -23
  69. package/src/api/admin-outgoing-mail.ts +62 -0
  70. package/src/api/index.ts +2 -0
  71. package/src/cli/admin/ai-quotas.ts +70 -1
  72. package/src/cli/admin/index.ts +6 -0
  73. package/src/cli/admin/outgoing-mail.ts +118 -0
  74. package/src/contracts/app.ts +2 -0
  75. package/src/contracts/index.ts +1 -0
  76. package/src/contracts/outgoing-mail.ts +77 -0
  77. package/src/contracts/registry.ts +4 -0
  78. package/src/services/index.ts +3 -0
  79. package/src/services/notifications/email.ts +16 -26
  80. package/src/services/outgoing-mail/index.ts +19 -0
  81. package/src/services/outgoing-mail/store.ts +286 -0
  82. package/src/services/outgoing-mail/test-send.ts +40 -0
  83. package/src/services/outgoing-mail/transport.ts +13 -0
  84. package/src/services/settings/core-settings.ts +1 -38
  85. package/src/services/settings/store.ts +5 -1
  86. package/src/shared/ai-model-request-settings.ts +21 -0
  87. package/src/shared/ai-platform-prompt.ts +1 -1
  88. package/src/shared/ai-request-options.ts +185 -0
  89. package/src/shared/app-presentation.ts +10 -2
  90. package/src/ssr/admin-navigation.ts +1 -1
  91. package/src/ssr/platform-messages.ts +2 -0
  92. package/src/ssr/workspace-navigation.ts +7 -1
  93. package/src/styles/effects.css +69 -0
@@ -22,6 +22,7 @@ export const platformMessages = i18n.define({
22
22
  linuxAccess: "Linux identities",
23
23
  pdfRendering: "PDF rendering",
24
24
  emailTemplates: "Email templates",
25
+ outgoingMail: "Outgoing mail",
25
26
  security: "Security",
26
27
  legal: "Legal",
27
28
  providers: "Providers",
@@ -90,6 +91,7 @@ export const platformMessages = i18n.define({
90
91
  linuxAccess: "Linux-Identitäten",
91
92
  pdfRendering: "PDF-Erstellung",
92
93
  emailTemplates: "E-Mail-Vorlagen",
94
+ outgoingMail: "Ausgehende Mail",
93
95
  security: "Sicherheit",
94
96
  legal: "Rechtliches",
95
97
  providers: "Anbieter",
@@ -35,7 +35,11 @@ function validItems(value: unknown): value is NavigationItem[] {
35
35
  if (!entry || typeof entry !== "object" || typeof entry.id !== "string" || typeof entry.label !== "string") return false;
36
36
  if (entry.href !== undefined && typeof entry.href !== "string") return false;
37
37
  if (entry.action !== undefined && typeof entry.action !== "string") return false;
38
- return (entry.children === undefined || validItems(entry.children)) && (entry.actions === undefined || validItems(entry.actions));
38
+ return (
39
+ (entry.children === undefined || validItems(entry.children)) &&
40
+ (entry.actions === undefined || validItems(entry.actions)) &&
41
+ (entry.inlineActions === undefined || validItems(entry.inlineActions))
42
+ );
39
43
  })
40
44
  );
41
45
  }
@@ -59,6 +63,8 @@ export function readWorkspaceNavigation(): WorkspaceNavigationState | undefined
59
63
  ...(item.expanded !== undefined ? { expanded: undefined, defaultExpanded: item.expanded } : {}),
60
64
  ...(item.children ? { children: links(item.children) } : {}),
61
65
  ...(item.actions ? { actions: links(item.actions) } : {}),
66
+ // Inline actions only run actions, so each waits for the owner.
67
+ ...(item.inlineActions ? { inlineActions: item.inlineActions.map((action) => ({ ...action, disabled: true })) } : {}),
62
68
  }));
63
69
  const items = links(value.items);
64
70
  return {
@@ -27,6 +27,75 @@
27
27
  max-width: 100%;
28
28
  }
29
29
 
30
+ /* One assistant turn in four fixed places: work line, results, newest text, actions. */
31
+ .k2b-ui .ai-turn {
32
+ display: flex;
33
+ min-width: 0;
34
+ flex-direction: column;
35
+ gap: 0.5rem;
36
+ }
37
+
38
+ .k2b-ui .ai-turn__work {
39
+ min-width: 0;
40
+ }
41
+
42
+ .k2b-ui .ai-turn-work__meta {
43
+ font-variant-numeric: tabular-nums;
44
+ white-space: nowrap;
45
+ }
46
+
47
+ /* Phones keep the clock while the turn runs; the step count follows once it is finished. */
48
+ @media (max-width: 40rem) {
49
+ .k2b-ui .ai-turn-work__live-steps {
50
+ display: none;
51
+ }
52
+ }
53
+
54
+ /* Expanded work: one indent, one size, no lines or boxes; intermediate texts are quiet paragraphs. */
55
+ .k2b-ui .ai-turn-steps {
56
+ display: flex;
57
+ min-width: 0;
58
+ flex-direction: column;
59
+ }
60
+
61
+ .k2b-ui .ai-turn-steps__text {
62
+ padding-block: 0.25rem;
63
+ color: var(--k2b-text-muted);
64
+ }
65
+
66
+ .k2b-ui .ai-turn-steps__text .assistant-markdown-block,
67
+ .k2b-ui .ai-turn-steps__text .assistant-markdown-block :where(h1, h2, h3, h4, h5, h6) {
68
+ color: inherit;
69
+ font-size: 0.75rem;
70
+ line-height: 1.55;
71
+ }
72
+
73
+ .k2b-ui .ai-turn-steps__text .assistant-markdown-block :where(p, ul, ol, pre, blockquote) {
74
+ margin-block: 0.375rem;
75
+ }
76
+
77
+ .k2b-ui .ai-turn-steps__thought {
78
+ margin: 0;
79
+ color: var(--k2b-text-muted);
80
+ white-space: pre-wrap;
81
+ overflow-wrap: anywhere;
82
+ }
83
+
84
+ /* A decided approval keeps focus on its receipt; the place only shows a ring for keyboard focus. */
85
+ .k2b-ui .ai-turn__action {
86
+ min-width: 0;
87
+ border-radius: var(--k2b-radius-control);
88
+ }
89
+
90
+ .k2b-ui .ai-turn__action:focus {
91
+ outline: none;
92
+ }
93
+
94
+ .k2b-ui .ai-turn__action:focus-visible {
95
+ outline: var(--k2b-focus-width) solid var(--k2b-focus-ring);
96
+ outline-offset: var(--k2b-focus-offset);
97
+ }
98
+
30
99
  /* Result links sit inside an already padded activity row. Keep them inline so
31
100
  they do not make linked capability results taller than neighboring rows. */
32
101
  .k2b-ui .k2b-button.ai-chat-result-link[data-size="xs"] {