@datalayer/agent-runtimes 1.3.82 → 1.3.84

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 (52) hide show
  1. package/lib/chat/base/ChatBase.js +16 -0
  2. package/lib/chat/base/loopElement.d.ts +53 -0
  3. package/lib/chat/base/loopElement.js +78 -0
  4. package/lib/chat/base/loopWindow.d.ts +31 -0
  5. package/lib/chat/base/loopWindow.js +74 -0
  6. package/lib/components/a2ui/datalayer/FileUpload.d.ts +10 -2
  7. package/lib/components/a2ui/datalayer/FileUpload.js +10 -7
  8. package/lib/components/a2ui/datalayer/Form.d.ts +2 -0
  9. package/lib/components/a2ui/datalayer/Form.js +26 -2
  10. package/lib/components/a2ui/datalayer/formWidgets.d.ts +19 -0
  11. package/lib/components/a2ui/datalayer/formWidgets.js +51 -0
  12. package/lib/loop/apps/AppComposer.d.ts +39 -4
  13. package/lib/loop/apps/AppComposer.js +191 -19
  14. package/lib/loop/apps/AppRenderer.d.ts +20 -3
  15. package/lib/loop/apps/AppRenderer.js +58 -27
  16. package/lib/loop/apps/appspec.d.ts +2 -0
  17. package/lib/loop/apps/appspec.js +196 -39
  18. package/lib/loop/apps/checks.d.ts +6 -0
  19. package/lib/loop/apps/checks.js +187 -8
  20. package/lib/loop/apps/composer.d.ts +21 -10
  21. package/lib/loop/apps/composer.js +41 -8
  22. package/lib/loop/apps/language.d.ts +68 -0
  23. package/lib/loop/apps/language.js +275 -0
  24. package/lib/loop/apps/settingsInputs.d.ts +29 -0
  25. package/lib/loop/apps/settingsInputs.js +147 -0
  26. package/lib/loop/apps/uploads.d.ts +43 -0
  27. package/lib/loop/apps/uploads.js +66 -0
  28. package/lib/loop/core/index.d.ts +14 -1
  29. package/lib/loop/embed/AppEmbed.d.ts +14 -0
  30. package/lib/loop/embed/AppEmbed.js +64 -2
  31. package/lib/loop/embed/element.js +23 -0
  32. package/lib/loop/embed/embedSession.d.ts +14 -0
  33. package/lib/loop/embed/embedSession.js +34 -0
  34. package/lib/loop/embed/hostBridge.d.ts +22 -1
  35. package/lib/loop/plugins/app-elements/AppElements.d.ts +27 -0
  36. package/lib/loop/plugins/app-elements/AppElements.js +76 -0
  37. package/lib/loop/plugins/app-elements/index.d.ts +20 -0
  38. package/lib/loop/plugins/app-elements/index.js +43 -0
  39. package/lib/loop/plugins/app-page/appPageModel.d.ts +14 -5
  40. package/lib/loop/plugins/app-page/appPageModel.js +82 -88
  41. package/lib/loop/plugins/chat/ChatView.js +10 -2
  42. package/lib/protocols/BrowserAgentAdapter.d.ts +8 -6
  43. package/lib/protocols/BrowserAgentAdapter.js +13 -10
  44. package/lib/runtimes/browser/protocol.d.ts +1 -1
  45. package/lib/specs/agents/agents.js +6 -3
  46. package/lib/specs/apps.js +337 -176
  47. package/lib/specs/appspecSchema.js +455 -88
  48. package/lib/specs/cogs.js +3 -2
  49. package/lib/specs/uiPlugins.js +6 -1
  50. package/lib/types/agentspecs.d.ts +167 -11
  51. package/package.json +1 -1
  52. package/scripts/codegen/generate_apps.py +16 -1
@@ -16,6 +16,12 @@ export const APPSPEC_SCHEMA = {
16
16
  title: 'Access',
17
17
  type: 'string',
18
18
  },
