@synap-core/workspace-templates 0.71.0 → 0.73.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.
Files changed (30) hide show
  1. package/README.md +10 -3
  2. package/automations/github-pr-events.automation.json +1 -1
  3. package/automations/ship-a-change-checks-green.automation.json +1 -1
  4. package/automations/ship-a-change-checks-red.automation.json +1 -1
  5. package/automations/ship-a-change-deployed.automation.json +1 -1
  6. package/automations/ship-a-change-pr-merged.automation.json +1 -1
  7. package/automations/ship-a-change-pr-opened.automation.json +1 -1
  8. package/capabilities/apify-linkedin-profiles.capability.json +45 -0
  9. package/capabilities/apify-social-post-capture.capability.json +57 -0
  10. package/capabilities/apify.capability.json +2 -50
  11. package/capabilities/github-issues.capability.json +176 -0
  12. package/capabilities/stripe-payments.capability.json +176 -0
  13. package/capabilities/test-api-3.capability.json +104 -0
  14. package/capabilities/unipile-linkedin.capability.json +5 -3
  15. package/dist/index.js +1128 -35
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/skills/app-factory-research/SKILL.md +1 -1
  19. package/src/apify-social-reader.test.ts +8 -3
  20. package/src/builder-work-views.template.test.ts +207 -0
  21. package/src/builder.yaml +523 -32
  22. package/src/content-os.piece-model.template.test.ts +8 -6
  23. package/src/content-os.yaml +7 -0
  24. package/src/crm.yaml +4 -3
  25. package/src/dev-flow-change.template.test.ts +192 -0
  26. package/src/kanban-grouping.test.ts +16 -0
  27. package/src/retired-names.test.ts +68 -0
  28. package/src/templates.ts +906 -30
  29. package/src/validate.ts +56 -5
  30. package/automations/ship-a-change-deployed.catalog.json +0 -18
