@contractspec/lib.contracts-library 0.0.0-canary-20260206014742

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.
@@ -0,0 +1,14 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.20.3 powered by rolldown v1.0.0-rc.3
3
+ ℹ entry: src/index.ts
4
+ ℹ tsconfig: tsconfig.json
5
+ ℹ Build start
6
+ ℹ Cleaning 4 files
7
+ ℹ dist/index.mjs 4.64 kB │ gzip: 1.15 kB
8
+ ℹ dist/index.mjs.map 6.96 kB │ gzip: 1.45 kB
9
+ ℹ dist/index.d.mts.map 0.27 kB │ gzip: 0.18 kB
10
+ ℹ dist/index.d.mts 0.57 kB │ gzip: 0.22 kB
11
+ ℹ 4 files, total: 12.44 kB
12
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
13
+
14
+ ✔ Build complete in 16798ms
@@ -0,0 +1,15 @@
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
3
+ $ tsdown
4
+ ℹ tsdown v0.20.3 powered by rolldown v1.0.0-rc.3
5
+ ℹ entry: src/index.ts
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ dist/index.mjs 4.64 kB │ gzip: 1.15 kB
9
+ ℹ dist/index.mjs.map 6.96 kB │ gzip: 1.45 kB
10
+ ℹ dist/index.d.mts.map 0.27 kB │ gzip: 0.18 kB
11
+ ℹ dist/index.d.mts 0.57 kB │ gzip: 0.22 kB
12
+ ℹ 4 files, total: 12.44 kB
13
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
14
+
15
+ ✔ Build complete in 20509ms
package/AGENTS.md ADDED
@@ -0,0 +1,28 @@
1
+ # lib.contracts-library
2
+
3
+ Contract definitions for library templates and local runtime.
4
+
5
+ ## Quick Context
6
+
7
+ - **Type**: Library (contracts)
8
+ - **Consumers**: `bundle.library`
9
+
10
+ ## Exports
11
+
12
+ - `./templates` — Template contracts
13
+ - `./templates/recipes` — Recipe specs
14
+ - `./templates/todos` — Todo specs
15
+
16
+ ## Usage
17
+
18
+ ```typescript
19
+ import { RecipeSpec } from '@contractspec/lib.contracts-library/templates/recipes';
20
+ ```
21
+
22
+ ## Commands
23
+
24
+ ```bash
25
+ bun build # Build library
26
+ bun build:types # Type check
27
+ bun lint # Lint code
28
+ ```
package/CHANGELOG.md ADDED
@@ -0,0 +1,174 @@
1
+ # @contractspec/lib.contracts-library
2
+
3
+ ## 0.0.0-canary-20260206014742
4
+
5
+ ### Minor Changes
6
+
7
+ - 11a5a05: feat: improve product intent
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [47c48c2]
12
+ - Updated dependencies [a119963]
13
+ - Updated dependencies [11a5a05]
14
+ - @contractspec/lib.contracts@0.0.0-canary-20260206014742
15
+ - @contractspec/lib.schema@0.0.0-canary-20260206014742
16
+
17
+ ## 1.56.1
18
+
19
+ ### Patch Changes
20
+
21
+ - fix: improve publish config
22
+ - Updated dependencies
23
+ - @contractspec/lib.contracts@1.56.1
24
+ - @contractspec/lib.schema@1.56.1
25
+
26
+ ## 1.56.0
27
+
28
+ ### Minor Changes
29
+
30
+ - fix: release
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+ - @contractspec/lib.contracts@1.56.0
36
+ - @contractspec/lib.schema@1.56.0
37
+
38
+ ## 1.55.0
39
+
40
+ ### Minor Changes
41
+
42
+ - fix: unpublished packages
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies
47
+ - @contractspec/lib.contracts@1.55.0
48
+ - @contractspec/lib.schema@1.55.0
49
+
50
+ ## 1.54.0
51
+
52
+ ### Minor Changes
53
+
54
+ - ec5e95c: chore: upgrade dependencies
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [ec5e95c]
59
+ - @contractspec/lib.contracts@1.54.0
60
+ - @contractspec/lib.schema@1.54.0
61
+
62
+ ## 1.53.0
63
+
64
+ ### Minor Changes
65
+
66
+ - f4180d4: fix: performance improvement
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [5b371b1]
71
+ - Updated dependencies [f4180d4]
72
+ - Updated dependencies [64d84e1]
73
+ - @contractspec/lib.contracts@1.53.0
74
+ - @contractspec/lib.schema@1.53.0
75
+
76
+ ## 1.52.0
77
+
78
+ ### Minor Changes
79
+
80
+ - d93e6a9: fix: improve website
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [d93e6a9]
85
+ - @contractspec/lib.contracts@1.52.0
86
+ - @contractspec/lib.schema@1.52.0
87
+
88
+ ## 1.51.0
89
+
90
+ ### Minor Changes
91
+
92
+ - e6faefb: feat: add guide to import existing codebase
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [23e46e9]
97
+ - Updated dependencies [ad1f852]
98
+ - Updated dependencies [e6faefb]
99
+ - @contractspec/lib.contracts@1.51.0
100
+ - @contractspec/lib.schema@1.51.0
101
+
102
+ ## 1.50.0
103
+
104
+ ### Minor Changes
105
+
106
+ - 5325d6b: feat: improve seo
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [5325d6b]
111
+ - @contractspec/lib.contracts@1.50.0
112
+ - @contractspec/lib.schema@1.50.0
113
+
114
+ ## 1.49.0
115
+
116
+ ### Minor Changes
117
+
118
+ - cafd041: fix: impact report comments within github action
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [cafd041]
123
+ - @contractspec/lib.contracts@1.49.0
124
+ - @contractspec/lib.schema@1.49.0
125
+
126
+ ## 1.48.1
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [c560ee7]
131
+ - @contractspec/lib.contracts@1.48.1
132
+
133
+ ## 1.48.0
134
+
135
+ ### Minor Changes
136
+
137
+ - b0444a4: feat: reduce adoption's friction by allowing generation of contracts from an analyse of the codebase
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [b0444a4]
142
+ - @contractspec/lib.contracts@1.48.0
143
+ - @contractspec/lib.schema@1.48.0
144
+
145
+ ## 1.47.0
146
+
147
+ ### Minor Changes
148
+
149
+ - caf8701: feat: add cli vibe command to run workflow
150
+ - c69b849: feat: add api web services (mcp & website)
151
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
152
+ - fd38e85: feat: auto-fix contractspec issues
153
+
154
+ ### Patch Changes
155
+
156
+ - e7ded36: feat: improve stability (adding ts-morph)
157
+ - c231a8b: test: improve workspace stability
158
+ - Updated dependencies [e7ded36]
159
+ - Updated dependencies [caf8701]
160
+ - Updated dependencies [c69b849]
161
+ - Updated dependencies [c231a8b]
162
+ - Updated dependencies [42b8d78]
163
+ - Updated dependencies [fd38e85]
164
+ - @contractspec/lib.contracts@1.47.0
165
+ - @contractspec/lib.schema@1.47.0
166
+
167
+ ## 1.46.2
168
+
169
+ ### Patch Changes
170
+
171
+ - 7e21625: feat: library services (landing page & api)
172
+ - Updated dependencies [7e21625]
173
+ - @contractspec/lib.contracts@1.46.2
174
+ - @contractspec/lib.schema@1.46.2
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # @contractspec/lib.contracts-library
2
+
3
+ Contract definitions for the ContractSpec library experience including templates and local runtime.
4
+
5
+ ## Overview
6
+
7
+ This library provides contract specs for:
8
+ - Template definitions (todos, recipes)
9
+ - Local runtime operations
10
+ - Library-specific queries and commands
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ bun add @contractspec/lib.contracts-library
16
+ ```
17
+
18
+ ## Exports
19
+
20
+ - `./templates` — Template contract definitions
21
+ - `./templates/recipes` — Recipe template specs
22
+ - `./templates/todos` — Todo template specs
23
+
24
+ ## Usage
25
+
26
+ ```typescript
27
+ import { RecipeSpec } from '@contractspec/lib.contracts-library/templates/recipes';
28
+ import { TodoSpec } from '@contractspec/lib.contracts-library/templates/todos';
29
+ ```
30
+
31
+ ## Dependencies
32
+
33
+ - `@contractspec/lib.contracts` — Core contract primitives
34
+ - `@contractspec/lib.schema` — Schema utilities
35
+
36
+ ## Related Packages
37
+
38
+ - [`@contractspec/bundle.library`](../../bundles/library/README.md) — Implementation
39
+ - [`@contractspec/lib.contracts-studio`](../contracts-studio/README.md) — Studio contracts
@@ -0,0 +1,13 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/templates/recipes.d.ts
4
+ declare const RecipeCapability: _contractspec_lib_contracts0.CapabilitySpec;
5
+ //#endregion
6
+ //#region src/templates/todos.d.ts
7
+ declare const TaskCrudCapability: _contractspec_lib_contracts0.CapabilitySpec;
8
+ //#endregion
9
+ //#region src/templates/messaging.d.ts
10
+ declare const MessagingCapability: _contractspec_lib_contracts0.CapabilitySpec;
11
+ //#endregion
12
+ export { MessagingCapability, RecipeCapability, TaskCrudCapability };
13
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/templates/recipes.ts","../src/templates/todos.ts","../src/templates/messaging.ts"],"mappings":";;;cAIa,gBAAA,EA2CX,4BAAA,CA3C2B,cAAA;;;cCAhB,kBAAA,EAoDX,4BAAA,CApD6B,cAAA;;;cCAlB,mBAAA,EAuDX,4BAAA,CAvD8B,cAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,182 @@
1
+ import { StabilityEnum, defineCapability } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/templates/recipes.ts
4
+ const OWNERS$2 = ["platform.contractspec-studio"];
5
+ const RecipeCapability = defineCapability({
6
+ meta: {
7
+ key: "template.recipes.browse",
8
+ version: "1.0.0",
9
+ kind: "api",
10
+ title: "Template Recipe Browser",
11
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
12
+ domain: "templates",
13
+ owners: [...OWNERS$2],
14
+ tags: [
15
+ "templates",
16
+ "recipes",
17
+ "i18n",
18
+ "content"
19
+ ],
20
+ stability: StabilityEnum.Stable
21
+ },
22
+ provides: [
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.list",
26
+ version: "1.0.0",
27
+ description: "List recipes with category, difficulty, and locale filters."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.get",
32
+ version: "1.0.0",
33
+ description: "Fetch a recipe detail view including localized content."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.search",
38
+ version: "1.0.0",
39
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
40
+ },
41
+ {
42
+ surface: "operation",
43
+ key: "template.recipe.favorite",
44
+ version: "1.0.0",
45
+ description: "Toggle recipe favorites for showcasing personalization patterns."
46
+ }
47
+ ],
48
+ requires: [{
49
+ key: "studio.project",
50
+ version: "1.0.0"
51
+ }]
52
+ });
53
+
54
+ //#endregion
55
+ //#region src/templates/todos.ts
56
+ const OWNERS$1 = ["platform.contractspec-studio"];
57
+ const TaskCrudCapability = defineCapability({
58
+ meta: {
59
+ key: "template.todos.crud",
60
+ version: "1.0.0",
61
+ kind: "api",
62
+ title: "Template Tasks CRUD",
63
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
64
+ domain: "templates",
65
+ owners: [...OWNERS$1],
66
+ tags: [
67
+ "templates",
68
+ "todos",
69
+ "productivity"
70
+ ],
71
+ stability: StabilityEnum.Stable
72
+ },
73
+ provides: [
74
+ {
75
+ surface: "operation",
76
+ key: "template.task.create",
77
+ version: "1.0.0",
78
+ description: "Create a new task for a Studio project template."
79
+ },
80
+ {
81
+ surface: "operation",
82
+ key: "template.task.update",
83
+ version: "1.0.0",
84
+ description: "Update task metadata such as title, due date, or category."
85
+ },
86
+ {
87
+ surface: "operation",
88
+ key: "template.task.delete",
89
+ version: "1.0.0",
90
+ description: "Delete or archive a task from a template project."
91
+ },
92
+ {
93
+ surface: "operation",
94
+ key: "template.task.toggle",
95
+ version: "1.0.0",
96
+ description: "Mark a task as completed or active."
97
+ },
98
+ {
99
+ surface: "operation",
100
+ key: "template.task.list",
101
+ version: "1.0.0",
102
+ description: "List tasks with filtering, search, and sorting."
103
+ },
104
+ {
105
+ surface: "operation",
106
+ key: "template.task.category",
107
+ version: "1.0.0",
108
+ description: "Manage categories and tags for tasks."
109
+ }
110
+ ],
111
+ requires: [{
112
+ key: "studio.project",
113
+ version: "1.0.0"
114
+ }]
115
+ });
116
+
117
+ //#endregion
118
+ //#region src/templates/messaging.ts
119
+ const OWNERS = ["platform.contractspec-studio"];
120
+ const MessagingCapability = defineCapability({
121
+ meta: {
122
+ key: "template.messaging.core",
123
+ version: "1.0.0",
124
+ kind: "api",
125
+ title: "Template Messaging Core",
126
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
127
+ domain: "templates",
128
+ owners: [...OWNERS],
129
+ tags: [
130
+ "templates",
131
+ "messaging",
132
+ "realtime"
133
+ ],
134
+ stability: StabilityEnum.Experimental
135
+ },
136
+ provides: [
137
+ {
138
+ surface: "operation",
139
+ key: "template.messaging.conversation.create",
140
+ version: "1.0.0",
141
+ description: "Create a direct or group conversation scoped to a Studio project."
142
+ },
143
+ {
144
+ surface: "operation",
145
+ key: "template.messaging.conversation.list",
146
+ version: "1.0.0",
147
+ description: "List conversations with pagination, unread counts, and filters."
148
+ },
149
+ {
150
+ surface: "operation",
151
+ key: "template.messaging.message.send",
152
+ version: "1.0.0",
153
+ description: "Send a message with attachments and optimistic delivery state."
154
+ },
155
+ {
156
+ surface: "operation",
157
+ key: "template.messaging.message.read",
158
+ version: "1.0.0",
159
+ description: "Mark messages as read and update participant cursors."
160
+ },
161
+ {
162
+ surface: "event",
163
+ key: "template.messaging.message.received",
164
+ version: "1.0.0",
165
+ description: "Emitted when a participant receives a new message."
166
+ },
167
+ {
168
+ surface: "event",
169
+ key: "template.messaging.typing",
170
+ version: "1.0.0",
171
+ description: "Emitted when a participant is typing in a conversation."
172
+ }
173
+ ],
174
+ requires: [{
175
+ key: "studio.project",
176
+ version: "1.0.0"
177
+ }]
178
+ });
179
+
180
+ //#endregion
181
+ export { MessagingCapability, RecipeCapability, TaskCrudCapability };
182
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["OWNERS","OWNERS"],"sources":["../src/templates/recipes.ts","../src/templates/todos.ts","../src/templates/messaging.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.contractspec-studio'] as const;\n\nexport const RecipeCapability = defineCapability({\n meta: {\n key: 'template.recipes.browse',\n version: '1.0.0',\n kind: 'api',\n title: 'Template Recipe Browser',\n description:\n 'Internationalized recipe browsing, search, and detail operations for template applications.',\n domain: 'templates',\n owners: [...OWNERS],\n tags: ['templates', 'recipes', 'i18n', 'content'],\n stability: StabilityEnum.Stable,\n },\n provides: [\n {\n surface: 'operation',\n key: 'template.recipe.list',\n version: '1.0.0',\n description:\n 'List recipes with category, difficulty, and locale filters.',\n },\n {\n surface: 'operation',\n key: 'template.recipe.get',\n version: '1.0.0',\n description: 'Fetch a recipe detail view including localized content.',\n },\n {\n surface: 'operation',\n key: 'template.recipe.search',\n version: '1.0.0',\n description:\n 'Search recipes by ingredient, tag, or free text with i18n support.',\n },\n {\n surface: 'operation',\n key: 'template.recipe.favorite',\n version: '1.0.0',\n description:\n 'Toggle recipe favorites for showcasing personalization patterns.',\n },\n ],\n requires: [{ key: 'studio.project', version: '1.0.0' }],\n});\n","import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.contractspec-studio'] as const;\n\nexport const TaskCrudCapability = defineCapability({\n meta: {\n key: 'template.todos.crud',\n version: '1.0.0',\n kind: 'api',\n title: 'Template Tasks CRUD',\n description:\n 'Create, read, update, delete, and toggle template tasks with categories and priorities.',\n domain: 'templates',\n owners: [...OWNERS],\n tags: ['templates', 'todos', 'productivity'],\n stability: StabilityEnum.Stable,\n },\n provides: [\n {\n surface: 'operation',\n key: 'template.task.create',\n version: '1.0.0',\n description: 'Create a new task for a Studio project template.',\n },\n {\n surface: 'operation',\n key: 'template.task.update',\n version: '1.0.0',\n description: 'Update task metadata such as title, due date, or category.',\n },\n {\n surface: 'operation',\n key: 'template.task.delete',\n version: '1.0.0',\n description: 'Delete or archive a task from a template project.',\n },\n {\n surface: 'operation',\n key: 'template.task.toggle',\n version: '1.0.0',\n description: 'Mark a task as completed or active.',\n },\n {\n surface: 'operation',\n key: 'template.task.list',\n version: '1.0.0',\n description: 'List tasks with filtering, search, and sorting.',\n },\n {\n surface: 'operation',\n key: 'template.task.category',\n version: '1.0.0',\n description: 'Manage categories and tags for tasks.',\n },\n ],\n requires: [{ key: 'studio.project', version: '1.0.0' }],\n});\n","import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.contractspec-studio'] as const;\n\nexport const MessagingCapability = defineCapability({\n meta: {\n key: 'template.messaging.core',\n version: '1.0.0',\n kind: 'api',\n title: 'Template Messaging Core',\n description:\n 'Real-time messaging primitives for template applications, including conversations, participants, and delivery events.',\n domain: 'templates',\n owners: [...OWNERS],\n tags: ['templates', 'messaging', 'realtime'],\n stability: StabilityEnum.Experimental,\n },\n provides: [\n {\n surface: 'operation',\n key: 'template.messaging.conversation.create',\n version: '1.0.0',\n description:\n 'Create a direct or group conversation scoped to a Studio project.',\n },\n {\n surface: 'operation',\n key: 'template.messaging.conversation.list',\n version: '1.0.0',\n description:\n 'List conversations with pagination, unread counts, and filters.',\n },\n {\n surface: 'operation',\n key: 'template.messaging.message.send',\n version: '1.0.0',\n description:\n 'Send a message with attachments and optimistic delivery state.',\n },\n {\n surface: 'operation',\n key: 'template.messaging.message.read',\n version: '1.0.0',\n description: 'Mark messages as read and update participant cursors.',\n },\n {\n surface: 'event',\n key: 'template.messaging.message.received',\n version: '1.0.0',\n description: 'Emitted when a participant receives a new message.',\n },\n {\n surface: 'event',\n key: 'template.messaging.typing',\n version: '1.0.0',\n description: 'Emitted when a participant is typing in a conversation.',\n },\n ],\n requires: [{ key: 'studio.project', version: '1.0.0' }],\n});\n"],"mappings":";;;AAEA,MAAMA,WAAS,CAAC,+BAA+B;AAE/C,MAAa,mBAAmB,iBAAiB;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,GAAGA,SAAO;EACnB,MAAM;GAAC;GAAa;GAAW;GAAQ;GAAU;EACjD,WAAW,cAAc;EAC1B;CACD,UAAU;EACR;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACF;CACD,UAAU,CAAC;EAAE,KAAK;EAAkB,SAAS;EAAS,CAAC;CACxD,CAAC;;;;AC7CF,MAAMC,WAAS,CAAC,+BAA+B;AAE/C,MAAa,qBAAqB,iBAAiB;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,GAAGA,SAAO;EACnB,MAAM;GAAC;GAAa;GAAS;GAAe;EAC5C,WAAW,cAAc;EAC1B;CACD,UAAU;EACR;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACF;CACD,UAAU,CAAC;EAAE,KAAK;EAAkB,SAAS;EAAS,CAAC;CACxD,CAAC;;;;ACtDF,MAAM,SAAS,CAAC,+BAA+B;AAE/C,MAAa,sBAAsB,iBAAiB;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAa;GAAa;GAAW;EAC5C,WAAW,cAAc;EAC1B;CACD,UAAU;EACR;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aACE;GACH;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACD;GACE,SAAS;GACT,KAAK;GACL,SAAS;GACT,aAAa;GACd;EACF;CACD,UAAU,CAAC;EAAE,KAAK;EAAkB,SAAS;EAAS,CAAC;CACxD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@contractspec/lib.contracts-library",
3
+ "version": "0.0.0-canary-20260206014742",
4
+ "type": "module",
5
+ "scripts": {
6
+ "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
7
+ "publish:pkg:canary": "bun publish:pkg --tag canary",
8
+ "clean": "rm -rf dist",
9
+ "lint": "bun run lint:fix",
10
+ "lint:fix": "eslint src --fix",
11
+ "lint:check": "eslint src",
12
+ "build": "bun build:types && bun build:bundle",
13
+ "build:bundle": "tsdown",
14
+ "build:types": "tsc --noEmit"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "exports": {
21
+ ".": "./dist/index.js",
22
+ "./templates": "./dist/templates/index.js",
23
+ "./templates/recipes": "./dist/templates/recipes.js",
24
+ "./templates/todos": "./dist/templates/todos.js"
25
+ },
26
+ "main": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "dependencies": {
29
+ "@contractspec/lib.contracts": "0.0.0-canary-20260206014742",
30
+ "@contractspec/lib.schema": "0.0.0-canary-20260206014742"
31
+ },
32
+ "devDependencies": {
33
+ "@contractspec/tool.tsdown": "0.0.0-canary-20260206014742",
34
+ "@contractspec/tool.typescript": "0.0.0-canary-20260206014742",
35
+ "tsdown": "^0.20.3",
36
+ "typescript": "^5.9.3"
37
+ }
38
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './templates';
@@ -0,0 +1,3 @@
1
+ export * from './recipes';
2
+ export * from './todos';
3
+ export * from './messaging';
@@ -0,0 +1,60 @@
1
+ import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';
2
+
3
+ const OWNERS = ['platform.contractspec-studio'] as const;
4
+
5
+ export const MessagingCapability = defineCapability({
6
+ meta: {
7
+ key: 'template.messaging.core',
8
+ version: '1.0.0',
9
+ kind: 'api',
10
+ title: 'Template Messaging Core',
11
+ description:
12
+ 'Real-time messaging primitives for template applications, including conversations, participants, and delivery events.',
13
+ domain: 'templates',
14
+ owners: [...OWNERS],
15
+ tags: ['templates', 'messaging', 'realtime'],
16
+ stability: StabilityEnum.Experimental,
17
+ },
18
+ provides: [
19
+ {
20
+ surface: 'operation',
21
+ key: 'template.messaging.conversation.create',
22
+ version: '1.0.0',
23
+ description:
24
+ 'Create a direct or group conversation scoped to a Studio project.',
25
+ },
26
+ {
27
+ surface: 'operation',
28
+ key: 'template.messaging.conversation.list',
29
+ version: '1.0.0',
30
+ description:
31
+ 'List conversations with pagination, unread counts, and filters.',
32
+ },
33
+ {
34
+ surface: 'operation',
35
+ key: 'template.messaging.message.send',
36
+ version: '1.0.0',
37
+ description:
38
+ 'Send a message with attachments and optimistic delivery state.',
39
+ },
40
+ {
41
+ surface: 'operation',
42
+ key: 'template.messaging.message.read',
43
+ version: '1.0.0',
44
+ description: 'Mark messages as read and update participant cursors.',
45
+ },
46
+ {
47
+ surface: 'event',
48
+ key: 'template.messaging.message.received',
49
+ version: '1.0.0',
50
+ description: 'Emitted when a participant receives a new message.',
51
+ },
52
+ {
53
+ surface: 'event',
54
+ key: 'template.messaging.typing',
55
+ version: '1.0.0',
56
+ description: 'Emitted when a participant is typing in a conversation.',
57
+ },
58
+ ],
59
+ requires: [{ key: 'studio.project', version: '1.0.0' }],
60
+ });
@@ -0,0 +1,48 @@
1
+ import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';
2
+
3
+ const OWNERS = ['platform.contractspec-studio'] as const;
4
+
5
+ export const RecipeCapability = defineCapability({
6
+ meta: {
7
+ key: 'template.recipes.browse',
8
+ version: '1.0.0',
9
+ kind: 'api',
10
+ title: 'Template Recipe Browser',
11
+ description:
12
+ 'Internationalized recipe browsing, search, and detail operations for template applications.',
13
+ domain: 'templates',
14
+ owners: [...OWNERS],
15
+ tags: ['templates', 'recipes', 'i18n', 'content'],
16
+ stability: StabilityEnum.Stable,
17
+ },
18
+ provides: [
19
+ {
20
+ surface: 'operation',
21
+ key: 'template.recipe.list',
22
+ version: '1.0.0',
23
+ description:
24
+ 'List recipes with category, difficulty, and locale filters.',
25
+ },
26
+ {
27
+ surface: 'operation',
28
+ key: 'template.recipe.get',
29
+ version: '1.0.0',
30
+ description: 'Fetch a recipe detail view including localized content.',
31
+ },
32
+ {
33
+ surface: 'operation',
34
+ key: 'template.recipe.search',
35
+ version: '1.0.0',
36
+ description:
37
+ 'Search recipes by ingredient, tag, or free text with i18n support.',
38
+ },
39
+ {
40
+ surface: 'operation',
41
+ key: 'template.recipe.favorite',
42
+ version: '1.0.0',
43
+ description:
44
+ 'Toggle recipe favorites for showcasing personalization patterns.',
45
+ },
46
+ ],
47
+ requires: [{ key: 'studio.project', version: '1.0.0' }],
48
+ });