19
+ ActionClass: {
20
+ description: 'What a tool does to the world.',
21
+ enum: ['read', 'write', 'send', 'buy', 'delete', 'publish'],
22
+ title: 'ActionClass',
23
+ type: 'string',
24
+ },
19
25
  ActsAs: {
20
26
  description: 'In whose name a connection acts.',
21
27
  enum: ['owner', 'user'],
@@ -24,7 +30,7 @@ export const APPSPEC_SCHEMA = {
24
30
  },
25
31
  AppChecks: {
26
32
  additionalProperties: false,
27
- description: 'Optional: checks from the catalogue, for a builder who wants them.',
33
+ description: "Optional: checks from the catalogue, for a builder who wants them — and its code's own.",
28
34
  properties: {
29
35
  guards: {
30
36
  description: 'Guards, `id` or `id:version`',
@@ -48,10 +54,43 @@ export const APPSPEC_SCHEMA = {
48
54
  title: 'Track',
49
55
  type: 'string',
50
56
  },
57
+ code: {
58
+ description: 'Checks written in its code (`@app.check`), each run at its stage (LOOP P-06)',
59
+ items: {
60
+ $ref: '#/$defs/AppCodeCheck',
61
+ },
62
+ title: 'Code',
63
+ type: 'array',
64
+ },
51
65
  },
52
66
  title: 'AppChecks',
53
67
  type: 'object',
54
68
  },
69
+ AppCodeCheck: {
70
+ additionalProperties: false,
71
+ description: "A check written in the application's code (LOOP P-06): `@app.check`.\n\nRun at its stage beside the built-in checks and the catalogue's Guards;\nwhat it refuses is said in its own sentence. Without its file nothing\nruns it, and validation says so.",
72
+ properties: {
73
+ name: {
74
+ description: 'The function of its code that checks, by name',
75
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*$',
76
+ title: 'Name',
77
+ type: 'string',
78
+ },
79
+ on: {
80
+ $ref: '#/$defs/CheckStage',
81
+ description: '`answer` or `tool_call`: where it runs',
82
+ },
83
+ description: {
84
+ description: 'What it checks, in a sentence a person reads',
85
+ minLength: 1,
86
+ title: 'Description',
87
+ type: 'string',
88
+ },
89
+ },
90
+ required: ['name', 'on', 'description'],
91
+ title: 'AppCodeCheck',
92
+ type: 'object',
93
+ },
55
94
  AppCommand: {
56
95
  additionalProperties: false,
57
96
  description: "A slash command the user picks in the composer (LOOP P-19).\n\nTyping `/` lists the application's commands; picking one sends its\n`prompt`, `{input}` replaced by the words typed after the command.",
@@ -275,6 +314,34 @@ export const APPSPEC_SCHEMA = {
275
314
  title: 'AppDeployment',
276
315
  type: 'object',
277
316
  },
317
+ AppFieldTranslation: {
318
+ additionalProperties: false,
319
+ description: 'A field of the settings in another language.',
320
+ properties: {
321
+ title: {
322
+ default: '',
323
+ description: 'Its title',
324
+ title: 'Title',
325
+ type: 'string',
326
+ },
327
+ description: {
328
+ default: '',
329
+ description: 'What it is for',
330
+ title: 'Description',
331
+ type: 'string',
332
+ },
333
+ options: {
334
+ additionalProperties: {
335
+ type: 'string',
336
+ },
337
+ description: "What each value of its `enum` (or of its items') reads as, by the value; the value is sent",
338
+ title: 'Options',
339
+ type: 'object',
340
+ },
341
+ },
342
+ title: 'AppFieldTranslation',
343
+ type: 'object',
344
+ },
278
345
  AppInterface: {
279
346
  additionalProperties: false,
280
347
  description: 'What the user sees.',
@@ -338,14 +405,68 @@ export const APPSPEC_SCHEMA = {
338
405
  title: 'Modes',
339
406
  type: 'array',
340
407
  },
341
- settings: {
342
- description: 'What the user may set',
408
+ profiles: {
409
+ description: 'Several assistants in one application, two at least: the person picks one before the conversation starts — the first unless they do — and keeps it to the end; its instructions, model and starters go with every run (LOOP P-20). None when unsaid',
343
410
  items: {
344
- $ref: '#/$defs/AppSetting',
411
+ $ref: '#/$defs/AppProfile',
345
412
  },
346
- title: 'Settings',
413
+ title: 'Profiles',
347
414
  type: 'array',
348
415
  },
416
+ settings: {
417
+ anyOf: [
418
+ {
419
+ additionalProperties: true,
420
+ type: 'object',
421
+ },
422
+ {
423
+ type: 'null',
424
+ },
425
+ ],
426
+ default: null,
427
+ description: "What the user may set: the JSON Schema of a form, an object of named fields, each with its `title` and its `default` (LOOP C-16). Drawn with `@datalayer/primer-rjsf` beside the conversation and on a deployment's Ship card, its values go with every run and are checked by the runtime against the same schema. None when unsaid",
428
+ title: 'Settings',
429
+ },
430
+ settings_ui: {
431
+ anyOf: [
432
+ {
433
+ additionalProperties: true,
434
+ type: 'object',
435
+ },
436
+ {
437
+ type: 'null',
438
+ },
439
+ ],
440
+ default: null,
441
+ description: "How the settings' fields are drawn, as `@datalayer/primer-rjsf` reads a uiSchema: by field name, its `ui:` options — `ui:widget` one of `select`, `radio`, `range`, `updown`, `switch`, `checkbox`, `text`, `textarea`, `date`, `checkboxes`, `tags` — and `ui:order` (LOOP P-20). Each field's own widget when unsaid",
442
+ title: 'Settings Ui',
443
+ },
444
+ language: {
445
+ default: 'en',
446
+ description: 'The language its own words are in, as BCP 47 tags it (`en`, `fr`, `pt-BR`) (LOOP P-26)',
447
+ title: 'Language',
448
+ type: 'string',
449
+ },
450
+ translations: {
451
+ additionalProperties: {
452
+ $ref: '#/$defs/AppTranslation',
453
+ },
454
+ description: "What a person reads of it in other languages, by BCP 47 tag: its name, welcome, starters and their categories, settings, commands, modes and profiles. The page shows the person's language when it has it, else its own words (LOOP P-26)",
455
+ title: 'Translations',
456
+ type: 'object',
457
+ },
458
+ uploads: {
459
+ anyOf: [
460
+ {
461
+ $ref: '#/$defs/AppUploads',
462
+ },
463
+ {
464
+ type: 'null',
465
+ },
466
+ ],
467
+ default: null,
468
+ description: 'What a person may send in the composer without being asked — images, files, audio — by kind, each with its largest size, and how many at once (LOOP P-21). None when unsaid: the composer offers no attachment, and a file sent with a message is refused',
469
+ },
349
470
  components: {
350
471
  description: "The components of the catalog the surface may use; the kind's own when empty",
351
472
  items: {
@@ -506,6 +627,48 @@ export const APPSPEC_SCHEMA = {
506
627
  title: 'AppModeOption',
507
628
  type: 'object',
508
629
  },
630
+ AppModeTranslation: {
631
+ additionalProperties: false,
632
+ description: 'A mode in another language.',
633
+ properties: {
634
+ label: {
635
+ default: '',
636
+ description: 'What the switch is called',
637
+ title: 'Label',
638
+ type: 'string',
639
+ },
640
+ options: {
641
+ additionalProperties: {
642
+ $ref: '#/$defs/AppOptionTranslation',
643
+ },
644
+ description: 'Its options, by id',
645
+ title: 'Options',
646
+ type: 'object',
647
+ },
648
+ },
649
+ title: 'AppModeTranslation',
650
+ type: 'object',
651
+ },
652
+ AppOptionTranslation: {
653
+ additionalProperties: false,
654
+ description: 'An option of a mode in another language.',
655
+ properties: {
656
+ label: {
657
+ default: '',
658
+ description: 'What the switch says',
659
+ title: 'Label',
660
+ type: 'string',
661
+ },
662
+ description: {
663
+ default: '',
664
+ description: 'What it changes',
665
+ title: 'Description',
666
+ type: 'string',
667
+ },
668
+ },
669
+ title: 'AppOptionTranslation',
670
+ type: 'object',
671
+ },
509
672
  AppPermissions: {
510
673
  additionalProperties: false,
511
674
  description: 'What the application may reach beside its connections. Nothing, unless said.',
@@ -526,6 +689,80 @@ export const APPSPEC_SCHEMA = {
526
689
  title: 'AppPermissions',
527
690
  type: 'object',
528
691
  },
692
+ AppProfile: {
693
+ additionalProperties: false,
694
+ description: "One of several assistants in one application (LOOP P-20): a variant of its agent.\n\nThe person picks a profile before the conversation starts, and keeps it to\nthe end: its instructions are told to the agent on top of the\napplication's in every run, its model run in place of the application's\n(a mode's model wins over it), and its starters offered in place of the\napplication's.",
695
+ properties: {
696
+ id: {
697
+ description: 'Its id, what a conversation says it is with',
698
+ pattern: '^[a-z][a-z0-9_-]{0,39}$',
699
+ title: 'Id',
700
+ type: 'string',
701
+ },
702
+ label: {
703
+ description: 'What the person picks it by',
704
+ minLength: 1,
705
+ title: 'Label',
706
+ type: 'string',
707
+ },
708
+ description: {
709
+ default: '',
710
+ description: 'What it is for, in a sentence, beside its label',
711
+ title: 'Description',
712
+ type: 'string',
713
+ },
714
+ instructions: {
715
+ default: '',
716
+ description: 'What the agent is told besides its instructions, in every run with this profile',
717
+ title: 'Instructions',
718
+ type: 'string',
719
+ },
720
+ model: {
721
+ anyOf: [
722
+ {
723
+ type: 'string',
724
+ },
725
+ {
726
+ type: 'null',
727
+ },
728
+ ],
729
+ default: null,
730
+ description: "The model it runs on, in place of the application's; a mode's model wins over it",
731
+ title: 'Model',
732
+ },
733
+ starters: {
734
+ description: "The first messages it offers, in place of the application's; the application's when empty",
735
+ items: {
736
+ $ref: '#/$defs/AppStarter',
737
+ },
738
+ title: 'Starters',
739
+ type: 'array',
740
+ },
741
+ },
742
+ required: ['id', 'label'],
743
+ title: 'AppProfile',
744
+ type: 'object',
745
+ },
746
+ AppProfileTranslation: {
747
+ additionalProperties: false,
748
+ description: 'A profile in another language.',
749
+ properties: {
750
+ label: {
751
+ default: '',
752
+ description: 'What the person picks it by',
753
+ title: 'Label',
754
+ type: 'string',
755
+ },
756
+ description: {
757
+ default: '',
758
+ description: 'What it is for',
759
+ title: 'Description',
760
+ type: 'string',
761
+ },
762
+ },
763
+ title: 'AppProfileTranslation',
764
+ type: 'object',
765
+ },
529
766
  AppRecord: {
530
767
  additionalProperties: false,
531
768
  description: 'What is kept of what the application did, and for how long.',
@@ -609,82 +846,6 @@ export const APPSPEC_SCHEMA = {
609
846
  title: 'AppScenario',
610
847
  type: 'object',
611
848
  },
612
- AppSetting: {
613
- additionalProperties: false,
614
- description: 'Something the user may set for their session.',
615
- properties: {
616
- id: {
617
- description: 'The name the application reads it by',
618
- title: 'Id',
619
- type: 'string',
620
- },
621
- type: {
622
- $ref: '#/$defs/SettingType',
623
- description: '`select`, `text`, `toggle`, `slider` or `number`',
624
- },
625
- label: {
626
- description: 'What the user reads',
627
- title: 'Label',
628
- type: 'string',
629
- },
630
- options: {
631
- description: 'For a select: its options',
632
- items: {
633
- type: 'string',
634
- },
635
- title: 'Options',
636
- type: 'array',
637
- },
638
- default: {
639
- anyOf: [
640
- {
641
- type: 'string',
642
- },
643
- {
644
- type: 'boolean',
645
- },
646
- {
647
- type: 'number',
648
- },
649
- {
650
- type: 'null',
651
- },
652
- ],
653
- default: null,
654
- description: 'Its value at the start',
655
- title: 'Default',
656
- },
657
- min: {
658
- anyOf: [
659
- {
660
- type: 'number',
661
- },
662
- {
663
- type: 'null',
664
- },
665
- ],
666
- default: null,
667
- description: 'For a slider or a number: the least',
668
- title: 'Min',
669
- },
670
- max: {
671
- anyOf: [
672
- {
673
- type: 'number',
674
- },
675
- {
676
- type: 'null',
677
- },
678
- ],
679
- default: null,
680
- description: 'For a slider or a number: the most',
681
- title: 'Max',
682
- },
683
- },
684
- required: ['id', 'type', 'label'],
685
- title: 'AppSetting',
686
- type: 'object',
687
- },
688
849
  AppSpaceGrant: {
689
850
  additionalProperties: false,
690
851
  description: 'A Space the application may reach.',
@@ -718,11 +879,37 @@ export const APPSPEC_SCHEMA = {
718
879
  title: 'Message',
719
880
  type: 'string',
720
881
  },
882
+ category: {
883
+ default: '',
884
+ description: 'The heading it is offered under: the starters of one category are shown together, those without one first (LOOP P-20)',
885
+ title: 'Category',
886
+ type: 'string',
887
+ },
721
888
  },
722
889
  required: ['label', 'message'],
723
890
  title: 'AppStarter',
724
891
  type: 'object',
725
892
  },
893
+ AppStarterTranslation: {
894
+ additionalProperties: false,
895
+ description: 'A starter in another language.',
896
+ properties: {
897
+ label: {
898
+ default: '',
899
+ description: 'What the button says',
900
+ title: 'Label',
901
+ type: 'string',
902
+ },
903
+ message: {
904
+ default: '',
905
+ description: 'What is sent when it is chosen',
906
+ title: 'Message',
907
+ type: 'string',
908
+ },
909
+ },
910
+ title: 'AppStarterTranslation',
911
+ type: 'object',
912
+ },
726
913
  AppSurface: {
727
914
  additionalProperties: false,
728
915
  description: 'The component tree the user meets, over the approved catalog (A2UI).',
@@ -760,7 +947,7 @@ export const APPSPEC_SCHEMA = {
760
947
  },
761
948
  AppTestCase: {
762
949
  additionalProperties: false,
763
- description: 'An example of what the application should do, in plain words.',
950
+ description: "An example of what the application should do, in plain words.\n\nWhen plain words are not enough, its code decides it (LOOP P-06): `code`\nnames the function of the application's `app.py` that is given the\nconversation and says whether it passed — `@app.test` writes it. `expect`\nstill says it in words: without its file, the case is judged by them.",
764
951
  properties: {
765
952
  ask: {
766
953
  description: 'What it is asked',
@@ -772,6 +959,13 @@ export const APPSPEC_SCHEMA = {
772
959
  title: 'Expect',
773
960
  type: 'string',
774
961
  },
962
+ code: {
963
+ default: '',
964
+ description: 'The function of its code that decides the case, by name, when words are not enough; `expect` says it in words',
965
+ pattern: '^(?:[A-Za-z_][A-Za-z0-9_]*)?$',
966
+ title: 'Code',
967
+ type: 'string',
968
+ },
775
969
  },
776
970
  required: ['ask', 'expect'],
777
971
  title: 'AppTestCase',
@@ -836,6 +1030,116 @@ export const APPSPEC_SCHEMA = {
836
1030
  title: 'AppTheme',
837
1031
  type: 'object',
838
1032
  },
1033
+ AppTool: {
1034
+ additionalProperties: false,
1035
+ description: "A tool of the application's own, written in its code (LOOP P-06): `@app.tool`.\n\nIts agent calls it as any tool; the rules decide each call by what it\n`does` — a rule may name it, by its name alone — and the Canvas lists it.\nWithout its file the agent is not given it.",
1036
+ properties: {
1037
+ name: {
1038
+ description: 'Its name: what the agent calls, and a rule names',
1039
+ pattern: '^[A-Za-z_][A-Za-z0-9_]*$',
1040
+ title: 'Name',
1041
+ type: 'string',
1042
+ },
1043
+ description: {
1044
+ description: 'What it does, for the agent: when to call it',
1045
+ minLength: 1,
1046
+ title: 'Description',
1047
+ type: 'string',
1048
+ },
1049
+ parameters: {
1050
+ additionalProperties: true,
1051
+ description: 'The JSON Schema of its arguments, an object; none when unsaid',
1052
+ title: 'Parameters',
1053
+ type: 'object',
1054
+ },
1055
+ does: {
1056
+ description: 'What it does, by class of action (`read`, `write`, `send`…): what the rules decide',
1057
+ items: {
1058
+ $ref: '#/$defs/ActionClass',
1059
+ },
1060
+ minItems: 1,
1061
+ title: 'Does',
1062
+ type: 'array',
1063
+ },
1064
+ },
1065
+ required: ['name', 'description', 'does'],
1066
+ title: 'AppTool',
1067
+ type: 'object',
1068
+ },
1069
+ AppTranslation: {
1070
+ additionalProperties: false,
1071
+ description: "What a person reads of an application, in another language (LOOP P-26).\n\nEach part is keyed by what names it in the spec: a starter by its label,\na category by its words, a setting by its field, a command by its name,\na mode and a profile by their ids. What is not translated is shown in\nthe spec's own words; what is translated is shown, never sent, but a\nstarter's message — the agent is written to in the person's language.",
1072
+ properties: {
1073
+ name: {
1074
+ default: '',
1075
+ description: 'Its display name',
1076
+ title: 'Name',
1077
+ type: 'string',
1078
+ },
1079
+ description: {
1080
+ default: '',
1081
+ description: 'What it does',
1082
+ title: 'Description',
1083
+ type: 'string',
1084
+ },
1085
+ welcome: {
1086
+ default: '',
1087
+ description: 'What it says first',
1088
+ title: 'Welcome',
1089
+ type: 'string',
1090
+ },
1091
+ starters: {
1092
+ additionalProperties: {
1093
+ $ref: '#/$defs/AppStarterTranslation',
1094
+ },
1095
+ description: "Its starters and its profiles', by their label",
1096
+ title: 'Starters',
1097
+ type: 'object',
1098
+ },
1099
+ categories: {
1100
+ additionalProperties: {
1101
+ type: 'string',
1102
+ },
1103
+ description: "The starters' categories, by their words",
1104
+ title: 'Categories',
1105
+ type: 'object',
1106
+ },
1107
+ settings: {
1108
+ additionalProperties: {
1109
+ $ref: '#/$defs/AppFieldTranslation',
1110
+ },
1111
+ description: 'The fields of its settings, by name',
1112
+ title: 'Settings',
1113
+ type: 'object',
1114
+ },
1115
+ commands: {
1116
+ additionalProperties: {
1117
+ type: 'string',
1118
+ },
1119
+ description: "Its commands' descriptions, by name",
1120
+ title: 'Commands',
1121
+ type: 'object',
1122
+ },
1123
+ modes: {
1124
+ additionalProperties: {
1125
+ $ref: '#/$defs/AppModeTranslation',
1126
+ },
1127
+ description: 'Its modes, by id',
1128
+ title: 'Modes',
1129
+ type: 'object',
1130
+ },
1131
+ profiles: {
1132
+ additionalProperties: {
1133
+ $ref: '#/$defs/AppProfileTranslation',
1134
+ },
1135
+ description: 'Its profiles, by id',
1136
+ title: 'Profiles',
1137
+ type: 'object',
1138
+ },
1139
+ },
1140
+ title: 'AppTranslation',
1141
+ type: 'object',
1142
+ },
839
1143
  AppTrigger: {
840
1144
  additionalProperties: false,
841
1145
  description: "What starts a worker's work.",
@@ -879,6 +1183,55 @@ export const APPSPEC_SCHEMA = {
879
1183
  title: 'AppTrigger',
880
1184
  type: 'object',
881
1185
  },
1186
+ AppUploadKind: {
1187
+ additionalProperties: false,
1188
+ description: 'A kind of file a person may send, and how large (LOOP P-21).',
1189
+ properties: {
1190
+ type: {
1191
+ description: 'A media type (`application/pdf`), a family of them (`image/*`, `audio/*`) or an extension (`.csv`), lowercase',
1192
+ pattern: '^(?:[a-z0-9][a-z0-9.+-]*/(?:\\*|[a-z0-9][a-z0-9.+-]*)|\\.[a-z0-9][a-z0-9_+-]*)$',
1193
+ title: 'Type',
1194
+ type: 'string',
1195
+ },
1196
+ max_mb: {
1197
+ default: 10,
1198
+ description: 'The largest file of this kind, in megabytes; 25 at most',
1199
+ exclusiveMinimum: 0,
1200
+ maximum: 25,
1201
+ title: 'Max Mb',
1202
+ type: 'number',
1203
+ },
1204
+ },
1205
+ required: ['type'],
1206
+ title: 'AppUploadKind',
1207
+ type: 'object',
1208
+ },
1209
+ AppUploads: {
1210
+ additionalProperties: false,
1211
+ description: 'What a person may send in the composer without being asked (LOOP P-21): images, files, audio.\n\nA file of a kind it does not name, larger than its kind takes, or one too\nmany is refused, in a sentence — by the page before it is sent, and by the\nruntime when it is sent all the same.',
1212
+ properties: {
1213
+ kinds: {
1214
+ description: 'The kinds of file it takes, each with its largest size',
1215
+ items: {
1216
+ $ref: '#/$defs/AppUploadKind',
1217
+ },
1218
+ minItems: 1,
1219
+ title: 'Kinds',
1220
+ type: 'array',
1221
+ },
1222
+ max_files: {
1223
+ default: 5,
1224
+ description: 'The most files sent with one message',
1225
+ maximum: 20,
1226
+ minimum: 1,
1227
+ title: 'Max Files',
1228
+ type: 'integer',
1229
+ },
1230
+ },
1231
+ required: ['kinds'],
1232
+ title: 'AppUploads',
1233
+ type: 'object',
1234
+ },
882
1235
  AppVerified: {
883
1236
  additionalProperties: false,
884
1237
  description: 'What was verified, and how, each in a sentence a person reads (LOOP E-14).\n\nAn example says it on its card and on its page: what was tried live,\nwhat runs on recorded data instead, and what is not verified yet. Said\nby whoever tried it; nothing here is computed.',
@@ -965,6 +1318,12 @@ export const APPSPEC_SCHEMA = {
965
1318
  title: 'Behaviour',
966
1319
  type: 'string',
967
1320
  },
1321
+ CheckStage: {
1322
+ description: 'Where a check of its code runs (LOOP P-06), as the built-in checks do (R-06).',
1323
+ enum: ['answer', 'tool_call'],
1324
+ title: 'CheckStage',
1325
+ type: 'string',
1326
+ },
968
1327
  CriterionKind: {
969
1328
  description: 'How a criterion is assessed.',
970
1329
  enum: ['metric', 'noul', 'choice', 'score'],
@@ -1106,12 +1465,6 @@ export const APPSPEC_SCHEMA = {
1106
1465
  title: 'RecordItem',
1107
1466
  type: 'string',
1108
1467
  },
1109
- SettingType: {
1110
- description: 'What a setting is set with.',
1111
- enum: ['select', 'text', 'toggle', 'slider', 'number'],
1112
- title: 'SettingType',
1113
- type: 'string',
1114
- },
1115
1468
  ThemeMode: {
1116
1469
  description: 'The colour mode a theme is worn in: `auto` follows the device.',
1117
1470
  enum: ['light', 'dark', 'auto'],
@@ -1246,6 +1599,14 @@ export const APPSPEC_SCHEMA = {
1246
1599
  title: 'Backend Tools',
1247
1600
  type: 'array',
1248
1601
  },
1602
+ tools: {
1603
+ description: 'Tools of its own, written in its code (`@app.tool`): the agent calls them, rules decide them',
1604
+ items: {
1605
+ $ref: '#/$defs/AppTool',
1606
+ },
1607
+ title: 'Tools',
1608
+ type: 'array',
1609
+ },
1249
1610
  context: {
1250
1611
  description: "The Frames it works under: the catalogue's, or its organization's own (`org-…`)",
1251
1612
  items: {
@@ -1348,6 +1709,12 @@ export const APPSPEC_SCHEMA = {
1348
1709
  title: 'Enabled',
1349
1710
  type: 'boolean',
1350
1711
  },
1712
+ unavailable_because: {
1713
+ default: '',
1714
+ description: 'Why it is not offered today, in a sentence its page shows: said when `enabled` is false, and only then',
1715
+ title: 'Unavailable Because',
1716
+ type: 'string',
1717
+ },
1351
1718
  tags: {
1352
1719
  items: {
1353
1720
  type: 'string',
package/lib/specs/cogs.js CHANGED
@@ -242,8 +242,9 @@ const COG_CUSTOMER_INTERVIEWER_AGENTSPEC_0_0_1 = {
242
242
  description: `Conducts adaptive customer interviews under the Customer Research Frame: consent first, no leading question, and insights that each cite the interviewee's own words.`,
243
243
  tags: ['research', 'customer-support', 'analysis', 'cog'],
244
244
  domain: 'market-analyst',
245
- enabled: false,
245
+ enabled: true,
246
246
  model: 'bedrock:us.anthropic.claude-sonnet-4-6',
247
+ modelAdditionals: ['alibaba:qwen-max'],
247
248
  mcpServers: [],
248
249
  skills: [
249
250
  SKILL_MAP['text-summarizer:0.0.1']
@@ -625,7 +626,7 @@ export const COG_CUSTOMER_INTERVIEWER_0_0_1 = {
625
626
  frames: ['customer-research'],
626
627
  lineage: ['datalayer', 'customer-research'],
627
628
  kind: 'context',
628
- enabled: false,
629
+ enabled: true,
629
630
  guards: [
630
631
  {
631
632
  id: 'no-secrets',