@gptmarket/temporal-types 0.0.1 → 0.0.3

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/index.ts CHANGED
@@ -1,43 +1,36 @@
1
1
  /**
2
- * GPTMarket Temporal Types
2
+ * @gptmarket/temporal-types
3
3
  *
4
- * Types, workflow registry, and client utilities for GPTMarket Temporal workflows.
4
+ * TypeScript types and workflow registry for GPTMarket Temporal workflows.
5
+ * This entry point is browser-safe - no Node.js dependencies.
5
6
  *
6
- * @example Start a workflow
7
+ * @example Client-side (React components, dynamic forms)
7
8
  * ```ts
8
- * import { startWorkflow, waitForWorkflow } from '@gptmarket/temporal-types/client';
9
+ * import { workflowRegistry, ruby } from '@gptmarket/temporal-types';
9
10
  * import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
10
11
  *
11
- * const { workflowId } = await startWorkflow('RubyWorkflow', { topic: 'AI news' });
12
- * const { result } = await waitForWorkflow<RubyOutput>(workflowId);
12
+ * // Build dynamic UI from workflow definitions
13
+ * ruby.fields.forEach(field => {
14
+ * console.log(field.name, field.type, field.options);
15
+ * });
13
16
  * ```
14
17
  *
15
- * @example Dynamic form generation
18
+ * @example Server-side (API routes, server actions)
16
19
  * ```ts
17
- * import { workflowRegistry } from '@gptmarket/temporal-types';
20
+ * import { startWorkflow, waitForWorkflow } from '@gptmarket/temporal-types/server';
21
+ * import type { RubyInput, RubyOutput } from '@gptmarket/temporal-types';
18
22
  *
19
- * const ruby = workflowRegistry.ruby;
20
- * ruby.fields.forEach(field => {
21
- * console.log(field.name, field.type, field.options);
22
- * });
23
+ * const { workflowId } = await startWorkflow('RubyWorkflow', { topic: 'AI news' });
24
+ * const { result } = await waitForWorkflow<RubyOutput>(workflowId);
23
25
  * ```
24
26
  */
25
27
 
26
- // Types
28
+ // Types (browser-safe)
27
29
  export * from "./types";
28
30
 
29
- // Workflow registry and definitions
31
+ // Workflow registry and definitions (browser-safe)
30
32
  export * from "./registry";
31
33
 
32
- // Client utilities
33
- export {
34
- configureTemporalClient,
35
- getTemporalClient,
36
- getTaskQueue,
37
- startWorkflow,
38
- getWorkflowProgress,
39
- waitForWorkflow,
40
- cancelWorkflow,
41
- getWorkflowHandle,
42
- } from "./client";
43
- export type { TemporalConfig, StartWorkflowResult } from "./client";
34
+ // NOTE: Server utilities are intentionally NOT exported from this entry point.
35
+ // Import from '@gptmarket/temporal-types/server' for server-side code.
36
+ // This prevents bundlers from pulling in @temporalio/client dependencies.
package/package.json CHANGED
@@ -1,31 +1,38 @@
1
1
  {
2
2
  "name": "@gptmarket/temporal-types",
3
- "version": "0.0.1",
4
- "description": "TypeScript types, workflow registry, and client utilities for GPTMarket Temporal workflows",
3
+ "version": "0.0.3",
4
+ "description": "TypeScript types and workflow registry for GPTMarket Temporal workflows",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
7
+ "sideEffects": false,
7
8
  "exports": {
8
9
  ".": "./index.ts",
9
10
  "./types": "./types.ts",
10
11
  "./registry": "./registry.ts",
11
- "./client": "./client.ts"
12
+ "./server": "./server.ts"
12
13
  },
13
14
  "files": [
14
15
  "index.ts",
15
16
  "types.ts",
16
17
  "registry.ts",
17
- "client.ts",
18
+ "server.ts",
18
19
  "schemas/"
19
20
  ],
20
21
  "peerDependencies": {
21
22
  "@temporalio/client": ">=1.0.0"
22
23
  },
24
+ "peerDependenciesMeta": {
25
+ "@temporalio/client": {
26
+ "optional": true
27
+ }
28
+ },
23
29
  "keywords": [
24
30
  "temporal",
25
31
  "gptmarket",
26
32
  "types",
27
33
  "typescript",
28
- "workflows"
34
+ "workflows",
35
+ "registry"
29
36
  ],
30
37
  "license": "MIT",
31
38
  "repository": {
@@ -1,9 +1,11 @@
1
1
  /**
2
- * Temporal client utilities for Next.js.
2
+ * Temporal server utilities for Next.js.
3
+ * Use in API routes, server actions, and server components only.
3
4
  * Auto-generated - DO NOT EDIT MANUALLY
4
5
  */
5
6
 
6
- import { Client, Connection, WorkflowHandle } from "@temporalio/client";
7
+ import { Client, Connection } from "@temporalio/client";
8
+ import type { WorkflowHandle } from "@temporalio/client";
7
9
  import type { WorkflowProgress, StepProgress, WorkflowStatus } from "./types";
8
10
 
9
11
  // =============================================================================