@synap-core/workspace-templates 0.74.1 → 0.75.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/dist/index.js +148 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__fixtures__/dev-facts.pull-request-opened.json +72 -0
- package/src/builder.yaml +83 -0
- package/src/crm.yaml +2 -1
- package/src/dev-flow-change.template.test.ts +170 -0
- package/src/templates.ts +145 -1
package/dist/index.js
CHANGED
|
@@ -10289,6 +10289,150 @@ var DATA = {
|
|
|
10289
10289
|
}
|
|
10290
10290
|
]
|
|
10291
10291
|
}
|
|
10292
|
+
},
|
|
10293
|
+
{
|
|
10294
|
+
"key": "pull-request-names-change-session",
|
|
10295
|
+
"name": "A pull request names its change's session",
|
|
10296
|
+
"description": "A dev fact about a pull request (opened, reopened, queued, merged or closed) that names one session fills its change's Session, once: a change that already names a session keeps it, and a pull request that names no session, or several, leaves it empty.",
|
|
10297
|
+
"triggerType": "event",
|
|
10298
|
+
"triggerConfig": {
|
|
10299
|
+
"eventPattern": "dev.*"
|
|
10300
|
+
},
|
|
10301
|
+
"status": "active",
|
|
10302
|
+
"flow": {
|
|
10303
|
+
"nodes": [
|
|
10304
|
+
{
|
|
10305
|
+
"id": "t",
|
|
10306
|
+
"type": "trigger",
|
|
10307
|
+
"position": {
|
|
10308
|
+
"x": 0,
|
|
10309
|
+
"y": 0
|
|
10310
|
+
},
|
|
10311
|
+
"data": {
|
|
10312
|
+
"label": "A dev fact is recorded",
|
|
10313
|
+
"triggerType": "event",
|
|
10314
|
+
"config": {
|
|
10315
|
+
"eventPattern": "dev.*"
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
},
|
|
10319
|
+
{
|
|
10320
|
+
"id": "names-session",
|
|
10321
|
+
"type": "condition",
|
|
10322
|
+
"position": {
|
|
10323
|
+
"x": 0,
|
|
10324
|
+
"y": 120
|
|
10325
|
+
},
|
|
10326
|
+
"data": {
|
|
10327
|
+
"label": "It names one session",
|
|
10328
|
+
"expression": 'trigger.payload.data.sessionId != ""'
|
|
10329
|
+
}
|
|
10330
|
+
},
|
|
10331
|
+
{
|
|
10332
|
+
"id": "wait",
|
|
10333
|
+
"type": "delay",
|
|
10334
|
+
"position": {
|
|
10335
|
+
"x": 0,
|
|
10336
|
+
"y": 240
|
|
10337
|
+
},
|
|
10338
|
+
"data": {
|
|
10339
|
+
"label": "Wait for its change to exist",
|
|
10340
|
+
"duration": "5m"
|
|
10341
|
+
}
|
|
10342
|
+
},
|
|
10343
|
+
{
|
|
10344
|
+
"id": "find",
|
|
10345
|
+
"type": "query",
|
|
10346
|
+
"position": {
|
|
10347
|
+
"x": 0,
|
|
10348
|
+
"y": 360
|
|
10349
|
+
},
|
|
10350
|
+
"data": {
|
|
10351
|
+
"label": "Its change",
|
|
10352
|
+
"profileSlug": "change",
|
|
10353
|
+
"limit": 1,
|
|
10354
|
+
"filter": '{"prRef": "{{trigger.payload.data.repo}}#{{trigger.payload.data.number}}"}'
|
|
10355
|
+
}
|
|
10356
|
+
},
|
|
10357
|
+
{
|
|
10358
|
+
"id": "has-change",
|
|
10359
|
+
"type": "condition",
|
|
10360
|
+
"position": {
|
|
10361
|
+
"x": 0,
|
|
10362
|
+
"y": 480
|
|
10363
|
+
},
|
|
10364
|
+
"data": {
|
|
10365
|
+
"label": "It has a change",
|
|
10366
|
+
"expression": "steps.find.output.count >= 1"
|
|
10367
|
+
}
|
|
10368
|
+
},
|
|
10369
|
+
{
|
|
10370
|
+
"id": "no-session-yet",
|
|
10371
|
+
"type": "condition",
|
|
10372
|
+
"position": {
|
|
10373
|
+
"x": 0,
|
|
10374
|
+
"y": 600
|
|
10375
|
+
},
|
|
10376
|
+
"data": {
|
|
10377
|
+
"label": "Its change names no session yet",
|
|
10378
|
+
"expression": 'steps.find.output.entities[0].properties.session == ""'
|
|
10379
|
+
}
|
|
10380
|
+
},
|
|
10381
|
+
{
|
|
10382
|
+
"id": "name-session",
|
|
10383
|
+
"type": "output",
|
|
10384
|
+
"position": {
|
|
10385
|
+
"x": 0,
|
|
10386
|
+
"y": 720
|
|
10387
|
+
},
|
|
10388
|
+
"data": {
|
|
10389
|
+
"label": "The change names its session",
|
|
10390
|
+
"outputType": "entity_update",
|
|
10391
|
+
"config": {
|
|
10392
|
+
"entityId": "{{steps.find.output.entities[0].id}}",
|
|
10393
|
+
"properties": {
|
|
10394
|
+
"session": "{{trigger.payload.data.sessionId}}"
|
|
10395
|
+
}
|
|
10396
|
+
}
|
|
10397
|
+
}
|
|
10398
|
+
}
|
|
10399
|
+
],
|
|
10400
|
+
"edges": [
|
|
10401
|
+
{
|
|
10402
|
+
"id": "t--names-session",
|
|
10403
|
+
"source": "t",
|
|
10404
|
+
"target": "names-session"
|
|
10405
|
+
},
|
|
10406
|
+
{
|
|
10407
|
+
"id": "names-session--wait",
|
|
10408
|
+
"source": "names-session",
|
|
10409
|
+
"target": "wait",
|
|
10410
|
+
"sourceHandle": "yes"
|
|
10411
|
+
},
|
|
10412
|
+
{
|
|
10413
|
+
"id": "wait--find",
|
|
10414
|
+
"source": "wait",
|
|
10415
|
+
"target": "find"
|
|
10416
|
+
},
|
|
10417
|
+
{
|
|
10418
|
+
"id": "find--has-change",
|
|
10419
|
+
"source": "find",
|
|
10420
|
+
"target": "has-change"
|
|
10421
|
+
},
|
|
10422
|
+
{
|
|
10423
|
+
"id": "has-change--no-session-yet",
|
|
10424
|
+
"source": "has-change",
|
|
10425
|
+
"target": "no-session-yet",
|
|
10426
|
+
"sourceHandle": "yes"
|
|
10427
|
+
},
|
|
10428
|
+
{
|
|
10429
|
+
"id": "no-session-yet--name-session",
|
|
10430
|
+
"source": "no-session-yet",
|
|
10431
|
+
"target": "name-session",
|
|
10432
|
+
"sourceHandle": "yes"
|
|
10433
|
+
}
|
|
10434
|
+
]
|
|
10435
|
+
}
|
|
10292
10436
|
}
|
|
10293
10437
|
],
|
|
10294
10438
|
"skills": [
|
|
@@ -18704,7 +18848,7 @@ var DATA = {
|
|
|
18704
18848
|
{
|
|
18705
18849
|
"name": "Propose a Health cell",
|
|
18706
18850
|
"description": "Answer one question about your sales with a tile on the Health dashboard; the AI writes the tile and you approve it before it shows. Run by one of your agents for now (Synap AI cannot place a tile yet).",
|
|
18707
|
-
"goalTemplate": `Propose one Health tile that answers: {question}. FIND THE VIEW: in the CRM space, the bento view named Health (synap_list_views with the space's workspaceId, type bento). When the space has none, stop and say so: never create another dashboard. READ FIRST: what already sits on Health (its config.blocks: each widget tile names a cell by widgetType) and the space's cells (synap_list_cells); when a tile already answers the question, say which one and stop. DATA: decide where each number comes from. A cell reads the pod ONLY through the cell bridge, at render time: window.synap.query(op, params), with an op of the bridge table (entities.list, entities.get, views.list, profiles.list, lifecycle.board, flow.of, lifecycle.throughput, attention.needsYou, attention.count, sessions.list, lifecycle.home, lifecycle.moving, documents.get, lens.page, sessions.get, playbook.process, playbook.scorecard, project.pillars, views.get, views.execute, profiles.get, propertyDefs.list, lifecycle.get, graph.of) and only that op's params; the host stamps the space, so never put a workspaceId, a token, a pod URL or a fetch in the page. What the bridge reads stays live: query it in the page, never paste its rows. What it cannot read yet (messages, replies, sends: the bridge has no message op) you read now with your own tools (synap_get_channel, synap_get_entities) and write into the page as a snapshot, with the date it was taken shown on the tile (for example "au 8 novembre") and how it was counted. Never invent a number: a figure you cannot source is left out and the tile says what is missing. THE PAGE: one self-contained HTML page, inline script and style only (no CDN, no remote font or image: the frame's CSP refuses them), that answers the question in one glance (a number, a short table or a small chart), in the person's language (French by default), readable in light and dark, and that shows an error, never an empty tile, when a query fails. FILE IT: synap_create_cell with name = a short title of the question, rendererSource = the page, workspaceId = the CRM space (never pod-wide: the CRM app reads only its space's cells), contentKind widget, placeOn = {viewId: the Health view's id}, and reasoning = the question in the person's words. It comes back proposed: that is success, never retry it; the person approves it in the CRM or the pod, which defines the cell and puts its tile on Health in one act. One cell per run.`,
|
|
18851
|
+
"goalTemplate": `Propose one Health tile that answers: {question}. FIND THE VIEW: in the CRM space, the bento view named Health (synap_list_views with the space's workspaceId, type bento). When the space has none, stop and say so: never create another dashboard. READ FIRST: what already sits on Health (its config.blocks: each widget tile names a cell by widgetType) and the space's cells (synap_list_cells); when a tile already answers the question, say which one and stop. DATA: decide where each number comes from. A cell reads the pod ONLY through the cell bridge, at render time: window.synap.query(op, params), with an op of the bridge table (entities.list, entities.get, views.list, profiles.list, lifecycle.board, flow.of, lifecycle.throughput, attention.needsYou, attention.count, sessions.list, lifecycle.home, lifecycle.moving, documents.get, lens.page, sessions.get, playbook.process, playbook.scorecard, project.pillars, views.get, views.execute, profiles.get, propertyDefs.list, lifecycle.get, graph.of, automations.list, automations.runs, playbooks.list, surfaces.of) and only that op's params; the host stamps the space, so never put a workspaceId, a token, a pod URL or a fetch in the page. What the bridge reads stays live: query it in the page, never paste its rows. What it cannot read yet (messages, replies, sends: the bridge has no message op) you read now with your own tools (synap_get_channel, synap_get_entities) and write into the page as a snapshot, with the date it was taken shown on the tile (for example "au 8 novembre") and how it was counted. Never invent a number: a figure you cannot source is left out and the tile says what is missing. THE PAGE: one self-contained HTML page, inline script and style only (no CDN, no remote font or image: the frame's CSP refuses them), that answers the question in one glance (a number, a short table or a small chart), in the person's language (French by default), readable in light and dark, and that shows an error, never an empty tile, when a query fails. FILE IT: synap_create_cell with name = a short title of the question, rendererSource = the page, workspaceId = the CRM space (never pod-wide: the CRM app reads only its space's cells), contentKind widget, placeOn = {viewId: the Health view's id}, and reasoning = the question in the person's words. It comes back proposed: that is success, never retry it; the person approves it in the CRM or the pod, which defines the cell and puts its tile on Health in one act. One cell per run.`,
|
|
18708
18852
|
"params": [
|
|
18709
18853
|
{
|
|
18710
18854
|
"name": "question",
|
|
@@ -37888,6 +38032,7 @@ var vocabularyFr = {
|
|
|
37888
38032
|
"intent.download_media": "T\xE9l\xE9charger un m\xE9dia",
|
|
37889
38033
|
"intent.provision_compute": "D\xE9marrer une machine cloud",
|
|
37890
38034
|
"intent.release_compute": "Arr\xEAter une machine cloud",
|
|
38035
|
+
"intent.search_library": "Chercher dans une biblioth\xE8que",
|
|
37891
38036
|
// ── Needs-you counts: `needsYou.count.<kind>` (French counts 0 and 1 as
|
|
37892
38037
|
// singular; `many` is a whole number of millions: "1000000 de décisions") ──
|
|
37893
38038
|
"needsYou.count.decision": "{n, plural, one {# d\xE9cision} many {# de d\xE9cisions} other {# d\xE9cisions}}",
|
|
@@ -39604,7 +39749,8 @@ var INTENT_LABELS = {
|
|
|
39604
39749
|
transcribe_media: "Transcribe media",
|
|
39605
39750
|
download_media: "Download media",
|
|
39606
39751
|
provision_compute: "Start a cloud machine",
|
|
39607
|
-
release_compute: "Stop a cloud machine"
|
|
39752
|
+
release_compute: "Stop a cloud machine",
|
|
39753
|
+
search_library: "Search a library"
|
|
39608
39754
|
};
|
|
39609
39755
|
var RUNNER_STATE_LABELS = {
|
|
39610
39756
|
busy: "Working",
|