@synap-core/workspace-templates 0.51.0 → 0.53.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/capabilities/hetzner-cloud.capability.json +3 -0
- package/capabilities/unipile-linkedin.capability.json +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/designing-with-real-components/SKILL.md +61 -11
- package/src/builder.yaml +8 -7
- package/src/crm-lists.template.test.ts +1 -1
- package/src/crm.yaml +15 -6
- package/src/send-message-maps.test.ts +19 -2
- package/src/templates.ts +9 -7
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
"provider": "provider"
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
|
-
"code": "// Send a LinkedIn connection request, then record a note. v2: invitations are\n// \"relation requests\" — POST /{account_id}/users/me/relation-requests, and the\n// target field is user_id (v1 provider_id). The `providerId` PARAM name is kept\n// so callers/transport don't change.\n// The person may be given by their public identifier (the slug of their profile\n// URL, what a pod app's `to` resolves to) or their member id: either is looked\n// up first (GET /{account}/users/{id}; the visit is not notified) for the member\n// id the request needs. Someone already connected, or with a request already\n// pending, is refused before anything is sent. LinkedIn caps the note at 300\n// characters, so a longer one is refused here rather than by LinkedIn.\nconst accountId = String(args?.accountId ?? '').trim();\nconst target = String(args?.providerId ?? '').trim();\nconst message = typeof args?.message === 'string' && args.message.trim() ? args.message.trim() : undefined;\nif (!accountId) throw new Error('linkedin_send_invite: accountId is required — call unipile_list_accounts first to find yours.');\nif (!target) throw new Error('linkedin_send_invite: providerId (their LinkedIn public identifier or member id) is required');\nif (message && message.length > 300) throw new Error(`linkedin_send_invite: a connection note is at most 300 characters on LinkedIn (this one is ${message.length}).`);\n\nconst account = encodeURIComponent(accountId);\nconst found = await callProvider('unipile_linkedin', 'GET', `/${account}/users/${encodeURIComponent(target)}?variant=linkedin_classic`);\nif (found?.proposed === true) {\n return { success: false, proposed: true, proposalId: found?.proposalId ?? null, providerId: target };\n}\nif (found?.status && (found.status < 200 || found.status >= 300)) throw new Error(`linkedin_send_invite: LinkedIn has no profile for ${target} (status ${found.status}).`);\nconst profile = found?.body ?? found ?? {};\nconst userId = String(profile.provider_id ?? profile.id ?? '').trim();\nif (!userId) throw new Error(`linkedin_send_invite: LinkedIn gave no member id for ${target}.`);\nconst distance = String(profile.network_distance ?? profile.specifics?.linkedin?.network_distance ?? '').toUpperCase();\nconst name = [profile.first_name, profile.last_name].filter(Boolean).join(' ') || target;\nif (distance === 'FIRST_DEGREE' || distance === 'DISTANCE_1') throw new Error(`linkedin_send_invite: ${name} is already one of your LinkedIn connections: send them the message instead.`);\nconst invitation = profile.invitation ?? profile.specifics?.linkedin?.invitation ?? null;\nif (invitation && String(invitation.status ?? '').toUpperCase() === 'PENDING') throw new Error(`linkedin_send_invite: a connection request with ${name} is already pending.`);\n\nconst body = { user_id: userId };\nif (message) body.message = message;\nconst res = await callProvider('unipile_linkedin', 'POST', `/${account}/users/me/relation-requests`, body);\n// GOVERNANCE GUARD: a proposal-gated call returns { proposed:true } and has NOT\n// been sent — never record a not-sent invitation as sent.\nif (res?.proposed === true) {\n return { success: false, proposed: true, proposalId: res?.proposalId ?? null, providerId: userId };\n}\n// v2 returns 201 on success.\nconst ok = res?.status ? res.status >= 200 && res.status < 300 : true;\nif (!ok) throw new Error(`linkedin_send_invite: provider rejected the invitation (status ${res?.status ?? 'unknown'}) for ${name}`);\nconst payload = res?.body ?? res;\nawait propose.entity({\n profileSlug: 'note',\n title: `LinkedIn invitation sent -> ${name}`,\n properties: { action: 'linkedin_send_invite', providerId: userId, publicIdentifier: profile.public_identifier ?? null, networkDistance: distance || null, message: message ?? null, relationRequestId: payload?.id ?? null, status: res?.status ?? null, success: ok, provenance: 'connector', provider: 'unipile' },\n reasoning: 'Recorded the outbound LinkedIn connection request for the activity timeline.'\n});\nreturn { success: ok, providerId: userId, relationRequestId: payload?.id ?? null, status: res?.status ?? null };"
|
|
280
|
+
"code": "// Send a LinkedIn connection request, then record a note. v2: invitations are\n// \"relation requests\" — POST /{account_id}/users/me/relation-requests, and the\n// target field is user_id (v1 provider_id). The `providerId` PARAM name is kept\n// so callers/transport don't change.\n// The person may be given by their public identifier (the slug of their profile\n// URL, what a pod app's `to` resolves to) or their member id: either is looked\n// up first (GET /{account}/users/{id}; the visit is not notified) for the member\n// id the request needs. Someone already connected, or with a request already\n// pending, is refused before anything is sent. LinkedIn caps the note at 300\n// characters, so a longer one is refused here rather than by LinkedIn.\nconst accountId = String(args?.accountId ?? '').trim();\nconst target = String(args?.providerId ?? '').trim();\nconst message = typeof args?.message === 'string' && args.message.trim() ? args.message.trim() : undefined;\nif (!accountId) throw new Error('linkedin_send_invite: accountId is required — call unipile_list_accounts first to find yours.');\nif (!target) throw new Error('linkedin_send_invite: providerId (their LinkedIn public identifier or member id) is required');\nif (message && message.length > 300) throw new Error(`linkedin_send_invite: a connection note is at most 300 characters on LinkedIn (this one is ${message.length}).`);\n\nconst account = encodeURIComponent(accountId);\nconst found = await callProvider('unipile_linkedin', 'GET', `/${account}/users/${encodeURIComponent(target)}?variant=linkedin_classic`);\nif (found?.proposed === true) {\n return { success: false, proposed: true, proposalId: found?.proposalId ?? null, providerId: target };\n}\nif (found?.status && (found.status < 200 || found.status >= 300)) throw new Error(`linkedin_send_invite: LinkedIn has no profile for ${target} (status ${found.status}).`);\nconst profile = found?.body ?? found ?? {};\nconst userId = String(profile.provider_id ?? profile.id ?? '').trim();\nif (!userId) throw new Error(`linkedin_send_invite: LinkedIn gave no member id for ${target}.`);\nconst distance = String(profile.network_distance ?? profile.specifics?.linkedin?.network_distance ?? '').toUpperCase();\nconst name = [profile.first_name, profile.last_name].filter(Boolean).join(' ') || target;\nif (distance === 'FIRST_DEGREE' || distance === 'DISTANCE_1') throw new Error(`linkedin_send_invite: ${name} is already one of your LinkedIn connections: send them the message instead.`);\nconst invitation = profile.invitation ?? profile.specifics?.linkedin?.invitation ?? null;\nif (invitation && String(invitation.status ?? '').toUpperCase() === 'PENDING') throw new Error(`linkedin_send_invite: a connection request with ${name} is already pending.`);\n\nconst body = { user_id: userId };\nif (message) body.message = message;\nconst res = await callProvider('unipile_linkedin', 'POST', `/${account}/users/me/relation-requests`, body);\n// GOVERNANCE GUARD: a proposal-gated call returns { proposed:true } and has NOT\n// been sent — never record a not-sent invitation as sent.\nif (res?.proposed === true) {\n return { success: false, proposed: true, proposalId: res?.proposalId ?? null, providerId: userId };\n}\n// v2 returns 201 on success.\nconst ok = res?.status ? res.status >= 200 && res.status < 300 : true;\nif (!ok) {\n // LinkedIn's own sentence (e.g. \"You cannot resend this invitation yet.\") rides in the error, so a failed approval shows why.\n const why = [res?.body?.detail, res?.body?.message, res?.body?.title].find((v) => typeof v === 'string' && v.trim());\n throw new Error(`linkedin_send_invite: provider rejected the invitation (status ${res?.status ?? 'unknown'}) for ${name}${why ? `: ${String(why).trim().slice(0, 300)}` : ''}`);\n}\nconst payload = res?.body ?? res;\nawait propose.entity({\n profileSlug: 'note',\n title: `LinkedIn invitation sent -> ${name}`,\n properties: { action: 'linkedin_send_invite', providerId: userId, publicIdentifier: profile.public_identifier ?? null, networkDistance: distance || null, message: message ?? null, relationRequestId: payload?.id ?? null, status: res?.status ?? null, success: ok, provenance: 'connector', provider: 'unipile' },\n reasoning: 'Recorded the outbound LinkedIn connection request for the activity timeline.'\n});\nreturn { success: ok, providerId: userId, relationRequestId: payload?.id ?? null, status: res?.status ?? null };"
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
"name": "linkedin_search_people",
|
package/dist/index.js
CHANGED
|
@@ -5892,7 +5892,7 @@ var DATA = {
|
|
|
5892
5892
|
"displayName": "UI Design",
|
|
5893
5893
|
"icon": "layout-template",
|
|
5894
5894
|
"color": "violet",
|
|
5895
|
-
"description": "A screen designed from the real component library \u2014 Puck JSON a person reviews on the canvas and a coding agent implements.",
|
|
5895
|
+
"description": "A canvas of screens (one frame each; a single screen is one frame), designed from the real component library \u2014 Puck JSON a person reviews on the canvas and a coding agent implements.",
|
|
5896
5896
|
"lifecycle": {
|
|
5897
5897
|
"property": "design-status",
|
|
5898
5898
|
"options": [
|
|
@@ -5996,7 +5996,7 @@ var DATA = {
|
|
|
5996
5996
|
{
|
|
5997
5997
|
"slug": "design-json",
|
|
5998
5998
|
"label": "Design (Puck JSON)",
|
|
5999
|
-
"description": "
|
|
5999
|
+
"description": "A canvas (schema-version 3): a board { format, frames[] }, one frame per screen, each frame { id, name, x, y, w, h, page } holding a Puck page ({ content[] of { type, props: { id, \u2026 } }, root.props }) in flow layout, layout blocks taking token names, never px. A single screen is a canvas with one frame. Every type, at any depth and in every frame, is a component in the Storybook manifest.",
|
|
6000
6000
|
"valueType": "json",
|
|
6001
6001
|
"inputType": "json"
|
|
6002
6002
|
},
|
|
@@ -6010,11 +6010,11 @@ var DATA = {
|
|
|
6010
6010
|
{
|
|
6011
6011
|
"slug": "schema-version",
|
|
6012
6012
|
"label": "Schema version",
|
|
6013
|
-
"description": "Version of the design JSON shape,
|
|
6013
|
+
"description": "Version of the design JSON shape. Always 3: a canvas, a board of frames, one per screen, each holding a page (a single screen is a canvas with one frame). Agents never write 1 or 2; the canvas migrates them on read.",
|
|
6014
6014
|
"valueType": "number",
|
|
6015
6015
|
"inputType": "number",
|
|
6016
6016
|
"constraints": {
|
|
6017
|
-
"defaultValue":
|
|
6017
|
+
"defaultValue": 3
|
|
6018
6018
|
}
|
|
6019
6019
|
},
|
|
6020
6020
|
{
|
|
@@ -6320,7 +6320,7 @@ var DATA = {
|
|
|
6320
6320
|
{
|
|
6321
6321
|
"name": "Design to implementation",
|
|
6322
6322
|
"description": "Take a UI design request from three variants built only of real Storybook components, through a rubric critique and a person's review on the canvas, to a pull request verified by the gates, a before/after compare and a walk in the running app.",
|
|
6323
|
-
"goalTemplate": "Take this UI design ({design}) for {surface} from draft to implemented. Load the designing-with-real-components skill first, and design-critique for the Critique stage. GENERATE: read the Storybook component manifest (/manifests/components.json, or the Storybook MCP), the design's goal and scope and the entities it references, and write THREE variants as Puck JSON \u2014 this design and two sibling ui-designs sharing its variant-group \u2014 using ONLY components the manifest lists, with props each one declares, design tokens and named motion presets only; each variant lays out every state the screen has (empty, loading, failed, full, long content); fill components-used from the JSON and set schema-version. CRITIQUE: judge each variant with the design-critique rubric and write the findings into its critique; a checked or pattern blocker sends the run back to Generate; opinions are never applied. REVIEW: a person compares the variants on the canvas and approves one; nothing is implemented from an unapproved design, and only a person sets approved. IMPLEMENT: read design-json and the Storybook MCP, build the screen from those same real components, open a pull request and record its URL in implementation-pr and the built screen's story in implemented-story-id. VERIFY: typecheck, story coverage, interaction and accessibility tests, visual regression and the token guards are green, the implemented story was captured and compared with the design and the current story, and the screen was walked in the running app. Move the design's status only through its lifecycle (update_entity with expectedStatus); never invent a status.",
|
|
6323
|
+
"goalTemplate": "Take this UI design ({design}) for {surface} from draft to implemented. Load the designing-with-real-components skill first, and design-critique for the Critique stage. GENERATE: read the Storybook component manifest (/manifests/components.json, or the Storybook MCP), the design's goal and scope and the entities it references, and write THREE variants as Puck JSON as a canvas of frames, one per screen (one frame for a single screen) \u2014 this design and two sibling ui-designs sharing its variant-group \u2014 using ONLY components the manifest lists, with props each one declares, design tokens and named motion presets only; each variant lays out every state the screen has (empty, loading, failed, full, long content); fill components-used from the JSON (across every frame of a canvas) and set schema-version (always 3: a canvas of frames, one per screen; never 1 or 2). CRITIQUE: judge each variant with the design-critique rubric and write the findings into its critique; a checked or pattern blocker sends the run back to Generate; opinions are never applied. REVIEW: a person compares the variants on the canvas and approves one; nothing is implemented from an unapproved design, and only a person sets approved. IMPLEMENT: read design-json and the Storybook MCP, build the screen from those same real components, open a pull request and record its URL in implementation-pr and the built screen's story in implemented-story-id. VERIFY: typecheck, story coverage, interaction and accessibility tests, visual regression and the token guards are green, the implemented story was captured and compared with the design and the current story, and the screen was walked in the running app. Move the design's status only through its lifecycle (update_entity with expectedStatus); never invent a status.",
|
|
6324
6324
|
"subjectProfile": {
|
|
6325
6325
|
"profileSlug": "ui-design"
|
|
6326
6326
|
},
|
|
@@ -6351,7 +6351,7 @@ var DATA = {
|
|
|
6351
6351
|
"name": "Generate",
|
|
6352
6352
|
"category": "planned",
|
|
6353
6353
|
"subjectStatus": "draft",
|
|
6354
|
-
"goal": "Write three variants as Puck JSON \u2014 this design and two siblings in its variant-group \u2014 from components the Storybook manifest lists, with their declared props, tokens and named motion presets only, each with every state the screen has.",
|
|
6354
|
+
"goal": "Write three variants as Puck JSON as a canvas of frames, one per screen (one frame for a single screen) \u2014 this design and two siblings in its variant-group \u2014 from components the Storybook manifest lists, with their declared props, tokens and named motion presets only, each with every state the screen has.",
|
|
6355
6355
|
"expectedOutputs": [
|
|
6356
6356
|
{
|
|
6357
6357
|
"kind": "ui-design",
|
|
@@ -14548,6 +14548,8 @@ var DATA = {
|
|
|
14548
14548
|
"hiring",
|
|
14549
14549
|
"asking",
|
|
14550
14550
|
"tooling",
|
|
14551
|
+
"funding",
|
|
14552
|
+
"new-hire",
|
|
14551
14553
|
"none"
|
|
14552
14554
|
]
|
|
14553
14555
|
},
|
|
@@ -15713,7 +15715,7 @@ var DATA = {
|
|
|
15713
15715
|
{
|
|
15714
15716
|
"name": "Score a list",
|
|
15715
15717
|
"description": "Score every lead of one list (an audience) from public signals, 1 to 5, signal first, and write the score, the signal, its source and why on each lead; one run for the whole list.",
|
|
15716
|
-
"goalTemplate": "Score the leads of the list {audience}: the people and companies with the lead role and a targets link to this audience whose scoredAt is empty or older than {rescoreAfterDays} days, at most {limit} of them, the never-scored ones first. READ: the audience (segment, persona, jobs-to-be-done, traits, description), which are the list's criteria, and the company's offers in Foundation. RESEARCH each lead from public sources only (its website, company page, public profile, job posts, public posts, freelance platforms) and from the pod (past messages, conversations, notes); never collect contact data a person chose to hide, never use a scraped personal database. RUBRIC (its one home): score = signal + fit + warmth, at least 1 and at most 5. SIGNAL, 0 to 2: hiring or asking within the last 90 days = 2, where hiring is a job post or mission offer for automation, AI agents or no-code (n8n, Make, Zapier, Hermes, Claude Code, AI ops and the like) and asking is a public post or freelance request asking for that help; tooling = 1, it uses those tools publicly with no ask; none = 0, nothing found. FIT, 0 to 2: a founder or director of a company of 2 to 30 people in France, or an independent expert or small agency, that is not a competitor = 2; partial (size unknown, outside France, or near the decider rather than the decider) = 1; excluded (an AI or no-code agency that competes, a regulated profession, more than 50 people, a student) = 0. WARMTH, 0 or 1: an existing two-way exchange with the person, or a first-degree connection with messages, = 1. WRITE on each lead's lead role: icpScore (the score), buyingSignal (hiring, asking, tooling or none), buyingSignalSource (the public URL proving the signal, empty for none), scoredAt (today) and qualificationNotes (the points for signal, fit and warmth with one line each, the doubt you could not resolve, and the source URL of every fact). Leave a fact out rather than guess. Write the scores in one batch. Never move a lead's stage, never create a lead, never draft a message. End with a summary: how many leads were scored, how many per score, and the best five with their signal.",
|
|
15718
|
+
"goalTemplate": "Score the leads of the list {audience}: the people and companies with the lead role and a targets link to this audience whose scoredAt is empty or older than {rescoreAfterDays} days, at most {limit} of them, the never-scored ones first. READ: the audience (segment, persona, jobs-to-be-done, traits, description), which are the list's criteria, and the company's offers in Foundation. RESEARCH each lead from public sources only (its website, company page, public profile, job posts, public posts, freelance platforms) and from the pod (past messages, conversations, notes); never collect contact data a person chose to hide, never use a scraped personal database. RUBRIC (its one home): score = signal + fit + warmth, at least 1 and at most 5. SIGNAL, 0 to 2: hiring or asking within the last 90 days = 2, where hiring is a job post or mission offer for automation, AI agents or no-code (n8n, Make, Zapier, Hermes, Claude Code, AI ops and the like) and asking is a public post or freelance request asking for that help; funding or new-hire within the last 90 days = 1, where funding is a fundraise the company announced and new-hire is a new decider (founder, director, head of operations) who joined it; tooling = 1, it uses those tools publicly with no ask; none = 0, nothing found. FIT, 0 to 2: a founder or director of a company of 2 to 30 people in France, or an independent expert or small agency, that is not a competitor = 2; partial (size unknown, outside France, or near the decider rather than the decider) = 1; excluded (an AI or no-code agency that competes, a regulated profession, more than 50 people, a student) = 0. WARMTH, 0 or 1: an existing two-way exchange with the person, or a first-degree connection with messages, = 1. WRITE on each lead's lead role: icpScore (the score), buyingSignal (hiring, asking, tooling, funding, new-hire or none; when several are found write the strongest, in this order: hiring, then asking, then new-hire, then funding, then tooling, then none), buyingSignalSource (the public URL proving the signal, empty for none), scoredAt (today) and qualificationNotes (the points for signal, fit and warmth with one line each, the doubt you could not resolve, and the source URL of every fact). Leave a fact out rather than guess. Write the scores in one batch. Never move a lead's stage, never create a lead, never draft a message. End with a summary: how many leads were scored, how many per score, and the best five with their signal.",
|
|
15717
15719
|
"subjectProfile": {
|
|
15718
15720
|
"profileSlug": "audience"
|
|
15719
15721
|
},
|