@almadar/std 16.242.0 → 16.244.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.
- package/behaviors/behaviors-registry.json +4470 -513
- package/behaviors/lolo/agent/atoms/std-agent-context.lolo +24 -4
- package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +20 -5
- package/behaviors/lolo/agent/atoms/std-agent-proposal.lolo +550 -0
- package/behaviors/lolo/agent/atoms/std-agent-session.lolo +284 -25
- package/behaviors/lolo/agent/atoms/std-agent-suggestions.lolo +841 -0
- package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +58 -8
- package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +1 -0
- package/behaviors/lolo/infra/atoms/std-page-search.lolo +3 -1
- package/behaviors/lolo/infra/atoms/std-page-treat.lolo +28 -1
- package/behaviors/lolo/infra/atoms/std-page-watch.lolo +3 -1
- package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +22 -0
- package/behaviors/lolo/ui/avl/atoms/ui-avl-transition-explainer.lolo +175 -0
- package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +22 -0
- package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +23 -4
- package/behaviors/lolo/ui/core/atoms/std-hero.lolo +72 -33
- package/behaviors/lolo/ui/core/molecules/ui-agent-chat-feed.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-markdown-content.lolo +54 -0
- package/behaviors/lolo/ui/core/molecules/ui-upload-drop-zone.lolo +5 -0
- package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +127 -3
- package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +22 -0
- package/behaviors/lolo/ui/core/templates/ui-dashboard-layout.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +87 -17
- package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +172 -37
- package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +183 -70
- package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +78 -13
- package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +58 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +107 -12
- package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +83 -10
- package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +130 -9
- package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +143 -59
- package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +96 -22
- package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +66 -5
- package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +84 -6
- package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +80 -14
- package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +99 -5
- package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +81 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +83 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +224 -99
- package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +63 -2
- package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +99 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +7 -7
- package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +69 -4
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/agent/atoms/std-agent-context.orb +205 -6
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +146 -4
- package/behaviors/registry/agent/atoms/std-agent-proposal.orb +1972 -0
- package/behaviors/registry/agent/atoms/std-agent-session.orb +2021 -597
- package/behaviors/registry/agent/atoms/std-agent-suggestions.orb +5079 -0
- package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +287 -5
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +7 -0
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/infra/atoms/std-page-search.orb +19 -1
- package/behaviors/registry/infra/atoms/std-page-treat.orb +327 -2
- package/behaviors/registry/infra/atoms/std-page-watch.orb +19 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +134 -0
- package/behaviors/registry/ui/avl/atoms/ui-avl-transition-explainer.orb +678 -0
- package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +122 -0
- package/behaviors/registry/ui/core/atoms/std-app-layout.orb +73 -4
- package/behaviors/registry/ui/core/atoms/std-hero.orb +174 -97
- package/behaviors/registry/ui/core/molecules/ui-markdown-content.orb +204 -1
- package/behaviors/registry/ui/core/molecules/ui-upload-drop-zone.orb +12 -0
- package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +683 -30
- package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +748 -21
- package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1429 -41
- package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +1031 -185
- package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +807 -132
- package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +553 -6
- package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +987 -21
- package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +582 -16
- package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +954 -13
- package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +828 -88
- package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +730 -28
- package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +479 -9
- package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +797 -46
- package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +757 -58
- package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1176 -164
- package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +599 -12
- package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +832 -150
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +1561 -127
- package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +655 -6
- package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +634 -43
- package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +85 -31
- package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +425 -9
- package/canonical-operators.json +45 -2
- package/dist/behaviors/exports-reader.js +16667 -7868
- package/dist/behaviors/functions/index.d.ts +711 -32
- package/dist/behaviors/functions/index.js +16651 -7869
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +16668 -7869
- package/dist/behaviors/query.js +16667 -7868
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +77 -53
- package/dist/behaviors-registry.json +4470 -513
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16101 -7275
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +1309 -685
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +29 -2
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/i18n.d.ts +1 -1
- package/dist/modules/index.d.ts +1 -1
- package/dist/modules/index.js +29 -2
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/trace.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +29 -2
- package/dist/{types-Cdb321uM.d.ts → types-Y-yYWEOX.d.ts} +1 -1
- package/i18n/ar.json +3 -1
- package/i18n/en.json +2 -0
- package/i18n/sl.json +3 -1
- package/package.json +3 -3
|
@@ -24,6 +24,11 @@ type AgentThreadRow = {
|
|
|
24
24
|
content : string!
|
|
25
25
|
createdAt : number
|
|
26
26
|
}
|
|
27
|
+
type AgentTool = {
|
|
28
|
+
event : event
|
|
29
|
+
read : string
|
|
30
|
+
scope : "declared"
|
|
31
|
+
}
|
|
27
32
|
type AgentToolKind = "input" | "read" | "invalid"
|
|
28
33
|
type AgentMessageEntry = {
|
|
29
34
|
type : "message"!
|
|
@@ -96,6 +101,11 @@ orbital AgentSessionOrbital {
|
|
|
96
101
|
id : string!
|
|
97
102
|
entries : [AgentFeedEntry] @description "The conversation as shown: messages with the assistant's steps between them." = []
|
|
98
103
|
working : boolean @description "The assistant is answering." = false
|
|
104
|
+
chatInstructions : string @description "The ephemeral conversation's own instructions (empty: the assistant's configured ones)." = ""
|
|
105
|
+
chatTools : [AgentTool] @description "The ephemeral conversation's own tools (empty: none)." = []
|
|
106
|
+
chatTitle : string @description "The ephemeral conversation's header title." = ""
|
|
107
|
+
chatSubtitle : string @description "The ephemeral conversation's header subtitle." = ""
|
|
108
|
+
chatAvatar : string @description "The ephemeral conversation's header avatar image." = ""
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
trait AgentThread -> @rebindable AgentMessage [lifecycle] {
|
|
@@ -250,14 +260,19 @@ orbital AgentSessionOrbital {
|
|
|
250
260
|
backLabel : string = "Back"
|
|
251
261
|
@label "Back to the conversation"
|
|
252
262
|
@tier "presentation"
|
|
263
|
+
ephemeral : boolean = false
|
|
264
|
+
@label "Ephemeral conversation?"
|
|
265
|
+
@description "A self-contained conversation: it runs under the instructions, tools, greeting and header the app starts it with (ASSISTANT_CHAT_START), is never stored among the person's conversations or remembered, shows no conversation, past-chat or memory buttons, and ignores the assistant's own replies."
|
|
266
|
+
@synonyms "private, one-off, scoped chat, own persona, not saved"
|
|
267
|
+
@tier "domain"
|
|
253
268
|
}
|
|
254
269
|
initial: idle
|
|
255
270
|
|
|
256
271
|
state idle {
|
|
257
|
-
INIT -> idle
|
|
272
|
+
INIT -> idle when (not @config.ephemeral)
|
|
258
273
|
(emit ASSISTANT_HISTORY_REQUESTED {})
|
|
259
274
|
(render-ui main {
|
|
260
|
-
children: [{
|
|
275
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
261
276
|
children: [{
|
|
262
277
|
action: NEW_CHAT_CLICKED
|
|
263
278
|
aria-label: @config.newChatLabel
|
|
@@ -306,7 +321,76 @@ orbital AgentSessionOrbital {
|
|
|
306
321
|
justify: between
|
|
307
322
|
wrap: true
|
|
308
323
|
type: stack
|
|
324
|
+
}), {
|
|
325
|
+
activities: @entity.entries
|
|
326
|
+
className: flex-1
|
|
327
|
+
emptyTitle: @config.emptyTitle
|
|
328
|
+
idPrefix: agent-conversation
|
|
329
|
+
rawLlmPreferenceKey: agent-conversation-raw-llm
|
|
330
|
+
type: agent-chat-feed
|
|
331
|
+
working: @entity.working
|
|
309
332
|
}, {
|
|
333
|
+
placeholder: @config.placeholder
|
|
334
|
+
sendEvent: ASK
|
|
335
|
+
type: chat-bar
|
|
336
|
+
}]
|
|
337
|
+
className: "h-full min-h-0 flex-1"
|
|
338
|
+
direction: vertical
|
|
339
|
+
gap: sm
|
|
340
|
+
type: stack
|
|
341
|
+
})
|
|
342
|
+
INIT -> idle when @config.ephemeral
|
|
343
|
+
(render-ui main {
|
|
344
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
345
|
+
children: [{
|
|
346
|
+
action: NEW_CHAT_CLICKED
|
|
347
|
+
aria-label: @config.newChatLabel
|
|
348
|
+
icon: message-square-plus
|
|
349
|
+
label: @config.newChatLabel
|
|
350
|
+
size: sm
|
|
351
|
+
type: button
|
|
352
|
+
variant: secondary
|
|
353
|
+
}, {
|
|
354
|
+
children: [{
|
|
355
|
+
action: OPEN_CHATS_CLICKED
|
|
356
|
+
aria-label: @config.chatsLabel
|
|
357
|
+
label: @config.chatsLabel
|
|
358
|
+
size: sm
|
|
359
|
+
type: button
|
|
360
|
+
variant: ghost
|
|
361
|
+
}, {
|
|
362
|
+
action: OPEN_MEMORY_CLICKED
|
|
363
|
+
aria-label: @config.memoryLabel
|
|
364
|
+
label: @config.memoryLabel
|
|
365
|
+
size: sm
|
|
366
|
+
type: button
|
|
367
|
+
variant: ghost
|
|
368
|
+
}, {
|
|
369
|
+
children: (array/map @config.links (fn item {
|
|
370
|
+
href: @item.href
|
|
371
|
+
label: @item.label
|
|
372
|
+
size: sm
|
|
373
|
+
type: button
|
|
374
|
+
variant: ghost
|
|
375
|
+
}))
|
|
376
|
+
direction: horizontal
|
|
377
|
+
gap: xs
|
|
378
|
+
type: stack
|
|
379
|
+
}]
|
|
380
|
+
align: center
|
|
381
|
+
className: shrink-0
|
|
382
|
+
direction: horizontal
|
|
383
|
+
gap: none
|
|
384
|
+
type: stack
|
|
385
|
+
}]
|
|
386
|
+
align: center
|
|
387
|
+
className: shrink-0
|
|
388
|
+
direction: horizontal
|
|
389
|
+
gap: sm
|
|
390
|
+
justify: between
|
|
391
|
+
wrap: true
|
|
392
|
+
type: stack
|
|
393
|
+
}), {
|
|
310
394
|
activities: @entity.entries
|
|
311
395
|
className: flex-1
|
|
312
396
|
emptyTitle: @config.emptyTitle
|
|
@@ -324,10 +408,10 @@ orbital AgentSessionOrbital {
|
|
|
324
408
|
gap: sm
|
|
325
409
|
type: stack
|
|
326
410
|
})
|
|
327
|
-
THREAD_LOADED -> idle
|
|
411
|
+
THREAD_LOADED -> idle when (not @config.ephemeral)
|
|
328
412
|
(set @entity.entries (array/map (array/sort ?data createdAt asc) (fn item { type: message, role: @item.role, content: @item.content, timestamp: @item.createdAt })))
|
|
329
413
|
(render-ui main {
|
|
330
|
-
children: [{
|
|
414
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
331
415
|
children: [{
|
|
332
416
|
action: NEW_CHAT_CLICKED
|
|
333
417
|
aria-label: @config.newChatLabel
|
|
@@ -376,7 +460,7 @@ orbital AgentSessionOrbital {
|
|
|
376
460
|
justify: between
|
|
377
461
|
wrap: true
|
|
378
462
|
type: stack
|
|
379
|
-
}, {
|
|
463
|
+
}), {
|
|
380
464
|
activities: @entity.entries
|
|
381
465
|
className: flex-1
|
|
382
466
|
emptyTitle: @config.emptyTitle
|
|
@@ -394,12 +478,12 @@ orbital AgentSessionOrbital {
|
|
|
394
478
|
gap: sm
|
|
395
479
|
type: stack
|
|
396
480
|
})
|
|
397
|
-
ASK -> idle when (and (not @entity.working) (not ["=", (str/default ?message ""), ""]))
|
|
481
|
+
ASK -> idle when (and (not @config.ephemeral) (not @entity.working) (not ["=", (str/default ?message ""), ""]))
|
|
398
482
|
(set @entity.entries (array/append @entity.entries { type: message, role: user, content: ?message, timestamp: @now }))
|
|
399
483
|
(set @entity.working true)
|
|
400
484
|
(emit ASSISTANT_SEND { message: ?message })
|
|
401
485
|
(render-ui main {
|
|
402
|
-
children: [{
|
|
486
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
403
487
|
children: [{
|
|
404
488
|
action: NEW_CHAT_CLICKED
|
|
405
489
|
aria-label: @config.newChatLabel
|
|
@@ -448,7 +532,84 @@ orbital AgentSessionOrbital {
|
|
|
448
532
|
justify: between
|
|
449
533
|
wrap: true
|
|
450
534
|
type: stack
|
|
535
|
+
}), {
|
|
536
|
+
activities: @entity.entries
|
|
537
|
+
className: flex-1
|
|
538
|
+
emptyTitle: @config.emptyTitle
|
|
539
|
+
idPrefix: agent-conversation
|
|
540
|
+
rawLlmPreferenceKey: agent-conversation-raw-llm
|
|
541
|
+
type: agent-chat-feed
|
|
542
|
+
working: @entity.working
|
|
451
543
|
}, {
|
|
544
|
+
placeholder: @config.placeholder
|
|
545
|
+
sendEvent: ASK
|
|
546
|
+
type: chat-bar
|
|
547
|
+
}]
|
|
548
|
+
className: "h-full min-h-0 flex-1"
|
|
549
|
+
direction: vertical
|
|
550
|
+
gap: sm
|
|
551
|
+
type: stack
|
|
552
|
+
})
|
|
553
|
+
ASK -> idle when (and @config.ephemeral (not @entity.working) (not ["=", (str/default ?message ""), ""]))
|
|
554
|
+
(set @entity.entries (array/append @entity.entries { type: message, role: user, content: ?message, timestamp: @now }))
|
|
555
|
+
(set @entity.working true)
|
|
556
|
+
(emit ASSISTANT_EPHEMERAL_SEND {
|
|
557
|
+
messages: (array/map (array/filter @entity.entries (fn item ["=", @item.type, "message"])) (fn item { role: @item.role, content: @item.content }))
|
|
558
|
+
instructions: @entity.chatInstructions
|
|
559
|
+
tools: @entity.chatTools
|
|
560
|
+
ephemeral: true
|
|
561
|
+
})
|
|
562
|
+
(render-ui main {
|
|
563
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
564
|
+
children: [{
|
|
565
|
+
action: NEW_CHAT_CLICKED
|
|
566
|
+
aria-label: @config.newChatLabel
|
|
567
|
+
icon: message-square-plus
|
|
568
|
+
label: @config.newChatLabel
|
|
569
|
+
size: sm
|
|
570
|
+
type: button
|
|
571
|
+
variant: secondary
|
|
572
|
+
}, {
|
|
573
|
+
children: [{
|
|
574
|
+
action: OPEN_CHATS_CLICKED
|
|
575
|
+
aria-label: @config.chatsLabel
|
|
576
|
+
label: @config.chatsLabel
|
|
577
|
+
size: sm
|
|
578
|
+
type: button
|
|
579
|
+
variant: ghost
|
|
580
|
+
}, {
|
|
581
|
+
action: OPEN_MEMORY_CLICKED
|
|
582
|
+
aria-label: @config.memoryLabel
|
|
583
|
+
label: @config.memoryLabel
|
|
584
|
+
size: sm
|
|
585
|
+
type: button
|
|
586
|
+
variant: ghost
|
|
587
|
+
}, {
|
|
588
|
+
children: (array/map @config.links (fn item {
|
|
589
|
+
href: @item.href
|
|
590
|
+
label: @item.label
|
|
591
|
+
size: sm
|
|
592
|
+
type: button
|
|
593
|
+
variant: ghost
|
|
594
|
+
}))
|
|
595
|
+
direction: horizontal
|
|
596
|
+
gap: xs
|
|
597
|
+
type: stack
|
|
598
|
+
}]
|
|
599
|
+
align: center
|
|
600
|
+
className: shrink-0
|
|
601
|
+
direction: horizontal
|
|
602
|
+
gap: none
|
|
603
|
+
type: stack
|
|
604
|
+
}]
|
|
605
|
+
align: center
|
|
606
|
+
className: shrink-0
|
|
607
|
+
direction: horizontal
|
|
608
|
+
gap: sm
|
|
609
|
+
justify: between
|
|
610
|
+
wrap: true
|
|
611
|
+
type: stack
|
|
612
|
+
}), {
|
|
452
613
|
activities: @entity.entries
|
|
453
614
|
className: flex-1
|
|
454
615
|
emptyTitle: @config.emptyTitle
|
|
@@ -466,10 +627,15 @@ orbital AgentSessionOrbital {
|
|
|
466
627
|
gap: sm
|
|
467
628
|
type: stack
|
|
468
629
|
})
|
|
469
|
-
|
|
470
|
-
(set @entity.entries (
|
|
630
|
+
START_CHAT -> idle when (and @config.ephemeral (not @entity.working))
|
|
631
|
+
(set @entity.entries (if ["=", (str/default ?greeting ""), ""] [] [{ type: message, role: assistant, content: ?greeting, timestamp: @now }]))
|
|
632
|
+
(set @entity.chatInstructions (str/default ?instructions ""))
|
|
633
|
+
(set @entity.chatTools (object/get ? tools []))
|
|
634
|
+
(set @entity.chatTitle (str/default ?title ""))
|
|
635
|
+
(set @entity.chatSubtitle (str/default ?subtitle ""))
|
|
636
|
+
(set @entity.chatAvatar (str/default ?avatar ""))
|
|
471
637
|
(render-ui main {
|
|
472
|
-
children: [{
|
|
638
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
473
639
|
children: [{
|
|
474
640
|
action: NEW_CHAT_CLICKED
|
|
475
641
|
aria-label: @config.newChatLabel
|
|
@@ -518,7 +684,77 @@ orbital AgentSessionOrbital {
|
|
|
518
684
|
justify: between
|
|
519
685
|
wrap: true
|
|
520
686
|
type: stack
|
|
687
|
+
}), {
|
|
688
|
+
activities: @entity.entries
|
|
689
|
+
className: flex-1
|
|
690
|
+
emptyTitle: @config.emptyTitle
|
|
691
|
+
idPrefix: agent-conversation
|
|
692
|
+
rawLlmPreferenceKey: agent-conversation-raw-llm
|
|
693
|
+
type: agent-chat-feed
|
|
694
|
+
working: @entity.working
|
|
521
695
|
}, {
|
|
696
|
+
placeholder: @config.placeholder
|
|
697
|
+
sendEvent: ASK
|
|
698
|
+
type: chat-bar
|
|
699
|
+
}]
|
|
700
|
+
className: "h-full min-h-0 flex-1"
|
|
701
|
+
direction: vertical
|
|
702
|
+
gap: sm
|
|
703
|
+
type: stack
|
|
704
|
+
})
|
|
705
|
+
STEP -> idle when (not @config.ephemeral)
|
|
706
|
+
(set @entity.entries (array/append @entity.entries ?activity))
|
|
707
|
+
(render-ui main {
|
|
708
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
709
|
+
children: [{
|
|
710
|
+
action: NEW_CHAT_CLICKED
|
|
711
|
+
aria-label: @config.newChatLabel
|
|
712
|
+
icon: message-square-plus
|
|
713
|
+
label: @config.newChatLabel
|
|
714
|
+
size: sm
|
|
715
|
+
type: button
|
|
716
|
+
variant: secondary
|
|
717
|
+
}, {
|
|
718
|
+
children: [{
|
|
719
|
+
action: OPEN_CHATS_CLICKED
|
|
720
|
+
aria-label: @config.chatsLabel
|
|
721
|
+
label: @config.chatsLabel
|
|
722
|
+
size: sm
|
|
723
|
+
type: button
|
|
724
|
+
variant: ghost
|
|
725
|
+
}, {
|
|
726
|
+
action: OPEN_MEMORY_CLICKED
|
|
727
|
+
aria-label: @config.memoryLabel
|
|
728
|
+
label: @config.memoryLabel
|
|
729
|
+
size: sm
|
|
730
|
+
type: button
|
|
731
|
+
variant: ghost
|
|
732
|
+
}, {
|
|
733
|
+
children: (array/map @config.links (fn item {
|
|
734
|
+
href: @item.href
|
|
735
|
+
label: @item.label
|
|
736
|
+
size: sm
|
|
737
|
+
type: button
|
|
738
|
+
variant: ghost
|
|
739
|
+
}))
|
|
740
|
+
direction: horizontal
|
|
741
|
+
gap: xs
|
|
742
|
+
type: stack
|
|
743
|
+
}]
|
|
744
|
+
align: center
|
|
745
|
+
className: shrink-0
|
|
746
|
+
direction: horizontal
|
|
747
|
+
gap: none
|
|
748
|
+
type: stack
|
|
749
|
+
}]
|
|
750
|
+
align: center
|
|
751
|
+
className: shrink-0
|
|
752
|
+
direction: horizontal
|
|
753
|
+
gap: sm
|
|
754
|
+
justify: between
|
|
755
|
+
wrap: true
|
|
756
|
+
type: stack
|
|
757
|
+
}), {
|
|
522
758
|
activities: @entity.entries
|
|
523
759
|
className: flex-1
|
|
524
760
|
emptyTitle: @config.emptyTitle
|
|
@@ -536,11 +772,11 @@ orbital AgentSessionOrbital {
|
|
|
536
772
|
gap: sm
|
|
537
773
|
type: stack
|
|
538
774
|
})
|
|
539
|
-
REPLIED -> idle
|
|
775
|
+
REPLIED -> idle when ["=", (if ?ephemeral true false), @config.ephemeral]
|
|
540
776
|
(set @entity.entries (array/append @entity.entries { type: message, role: assistant, content: ?reply, timestamp: @now }))
|
|
541
777
|
(set @entity.working false)
|
|
542
778
|
(render-ui main {
|
|
543
|
-
children: [{
|
|
779
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
544
780
|
children: [{
|
|
545
781
|
action: NEW_CHAT_CLICKED
|
|
546
782
|
aria-label: @config.newChatLabel
|
|
@@ -589,7 +825,7 @@ orbital AgentSessionOrbital {
|
|
|
589
825
|
justify: between
|
|
590
826
|
wrap: true
|
|
591
827
|
type: stack
|
|
592
|
-
}, {
|
|
828
|
+
}), {
|
|
593
829
|
activities: @entity.entries
|
|
594
830
|
className: flex-1
|
|
595
831
|
emptyTitle: @config.emptyTitle
|
|
@@ -611,7 +847,7 @@ orbital AgentSessionOrbital {
|
|
|
611
847
|
(set @entity.entries [])
|
|
612
848
|
(emit ASSISTANT_NEW_CHAT {})
|
|
613
849
|
(render-ui main {
|
|
614
|
-
children: [{
|
|
850
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
615
851
|
children: [{
|
|
616
852
|
action: NEW_CHAT_CLICKED
|
|
617
853
|
aria-label: @config.newChatLabel
|
|
@@ -660,7 +896,7 @@ orbital AgentSessionOrbital {
|
|
|
660
896
|
justify: between
|
|
661
897
|
wrap: true
|
|
662
898
|
type: stack
|
|
663
|
-
}, {
|
|
899
|
+
}), {
|
|
664
900
|
activities: @entity.entries
|
|
665
901
|
className: flex-1
|
|
666
902
|
emptyTitle: @config.emptyTitle
|
|
@@ -680,7 +916,7 @@ orbital AgentSessionOrbital {
|
|
|
680
916
|
})
|
|
681
917
|
OPEN_CHATS_CLICKED -> idle
|
|
682
918
|
(emit ASSISTANT_CHATS_REQUESTED {})
|
|
683
|
-
CHATS_LISTED -> idle
|
|
919
|
+
CHATS_LISTED -> idle when (not @config.ephemeral)
|
|
684
920
|
(render-ui main {
|
|
685
921
|
children: [{
|
|
686
922
|
children: [{
|
|
@@ -735,7 +971,7 @@ orbital AgentSessionOrbital {
|
|
|
735
971
|
CHAT_PICKED -> idle when (not @entity.working)
|
|
736
972
|
(emit ASSISTANT_CHAT_SELECTED { chatId: ?id })
|
|
737
973
|
(render-ui main {
|
|
738
|
-
children: [{
|
|
974
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
739
975
|
children: [{
|
|
740
976
|
action: NEW_CHAT_CLICKED
|
|
741
977
|
aria-label: @config.newChatLabel
|
|
@@ -784,7 +1020,7 @@ orbital AgentSessionOrbital {
|
|
|
784
1020
|
justify: between
|
|
785
1021
|
wrap: true
|
|
786
1022
|
type: stack
|
|
787
|
-
}, {
|
|
1023
|
+
}), {
|
|
788
1024
|
activities: @entity.entries
|
|
789
1025
|
className: flex-1
|
|
790
1026
|
emptyTitle: @config.emptyTitle
|
|
@@ -804,7 +1040,7 @@ orbital AgentSessionOrbital {
|
|
|
804
1040
|
})
|
|
805
1041
|
OPEN_MEMORY_CLICKED -> idle
|
|
806
1042
|
(emit ASSISTANT_MEMORIES_REQUESTED {})
|
|
807
|
-
MEMORIES_LISTED -> idle
|
|
1043
|
+
MEMORIES_LISTED -> idle when (not @config.ephemeral)
|
|
808
1044
|
(render-ui main {
|
|
809
1045
|
children: [{
|
|
810
1046
|
children: [{
|
|
@@ -855,7 +1091,7 @@ orbital AgentSessionOrbital {
|
|
|
855
1091
|
})
|
|
856
1092
|
BACK_TO_CHAT -> idle
|
|
857
1093
|
(render-ui main {
|
|
858
|
-
children: [{
|
|
1094
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
859
1095
|
children: [{
|
|
860
1096
|
action: NEW_CHAT_CLICKED
|
|
861
1097
|
aria-label: @config.newChatLabel
|
|
@@ -904,7 +1140,7 @@ orbital AgentSessionOrbital {
|
|
|
904
1140
|
justify: between
|
|
905
1141
|
wrap: true
|
|
906
1142
|
type: stack
|
|
907
|
-
}, {
|
|
1143
|
+
}), {
|
|
908
1144
|
activities: @entity.entries
|
|
909
1145
|
className: flex-1
|
|
910
1146
|
emptyTitle: @config.emptyTitle
|
|
@@ -922,11 +1158,11 @@ orbital AgentSessionOrbital {
|
|
|
922
1158
|
gap: sm
|
|
923
1159
|
type: stack
|
|
924
1160
|
})
|
|
925
|
-
REPLY_FAILED -> idle
|
|
1161
|
+
REPLY_FAILED -> idle when ["=", (if ?ephemeral true false), @config.ephemeral]
|
|
926
1162
|
(set @entity.entries (array/append @entity.entries { type: error, message: ?error, timestamp: @now }))
|
|
927
1163
|
(set @entity.working false)
|
|
928
1164
|
(render-ui main {
|
|
929
|
-
children: [{
|
|
1165
|
+
children: [(if @config.ephemeral { type: stack, direction: horizontal, align: center, gap: sm, className: shrink-0, children: [{ type: avatar, src: (object/get @entity chatAvatar ""), name: @entity.chatTitle, size: md, className: (if ["=", @entity.chatAvatar, ""] hidden "") }, { type: stack, direction: vertical, gap: none, children: [{ type: typography, variant: h4, content: @entity.chatTitle }, { type: typography, variant: caption, content: @entity.chatSubtitle }] }] } {
|
|
930
1166
|
children: [{
|
|
931
1167
|
action: NEW_CHAT_CLICKED
|
|
932
1168
|
aria-label: @config.newChatLabel
|
|
@@ -975,7 +1211,7 @@ orbital AgentSessionOrbital {
|
|
|
975
1211
|
justify: between
|
|
976
1212
|
wrap: true
|
|
977
1213
|
type: stack
|
|
978
|
-
}, {
|
|
1214
|
+
}), {
|
|
979
1215
|
activities: @entity.entries
|
|
980
1216
|
className: flex-1
|
|
981
1217
|
emptyTitle: @config.emptyTitle
|
|
@@ -1011,6 +1247,15 @@ orbital AgentSessionOrbital {
|
|
|
1011
1247
|
@description "Start a new conversation."
|
|
1012
1248
|
@synonyms "new chat, start over, clear"
|
|
1013
1249
|
@tier "presentation"
|
|
1250
|
+
ASSISTANT_EPHEMERAL_SEND -> external {
|
|
1251
|
+
messages : [AgentChatMessage]!
|
|
1252
|
+
instructions : string
|
|
1253
|
+
tools : [AgentTool]
|
|
1254
|
+
ephemeral : boolean!
|
|
1255
|
+
}
|
|
1256
|
+
@description "An ephemeral conversation asked something: the whole conversation so far (greeting included), and its own `instructions` and `tools`. Nothing is stored or remembered; the assistant answers under exactly these."
|
|
1257
|
+
@synonyms "ask privately, scoped ask"
|
|
1258
|
+
@tier "domain"
|
|
1014
1259
|
ASSISTANT_SEND -> external {
|
|
1015
1260
|
message : string!
|
|
1016
1261
|
}
|
|
@@ -1063,6 +1308,17 @@ orbital AgentSessionOrbital {
|
|
|
1063
1308
|
*.ASSISTANT_REPLY_FAILED -> REPLY_FAILED
|
|
1064
1309
|
*.ASSISTANT_CHATS_LOADED -> CHATS_LISTED
|
|
1065
1310
|
*.ASSISTANT_MEMORIES_LOADED -> MEMORIES_LISTED
|
|
1311
|
+
*.ASSISTANT_CHAT_START -> START_CHAT
|
|
1312
|
+
START_CHAT {
|
|
1313
|
+
greeting : string
|
|
1314
|
+
instructions : string
|
|
1315
|
+
tools : [AgentTool]
|
|
1316
|
+
title : string
|
|
1317
|
+
subtitle : string
|
|
1318
|
+
avatar : string
|
|
1319
|
+
}
|
|
1320
|
+
@description "Start an ephemeral conversation (only on an AgentConversation whose `ephemeral` knob is on): it opens with `greeting` as the assistant's first message under a header of `title`, `subtitle` and `avatar` (an image URL), and every ask runs under `instructions` (empty: the assistant's configured ones) and exactly `tools` (absent or `[]`: none). Ignored while it is answering."
|
|
1321
|
+
@synonyms "open private chat, begin scoped conversation"
|
|
1066
1322
|
CHATS_LISTED {
|
|
1067
1323
|
data : [AgentChatRow]
|
|
1068
1324
|
}
|
|
@@ -1085,10 +1341,12 @@ orbital AgentSessionOrbital {
|
|
|
1085
1341
|
@synonyms "progress, activity, working"
|
|
1086
1342
|
REPLIED {
|
|
1087
1343
|
reply : string!
|
|
1344
|
+
ephemeral : boolean
|
|
1088
1345
|
}
|
|
1089
1346
|
@description "The assistant answered."
|
|
1090
1347
|
REPLY_FAILED {
|
|
1091
1348
|
error : string!
|
|
1349
|
+
ephemeral : boolean
|
|
1092
1350
|
}
|
|
1093
1351
|
@description "The assistant could not answer."
|
|
1094
1352
|
}
|
|
@@ -1156,7 +1414,7 @@ orbital AgentChatsOrbital {
|
|
|
1156
1414
|
ChatReadyForSend -> ready
|
|
1157
1415
|
(emit ASSISTANT_SEND_IN_CHAT { chatId: ?id, message: @entity.pendingMessage })
|
|
1158
1416
|
(emit ASSISTANT_CHATS_CHANGED {})
|
|
1159
|
-
REPLIED -> ready
|
|
1417
|
+
REPLIED -> ready when (not ?ephemeral)
|
|
1160
1418
|
(set @entity.pendingReply ?reply)
|
|
1161
1419
|
(fetch AgentChat {
|
|
1162
1420
|
emit: { failure: AgentChatsLoadFailed, success: ChatsForReply }
|
|
@@ -1294,6 +1552,7 @@ orbital AgentChatsOrbital {
|
|
|
1294
1552
|
@description "The user asked something; place it in the current conversation."
|
|
1295
1553
|
REPLIED {
|
|
1296
1554
|
reply : string!
|
|
1555
|
+
ephemeral : boolean
|
|
1297
1556
|
}
|
|
1298
1557
|
@description "The assistant answered; place the answer in the current conversation."
|
|
1299
1558
|
LOAD_HISTORY {
|