Compare commits

...

4 Commits

Author SHA1 Message Date
xiaoju 524e00a0a6 fix(test): correct import path in resume-e2e integration test
CI / check (pull_request) Failing after 3m7s
The test file moved to __tests__/integration/ but the import path
was not updated from ../src/ to ../../src/.

小橘 🍊
2026-05-25 12:29:18 +00:00
xiaoju e2d60fa72e fix(test): use valid JSON Schema in workflow-resolution test fixture
CI / check (push) Failing after 32s
The test used a fake CasRef string as frontmatter, which fails
putSchema validation when loading from YAML files. Replace with
a proper JSON Schema object.

Fixes pre-existing failures in workflow-resolution, cas-exit-code,
and thread-step-count tests.
2026-05-25 11:29:05 +00:00
xiaoju dfae96ad45 style: fix biome import ordering after package rename
CI / check (push) Has been cancelled
2026-05-25 11:26:01 +00:00
xiaomo 2f4473f22c Merge pull request 'refactor: rename workflow-agent-kit → workflow-util-agent, merge moderator' (#513) from refactor/512-rename-packages into main
CI / check (push) Has been cancelled
2026-05-25 11:20:39 +00:00
14 changed files with 20 additions and 19 deletions
@@ -1,5 +1,5 @@
import { describe, expect, test } from "vitest";
import type { Target, WorkflowPayload } from "@uncaged/workflow-protocol";
import { describe, expect, test } from "vitest";
import { evaluate } from "../moderator/evaluate.js";
@@ -31,7 +31,13 @@ function makeMinimalPayload(name: string, description: string): WorkflowPayload
capabilities: [],
procedure: "",
output: "",
frontmatter: { type: "0000000000000" } as unknown as CasRef,
frontmatter: {
type: "object",
properties: {
$status: { type: "string" },
},
required: ["$status"],
} as unknown as CasRef,
},
},
graph: {
+2 -2
View File
@@ -2,8 +2,6 @@ import { execFileSync, spawn } from "node:child_process";
import { access, readFile } from "node:fs/promises";
import { dirname, isAbsolute, resolve as resolvePath } from "node:path";
import { validate } from "@uncaged/json-cas";
import { getEnvPath, loadWorkflowConfig } from "@uncaged/workflow-util-agent";
import { evaluate } from "../moderator/index.js";
import type {
AgentAlias,
AgentConfig,
@@ -24,9 +22,11 @@ import {
generateUlid,
type ProcessLogger,
} from "@uncaged/workflow-util";
import { getEnvPath, loadWorkflowConfig } from "@uncaged/workflow-util-agent";
import { config as loadDotenv } from "dotenv";
import { parse } from "yaml";
import { createMarker, deleteMarker, isThreadRunning } from "../background/index.js";
import { evaluate } from "../moderator/index.js";
import {
appendThreadHistory,
createUwfStore,
+1 -4
View File
@@ -5,8 +5,5 @@
"outDir": "dist"
},
"include": ["src"],
"references": [
{ "path": "../workflow-protocol" },
{ "path": "../workflow-util-agent" }
]
"references": [{ "path": "../workflow-protocol" }, { "path": "../workflow-util-agent" }]
}
+1 -1
View File
@@ -1,4 +1,5 @@
import type { Store } from "@uncaged/json-cas";
import { createLogger, generateUlid } from "@uncaged/workflow-util";
import {
type AgentContext,
type AgentRunResult,
@@ -7,7 +8,6 @@ import {
resolveModel,
resolveStorageRoot,
} from "@uncaged/workflow-util-agent";
import { createLogger, generateUlid } from "@uncaged/workflow-util";
import { storeBuiltinDetail } from "./detail.js";
import type { ChatMessage } from "./llm/index.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { ResolvedLlmProvider } from "@uncaged/workflow-util-agent";
import { createLogger } from "@uncaged/workflow-util";
import type { ResolvedLlmProvider } from "@uncaged/workflow-util-agent";
import {
type ChatMessage,
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import type { AgentContext } from "@uncaged/workflow-util-agent";
import type { ThreadId } from "@uncaged/workflow-protocol";
import type { AgentContext } from "@uncaged/workflow-util-agent";
import { buildClaudeCodePrompt } from "../src/claude-code.js";
function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext {
@@ -1,5 +1,6 @@
import { spawn } from "node:child_process";
import type { Store } from "@uncaged/json-cas";
import { createLogger } from "@uncaged/workflow-util";
import {
type AgentContext,
type AgentRunResult,
@@ -9,7 +10,6 @@ import {
getCachedSessionId,
setCachedSessionId,
} from "@uncaged/workflow-util-agent";
import { createLogger } from "@uncaged/workflow-util";
import { parseClaudeCodeStreamOutput, storeClaudeCodeDetail } from "./session-detail.js";
@@ -91,5 +91,3 @@ describe("handleSessionUpdate — helper extraction", () => {
expect((client as any).messageChunks).toHaveLength(0);
});
});
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import type { AgentContext } from "@uncaged/workflow-util-agent";
import type { ThreadId } from "@uncaged/workflow-protocol";
import type { AgentContext } from "@uncaged/workflow-util-agent";
import { buildHermesPrompt } from "../src/hermes.js";
function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext {
@@ -1,6 +1,6 @@
import { afterEach, describe, expect, it } from "bun:test";
import { HermesAcpClient } from "../src/acp-client.js";
import { HermesAcpClient } from "../../src/acp-client.js";
/**
* E2E test for cross-process session resume.
+1 -1
View File
@@ -19,7 +19,7 @@
},
"scripts": {
"test": "bun test",
"test:ci": "bun test __tests__/*.test.ts"
"test:ci": "bun test __tests__/*.test.ts"
},
"dependencies": {
"@uncaged/json-cas": "^0.5.2",
+1 -1
View File
@@ -1,4 +1,5 @@
import type { Store } from "@uncaged/json-cas";
import { createLogger } from "@uncaged/workflow-util";
import {
type AgentContext,
type AgentRunResult,
@@ -6,7 +7,6 @@ import {
buildRolePrompt,
createAgent,
} from "@uncaged/workflow-util-agent";
import { createLogger } from "@uncaged/workflow-util";
import { HermesAcpClient } from "./acp-client.js";
import { getCachedSessionId, isResumeDisabled, setCachedSessionId } from "./session-cache.js";
@@ -1,10 +1,10 @@
// Re-export session cache from the shared agent-kit package with agent name injected.
import type { ThreadId } from "@uncaged/workflow-protocol";
import {
getCachedSessionId as getCachedSessionIdBase,
setCachedSessionId as setCachedSessionIdBase,
} from "@uncaged/workflow-util-agent";
import type { ThreadId } from "@uncaged/workflow-protocol";
export async function getCachedSessionId(threadId: ThreadId, role: string): Promise<string | null> {
return getCachedSessionIdBase("hermes", threadId, role);