@strav/brain 0.1.0 → 0.1.5

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/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # @stravigor/brain
1
+ # @strav/brain
2
2
 
3
- AI module for the [Strav](https://www.npmjs.com/package/@stravigor/core) framework. Provides a unified interface for AI providers with support for agents, threads, tool use, and multi-step workflows.
3
+ AI module for the [Strav](https://www.npmjs.com/package/@strav/core) framework. Provides a unified interface for AI providers with support for agents, threads, tool use, and multi-step workflows.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun add @stravigor/brain
8
+ bun add @strav/brain
9
9
  ```
10
10
 
11
- Requires `@stravigor/core` as a peer dependency.
11
+ Requires `@strav/core` as a peer dependency.
12
12
 
13
13
  ## Providers
14
14
 
@@ -18,7 +18,7 @@ Requires `@stravigor/core` as a peer dependency.
18
18
  ## Usage
19
19
 
20
20
  ```ts
21
- import { brain } from '@stravigor/brain'
21
+ import { brain } from '@strav/brain'
22
22
 
23
23
  // One-shot chat
24
24
  const response = await brain.chat('Explain quantum computing')
@@ -41,7 +41,7 @@ const vectors = await brain.embed('Hello world')
41
41
  ## Agents
42
42
 
43
43
  ```ts
44
- import { Agent, defineTool } from '@stravigor/brain'
44
+ import { Agent, defineTool } from '@strav/brain'
45
45
 
46
46
  class ResearchAgent extends Agent {
47
47
  provider = 'anthropic'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/brain",
3
- "version": "0.1.0",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "AI module for the Strav framework",
6
6
  "license": "MIT",
@@ -15,8 +15,8 @@
15
15
  "CHANGELOG.md"
16
16
  ],
17
17
  "peerDependencies": {
18
- "@strav/kernel": "0.1.0",
19
- "@strav/workflow": "0.1.0"
18
+ "@strav/kernel": "0.1.4",
19
+ "@strav/workflow": "0.1.4"
20
20
  },
21
21
  "dependencies": {
22
22
  "zod": "^3.25 || ^4.0"
@@ -1,4 +1,4 @@
1
- import { inject, ConfigurationError, Configuration } from '@stravigor/kernel'
1
+ import { inject, ConfigurationError, Configuration } from '@strav/kernel'
2
2
  import { AnthropicProvider } from './providers/anthropic_provider.ts'
3
3
  import { OpenAIProvider } from './providers/openai_provider.ts'
4
4
  import type {
@@ -1,5 +1,5 @@
1
- import { ServiceProvider } from '@stravigor/kernel'
2
- import type { Application } from '@stravigor/kernel'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import BrainManager from './brain_manager.ts'
4
4
 
5
5
  export default class BrainProvider extends ServiceProvider {
@@ -1,6 +1,6 @@
1
1
  import { parseSSE } from '../utils/sse_parser.ts'
2
2
  import { retryableFetch, type RetryOptions } from '../utils/retry.ts'
3
- import { ExternalServiceError } from '@stravigor/kernel'
3
+ import { ExternalServiceError } from '@strav/kernel'
4
4
  import type {
5
5
  AIProvider,
6
6
  CompletionRequest,
@@ -1,6 +1,6 @@
1
1
  import { parseSSE } from '../utils/sse_parser.ts'
2
2
  import { retryableFetch, type RetryOptions } from '../utils/retry.ts'
3
- import { ExternalServiceError } from '@stravigor/kernel'
3
+ import { ExternalServiceError } from '@strav/kernel'
4
4
  import type {
5
5
  AIProvider,
6
6
  CompletionRequest,
@@ -1,6 +1,6 @@
1
1
  import { parseSSE } from '../utils/sse_parser.ts'
2
2
  import { retryableFetch, type RetryOptions } from '../utils/retry.ts'
3
- import { ExternalServiceError } from '@stravigor/kernel'
3
+ import { ExternalServiceError } from '@strav/kernel'
4
4
  import type {
5
5
  AIProvider,
6
6
  CompletionRequest,
@@ -1,4 +1,4 @@
1
- import { ExternalServiceError } from '@stravigor/kernel'
1
+ import { ExternalServiceError } from '@strav/kernel'
2
2
 
3
3
  export interface RetryOptions {
4
4
  maxRetries?: number
package/src/workflow.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Workflow as BaseWorkflow } from '@stravigor/workflow'
2
- import type { WorkflowContext as BaseContext } from '@stravigor/workflow'
1
+ import { Workflow as BaseWorkflow } from '@strav/workflow'
2
+ import type { WorkflowContext as BaseContext } from '@strav/workflow'
3
3
  import { AgentRunner } from './helpers.ts'
4
4
  import type { Agent } from './agent.ts'
5
5
  import type { AgentResult, WorkflowResult, Usage } from './types.ts'
@@ -30,7 +30,7 @@ function addUsage(total: Usage, add: Usage): void {
30
30
  // ── Workflow Builder ────────────────────────────────────────────────────────
31
31
 
32
32
  /**
33
- * Multi-agent workflow orchestrator built on `@stravigor/workflow`.
33
+ * Multi-agent workflow orchestrator built on `@strav/workflow`.
34
34
  *
35
35
  * Supports sequential steps, parallel fan-out, routing, and loops.
36
36
  * Each step wraps an Agent execution through the general-purpose workflow engine.