@synap-core/workspace-templates 0.35.0 → 0.36.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.
@@ -488,6 +488,16 @@ interface TemplatePlaybook {
488
488
  * closed `capability_intents` vocabulary (`@synap-core/types/capability-intents`).
489
489
  */
490
490
  requiredIntents?: string[];
491
+ /**
492
+ * The rules the process follows, in order (pod `playbookGuidanceSchema`,
493
+ * backend#924): `{ ref: "kind:<slug>" | "skill:<slug>", label?, when?, where? }`.
494
+ */
495
+ guidance?: Array<{
496
+ ref: string;
497
+ label?: string;
498
+ when?: string;
499
+ where?: Record<string, string[]>;
500
+ }>;
491
501
  /**
492
502
  * DECLARATIONS of when the process starts. Compiled at install/apply into
493
503
  * governed rules through the pod's ONE rule door and linked in
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-DHDi8C33.js';
2
- export { B as BentoViewBlockWire, c as BentoWidgetBlockWire, d as BuiltSpacePackage, e as BuiltSpacePackageCell, I as INTENT_LABEL_MAX, P as PACKAGE_DEPENDENCY_KINDS, f as PackageAutomationWire, g as PackageDefinitionOutput, h as PackageDependencyKind, S as START_EXAMPLE_RANGE, i as START_STARTERS_RANGE, j as START_VIEWS_MAX, k as SpacePackageCellWire, l as SplitBentoBlocks, m as TemplateActionPlacement, n as TemplateAppKind, o as TemplateAppRef, p as TemplateAutomation, q as TemplateBentoBlock, r as TemplateDefaultSource, s as TemplateDisplayTemplate, t as TemplateEntityLink, u as TemplateExtendsRef, v as TemplateIntegration, w as TemplateIntent, x as TemplateLayoutConfig, y as TemplateMeta, z as TemplateOnboarding, A as TemplateOnboardingCollectTarget, C as TemplatePlaybook, D as TemplatePlaybookParam, E as TemplatePrimarySurface, F as TemplateProfile, G as TemplateProfileEntityBentoTemplates, H as TemplateProperty, J as TemplateSeedEntity, K as TemplateSidebarItem, L as TemplateSidebarSurface, M as TemplateSourceRole, N as TemplateSpacePackage, O as TemplateSpacePackageCell, Q as TemplateStart, R as TemplateSuggestedRelation, U as TemplateView, V as ToDefinitionResult, X as WorkspaceDefinitionInput, Y as WorkspaceJsonValue, Z as WorkspacePrimarySurface, _ as WorkspacePrimarySurfaceViewReference, $ as normalizeTemplateLayout, a0 as spacePackageCells, a1 as splitBentoBlocks, a2 as toAutomationWire, a3 as toPackageDefinition, a4 as toWorkspaceDefinition } from './define-DHDi8C33.js';
1
+ import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-YL-hIPcn.js';
2
+ export { B as BentoViewBlockWire, c as BentoWidgetBlockWire, d as BuiltSpacePackage, e as BuiltSpacePackageCell, I as INTENT_LABEL_MAX, P as PACKAGE_DEPENDENCY_KINDS, f as PackageAutomationWire, g as PackageDefinitionOutput, h as PackageDependencyKind, S as START_EXAMPLE_RANGE, i as START_STARTERS_RANGE, j as START_VIEWS_MAX, k as SpacePackageCellWire, l as SplitBentoBlocks, m as TemplateActionPlacement, n as TemplateAppKind, o as TemplateAppRef, p as TemplateAutomation, q as TemplateBentoBlock, r as TemplateDefaultSource, s as TemplateDisplayTemplate, t as TemplateEntityLink, u as TemplateExtendsRef, v as TemplateIntegration, w as TemplateIntent, x as TemplateLayoutConfig, y as TemplateMeta, z as TemplateOnboarding, A as TemplateOnboardingCollectTarget, C as TemplatePlaybook, D as TemplatePlaybookParam, E as TemplatePrimarySurface, F as TemplateProfile, G as TemplateProfileEntityBentoTemplates, H as TemplateProperty, J as TemplateSeedEntity, K as TemplateSidebarItem, L as TemplateSidebarSurface, M as TemplateSourceRole, N as TemplateSpacePackage, O as TemplateSpacePackageCell, Q as TemplateStart, R as TemplateSuggestedRelation, U as TemplateView, V as ToDefinitionResult, X as WorkspaceDefinitionInput, Y as WorkspaceJsonValue, Z as WorkspacePrimarySurface, _ as WorkspacePrimarySurfaceViewReference, $ as normalizeTemplateLayout, a0 as spacePackageCells, a1 as splitBentoBlocks, a2 as toAutomationWire, a3 as toPackageDefinition, a4 as toWorkspaceDefinition } from './define-YL-hIPcn.js';
3
3
  import '@synap-core/types/presentation';
4
4
  import '@synap-core/types/space-brief';
5
5
  import '@synap-core/types/capability-intents';
package/dist/index.js CHANGED
@@ -14443,6 +14443,16 @@ var DATA = {
14443
14443
  "sentDate"
14444
14444
  ]
14445
14445
  }
14446
+ },
14447
+ {
14448
+ "name": "Health",
14449
+ "slug": "health",
14450
+ "type": "bento",
14451
+ "description": "The health of your sales at a glance, one tile per question you asked, each one approved by you.",
14452
+ "config": {
14453
+ "layout": "bento",
14454
+ "blocks": []
14455
+ }
14446
14456
  }
14447
14457
  ],
14448
14458
  "onboarding": {
@@ -15741,6 +15751,71 @@ var DATA = {
15741
15751
  ]
15742
15752
  }
15743
15753
  ]
15754
+ },
15755
+ {
15756
+ "name": "Propose a Health cell",
15757
+ "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).",
15758
+ "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_widgets); 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, lifecycle.throughput, attention.needsYou, attention.count, sessions.list, lifecycle.home, lifecycle.moving, documents.get, lens.page) 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.`,
15759
+ "params": [
15760
+ {
15761
+ "name": "question",
15762
+ "type": "text",
15763
+ "label": "What should the tile answer?",
15764
+ "required": true
15765
+ }
15766
+ ],
15767
+ "executor": "external-agent",
15768
+ "status": "active",
15769
+ "stages": [
15770
+ {
15771
+ "key": "draft",
15772
+ "name": "Write the tile",
15773
+ "category": "started",
15774
+ "goal": "Find the Health view, check no tile already answers the question, write one self-contained HTML page that answers it (live through the cell bridge, a dated snapshot for what the bridge cannot read), and file it with synap_create_cell, contentKind widget, workspaceId the CRM space and placeOn the Health view.",
15775
+ "expectedOutputs": [
15776
+ {
15777
+ "kind": "cell",
15778
+ "label": "Proposed Health tile",
15779
+ "relationToSubject": "none"
15780
+ }
15781
+ ],
15782
+ "criteria": [
15783
+ {
15784
+ "key": "health-cell-placed",
15785
+ "statement": "One cell/define proposal was filed through synap_create_cell with contentKind widget, workspaceId the CRM space and placeOn the Health view's id, and no other dashboard or view was created.",
15786
+ "check": {
15787
+ "kind": "judge"
15788
+ }
15789
+ },
15790
+ {
15791
+ "key": "health-cell-bridge-only",
15792
+ "statement": "The page reads pod data only through window.synap.query with ops of the cell bridge table, and holds no token, pod URL, workspaceId, fetch or remote script, style, font or image.",
15793
+ "check": {
15794
+ "kind": "judge"
15795
+ }
15796
+ },
15797
+ {
15798
+ "key": "health-cell-sourced",
15799
+ "statement": "Every number the page shows is either queried live through the bridge or a snapshot shown with the date it was taken and how it was counted; no number is invented.",
15800
+ "check": {
15801
+ "kind": "judge"
15802
+ }
15803
+ }
15804
+ ]
15805
+ },
15806
+ {
15807
+ "key": "approve",
15808
+ "name": "You approve the tile",
15809
+ "category": "completed",
15810
+ "goal": "The person previews the proposed tile and approves it (the cell is defined and its tile placed on Health) or rejects it.",
15811
+ "gate": {
15812
+ "kind": "human"
15813
+ },
15814
+ "onFail": {
15815
+ "toStage": "draft"
15816
+ }
15817
+ }
15818
+ ]
15744
15819
  }
15745
15820
  ],
15746
15821
  "actionPlacements": [