@jaypie/fabric 0.1.4 → 0.2.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.
@@ -44,6 +44,10 @@ export interface ServiceSuite {
44
44
  execute(name: string, inputs: Record<string, unknown>): Promise<unknown>;
45
45
  /** Register a fabricService into the suite */
46
46
  register(service: Service<any, any>, category: string): void;
47
+ /** Get all registered service functions (for transport adapters like FabricMcpServer) */
48
+ getServiceFunctions(): Service<any, any>[];
49
+ /** Get a specific service function by name */
50
+ getServiceFunction(name: string): Service<any, any> | undefined;
47
51
  }
48
52
  /**
49
53
  * Configuration for creating a ServiceSuite
@@ -10,7 +10,7 @@ export { ARCHIVED_SUFFIX, buildCompositeKey, calculateIndexSuffix, calculateScop
10
10
  export type { IndexableModel, IndexDefinition, IndexField, ModelSchema, } from "./index/index.js";
11
11
  export { BOOLEAN_TYPE, DATE_TYPE, DATETIME_TYPE, DOLLARS_TYPE, ELEMENTARY_TYPE_REGISTRY, ELEMENTARY_TYPES, getAllElementaryTypes, getElementaryType, isElementaryType, isFieldDefinition, MULTISELECT_TYPE, NUMBER_TYPE, REFERENCE_TYPE, SELECT_TYPE, TEXT_TYPE, TEXTAREA_TYPE, } from "./types/index.js";
12
12
  export type { ElementaryType, ElementaryTypeDefinition, FieldDefinition, FieldRef, ValidationRule, } from "./types/index.js";
13
- export { fabricService } from "./service.js";
13
+ export { fabricService, isService } from "./service.js";
14
14
  export { resolveService } from "./resolveService.js";
15
15
  export type { ResolveServiceConfig } from "./resolveService.js";
16
16
  export { createServiceSuite } from "./ServiceSuite.js";
@@ -1,4 +1,9 @@
1
1
  import type { Service, ServiceConfig } from "./types.js";
2
+ /**
3
+ * Type guard to check if a value is a pre-instantiated Service
4
+ * A Service is a function with the `$fabric` property set by fabricService
5
+ */
6
+ export declare function isService<TInput extends Record<string, unknown>, TOutput>(value: unknown): value is Service<TInput, TOutput>;
2
7
  /**
3
8
  * Fabric a service function
4
9
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaypie/fabric",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Jaypie modeling framework with type conversion, service handlers, and adapters",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,7 +67,7 @@
67
67
  "typecheck": "tsc --noEmit"
68
68
  },
69
69
  "dependencies": {
70
- "@jaypie/errors": "^1.2.1"
70
+ "@jaypie/errors": "*"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@jaypie/testkit": "*",