Skip to content

Commit 6971dd1

Browse files
committed
2.0.2
1 parent 72b486a commit 6971dd1

23 files changed

Lines changed: 60 additions & 60 deletions

threads/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@threaded/ai",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Composable LLM inference with multi-provider support, tool execution, streaming, and approval workflows",
55
"type": "module",
66
"main": "dist/index.js",

threads/src/approval.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EventEmitter } from "events";
2-
import { ToolCall } from "./types";
2+
import { ToolCall } from "./types.js";
33

44
export interface ApprovalRequest {
55
id: string;

threads/src/composition/compose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComposedFunction, ConversationContext, StepFunction } from "../types";
1+
import { ComposedFunction, ConversationContext, StepFunction } from "../types.js";
22

33
const enrichContext = (ctx: ConversationContext): ConversationContext => {
44
const lastUserMessage = [...ctx.history]

threads/src/composition/model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { callProvider } from "../providers";
2-
import { normalizeSchema } from "../schema";
1+
import { callProvider } from "../providers/index.js";
2+
import { normalizeSchema } from "../schema.js";
33
import {
44
ConversationContext,
55
ToolCall,
66
JsonSchema,
77
StandardSchema,
88
ComposedFunction,
9-
} from "../types";
10-
import { requestApproval } from "../approval";
9+
} from "../types.js";
10+
import { requestApproval } from "../approval.js";
1111

1212
export const model = ({
1313
model = "openai/gpt-4o-mini",

threads/src/composition/retry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { StepFunction, ConversationContext, RetryOptions } from "../types";
1+
import { StepFunction, ConversationContext, RetryOptions } from "../types.js";
22

33
/**
44
* scope({}, retry({ times: 2 }, model(...)))

threads/src/composition/scope.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { compose } from "./compose";
1+
import { compose } from "./compose.js";
22
import {
33
ConversationContext,
44
Inherit,
55
ScopeConfig,
66
StepFunction,
7-
} from "../types";
8-
import { toolConfigToToolDefinition } from "../utils";
7+
} from "../types.js";
8+
import { toolConfigToToolDefinition } from "../utils.js";
99

1010
const scopeContext = (
1111
config: ScopeConfig,

threads/src/composition/tap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ConversationContext, StepFunction } from "../types";
1+
import { ConversationContext, StepFunction } from "../types.js";
22

33
export const tap = (
44
fn: (ctx: ConversationContext) => Promise<void> | void,

threads/src/composition/when.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ConversationContext, StepFunction } from "../types";
1+
import { ConversationContext, StepFunction } from "../types.js";
22

33
export const when = (
44
condition: (ctx: ConversationContext) => boolean,

threads/src/embed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getKey } from "./utils";
1+
import { getKey } from "./utils.js";
22

33
const modelCache = new Map<string, any>();
44

threads/src/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ConversationContext, StepFunction } from "./types";
2-
import { when } from "./composition/when";
1+
import { ConversationContext, StepFunction } from "./types.js";
2+
import { when } from "./composition/when.js";
33

44
/**
55
* scope({ until: noToolsCalled() })

0 commit comments

Comments
 (0)