@elevasis/sdk 1.44.2 → 1.45.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/dist/cli.cjs +1001 -652
- package/dist/index.d.ts +1045 -509
- package/dist/index.js +748 -690
- package/dist/node/index.d.ts +105 -97
- package/dist/test-utils/index.d.ts +42 -28
- package/dist/test-utils/index.js +549 -732
- package/dist/worker/index.d.ts +12112 -0
- package/dist/worker/index.js +211 -186
- package/package.json +6 -9
- package/reference/_navigation.md +151 -21
- package/reference/_reference-manifest.json +186 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- package/reference/rules/active-change-index.md +40 -54
- package/reference/rules/agent-runtime.md +81 -0
- package/reference/rules/agent-start-here.md +71 -163
- package/reference/rules/deployment.md +33 -10
- package/reference/rules/error-handling.md +26 -0
- package/reference/rules/execution.md +13 -0
- package/reference/rules/frontend.md +10 -3
- package/reference/rules/observability.md +9 -1
- package/reference/rules/operations.md +26 -17
- package/reference/rules/organization-model.md +74 -88
- package/reference/rules/organization-os.md +71 -88
- package/reference/rules/package-taxonomy.md +11 -2
- package/reference/rules/platform.md +13 -7
- package/reference/rules/shared-types.md +15 -0
- package/reference/rules/task-tracking.md +30 -5
- package/reference/rules/ui.md +145 -3
- package/reference/rules/vibe-intents.md +271 -0
- package/reference/rules/vibe.md +17 -243
- package/reference/scaffold/core/organization-graph.mdx +111 -97
- package/reference/scaffold/core/organization-model.mdx +234 -214
- package/reference/scaffold/operations/propagation-pipeline.md +1 -1
- package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
- package/reference/scaffold/operations/workflow-recipes.md +71 -19
- package/reference/scaffold/recipes/add-a-feature.md +156 -146
- package/reference/scaffold/recipes/add-a-resource.md +123 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +25 -10
- package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
- package/reference/scaffold/recipes/customize-organization-model.md +161 -149
- package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
- package/reference/scaffold/recipes/extend-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +2 -2
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +12 -1
- package/reference/scaffold/reference/glossary.md +3 -3
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +279 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +77 -29
- package/reference/sdk/concepts.mdx +2 -0
- package/reference/sdk/define-builders.mdx +76 -0
- package/reference/sdk/deployment/command-center.mdx +6 -2
- package/reference/sdk/deployment/execution-reference.mdx +64 -186
- package/reference/sdk/deployment/index.mdx +2 -0
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +49 -119
- package/reference/sdk/framework/index.mdx +46 -65
- package/reference/sdk/framework/project-structure.mdx +150 -205
- package/reference/sdk/framework/tutorial-system.mdx +2 -2
- package/reference/sdk/human-in-the-loop.mdx +152 -0
- package/reference/sdk/index.mdx +6 -7
- package/reference/sdk/platform-tools/index.mdx +12 -0
- package/reference/sdk/platform-tools/type-safety.mdx +4 -0
- package/reference/sdk/project-deployment-spec.mdx +131 -0
- package/reference/sdk/resources/index.mdx +23 -7
- package/reference/sdk/resources/patterns.mdx +54 -24
- package/reference/sdk/resources/types.mdx +7 -4
- package/reference/sdk/templates/data-enrichment.mdx +7 -3
- package/reference/sdk/templates/email-sender.mdx +139 -135
- package/reference/sdk/templates/lead-scorer.mdx +5 -1
- package/reference/sdk/templates/pdf-generator.mdx +155 -151
- package/reference/sdk/templates/recurring-job.mdx +195 -189
- package/reference/sdk/templates/text-classifier.mdx +4 -0
- package/reference/sdk/templates/web-scraper.mdx +139 -135
- package/reference/spine/spine-primer.md +135 -96
- package/reference/ui/index.mdx +14 -7
- package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
- package/dist/types/worker/adapters/apify.d.ts +0 -14
- package/dist/types/worker/adapters/approval.d.ts +0 -23
- package/dist/types/worker/adapters/attio.d.ts +0 -22
- package/dist/types/worker/adapters/clickup.d.ts +0 -22
- package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
- package/dist/types/worker/adapters/crm.d.ts +0 -20
- package/dist/types/worker/adapters/dropbox.d.ts +0 -14
- package/dist/types/worker/adapters/email.d.ts +0 -25
- package/dist/types/worker/adapters/execution.d.ts +0 -22
- package/dist/types/worker/adapters/gmail.d.ts +0 -14
- package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
- package/dist/types/worker/adapters/index.d.ts +0 -33
- package/dist/types/worker/adapters/instantly.d.ts +0 -14
- package/dist/types/worker/adapters/lead.d.ts +0 -28
- package/dist/types/worker/adapters/list.d.ts +0 -9
- package/dist/types/worker/adapters/llm.d.ts +0 -45
- package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
- package/dist/types/worker/adapters/notification.d.ts +0 -28
- package/dist/types/worker/adapters/pdf.d.ts +0 -22
- package/dist/types/worker/adapters/projects.d.ts +0 -20
- package/dist/types/worker/adapters/resend.d.ts +0 -14
- package/dist/types/worker/adapters/scheduler.d.ts +0 -25
- package/dist/types/worker/adapters/signature-api.d.ts +0 -14
- package/dist/types/worker/adapters/storage.d.ts +0 -33
- package/dist/types/worker/adapters/stripe.d.ts +0 -14
- package/dist/types/worker/adapters/tomba.d.ts +0 -14
- package/dist/types/worker/index.d.ts +0 -60
- package/dist/types/worker/platform.d.ts +0 -90
- package/dist/types/worker/utils.d.ts +0 -9
- package/reference/claude-config/Overview.md +0 -230
- package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
- package/reference/claude-config/registries/graph-skills.json +0 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -154
- package/reference/claude-config/registries/skill-coverage.json +0 -20
- package/reference/claude-config/rules/active-change-index.md +0 -22
- package/reference/claude-config/rules/agent-start-here.md +0 -22
- package/reference/claude-config/rules/deployment.md +0 -22
- package/reference/claude-config/rules/error-handling.md +0 -22
- package/reference/claude-config/rules/execution.md +0 -22
- package/reference/claude-config/rules/frontend.md +0 -22
- package/reference/claude-config/rules/observability.md +0 -22
- package/reference/claude-config/rules/operations.md +0 -22
- package/reference/claude-config/rules/organization-model.md +0 -22
- package/reference/claude-config/rules/organization-os.md +0 -22
- package/reference/claude-config/rules/package-taxonomy.md +0 -22
- package/reference/claude-config/rules/platform.md +0 -22
- package/reference/claude-config/rules/shared-types.md +0 -22
- package/reference/claude-config/rules/task-tracking.md +0 -22
- package/reference/claude-config/rules/topbar-actions.md +0 -70
- package/reference/claude-config/rules/ui.md +0 -22
- package/reference/claude-config/rules/vibe.md +0 -22
- package/reference/claude-config/scripts/statusline-command.js +0 -18
- package/reference/claude-config/settings.json +0 -30
- package/reference/claude-config/skills/client/SKILL.md +0 -201
- package/reference/claude-config/skills/deploy/SKILL.md +0 -159
- package/reference/claude-config/skills/dsp/SKILL.md +0 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
- package/reference/claude-config/skills/explore/SKILL.md +0 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
- package/reference/claude-config/skills/om/SKILL.md +0 -475
- package/reference/claude-config/skills/om/operations/build.md +0 -237
- package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
- package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
- package/reference/claude-config/skills/om/operations/customers.md +0 -114
- package/reference/claude-config/skills/om/operations/features.md +0 -88
- package/reference/claude-config/skills/om/operations/goals.md +0 -123
- package/reference/claude-config/skills/om/operations/identity.md +0 -97
- package/reference/claude-config/skills/om/operations/labels.md +0 -110
- package/reference/claude-config/skills/om/operations/offerings.md +0 -114
- package/reference/claude-config/skills/om/operations/roles.md +0 -104
- package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
- package/reference/claude-config/skills/om/operations/techStack.md +0 -38
- package/reference/claude-config/skills/project/SKILL.md +0 -1114
- package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
- package/reference/claude-config/skills/save/SKILL.md +0 -183
- package/reference/claude-config/skills/setup/SKILL.md +0 -290
- package/reference/claude-config/skills/status/SKILL.md +0 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
- package/reference/claude-config/skills/sync/SKILL.md +0 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
- package/reference/claude-config/skills/tutorial/technical.md +0 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
- package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
- package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
- package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
- package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
- package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
- package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
- package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
- package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
- package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
- package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
- package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
- package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
- package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
- package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
- package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
- package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
- package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
- package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
- package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
- package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
- package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
- package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
- package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
- package/reference/claude-config/sync-notes/README.md +0 -43
- package/reference/sdk/framework/interaction-guidance.mdx +0 -182
- package/reference/sdk/framework/memory.mdx +0 -326
- package/reference/sdk/framework/resource-documentation.mdx +0 -90
- package/reference/sdk/roadmap.mdx +0 -164
|
@@ -1,135 +1,139 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Template: Web Scraper"
|
|
3
|
-
description: "Apify-based web scraper that stores results in Supabase -- fetch structured data from any website via Apify actors"
|
|
4
|
-
loadWhen: "Applying the web-scraper workflow template"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Category:** Data Collection
|
|
8
|
-
|
|
9
|
-
**Platform Tools:** `apify` (run actor), `supabase` (insert results)
|
|
10
|
-
|
|
11
|
-
**Credentials Required:**
|
|
12
|
-
|
|
13
|
-
- `apify` -- Apify API token (bearer type)
|
|
14
|
-
- `my-database` -- Supabase project URL and service role key
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## What This Workflow Does
|
|
19
|
-
|
|
20
|
-
Runs an Apify actor to scrape structured data from a URL, then stores the scraped results in a Supabase table. The actor and table names are configurable. Suitable for extracting product listings, job postings, contact information, or any structured web content.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Input Schema
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- **
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
**
|
|
1
|
+
---
|
|
2
|
+
title: "Template: Web Scraper"
|
|
3
|
+
description: "Apify-based web scraper that stores results in Supabase -- fetch structured data from any website via Apify actors"
|
|
4
|
+
loadWhen: "Applying the web-scraper workflow template"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Category:** Data Collection
|
|
8
|
+
|
|
9
|
+
**Platform Tools:** `apify` (run actor), `supabase` (insert results)
|
|
10
|
+
|
|
11
|
+
**Credentials Required:**
|
|
12
|
+
|
|
13
|
+
- `apify` -- Apify API token (bearer type)
|
|
14
|
+
- `my-database` -- Supabase project URL and service role key
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What This Workflow Does
|
|
19
|
+
|
|
20
|
+
Runs an Apify actor to scrape structured data from a URL, then stores the scraped results in a Supabase table. The actor and table names are configurable. Suitable for extracting product listings, job postings, contact information, or any structured web content.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Input Schema
|
|
25
|
+
|
|
26
|
+
{/* doc-snippet:skip: illustrative excerpt -- shows the schema shape in isolation, omits the `import { z } from 'zod'` shown in Workflow Code Pattern below */}
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
z.object({
|
|
30
|
+
actorId: z.string(), // Apify actor ID (e.g., 'apify/web-scraper')
|
|
31
|
+
startUrls: z.array(z.string()), // URLs to scrape
|
|
32
|
+
tableName: z.string(), // Supabase table to store results in
|
|
33
|
+
maxItems: z.number().optional(), // Maximum number of items to collect (default: 100)
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Output Schema
|
|
38
|
+
|
|
39
|
+
{/* doc-snippet:skip: illustrative excerpt -- shows the schema shape in isolation, omits the `import { z } from 'zod'` shown in Workflow Code Pattern below */}
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
z.object({
|
|
43
|
+
itemsScraped: z.number(), // Total items scraped
|
|
44
|
+
itemsInserted: z.number(), // Items successfully inserted into Supabase
|
|
45
|
+
runId: z.string(), // Apify run ID for reference
|
|
46
|
+
})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Workflow Code Pattern
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import type { WorkflowDefinition } from '@elevasis/sdk'
|
|
55
|
+
import { StepType } from '@elevasis/sdk'
|
|
56
|
+
import { platform, PlatformToolError } from '@elevasis/sdk/worker'
|
|
57
|
+
import { z } from 'zod'
|
|
58
|
+
|
|
59
|
+
const inputSchema = z.object({
|
|
60
|
+
actorId: z.string(),
|
|
61
|
+
startUrls: z.array(z.string()),
|
|
62
|
+
tableName: z.string(),
|
|
63
|
+
maxItems: z.number().optional(),
|
|
64
|
+
})
|
|
65
|
+
const outputSchema = z.object({
|
|
66
|
+
itemsScraped: z.number(),
|
|
67
|
+
itemsInserted: z.number(),
|
|
68
|
+
runId: z.string(),
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
type Input = z.infer<typeof inputSchema>
|
|
72
|
+
|
|
73
|
+
export const webScraper: WorkflowDefinition = {
|
|
74
|
+
config: {
|
|
75
|
+
resourceId: 'web-scraper',
|
|
76
|
+
name: 'Web Scraper',
|
|
77
|
+
type: 'workflow',
|
|
78
|
+
description: 'Scrapes structured data via Apify and stores in Supabase',
|
|
79
|
+
version: '1.0.0',
|
|
80
|
+
status: 'dev',
|
|
81
|
+
},
|
|
82
|
+
contract: { inputSchema, outputSchema },
|
|
83
|
+
steps: {
|
|
84
|
+
scrape: {
|
|
85
|
+
id: 'scrape',
|
|
86
|
+
name: 'Run Apify Actor',
|
|
87
|
+
description: 'Execute the Apify actor and collect results',
|
|
88
|
+
inputSchema,
|
|
89
|
+
outputSchema: z.object({ items: z.array(z.unknown()), runId: z.string() }),
|
|
90
|
+
handler: async (input) => {
|
|
91
|
+
const { actorId, startUrls, maxItems } = input as Input
|
|
92
|
+
const result = await platform.call({
|
|
93
|
+
tool: 'apify',
|
|
94
|
+
method: 'runActor',
|
|
95
|
+
credential: 'apify',
|
|
96
|
+
params: { actorId, input: { startUrls: startUrls.map(url => ({ url })), maxItems: maxItems ?? 100 } },
|
|
97
|
+
}) as { items: unknown[]; runId: string }
|
|
98
|
+
return { items: result.items, runId: result.runId }
|
|
99
|
+
},
|
|
100
|
+
next: { type: StepType.LINEAR, target: 'store' },
|
|
101
|
+
},
|
|
102
|
+
store: {
|
|
103
|
+
id: 'store',
|
|
104
|
+
name: 'Store Results',
|
|
105
|
+
description: 'Insert scraped items into Supabase',
|
|
106
|
+
inputSchema: z.object({ items: z.array(z.unknown()), runId: z.string(), tableName: z.string() }),
|
|
107
|
+
outputSchema,
|
|
108
|
+
handler: async (input, context) => {
|
|
109
|
+
const { items, runId, tableName } = input as { items: unknown[]; runId: string; tableName: string }
|
|
110
|
+
const data = items.map(item => ({ ...(item as Record<string, unknown>), scraped_at: new Date().toISOString() }))
|
|
111
|
+
await platform.call({
|
|
112
|
+
tool: 'supabase',
|
|
113
|
+
method: 'insert',
|
|
114
|
+
credential: 'my-database',
|
|
115
|
+
params: { table: tableName, data },
|
|
116
|
+
})
|
|
117
|
+
context.logger.info(`Stored ${data.length} scraped items in ${tableName}`)
|
|
118
|
+
return { itemsScraped: items.length, itemsInserted: data.length, runId }
|
|
119
|
+
},
|
|
120
|
+
next: null,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
entryPoint: 'scrape',
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Adaptation Notes
|
|
130
|
+
|
|
131
|
+
- **Credential names:** Replace `'apify'` and `'my-database'` with the credential names the user configured in the command center.
|
|
132
|
+
- **Table schema:** Ensure the Supabase table exists and has columns that match the scraped data fields. The agent should check `data/schema.ts` if it exists.
|
|
133
|
+
- **Actor selection:** Apify has hundreds of public actors. Common choices: `apify/web-scraper` (generic), `apify/cheerio-scraper` (fast HTML parsing), specialized actors for LinkedIn, Amazon, etc.
|
|
134
|
+
- **Error handling:** Add try/catch for `PlatformToolError` if partial failure tolerance is needed.
|
|
135
|
+
- **Skill adaptation:** For beginners, explain what Apify is and walk through actor selection before generating code.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
**Last Updated:** 2026-02-26
|
|
@@ -1,99 +1,138 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Spine Primer
|
|
3
|
-
description: Tenant-facing primer for using an Organization Model catalog as the shared coordination spine between workflow producers, runtime state, API filters, and UI projections.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: Spine Primer
|
|
3
|
+
description: Tenant-facing primer for using an Organization Model ontology catalog as the shared coordination spine between workflow producers, runtime state, API filters, and UI projections.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
# Spine Primer
|
|
10
|
-
|
|
11
|
-
Use this primer when a tenant domain has a closed set of stages, statuses, or catalog keys that multiple surfaces must share. A spine is
|
|
12
|
-
|
|
13
|
-
The lead-generation pattern is the reference shape: `
|
|
14
|
-
|
|
15
|
-
## What The Spine Owns
|
|
16
|
-
|
|
17
|
-
A spine owns the shared vocabulary for one domain
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
8
|
+
|
|
9
|
+
# Spine Primer
|
|
10
|
+
|
|
11
|
+
Use this primer when a tenant domain has a closed set of stages, statuses, or catalog keys that multiple surfaces must share. A spine is a tenant `System.ontology.catalogTypes` entry that coordinates workflows, runtime state, API reads, and UI rendering without forcing those surfaces to import from each other.
|
|
12
|
+
|
|
13
|
+
The lead-generation pattern is the reference shape: a `System.ontology.catalogTypes` entry (kind `'stage'`, `appliesTo` the owning object type) defines the stage vocabulary, workflow templates reference those stage keys, workflow factories validate stage keys before running, entity state stores sparse per-stage progress, and UI views render progress from the same vocabulary.
|
|
14
|
+
|
|
15
|
+
## What The Spine Owns
|
|
16
|
+
|
|
17
|
+
A spine owns the shared vocabulary for one domain, authored as a catalog entry under a System's `ontology.catalogTypes`:
|
|
18
|
+
|
|
19
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
systems: {
|
|
23
|
+
sales: {
|
|
24
|
+
id: 'sales',
|
|
25
|
+
order: 20,
|
|
26
|
+
label: 'Sales',
|
|
27
|
+
lifecycle: 'active',
|
|
28
|
+
systems: {
|
|
29
|
+
'lead-gen': {
|
|
30
|
+
id: 'sales.lead-gen',
|
|
31
|
+
order: 10,
|
|
32
|
+
label: 'Lead Gen',
|
|
33
|
+
parentSystemId: 'sales',
|
|
34
|
+
lifecycle: 'active',
|
|
35
|
+
ontology: {
|
|
36
|
+
catalogTypes: {
|
|
37
|
+
'sales.lead-gen:catalog/company-stage': {
|
|
38
|
+
id: 'sales.lead-gen:catalog/company-stage',
|
|
39
|
+
label: 'Company Stages',
|
|
40
|
+
ownerSystemId: 'sales.lead-gen',
|
|
41
|
+
kind: 'stage',
|
|
42
|
+
appliesTo: 'sales.lead-gen:object/company',
|
|
43
|
+
entries: {
|
|
44
|
+
scraped: { label: 'Scraped', description: 'Company was scraped from a source directory.', order: 1 },
|
|
45
|
+
qualified: { label: 'Qualified', description: 'Company passed fit scoring.', order: 2 }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The catalog record carries `id`, `label`, `ownerSystemId`, `kind` (a free-form label such as `'stage'`, `'pipeline'`, or `'template'`), and `appliesTo` (the ontology object-type ID this catalog governs). `entries` is a record keyed by stage/catalog member key; each entry is a JSON-serializable object. The vocabulary is not just a list of strings -- give each entry enough metadata for consumers to derive behavior consistently:
|
|
57
|
+
|
|
58
|
+
- the entry key identifies the stage or catalog member (e.g. `scraped`, `qualified`).
|
|
59
|
+
- `label` gives a human-readable name.
|
|
60
|
+
- `description` explains the business meaning.
|
|
61
|
+
- `order` gives stable display and workflow ordering.
|
|
62
|
+
- Consumers that need to know which tenant entity a stage updates carry that as an additional entry field (e.g. `entity: 'company'`) -- the schema does not require a fixed shape beyond `label`/`description`/`order` by convention.
|
|
63
|
+
|
|
64
|
+
The same keys then appear in four places:
|
|
65
|
+
|
|
66
|
+
| Role | Tenant-facing shape |
|
|
67
|
+
| ------------------- | ----------------------------------------------------------------------- |
|
|
68
|
+
| Vocabulary | `System.ontology.catalogTypes['<system.path>:catalog/<name>'].entries` |
|
|
69
|
+
| Process | workflow templates and build steps that reference catalog entry keys |
|
|
70
|
+
| Runtime state | entity state maps such as `{ [entryKey]: { status, updatedAt, data } }` |
|
|
71
|
+
| Consumer projection | API filters, progress summaries, and UI step rendering |
|
|
72
|
+
|
|
73
|
+
## Layering
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
tenant Organization Model
|
|
77
|
+
- System.ontology.catalogTypes (stage/pipeline/template catalogs)
|
|
78
|
+
- workflow templates
|
|
79
|
+
- capability bindings
|
|
80
|
+
|
|
|
81
|
+
+--> workflow factory
|
|
82
|
+
| - validates catalog entry keys
|
|
83
|
+
| - runs producers
|
|
84
|
+
| - dispatches entity-tagged results
|
|
85
|
+
|
|
|
86
|
+
+--> API and query helpers
|
|
87
|
+
| - filter pending entities by catalog entry key
|
|
88
|
+
| - aggregate progress from state maps
|
|
89
|
+
|
|
|
90
|
+
+--> UI projections
|
|
91
|
+
- render labels and order from the catalog
|
|
92
|
+
- distinguish known and unknown state keys
|
|
93
|
+
|
|
94
|
+
entity runtime state
|
|
95
|
+
{ [entryKey]: { status, updatedAt, data } }
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The important boundary is that producers and consumers coordinate through the `System.ontology.catalogTypes` vocabulary plus runtime state. They do not coordinate through direct imports, duplicated string constants, or workflow-specific side channels.
|
|
99
|
+
|
|
100
|
+
## Invariants
|
|
101
|
+
|
|
102
|
+
1. **The vocabulary is closed and validated.** Workflow factories should reject catalog entry keys that are not present in the tenant catalog record.
|
|
103
|
+
|
|
104
|
+
2. **The vocabulary carries metadata.** Labels, descriptions, and ordering should come from the catalog rather than being copied into each consumer.
|
|
105
|
+
|
|
106
|
+
3. **Runtime state is sparse and additive.** New entries appear in entity state when reached. Adding a catalog member should not require backfilling every entity.
|
|
107
|
+
|
|
108
|
+
4. **Producers return entity-tagged results.** Workflow steps should return which entity changed, its identifier, status, and optional data. The factory owns writing those results to the correct state map.
|
|
109
|
+
|
|
110
|
+
5. **Capability binding is separate from stage naming.** Workflow templates should point at capability keys, and the tenant environment can bind those capabilities to concrete workflow resources.
|
|
111
|
+
|
|
112
|
+
## Applying The Pattern
|
|
113
|
+
|
|
114
|
+
Use this checklist when adding or changing a tenant domain spine:
|
|
115
|
+
|
|
116
|
+
1. Define the domain catalog under the owning System's `ontology.catalogTypes` in the tenant Organization Model.
|
|
117
|
+
2. Include labels, descriptions, and ordering in each catalog entry.
|
|
118
|
+
3. Make workflow templates reference catalog entry keys instead of free-form strings.
|
|
119
|
+
4. Validate template entry keys when constructing workflow factories.
|
|
120
|
+
5. Store progress in sparse entity state maps keyed by catalog entry key.
|
|
121
|
+
6. Return entity-tagged workflow results and let the factory dispatch state updates.
|
|
122
|
+
7. Read progress through query helpers that use the same catalog keys.
|
|
123
|
+
8. Render UI labels, order, and status from the catalog plus state map.
|
|
124
|
+
|
|
125
|
+
Promote a vocabulary to a spine when the same catalog coordinates all three surfaces: at least one process definition, at least one workflow producer, and at least one independent consumer such as an API query or UI view.
|
|
126
|
+
|
|
127
|
+
## Counter-Patterns
|
|
128
|
+
|
|
129
|
+
Avoid these patterns in spine-governed domains:
|
|
130
|
+
|
|
131
|
+
- Free-form stage strings in workflow inputs.
|
|
132
|
+
- Duplicated UI-only labels or ordering.
|
|
133
|
+
- Per-workflow skip logic that bypasses the shared pending and progress contract.
|
|
134
|
+
- State writes from individual steps instead of the workflow factory.
|
|
135
|
+
- Hidden side channels for progress, such as ad hoc context keys.
|
|
136
|
+
- Direct coupling between producer code and consumer UI code.
|
|
137
|
+
|
|
138
|
+
When in doubt, update the `System.ontology.catalogTypes` vocabulary first, then let workflow templates, factories, queries, and views project from it.
|
package/reference/ui/index.mdx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "@elevasis/ui"
|
|
3
|
-
description: The shared React 19 feature-shell and manifest-backed feature modules for Elevasis — Lead Gen, CRM, Projects, Operations, Monitoring, Settings, SEO, and more. Embeds into any host UI via
|
|
3
|
+
description: The shared React 19 feature-shell and manifest-backed feature modules for Elevasis — Lead Gen, CRM, Projects, Operations, Monitoring, Settings, SEO, and more. Embeds into any host UI via ElevasisCoreProvider and ElevasisSystemsProvider.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`@elevasis/ui` is the shared React feature-shell for the Elevasis platform. It provides
|
|
6
|
+
`@elevasis/ui` is the shared React feature-shell for the Elevasis platform. It provides `ElevasisCoreProvider` / `ElevasisSystemsProvider` and a set of manifest-backed feature modules that a host UI embeds and composes. The model is: your shell owns the layout and routing; Elevasis features plug in as self-contained modules.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -27,20 +27,27 @@ Many peer dependencies are optional. Pull only the peers that the features you u
|
|
|
27
27
|
|
|
28
28
|
## Provider and Feature-Shell Model
|
|
29
29
|
|
|
30
|
-
The entry point is
|
|
30
|
+
The entry point is a pair of providers, both imported from `@elevasis/ui/provider`. `ElevasisCoreProvider` owns auth, the API client, theming, and the shared TanStack Query client. `ElevasisSystemsProvider` owns the System registry — it takes your `SystemModule` list plus the organization model and resolves the shell, sidebar, and topbar actions from them. Wrap your application root with both, core on the outside.
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import {
|
|
33
|
+
import { ElevasisCoreProvider, ElevasisSystemsProvider } from "@elevasis/ui/provider";
|
|
34
34
|
|
|
35
35
|
export function AppRoot() {
|
|
36
36
|
return (
|
|
37
|
-
<
|
|
38
|
-
{
|
|
39
|
-
|
|
37
|
+
<ElevasisCoreProvider
|
|
38
|
+
auth={{ mode: "authkit", clientId: WORKOS_CLIENT_ID }}
|
|
39
|
+
apiUrl={API_URL}
|
|
40
|
+
>
|
|
41
|
+
<ElevasisSystemsProvider systems={systems} organizationModel={organizationModel}>
|
|
42
|
+
{/* your shell and routes */}
|
|
43
|
+
</ElevasisSystemsProvider>
|
|
44
|
+
</ElevasisCoreProvider>
|
|
40
45
|
);
|
|
41
46
|
}
|
|
42
47
|
```
|
|
43
48
|
|
|
49
|
+
`apiUrl` is what activates the full service stack; omit it and `ElevasisCoreProvider` runs in theme-only mode with no service context. Read the resolved registry from `useElevasisSystems()`, or `useOptionalElevasisSystems()` when a component must also render outside the provider tree.
|
|
50
|
+
|
|
44
51
|
Feature modules are imported from their own subpaths (e.g. `@elevasis/ui/features/lead-gen`, `@elevasis/ui/features/crm`) and rendered inside the provider tree. Each module is manifest-backed: it reads the platform manifest at runtime to know which resources and workflows are available, so no hard-coded resource IDs are needed in the host UI.
|
|
45
52
|
|
|
46
53
|
## Available Feature Modules
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Anymailfinder Integration Adapter
|
|
3
|
-
*
|
|
4
|
-
* Typed wrapper over platform.call() for Anymailfinder email discovery operations.
|
|
5
|
-
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
-
*/
|
|
7
|
-
import type { AnymailfinderToolMap } from '../../types/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* Create a typed Anymailfinder adapter bound to a specific credential.
|
|
10
|
-
*
|
|
11
|
-
* @param credential - Credential name as configured in the command center
|
|
12
|
-
* @returns Object with 4 typed methods for Anymailfinder email discovery operations
|
|
13
|
-
*/
|
|
14
|
-
export declare function createAnymailfinderAdapter(credential: string): import("./create-adapter.js").TypedAdapter<AnymailfinderToolMap>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Apify Integration Adapter
|
|
3
|
-
*
|
|
4
|
-
* Typed wrapper over platform.call() for Apify actor operations.
|
|
5
|
-
* Uses factory pattern -- credential is bound once at construction time.
|
|
6
|
-
*/
|
|
7
|
-
import type { ApifyToolMap } from '../../types/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* Create a typed Apify adapter bound to a specific credential.
|
|
10
|
-
*
|
|
11
|
-
* @param credential - Credential name as configured in the command center
|
|
12
|
-
* @returns Object with 2 typed methods for Apify actor operations
|
|
13
|
-
*/
|
|
14
|
-
export declare function createApifyAdapter(credential: string): import("./create-adapter.js").TypedAdapter<ApifyToolMap>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Approval Platform Tool Adapter
|
|
3
|
-
*
|
|
4
|
-
* Typed wrapper over platform.call() for HITL (human-in-the-loop) tasks.
|
|
5
|
-
* Singleton export -- no credential needed (platform tool).
|
|
6
|
-
*/
|
|
7
|
-
import type { ApprovalToolMap } from '../../types/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* Typed approval adapter for creating and managing HITL tasks.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* import { approval } from '@elevasis/sdk/worker'
|
|
14
|
-
*
|
|
15
|
-
* const task = await approval.create({
|
|
16
|
-
* actions: [{ id: 'approve', label: 'Approve', type: 'primary' }],
|
|
17
|
-
* context: { dealId: 'deal-123' },
|
|
18
|
-
* description: 'Review proposal for Acme Corp',
|
|
19
|
-
* humanCheckpoint: 'proposal-review',
|
|
20
|
-
* })
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare const approval: import("./create-adapter.js").TypedAdapter<ApprovalToolMap>;
|