cwtools-shared 0.4.0 → 0.5.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.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Browser-safe entry point, published as `cwtools-shared/catalog`.
3
+ *
4
+ * The package root re-exports Host modules (project detection, path safety,
5
+ * archetype artifacts, ...) that require Node builtins such as `fs`, `path` and
6
+ * `crypto` as soon as they load. A UI that only renders the tool catalog must
7
+ * not pull those in, so this entry exposes the generated catalog, its registry
8
+ * metadata and the read/write name tables, and nothing that touches Node.
9
+ *
10
+ * `src/test/catalogEntry.contract.test.ts` walks this module's runtime import
11
+ * graph and fails if any external or Node builtin import becomes reachable.
12
+ */
13
+ export * from './tools/mcpSchema';
14
+ export * from './tools/names';
15
+ export type { GeneratedMcpTool, JsonObject, McpToolSchema, ToolDefinition } from './tools/schema';
16
+ export type { ToolRegistryMetadata } from './tools/registry';
17
+ export type { CwtoolsHostCapability } from './host/hostServices';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * Browser-safe entry point, published as `cwtools-shared/catalog`.
19
+ *
20
+ * The package root re-exports Host modules (project detection, path safety,
21
+ * archetype artifacts, ...) that require Node builtins such as `fs`, `path` and
22
+ * `crypto` as soon as they load. A UI that only renders the tool catalog must
23
+ * not pull those in, so this entry exposes the generated catalog, its registry
24
+ * metadata and the read/write name tables, and nothing that touches Node.
25
+ *
26
+ * `src/test/catalogEntry.contract.test.ts` walks this module's runtime import
27
+ * graph and fails if any external or Node builtin import becomes reachable.
28
+ */
29
+ __exportStar(require("./tools/mcpSchema"), exports);
30
+ __exportStar(require("./tools/names"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cwtools-shared",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared protocol and tool contracts for the CWTools MCP server",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,6 +12,17 @@
12
12
  },
13
13
  "main": "dist/index.js",
14
14
  "types": "dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./catalog": {
21
+ "types": "./dist/catalog.d.ts",
22
+ "default": "./dist/catalog.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
15
26
  "files": [
16
27
  "dist",
17
28
  "package.json"