@hasna/loops 0.3.4 → 0.3.6
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 +43 -0
- package/dist/cli/index.js +1055 -23
- package/dist/daemon/index.js +975 -20
- package/dist/index.d.ts +3 -0
- package/dist/index.js +986 -19
- 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 +982 -19
- package/dist/types.d.ts +10 -0
- package/package.json +5 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { GoalSpec } from "./lib/goal/types.js";
|
|
2
|
+
export type { Goal, GoalAutoExecute, GoalExecutorResult, GoalPlan, GoalPlanNode, GoalPlanNodeStatus, GoalPlanStatus, GoalRollup, GoalRun, GoalSpec, GoalStatus, } from "./lib/goal/types.js";
|
|
1
3
|
export type LoopStatus = "active" | "paused" | "stopped" | "expired";
|
|
2
4
|
export type RunStatus = "running" | "succeeded" | "failed" | "timed_out" | "abandoned" | "skipped";
|
|
3
5
|
export type CatchUpPolicy = "none" | "latest" | "all";
|
|
@@ -79,6 +81,7 @@ export interface WorkflowStep {
|
|
|
79
81
|
name?: string;
|
|
80
82
|
description?: string;
|
|
81
83
|
target: ExecutableTarget;
|
|
84
|
+
goal?: GoalSpec;
|
|
82
85
|
dependsOn?: string[];
|
|
83
86
|
continueOnFailure?: boolean;
|
|
84
87
|
timeoutMs?: number;
|
|
@@ -90,6 +93,7 @@ export interface WorkflowSpec {
|
|
|
90
93
|
description?: string;
|
|
91
94
|
version: number;
|
|
92
95
|
status: WorkflowStatus;
|
|
96
|
+
goal?: GoalSpec;
|
|
93
97
|
steps: WorkflowStep[];
|
|
94
98
|
createdAt: string;
|
|
95
99
|
updatedAt: string;
|
|
@@ -97,6 +101,7 @@ export interface WorkflowSpec {
|
|
|
97
101
|
export interface CreateWorkflowInput {
|
|
98
102
|
name: string;
|
|
99
103
|
description?: string;
|
|
104
|
+
goal?: GoalSpec;
|
|
100
105
|
steps: WorkflowStep[];
|
|
101
106
|
version?: number;
|
|
102
107
|
}
|
|
@@ -108,6 +113,7 @@ export interface WorkflowRun {
|
|
|
108
113
|
loopRunId?: string;
|
|
109
114
|
scheduledFor?: string;
|
|
110
115
|
idempotencyKey?: string;
|
|
116
|
+
goalRunId?: string;
|
|
111
117
|
status: WorkflowRunStatus;
|
|
112
118
|
startedAt?: string;
|
|
113
119
|
finishedAt?: string;
|
|
@@ -132,6 +138,7 @@ export interface WorkflowStepRun {
|
|
|
132
138
|
error?: string;
|
|
133
139
|
accountProfile?: string;
|
|
134
140
|
accountTool?: string;
|
|
141
|
+
goalRunId?: string;
|
|
135
142
|
createdAt: string;
|
|
136
143
|
updatedAt: string;
|
|
137
144
|
}
|
|
@@ -151,6 +158,7 @@ export interface Loop {
|
|
|
151
158
|
status: LoopStatus;
|
|
152
159
|
schedule: ScheduleSpec;
|
|
153
160
|
target: LoopTarget;
|
|
161
|
+
goal?: GoalSpec;
|
|
154
162
|
machine?: LoopMachineRef;
|
|
155
163
|
nextRunAt?: string;
|
|
156
164
|
retryScheduledFor?: string;
|
|
@@ -181,6 +189,7 @@ export interface LoopRun {
|
|
|
181
189
|
stdout?: string;
|
|
182
190
|
stderr?: string;
|
|
183
191
|
error?: string;
|
|
192
|
+
goalRunId?: string;
|
|
184
193
|
createdAt: string;
|
|
185
194
|
updatedAt: string;
|
|
186
195
|
}
|
|
@@ -189,6 +198,7 @@ export interface CreateLoopInput {
|
|
|
189
198
|
description?: string;
|
|
190
199
|
schedule: ScheduleSpec;
|
|
191
200
|
target: LoopTarget;
|
|
201
|
+
goal?: GoalSpec;
|
|
192
202
|
machine?: LoopMachineRef;
|
|
193
203
|
catchUp?: CatchUpPolicy;
|
|
194
204
|
catchUpLimit?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/loops",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,7 +65,10 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@hasna/machines": "0.0.49",
|
|
68
|
-
"
|
|
68
|
+
"@openrouter/ai-sdk-provider": "2.9.1",
|
|
69
|
+
"ai": "6.0.204",
|
|
70
|
+
"commander": "^13.1.0",
|
|
71
|
+
"zod": "4.4.3"
|
|
69
72
|
},
|
|
70
73
|
"devDependencies": {
|
|
71
74
|
"@types/bun": "latest",
|