@pikku/kysely-sqlite 0.12.11 → 0.12.13

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 CHANGED
@@ -1,5 +1,180 @@
1
1
  # @pikku/kysely-sqlite
2
2
 
3
+ ## 0.12.13
4
+
5
+ ### Patch Changes
6
+
7
+ - 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
8
+
9
+ `@pikku/core` published every module twice. `ecosystem/http` re-exported
10
+ `./http`, `ecosystem/services` re-exported `./services`, and a name was
11
+ reachable through either — so every addition had to be made in two places, and a
12
+ consumer's import said nothing about what it actually used. The package root was
13
+ the same problem at a larger scale: a single barrel of 206 names that no bundler
14
+ could take apart, and the one specifier that revealed nothing at all.
15
+
16
+ Both are deleted. Every name now lives on the subpath that owns it, and every
17
+ import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
18
+ `@pikku/core/errors`, `@pikku/core/types`.
19
+
20
+ Deleting the facades meant the raw subpaths had to become a superset of them,
21
+ which they were not: the facade tree had accumulated 25 names with no raw home
22
+ and about 26 more filed under a different area than the module they came from.
23
+ Those names moved to the area that owns them, and three areas were published as
24
+ new entry points rather than left on a root that is going away — `./types` (the
25
+ shared type surface, the largest single destination), `./state` and
26
+ `./classification`.
27
+
28
+ `./classification` is one door onto one subject: what a value is and how it must
29
+ be handled. Its three halves would each have been an entry point — the brands
30
+ and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
31
+ friends), and `SecretValue` — split by whether a name happens to be a type or a
32
+ value, which is the same defect as the facades. The duration and versioned-id
33
+ helpers went to `./utils`, which already published, and `PikkuRequest` went to
34
+ `./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
35
+ has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
36
+ `PikkuRequest` is Azure's timer request.
37
+
38
+ `./types` inherited the root barrel's habit before it inherited its contents, so
39
+ the names with an owner elsewhere were moved off it. The middleware types and the
40
+ five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
41
+ `pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
42
+ `pikkuAgentMiddleware`, runtime values on a types entry point — are now
43
+ `@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
44
+ `SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
45
+ (`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
46
+ `JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
47
+ is the vocabulary the wirings share, which no single module owns.
48
+
49
+ `pikku` was itself a root barrel — `export * from '@pikku/core'` — and
50
+ now exports only the services it bundles.
51
+
52
+ One module survives at the old specifier, and only for the bootstrap:
53
+ `packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
54
+ that CLI still writes a bare `@pikku/core` into the files it generates for the
55
+ CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
56
+ in core fails if that list grows, and it goes when the pin moves to a CLI
57
+ released from this branch. The adapter names the pinned CLI reaches for —
58
+ `pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
59
+ `@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
60
+ needed for them.
61
+
62
+ A guard test keeps the root shut: it parses imports and rejects a bare
63
+ `@pikku/core` rather than grepping for it, because several tests hold a user's
64
+ file as a template literal, where `import … from '@pikku/core'` is fixture text
65
+ rather than an import this repo makes.
66
+
67
+ An agent scaffold a project generated under an older CLI is refreshed rather
68
+ than left to fail: `pikku all` already deleted one importing an entry point
69
+ `@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
70
+ Without it a project that scaffolds the agent endpoint but
71
+ declares no agents keeps the old file forever — the generator that would rewrite
72
+ it only runs when agents exist, and the file being present is what stops it
73
+ being regenerated as missing.
74
+
75
+ `pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
76
+ An addon's `imports` map points into `dist`, so `paths` is what resolves
77
+ `#pikku/<leaf>` for the addon's own source build — it now names the two leaf
78
+ patterns, in both the addon and its test harness.
79
+
80
+ - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
81
+ - Updated dependencies [7722ceb]
82
+ - Updated dependencies [375c1ff]
83
+ - Updated dependencies [02a70cd]
84
+ - Updated dependencies [aeef159]
85
+ - Updated dependencies [a281de6]
86
+ - Updated dependencies [266e3bc]
87
+ - Updated dependencies [02a70cd]
88
+ - Updated dependencies [786dae5]
89
+ - Updated dependencies [6eef0a0]
90
+ - Updated dependencies [3561d67]
91
+ - Updated dependencies [a91c433]
92
+ - Updated dependencies [02a70cd]
93
+ - Updated dependencies [9537f74]
94
+ - Updated dependencies [2b57ca8]
95
+ - Updated dependencies [266e3bc]
96
+ - Updated dependencies [9fce0f1]
97
+ - Updated dependencies [83683a0]
98
+ - Updated dependencies [456c88b]
99
+ - Updated dependencies [456c88b]
100
+ - Updated dependencies [c127273]
101
+ - @pikku/core@0.12.85
102
+ - @pikku/kysely@0.13.17
103
+
104
+ ## 0.12.12
105
+
106
+ ### Patch Changes
107
+
108
+ - 7406bfe: Rename the agent runtime from `AI*` to `Agent*` (#596)
109
+
110
+ `AI` described the model provider, not the thing being named. Every symbol that
111
+ belongs to the agent runtime now says `Agent`; the symbols that genuinely wrap a
112
+ model provider — `AIEmbeddingService`, `AIProviderOptions`, `AIEmbedParams`,
113
+ `AITranscriptionParams`, `AIGenerateImageParams` and their siblings, and the
114
+ `@pikku/ai-vercel` / `@pikku/ai-deepinfra` / `@pikku/ai-voice` packages — keep
115
+ their names.
116
+
117
+ **Wiring**
118
+ - `pikkuAIAgent` → `pikkuAgent`, `pikkuAIScorer` → `pikkuAgentScorer`,
119
+ `pikkuAIJudge` → `pikkuAgentJudge`
120
+ - `CoreAIAgent` → `CoreAgent`, `AIAgentInput` → `AgentInput`, `AIAgentStep` →
121
+ `AgentStep`, `AIMessage` → `AgentMessage`, and the rest of the agent types
122
+ - `AIAgentRunnerService` → `AgentRunnerService`, `AIStorageService` →
123
+ `AgentStorageService`, `AIRunStateService` → `AgentRunStateService`
124
+
125
+ **Entry points**
126
+
127
+ `@pikku/core/agent` → `@pikku/core/agent`, `@pikku/core/agent-scorer` →
128
+ `@pikku/core/agent-scorer`.
129
+
130
+ **Queues**
131
+
132
+ The scorer queues are now `agent-score-fast` and `agent-score-slow`. Drain the
133
+ old `ai-score-fast` / `ai-score-slow` queues before deploying — jobs still
134
+ sitting on them when the new workers start will never be picked up.
135
+
136
+ **Scaffolds**
137
+
138
+ The agent scaffold pikku wrote for your project — `<scaffold>/agent/agent.gen.ts`
139
+ and its schemas file — imports `@pikku/core/ai-agent`, which no longer exists. A
140
+ scaffold is normally written once and then left alone, so `pikku all` would find
141
+ it present and leave the broken import in place. It now deletes an agent scaffold
142
+ importing either removed entry point and regenerates it in the same run. Anything
143
+ you added to that file goes with it, so move local edits out first.
144
+
145
+ **Database**
146
+
147
+ The agent tables are renamed: `ai_threads`, `ai_message`, `ai_tool_call`,
148
+ `ai_working_memory`, `ai_run` and `ai_run_score` become `agent_threads`,
149
+ `agent_message`, `agent_tool_call`, `agent_working_memory`, `agent_run` and
150
+ `agent_run_score`, along with their indexes and the `ai_working_memory_pk`
151
+ constraint. The same rename applies to the MongoDB collections.
152
+
153
+ `ensurePikkuSchema` creates tables it cannot find, so an existing database will
154
+ get empty `agent_*` tables and leave the old data stranded in `ai_*`. Rename
155
+ them before the first boot on the new version:
156
+
157
+ ```sql
158
+ ALTER TABLE ai_threads RENAME TO agent_threads;
159
+ ALTER TABLE ai_message RENAME TO agent_message;
160
+ ALTER TABLE ai_tool_call RENAME TO agent_tool_call;
161
+ ALTER TABLE ai_working_memory RENAME TO agent_working_memory;
162
+ ALTER TABLE ai_run RENAME TO agent_run;
163
+ ALTER TABLE ai_run_score RENAME TO agent_run_score;
164
+ ```
165
+
166
+ - 6794681: Publish the ecosystem surface as per-area sub-barrels under `@pikku/core/ecosystem/*`, and point generated code, the CLI, the inspector and the runtime adapters at them.
167
+
168
+ 348 names that only generated code, the toolchain or a runtime adapter ever imports now have a second home on `@pikku/core/ecosystem/<area>` — one sub-barrel per area, matching how core already publishes its entrypoints, so no single barrel grows without bound and a consumer only pulls in the area it uses.
169
+
170
+ This step is additive: every name is still exported from the entrypoint it was published from before, so nothing downstream breaks. Removing them from the app-facing barrels is a later change, and needs a release carrying `./ecosystem/*` first.
171
+
172
+ - Updated dependencies [7406bfe]
173
+ - Updated dependencies [6794681]
174
+ - Updated dependencies [a7fcd2e]
175
+ - @pikku/core@0.12.84
176
+ - @pikku/kysely@0.13.16
177
+
3
178
  ## 0.12.11
4
179
 
5
180
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  export { createSQLiteKysely } from './create-sqlite-kysely.js';
2
2
  export { SQLiteKyselyWorkflowService } from './sqlite-kysely-workflow-service.js';
3
3
  export { SQLiteKyselyDeploymentService } from './sqlite-kysely-deployment-service.js';
4
- export { SQLiteKyselyAIStorageService } from './sqlite-kysely-ai-storage-service.js';
4
+ export { SQLiteKyselyAgentStorageService } from './sqlite-kysely-agent-storage-service.js';
5
5
  export { SQLiteKyselyAgentRunService } from './sqlite-kysely-agent-run-service.js';
6
6
  export { SQLiteKyselyWorkflowRunService } from './sqlite-kysely-workflow-run-service.js';
7
7
  export { SQLiteKyselyChannelStore } from './sqlite-kysely-channel-store.js';
@@ -11,4 +11,4 @@ export { SqliteFunctionsUnsupportedError, type SqliteFunctionMap, } from './sqli
11
11
  export { LibsqlWebDialect } from './libsql-web-dialect.js';
12
12
  export type { KyselyPikkuDB } from '@pikku/kysely';
13
13
  export type { WorkflowRunService } from '@pikku/core/workflow';
14
- export type { AgentRunService, AgentRunRow } from '@pikku/core/ai-agent';
14
+ export type { AgentRunService, AgentRunRow } from '@pikku/core/agent';
package/dist/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { createSQLiteKysely } from './create-sqlite-kysely.js';
2
2
  export { SQLiteKyselyWorkflowService } from './sqlite-kysely-workflow-service.js';
3
3
  export { SQLiteKyselyDeploymentService } from './sqlite-kysely-deployment-service.js';
4
- export { SQLiteKyselyAIStorageService } from './sqlite-kysely-ai-storage-service.js';
4
+ export { SQLiteKyselyAgentStorageService } from './sqlite-kysely-agent-storage-service.js';
5
5
  export { SQLiteKyselyAgentRunService } from './sqlite-kysely-agent-run-service.js';
6
6
  export { SQLiteKyselyWorkflowRunService } from './sqlite-kysely-workflow-run-service.js';
7
7
  export { SQLiteKyselyChannelStore } from './sqlite-kysely-channel-store.js';
@@ -0,0 +1,3 @@
1
+ import { KyselyAgentStorageService } from '@pikku/kysely';
2
+ export declare class SQLiteKyselyAgentStorageService extends KyselyAgentStorageService {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { KyselyAgentStorageService } from '@pikku/kysely';
2
+ export class SQLiteKyselyAgentStorageService extends KyselyAgentStorageService {
3
+ }
@@ -1 +1 @@
1
- {"root":["../src/create-sqlite-kysely.ts","../src/index.ts","../src/libsql-web-dialect.ts","../src/sqlite-functions.ts","../src/sqlite-kysely-agent-run-service.ts","../src/sqlite-kysely-ai-storage-service.ts","../src/sqlite-kysely-channel-store.ts","../src/sqlite-kysely-deployment-service.ts","../src/sqlite-kysely-eventhub-store.ts","../src/sqlite-kysely-secret-service.ts","../src/sqlite-kysely-workflow-run-service.ts","../src/sqlite-kysely-workflow-service.ts"],"version":"6.0.3"}
1
+ {"root":["../src/create-sqlite-kysely.ts","../src/index.ts","../src/libsql-web-dialect.ts","../src/sqlite-functions.ts","../src/sqlite-kysely-agent-run-service.ts","../src/sqlite-kysely-agent-storage-service.ts","../src/sqlite-kysely-channel-store.ts","../src/sqlite-kysely-deployment-service.ts","../src/sqlite-kysely-eventhub-store.ts","../src/sqlite-kysely-secret-service.ts","../src/sqlite-kysely-workflow-run-service.ts","../src/sqlite-kysely-workflow-service.ts"],"version":"6.0.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/kysely-sqlite",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
4
4
  "description": "SQLite dialect services and libSQL web dialect for Pikku, backed by Kysely",
5
5
  "author": "yasser.fadl@gmail.com",
6
6
  "license": "MIT",
@@ -17,17 +17,17 @@
17
17
  "prepublishOnly": "yarn build"
18
18
  },
19
19
  "dependencies": {
20
- "@pikku/kysely": "^0.13.15",
21
- "kysely": "^0.29.0"
20
+ "@pikku/kysely": "^0.13.17",
21
+ "kysely": "^0.29.5"
22
22
  },
23
23
  "peerDependencies": {
24
- "@pikku/core": "^0.12.82"
24
+ "@pikku/core": "^0.12.85"
25
25
  },
26
26
  "devDependencies": {
27
- "@pikku/core": "^0.12.82",
27
+ "@pikku/core": "^0.12.85",
28
28
  "typescript": "^6.0.3"
29
29
  },
30
30
  "exports": {
31
31
  ".": "./dist/src/index.js"
32
32
  }
33
- }
33
+ }
package/run-tests.sh CHANGED
File without changes
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { createSQLiteKysely } from './create-sqlite-kysely.js'
2
2
  export { SQLiteKyselyWorkflowService } from './sqlite-kysely-workflow-service.js'
3
3
  export { SQLiteKyselyDeploymentService } from './sqlite-kysely-deployment-service.js'
4
- export { SQLiteKyselyAIStorageService } from './sqlite-kysely-ai-storage-service.js'
4
+ export { SQLiteKyselyAgentStorageService } from './sqlite-kysely-agent-storage-service.js'
5
5
  export { SQLiteKyselyAgentRunService } from './sqlite-kysely-agent-run-service.js'
6
6
  export { SQLiteKyselyWorkflowRunService } from './sqlite-kysely-workflow-run-service.js'
7
7
  export { SQLiteKyselyChannelStore } from './sqlite-kysely-channel-store.js'
@@ -15,4 +15,4 @@ export { LibsqlWebDialect } from './libsql-web-dialect.js'
15
15
 
16
16
  export type { KyselyPikkuDB } from '@pikku/kysely'
17
17
  export type { WorkflowRunService } from '@pikku/core/workflow'
18
- export type { AgentRunService, AgentRunRow } from '@pikku/core/ai-agent'
18
+ export type { AgentRunService, AgentRunRow } from '@pikku/core/agent'
@@ -75,8 +75,7 @@ interface PipelineResponse {
75
75
  | {
76
76
  type: 'ok'
77
77
  response:
78
- | { type: 'execute'; result: HranaStmtResult }
79
- | { type: 'close' }
78
+ { type: 'execute'; result: HranaStmtResult } | { type: 'close' }
80
79
  }
81
80
  | { type: 'error'; error: { message: string; code?: string } }
82
81
  >
@@ -0,0 +1,3 @@
1
+ import { KyselyAgentStorageService } from '@pikku/kysely'
2
+
3
+ export class SQLiteKyselyAgentStorageService extends KyselyAgentStorageService {}
@@ -1,3 +0,0 @@
1
- import { KyselyAIStorageService } from '@pikku/kysely';
2
- export declare class SQLiteKyselyAIStorageService extends KyselyAIStorageService {
3
- }
@@ -1,3 +0,0 @@
1
- import { KyselyAIStorageService } from '@pikku/kysely';
2
- export class SQLiteKyselyAIStorageService extends KyselyAIStorageService {
3
- }
@@ -1,3 +0,0 @@
1
- import { KyselyAIStorageService } from '@pikku/kysely'
2
-
3
- export class SQLiteKyselyAIStorageService extends KyselyAIStorageService {}