@synap-core/workspace-templates 0.47.0 → 0.49.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/README.md +9 -2
- package/capabilities/postiz.capability.json +8 -4
- package/capabilities/unipile-linkedin.capability.json +39 -3
- package/dist/{define-BAPO0xZf.d.ts → define-Dto5_E47.d.ts} +15 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +244 -158
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-library.yaml +6 -6
- package/src/builder.yaml +17 -12
- package/src/content-os.template.test.ts +38 -22
- package/src/content-os.video-takes.template.test.ts +4 -2
- package/src/content-os.yaml +33 -23
- package/src/crm-absorbs-outreach.template.test.ts +5 -1
- package/src/crm.yaml +19 -11
- package/src/decisions-wave.template.test.ts +99 -5
- package/src/finance.yaml +11 -6
- package/src/lead-becomes-client.template.test.ts +4 -1
- package/src/lifecycle-declarations.test.ts +1 -1
- package/src/marketing.yaml +3 -3
- package/src/operations.yaml +8 -8
- package/src/postiz-contract.test.ts +25 -5
- package/src/process-contract.validate.test.ts +4 -1
- package/src/publish-official-lib.test.ts +8 -7
- package/src/research-base.yaml +2 -2
- package/src/research-decision.yaml +1 -1
- package/src/ship-a-change.template.test.ts +11 -2
- package/src/templates.ts +80 -59
- package/src/types.ts +15 -3
- package/src/unipile-lookups-read-only.test.ts +1 -0
- package/src/validate-flow.ts +15 -1
- package/src/validate.ts +40 -4
package/README.md
CHANGED
|
@@ -98,6 +98,12 @@ visibility go in `meta`; the definition goes in `spec`.
|
|
|
98
98
|
reading a link is the pod's built-in `web.read` verb (Synap Core), not a catalog capability: the old
|
|
99
99
|
`web.read` pack is retired.
|
|
100
100
|
|
|
101
|
+
- **A verb that must always ask** (it deletes, destroys or publishes) declares `metadata.proposeOnly: true`:
|
|
102
|
+
no auto grant and no "runs on its own" rule ever runs it, whatever its name. Adding it later only
|
|
103
|
+
tightens (it reaches installed pods without a re-approval); setting it back to `false` re-earns the
|
|
104
|
+
owner's approval. Never beside `readOnly: true`. Reference: `postiz`'s four post verbs.
|
|
105
|
+
`synap catalog validate` enforces the shape (`skill-propose-only`).
|
|
106
|
+
|
|
101
107
|
**Skill.** Either a manifest `skills/<slug>/<slug>.skill.json` (`kind: skill`,
|
|
102
108
|
`spec` = the CP's `definition.skill`), or an Agent-Skills folder
|
|
103
109
|
`skills/<slug>/SKILL.md`. A folder stays in the shape `synap bridge-setup` reads; to
|
|
@@ -270,8 +276,9 @@ proposal; the review is the catalog commit.
|
|
|
270
276
|
| Field | Where | Rule |
|
|
271
277
|
|---|---|---|
|
|
272
278
|
| `subjectProfile.profileSlug` | playbook | The kind or role the process works. |
|
|
273
|
-
| (no status field) | playbook | The process FOLLOWS the kind's declared lifecycle: every `subjectStatus` and worker `status` is an option of it. `statusProperty`, `onEnd` and `humanOnlyStatuses` are retired (One model decision 4, `playbook-field-retired`): a person-only option is `humanOnly` on the lifecycle, a status no stage owns is derived by the pod, and a session that ends early moves nothing. |
|
|
274
|
-
| `stages[].subjectStatus` | stage |
|
|
279
|
+
| (no status field) | playbook | The process FOLLOWS the kind's declared lifecycle: every `subjectStatus`, `onApproved` and worker `status` is an option of it. `statusProperty`, `onEnd` and `humanOnlyStatuses` are retired (One model decision 4, `playbook-field-retired`): a person-only option is `humanOnly` on the lifecycle, a status no stage owns is derived by the pod, and a session that ends early moves nothing. |
|
|
280
|
+
| `stages[].subjectStatus` | stage | The IN-PROGRESS status (In Draft, Review): entering the stage moves the subject to this option, through the door. Must be an **existing option** of the lifecycle — never invent one. |
|
|
281
|
+
| `stages[].onApproved` | stage | The RESULT status (Scripted, sent, won): reached when the stage's work is APPROVED — its `expectedOutputs` all delivered, else the next stage's gate passing (decision D2). The subject holding it means the run stands at the NEXT stage. With neither (a last stage, or an ungated next stage, and no required output) the engine never writes it, never on a session's end: it stays declared so the follow and `flow.of` know what the stage reaches, and the stage's goal must name the move (the value or its label) for whoever finishes it, through the status door (`stage-on-approved-no-signal`). An agent's move into a done or lost option comes back proposed for the person. |
|
|
275
282
|
| `stages[].gate` | stage | `{kind: human}` at every commitment: send to a client, sign, pay, publish, won/lost, anything irreversible. `{kind: check}` only where the stage's own criteria can be verified. A gated stage writes its status only when the gate passes. A check gate judges the stage being LEFT, so never use it to guard an irreversible status. |
|
|
276
283
|
| `stages[].onFail` | stage | `{toStage: <key>}` — where a rejected gate sends the run (rework loop). |
|
|
277
284
|
| `stages[].criteria` | stage | 2–5 binary statements; `check.kind` evidence (cheapest) · capability · judge · human. |
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
"executionMode": "sync",
|
|
79
79
|
"timeoutSeconds": 60,
|
|
80
80
|
"metadata": {
|
|
81
|
-
"verbType": "write"
|
|
81
|
+
"verbType": "write",
|
|
82
|
+
"proposeOnly": true
|
|
82
83
|
},
|
|
83
84
|
"parameters": {
|
|
84
85
|
"content": "string",
|
|
@@ -148,7 +149,8 @@
|
|
|
148
149
|
"executionMode": "sync",
|
|
149
150
|
"timeoutSeconds": 60,
|
|
150
151
|
"metadata": {
|
|
151
|
-
"verbType": "write"
|
|
152
|
+
"verbType": "write",
|
|
153
|
+
"proposeOnly": true
|
|
152
154
|
},
|
|
153
155
|
"parameters": {
|
|
154
156
|
"content": "string",
|
|
@@ -232,7 +234,8 @@
|
|
|
232
234
|
"executionMode": "sync",
|
|
233
235
|
"timeoutSeconds": 60,
|
|
234
236
|
"metadata": {
|
|
235
|
-
"verbType": "write"
|
|
237
|
+
"verbType": "write",
|
|
238
|
+
"proposeOnly": true
|
|
236
239
|
},
|
|
237
240
|
"parameters": {
|
|
238
241
|
"content": "string",
|
|
@@ -448,7 +451,8 @@
|
|
|
448
451
|
"properties": {
|
|
449
452
|
"postiz-post-id": "postId"
|
|
450
453
|
}
|
|
451
|
-
}
|
|
454
|
+
},
|
|
455
|
+
"proposeOnly": true
|
|
452
456
|
},
|
|
453
457
|
"parameters": {
|
|
454
458
|
"content": "string",
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
"intent": "enrich_entity",
|
|
342
342
|
"kind": "code",
|
|
343
343
|
"scope": "pod",
|
|
344
|
-
"description": "Fetches one
|
|
344
|
+
"description": "Fetches one LinkedIn profile by user id or public identifier. Pure read -> runs instantly. The enrichment primitive. By default each section comes as a short preview (the first entries, as LinkedIn shows them), which keeps the reply small; name the sections you need in `sections` to get them in full. Args: { identifier: string, accountId: string (from unipile_list_accounts), sections?: string }. `sections` is comma-separated Unipile v2 section names: linkedin_experience, linkedin_education, linkedin_languages, linkedin_skills, linkedin_certifications, linkedin_volunteer_experience, linkedin_projects, linkedin_recommendations, linkedin_recruiting_activity, linkedin_interests (each also with a _preview suffix), or linkedin_* for every section in full (large: tens of thousands of characters).",
|
|
345
345
|
"requires": [
|
|
346
346
|
"unipile_linkedin"
|
|
347
347
|
],
|
|
@@ -352,9 +352,10 @@
|
|
|
352
352
|
},
|
|
353
353
|
"parameters": {
|
|
354
354
|
"identifier": "string",
|
|
355
|
-
"accountId": "string"
|
|
355
|
+
"accountId": "string",
|
|
356
|
+
"sections": "string?"
|
|
356
357
|
},
|
|
357
|
-
"code": "// Fetch a single LinkedIn profile. Pure read (GET, no propose.entity) -> the\n// catalog classifies it `read` -> governance `auto`, so enrichment runs inline.\n// v2: account_id is a path segment; sections use with_sections (was\n// linkedin_sections) with a linkedin_ prefix; variant selects the product API.\nconst accountId = String(args?.accountId ?? '').trim();\nconst identifier = String(args?.identifier ?? '').trim();\nif (!accountId) throw new Error('linkedin_get_profile: accountId is required — call unipile_list_accounts first to find yours.');\nif (!identifier) throw new Error('linkedin_get_profile: identifier (a LinkedIn provider_id or public identifier) is required');\n\nconst qs = new URLSearchParams({ variant: 'linkedin_classic' });\
|
|
358
|
+
"code": "// Fetch a single LinkedIn profile. Pure read (GET, no propose.entity) -> the\n// catalog classifies it `read` -> governance `auto`, so enrichment runs inline.\n// v2: account_id is a path segment; sections use with_sections (was\n// linkedin_sections) with a linkedin_ prefix, repeated once per section; variant selects the product API.\nconst accountId = String(args?.accountId ?? '').trim();\nconst identifier = String(args?.identifier ?? '').trim();\nif (!accountId) throw new Error('linkedin_get_profile: accountId is required — call unipile_list_accounts first to find yours.');\nif (!identifier) throw new Error('linkedin_get_profile: identifier (a LinkedIn provider_id or public identifier) is required');\n\n// Sections: a compact default (every section as a preview, the first entries).\n// `sections` names the ones to read, comma-separated; `linkedin_*` asks for all\n// of them in full (~58k chars). Names are Unipile v2's with_sections enum.\nconst NAMES = ['experience', 'education', 'languages', 'skills', 'certifications', 'volunteer_experience', 'projects', 'recommendations', 'recruiting_activity', 'interests'];\nconst VALID = new Set(['linkedin_*', 'linkedin_*_preview', ...NAMES.flatMap((n) => [`linkedin_${n}`, `linkedin_${n}_preview`])]);\nconst wanted = String(args?.sections ?? '').split(',').map((s) => s.trim()).filter(Boolean);\nconst bad = wanted.filter((s) => !VALID.has(s));\nif (bad.length) throw new Error(`linkedin_get_profile: unknown sections ${bad.join(', ')} — valid: linkedin_*, linkedin_*_preview, and linkedin_<${NAMES.join('|')}> with an optional _preview suffix.`);\nconst qs = new URLSearchParams({ variant: 'linkedin_classic' });\nfor (const s of wanted.length ? wanted : ['linkedin_*_preview']) qs.append('with_sections', s);\nconst res = await callProvider('unipile_linkedin', 'GET', `/${encodeURIComponent(accountId)}/users/${encodeURIComponent(identifier)}?${qs.toString()}`);\n// Return the RAW v2 UserProfile. Note v2 renames: headline->description,\n// summary->bio, provider_id->id, and LinkedIn extras live under specifics.linkedin.\nreturn res?.body ?? res;\n"
|
|
358
359
|
},
|
|
359
360
|
{
|
|
360
361
|
"name": "linkedin_send_first_message",
|
|
@@ -444,6 +445,41 @@
|
|
|
444
445
|
}
|
|
445
446
|
}
|
|
446
447
|
},
|
|
448
|
+
{
|
|
449
|
+
"name": "linkedin_list_posts",
|
|
450
|
+
"intent": "list_records",
|
|
451
|
+
"kind": "declarative",
|
|
452
|
+
"scope": "pod",
|
|
453
|
+
"description": "Lists the posts a LinkedIn user or company published or shared, newest first, cursor-paginated. Pass identifier \"me\" for the connected account's own posts, or a LinkedIn user id / public identifier for someone else's. Read-only. Args: { accountId: string (from unipile_list_accounts), identifier: string, cursor?: string }. v2: GET /{account_id}/users/{user_id}/posts (pagination is by cursor only).",
|
|
454
|
+
"requires": [
|
|
455
|
+
"unipile_linkedin"
|
|
456
|
+
],
|
|
457
|
+
"executionMode": "sync",
|
|
458
|
+
"timeoutSeconds": 30,
|
|
459
|
+
"metadata": {
|
|
460
|
+
"readOnly": true
|
|
461
|
+
},
|
|
462
|
+
"parameters": {
|
|
463
|
+
"accountId": "string",
|
|
464
|
+
"identifier": "string",
|
|
465
|
+
"cursor": "string?"
|
|
466
|
+
},
|
|
467
|
+
"providerSpec": {
|
|
468
|
+
"tool": "unipile_linkedin",
|
|
469
|
+
"method": "GET",
|
|
470
|
+
"pathTemplate": "/{{accountId}}/users/{{identifier}}/posts",
|
|
471
|
+
"responseShape": {
|
|
472
|
+
"collectionPath": "data",
|
|
473
|
+
"collectionAs": "posts",
|
|
474
|
+
"scalar": {
|
|
475
|
+
"cursor": "payload.next_cursor"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"query": {
|
|
479
|
+
"cursor": "{{cursor}}"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
447
483
|
{
|
|
448
484
|
"name": "linkedin_list_company_pages",
|
|
449
485
|
"intent": "list_records",
|
|
@@ -592,11 +592,23 @@ interface TemplatePlaybookStage {
|
|
|
592
592
|
proposalType?: "playbook.stage_gate";
|
|
593
593
|
};
|
|
594
594
|
/**
|
|
595
|
-
* The value of the subject kind's lifecycle property this
|
|
596
|
-
*
|
|
597
|
-
* (governed
|
|
595
|
+
* The IN-PROGRESS value of the subject kind's lifecycle property while this
|
|
596
|
+
* stage is worked (In Draft, Review). Entering the stage writes it to the
|
|
597
|
+
* subject (governed; a gated stage at its gate's pass); the subject
|
|
598
|
+
* ENTERING it advances an open run to the stage.
|
|
598
599
|
*/
|
|
599
600
|
subjectStatus?: string;
|
|
601
|
+
/**
|
|
602
|
+
* The RESULT value this stage's APPROVED work reaches (Scripted, sent, won;
|
|
603
|
+
* decision D2): written when the stage's `expectedOutputs` are all
|
|
604
|
+
* delivered, else when the next stage's gate passes. With neither (a last
|
|
605
|
+
* stage, an ungated next stage, no required output) the pod never writes
|
|
606
|
+
* it, never on a session's end: it stays declared for the follow and
|
|
607
|
+
* `flow.of`, and the stage's goal names the move for whoever finishes it
|
|
608
|
+
* (validate.ts `stage-on-approved-no-signal`). The subject ENTERING it
|
|
609
|
+
* advances an open run to the NEXT stage. Pod `PlaybookStage.onApproved`.
|
|
610
|
+
*/
|
|
611
|
+
onApproved?: string;
|
|
600
612
|
/** Where a rejected human gate / failed check sends the run back (a stage key or name). */
|
|
601
613
|
onFail?: {
|
|
602
614
|
toStage: string;
|
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-
|
|
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-
|
|
1
|
+
import { W as WorkspaceYaml, T as TemplateDependency, a as TemplateLifecycleOption, b as TemplateLifecycleOptionWaits } from './define-Dto5_E47.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-Dto5_E47.js';
|
|
3
3
|
import '@synap-core/types/presentation';
|
|
4
4
|
import '@synap-core/types/space-brief';
|
|
5
5
|
import '@synap-core/types/capability-intents';
|