@dypai-ai/flow 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dypai-ai/flow",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Typed Flow DSL for authoring DYPAI backend endpoints in TypeScript",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,10 +32,9 @@
32
32
  "typecheck": "bunx tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@dypai/workflow-core": "npm:@dypai-ai/workflow-core@^0.1.0"
35
+ "@dypai-ai/workflow-core": "^0.1.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@dypai/workflow-core": "file:../dypai-workflow-core",
39
38
  "@types/bun": "^1.1.14",
40
39
  "typescript": "^5.7.2"
41
40
  }
package/src/builder.ts CHANGED
@@ -5,7 +5,7 @@ import type {
5
5
  RefIR,
6
6
  ResponseIR,
7
7
  TriggerIR,
8
- } from "@dypai/workflow-core";
8
+ } from "@dypai-ai/workflow-core";
9
9
  import { inferOutputSchemaFromReturns, objectSchemaFromFields, type SchemaField } from "./schema";
10
10
  import type { FlowStepCall } from "./types";
11
11
 
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
2
2
  import { dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { describe, expect, test } from "bun:test";
5
- import type { CapabilityCatalog } from "@dypai/workflow-core";
5
+ import type { CapabilityCatalog } from "@dypai-ai/workflow-core";
6
6
  import {
7
7
  capability,
8
8
  compileFlowDefinition,
@@ -23,7 +23,7 @@ const fixturePath = join(
23
23
  );
24
24
  const fixtureCatalog = JSON.parse(readFileSync(fixturePath, "utf-8")) as CapabilityCatalog;
25
25
 
26
- describe("@dypai/flow dynamic capabilities", () => {
26
+ describe("@dypai-ai/flow dynamic capabilities", () => {
27
27
  test("capability() emits grouped calls", () => {
28
28
  expect(capability("stripe.checkout", "createSession", { price_id: "price_123" })).toEqual({
29
29
  call: "stripe.checkout.createSession",
package/src/compiler.ts CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  type IRDiagnostic,
7
7
  type WorkflowIR,
8
8
  validateWorkflowIR,
9
- } from "@dypai/workflow-core";
9
+ } from "@dypai-ai/workflow-core";
10
10
  import { createHash } from "node:crypto";
11
11
  import { mkdir, readFile, writeFile } from "node:fs/promises";
12
12
  import { join } from "node:path";
@@ -19,12 +19,12 @@ const FLOW_COMPILE_CACHE_DIR = fileURLToPath(new URL("../.flow-compile-cache", i
19
19
 
20
20
  async function materializeFlowFileForImport(sourcePath: string): Promise<string> {
21
21
  const raw = await readFile(sourcePath, "utf-8");
22
- if (!raw.includes("@dypai/flow")) {
22
+ if (!raw.includes("@dypai-ai/flow")) {
23
23
  return sourcePath;
24
24
  }
25
25
 
26
26
  const flowEntry = join(FLOW_PACKAGE_SRC, "index.ts").replace(/\\/g, "/");
27
- const rewritten = raw.replace(/from\s+["']@dypai\/flow["']/g, `from "${flowEntry}"`);
27
+ const rewritten = raw.replace(/from\s+["']@dypai-ai\/flow["']/g, `from "${flowEntry}"`);
28
28
  const cacheKey = createHash("sha256").update(`${sourcePath}\0${rewritten}`).digest("hex");
29
29
  await mkdir(FLOW_COMPILE_CACHE_DIR, { recursive: true });
30
30
  const cachePath = join(FLOW_COMPILE_CACHE_DIR, `${cacheKey}.flow.ts`);
package/src/flow.test.ts CHANGED
@@ -20,7 +20,7 @@ const demoFlowPath = join(
20
20
  "create-booking.flow.ts",
21
21
  );
22
22
 
23
- describe("@dypai/flow schema helpers", () => {
23
+ describe("@dypai-ai/flow schema helpers", () => {
24
24
  test("s helpers produce JSON Schema fragments", () => {
25
25
  expect(s.string()).toEqual({ type: "string" });
26
26
  expect(s.email()).toEqual({ type: "string", format: "email" });
@@ -29,7 +29,7 @@ describe("@dypai/flow schema helpers", () => {
29
29
  });
30
30
  });
31
31
 
32
- describe("@dypai/flow ref helpers", () => {
32
+ describe("@dypai-ai/flow ref helpers", () => {
33
33
  test("ref helpers produce canonical RefIR", () => {
34
34
  expect(ref.input("email")).toEqual({ kind: "input", path: ["email"] });
35
35
  expect(ref.currentUserId()).toEqual({ kind: "currentUserId" });
@@ -1,9 +1,9 @@
1
- import type { CapabilityCatalog } from "@dypai/workflow-core";
1
+ import type { CapabilityCatalog } from "@dypai-ai/workflow-core";
2
2
 
3
3
  export function generateCapabilityWrappersSource(catalog: CapabilityCatalog): string {
4
4
  const lines = [
5
5
  "// Auto-generated from dypai/capability-catalog.json. Do not edit by hand.",
6
- 'import { capability } from "@dypai/flow";',
6
+ 'import { capability } from "@dypai-ai/flow";',
7
7
  "",
8
8
  ];
9
9
 
package/src/index.ts CHANGED
@@ -11,4 +11,4 @@ export type {
11
11
  FlowDefinition,
12
12
  FlowStepDefinition,
13
13
  WorkflowIR,
14
- } from "@dypai/workflow-core";
14
+ } from "@dypai-ai/workflow-core";
package/src/ref.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { RefIR } from "@dypai/workflow-core";
1
+ import type { RefIR } from "@dypai-ai/workflow-core";
2
2
 
3
3
  export const ref = {
4
4
  input(key: string, ...path: string[]): RefIR {
package/src/schema.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { JsonSchema } from "@dypai/workflow-core";
1
+ import type { JsonSchema } from "@dypai-ai/workflow-core";
2
2
 
3
3
  export type SchemaField = JsonSchema & {
4
4
  optional?: boolean;
package/src/types.ts CHANGED
@@ -13,8 +13,8 @@ export type FlowCompileDiagnostic = {
13
13
 
14
14
  export type CompileFlowResult = {
15
15
  ok: boolean;
16
- definition?: import("@dypai/workflow-core").FlowDefinition;
17
- workflow?: import("@dypai/workflow-core").WorkflowIR;
18
- workflowCode?: import("@dypai/workflow-core").WorkflowCodeV2;
16
+ definition?: import("@dypai-ai/workflow-core").FlowDefinition;
17
+ workflow?: import("@dypai-ai/workflow-core").WorkflowIR;
18
+ workflowCode?: import("@dypai-ai/workflow-core").WorkflowCodeV2;
19
19
  diagnostics: FlowCompileDiagnostic[];
20
20
  };