@synap-core/workspace-templates 0.47.0 → 0.48.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 CHANGED
@@ -270,8 +270,9 @@ proposal; the review is the catalog commit.
270
270
  | Field | Where | Rule |
271
271
  |---|---|---|
272
272
  | `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 | Entering the stage moves the subject to this option, through the door. Must be an **existing option** of the lifecycle — never invent one. |
273
+ | (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. |
274
+ | `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. |
275
+ | `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
276
  | `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
277
  | `stages[].onFail` | stage | `{toStage: <key>}` — where a rejected gate sends the run (rework loop). |
277
278
  | `stages[].criteria` | stage | 2–5 binary statements; `check.kind` evidence (cheapest) · capability · judge · human. |
@@ -341,7 +341,7 @@
341
341
  "intent": "enrich_entity",
342
342
  "kind": "code",
343
343
  "scope": "pod",
344
- "description": "Fetches one full LinkedIn profile by user id or public identifier, sections expanded. Pure read -> runs instantly. The enrichment primitive. Args: { identifier: string, accountId: string (from unipile_list_accounts) }.",
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' });\nqs.append('with_sections', 'linkedin_*');\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
+ "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 stage
596
- * corresponds to. Advancing INTO the stage writes it to the subject
597
- * (governed); the subject ENTERING it advances an open run to the stage.
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-BAPO0xZf.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-BAPO0xZf.js';
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';