@synap-core/workspace-templates 0.2.1
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/define.d.ts +97 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +91 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/templates.d.ts +7 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +23354 -0
- package/dist/types.d.ts +328 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/package.json +37 -0
- package/src/agent-fleet.yaml +1434 -0
- package/src/brand-library.yaml +627 -0
- package/src/builder.yaml +1355 -0
- package/src/content-os.yaml +1424 -0
- package/src/content-studio.yaml +312 -0
- package/src/crm.yaml +2606 -0
- package/src/define.ts +184 -0
- package/src/dev-dashboard.yaml +1309 -0
- package/src/foundation.yaml +343 -0
- package/src/index.ts +62 -0
- package/src/life-os.yaml +1443 -0
- package/src/marketing.yaml +244 -0
- package/src/personal.yaml +114 -0
- package/src/project-management.yaml +1119 -0
- package/src/radar.yaml +274 -0
- package/src/templates.ts +23363 -0
- package/src/types.ts +426 -0
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synap-core/workspace-templates — Definition adapter
|
|
3
|
+
*
|
|
4
|
+
* Converts a YAML template (WorkspaceYaml) into the flat payload shape that
|
|
5
|
+
* the backend `workspaces.createFromDefinition` mutation + Hub REST
|
|
6
|
+
* `/workspaces/from-definition` endpoint expect.
|
|
7
|
+
*
|
|
8
|
+
* This is the single canonical seam: every consumer (browser app, onboarding,
|
|
9
|
+
* CLI, marketplace) provisions a workspace through this function so the wire
|
|
10
|
+
* shape never drifts per call-site.
|
|
11
|
+
*/
|
|
12
|
+
import type { WorkspaceYaml } from './types.js';
|
|
13
|
+
/** The flat definition object accepted by createFromDefinition. */
|
|
14
|
+
export interface WorkspaceDefinitionInput {
|
|
15
|
+
workspaceName: string;
|
|
16
|
+
description: string;
|
|
17
|
+
proposalId?: string;
|
|
18
|
+
profiles: WorkspaceYaml['profiles'];
|
|
19
|
+
views: NonNullable<WorkspaceYaml['views']>;
|
|
20
|
+
entityLinks: NonNullable<WorkspaceYaml['entityLinks']>;
|
|
21
|
+
seedEntities: NonNullable<WorkspaceYaml['seedEntities']>;
|
|
22
|
+
suggestedRelations?: WorkspaceYaml['suggestedRelations'];
|
|
23
|
+
displayTemplates?: WorkspaceYaml['displayTemplates'];
|
|
24
|
+
layoutConfig: WorkspaceYaml['layout'] | undefined;
|
|
25
|
+
bentoViewName?: string;
|
|
26
|
+
bentoViewBlocks?: NonNullable<WorkspaceYaml['bento']>['blocks'];
|
|
27
|
+
profileEntityBentoTemplates?: WorkspaceYaml['profileEntityBentoTemplates'];
|
|
28
|
+
workspaceSubtype?: string;
|
|
29
|
+
workspaceType?: NonNullable<WorkspaceYaml['workspace']>['workspaceType'];
|
|
30
|
+
workspaceVisibility?: string;
|
|
31
|
+
workspaceCapabilities?: string[];
|
|
32
|
+
sourceRoles?: NonNullable<WorkspaceYaml['workspace']>['sourceRoles'];
|
|
33
|
+
defaultSources?: NonNullable<WorkspaceYaml['workspace']>['defaultSources'];
|
|
34
|
+
/** Per-workspace onboarding context — written to settings.onboarding. */
|
|
35
|
+
onboarding?: WorkspaceYaml['onboarding'];
|
|
36
|
+
}
|
|
37
|
+
export interface ToDefinitionResult {
|
|
38
|
+
definition: WorkspaceDefinitionInput;
|
|
39
|
+
/** Stable idempotency key — the template's proposalId or slug. */
|
|
40
|
+
proposalId: string;
|
|
41
|
+
/** Display name for the new workspace. */
|
|
42
|
+
workspaceName: string;
|
|
43
|
+
/** Template id for telemetry / dedup. */
|
|
44
|
+
templateId: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a template (by slug or YAML object) into the createFromDefinition
|
|
48
|
+
* payload. Pass `nameOverride` to rename the workspace at creation time.
|
|
49
|
+
*/
|
|
50
|
+
export declare function toWorkspaceDefinition(slugOrYaml: string | WorkspaceYaml, nameOverride?: string): ToDefinitionResult;
|
|
51
|
+
/**
|
|
52
|
+
* The unified `PackageDefinition` shape consumed by `POST /api/hub/packages/apply`
|
|
53
|
+
* (CLI `synap launch`) and the CP package registry seeder. It composes the
|
|
54
|
+
* workspace definition with the capability/playbook/onboarding layers. Mirrors
|
|
55
|
+
* `PackageDefinition` in synap-backend `package-definition.ts`. Typed loosely on
|
|
56
|
+
* the layered fields to avoid a backend import; the wire validation lives in the
|
|
57
|
+
* apply endpoint.
|
|
58
|
+
*/
|
|
59
|
+
export interface PackageDefinitionOutput {
|
|
60
|
+
_meta: {
|
|
61
|
+
slug: string;
|
|
62
|
+
icon?: string;
|
|
63
|
+
color?: string;
|
|
64
|
+
tags?: string[];
|
|
65
|
+
isPublic?: boolean;
|
|
66
|
+
requiredTier?: string | null;
|
|
67
|
+
};
|
|
68
|
+
workspaceName: string;
|
|
69
|
+
description: string;
|
|
70
|
+
workspaceType?: WorkspaceYaml['workspace']['workspaceType'];
|
|
71
|
+
workspaceSubtype?: string;
|
|
72
|
+
workspaceVisibility?: string;
|
|
73
|
+
workspaceCapabilities?: string[];
|
|
74
|
+
sourceRoles?: WorkspaceYaml['workspace']['sourceRoles'];
|
|
75
|
+
defaultSources?: WorkspaceYaml['workspace']['defaultSources'];
|
|
76
|
+
profiles: WorkspaceYaml['profiles'];
|
|
77
|
+
views: NonNullable<WorkspaceYaml['views']>;
|
|
78
|
+
suggestedEntities: NonNullable<WorkspaceYaml['seedEntities']>;
|
|
79
|
+
suggestedRelations?: WorkspaceYaml['suggestedRelations'];
|
|
80
|
+
displayTemplates?: WorkspaceYaml['displayTemplates'];
|
|
81
|
+
entityLinks?: WorkspaceYaml['entityLinks'];
|
|
82
|
+
bentoLayout?: NonNullable<WorkspaceYaml['bento']>['blocks'];
|
|
83
|
+
bentoViewName?: string;
|
|
84
|
+
profileEntityBentoTemplates?: WorkspaceYaml['profileEntityBentoTemplates'];
|
|
85
|
+
layoutConfig?: WorkspaceYaml['layout'];
|
|
86
|
+
capabilities?: WorkspaceYaml['integrations'];
|
|
87
|
+
playbooks?: WorkspaceYaml['playbooks'];
|
|
88
|
+
onboarding?: WorkspaceYaml['onboarding'];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Resolve a template (by slug or YAML object) into the full `PackageDefinition`
|
|
92
|
+
* accepted by `POST /api/hub/packages/apply` and the CP registry seeder. This is
|
|
93
|
+
* the single seam the CLI and control-plane use so they read from the canonical
|
|
94
|
+
* package instead of disk-stored JSON.
|
|
95
|
+
*/
|
|
96
|
+
export declare function toPackageDefinition(slugOrYaml: string | WorkspaceYaml): PackageDefinitionOutput;
|
|
97
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,mEAAmE;AACnE,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC,KAAK,EAAE,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;IACvD,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IACzD,kBAAkB,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACzD,gBAAgB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACrD,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,GAA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CAAC;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GAAG,aAAa,GACjC,uBAAuB,CAuCzB"}
|
package/dist/define.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synap-core/workspace-templates — Definition adapter
|
|
3
|
+
*
|
|
4
|
+
* Converts a YAML template (WorkspaceYaml) into the flat payload shape that
|
|
5
|
+
* the backend `workspaces.createFromDefinition` mutation + Hub REST
|
|
6
|
+
* `/workspaces/from-definition` endpoint expect.
|
|
7
|
+
*
|
|
8
|
+
* This is the single canonical seam: every consumer (browser app, onboarding,
|
|
9
|
+
* CLI, marketplace) provisions a workspace through this function so the wire
|
|
10
|
+
* shape never drifts per call-site.
|
|
11
|
+
*/
|
|
12
|
+
import { getWorkspaceTemplate } from './templates.js';
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a template (by slug or YAML object) into the createFromDefinition
|
|
15
|
+
* payload. Pass `nameOverride` to rename the workspace at creation time.
|
|
16
|
+
*/
|
|
17
|
+
export function toWorkspaceDefinition(slugOrYaml, nameOverride) {
|
|
18
|
+
const tpl = typeof slugOrYaml === 'string' ? getWorkspaceTemplate(slugOrYaml) : slugOrYaml;
|
|
19
|
+
if (!tpl) {
|
|
20
|
+
throw new Error(`Workspace template not found: ${String(slugOrYaml)}`);
|
|
21
|
+
}
|
|
22
|
+
const ws = tpl.workspace;
|
|
23
|
+
const name = nameOverride ?? ws.name;
|
|
24
|
+
const proposalId = ws.proposalId ?? `${tpl.meta.slug}-v1`;
|
|
25
|
+
const definition = {
|
|
26
|
+
workspaceName: name,
|
|
27
|
+
description: ws.description,
|
|
28
|
+
proposalId,
|
|
29
|
+
profiles: tpl.profiles,
|
|
30
|
+
views: tpl.views ?? [],
|
|
31
|
+
entityLinks: tpl.entityLinks ?? [],
|
|
32
|
+
seedEntities: tpl.seedEntities ?? [],
|
|
33
|
+
suggestedRelations: tpl.suggestedRelations,
|
|
34
|
+
displayTemplates: tpl.displayTemplates,
|
|
35
|
+
layoutConfig: tpl.layout,
|
|
36
|
+
bentoViewName: tpl.bento?.viewName,
|
|
37
|
+
bentoViewBlocks: tpl.bento?.blocks,
|
|
38
|
+
profileEntityBentoTemplates: tpl.profileEntityBentoTemplates,
|
|
39
|
+
workspaceSubtype: ws.subtype,
|
|
40
|
+
workspaceType: ws.workspaceType,
|
|
41
|
+
workspaceVisibility: ws.visibility,
|
|
42
|
+
workspaceCapabilities: ws.capabilities,
|
|
43
|
+
sourceRoles: ws.sourceRoles,
|
|
44
|
+
defaultSources: ws.defaultSources,
|
|
45
|
+
onboarding: tpl.onboarding,
|
|
46
|
+
};
|
|
47
|
+
return { definition, proposalId, workspaceName: name, templateId: tpl.meta.slug };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve a template (by slug or YAML object) into the full `PackageDefinition`
|
|
51
|
+
* accepted by `POST /api/hub/packages/apply` and the CP registry seeder. This is
|
|
52
|
+
* the single seam the CLI and control-plane use so they read from the canonical
|
|
53
|
+
* package instead of disk-stored JSON.
|
|
54
|
+
*/
|
|
55
|
+
export function toPackageDefinition(slugOrYaml) {
|
|
56
|
+
const tpl = typeof slugOrYaml === 'string' ? getWorkspaceTemplate(slugOrYaml) : slugOrYaml;
|
|
57
|
+
if (!tpl) {
|
|
58
|
+
throw new Error(`Workspace template not found: ${String(slugOrYaml)}`);
|
|
59
|
+
}
|
|
60
|
+
const ws = tpl.workspace;
|
|
61
|
+
return {
|
|
62
|
+
_meta: {
|
|
63
|
+
slug: tpl.meta.slug,
|
|
64
|
+
icon: tpl.meta.icon,
|
|
65
|
+
color: tpl.meta.color,
|
|
66
|
+
tags: tpl.meta.tags,
|
|
67
|
+
isPublic: tpl.meta.isPublic ?? true,
|
|
68
|
+
},
|
|
69
|
+
workspaceName: ws.name,
|
|
70
|
+
description: ws.description,
|
|
71
|
+
workspaceType: ws.workspaceType,
|
|
72
|
+
workspaceSubtype: ws.subtype,
|
|
73
|
+
workspaceVisibility: ws.visibility,
|
|
74
|
+
workspaceCapabilities: ws.capabilities,
|
|
75
|
+
sourceRoles: ws.sourceRoles,
|
|
76
|
+
defaultSources: ws.defaultSources,
|
|
77
|
+
profiles: tpl.profiles,
|
|
78
|
+
views: tpl.views ?? [],
|
|
79
|
+
suggestedEntities: tpl.seedEntities ?? [],
|
|
80
|
+
suggestedRelations: tpl.suggestedRelations,
|
|
81
|
+
displayTemplates: tpl.displayTemplates,
|
|
82
|
+
entityLinks: tpl.entityLinks,
|
|
83
|
+
bentoLayout: tpl.bento?.blocks,
|
|
84
|
+
bentoViewName: tpl.bento?.viewName,
|
|
85
|
+
profileEntityBentoTemplates: tpl.profileEntityBentoTemplates,
|
|
86
|
+
layoutConfig: tpl.layout,
|
|
87
|
+
capabilities: tpl.integrations,
|
|
88
|
+
playbooks: tpl.playbooks,
|
|
89
|
+
onboarding: tpl.onboarding,
|
|
90
|
+
};
|
|
91
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synap-core/workspace-templates
|
|
3
|
+
*
|
|
4
|
+
* Canonical workspace template definitions.
|
|
5
|
+
* ==========================================
|
|
6
|
+
*
|
|
7
|
+
* Usage (browser / backend / CLI):
|
|
8
|
+
*
|
|
9
|
+
* import { getWorkspaceTemplate, listPublicTemplates } from '@synap-core/workspace-templates';
|
|
10
|
+
*
|
|
11
|
+
* const template = getWorkspaceTemplate('brand-library');
|
|
12
|
+
* // template.workspace.name === 'Brand Library'
|
|
13
|
+
* // template.app.kind === 'native'
|
|
14
|
+
* // template.layout.defaultApp === 'brandLibrary'
|
|
15
|
+
*
|
|
16
|
+
* YAML source files live in src/*.yaml — AI-friendly, commentable, mergeable.
|
|
17
|
+
* Run `pnpm build` to regenerate src/templates.ts from YAML.
|
|
18
|
+
*/
|
|
19
|
+
export type { WorkspaceYaml, TemplateMeta, TemplateAppRef, TemplateAppKind, TemplateProfile, TemplateProperty, TemplateView, TemplateSidebarItem, TemplateSidebarSurface, TemplateLayoutConfig, TemplateBentoBlock, TemplateEntityLink, TemplateSeedEntity, TemplateSuggestedRelation, TemplateDisplayTemplate, TemplateIntegration, TemplateAutomation, TemplateExtendsRef, TemplateProfileEntityBentoTemplates, TemplateDefaultSource, TemplateSourceRole, TemplateOnboarding, TemplateOnboardingCollectTarget, TemplatePlaybook, TemplatePlaybookParam, } from './types.js';
|
|
20
|
+
export { WORKSPACE_TEMPLATES, getWorkspaceTemplate, listWorkspaceTemplates, listPublicTemplates, } from './templates.js';
|
|
21
|
+
export type { WorkspaceTemplateSlug } from './templates.js';
|
|
22
|
+
export { toWorkspaceDefinition, toPackageDefinition } from './define.js';
|
|
23
|
+
export type { WorkspaceDefinitionInput, ToDefinitionResult, PackageDefinitionOutput, } from './define.js';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mCAAmC,EACnC,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACzE,YAAY,EACV,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synap-core/workspace-templates
|
|
3
|
+
*
|
|
4
|
+
* Canonical workspace template definitions.
|
|
5
|
+
* ==========================================
|
|
6
|
+
*
|
|
7
|
+
* Usage (browser / backend / CLI):
|
|
8
|
+
*
|
|
9
|
+
* import { getWorkspaceTemplate, listPublicTemplates } from '@synap-core/workspace-templates';
|
|
10
|
+
*
|
|
11
|
+
* const template = getWorkspaceTemplate('brand-library');
|
|
12
|
+
* // template.workspace.name === 'Brand Library'
|
|
13
|
+
* // template.app.kind === 'native'
|
|
14
|
+
* // template.layout.defaultApp === 'brandLibrary'
|
|
15
|
+
*
|
|
16
|
+
* YAML source files live in src/*.yaml — AI-friendly, commentable, mergeable.
|
|
17
|
+
* Run `pnpm build` to regenerate src/templates.ts from YAML.
|
|
18
|
+
*/
|
|
19
|
+
export { WORKSPACE_TEMPLATES, getWorkspaceTemplate, listWorkspaceTemplates, listPublicTemplates, } from './templates.js';
|
|
20
|
+
export { toWorkspaceDefinition, toPackageDefinition } from './define.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkspaceYaml } from './types.js';
|
|
2
|
+
export declare const WORKSPACE_TEMPLATES: Record<string, WorkspaceYaml>;
|
|
3
|
+
export type WorkspaceTemplateSlug = keyof typeof WORKSPACE_TEMPLATES;
|
|
4
|
+
export declare function getWorkspaceTemplate(slug: string): WorkspaceYaml | undefined;
|
|
5
|
+
export declare function listWorkspaceTemplates(): WorkspaceYaml[];
|
|
6
|
+
export declare function listPublicTemplates(): WorkspaceYaml[];
|
|
7
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA+ytBhD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAQ,CAAC;AAEvE,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAErE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE5E;AAED,wBAAgB,sBAAsB,IAAI,aAAa,EAAE,CAExD;AAED,wBAAgB,mBAAmB,IAAI,aAAa,EAAE,CAErD"}
|