@hasna/loops 0.3.5 → 0.3.7
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 +60 -0
- package/dist/cli/index.js +1054 -22
- package/dist/daemon/index.js +974 -19
- package/dist/index.d.ts +3 -0
- package/dist/index.js +985 -18
- package/dist/lib/executor.d.ts +3 -0
- package/dist/lib/format.d.ts +3 -1
- package/dist/lib/goal/model-factory.d.ts +9 -0
- package/dist/lib/goal/prompts.d.ts +4 -0
- package/dist/lib/goal/runner.d.ts +3 -0
- package/dist/lib/goal/status.d.ts +9 -0
- package/dist/lib/goal/types.d.ts +120 -0
- package/dist/lib/store.d.ts +58 -1
- package/dist/lib/store.js +544 -5
- package/dist/lib/workflow-spec.d.ts +2 -1
- package/dist/sdk/index.d.ts +6 -1
- package/dist/sdk/index.js +981 -18
- package/dist/types.d.ts +10 -0
- package/docs/TRANSCRIPT_LOOP_PATTERNS.md +95 -0
- package/docs/USAGE.md +17 -0
- package/docs/workflows/transcript-feedback-to-loops.json +80 -0
- package/package.json +5 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { CreateWorkflowInput, WorkflowSpec, WorkflowStep } from "../types.js";
|
|
1
|
+
import type { CreateWorkflowInput, GoalSpec, WorkflowSpec, WorkflowStep } from "../types.js";
|
|
2
2
|
export type WorkflowSpecBody = Pick<WorkflowSpec, "name" | "description" | "version" | "steps">;
|
|
3
|
+
export declare function normalizeGoalSpec(value: unknown, label?: string): GoalSpec | undefined;
|
|
3
4
|
export declare function normalizeCreateWorkflowInput(input: CreateWorkflowInput): CreateWorkflowInput;
|
|
4
5
|
export declare function workflowExecutionOrder(workflow: Pick<WorkflowSpec, "steps">): WorkflowStep[];
|
|
5
6
|
export declare function workflowBodyFromJson(value: unknown, fallbackName?: string): CreateWorkflowInput;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { CreateLoopInput, Loop, LoopRun } from "../types.js";
|
|
1
|
+
import type { CreateLoopInput, Goal, GoalRun, Loop, LoopRun } from "../types.js";
|
|
2
2
|
import { tick } from "../lib/scheduler.js";
|
|
3
3
|
import { Store } from "../lib/store.js";
|
|
4
|
+
export { runGoal } from "../lib/goal/runner.js";
|
|
4
5
|
export interface LoopsClientOptions {
|
|
5
6
|
store?: Store;
|
|
6
7
|
runnerId?: string;
|
|
@@ -18,6 +19,10 @@ export declare class LoopsClient {
|
|
|
18
19
|
stop(idOrName: string): Loop;
|
|
19
20
|
delete(idOrName: string): boolean;
|
|
20
21
|
runs(loopId?: string): LoopRun[];
|
|
22
|
+
goal(idOrName: string): {
|
|
23
|
+
goal?: Goal;
|
|
24
|
+
runs: GoalRun[];
|
|
25
|
+
};
|
|
21
26
|
tick(): Promise<Awaited<ReturnType<typeof tick>>>;
|
|
22
27
|
runNow(idOrName: string): Promise<LoopRun>;
|
|
23
28
|
close(): void;
|