digipair 0.113.1 → 0.114.2

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 (100) hide show
  1. package/assets/default.json +10 -0
  2. package/assets/digipairs/AGENTS.md +189 -0
  3. package/assets/digipairs/common/answer.json +90 -0
  4. package/assets/digipairs/common/avatar.png +0 -0
  5. package/assets/digipairs/common/avatar.png.json +46 -0
  6. package/assets/digipairs/common/boosts.json +18 -0
  7. package/assets/digipairs/common/chat.json +18 -0
  8. package/assets/digipairs/common/config.json +20 -0
  9. package/assets/digipairs/common/context.json +76 -0
  10. package/assets/digipairs/common/conversation.json +66 -0
  11. package/assets/digipairs/common/history.json +23 -0
  12. package/assets/digipairs/common/mcp.json +88 -0
  13. package/assets/digipairs/common/metadata.json +18 -0
  14. package/assets/digipairs/common/notification.json +18 -0
  15. package/assets/digipairs/common/schema.json +13 -0
  16. package/assets/digipairs/common/schema.json.json +19 -0
  17. package/assets/digipairs/planning.jsonl +1 -0
  18. package/assets/digipairs/studio/action-answer.json +181 -0
  19. package/assets/digipairs/studio/action-openapi2schema.json +210 -0
  20. package/assets/digipairs/studio/avatar.png +0 -0
  21. package/assets/digipairs/studio/boost-duplicate.json +95 -0
  22. package/assets/digipairs/studio/boost-plan.json +78 -0
  23. package/assets/digipairs/studio/boost-task-editor-ask.json +92 -0
  24. package/assets/digipairs/studio/boost-task-editor-change.json +110 -0
  25. package/assets/digipairs/studio/boost-tool-add-client-mcp.json +128 -0
  26. package/assets/digipairs/studio/boost-tool-add-library.json +129 -0
  27. package/assets/digipairs/studio/boost-tool-add-openapi.json +195 -0
  28. package/assets/digipairs/studio/boost-tool-add.json +93 -0
  29. package/assets/digipairs/studio/boost-tool-task-add.json +100 -0
  30. package/assets/digipairs/studio/boost-worker-add.json +95 -0
  31. package/assets/digipairs/studio/boost-worker-task-add.json +98 -0
  32. package/assets/digipairs/studio/common-edit.json +312 -0
  33. package/assets/digipairs/studio/config.json +42 -0
  34. package/assets/digipairs/studio/consumptions-monthly.json +381 -0
  35. package/assets/digipairs/studio/consumptions.json +381 -0
  36. package/assets/digipairs/studio/conversation.json +82 -0
  37. package/assets/digipairs/studio/logs.json +354 -0
  38. package/assets/digipairs/studio/process-list.json +309 -0
  39. package/assets/digipairs/studio/tool-add.json +368 -0
  40. package/assets/digipairs/studio/tool-edit.json +570 -0
  41. package/assets/digipairs/studio/tool-task-add.json +361 -0
  42. package/assets/digipairs/studio/tool-task-edit.json +413 -0
  43. package/assets/digipairs/studio/tool-task-editor.json +390 -0
  44. package/assets/digipairs/studio/tool-task-json.json +293 -0
  45. package/assets/digipairs/studio/tool-tasks.json +963 -0
  46. package/assets/digipairs/studio/tool-tool-add.json +334 -0
  47. package/assets/digipairs/studio/tools.json +385 -0
  48. package/assets/digipairs/studio/worker-add.json +251 -0
  49. package/assets/digipairs/studio/worker-edit.json +617 -0
  50. package/assets/digipairs/studio/worker-task-add.json +362 -0
  51. package/assets/digipairs/studio/worker-task-edit.json +415 -0
  52. package/assets/digipairs/studio/worker-task-editor.json +390 -0
  53. package/assets/digipairs/studio/worker-task-json.json +293 -0
  54. package/assets/digipairs/studio/worker-tasks.json +965 -0
  55. package/assets/digipairs/studio/worker-tool-add.json +341 -0
  56. package/assets/digipairs/studio/workers.json +542 -0
  57. package/assets/domains.json +1 -0
  58. package/assets/public/api.svg +1 -0
  59. package/assets/public/libraries/@digipair/skill-service/service.svg +1 -0
  60. package/assets/public/libraries/@digipair/skill-tool/action.svg +1 -0
  61. package/assets/public/libraries/@digipair/skill-tool/task.svg +1 -0
  62. package/assets/public/libraries/@digipair/skill-tool/trigger.svg +1 -0
  63. package/assets/public/libraries/@digipair/skill-worker/action.svg +1 -0
  64. package/assets/public/libraries/@digipair/skill-worker/task.svg +1 -0
  65. package/assets/public/mcp.svg +1 -0
  66. package/assets/public/push-notification.worker.js +6 -0
  67. package/assets/public/tool.svg +1 -0
  68. package/assets/templates/openapi-apikey/avatar.png +0 -0
  69. package/assets/templates/openapi-apikey/config.json +31 -0
  70. package/assets/templates/openapi-apikey/conversation.json +63 -0
  71. package/assets/templates/openapi-apikey/fallback.json +262 -0
  72. package/assets/templates/openapi-apikey/openapi.json +26 -0
  73. package/assets/templates/openapi-apikey/request.json +78 -0
  74. package/assets/templates/openapi-apikey/schema.json +1 -0
  75. package/assets/templates/pair/avatar.png +0 -0
  76. package/assets/templates/pair/config.json +14 -0
  77. package/assets/templates/tool/avatar.png +0 -0
  78. package/assets/templates/tool/config.json +19 -0
  79. package/assets/templates/tool-client-mcp-apikey/avatar.png +0 -0
  80. package/assets/templates/tool-client-mcp-apikey/config.json +37 -0
  81. package/assets/templates/tool-client-mcp-apikey/fallback.json +19 -0
  82. package/assets/templates/tool-client-mcp-apikey/schema.json.json +34 -0
  83. package/assets/templates/tool-library/avatar.png +0 -0
  84. package/assets/templates/tool-library/config.json +20 -0
  85. package/assets/templates/tool-library/fallback.json +19 -0
  86. package/assets/templates/tool-library/schema.json +1 -0
  87. package/assets/templates/worker/avatar.png +0 -0
  88. package/assets/templates/worker/config.json +18 -0
  89. package/bin/digipair.js +1 -1
  90. package/main.js +484 -0
  91. package/package.json +134 -42
  92. package/src/app/assets/digipairs/common/avatar.png.json +1 -1
  93. package/src/app/app.controller.js +0 -88
  94. package/src/app/app.controller.js.map +0 -1
  95. package/src/app/app.module.js +0 -18
  96. package/src/app/app.module.js.map +0 -1
  97. package/src/app/app.service.js +0 -179
  98. package/src/app/app.service.js.map +0 -1
  99. package/src/main.js +0 -65
  100. package/src/main.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "default",
