@synap-core/workspace-templates 0.11.0 → 0.23.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 +483 -0
- package/automations/bookmark-enrichment.automation.json +321 -0
- package/automations/github-pr-events.automation.json +505 -0
- package/automations/mail-feed.automation.json +86 -0
- package/automations/ship-a-change-checks-green.automation.json +106 -0
- package/automations/ship-a-change-checks-red.automation.json +106 -0
- package/automations/ship-a-change-deployed.automation.json +56 -0
- package/automations/ship-a-change-pr-merged.automation.json +110 -0
- package/automations/ship-a-change-pr-opened.automation.json +104 -0
- package/automations/url-bookmark-capture.automation.json +132 -0
- package/capabilities/agency-skills.capability.json +157 -0
- package/capabilities/apify.capability.json +265 -0
- package/capabilities/apollo.capability.json +120 -0
- package/capabilities/arch-backend.capability.json +97 -0
- package/capabilities/arch-client-intelligence.capability.json +401 -0
- package/capabilities/backblaze-b2.capability.json +205 -0
- package/capabilities/cal-com.capability.json +266 -0
- package/capabilities/canva.capability.json +274 -0
- package/capabilities/claude-code-routines.capability.json +172 -0
- package/capabilities/claude-managed-agents.capability.json +215 -0
- package/capabilities/client-comms-report.capability.json +246 -0
- package/capabilities/content-idea-to-production.capability.json +29 -0
- package/capabilities/datagouv.capability.json +315 -0
- package/capabilities/discord-bot.capability.json +157 -0
- package/capabilities/dropbox.capability.json +281 -0
- package/capabilities/exa.capability.json +109 -0
- package/capabilities/fal-ai.capability.json +83 -0
- package/capabilities/fal-media-lab.capability.json +158 -0
- package/capabilities/fireflies.capability.json +191 -0
- package/capabilities/freellmapi.capability.json +114 -0
- package/capabilities/generic-apikey.capability.json +92 -0
- package/capabilities/github-merge.capability.json +99 -0
- package/capabilities/github-read.capability.json +325 -0
- package/capabilities/governance-tighten-recommender.capability.json +81 -0
- package/capabilities/jev.capability.json +226 -0
- package/capabilities/lead-conversion-enrollment.capability.json +246 -0
- package/capabilities/mail-feed.capability.json +277 -0
- package/capabilities/mailgun.capability.json +52 -0
- package/capabilities/nango-google.capability.json +639 -0
- package/capabilities/notion.capability.json +417 -0
- package/capabilities/omniroute.capability.json +137 -0
- package/capabilities/posthog-analytics.capability.json +258 -0
- package/capabilities/postiz.capability.json +467 -0
- package/capabilities/proactive-digest.capability.json +190 -0
- package/capabilities/proton.capability.json +288 -0
- package/capabilities/replicate-rvm.capability.json +97 -0
- package/capabilities/research-methods.capability.json +57 -0
- package/capabilities/shopify.capability.json +395 -0
- package/capabilities/slack.capability.json +369 -0
- package/capabilities/stripe.capability.json +420 -0
- package/capabilities/telegram-bridge.capability.json +56 -0
- package/capabilities/treg.capability.json +102 -0
- package/capabilities/unipile-linkedin.capability.json +471 -0
- package/capabilities/vercel.capability.json +424 -0
- package/dist/define-CPS0n8BV.d.ts +1331 -0
- package/dist/index.d.ts +189 -900
- package/dist/index.js +24654 -21639
- package/dist/index.js.map +1 -1
- package/dist/wire.d.ts +222 -0
- package/dist/wire.js +77 -0
- package/dist/wire.js.map +1 -0
- package/package.json +41 -27
- package/packs/bookmark-views-pack.json +33 -0
- package/packs/crm-pack.json +76 -0
- package/packs/customer-profile.json +28 -0
- package/packs/deep-research.playbook.json +30 -0
- package/packs/event-views-pack.json +33 -0
- package/packs/habit-profile.json +27 -0
- package/packs/hr-pack.json +54 -0
- package/packs/invoice-profile.json +28 -0
- package/packs/knowledge-base-pack.json +56 -0
- package/packs/meeting-profile.json +29 -0
- package/packs/product-profile.json +30 -0
- package/packs/project-management-pack.json +49 -0
- package/packs/recipe-profile.json +29 -0
- package/packs/task-views-pack.json +39 -0
- package/retired.yaml +136 -0
- package/skills/app-factory-build-slice/SKILL.md +70 -0
- package/skills/app-factory-build-slice.catalog.json +17 -0
- package/skills/app-factory-design-canvas/SKILL.md +96 -0
- package/skills/app-factory-design-canvas.catalog.json +17 -0
- package/skills/app-factory-design-review/SKILL.md +99 -0
- package/skills/app-factory-design-review.catalog.json +18 -0
- package/skills/app-factory-research/SKILL.md +123 -0
- package/skills/app-factory-research.catalog.json +17 -0
- package/skills/bookmark-enrichment/SKILL.md +40 -0
- package/skills/carousel-format/carousel-format.skill.json +18 -0
- package/skills/collage-broll/collage-broll.skill.json +20 -0
- package/skills/content-taste/content-taste.skill.json +18 -0
- package/skills/creative-director/creative-director.skill.json +18 -0
- package/skills/design-critique/SKILL.md +135 -0
- package/skills/design-critique.catalog.json +12 -0
- package/skills/designing-with-real-components/SKILL.md +140 -0
- package/skills/designing-with-real-components.catalog.json +12 -0
- package/skills/edit-loop/edit-loop.skill.json +25 -0
- package/skills/facecam-edit/facecam-edit.skill.json +24 -0
- package/skills/mapping-the-server/SKILL.md +54 -0
- package/skills/math-explainer-manimgx/math-explainer-manimgx.skill.json +20 -0
- package/skills/motion-quality-gates/motion-quality-gates.skill.json +20 -0
- package/skills/open-design-edit/open-design-edit.skill.json +24 -0
- package/skills/reading-client-progress/SKILL.md +65 -0
- package/skills/routing-to-channels/SKILL.md +54 -0
- package/skills/stellar-scf-grants-advisor/ASSOCIATE-CHEATSHEET.md +133 -0
- package/skills/stellar-scf-grants-advisor/ASSOCIATE-ONBOARDING-GUIDE.md +761 -0
- package/skills/stellar-scf-grants-advisor/CLIENT-FAQ.md +181 -0
- package/skills/stellar-scf-grants-advisor/PARTNER-HANDOVER.md +130 -0
- package/skills/stellar-scf-grants-advisor/SKILL.md +102 -0
- package/skills/stellar-scf-grants-advisor/examples/README.md +43 -0
- package/skills/stellar-scf-grants-advisor/examples/chat-summary-templates.md +158 -0
- package/skills/stellar-scf-grants-advisor/examples/corpus-comparable-rows.md +136 -0
- package/skills/stellar-scf-grants-advisor/examples/q10-team-rewrites.md +109 -0
- package/skills/stellar-scf-grants-advisor/examples/q2-description-rewrites.md +88 -0
- package/skills/stellar-scf-grants-advisor/examples/q6-integration-rewrites.md +107 -0
- package/skills/stellar-scf-grants-advisor/examples/tranche-structures.md +176 -0
- package/skills/stellar-scf-grants-advisor/reference/01-methodology.md +96 -0
- package/skills/stellar-scf-grants-advisor/reference/02-scoring-framework.md +199 -0
- package/skills/stellar-scf-grants-advisor/reference/03-rejection-patterns.md +241 -0
- package/skills/stellar-scf-grants-advisor/reference/04-winner-patterns.md +120 -0
- package/skills/stellar-scf-grants-advisor/reference/05-comeback-patterns.md +92 -0
- package/skills/stellar-scf-grants-advisor/reference/06-budget-benchmarks.md +125 -0
- package/skills/stellar-scf-grants-advisor/reference/07-integration-list.md +147 -0
- package/skills/stellar-scf-grants-advisor/reference/08-abstract-fields.md +258 -0
- package/skills/stellar-scf-grants-advisor/reference/09-build-fields.md +259 -0
- package/skills/stellar-scf-grants-advisor/reference/10-corpus-winners.md +135 -0
- package/skills/stellar-scf-grants-advisor/reference/11-corpus-rejects.md +267 -0
- package/skills/stellar-scf-grants-advisor/reference/12-client-communication.md +131 -0
- package/skills/stellar-scf-grants-advisor/reference/13-excel-output-spec.md +199 -0
- package/skills/stellar-scf-grants-advisor/reference/14-worked-examples.md +160 -0
- package/skills/stellar-scf-grants-advisor/templates/abstract-review-builder.py +253 -0
- package/skills/stellar-scf-grants-advisor/templates/build-review-builder.py +213 -0
- package/skills/video-direction/video-direction.skill.json +20 -0
- package/skills/video-style-vocabulary/video-style-vocabulary.skill.json +20 -0
- package/skills/video-toolbox/video-toolbox.skill.json +20 -0
- package/src/__fixtures__/lifecycle-presets.flat-before.json +205 -0
- package/src/agency-os.yaml +122 -0
- package/src/agent-os-skill-slugs.test.ts +65 -0
- package/src/apify-social-reader.test.ts +317 -0
- package/src/base.template.test.ts +25 -19
- package/src/base.yaml +95 -39
- package/src/blockchain-ecosystem.yaml +1 -0
- package/src/brand-library.yaml +525 -14
- package/src/builder-dev-fold.template.test.ts +113 -0
- package/src/builder.yaml +798 -92
- package/src/business-model-catalog-description.test.ts +47 -0
- package/src/business-model-grp.template.test.ts +214 -0
- package/src/business-model.yaml +598 -0
- package/src/catalog-safety.test.ts +198 -0
- package/src/catalog.template-items.test.ts +75 -0
- package/src/catalog.ts +85 -2
- package/src/civic-france.yaml +102 -0
- package/src/concept-guard.test.ts +28 -8
- package/src/concept-guard.ts +2 -2
- package/src/content-creation.template.test.ts +52 -0
- package/src/content-creation.yaml +192 -0
- package/src/content-os.edit-loop.template.test.ts +210 -0
- package/src/content-os.publish-due-posts.template.test.ts +261 -0
- package/src/content-os.template.test.ts +322 -0
- package/src/content-os.video-takes.template.test.ts +338 -0
- package/src/content-os.work-a-take.template.test.ts +125 -0
- package/src/content-os.yaml +1830 -39
- package/src/content-studio-retired.template.test.ts +82 -0
- package/src/corpus-flow-validity.test.ts +4 -5
- package/src/crm-absorbs-outreach.template.test.ts +117 -0
- package/src/crm-build-plan.template.test.ts +128 -0
- package/src/crm-lists.template.test.ts +96 -0
- package/src/crm-messages-cadence.template.test.ts +164 -0
- package/src/crm-one-send-door.template.test.ts +65 -0
- package/src/crm.yaml +1456 -181
- package/src/decisions-wave.template.test.ts +186 -0
- package/src/define.ts +130 -17
- package/src/design-to-implementation.template.test.ts +94 -0
- package/src/dist-freshness.test.ts +97 -0
- package/src/domain-template-type.test.ts +75 -0
- package/src/ecosystem.yaml +27 -66
- package/src/enterprise-os.yaml +10 -134
- package/src/facecam-edit.audio-studio.test.ts +188 -0
- package/src/fal-generate-image.test.ts +200 -0
- package/src/fal-media-lab-pod-files.test.ts +180 -0
- package/src/finance.yaml +254 -1
- package/src/foundation.yaml +130 -28
- package/src/frame-host-modules.d.mts +6 -0
- package/src/frame-host-modules.mjs +58 -0
- package/src/generate.mjs +9 -3
- package/src/github-merge.test.ts +210 -0
- package/src/grants.yaml +57 -17
- package/src/hr.yaml +39 -6
- package/src/index.ts +36 -1
- package/src/intent.test.ts +161 -0
- package/src/internal-runbook.yaml +19 -1
- package/src/jev.test.ts +356 -0
- package/src/legal.yaml +33 -1
- package/src/life-os.yaml +65 -240
- package/src/lifecycle-coverage.test.ts +124 -0
- package/src/lifecycle-declarations.test.ts +252 -0
- package/src/lifecycle-presets.test.ts +468 -0
- package/src/lifecycle-presets.ts +494 -0
- package/src/lifecycle-stuck.test.ts +46 -0
- package/src/lifecycle-waits.parity.test.ts +319 -0
- package/src/marketing.yaml +108 -4
- package/src/meetings-knowledge.yaml +18 -0
- package/src/networking.yaml +23 -2
- package/src/operations.yaml +304 -4
- package/src/pipeline-views.template.test.ts +88 -0
- package/src/playbook-goal-placeholders.test.ts +57 -0
- package/src/postiz-contract.test.ts +134 -0
- package/src/presentation-declarations.test.ts +174 -0
- package/src/process-contract.validate.test.ts +352 -0
- package/src/project-management.yaml +39 -740
- package/src/publish-body.d.mts +29 -0
- package/src/publish-body.mjs +74 -0
- package/src/publish-body.test.ts +74 -0
- package/src/publish-official-lib.test.ts +176 -0
- package/src/replicate-rvm.test.ts +504 -0
- package/src/research-base.yaml +119 -20
- package/src/research-decision.yaml +60 -3
- package/src/reserved-profile-slugs.test.ts +83 -0
- package/src/retired-goal-kinds.test.ts +58 -0
- package/src/role-reference-and-step-domain.test.ts +192 -0
- package/src/seed-obligation.test.ts +176 -0
- package/src/send-message-maps.test.ts +227 -0
- package/src/shared-role-ssot.test.ts +42 -1
- package/src/ship-a-change.template.test.ts +177 -0
- package/src/skills.test.ts +170 -0
- package/src/social.yaml +85 -27
- package/src/space-packages.freshness.test.ts +97 -0
- package/src/space-packages.generated.ts +40 -0
- package/src/space-packages.test.ts +125 -0
- package/src/space-packages.ts +73 -0
- package/src/start.test.ts +188 -0
- package/src/task-intents.test.ts +293 -0
- package/src/templates.ts +21639 -21522
- package/src/types.ts +443 -60
- package/src/unipile-publish-post.test.ts +162 -0
- package/src/validate-flow.drift.test.ts +2 -3
- package/src/validate-flow.ts +32 -2
- package/src/validate-onboarding.test.ts +59 -0
- package/src/validate.test.ts +156 -3
- package/src/validate.ts +1384 -7
- package/src/wire-core.ts +231 -0
- package/src/wire.test.ts +159 -0
- package/src/wire.ts +107 -0
- package/src/__fixtures__/report-automation-flow.json +0 -393
- package/src/agent-fleet.yaml +0 -1645
- package/src/business-developer.template.test.ts +0 -351
- package/src/business-developer.yaml +0 -860
- package/src/content-studio.yaml +0 -361
- package/src/dev-dashboard.yaml +0 -990
- package/src/outreach-comms.yaml +0 -486
- package/src/the-arch.yaml +0 -201
package/dist/wire.d.ts
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { g as PackageDefinitionOutput, X as WorkspaceDefinitionInput } from './define-CPS0n8BV.js';
|
|
2
|
+
import '@synap-core/types/presentation';
|
|
3
|
+
import '@synap-core/types/space-brief';
|
|
4
|
+
import '@synap-core/types/capability-intents';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The per-kind wire envelopes and the ONE unwrap — import-free on purpose.
|
|
8
|
+
*
|
|
9
|
+
* Re-exported (with the workspace types) by `./wire`, the public subpath
|
|
10
|
+
* `@synap-core/workspace-templates/wire`. It has no imports so a consumer that
|
|
11
|
+
* still resolves an older npm copy of this package (the CLI, the CP, the pod)
|
|
12
|
+
* can carry it as a BYTE-IDENTICAL mirror pinned by a tripwire until it can
|
|
13
|
+
* import the subpath. Edit it here; the mirror copies it.
|
|
14
|
+
*
|
|
15
|
+
* What `GET {CP}/api/packages/:slug` serves as `package.definition`, per kind:
|
|
16
|
+
* the outputs of this package's producers (`scripts/catalog-lib.mjs`
|
|
17
|
+
* `toPublishBody`; `toOfficialPublishBody` for workspaces) plus what the CP
|
|
18
|
+
* adds on store/serve (`_meta.slug` via `withTemplateSlug`,
|
|
19
|
+
* `capability.contentHash`).
|
|
20
|
+
*
|
|
21
|
+
* WHY: a skill package is served as `{ _meta, skill: {…} }`. Read flat, every
|
|
22
|
+
* field is `undefined`: install refused a "bodiless" skill and the update door
|
|
23
|
+
* reported "no drift" forever (founder pod 2026-10-13, creative-director). Each
|
|
24
|
+
* consumer had its own cast; this is the one place the envelope is known.
|
|
25
|
+
*
|
|
26
|
+
* Element fields are pinned to the catalog schema (`SKILL_FIELDS`,
|
|
27
|
+
* `CapabilitySpec`) and `AutomationElement` to `PackageAutomationWire` by
|
|
28
|
+
* `schema/wire.parity.test.ts` (compile time).
|
|
29
|
+
*/
|
|
30
|
+
/** The kinds whose served definition this module describes. */
|
|
31
|
+
declare const WIRE_KINDS: readonly ["workspace", "capability", "skill", "automation", "view"];
|
|
32
|
+
type WireKind = (typeof WIRE_KINDS)[number];
|
|
33
|
+
/**
|
|
34
|
+
* Other names the same kinds go by: the pod's `market.install` says
|
|
35
|
+
* `template`, the CP category for an automation is `workflow`, and a pack is
|
|
36
|
+
* a workspace-shaped definition.
|
|
37
|
+
*/
|
|
38
|
+
declare const WIRE_KIND_ALIASES: {
|
|
39
|
+
readonly template: "workspace";
|
|
40
|
+
readonly pack: "workspace";
|
|
41
|
+
readonly workflow: "automation";
|
|
42
|
+
};
|
|
43
|
+
type WireKindName = WireKind | keyof typeof WIRE_KIND_ALIASES;
|
|
44
|
+
/** `template` → `workspace`, `workflow` → `automation`; `null` for a kind with no wire contract here (e.g. `cell`). */
|
|
45
|
+
declare function toWireKind(kind: string): WireKind | null;
|
|
46
|
+
/**
|
|
47
|
+
* `definition._meta` as served: the CP stamps `slug` on every row (the pod
|
|
48
|
+
* keys "which space is this template's?" on it); the CLI adds the `version`
|
|
49
|
+
* label it installs.
|
|
50
|
+
*/
|
|
51
|
+
interface WireMeta {
|
|
52
|
+
slug?: string;
|
|
53
|
+
version?: string;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/** `meta.icon` / `color` / `domain`, mirrored onto the definition by every publish builder. */
|
|
57
|
+
interface WireIdentity {
|
|
58
|
+
icon?: string;
|
|
59
|
+
color?: string;
|
|
60
|
+
domain?: string;
|
|
61
|
+
}
|
|
62
|
+
/** A composition dependency. */
|
|
63
|
+
interface WireDependency {
|
|
64
|
+
slug: string;
|
|
65
|
+
kind?: "workspace" | "capability" | "skill" | "workflow" | "view" | "cell" | "automation";
|
|
66
|
+
relation?: "compose" | "require";
|
|
67
|
+
reason?: string;
|
|
68
|
+
}
|
|
69
|
+
interface WireEnvelope extends WireIdentity {
|
|
70
|
+
_meta?: WireMeta;
|
|
71
|
+
dependencies?: WireDependency[];
|
|
72
|
+
}
|
|
73
|
+
/** The capability itself (`CapabilityDefinition`). */
|
|
74
|
+
interface CapabilityElement {
|
|
75
|
+
key: string;
|
|
76
|
+
name: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
params?: Array<Record<string, unknown>>;
|
|
79
|
+
vault?: Array<Record<string, unknown>>;
|
|
80
|
+
tools?: Array<Record<string, unknown>>;
|
|
81
|
+
skills?: Array<Record<string, unknown>>;
|
|
82
|
+
provides?: string[];
|
|
83
|
+
playbooks?: Array<Record<string, unknown>>;
|
|
84
|
+
/** Stamped by the CP on publish; the pod's drift marker. */
|
|
85
|
+
contentHash?: string;
|
|
86
|
+
automations?: Array<Record<string, unknown>>;
|
|
87
|
+
mcpServers?: unknown;
|
|
88
|
+
metadata?: Record<string, unknown>;
|
|
89
|
+
_generated?: unknown;
|
|
90
|
+
}
|
|
91
|
+
/** capability: `{ profiles: [], description, capability }`. */
|
|
92
|
+
interface CapabilityWire extends WireEnvelope {
|
|
93
|
+
profiles: unknown[];
|
|
94
|
+
description?: string;
|
|
95
|
+
capability: CapabilityElement;
|
|
96
|
+
}
|
|
97
|
+
/** ONE standalone skill. Not a workspace's `skills[]` link list. */
|
|
98
|
+
interface SkillElement {
|
|
99
|
+
/** The pod-side `load_skill` ref — its own identity, not the package slug. */
|
|
100
|
+
slug?: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
displayName?: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
kind?: "instruction" | "code" | "declarative" | "builtin";
|
|
105
|
+
scope?: "pod" | "user" | "workspace";
|
|
106
|
+
agentTypes?: string[];
|
|
107
|
+
body?: string;
|
|
108
|
+
code?: string;
|
|
109
|
+
providerSpec?: Record<string, unknown>;
|
|
110
|
+
parameters?: Record<string, unknown>;
|
|
111
|
+
category?: string;
|
|
112
|
+
executionMode?: "sync" | "async";
|
|
113
|
+
timeoutSeconds?: number;
|
|
114
|
+
intent?: string;
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
}
|
|
117
|
+
/** skill: `{ skill, icon?, color?, domain?, dependencies? }`. */
|
|
118
|
+
interface SkillWire extends WireEnvelope {
|
|
119
|
+
skill: SkillElement;
|
|
120
|
+
}
|
|
121
|
+
/** One graph automation (= `PackageAutomationWire`): `flowDefinition`, not the authored `flow`. */
|
|
122
|
+
interface AutomationElement {
|
|
123
|
+
key?: string;
|
|
124
|
+
name: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
triggerType: "event" | "cron" | "webhook" | "manual";
|
|
127
|
+
triggerConfig?: Record<string, unknown>;
|
|
128
|
+
flowDefinition?: {
|
|
129
|
+
nodes: unknown[];
|
|
130
|
+
edges: unknown[];
|
|
131
|
+
precondition?: string;
|
|
132
|
+
};
|
|
133
|
+
status?: "draft" | "active" | "paused";
|
|
134
|
+
}
|
|
135
|
+
/** automation (CP category `workflow`): `{ profiles: [], automations: [one] }`. */
|
|
136
|
+
interface AutomationWire extends WireEnvelope {
|
|
137
|
+
profiles: unknown[];
|
|
138
|
+
automations: AutomationElement[];
|
|
139
|
+
}
|
|
140
|
+
/** One view, as the pod's view install and update doors read it. */
|
|
141
|
+
interface ViewElement {
|
|
142
|
+
slug?: string;
|
|
143
|
+
name?: string;
|
|
144
|
+
displayName?: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
type?: string;
|
|
147
|
+
config?: Record<string, unknown>;
|
|
148
|
+
query?: Record<string, unknown>;
|
|
149
|
+
metadata?: Record<string, unknown>;
|
|
150
|
+
scopeProfileSlugs?: string[];
|
|
151
|
+
scopeProfileIds?: string[];
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
}
|
|
154
|
+
/** view: `{ views: [...] }`, or a legacy single view with its fields on top (has its own `type`). No catalog producer today. */
|
|
155
|
+
type ViewWire = (WireEnvelope & {
|
|
156
|
+
views: ViewElement[];
|
|
157
|
+
}) | ViewElement;
|
|
158
|
+
/**
|
|
159
|
+
* What {@link unwrapPackage} returns per kind. `workspace` is the definition
|
|
160
|
+
* itself; `./wire` narrows it to `WorkspaceWire`.
|
|
161
|
+
*/
|
|
162
|
+
interface PackageElementByKind<W = Record<string, unknown>> {
|
|
163
|
+
workspace: W;
|
|
164
|
+
capability: CapabilityElement;
|
|
165
|
+
skill: SkillElement;
|
|
166
|
+
automation: AutomationElement[];
|
|
167
|
+
view: ViewElement[];
|
|
168
|
+
}
|
|
169
|
+
type ElementOf<K extends WireKindName, W = Record<string, unknown>> = PackageElementByKind<W>[K extends WireKind ? K : K extends keyof typeof WIRE_KIND_ALIASES ? (typeof WIRE_KIND_ALIASES)[K] : never];
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @synap-core/workspace-templates/wire — ONE wire contract per package kind.
|
|
173
|
+
*
|
|
174
|
+
* The per-kind envelopes and `unwrapPackage` live in `./wire-core` (import-free,
|
|
175
|
+
* so it can be mirrored byte-for-byte by consumers still pinned to an older npm
|
|
176
|
+
* copy). This adds what needs the rest of the package: the workspace envelope,
|
|
177
|
+
* derived from `PackageDefinitionOutput` instead of re-declared, and the one
|
|
178
|
+
* workspace wire → create-input translation.
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* workspace / pack: `toPackageDefinition()` output — re-used, not re-declared.
|
|
183
|
+
* As served it is `toOfficialPublishBody().definition` (identity mirrored on
|
|
184
|
+
* top, `sourcePackage`) with `_meta` cut down to what the CP stamps; a bundled
|
|
185
|
+
* `PackageDefinitionOutput` is assignable to it as is.
|
|
186
|
+
*/
|
|
187
|
+
type WorkspaceWire = Omit<PackageDefinitionOutput, "_meta"> & WireIdentity & {
|
|
188
|
+
_meta?: Partial<PackageDefinitionOutput["_meta"]> & WireMeta;
|
|
189
|
+
/** Which build of this package generated the row (official rows only). */
|
|
190
|
+
sourcePackage?: {
|
|
191
|
+
name: string;
|
|
192
|
+
version: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/** The served definition, keyed by kind. */
|
|
196
|
+
interface PackageWireByKind {
|
|
197
|
+
workspace: WorkspaceWire;
|
|
198
|
+
capability: CapabilityWire;
|
|
199
|
+
skill: SkillWire;
|
|
200
|
+
automation: AutomationWire;
|
|
201
|
+
view: ViewWire;
|
|
202
|
+
}
|
|
203
|
+
type PackageWire = PackageWireByKind[WireKind];
|
|
204
|
+
/** `./wire-core`'s `unwrapPackage`, with the workspace element typed as {@link WorkspaceWire}. */
|
|
205
|
+
declare function unwrapPackage<K extends WireKindName>(kind: K, definition: unknown): ElementOf<K, WorkspaceWire>;
|
|
206
|
+
/**
|
|
207
|
+
* The served workspace definition → the input the pod's create/reconcile door
|
|
208
|
+
* takes (`WorkspaceDefinitionInput`). The two renames live here and only here:
|
|
209
|
+
* `suggestedEntities` → `seedEntities` and `automations` (graph flows) →
|
|
210
|
+
* `flowAutomations`.
|
|
211
|
+
*
|
|
212
|
+
* A 1:1 copy of the pod's `toWorkspaceDefinitionInput`
|
|
213
|
+
* (synap-backend `services/capabilities/resolve-workspace-template.ts`), so the
|
|
214
|
+
* pod can import this instead. Like it, it does NOT carry `taskIntents`,
|
|
215
|
+
* `capabilities`, `playbooks`, `actionPlacements`, `rules` or `skills`: the
|
|
216
|
+
* post-workspace layer reads the last five off the package definition itself;
|
|
217
|
+
* `taskIntents` is a gap on that path today. `wire.test.ts` pins every
|
|
218
|
+
* difference from `toWorkspaceDefinition`.
|
|
219
|
+
*/
|
|
220
|
+
declare function toWorkspaceInput(pkg: WorkspaceWire): WorkspaceDefinitionInput;
|
|
221
|
+
|
|
222
|
+
export { type AutomationElement, type AutomationWire, type CapabilityElement, type CapabilityWire, type PackageElementByKind, type PackageWire, type PackageWireByKind, type SkillElement, type SkillWire, type ViewElement, type ViewWire, WIRE_KINDS, WIRE_KIND_ALIASES, type WireDependency, type WireEnvelope, type WireIdentity, type WireKind, type WireKindName, type WireMeta, type WorkspaceWire, toWireKind, toWorkspaceInput, unwrapPackage };
|
package/dist/wire.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/wire-core.ts
|
|
2
|
+
var WIRE_KINDS = ["workspace", "capability", "skill", "automation", "view"];
|
|
3
|
+
var WIRE_KIND_ALIASES = {
|
|
4
|
+
template: "workspace",
|
|
5
|
+
pack: "workspace",
|
|
6
|
+
workflow: "automation"
|
|
7
|
+
};
|
|
8
|
+
function toWireKind(kind) {
|
|
9
|
+
if (WIRE_KINDS.includes(kind)) return kind;
|
|
10
|
+
return WIRE_KIND_ALIASES[kind] ?? null;
|
|
11
|
+
}
|
|
12
|
+
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
13
|
+
function unwrapPackage(kind, definition) {
|
|
14
|
+
const wireKind = toWireKind(kind);
|
|
15
|
+
if (!wireKind) throw new Error(`unwrapPackage: "${kind}" has no wire contract`);
|
|
16
|
+
if (!isRecord(definition)) {
|
|
17
|
+
throw new TypeError(
|
|
18
|
+
`unwrapPackage(${kind}): the definition is not an object (${definition === null ? "null" : Array.isArray(definition) ? "array" : typeof definition})`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
switch (wireKind) {
|
|
22
|
+
case "skill":
|
|
23
|
+
return isRecord(definition.skill) ? definition.skill : definition;
|
|
24
|
+
case "capability":
|
|
25
|
+
return isRecord(definition.capability) ? definition.capability : definition;
|
|
26
|
+
case "automation":
|
|
27
|
+
return Array.isArray(definition.automations) ? definition.automations : [];
|
|
28
|
+
case "view":
|
|
29
|
+
if (Array.isArray(definition.views) && definition.views.length > 0) return definition.views;
|
|
30
|
+
return definition.type ? [definition] : [];
|
|
31
|
+
case "workspace":
|
|
32
|
+
return definition;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/wire.ts
|
|
37
|
+
function unwrapPackage2(kind, definition) {
|
|
38
|
+
return unwrapPackage(kind, definition);
|
|
39
|
+
}
|
|
40
|
+
function toWorkspaceInput(pkg) {
|
|
41
|
+
return {
|
|
42
|
+
workspaceName: pkg.workspaceName,
|
|
43
|
+
description: pkg.description,
|
|
44
|
+
proposalId: pkg._meta?.slug,
|
|
45
|
+
profiles: pkg.profiles,
|
|
46
|
+
views: pkg.views ?? [],
|
|
47
|
+
entityLinks: pkg.entityLinks ?? [],
|
|
48
|
+
seedEntities: pkg.suggestedEntities ?? [],
|
|
49
|
+
suggestedRelations: pkg.suggestedRelations,
|
|
50
|
+
displayTemplates: pkg.displayTemplates,
|
|
51
|
+
layoutConfig: pkg.layoutConfig,
|
|
52
|
+
bentoViewName: pkg.bentoViewName,
|
|
53
|
+
bentoLayout: pkg.bentoLayout,
|
|
54
|
+
bentoViewBlocks: pkg.bentoViewBlocks,
|
|
55
|
+
profileEntityBentoTemplates: pkg.profileEntityBentoTemplates,
|
|
56
|
+
workspaceSubtype: pkg.workspaceSubtype,
|
|
57
|
+
workspaceType: pkg.workspaceType,
|
|
58
|
+
workspaceVisibility: pkg.workspaceVisibility,
|
|
59
|
+
workspaceCapabilities: pkg.workspaceCapabilities,
|
|
60
|
+
intent: pkg.intent,
|
|
61
|
+
sourceRoles: pkg.sourceRoles,
|
|
62
|
+
defaultSources: pkg.defaultSources,
|
|
63
|
+
onboarding: pkg.onboarding,
|
|
64
|
+
dependencies: pkg.dependencies,
|
|
65
|
+
flowAutomations: pkg.automations ?? [],
|
|
66
|
+
commands: pkg.commands ?? [],
|
|
67
|
+
relationDefs: pkg.relationDefs ?? []
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
WIRE_KINDS,
|
|
72
|
+
WIRE_KIND_ALIASES,
|
|
73
|
+
toWireKind,
|
|
74
|
+
toWorkspaceInput,
|
|
75
|
+
unwrapPackage2 as unwrapPackage
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=wire.js.map
|
package/dist/wire.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/wire-core.ts","../src/wire.ts"],"sourcesContent":["/**\n * The per-kind wire envelopes and the ONE unwrap — import-free on purpose.\n *\n * Re-exported (with the workspace types) by `./wire`, the public subpath\n * `@synap-core/workspace-templates/wire`. It has no imports so a consumer that\n * still resolves an older npm copy of this package (the CLI, the CP, the pod)\n * can carry it as a BYTE-IDENTICAL mirror pinned by a tripwire until it can\n * import the subpath. Edit it here; the mirror copies it.\n *\n * What `GET {CP}/api/packages/:slug` serves as `package.definition`, per kind:\n * the outputs of this package's producers (`scripts/catalog-lib.mjs`\n * `toPublishBody`; `toOfficialPublishBody` for workspaces) plus what the CP\n * adds on store/serve (`_meta.slug` via `withTemplateSlug`,\n * `capability.contentHash`).\n *\n * WHY: a skill package is served as `{ _meta, skill: {…} }`. Read flat, every\n * field is `undefined`: install refused a \"bodiless\" skill and the update door\n * reported \"no drift\" forever (founder pod 2026-10-13, creative-director). Each\n * consumer had its own cast; this is the one place the envelope is known.\n *\n * Element fields are pinned to the catalog schema (`SKILL_FIELDS`,\n * `CapabilitySpec`) and `AutomationElement` to `PackageAutomationWire` by\n * `schema/wire.parity.test.ts` (compile time).\n */\n\n// ─── Kinds ──────────────────────────────────────────────────────────────────\n\n/** The kinds whose served definition this module describes. */\nexport const WIRE_KINDS = [\"workspace\", \"capability\", \"skill\", \"automation\", \"view\"] as const;\nexport type WireKind = (typeof WIRE_KINDS)[number];\n\n/**\n * Other names the same kinds go by: the pod's `market.install` says\n * `template`, the CP category for an automation is `workflow`, and a pack is\n * a workspace-shaped definition.\n */\nexport const WIRE_KIND_ALIASES = {\n template: \"workspace\",\n pack: \"workspace\",\n workflow: \"automation\",\n} as const satisfies Record<string, WireKind>;\nexport type WireKindName = WireKind | keyof typeof WIRE_KIND_ALIASES;\n\n/** `template` → `workspace`, `workflow` → `automation`; `null` for a kind with no wire contract here (e.g. `cell`). */\nexport function toWireKind(kind: string): WireKind | null {\n if ((WIRE_KINDS as readonly string[]).includes(kind)) return kind as WireKind;\n return (WIRE_KIND_ALIASES as Record<string, WireKind>)[kind] ?? null;\n}\n\n// ─── Envelope pieces every kind shares ──────────────────────────────────────\n\n/**\n * `definition._meta` as served: the CP stamps `slug` on every row (the pod\n * keys \"which space is this template's?\" on it); the CLI adds the `version`\n * label it installs.\n */\nexport interface WireMeta {\n slug?: string;\n version?: string;\n [key: string]: unknown;\n}\n\n/** `meta.icon` / `color` / `domain`, mirrored onto the definition by every publish builder. */\nexport interface WireIdentity {\n icon?: string;\n color?: string;\n domain?: string;\n}\n\n/** A composition dependency. */\nexport interface WireDependency {\n slug: string;\n kind?: \"workspace\" | \"capability\" | \"skill\" | \"workflow\" | \"view\" | \"cell\" | \"automation\";\n relation?: \"compose\" | \"require\";\n reason?: string;\n}\n\nexport interface WireEnvelope extends WireIdentity {\n _meta?: WireMeta;\n dependencies?: WireDependency[];\n}\n\n// ─── Elements and envelopes, per kind ───────────────────────────────────────\n\n/** The capability itself (`CapabilityDefinition`). */\nexport interface CapabilityElement {\n key: string;\n name: string;\n description?: string;\n params?: Array<Record<string, unknown>>;\n vault?: Array<Record<string, unknown>>;\n tools?: Array<Record<string, unknown>>;\n skills?: Array<Record<string, unknown>>;\n provides?: string[];\n playbooks?: Array<Record<string, unknown>>;\n /** Stamped by the CP on publish; the pod's drift marker. */\n contentHash?: string;\n automations?: Array<Record<string, unknown>>;\n mcpServers?: unknown;\n metadata?: Record<string, unknown>;\n _generated?: unknown;\n}\n\n/** capability: `{ profiles: [], description, capability }`. */\nexport interface CapabilityWire extends WireEnvelope {\n profiles: unknown[];\n description?: string;\n capability: CapabilityElement;\n}\n\n/** ONE standalone skill. Not a workspace's `skills[]` link list. */\nexport interface SkillElement {\n /** The pod-side `load_skill` ref — its own identity, not the package slug. */\n slug?: string;\n name?: string;\n displayName?: string;\n description?: string;\n kind?: \"instruction\" | \"code\" | \"declarative\" | \"builtin\";\n scope?: \"pod\" | \"user\" | \"workspace\";\n agentTypes?: string[];\n body?: string;\n code?: string;\n providerSpec?: Record<string, unknown>;\n parameters?: Record<string, unknown>;\n category?: string;\n executionMode?: \"sync\" | \"async\";\n timeoutSeconds?: number;\n intent?: string;\n [key: string]: unknown;\n}\n\n/** skill: `{ skill, icon?, color?, domain?, dependencies? }`. */\nexport interface SkillWire extends WireEnvelope {\n skill: SkillElement;\n}\n\n/** One graph automation (= `PackageAutomationWire`): `flowDefinition`, not the authored `flow`. */\nexport interface AutomationElement {\n key?: string;\n name: string;\n description?: string;\n triggerType: \"event\" | \"cron\" | \"webhook\" | \"manual\";\n triggerConfig?: Record<string, unknown>;\n flowDefinition?: { nodes: unknown[]; edges: unknown[]; precondition?: string };\n status?: \"draft\" | \"active\" | \"paused\";\n}\n\n/** automation (CP category `workflow`): `{ profiles: [], automations: [one] }`. */\nexport interface AutomationWire extends WireEnvelope {\n profiles: unknown[];\n automations: AutomationElement[];\n}\n\n/** One view, as the pod's view install and update doors read it. */\nexport interface ViewElement {\n slug?: string;\n name?: string;\n displayName?: string;\n description?: string;\n type?: string;\n config?: Record<string, unknown>;\n query?: Record<string, unknown>;\n metadata?: Record<string, unknown>;\n scopeProfileSlugs?: string[];\n scopeProfileIds?: string[];\n [key: string]: unknown;\n}\n\n/** view: `{ views: [...] }`, or a legacy single view with its fields on top (has its own `type`). No catalog producer today. */\nexport type ViewWire = (WireEnvelope & { views: ViewElement[] }) | ViewElement;\n\n/**\n * What {@link unwrapPackage} returns per kind. `workspace` is the definition\n * itself; `./wire` narrows it to `WorkspaceWire`.\n */\nexport interface PackageElementByKind<W = Record<string, unknown>> {\n workspace: W;\n capability: CapabilityElement;\n skill: SkillElement;\n automation: AutomationElement[];\n view: ViewElement[];\n}\n\nexport type ElementOf<K extends WireKindName, W = Record<string, unknown>> = PackageElementByKind<W>[K extends WireKind\n ? K\n : K extends keyof typeof WIRE_KIND_ALIASES\n ? (typeof WIRE_KIND_ALIASES)[K]\n : never];\n\n// ─── The ONE unwrap ─────────────────────────────────────────────────────────\n\nconst isRecord = (v: unknown): v is Record<string, unknown> =>\n typeof v === \"object\" && v !== null && !Array.isArray(v);\n\n/**\n * The installable element(s) inside a served definition:\n *\n * skill → the `skill` object (a legacy flat definition is the skill itself)\n * capability → the `capability` object (a flat `CapabilityDefinition` — the\n * pod cache / CP by-key shape — passes through)\n * automation → `automations[]` (`[]` when the definition declares none)\n * view → `views[]`, or a legacy flat view (top-level `type`) as `[def]`, else `[]`\n * workspace → the definition itself\n *\n * An empty array means the definition declares none; the install doors refuse\n * that themselves. A definition that is not an object is a failed read, never\n * an empty one: it throws.\n */\nexport function unwrapPackage<K extends WireKindName>(kind: K, definition: unknown): ElementOf<K>;\nexport function unwrapPackage(kind: string, definition: unknown): unknown {\n const wireKind = toWireKind(kind);\n if (!wireKind) throw new Error(`unwrapPackage: \"${kind}\" has no wire contract`);\n if (!isRecord(definition)) {\n throw new TypeError(\n `unwrapPackage(${kind}): the definition is not an object (${definition === null ? \"null\" : Array.isArray(definition) ? \"array\" : typeof definition})`,\n );\n }\n switch (wireKind) {\n case \"skill\":\n return isRecord(definition.skill) ? definition.skill : definition;\n case \"capability\":\n return isRecord(definition.capability) ? definition.capability : definition;\n case \"automation\":\n return Array.isArray(definition.automations) ? definition.automations : [];\n case \"view\":\n if (Array.isArray(definition.views) && definition.views.length > 0) return definition.views;\n return definition.type ? [definition] : [];\n case \"workspace\":\n return definition;\n }\n}\n","/**\n * @synap-core/workspace-templates/wire — ONE wire contract per package kind.\n *\n * The per-kind envelopes and `unwrapPackage` live in `./wire-core` (import-free,\n * so it can be mirrored byte-for-byte by consumers still pinned to an older npm\n * copy). This adds what needs the rest of the package: the workspace envelope,\n * derived from `PackageDefinitionOutput` instead of re-declared, and the one\n * workspace wire → create-input translation.\n */\n\nimport type { PackageDefinitionOutput, WorkspaceDefinitionInput } from \"./define\";\nimport { unwrapPackage as unwrapCore, type ElementOf, type WireIdentity, type WireKindName, type WireMeta } from \"./wire-core\";\n\nexport {\n WIRE_KINDS,\n WIRE_KIND_ALIASES,\n toWireKind,\n type WireKind,\n type WireKindName,\n type WireMeta,\n type WireIdentity,\n type WireDependency,\n type WireEnvelope,\n type CapabilityElement,\n type CapabilityWire,\n type SkillElement,\n type SkillWire,\n type AutomationElement,\n type AutomationWire,\n type ViewElement,\n type ViewWire,\n type PackageElementByKind,\n} from \"./wire-core\";\nimport type { AutomationWire, CapabilityWire, SkillWire, ViewWire, WireKind } from \"./wire-core\";\n\n/**\n * workspace / pack: `toPackageDefinition()` output — re-used, not re-declared.\n * As served it is `toOfficialPublishBody().definition` (identity mirrored on\n * top, `sourcePackage`) with `_meta` cut down to what the CP stamps; a bundled\n * `PackageDefinitionOutput` is assignable to it as is.\n */\nexport type WorkspaceWire = Omit<PackageDefinitionOutput, \"_meta\"> &\n WireIdentity & {\n _meta?: Partial<PackageDefinitionOutput[\"_meta\"]> & WireMeta;\n /** Which build of this package generated the row (official rows only). */\n sourcePackage?: { name: string; version: string };\n };\n\n/** The served definition, keyed by kind. */\nexport interface PackageWireByKind {\n workspace: WorkspaceWire;\n capability: CapabilityWire;\n skill: SkillWire;\n automation: AutomationWire;\n view: ViewWire;\n}\nexport type PackageWire = PackageWireByKind[WireKind];\n\n/** `./wire-core`'s `unwrapPackage`, with the workspace element typed as {@link WorkspaceWire}. */\nexport function unwrapPackage<K extends WireKindName>(kind: K, definition: unknown): ElementOf<K, WorkspaceWire> {\n return unwrapCore(kind, definition) as ElementOf<K, WorkspaceWire>;\n}\n\n/**\n * The served workspace definition → the input the pod's create/reconcile door\n * takes (`WorkspaceDefinitionInput`). The two renames live here and only here:\n * `suggestedEntities` → `seedEntities` and `automations` (graph flows) →\n * `flowAutomations`.\n *\n * A 1:1 copy of the pod's `toWorkspaceDefinitionInput`\n * (synap-backend `services/capabilities/resolve-workspace-template.ts`), so the\n * pod can import this instead. Like it, it does NOT carry `taskIntents`,\n * `capabilities`, `playbooks`, `actionPlacements`, `rules` or `skills`: the\n * post-workspace layer reads the last five off the package definition itself;\n * `taskIntents` is a gap on that path today. `wire.test.ts` pins every\n * difference from `toWorkspaceDefinition`.\n */\nexport function toWorkspaceInput(pkg: WorkspaceWire): WorkspaceDefinitionInput {\n return {\n workspaceName: pkg.workspaceName,\n description: pkg.description,\n proposalId: pkg._meta?.slug,\n profiles: pkg.profiles,\n views: pkg.views ?? [],\n entityLinks: pkg.entityLinks ?? [],\n seedEntities: pkg.suggestedEntities ?? [],\n suggestedRelations: pkg.suggestedRelations,\n displayTemplates: pkg.displayTemplates,\n layoutConfig: pkg.layoutConfig,\n bentoViewName: pkg.bentoViewName,\n bentoLayout: pkg.bentoLayout,\n bentoViewBlocks: pkg.bentoViewBlocks,\n profileEntityBentoTemplates: pkg.profileEntityBentoTemplates,\n workspaceSubtype: pkg.workspaceSubtype,\n workspaceType: pkg.workspaceType,\n workspaceVisibility: pkg.workspaceVisibility,\n workspaceCapabilities: pkg.workspaceCapabilities,\n intent: pkg.intent,\n sourceRoles: pkg.sourceRoles,\n defaultSources: pkg.defaultSources,\n onboarding: pkg.onboarding,\n dependencies: pkg.dependencies,\n flowAutomations: pkg.automations ?? [],\n commands: pkg.commands ?? [],\n relationDefs: pkg.relationDefs ?? [],\n };\n}\n"],"mappings":";AA4BO,IAAM,aAAa,CAAC,aAAa,cAAc,SAAS,cAAc,MAAM;AAQ5E,IAAM,oBAAoB;AAAA,EAC/B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ;AAIO,SAAS,WAAW,MAA+B;AACxD,MAAK,WAAiC,SAAS,IAAI,EAAG,QAAO;AAC7D,SAAQ,kBAA+C,IAAI,KAAK;AAClE;AAgJA,IAAM,WAAW,CAAC,MAChB,OAAO,MAAM,YAAY,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC;AAiBlD,SAAS,cAAc,MAAc,YAA8B;AACxE,QAAM,WAAW,WAAW,IAAI;AAChC,MAAI,CAAC,SAAU,OAAM,IAAI,MAAM,mBAAmB,IAAI,wBAAwB;AAC9E,MAAI,CAAC,SAAS,UAAU,GAAG;AACzB,UAAM,IAAI;AAAA,MACR,iBAAiB,IAAI,uCAAuC,eAAe,OAAO,SAAS,MAAM,QAAQ,UAAU,IAAI,UAAU,OAAO,UAAU;AAAA,IACpJ;AAAA,EACF;AACA,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,SAAS,WAAW,KAAK,IAAI,WAAW,QAAQ;AAAA,IACzD,KAAK;AACH,aAAO,SAAS,WAAW,UAAU,IAAI,WAAW,aAAa;AAAA,IACnE,KAAK;AACH,aAAO,MAAM,QAAQ,WAAW,WAAW,IAAI,WAAW,cAAc,CAAC;AAAA,IAC3E,KAAK;AACH,UAAI,MAAM,QAAQ,WAAW,KAAK,KAAK,WAAW,MAAM,SAAS,EAAG,QAAO,WAAW;AACtF,aAAO,WAAW,OAAO,CAAC,UAAU,IAAI,CAAC;AAAA,IAC3C,KAAK;AACH,aAAO;AAAA,EACX;AACF;;;AC3KO,SAASA,eAAsC,MAAS,YAAkD;AAC/G,SAAO,cAAW,MAAM,UAAU;AACpC;AAgBO,SAAS,iBAAiB,KAA8C;AAC7E,SAAO;AAAA,IACL,eAAe,IAAI;AAAA,IACnB,aAAa,IAAI;AAAA,IACjB,YAAY,IAAI,OAAO;AAAA,IACvB,UAAU,IAAI;AAAA,IACd,OAAO,IAAI,SAAS,CAAC;AAAA,IACrB,aAAa,IAAI,eAAe,CAAC;AAAA,IACjC,cAAc,IAAI,qBAAqB,CAAC;AAAA,IACxC,oBAAoB,IAAI;AAAA,IACxB,kBAAkB,IAAI;AAAA,IACtB,cAAc,IAAI;AAAA,IAClB,eAAe,IAAI;AAAA,IACnB,aAAa,IAAI;AAAA,IACjB,iBAAiB,IAAI;AAAA,IACrB,6BAA6B,IAAI;AAAA,IACjC,kBAAkB,IAAI;AAAA,IACtB,eAAe,IAAI;AAAA,IACnB,qBAAqB,IAAI;AAAA,IACzB,uBAAuB,IAAI;AAAA,IAC3B,QAAQ,IAAI;AAAA,IACZ,aAAa,IAAI;AAAA,IACjB,gBAAgB,IAAI;AAAA,IACpB,YAAY,IAAI;AAAA,IAChB,cAAc,IAAI;AAAA,IAClB,iBAAiB,IAAI,eAAe,CAAC;AAAA,IACrC,UAAU,IAAI,YAAY,CAAC;AAAA,IAC3B,cAAc,IAAI,gBAAgB,CAAC;AAAA,EACrC;AACF;","names":["unwrapPackage"]}
|
package/package.json
CHANGED
|
@@ -1,51 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synap-core/workspace-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"packageManager": "pnpm@9.15.4",
|
|
6
5
|
"description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Synap-core/app-bases.git",
|
|
9
|
+
"directory": "packages/workspace-templates"
|
|
10
|
+
},
|
|
7
11
|
"exports": {
|
|
8
12
|
".": {
|
|
9
13
|
"types": "./dist/index.d.ts",
|
|
10
|
-
"node": "./dist/index.js",
|
|
11
14
|
"default": "./dist/index.js"
|
|
12
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"./wire": {
|
|
17
|
+
"types": "./dist/wire.d.ts",
|
|
18
|
+
"default": "./dist/wire.js"
|
|
19
|
+
},
|
|
20
|
+
"./capabilities/*": "./capabilities/*",
|
|
21
|
+
"./skills/*": "./skills/*",
|
|
22
|
+
"./packs/*": "./packs/*",
|
|
23
|
+
"./automations/*": "./automations/*",
|
|
24
|
+
"./package.json": "./package.json"
|
|
13
25
|
},
|
|
14
26
|
"files": [
|
|
15
27
|
"dist",
|
|
16
|
-
"src"
|
|
28
|
+
"src",
|
|
29
|
+
"capabilities",
|
|
30
|
+
"skills",
|
|
31
|
+
"packs",
|
|
32
|
+
"automations",
|
|
33
|
+
"retired.yaml"
|
|
17
34
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"type-check": "tsc --noEmit",
|
|
20
|
-
"build:yaml": "node --experimental-strip-types build.mjs",
|
|
21
|
-
"check:converters": "node scripts/check-converters.mjs",
|
|
22
|
-
"check:concepts": "node scripts/check-concepts.mjs",
|
|
23
|
-
"build": "node --experimental-strip-types build.mjs && tsup && node scripts/check-converters.mjs && node scripts/check-concepts.mjs",
|
|
24
|
-
"provision": "node scripts/provision.mjs",
|
|
25
|
-
"eval": "node scripts/eval-standard.mjs",
|
|
26
|
-
"prepublishOnly": "node --experimental-strip-types build.mjs && tsup && node scripts/check-converters.mjs && node scripts/check-concepts.mjs"
|
|
27
|
-
},
|
|
28
35
|
"dependencies": {
|
|
36
|
+
"@synap-core/types": "^1.12.0",
|
|
29
37
|
"zod": "^3.0.0",
|
|
30
38
|
"js-yaml": "^4.1.0"
|
|
31
39
|
},
|
|
32
40
|
"devDependencies": {
|
|
33
41
|
"@types/js-yaml": "^4.0.9",
|
|
34
42
|
"@types/node": "^22.0.0",
|
|
43
|
+
"esbuild": "^0.27.3",
|
|
35
44
|
"tsup": "^8.0.0",
|
|
36
45
|
"typescript": "^5.5.0"
|
|
37
46
|
},
|
|
38
47
|
"publishConfig": {
|
|
39
48
|
"registry": "https://registry.npmjs.org",
|
|
40
|
-
"access": "public"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"type-check": "tsc -p tsconfig.catalog.json && tsc --noEmit",
|
|
53
|
+
"type-check:catalog": "tsc -p tsconfig.catalog.json",
|
|
54
|
+
"build:yaml": "node --experimental-strip-types build.mjs",
|
|
55
|
+
"build:space-packages": "node scripts/build-space-packages.mjs",
|
|
56
|
+
"check:converters": "node scripts/check-converters.mjs",
|
|
57
|
+
"check:concepts": "node scripts/check-concepts.mjs",
|
|
58
|
+
"build": "node --experimental-strip-types build.mjs && tsup && node scripts/check-converters.mjs && node scripts/check-concepts.mjs",
|
|
59
|
+
"provision": "node scripts/provision.mjs",
|
|
60
|
+
"eval": "node scripts/eval-standard.mjs"
|
|
61
|
+
},
|
|
62
|
+
"main": "./dist/index.js",
|
|
63
|
+
"module": "./dist/index.js",
|
|
64
|
+
"types": "./dist/index.d.ts"
|
|
65
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"slug": "bookmark-views-pack",
|
|
4
|
+
"displayName": "Bookmark Views",
|
|
5
|
+
"icon": "bookmark",
|
|
6
|
+
"color": "#F59E0B",
|
|
7
|
+
"tags": ["bookmarks", "reading", "web", "views"],
|
|
8
|
+
"requiredTier": null,
|
|
9
|
+
"isPublic": true
|
|
10
|
+
},
|
|
11
|
+
"description": "Three ready-made views for saved links and articles: a masonry reading feed, a gallery and an articles table.",
|
|
12
|
+
"profiles": [],
|
|
13
|
+
"views": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Reading Feed",
|
|
16
|
+
"type": "masonry",
|
|
17
|
+
"scopeProfileSlugs": ["bookmark", "website", "article"],
|
|
18
|
+
"config": {}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Bookmark Gallery",
|
|
22
|
+
"type": "gallery",
|
|
23
|
+
"scopeProfileSlugs": ["bookmark", "website", "article"],
|
|
24
|
+
"config": {}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Articles Table",
|
|
28
|
+
"type": "table",
|
|
29
|
+
"scopeProfileSlug": "article",
|
|
30
|
+
"config": {}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"slug": "crm-pack",
|
|
4
|
+
"icon": "users",
|
|
5
|
+
"color": "#3B82F6",
|
|
6
|
+
"tags": ["crm", "sales", "contacts", "deals"],
|
|
7
|
+
"requiredTier": null,
|
|
8
|
+
"isPublic": true
|
|
9
|
+
},
|
|
10
|
+
"profiles": [
|
|
11
|
+
{
|
|
12
|
+
"slug": "contact",
|
|
13
|
+
"displayName": "Contact",
|
|
14
|
+
"icon": "user-check",
|
|
15
|
+
"color": "#06B6D4",
|
|
16
|
+
"description": "People you interact with",
|
|
17
|
+
"scope": "workspace",
|
|
18
|
+
"parentProfileSlug": "person",
|
|
19
|
+
"properties": [
|
|
20
|
+
{ "slug": "role", "valueType": "string", "label": "Role / Title" },
|
|
21
|
+
{ "slug": "department", "valueType": "string", "label": "Department" },
|
|
22
|
+
{ "slug": "source", "valueType": "string", "label": "Lead Source", "inputType": "select", "enumValues": ["referral", "website", "event", "cold-outreach", "other"] },
|
|
23
|
+
{ "slug": "last-contacted", "valueType": "date", "label": "Last Contacted" }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"slug": "company",
|
|
28
|
+
"displayName": "Company",
|
|
29
|
+
"icon": "building",
|
|
30
|
+
"color": "#6366F1",
|
|
31
|
+
"description": "Organizations and businesses",
|
|
32
|
+
"scope": "workspace",
|
|
33
|
+
"properties": [
|
|
34
|
+
{ "slug": "website", "valueType": "string", "label": "Website", "inputType": "url" },
|
|
35
|
+
{ "slug": "industry", "valueType": "string", "label": "Industry" },
|
|
36
|
+
{ "slug": "employees", "valueType": "number", "label": "Employee Count", "constraints": { "min": 0 } },
|
|
37
|
+
{ "slug": "location", "valueType": "string", "label": "Location" },
|
|
38
|
+
{ "slug": "revenue", "valueType": "number", "label": "Annual Revenue", "constraints": { "min": 0 } }
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"slug": "deal",
|
|
43
|
+
"displayName": "Deal",
|
|
44
|
+
"icon": "trending-up",
|
|
45
|
+
"color": "#EC4899",
|
|
46
|
+
"description": "Sales opportunities and pipeline",
|
|
47
|
+
"scope": "workspace",
|
|
48
|
+
"properties": [
|
|
49
|
+
{ "slug": "value", "valueType": "number", "required": true, "label": "Deal Value", "constraints": { "min": 0 } },
|
|
50
|
+
{ "slug": "stage", "valueType": "string", "required": true, "label": "Stage", "inputType": "select", "enumValues": ["lead", "qualified", "proposal", "negotiation", "closed-won", "closed-lost"] },
|
|
51
|
+
{ "slug": "close-date", "valueType": "date", "label": "Expected Close" },
|
|
52
|
+
{ "slug": "probability", "valueType": "number", "label": "Win Probability (%)", "constraints": { "min": 0, "max": 100 } },
|
|
53
|
+
{ "slug": "notes", "valueType": "string", "label": "Notes", "inputType": "textarea" }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"views": [
|
|
58
|
+
{
|
|
59
|
+
"name": "Pipeline",
|
|
60
|
+
"type": "kanban",
|
|
61
|
+
"scopeProfileSlug": "deal",
|
|
62
|
+
"config": { "groupByField": "stage" }
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "Contacts",
|
|
66
|
+
"type": "table",
|
|
67
|
+
"scopeProfileSlug": "contact",
|
|
68
|
+
"config": {}
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"entityLinks": [
|
|
72
|
+
{ "sourceProfileSlug": "contact", "targetProfileSlug": "company", "type": "works_at", "label": "Works at" },
|
|
73
|
+
{ "sourceProfileSlug": "deal", "targetProfileSlug": "contact", "type": "owned_by", "label": "Owned by" },
|
|
74
|
+
{ "sourceProfileSlug": "deal", "targetProfileSlug": "company", "type": "deal_for", "label": "Deal for" }
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"slug": "customer-profile",
|
|
4
|
+
"icon": "user-check",
|
|
5
|
+
"color": "#3B82F6",
|
|
6
|
+
"tags": ["customer", "crm", "contact"],
|
|
7
|
+
"requiredTier": null,
|
|
8
|
+
"isPublic": true
|
|
9
|
+
},
|
|
10
|
+
"profiles": [
|
|
11
|
+
{
|
|
12
|
+
"slug": "customer",
|
|
13
|
+
"displayName": "Customer",
|
|
14
|
+
"icon": "user-check",
|
|
15
|
+
"color": "#3B82F6",
|
|
16
|
+
"description": "Customer or client contact with deal tracking",
|
|
17
|
+
"scope": "workspace",
|
|
18
|
+
"properties": [
|
|
19
|
+
{ "slug": "name", "valueType": "string", "required": true, "label": "Full Name" },
|
|
20
|
+
{ "slug": "email", "valueType": "string", "label": "Email", "inputType": "email" },
|
|
21
|
+
{ "slug": "phone", "valueType": "string", "label": "Phone" },
|
|
22
|
+
{ "slug": "company", "valueType": "string", "label": "Company" },
|
|
23
|
+
{ "slug": "status", "valueType": "string", "label": "Status", "inputType": "select", "enumValues": ["lead", "prospect", "active", "churned"] },
|
|
24
|
+
{ "slug": "notes", "valueType": "string", "label": "Notes", "inputType": "textarea" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"slug": "deep-research",
|
|
4
|
+
"type": "playbook",
|
|
5
|
+
"icon": "search",
|
|
6
|
+
"color": "#10B981",
|
|
7
|
+
"tags": ["research", "analysis", "automation"],
|
|
8
|
+
"isPublic": true,
|
|
9
|
+
"description": "Autonomous deep research playbook. Researches a domain, finds the best tools/platforms, and produces a CSV report and entity pool."
|
|
10
|
+
},
|
|
11
|
+
"name": "Deep Research",
|
|
12
|
+
"goalTemplate": "Research {domain}. Find the best {category} and produce: {outputTypes}. Use the provided company context where relevant.",
|
|
13
|
+
"description": "Researches a domain, identifies the best tools and platforms, produces structured outputs.",
|
|
14
|
+
"params": [
|
|
15
|
+
{ "name": "domain", "type": "string", "default": "AI coding tools" },
|
|
16
|
+
{ "name": "category", "type": "string", "default": "platforms and frameworks" },
|
|
17
|
+
{ "name": "outputTypes", "type": "string", "default": "CSV file and entity pool" },
|
|
18
|
+
{ "name": "companyContext", "type": "string", "default": "" }
|
|
19
|
+
],
|
|
20
|
+
"executor": "is-agent",
|
|
21
|
+
"grants": [
|
|
22
|
+
{ "kind": "tool", "ref": "Web Search" },
|
|
23
|
+
{ "kind": "skill", "ref": "Entity Creator" }
|
|
24
|
+
],
|
|
25
|
+
"expectedOutputs": [
|
|
26
|
+
{ "description": "Research findings as structured CSV", "type": "csv" },
|
|
27
|
+
{ "description": "Entity pool of discovered tools and companies", "type": "entities" },
|
|
28
|
+
{ "description": "Summary report with recommendations", "type": "report" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_meta": {
|
|
3
|
+
"slug": "event-views-pack",
|
|
4
|
+
"displayName": "Event Views",
|
|
5
|
+
"icon": "calendar",
|
|
6
|
+
"color": "#10B981",
|
|
7
|
+
"tags": ["events", "calendar", "schedule", "views"],
|
|
8
|
+
"requiredTier": null,
|
|
9
|
+
"isPublic": true
|
|
10
|
+
},
|
|
11
|
+
"description": "Three ready-made event views: a calendar, an upcoming-events list and an events table.",
|
|
12
|
+
"profiles": [],
|
|
13
|
+
"views": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Event Calendar",
|
|
16
|
+
"type": "calendar",
|
|
17
|
+
"scopeProfileSlug": "event",
|
|
18
|
+
"config": { "dateField": "startDate", "endDateField": "endDate" }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Upcoming Events",
|
|
22
|
+
"type": "list",
|
|
23
|
+
"scopeProfileSlug": "event",
|
|
24
|
+
"config": { "sortBy": "startDate", "sortOrder": "asc" }
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Events Table",
|
|
28
|
+
"type": "table",
|
|
29
|
+
"scopeProfileSlug": "event",
|
|
30
|
+
"config": {}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|