@agentshouse/mdruntime-adapter 0.1.0-cb0bbc4ccacd0 → 0.1.0-cb2e7eccd0ac9

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 (83) hide show
  1. package/README.md +2 -2
  2. package/dist/actions.d.ts +2 -1
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +20 -7
  5. package/dist/adapter.d.ts +0 -1
  6. package/dist/adapter.d.ts.map +1 -1
  7. package/dist/adapter.js +113 -113
  8. package/dist/authored-path.d.ts +9 -0
  9. package/dist/authored-path.d.ts.map +1 -0
  10. package/dist/authored-path.js +34 -0
  11. package/dist/chunks.d.ts +37 -0
  12. package/dist/chunks.d.ts.map +1 -0
  13. package/dist/chunks.js +269 -0
  14. package/dist/digest.d.ts +0 -1
  15. package/dist/discovery.d.ts +1 -4
  16. package/dist/discovery.d.ts.map +1 -1
  17. package/dist/discovery.js +7 -8
  18. package/dist/history.d.ts +1 -7
  19. package/dist/history.d.ts.map +1 -1
  20. package/dist/history.js +22 -29
  21. package/dist/index.d.ts +3 -6
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -4
  24. package/dist/map.d.ts +0 -1
  25. package/dist/model.d.ts +3 -8
  26. package/dist/model.d.ts.map +1 -1
  27. package/dist/model.js +3 -13
  28. package/dist/read.d.ts +9 -10
  29. package/dist/read.d.ts.map +1 -1
  30. package/dist/read.js +26 -145
  31. package/dist/refusal.d.ts +3 -2
  32. package/dist/refusal.d.ts.map +1 -1
  33. package/dist/refusal.js +17 -7
  34. package/dist/search.d.ts +0 -1
  35. package/dist/search.d.ts.map +1 -1
  36. package/dist/search.js +5 -5
  37. package/dist/session-content/bounds.d.ts +7 -0
  38. package/dist/session-content/check.d.ts +18 -0
  39. package/dist/session-content/index.d.ts +7 -0
  40. package/dist/session-content/parts.d.ts +103 -0
  41. package/dist/session-content/state.d.ts +61 -0
  42. package/dist/session-content/turn.d.ts +328 -0
  43. package/dist/site.d.ts +0 -1
  44. package/dist/site.d.ts.map +1 -1
  45. package/dist/site.js +42 -50
  46. package/dist/space-schema.d.ts +1 -2
  47. package/dist/space-schema.d.ts.map +1 -1
  48. package/dist/space-schema.js +2 -2
  49. package/dist/stream.d.ts +4 -4
  50. package/dist/stream.d.ts.map +1 -1
  51. package/dist/stream.js +119 -49
  52. package/dist/transport.d.ts +25 -24
  53. package/dist/transport.d.ts.map +1 -1
  54. package/dist/transport.js +13 -13
  55. package/dist/uncertain.d.ts +5 -0
  56. package/dist/uncertain.d.ts.map +1 -0
  57. package/dist/uncertain.js +11 -0
  58. package/dist/upload.d.ts +3 -2
  59. package/dist/upload.d.ts.map +1 -1
  60. package/dist/upload.js +8 -6
  61. package/dist/version.d.ts +0 -1
  62. package/dist/write.d.ts +0 -2
  63. package/dist/write.d.ts.map +1 -1
  64. package/dist/write.js +19 -19
  65. package/package.json +3 -2
  66. package/dist/app-reference.d.ts +0 -2
  67. package/dist/app-reference.d.ts.map +0 -1
  68. package/dist/app-reference.js +0 -2
  69. package/dist/crockford.d.ts +0 -4
  70. package/dist/crockford.d.ts.map +0 -1
  71. package/dist/crockford.js +0 -3
  72. package/dist/house-model.d.ts +0 -641
  73. package/dist/house-model.d.ts.map +0 -1
  74. package/dist/house-model.js +0 -361
  75. package/dist/part.d.ts +0 -14
  76. package/dist/part.d.ts.map +0 -1
  77. package/dist/part.js +0 -90
  78. package/dist/room-stream.d.ts +0 -20
  79. package/dist/room-stream.d.ts.map +0 -1
  80. package/dist/room-stream.js +0 -57
  81. package/dist/room-types.d.ts +0 -7
  82. package/dist/room-types.d.ts.map +0 -1
  83. package/dist/room-types.js +0 -123
