chore: replace hand-written xxhashjs.d.ts with @types/xxhashjs

小橘 <xiaoju@shazhou.work>
This commit is contained in:
2026-05-06 06:21:46 +00:00
parent dfbba0f58c
commit 47e8fdf5b3
22 changed files with 895 additions and 79 deletions
+31
View File
@@ -0,0 +1,31 @@
import { createRoleModerator, END, type Role } from "@uncaged/workflow";
type Roles = {
greeter: { greeting: string };
};
export const descriptor = {
description: "A simple hello world workflow",
roles: {
greeter: {
description: "Generates a greeting",
schema: {
type: "object",
properties: { greeting: { type: "string" } },
required: ["greeting"],
},
},
},
};
const greeter: Role<Roles["greeter"]> = async (ctx) => ({
content: "Hello, " + ctx.start.content,
meta: { greeting: "Hello!" },
});
export default createRoleModerator<Roles>({
roles: { greeter },
moderator(ctx) {
return ctx.steps.length === 0 ? "greeter" : END;
},
});
+8
View File
@@ -0,0 +1,8 @@
{
"name": "@uncaged/workflow-examples",
"private": true,
"type": "module",
"dependencies": {
"@uncaged/workflow": "workspace:*"
}
}