@pikku/kysely 0.12.10 → 0.12.11
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/CHANGELOG.md +13 -4
- package/dist/src/kysely-tables.d.ts +2 -0
- package/dist/src/kysely-workflow-run-service.js +6 -0
- package/dist/src/kysely-workflow-service.d.ts +5 -2
- package/dist/src/kysely-workflow-service.js +7 -1
- package/package.json +2 -2
- package/src/kysely-tables.ts +2 -0
- package/src/kysely-workflow-run-service.ts +6 -0
- package/src/kysely-workflow-service.ts +12 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 0.12.11
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- b9ed73e: Add deterministic workflow planned-step metadata support and SSE init stream payload generation.
|
|
6
|
+
- Persist `deterministic` and `plannedSteps` on workflow runs in core and service adapters.
|
|
7
|
+
- Expose planned-step metadata on workflow run status responses.
|
|
8
|
+
- Emit an initial `type: 'init'` SSE event for deterministic workflow streams before incremental updates.
|
|
9
|
+
- Add CLI tests covering serialized stream route output for init/update/done event behavior.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b9ed73e]
|
|
12
|
+
- @pikku/core@0.12.19
|
|
13
|
+
|
|
1
14
|
## 0.12.0
|
|
2
15
|
|
|
3
16
|
## 0.12.10
|
|
@@ -5,7 +18,6 @@
|
|
|
5
18
|
### Patch Changes
|
|
6
19
|
|
|
7
20
|
- 311c0c4: Unify session persistence through SessionStore, remove session blob from ChannelStore
|
|
8
|
-
|
|
9
21
|
- PikkuSessionService now persists sessions via SessionStore on set()/clear() instead of every function call
|
|
10
22
|
- ChannelStore no longer stores session data — maps channelId to pikkuUserId only
|
|
11
23
|
- ChannelStore API: setUserSession/getChannelAndSession replaced with setPikkuUserId/getChannel
|
|
@@ -19,7 +31,6 @@
|
|
|
19
31
|
### Patch Changes
|
|
20
32
|
|
|
21
33
|
- 624097e: Add deploy pipeline with provider-agnostic architecture
|
|
22
|
-
|
|
23
34
|
- Add MetaService with explicit typed API, absorb WiringService reads
|
|
24
35
|
- Add deployment service, traceId propagation, scoped logger
|
|
25
36
|
- Rewrite analyzer: one function = one worker, gateways dispatch via RPC
|
|
@@ -39,7 +50,6 @@
|
|
|
39
50
|
### Patch Changes
|
|
40
51
|
|
|
41
52
|
- f85c234: Add unified credential system with per-user OAuth and AI agent pre-flight checks
|
|
42
|
-
|
|
43
53
|
- Unified CredentialService with lazy loading per user via pikkuUserId
|
|
44
54
|
- wire.getCredential() for typed single credential lookup
|
|
45
55
|
- MissingCredentialError with structured payload for client-side connect flows
|
|
@@ -144,7 +154,6 @@
|
|
|
144
154
|
- Updated dependencies [62a8725]
|
|
145
155
|
- Updated dependencies [62a8725]
|
|
146
156
|
- Updated dependencies [62a8725]
|
|
147
|
-
|
|
148
157
|
- @pikku/core@0.12.1
|
|
149
158
|
|
|
150
159
|
- Updated dependencies
|
|
@@ -22,6 +22,8 @@ export interface WorkflowRunsTable {
|
|
|
22
22
|
state: Generated<string>;
|
|
23
23
|
inline: Generated<boolean>;
|
|
24
24
|
graphHash: string | null;
|
|
25
|
+
deterministic: Generated<boolean>;
|
|
26
|
+
plannedSteps: string | null;
|
|
25
27
|
wire: string | null;
|
|
26
28
|
createdAt: Generated<Date>;
|
|
27
29
|
updatedAt: Generated<Date>;
|
|
@@ -17,6 +17,8 @@ export class KyselyWorkflowRunService {
|
|
|
17
17
|
'error',
|
|
18
18
|
'inline',
|
|
19
19
|
'graphHash',
|
|
20
|
+
'deterministic',
|
|
21
|
+
'plannedSteps',
|
|
20
22
|
'wire',
|
|
21
23
|
'createdAt',
|
|
22
24
|
'updatedAt',
|
|
@@ -46,6 +48,8 @@ export class KyselyWorkflowRunService {
|
|
|
46
48
|
'error',
|
|
47
49
|
'inline',
|
|
48
50
|
'graphHash',
|
|
51
|
+
'deterministic',
|
|
52
|
+
'plannedSteps',
|
|
49
53
|
'wire',
|
|
50
54
|
'createdAt',
|
|
51
55
|
'updatedAt',
|
|
@@ -204,6 +208,8 @@ export class KyselyWorkflowRunService {
|
|
|
204
208
|
error: parseJson(row.error),
|
|
205
209
|
inline: row.inline,
|
|
206
210
|
graphHash: row.graphHash,
|
|
211
|
+
deterministic: row.deterministic,
|
|
212
|
+
plannedSteps: parseJson(row.plannedSteps),
|
|
207
213
|
wire: parseJson(row.wire) ?? { type: 'unknown' },
|
|
208
214
|
createdAt: new Date(row.createdAt),
|
|
209
215
|
updatedAt: new Date(row.updatedAt),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SerializedError } from '@pikku/core';
|
|
2
|
-
import { PikkuWorkflowService, type WorkflowRun, type WorkflowRunWire, type StepState, type WorkflowStatus, type WorkflowVersionStatus } from '@pikku/core/workflow';
|
|
2
|
+
import { PikkuWorkflowService, type WorkflowPlannedStep, type WorkflowRun, type WorkflowRunWire, type StepState, type WorkflowStatus, type WorkflowVersionStatus } from '@pikku/core/workflow';
|
|
3
3
|
import type { Kysely } from 'kysely';
|
|
4
4
|
import type { KyselyPikkuDB } from './kysely-tables.js';
|
|
5
5
|
export declare class KyselyWorkflowService extends PikkuWorkflowService {
|
|
@@ -8,7 +8,10 @@ export declare class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
8
8
|
private runService;
|
|
9
9
|
constructor(db: Kysely<KyselyPikkuDB>);
|
|
10
10
|
init(): Promise<void>;
|
|
11
|
-
createRun(workflowName: string, input: any, inline: boolean, graphHash: string, wire: WorkflowRunWire
|
|
11
|
+
createRun(workflowName: string, input: any, inline: boolean, graphHash: string, wire: WorkflowRunWire, options?: {
|
|
12
|
+
deterministic?: boolean;
|
|
13
|
+
plannedSteps?: WorkflowPlannedStep[];
|
|
14
|
+
}): Promise<string>;
|
|
12
15
|
getRun(id: string): Promise<WorkflowRun | null>;
|
|
13
16
|
updateRunStatus(id: string, status: WorkflowStatus, output?: any, error?: SerializedError): Promise<void>;
|
|
14
17
|
insertStepState(runId: string, stepName: string, rpcName: string | null, data: any, stepOptions?: {
|
|
@@ -29,6 +29,8 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
29
29
|
.addColumn('state', 'text', (col) => col.defaultTo('{}'))
|
|
30
30
|
.addColumn('inline', 'boolean', (col) => col.defaultTo(false))
|
|
31
31
|
.addColumn('graph_hash', 'text')
|
|
32
|
+
.addColumn('deterministic', 'boolean', (col) => col.defaultTo(false))
|
|
33
|
+
.addColumn('planned_steps', 'text')
|
|
32
34
|
.addColumn('wire', 'text')
|
|
33
35
|
.addColumn('created_at', 'timestamp', (col) => col.defaultTo(sql `CURRENT_TIMESTAMP`).notNull())
|
|
34
36
|
.addColumn('updated_at', 'timestamp', (col) => col.defaultTo(sql `CURRENT_TIMESTAMP`).notNull())
|
|
@@ -95,7 +97,7 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
95
97
|
.execute();
|
|
96
98
|
this.initialized = true;
|
|
97
99
|
}
|
|
98
|
-
async createRun(workflowName, input, inline, graphHash, wire) {
|
|
100
|
+
async createRun(workflowName, input, inline, graphHash, wire, options) {
|
|
99
101
|
const id = crypto.randomUUID();
|
|
100
102
|
await this.db
|
|
101
103
|
.insertInto('workflowRuns')
|
|
@@ -106,6 +108,10 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
106
108
|
input: JSON.stringify(input),
|
|
107
109
|
inline,
|
|
108
110
|
graphHash: graphHash ?? null,
|
|
111
|
+
deterministic: options?.deterministic ?? false,
|
|
112
|
+
plannedSteps: options?.plannedSteps
|
|
113
|
+
? JSON.stringify(options.plannedSteps)
|
|
114
|
+
: null,
|
|
109
115
|
wire: wire ? JSON.stringify(wire) : null,
|
|
110
116
|
})
|
|
111
117
|
.execute();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/kysely",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.11",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"prepublishOnly": "yarn build"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@pikku/core": "^0.12.
|
|
23
|
+
"@pikku/core": "^0.12.19"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"kysely": "^0.28.12"
|
package/src/kysely-tables.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface WorkflowRunsTable {
|
|
|
29
29
|
state: Generated<string>
|
|
30
30
|
inline: Generated<boolean>
|
|
31
31
|
graphHash: string | null
|
|
32
|
+
deterministic: Generated<boolean>
|
|
33
|
+
plannedSteps: string | null
|
|
32
34
|
wire: string | null
|
|
33
35
|
createdAt: Generated<Date>
|
|
34
36
|
updatedAt: Generated<Date>
|
|
@@ -30,6 +30,8 @@ export class KyselyWorkflowRunService implements WorkflowRunService {
|
|
|
30
30
|
'error',
|
|
31
31
|
'inline',
|
|
32
32
|
'graphHash',
|
|
33
|
+
'deterministic',
|
|
34
|
+
'plannedSteps',
|
|
33
35
|
'wire',
|
|
34
36
|
'createdAt',
|
|
35
37
|
'updatedAt',
|
|
@@ -64,6 +66,8 @@ export class KyselyWorkflowRunService implements WorkflowRunService {
|
|
|
64
66
|
'error',
|
|
65
67
|
'inline',
|
|
66
68
|
'graphHash',
|
|
69
|
+
'deterministic',
|
|
70
|
+
'plannedSteps',
|
|
67
71
|
'wire',
|
|
68
72
|
'createdAt',
|
|
69
73
|
'updatedAt',
|
|
@@ -255,6 +259,8 @@ export class KyselyWorkflowRunService implements WorkflowRunService {
|
|
|
255
259
|
error: parseJson(row.error),
|
|
256
260
|
inline: row.inline as boolean | undefined,
|
|
257
261
|
graphHash: row.graphHash as string | undefined,
|
|
262
|
+
deterministic: row.deterministic as boolean | undefined,
|
|
263
|
+
plannedSteps: parseJson(row.plannedSteps),
|
|
258
264
|
wire: parseJson(row.wire) ?? { type: 'unknown' },
|
|
259
265
|
createdAt: new Date(row.createdAt as string),
|
|
260
266
|
updatedAt: new Date(row.updatedAt as string),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SerializedError } from '@pikku/core'
|
|
2
2
|
import {
|
|
3
3
|
PikkuWorkflowService,
|
|
4
|
+
type WorkflowPlannedStep,
|
|
4
5
|
type WorkflowRun,
|
|
5
6
|
type WorkflowRunWire,
|
|
6
7
|
type StepState,
|
|
@@ -43,6 +44,8 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
43
44
|
.addColumn('state', 'text', (col) => col.defaultTo('{}'))
|
|
44
45
|
.addColumn('inline', 'boolean', (col) => col.defaultTo(false))
|
|
45
46
|
.addColumn('graph_hash', 'text')
|
|
47
|
+
.addColumn('deterministic', 'boolean', (col) => col.defaultTo(false))
|
|
48
|
+
.addColumn('planned_steps', 'text')
|
|
46
49
|
.addColumn('wire', 'text')
|
|
47
50
|
.addColumn('created_at', 'timestamp', (col) =>
|
|
48
51
|
col.defaultTo(sql`CURRENT_TIMESTAMP`).notNull()
|
|
@@ -139,7 +142,11 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
139
142
|
input: any,
|
|
140
143
|
inline: boolean,
|
|
141
144
|
graphHash: string,
|
|
142
|
-
wire: WorkflowRunWire
|
|
145
|
+
wire: WorkflowRunWire,
|
|
146
|
+
options?: {
|
|
147
|
+
deterministic?: boolean
|
|
148
|
+
plannedSteps?: WorkflowPlannedStep[]
|
|
149
|
+
}
|
|
143
150
|
): Promise<string> {
|
|
144
151
|
const id = crypto.randomUUID()
|
|
145
152
|
await this.db
|
|
@@ -151,6 +158,10 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
151
158
|
input: JSON.stringify(input),
|
|
152
159
|
inline,
|
|
153
160
|
graphHash: graphHash ?? null,
|
|
161
|
+
deterministic: options?.deterministic ?? false,
|
|
162
|
+
plannedSteps: options?.plannedSteps
|
|
163
|
+
? JSON.stringify(options.plannedSteps)
|
|
164
|
+
: null,
|
|
154
165
|
wire: wire ? JSON.stringify(wire) : null,
|
|
155
166
|
})
|
|
156
167
|
.execute()
|