3
+ "description": "default actions.",
4
+ "metadata": { "color": "#3b82f6" },
5
+ "libraries": {},
6
+ "variables": {},
7
+ "privates": {
8
+ "MODEL_DSP": [{ "library": "@digipair/skill-dsp", "element": "modelOpenAI" }]
9
+ }
10
+ }
@@ -0,0 +1,189 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+
5
+ - Source: JSON-based agent, tool, and workflow definitions at the repo root.
6
+ - Agents: `tardi-*`, `studio`, `common`, `worker-skill-builder` (each contains `config.json`, `schema.json`, `*.json` actions/boosts/workflows, and `avatar.png`).
7
+ - Tools: `tool-*` directories (HTTP, JSON, PDF, OAuth2, Sharp, etc.).
8
+ - Core config: `default.json` (global settings), `planning.jsonl` (cron-like scheduled tasks).
9
+
10
+ ## Build, Test, and Development Commands
11
+
12
+ - Build: none. The Digipair/Tessi runtime consumes these JSON files directly.
13
+ - Validate JSON: `jq . tool-http/config.json` (repeat for edited files).
14
+ - Find required fields: `rg -n "metadata.output"` to confirm actions declare output schema.
15
+ - OpenAPI lint (optional): `npx @redocly/cli lint tool-http/schema.json`.
16
+ - Runtime check: load/reload the repository in the Digipair runtime; watch logs for schema or dependency errors.
17
+
18
+ ## Coding Style & Naming Conventions
19
+
20
+ - Format: valid JSON, 2-space indentation, no trailing commas.
21
+ - Naming: directories kebab-case; files kebab-case with intent, e.g., `action-*.json`, `workflow-*.json`.
22
+ - Schemas: `schema.json` must be OpenAPI 3.0 compliant; do not edit schemas to register new reasonings (they are auto-discovered).
23
+ - Libraries: prefer `latest` for `@digipair/skill-*` entries unless a pin is required.
24
+
25
+ ## Testing Guidelines
26
+
27
+ - Syntax: validate all edited JSON with `jq`.
28
+ - Contract: ensure every action declares `metadata.output` with the expected result schema.
29
+ - OpenAPI: validate `schema.json` with an OpenAPI linter.
30
+ - Smoke test: run affected boosts/actions in the runtime UI; verify variables, conditions, and file flows (e.g., S3 `reference`) behave as expected.
31
+
32
+ ## Commit & Pull Request Guidelines
33
+
34
+ - Commits: use concise Conventional-style prefixes seen in history (e.g., `feat: ...`, `fix: ...`). Keep summaries imperative and under ~72 chars.
35
+ - PRs: include purpose, scope, sample paths touched (e.g., `tool-pdf/*`), and screenshots only if UI-facing. Link issues/tickets. Checklist: JSON valid, schemas linted, `metadata.output` present, no secrets committed.
36
+
37
+ ## Security & Configuration Tips
38
+
39
+ - Do not commit secrets or real endpoints; use placeholders and environment-based configuration where applicable.
40
+
41
+ ## Project Architecture
42
+
43
+ This is a **Digipair Agent Factory** containing example configurations for a Tardigrade/Tessi system. The project provides templates and examples for creating AI agents, tools, and automated workflows using the Digipair framework.
44
+
45
+ ### Agent Types
46
+
47
+ - **common**: Shared agent with common actions and utilities
48
+ - **studio**: Development studio agent for managing digipairs, tools, and workers
49
+
50
+ ### Tool Categories
51
+
52
+ - **tool-\* directories**: Various service integrations (HTTP, JSON, PDF, OAuth2, etc.)
53
+ - **worker-\* directories**: Digital agent expert in a specific trade/domain
54
+
55
+ ### Core Configuration Structure
56
+
57
+ - `default.json`: Global default configuration with model endpoints and system paths
58
+ - `planning.jsonl`: JSONL file containing scheduled tasks by cron
59
+
60
+ ### Configuration File Structure
61
+
62
+ Each agent/tool directory contains:
63
+
64
+ - `config.json`: Main configuration with metadata, skill dependencies, and variables
65
+ - `schema.json`: OpenAPI 3.0 schema defining available API endpoints
66
+ - `*.json`: Individual reasoning files (actions, boosts, workflows)
67
+ - `avatar.png`: Visual representation of the agent
68
+
69
+ ### Skill System Architecture
70
+
71
+ The Digipair framework uses a modular skill system:
72
+
73
+ - `@digipair/skill-*`: Main framework skills (basic, chatbot, editor, http, etc.)
74
+ - Libraries defined in `config.json` under the `libraries` and `webLibraries` sections
75
+ - All versions generally set to "latest"
76
+
77
+ ### Model Configuration
78
+
79
+ The `default.json` file configures AI model endpoints:
80
+
81
+ - `MODEL_DSP` / `MODEL_LLM`: Main language models (using vLLM with Gemma 3)
82
+ - `MODEL_DSP_VISION` / `MODEL_VISION`: Vision-capable models
83
+ - `MODEL_EMBEDDINGS`: Embedding models (using Alibaba GTE-Qwen2)
84
+
85
+ ### Reasoning and Workflow System
86
+
87
+ **Reasoning Files**: JSON-based workflow definitions that can be:
88
+
89
+ - **Actions**: Simple API endpoints or operations
90
+ - **Workflows**: Multi-step automated processes
91
+
92
+ ### Working with Agent Configurations
93
+
94
+ #### Configuration Guidelines
95
+
96
+ 1. **JSON Syntax**: All files must be valid JSON—syntax errors break the entire system
97
+ 2. **Schema Compliance**: `schema.json` files must follow the OpenAPI 3.0 specification
98
+ 3. **Library Versions**: Use "latest" for all `@digipair/skill-*` dependencies
99
+ 4. **Metadata**: Controls UI appearance (colors, avatars, descriptions)
100
+
101
+ #### Key Configuration Templates
102
+
103
+ **Agent Metadata**:
104
+
105
+ ```json
106
+ "metadata": {
107
+ "color": "#3b82f6",
108
+ "primary": "#51E0DC",
109
+ "textPrimary": "#242E3B"
110
+ }
111
+ ```
112
+
113
+ **Skill Dependencies**:
114
+
115
+ ```json
116
+ "libraries": {
117
+ "@digipair/skill-basic": "latest",
118
+ "@digipair/skill-chatbot": "latest"
119
+ },
120
+ "webLibraries": {
121
+ "blockly": "latest",
122
+ "toastify-js": "latest"
123
+ }
124
+ ```
125
+
126
+ ### Scheduled Automation
127
+
128
+ **planning.jsonl Structure**:
129
+
130
+ - Each line is a separate JSON object with cron scheduling
131
+ - Current scheduled tasks:
132
+ - Daily consumption calculation (3 AM)
133
+ - Log cleanup (3:30 AM)
134
+ - Reference to specific digipair and reasoning combinations
135
+
136
+ ### Development Environment
137
+
138
+ - **No Build System**: JSON configurations are loaded directly by the Digipair runtime
139
+ - **Hot Reloading**: Changes take effect when the system reloads configurations
140
+ - **No Package Management**: Dependencies managed via the skill system
141
+ - **Runtime Validation**: Invalid JSON or missing dependencies cause runtime errors
142
+
143
+ ### File Type Reference
144
+
145
+ - `config.json`: Agent/tool configuration and dependencies
146
+ - `schema.json`: OpenAPI 3.0 API definitions
147
+ - `*.json`: Reasoning files (actions, boosts, workflows)
148
+ - `planning.jsonl`: Scheduled tasks by cron (JSONL format)
149
+ - `avatar.png`: 256x256 agent avatars
150
+ - `default.json`: Global system configuration
151
+
152
+ ### Action JSON
153
+
154
+ - An action must always have a JSON schema for the output format in the `metadata.output` parameter
155
+ - Do not update the `schema.json` file when adding JSON reasoning files, as they are added automatically
156
+ - Do not handle error cases (try/catch) in actions—leave error handling to the factory
157
+ - Expressions used after the "FEEL:" keyword are in DMN FEEL format
158
+ - String values in properties are interpreted by Handlebars by default, unless they start with "FEEL:"
159
+
160
+ ### List of Usable DMN FEEL Functions
161
+
162
+ In addition to standard DMN FEEL language functions, the following functions can be used within an action:
163
+
164
+ ```typescript
165
+ getTime: (time: string) => new Date(time).getTime(),
166
+ fromTime: (time: number) => new Date(time).toISOString(),
167
+ atob: (value: string) => atob(value),
168
+ btoa: (value: string) => btoa(value),
169
+ encodeURIComponent: (value: string | number | boolean) => encodeURIComponent(value),
170
+ decodeURIComponent: (value: string) => decodeURIComponent(value),
171
+ encodeUTF8: (value: string) =>
172
+ Array.from(new TextEncoder().encode(value))
173
+ .map(b => String.fromCharCode(b))
174
+ .join(''),
175
+ decodeUTF8: (value: string) =>
176
+ new TextDecoder().decode(new Uint8Array(Array.from(value).map(c => c.charCodeAt(0)))),
177
+ JSONparse: (value: string) => JSON.parse(value),
178
+ JSONstringify: (value: string) => JSON.stringify(value),
179
+ ```
180
+
181
+ ### List of Usable Handlebars Functions
182
+
183
+ In addition to standard Handlebars template language functions, the following functions can be used within an action:
184
+
185
+ ```typescript
186
+ Handlebars.registerHelper('JSONstringify', function (value: any) {
187
+ return JSON.stringify(value);
188
+ });
189
+ ```
@@ -0,0 +1,90 @@
1
+ {
2
+ "description": "Génération d'une réponse pour l'utilisateur via le chatbot.",
3
+ "library": "@digipair/skill-factory",
4
+ "element": "task",
5
+ "metadata": {},
6
+ "properties": {
7
+ "execute": [
8
+ {
9
+ "library": "@digipair/skill-basic",
10
+ "element": "setVariable",
11
+ "properties": {
12
+ "name": "userMessageId",
13
+ "execute": [
14
+ {
15
+ "library": "@digipair/skill-basic",
16
+ "element": "transform",
17
+ "properties": {
18
+ "value": "FEEL:if requester.request.body.prompt != null and requester.request.body.prompt != \"\" then getTime() else null"
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ },
24
+ {
25
+ "library": "@digipair/skill-basic",
26
+ "element": "setVariable",
27
+ "properties": {
28
+ "name": "boost",
29
+ "value": {
30
+ "reasoning": "FEEL:requester.request.reasoning",
31
+ "step": "FEEL:request.body.boost[1].step",
32
+ "prompt": "FEEL:request.body.boost[1].prompt",
33
+ "required": "FEEL:request.body.boost[1].required",
34
+ "selector": "FEEL:request.body.boost[1].selector",
35
+ "url": "FEEL:request.body.boost[1].url",
36
+ "inputs": "FEEL:request.body.boost[1].inputs",
37
+ "context": "FEEL:requester.request.body.context"
38
+ }
39
+ },
40
+ "conditions": {
41
+ "if": "FEEL:request.body.boost[1]"
42
+ }
43
+ },
44
+ {
45
+ "library": "@digipair/skill-basic",
46
+ "element": "transform",
47
+ "properties": {
48
+ "value": {
49
+ "uuid": "FEEL:previous[1]",
50
+ "parent_history": "FEEL:variables.userMessageId",
51
+ "parent_conversation": "FEEL:requester.request.body.parent_conversation",
52
+ "assistant": "{{request.body.assistant}}",
53
+ "command": "FEEL:if request.body.command then request.body.command else []",
54
+ "boost": "FEEL:variables.boost",
55
+ "boosts": "FEEL:request.body.boosts",
56
+ "sources": "FEEL:request.body.sources",
57
+ "files": "FEEL:request.body.files",
58
+ "logs": "FEEL:request.body.logs"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "library": "@digipair/skill-factory",
64
+ "element": "execute",
65
+ "properties": {
66
+ "execute": [
67
+ {
68
+ "library": "@digipair/skill-chatbot",
69
+ "element": "answer",
70
+ "properties": {
71
+ "assistant": "FEEL:data.assistant",
72
+ "boosts": "FEEL:data.boosts",
73
+ "logs": "FEEL:data.logs",
74
+ "parent_conversation": "FEEL:data.parent_conversation",
75
+ "parent_history": "FEEL:data.parent_history",
76
+ "sources": "FEEL:data.sources",
77
+ "files": "FEEL:data.files",
78
+ "uuid": "FEEL:data.uuid",
79
+ "boost": "FEEL:data.boost",
80
+ "command": "FEEL:data.command"
81
+ }
82
+ }
83
+ ],
84
+ "context": "FEEL:context put(requester, \"data\", previous)"
85
+ }
86
+ }
87
+ ]
88
+ },
89
+ "pins": []
90
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "description": "Vérifier si le fichier \"avatar.png\" est un format d'image valide et s'assurer qu'il peut être utilisé comme avatar (taille, résolution, contenu approprié).",
3
+ "summary": "Gestion des images",
4
+ "library": "@digipair/skill-service",
5
+ "element": "service",
6
+ "metadata": {},
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-basic",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "avatar",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-common",
17
+ "element": "avatar",
18
+ "properties": {
19
+ "digipair": "FEEL: request.digipair"
20
+ }
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "library": "@digipair/skill-service",
27
+ "element": "headers",
28
+ "properties": {
29
+ "headers": {
30
+ "Content-Type": "FEEL: substring(split(variables.avatar, \";base64,\")[1], 6)"
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "library": "@digipair/skill-basic",
36
+ "element": "base64ToBuffer",
37
+ "properties": {
38
+ "base64": "FEEL: variables.avatar"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "pins": [],
44
+ "digipair": "common",
45
+ "id": "avatar.png"
46
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "summary": "Get boosts",
3
+ "description": "Get boosts for a Digipair.",
4
+ "metadata": {},
5
+ "library": "@digipair/skill-service",
6
+ "element": "service",
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-common",
11
+ "element": "boosts",
12
+ "properties": {
13
+ "digipair": "{{request.digipair}}"
14
+ }
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "summary": "Chatbot",
3
+ "description": "Chatbot",
4
+ "library": "@digipair/skill-web",
5
+ "element": "page",
6
+ "metadata": {},
7
+ "properties": {
8
+ "body": [
9
+ {
10
+ "library": "@digipair/skill-web-chatbot",
11
+ "element": "digipair-chatbot-full",
12
+ "properties": { "code": "{{request.digipair}}" }
13
+ }
14
+ ],
15
+ "styleBody": "background-color:#212E3C;"
16
+ },
17
+ "pins": []
18
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "common",
3
+ "description": "common actions.",
4
+ "metadata": { "color": "#3b82f6" },
5
+ "libraries": {
6
+ "@digipair/skill-basic": "latest",
7
+ "@digipair/skill-factory": "latest",
8
+ "@digipair/skill-service": "latest",
9
+ "@digipair/skill-chatbot": "latest",
10
+ "@digipair/skill-dsp": "latest",
11
+ "@digipair/skill-sse": "latest",
12
+ "@digipair/skill-common": "latest",
13
+ "@digipair/skill-debug": "latest",
14
+ "@digipair/skill-web": "latest",
15
+ "@digipair/skill-web-chatbot": "latest",
16
+ "@digipair/skill-web-inputs": "latest"
17
+ },
18
+ "variables": {},
19
+ "privates": {}
20
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "description": "Étude des éléments environnants pour comprendre le contexte.",
3
+ "summary": "Analyse contextuelle",
4
+ "library": "@digipair/skill-service",
5
+ "element": "service",
6
+ "metadata": {},
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-basic",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "schema",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-factory",
17
+ "element": "start",
18
+ "properties": {
19
+ "reasoning": "schema.json",
20
+ "digipair": "FEEL: request.digipair"
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ },
26
+ {
27
+ "library": "@digipair/skill-basic",
28
+ "element": "setVariable",
29
+ "properties": {
30
+ "name": "context",
31
+ "execute": [
32
+ {
33
+ "library": "@digipair/skill-basic",
34
+ "element": "transform",
35
+ "properties": {
36
+ "value": "FEEL: get value(variables.schema.paths, \"/\" + request.body.reasoning).post.parameters"
37
+ }
38
+ },
39
+ {
40
+ "library": "@digipair/skill-basic",
41
+ "element": "transform",
42
+ "properties": {
43
+ "value": "FEEL: get value(variables.schema.paths, \"/\" + substring(request.body.reasoning, 7)).post.parameters"
44
+ },
45
+ "conditions": {
46
+ "if": "FEEL: previous = null and starts with(request.body.reasoning, \"boost-\")"
47
+ }
48
+ },
49
+ {
50
+ "library": "@digipair/skill-basic",
51
+ "element": "transform",
52
+ "properties": {
53
+ "value": []
54
+ },
55
+ "conditions": {
56
+ "if": "FEEL: previous = null"
57
+ }
58
+ }
59
+ ]
60
+ }
61
+ },
62
+ {
63
+ "library": "@digipair/skill-basic",
64
+ "element": "transform",
65
+ "properties": {
66
+ "value": {
67
+ "summary": "FEEL: variables.schema.info.summary",
68
+ "description": "FEEL: variables.schema.info.description",
69
+ "context": "FEEL: variables.context"
70
+ }
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ "pins": []
76
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "description": "Generating a response for the user via the chatbot.",
3
+ "summary": "Conversation",
4
+ "library": "@digipair/skill-chatbot",
5
+ "element": "boost",
6
+ "metadata": {
7
+ "standalone": false,
8
+ "selector": "any",
9
+ "url": "^$"
10
+ },
11
+ "properties": {
12
+ "steps": [
13
+ {
14
+ "name": "Conversation",
15
+ "execute": [
16
+ {
17
+ "library": "@digipair/skill-basic",
18
+ "element": "setVariable",
19
+ "properties": {
20
+ "name": "history",
21
+ "value": "FEEL:if request.body.inputs[1].value = null then []\nelse request.body.inputs[1].value"
22
+ }
23
+ },
24
+ {
25
+ "library": "@digipair/skill-dsp",
26
+ "element": "generate",
27
+ "properties": {
28
+ "signature": "\"You are a helpful assistant, capable of explaining concepts in a simple manner.\" \nuserQuestion:string,\nhistory?:string[] ->\n answer: string \"Assistant answer\"",
29
+ "input": {
30
+ "userQuestion": "{{request.body.prompt}}",
31
+ "history": "FEEL:variables.history"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "library": "@digipair/skill-factory",
37
+ "element": "start",
38
+ "properties": {
39
+ "reasoning": "answer",
40
+ "body": {
41
+ "assistant": "{{previous.answer}}",
42
+ "boost": [
43
+ {
44
+ "prompt": true,
45
+ "required": true,
46
+ "step": "Conversation",
47
+ "inputs": [
48
+ {
49
+ "library": "@digipair/skill-web-inputs",
50
+ "element": "digipair-input-hidden",
51
+ "properties": {
52
+ "value": "FEEL:flatten([variables.history, [\n \"user: \" + request.body.prompt,\n \"assistant: \" + parent.previous.answer\n]])"
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ },
65
+ "pins": []
66
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "summary": "History",
3
+ "description": "Return the start conversation history.",
4
+ "metadata": {},
5
+ "library": "@digipair/skill-service",
6
+ "element": "service",
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-basic",
11
+ "element": "transform",
12
+ "properties": {
13
+ "value": [
14
+ {
15
+ "role": "assistant",
16
+ "content": "Welcome! How may I assist you today?"
17
+ }
18
+ ]
19
+ }
20
+ }
21
+ ]
22
+ }
23
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "description": "Exposition of the agent via the MCP (Model Context Protocol)",
3
+ "summary": "Model Context Protocol",
4
+ "library": "@digipair/skill-service",
5
+ "element": "service",
6
+ "metadata": {},
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-basic",
11
+ "element": "setVariable",
12
+ "properties": {
13
+ "name": "remote",
14
+ "execute": [
15
+ {
16
+ "library": "@digipair/skill-common",
17
+ "element": "metadata",
18
+ "properties": { "digipair": "FEEL: request.digipair" }
19
+ },
20
+ {
21
+ "library": "@digipair/skill-basic",
22
+ "element": "transform",
23
+ "properties": { "value": "FEEL: previous.remote" }
24
+ }
25
+ ]
26
+ }
27
+ },
28
+ {
29
+ "library": "@digipair/skill-basic",
30
+ "element": "transform",
31
+ "properties": {
32
+ "execute": [
33
+ {
34
+ "library": "@digipair/skill-factory",
35
+ "element": "stop",
36
+ "properties": { "value": 405 }
37
+ }
38
+ ]
39
+ },
40
+ "conditions": { "if": "FEEL: variables.remote != true" }
41
+ },
42
+ {
43
+ "library": "@digipair/skill-basic",
44
+ "element": "transform",
45
+ "properties": {
46
+ "execute": [
47
+ {
48
+ "library": "@digipair/skill-basic",
49
+ "element": "setVariable",
50
+ "properties": {
51
+ "name": "tools",
52
+ "execute": [
53
+ {
54
+ "library": "@digipair/skill-factory",
55
+ "element": "start",
56
+ "properties": { "reasoning": "schema.json" }
57
+ },
58
+ {
59
+ "library": "@digipair/skill-basic",
60
+ "element": "transform",
61
+ "properties": {
62
+ "value": {
63
+ "name": "FEEL: substring(item.key, 2)",
64
+ "description": "FEEL: item.value.post.description",
65
+ "title": "FEEL: item.value.post.summary",
66
+ "inputSchema": "FEEL: context(\n for parameter in item.value.post.parameters return \n { key: parameter.name, value: parameter.schema }\n)",
67
+ "execute": "FEEL: [\n {\n \"library\": \"@digipair/skill-factory\",\n \"element\": \"start\",\n \"properties\": {\n \"reasoning\": substring(item.key, 2),\n \"body\": \"FEEL: params\"\n }\n },\n {\n \"library\": \"@digipair/skill-basic\",\n \"element\": \"transform\",\n \"properties\": {\n \"value\": \"FEEL: { content: [{ type: \\\"text\\\", text: JSONstringify(if previous != null then previous else {}) }], structuredContent: previous }\"\n }\n }\n]"
68
+ }
69
+ },
70
+ "conditions": { "each": "FEEL: get entries(previous.paths)" }
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "library": "@digipair/skill-mcp",
77
+ "element": "createServer",
78
+ "properties": { "tools": "FEEL: variables.tools" }
79
+ },
80
+ { "library": "@digipair/skill-factory", "element": "keepAlive" }
81
+ ]
82
+ },
83
+ "conditions": { "if": "FEEL: variables.remote = true" }
84
+ }
85
+ ]
86
+ },
87
+ "pins": []
88
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "summary": "Get metadata",
3
+ "description": "Get metadata for a Digipair.",
4
+ "metadata": {},
5
+ "library": "@digipair/skill-service",
6
+ "element": "service",
7
+ "properties": {
8
+ "execute": [
9
+ {
10
+ "library": "@digipair/skill-common",
11
+ "element": "metadata",
12
+ "properties": {
13
+ "digipair": "{{request.digipair}}"
14
+ }
15
+ }
16
+ ]
17
+ }
18
+ }