@@ -0,0 +1,176 @@
1
+ {
2
+ "apiVersion": "synap/v1",
3
+ "kind": "capability",
4
+ "meta": {
5
+ "slug": "stripe-payments",
6
+ "name": "Stripe Payments",
7
+ "description": "Stripe Payments capability",
8
+ "tags": [
9
+ "capability"
10
+ ],
11
+ "isPublic": true,
12
+ "syncByDefault": true
13
+ },
14
+ "spec": {
15
+ "key": "stripe-payments",
16
+ "name": "Stripe Payments",
17
+ "description": "Stripe Payments capability",
18
+ "params": [
19
+ {
20
+ "name": "stripe-paymentsApiKey",
21
+ "label": "Stripe Payments API Key",
22
+ "type": "text",
23
+ "required": true,
24
+ "description": "The Stripe Payments API key. Stored server-encrypted in the vault; never persisted in the template.",
25
+ "obtain": {
26
+ "url": "https://example.com/dashboard/keys",
27
+ "steps": [
28
+ "Obtain your API key from the provider dashboard",
29
+ "Copy and paste it here"
30
+ ]
31
+ }
32
+ }
33
+ ],
34
+ "vault": [
35
+ {
36
+ "ref": "apiKeySecret",
37
+ "name": "{{name}} API key",
38
+ "value": "{{stripe-paymentsApiKey}}",
39
+ "type": "api_key",
40
+ "description": "API key for the Stripe Payments connector."
41
+ }
42
+ ],
43
+ "tools": [
44
+ {
45
+ "name": "stripe-payments_api",
46
+ "kind": "api",
47
+ "description": "Authenticated HTTP access to the Stripe Payments API.",
48
+ "credentialRef": "apiKeySecret",
49
+ "executor": "is-agent",
50
+ "config": {
51
+ "baseUrl": "https://api.stripe.com/v1",
52
+ "auth": {
53
+ "in": "header",
54
+ "name": "Authorization",
55
+ "prefix": "Bearer "
56
+ }
57
+ }
58
+ }
59
+ ],
60
+ "skills": [
61
+ {
62
+ "name": "stripe-payments_search",
63
+ "kind": "code",
64
+ "scope": "pod",
65
+ "requires": [
66
+ "stripe-payments_api"
67
+ ],
68
+ "executionMode": "async",
69
+ "timeoutSeconds": 60,
70
+ "intent": "search_external",
71
+ "description": "Search searchs via the StripePayments API and propose results as stripe-payments entities.",
72
+ "parameters": {
73
+ "query": "string",
74
+ "limit": "number?",
75
+ "page": "number?"
76
+ },
77
+ "code": "// Search skill — calls the API and proposes results as stripe-payments entities\nconst query = String(args?.query ?? '').trim();\nif (!query) throw new Error('query is required');\n\nconst limit = args?.limit ? Math.min(Number(args.limit), 100) : 20;\nconst page = args?.page ? Math.max(Number(args.page), 1) : 1;\nconst path = args?.path || '/search';\n\nconst payload = { q: query, per_page: limit, page };\n\nconst res = await callProvider('stripe-payments_api', 'GET', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\nconst items = Array.isArray(body) ? body : (body?.items ?? body?.data ?? body?.results ?? []);\n\nif (!ok || items.length === 0) {\n return { success: false, message: 'No results found' };\n}\n\nconst proposed = [];\nfor (const item of items) {\n const r = await propose.entity({\n profileSlug: 'stripe-payments',\n title: String(item?.title ?? item?.name ?? item?.id ?? 'result'),\n properties: { ...item, externalId: String(item?.id ?? item?.externalId ?? '') },\n });\n proposed.push(r);\n}\n\nreturn { success: true, count: items.length, proposed };"
78
+ },
79
+ {
80
+ "name": "stripe-payments_create",
81
+ "kind": "code",
82
+ "scope": "pod",
83
+ "requires": [
84
+ "stripe-payments_api"
85
+ ],
86
+ "executionMode": "async",
87
+ "timeoutSeconds": 60,
88
+ "intent": "capture_into_pod",
89
+ "description": "Create a new create via the StripePayments API and propose it as a stripe-payments entity.",
90
+ "parameters": {
91
+ "title": "string",
92
+ "properties": "object?",
93
+ "externalId": "string?"
94
+ },
95
+ "code": "// Create skill — POST to API and propose the created entity\nconst title = String(args?.title ?? '').trim();\nif (!title) throw new Error('title is required');\n\nconst path = args?.path || '/create';\nconst payload = { ...args };\ndelete payload.path;\ndelete payload.title;\n\nconst res = await callProvider('stripe-payments_api', 'POST', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\n\nif (!ok) {\n throw new Error(`create failed (${res?.status ?? 'unknown'})`);\n}\n\nconst r = await propose.entity({\n profileSlug: 'stripe-payments',\n title,\n properties: { ...body, externalId: String(body?.id ?? body?.externalId ?? '') },\n});\n\nreturn { success: true, proposed: r };"
96
+ },
97
+ {
98
+ "name": "stripe-payments_update",
99
+ "kind": "code",
100
+ "scope": "pod",
101
+ "requires": [
102
+ "stripe-payments_api"
103
+ ],
104
+ "executionMode": "async",
105
+ "timeoutSeconds": 60,
106
+ "intent": "manage_file",
107
+ "description": "Update an existing update via the StripePayments API.",
108
+ "parameters": {
109
+ "externalId": "string",
110
+ "title": "string?",
111
+ "properties": "object?",
112
+ "status": "string?"
113
+ },
114
+ "code": "// Update skill — PATCH/PUT to API\nconst externalId = String(args?.externalId ?? '').trim();\nif (!externalId) throw new Error('externalId is required');\n\nconst path = args?.path || `/${externalId}`;\nconst payload = { ...args };\ndelete payload.path;\ndelete payload.externalId;\n\nconst res = await callProvider('stripe-payments_api', 'PATCH', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\n\nif (!ok) {\n throw new Error(`update failed (${res?.status ?? 'unknown'})`);\n}\n\nconst r = await propose.entity({\n profileSlug: 'stripe-payments',\n title: String(body?.title ?? body?.name ?? externalId),\n properties: { ...body, externalId },\n});\n\nreturn { success: true, proposed: r };"
115
+ },
116
+ {
117
+ "name": "stripe-payments_delete",
118
+ "kind": "code",
119
+ "scope": "pod",
120
+ "requires": [
121
+ "stripe-payments_api"
122
+ ],
123
+ "executionMode": "async",
124
+ "timeoutSeconds": 60,
125
+ "intent": "manage_file",
126
+ "description": "Delete a delete via the StripePayments API.",
127
+ "parameters": {
128
+ "externalId": "string"
129
+ },
130
+ "code": "// Delete skill — DELETE from API\nconst externalId = String(args?.externalId ?? '').trim();\nif (!externalId) throw new Error('externalId is required');\n\nconst path = args?.path || `/${externalId}`;\n\nconst res = await callProvider('stripe-payments_api', 'DELETE', path);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\n\nif (!ok) {\n throw new Error(`delete failed (${res?.status ?? 'unknown'})`);\n}\n\nreturn { success: true, deleted: externalId };"
131
+ },
132
+ {
133
+ "name": "stripe-payments_list",
134
+ "kind": "code",
135
+ "scope": "pod",
136
+ "requires": [
137
+ "stripe-payments_api"
138
+ ],
139
+ "executionMode": "async",
140
+ "timeoutSeconds": 60,
141
+ "intent": "list_records",
142
+ "description": "List lists via the StripePayments API.",
143
+ "parameters": {
144
+ "limit": "number?",
145
+ "page": "number?",
146
+ "status": "string?"
147
+ },
148
+ "code": "// List skill — GET list from API\nconst limit = args?.limit ? Math.min(Number(args.limit), 100) : 20;\nconst page = args?.page ? Math.max(Number(args.page), 1) : 1;\nconst status = args?.status ? String(args.status).trim() : '';\nconst path = args?.path || '/list';\n\nconst payload = { per_page: limit, page };\nif (status) payload.status = status;\n\nconst res = await callProvider('stripe-payments_api', 'GET', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\nconst items = Array.isArray(body) ? body : (body?.items ?? body?.data ?? body?.results ?? []);\n\nif (!ok) {\n return { success: false, message: 'List request failed' };\n}\n\nreturn { success: true, count: items.length, items };"
149
+ },
150
+ {
151
+ "name": "stripe-payments_get",
152
+ "kind": "code",
153
+ "scope": "pod",
154
+ "requires": [
155
+ "stripe-payments_api"
156
+ ],
157
+ "executionMode": "async",
158
+ "timeoutSeconds": 60,
159
+ "intent": "fetch_record",
160
+ "description": "Get a single get by external ID via the StripePayments API.",
161
+ "parameters": {
162
+ "externalId": "string"
163
+ },
164
+ "code": "// Get skill — GET single entity by external ID\nconst externalId = String(args?.externalId ?? '').trim();\nif (!externalId) throw new Error('externalId is required');\n\nconst path = args?.path || `/${externalId}`;\n\nconst res = await callProvider('stripe-payments_api', 'GET', path);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\n\nif (!ok || !body) {\n return { success: false, message: 'Not found' };\n}\n\nconst r = await propose.entity({\n profileSlug: 'stripe-payments',\n title: String(body?.title ?? body?.name ?? externalId),\n properties: { ...body, externalId },\n});\n\nreturn { success: true, proposed: r };"
165
+ }
166
+ ],
167
+ "provides": [
168
+ "search_external",
169
+ "capture_into_pod",
170
+ "manage_file",
171
+ "list_records",
172
+ "fetch_record"
173
+ ]
174
+ },
175
+ "dependencies": []
176
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "apiVersion": "synap/v1",
3
+ "kind": "capability",
4
+ "meta": {
5
+ "slug": "test-api-3",
6
+ "name": "Test API 3",
7
+ "description": "Test API 3 capability",
8
+ "tags": [
9
+ "capability"
10
+ ],
11
+ "isPublic": true,
12
+ "syncByDefault": true
13
+ },
14
+ "spec": {
15
+ "key": "test-api-3",
16
+ "name": "Test API 3",
17
+ "description": "Test API 3 capability",
18
+ "params": [
19
+ {
20
+ "name": "test-api-3ApiKey",
21
+ "label": "Test API 3 API Key",
22
+ "type": "text",
23
+ "required": true,
24
+ "description": "The Test API 3 API key. Stored server-encrypted in the vault; never persisted in the template.",
25
+ "obtain": {
26
+ "url": "https://example.com/dashboard/keys",
27
+ "steps": [
28
+ "Obtain your API key from the provider dashboard",
29
+ "Copy and paste it here"
30
+ ]
31
+ }
32
+ }
33
+ ],
34
+ "vault": [
35
+ {
36
+ "ref": "apiKeySecret",
37
+ "name": "{{name}} API key",
38
+ "value": "{{test-api-3ApiKey}}",
39
+ "type": "api_key",
40
+ "description": "API key for the Test API 3 connector."
41
+ }
42
+ ],
43
+ "tools": [
44
+ {
45
+ "name": "test-api-3_api",
46
+ "kind": "api",
47
+ "description": "Authenticated HTTP access to the Test API 3 API.",
48
+ "credentialRef": "apiKeySecret",
49
+ "executor": "is-agent",
50
+ "config": {
51
+ "baseUrl": "https://api.example.com",
52
+ "auth": {
53
+ "in": "header",
54
+ "name": "Authorization",
55
+ "prefix": "Bearer "
56
+ }
57
+ }
58
+ }
59
+ ],
60
+ "skills": [
61
+ {
62
+ "name": "test-api-3_search",
63
+ "kind": "code",
64
+ "scope": "pod",
65
+ "requires": [
66
+ "test-api-3_api"
67
+ ],
68
+ "executionMode": "async",
69
+ "timeoutSeconds": 60,
70
+ "intent": "search_external",
71
+ "description": "Search searchs via the TestApi3 API and propose results as test-api-3 entities.",
72
+ "parameters": {
73
+ "query": "string",
74
+ "limit": "number?",
75
+ "page": "number?"
76
+ },
77
+ "code": "// Search skill — calls the API and proposes results as test-api-3 entities\nconst query = String(args?.query ?? '').trim();\nif (!query) throw new Error('query is required');\n\nconst limit = args?.limit ? Math.min(Number(args.limit), 100) : 20;\nconst page = args?.page ? Math.max(Number(args.page), 1) : 1;\nconst path = args?.path || '/search';\n\nconst payload = { q: query, per_page: limit, page };\n\nconst res = await callProvider('test-api-3_api', 'GET', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\nconst items = Array.isArray(body) ? body : (body?.items ?? body?.data ?? body?.results ?? []);\n\nif (!ok || items.length === 0) {\n return { success: false, message: 'No results found' };\n}\n\nconst proposed = [];\nfor (const item of items) {\n const r = await propose.entity({\n profileSlug: 'test-api-3',\n title: String(item?.title ?? item?.name ?? item?.id ?? 'result'),\n properties: { ...item, externalId: String(item?.id ?? item?.externalId ?? '') },\n });\n proposed.push(r);\n}\n\nreturn { success: true, count: items.length, proposed };"
78
+ },
79
+ {
80
+ "name": "test-api-3_create",
81
+ "kind": "code",
82
+ "scope": "pod",
83
+ "requires": [
84
+ "test-api-3_api"
85
+ ],
86
+ "executionMode": "async",
87
+ "timeoutSeconds": 60,
88
+ "intent": "capture_into_pod",
89
+ "description": "Create a new create via the TestApi3 API and propose it as a test-api-3 entity.",
90
+ "parameters": {
91
+ "title": "string",
92
+ "properties": "object?",
93
+ "externalId": "string?"
94
+ },
95
+ "code": "// Create skill — POST to API and propose the created entity\nconst title = String(args?.title ?? '').trim();\nif (!title) throw new Error('title is required');\n\nconst path = args?.path || '/create';\nconst payload = { ...args };\ndelete payload.path;\ndelete payload.title;\n\nconst res = await callProvider('test-api-3_api', 'POST', path, payload);\nconst ok = typeof res?.status === 'number' && res.status >= 200 && res.status < 300;\nconst body = res?.body ?? res;\n\nif (!ok) {\n throw new Error(`create failed (${res?.status ?? 'unknown'})`);\n}\n\nconst r = await propose.entity({\n profileSlug: 'test-api-3',\n title,\n properties: { ...body, externalId: String(body?.id ?? body?.externalId ?? '') },\n});\n\nreturn { success: true, proposed: r };"
96
+ }
97
+ ],
98
+ "provides": [
99
+ "search_external",
100
+ "capture_into_pod"
101
+ ]
102
+ },
103
+ "dependencies": []
104
+ }
@@ -450,7 +450,7 @@
450
450
  "intent": "list_records",
451
451
  "kind": "declarative",
452
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).",
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, limit?: number }. v2: GET /{account_id}/users/{user_id}/posts (pagination is by cursor only).",
454
454
  "requires": [
455
455
  "unipile_linkedin"
456
456
  ],
@@ -462,7 +462,8 @@
462
462
  "parameters": {
463
463
  "accountId": "string",
464
464
  "identifier": "string",
465
- "cursor": "string?"
465
+ "cursor": "string?",
466
+ "limit": "number?"
466
467
  },
467
468
  "providerSpec": {
468
469
  "tool": "unipile_linkedin",
@@ -476,7 +477,8 @@
476
477
  }
477
478
  },
478
479
  "query": {
479
- "cursor": "{{cursor}}"
480
+ "cursor": "{{cursor}}",
481
+ "limit": "{{limit}}"
480
482
  }
481
483
  }
482
484
  },