@@ -1,123 +0,0 @@
1
- import { APP_REFERENCE_PATTERN } from './app-reference.js';
2
- import { HOUSE_MODEL_TYPES } from './house-model.js';
3
- export const INBOX_CHANNEL_KINDS = [
4
- 'telegram-bot',
5
- 'telegram-business',
6
- 'whatsapp',
7
- 'messenger',
8
- 'instagram',
9
- 'viber',
10
- 'tiktok',
11
- ];
12
- export const CHAT_TYPE = 'chat';
13
- export const CHAT_MESSAGE_TYPE = 'chat-message';
14
- export const HOUSE_NAMEABLE_ROOM_TYPES = [CHAT_TYPE, CHAT_MESSAGE_TYPE];
15
- const WAYFINDING_MAP_TYPE = 'wayfinding-map';
16
- const WAYFINDING_TICKET_TYPE = 'wayfinding-ticket';
17
- const WAYFINDING_MAP_SECTIONS = [
18
- 'Destination',
19
- 'Notes',
20
- 'Decisions so far',
21
- 'Not yet specified',
22
- 'Out of scope',
23
- ];
24
- const IDENTITY = "{ type: string, pattern: '^\\S+$' }";
25
- const AGENT = [' agent: { type: string, format: uuid }', ' name: { type: string }'];
26
- const ASSIGNEE = [
27
- ' type: object',
28
- ' properties:',
29
- ' user: { type: string, format: uuid }',
30
- ...AGENT,
31
- ];
32
- export const HOUSE_ROOM_TYPES = [
33
- `${CHAT_TYPE}:`,
34
- ' properties:',
35
- ' inbox: { type: string, format: uuid }',
36
- ` channel: { enum: [${INBOX_CHANNEL_KINDS.join(', ')}] }`,
37
- ` chat: ${IDENTITY}`,
38
- ' customer:',
39
- ' type: object',
40
- ' properties:',
41
- ' name: { type: string }',
42
- ` username: ${IDENTITY}`,
43
- ` phone: ${IDENTITY}`,
44
- ' assignee:',
45
- ...ASSIGNEE,
46
- ' return_to:',
47
- ' type: object',
48
- ' properties:',
49
- ...AGENT,
50
- ' required: [chat, customer]',
51
- `${CHAT_MESSAGE_TYPE}:`,
52
- ' properties:',
53
- ' direction: { enum: [in, out] }',
54
- ' sender:',
55
- ' type: object',
56
- ' properties:',
57
- ' name: { type: string }',
58
- ` username: ${IDENTITY}`,
59
- ' sent_at: { type: string, format: date-time }',
60
- ` channel_message: ${IDENTITY}`,
61
- ' labelled: { const: true }',
62
- ' reactions:',
63
- ' type: array',
64
- ' items:',
65
- ' type: object',
66
- ' properties:',
67
- ' reaction: { type: string, minLength: 1 }',
68
- ' sender:',
69
- ' type: object',
70
- ' properties:',
71
- ` id: ${IDENTITY}`,
72
- ' name: { type: string }',
73
- ` username: ${IDENTITY}`,
74
- ' count: { type: integer, minimum: 1 }',
75
- ' required: [reaction]',
76
- ` post: ${IDENTITY}`,
77
- ' assignee:',
78
- ...ASSIGNEE,
79
- ' sent_outside: { const: true }',
80
- ' template:',
81
- ' type: object',
82
- ' properties:',
83
- ' name: { type: string, minLength: 1 }',
84
- ' language: { type: string, minLength: 1 }',
85
- ' required: [name, language]',
86
- ' values:',
87
- ' type: object',
88
- ' additionalProperties: { type: string }',
89
- ' withheld: { const: true }',
90
- ' required: [direction]',
91
- ' if: { properties: { direction: { const: in } } }',
92
- ' then: { required: [sent_at] }',
93
- `${WAYFINDING_MAP_TYPE}:`,
94
- ' properties:',
95
- ' title: { type: string }',
96
- ' required: [title]',
97
- ' sections:',
98
- ...WAYFINDING_MAP_SECTIONS.map((name) => ` ${name}: { kind: text, required: true }`),
99
- `${WAYFINDING_TICKET_TYPE}:`,
100
- ' properties:',
101
- ' title: { type: string }',
102
- ' kind: { enum: [research, prototype, grilling, task] }',
103
- ' status: { enum: [open, in-progress, done, out-of-scope] }',
104
- ` map: { type: string, reference: ${WAYFINDING_MAP_TYPE} }`,
105
- ` blocked_by: { type: array, items: { type: string, reference: ${WAYFINDING_TICKET_TYPE} } }`,
106
- ' assignee:',
107
- ...ASSIGNEE,
108
- ' conversation: { type: string, format: uuid }',
109
- ` app: { type: string, pattern: '${APP_REFERENCE_PATTERN.source}' }`,
110
- ' required: [title, kind, status, map, blocked_by]',
111
- ' sections:',
112
- ' Question: { kind: text }',
113
- ' Answer: { kind: text }',
114
- ' allOf:',
115
- ' - if: { properties: { status: { enum: [in-progress, done, out-of-scope] } }, required: [status] }',
116
- ' then: { required: [assignee] }',
117
- ' else: { properties: { assignee: false } }',
118
- ' - if: { properties: { assignee: { required: [agent] } }, required: [assignee] }',
119
- ' else: { properties: { conversation: false } }',
120
- ' - if: { properties: { status: { enum: [done, out-of-scope] } }, required: [status] }',
121
- ' then: { sections: { Answer: { kind: text, required: true } } }',
122
- HOUSE_MODEL_TYPES,
123
- ].join('\n');