@outputai/cli 0.15.1-next.15a30ef.0 → 0.15.1-next.2156c4b.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.
- package/dist/assets/docker/docker-compose-dev.yml +1 -1
- package/dist/generated/framework_version.json +1 -1
- package/dist/services/cost_calculator.js +1 -1
- package/dist/services/workflow_planner.js +1 -1
- package/dist/services/workflow_planner.spec.js +2 -2
- package/dist/templates/agent_instructions/CLAUDE.md.template +1 -1
- package/dist/templates/project/package.json.template +2 -0
- package/dist/templates/project/src/workflows/blog_evaluator/evaluators.ts.template +1 -1
- package/dist/templates/workflow/README.md.template +2 -2
- package/dist/templates/workflow/evaluators.ts.template +1 -1
- package/dist/templates/workflow/steps.ts.template +1 -1
- package/dist/test_helpers/mocks.d.ts +1 -1
- package/dist/test_helpers/mocks.js +1 -1
- package/dist/types/cost.d.ts +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
|
@@ -32,7 +32,7 @@ function priceLines(lines, pricing) {
|
|
|
32
32
|
}, 0);
|
|
33
33
|
}
|
|
34
34
|
// Token counts for display. The producer's 'input' line excludes cached tokens
|
|
35
|
-
// (
|
|
35
|
+
// (core/llm emits input − cached), while AI SDK reports inputTokens as the
|
|
36
36
|
// total — add cached back so the columns match what providers report.
|
|
37
37
|
function eventTokenUsage(lines) {
|
|
38
38
|
const sumOf = (type) => lines.filter(l => l.type === type).reduce((s, l) => s + l.amount, 0);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
2
|
import { generatePlanName, writePlanFile, updateAgentTemplates } from './workflow_planner.js';
|
|
3
3
|
import { initializeAgentConfig } from './coding_agents.js';
|
|
4
|
-
import { generateText } from '@outputai/llm';
|
|
4
|
+
import { generateText } from '@outputai/core/llm';
|
|
5
5
|
import fs from 'node:fs/promises';
|
|
6
6
|
vi.mock('./coding_agents.js');
|
|
7
|
-
vi.mock('@outputai/llm');
|
|
7
|
+
vi.mock('@outputai/core/llm');
|
|
8
8
|
vi.mock('node:fs/promises');
|
|
9
9
|
const mockGenerateTextResult = (text) => ({
|
|
10
10
|
text,
|
|
@@ -47,7 +47,7 @@ config/
|
|
|
47
47
|
|
|
48
48
|
- **Workflows are deterministic**: No I/O, no `Date.now()`, no `Math.random()` in `workflow.ts`. All side effects go in steps or evaluators.
|
|
49
49
|
- **HTTP clients**: Use `outputFetch` or `createKyClient` from `@outputai/core/http` instead of raw `fetch` or `axios`. Requests are automatically traced; for paid APIs, attach spend via `addRequestCost` in an `afterResponse` hook (`output-dev-http-client-create`) and forward cost events with `output-dev-cost-hooks`.
|
|
50
|
-
- **LLM calls**: Use `generateText` from `@outputai/llm` with `.prompt` files. Never call LLM APIs directly.
|
|
50
|
+
- **LLM calls**: Use `generateText` from `@outputai/core/llm` with `.prompt` files. Never call LLM APIs directly.
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { evaluator, EvaluationNumberResult } from '@outputai/core';
|
|
2
2
|
import type { EvaluationResultArgs } from '@outputai/core';
|
|
3
|
-
import { generateText, aiSdk } from '@outputai/llm';
|
|
3
|
+
import { generateText, aiSdk } from '@outputai/core/llm';
|
|
4
4
|
import { blogContentSchema } from './types.js';
|
|
5
5
|
import type { BlogContent } from './types.js';
|
|
6
6
|
|
|
@@ -123,7 +123,7 @@ Define steps in `steps.ts` with schemas:
|
|
|
123
123
|
|
|
124
124
|
```typescript
|
|
125
125
|
import { step, z } from '@outputai/core';
|
|
126
|
-
import { generateText, aiSdk } from '@outputai/llm';
|
|
126
|
+
import { generateText, aiSdk } from '@outputai/core/llm';
|
|
127
127
|
|
|
128
128
|
export const myStep = step( {
|
|
129
129
|
name: 'my_step',
|
|
@@ -153,7 +153,7 @@ Define evaluators in `evaluators.ts`:
|
|
|
153
153
|
|
|
154
154
|
```typescript
|
|
155
155
|
import { evaluator, z, EvaluationVerdictResult } from '@outputai/core';
|
|
156
|
-
import { generateText, aiSdk } from '@outputai/llm';
|
|
156
|
+
import { generateText, aiSdk } from '@outputai/core/llm';
|
|
157
157
|
|
|
158
158
|
export const evaluateQuality = evaluator( {
|
|
159
159
|
name: 'evaluate_quality',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { evaluator, z, EvaluationVerdictResult } from '@outputai/core';
|
|
2
|
-
import { generateText, aiSdk } from '@outputai/llm';
|
|
2
|
+
import { generateText, aiSdk } from '@outputai/core/llm';
|
|
3
3
|
|
|
4
4
|
// TODO: Update the evaluator to assess your workflow's output quality
|
|
5
5
|
export const evaluate{{WorkflowName}} = evaluator( {
|
package/dist/types/cost.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface TokenUsage {
|
|
|
13
13
|
cachedInputTokens?: number;
|
|
14
14
|
reasoningTokens?: number;
|
|
15
15
|
}
|
|
16
|
-
import type { LLMGenerationCost, LLMGenerationUsage, LLMUsageEvent } from '@outputai/llm';
|
|
16
|
+
import type { LLMGenerationCost, LLMGenerationUsage, LLMUsageEvent } from '@outputai/core/llm';
|
|
17
17
|
export type LLMUsageLine = LLMUsageEvent['usage'][number];
|
|
18
18
|
export interface HTTPCostEvent {
|
|
19
19
|
type: 'http:request:cost';
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/cli",
|
|
3
|
-
"version": "0.15.1-next.
|
|
3
|
+
"version": "0.15.1-next.2156c4b.0",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"output": "./bin/run.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@ai-sdk/anthropic": "4.0.61",
|
|
20
21
|
"@anthropic-ai/claude-agent-sdk": "0.3.281",
|
|
21
22
|
"@hackylabs/deep-redact": "3.0.5",
|
|
22
23
|
"@inquirer/prompts": "8.7.2",
|
|
@@ -35,10 +36,9 @@
|
|
|
35
36
|
"ky": "2.0.2",
|
|
36
37
|
"react": "19.3.0",
|
|
37
38
|
"semver": "7.8.5",
|
|
38
|
-
"undici": "8.
|
|
39
|
-
"@outputai/
|
|
40
|
-
"@outputai/
|
|
41
|
-
"@outputai/llm": "0.15.1-next.15a30ef.0"
|
|
39
|
+
"undici": "8.10.2",
|
|
40
|
+
"@outputai/core": "0.15.1-next.2156c4b.0",
|
|
41
|
+
"@outputai/evals": "0.15.1-next.2156c4b.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/cli-progress": "3.11.6",
|