@engenty/wizards-runtime 0.16.1 → 0.16.2
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/apps/runtime/dist/assistant/knows.js +3 -1
- package/apps/runtime/dist/db/control-schema.js +7 -0
- package/apps/runtime/dist/db/migrations/control/0014_run_index_generation.sql +1 -0
- package/apps/runtime/dist/db/migrations/control/0015_run_index_wake.sql +3 -0
- package/apps/runtime/dist/db/migrations/control/meta/0014_snapshot.json +629 -0
- package/apps/runtime/dist/db/migrations/control/meta/0015_snapshot.json +650 -0
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +14 -0
- package/apps/runtime/dist/db/migrations/tenant/0056_run_claim_rev.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0057_run_wake_at.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0056_snapshot.json +6520 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0057_snapshot.json +6527 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +14 -0
- package/apps/runtime/dist/db/schema.js +17 -3
- package/apps/runtime/dist/elements/knowledge.js +1 -0
- package/apps/runtime/dist/engine/runner.js +344 -52
- package/apps/runtime/dist/env.js +18 -0
- package/apps/runtime/dist/mounts/mounts.js +3 -0
- package/apps/runtime/dist/plugins/runs.js +3 -0
- package/apps/runtime/dist/prompts/mcp.md +3 -0
- package/apps/runtime/dist/routes/runs.js +17 -14
- package/apps/runtime/dist/services/api.js +1 -1
- package/apps/runtime/dist/services/knowledge.js +2 -1
- package/apps/runtime/dist/services/manage-reports.js +2 -0
- package/apps/runtime/dist/services/query-vectors.js +60 -0
- package/apps/runtime/dist/services/relevance.js +12 -0
- package/apps/runtime/dist/services/runs.js +16 -2
- package/apps/runtime/dist/services/space-index.js +22 -6
- package/apps/runtime/dist/sharing/index.js +3 -0
- package/apps/runtime/dist/tenants/control.js +46 -14
- package/apps/web/dist/assets/{AboutDialog-C9SnsGno.js → AboutDialog-BCcD8hKm.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-CUYFH_CU.js → BlockEditor-DgaUm2pR.js} +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-DuJJV1ll.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-B28TK333.js → ChangelogDialog-B08elwyr.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-D-Y16fdk.js → CodeEditor-BiyOk_SC.js} +1 -1
- package/apps/web/dist/assets/EditorPage-EMFTHEYD.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-DXnk7m9P.js → FlowPreview-DF_6TvZ0.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-Dkd0FBIH.js → LangSwitch-Ba4OWLzJ.js} +1 -1
- package/apps/web/dist/assets/Marketplace-DqziLf66.js +2 -0
- package/apps/web/dist/assets/{NewWizardChannels-B12l2_Jh.js → NewWizardChannels-CsIGp0nZ.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-CzQAkKMy.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-B9gr2OX5.js +1 -0
- package/apps/web/dist/assets/PreviewPane-DSOV3o-1.js +7 -0
- package/apps/web/dist/assets/PublicRunner-BVs8-Vu3.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-DwewuYi8.js → ReadOnly--4CIJCDD.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-z2u8lSe2.js +2 -0
- package/apps/web/dist/assets/SetupPage-9Zk-KUGA.js +1 -0
- package/apps/web/dist/assets/{SharePage-CZClatA_.js → SharePage-D_Ab0gjr.js} +1 -1
- package/apps/web/dist/assets/SkillEditor-DvtameHg.js +1 -0
- package/apps/web/dist/assets/{Skills-Bv6XbKxc.js → Skills-Cf1Kl4Fy.js} +6 -6
- package/apps/web/dist/assets/SpacePage-CyqVzX9b.js +2 -0
- package/apps/web/dist/assets/{UpdateCheck-CLPUsKVT.js → UpdateCheck-DweZBVP6.js} +2 -2
- package/apps/web/dist/assets/changelog-C85v9OWg.js +1 -0
- package/apps/web/dist/assets/{code-editor-Ca5EAxmd.js → code-editor-B1RbFTAZ.js} +2 -2
- package/apps/web/dist/assets/connection-sign-in-CaVvh5GQ.js +1 -0
- package/apps/web/dist/assets/{host-CJdLkzfY.js → host-CKS5U5Vg.js} +18 -18
- package/apps/web/dist/assets/i18n-Bymk5Ev-.js +55 -0
- package/apps/web/dist/assets/{index-CmonJZHC.js → index-Ckcn5vy7.js} +4 -4
- package/apps/web/dist/assets/{read-aloud-Bfp9_bUY.js → read-aloud-Bq88XUHC.js} +1 -1
- package/apps/web/dist/assets/{runners-CUpBpSji.js → runners-DvYVe9Dt.js} +1 -1
- package/apps/web/dist/assets/session-D2bjiA3P.js +2 -0
- package/apps/web/dist/assets/theme-CNJIC2be.js +12 -0
- package/apps/web/dist/assets/ui-Mplfhz_Z.js +16 -0
- package/apps/web/dist/assets/{useMutation-1fV4Nnxq.js → useMutation-8QRM-z4M.js} +1 -1
- package/apps/web/dist/assets/{viewers-ChriFcRy.js → viewers-CEocUV_2.js} +2 -2
- package/apps/web/dist/index.html +11 -11
- package/apps/web/dist/mcp/flow.html +65 -65
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +8 -2
- package/node_modules/@engenty/wizards/dist/plugin/thread.js +30 -0
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +168 -0
- package/node_modules/@engenty/wizards-shared/dist/definition.js +52 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +6 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +6 -0
- package/node_modules/@engenty/wizards-shared/dist/fit.d.ts +2 -0
- package/node_modules/@engenty/wizards-shared/dist/fit.js +4 -0
- package/node_modules/@engenty/wizards-shared/dist/knowledge.d.ts +5 -0
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +8 -1
- package/node_modules/@engenty/wizards-shared/dist/run.js +8 -0
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.d.ts +7 -1
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.js +6 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-DvSSybt0.js +0 -2
- package/apps/web/dist/assets/EditorPage-Duu8swX6.js +0 -3
- package/apps/web/dist/assets/Marketplace-Cty40VwG.js +0 -2
- package/apps/web/dist/assets/NewWizardPage-B10K8vND.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-D3SEpTmt.js +0 -1
- package/apps/web/dist/assets/PreviewPane-DhhQ06Ic.js +0 -7
- package/apps/web/dist/assets/PublicRunner-B8ncIxIP.js +0 -1
- package/apps/web/dist/assets/SettingsPage-C-gGIJLJ.js +0 -2
- package/apps/web/dist/assets/SetupPage-CdsrHW-w.js +0 -1
- package/apps/web/dist/assets/SkillEditor-BaEiqqXl.js +0 -1
- package/apps/web/dist/assets/SpacePage-CYhxcjj0.js +0 -2
- package/apps/web/dist/assets/changelog-y5oxYzPd.js +0 -1
- package/apps/web/dist/assets/connection-sign-in-DECedzrs.js +0 -1
- package/apps/web/dist/assets/i18n-BBzMbGoo.js +0 -55
- package/apps/web/dist/assets/session-CMQo8P-G.js +0 -2
- package/apps/web/dist/assets/theme-D6KUBJnh.js +0 -11
- package/apps/web/dist/assets/ui-BCfu5sia.js +0 -16
|
@@ -393,6 +393,20 @@
|
|
|
393
393
|
"when": 1793556126014,
|
|
394
394
|
"tag": "0055_dateien_doc_reread",
|
|
395
395
|
"breakpoints": true
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"idx": 56,
|
|
399
|
+
"version": "6",
|
|
400
|
+
"when": 1793866357900,
|
|
401
|
+
"tag": "0056_run_claim_rev",
|
|
402
|
+
"breakpoints": true
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"idx": 57,
|
|
406
|
+
"version": "6",
|
|
407
|
+
"when": 1793874431733,
|
|
408
|
+
"tag": "0057_run_wake_at",
|
|
409
|
+
"breakpoints": true
|
|
396
410
|
}
|
|
397
411
|
]
|
|
398
412
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { CONNECTION_AUDIENCES, CONNECTION_SIGN_INS, } from "@engenty/wizards-shared/connectors";
|
|
2
|
+
import { upgradeDefinition } from "@engenty/wizards-shared/definition";
|
|
2
3
|
import { RWX_FLAGS, RWX_RESOURCE_KINDS, RWX_SUBJECT_KINDS } from "@engenty/wizards-shared/rwx";
|
|
3
4
|
import { SKILL_MODES, SKILL_SOURCES, } from "@engenty/wizards-shared/skills";
|
|
4
5
|
import { sql } from "drizzle-orm";
|
|
5
|
-
import { blob, index, integer, primaryKey, real, sqliteTable, text, uniqueIndex, } from "drizzle-orm/sqlite-core";
|
|
6
|
+
import { blob, customType, index, integer, primaryKey, real, sqliteTable, text, uniqueIndex, } from "drizzle-orm/sqlite-core";
|
|
6
7
|
const now = sql `(unixepoch() * 1000)`;
|
|
7
8
|
const createdAt = () => integer("created_at", { mode: "timestamp_ms" }).notNull().default(now);
|
|
8
9
|
const updatedAt = () => integer("updated_at", { mode: "timestamp_ms" }).notNull().default(now);
|
|
10
|
+
/** JSON text that reads as the definition of this version, whichever version was written. */
|
|
11
|
+
const runDefinition = customType({
|
|
12
|
+
dataType: () => "text",
|
|
13
|
+
toDriver: (def) => JSON.stringify(def),
|
|
14
|
+
fromDriver: (json) => upgradeDefinition(JSON.parse(json)),
|
|
15
|
+
});
|
|
9
16
|
export const space = sqliteTable("space", {
|
|
10
17
|
id: text("id").primaryKey(),
|
|
11
18
|
tenantId: text("tenant_id").notNull(),
|
|
@@ -167,7 +174,8 @@ export const run = sqliteTable("run", {
|
|
|
167
174
|
.references(() => wizard.id, { onDelete: "cascade" }),
|
|
168
175
|
tenantId: text("tenant_id").notNull(),
|
|
169
176
|
/** The definition the run started on — edits never reach a running wizard. */
|
|
170
|
-
|
|
177
|
+
/** Read through `upgradeDefinition`: a run can outlast a version of the format. */
|
|
178
|
+
definition: runDefinition("definition").notNull(),
|
|
171
179
|
/** The workspace the run started with. */
|
|
172
180
|
files: text("files", { mode: "json" }).$type().notNull().default([]),
|
|
173
181
|
/**
|
|
@@ -194,10 +202,16 @@ export const run = sqliteTable("run", {
|
|
|
194
202
|
/** The client that started it over the public API (`x-wizards-client`): web, app, cli, or a registered id. */
|
|
195
203
|
client: text("client"),
|
|
196
204
|
status: text("status", {
|
|
197
|
-
enum: ["waiting_input", "running", "done", "failed", "cancelled"],
|
|
205
|
+
enum: ["waiting_input", "sleeping", "running", "done", "failed", "cancelled"],
|
|
198
206
|
}).notNull(),
|
|
207
|
+
/** When a run that sleeps goes on; null: nothing due. The clock reads a copy (`run_index.wake_at`). */
|
|
208
|
+
wakeAt: integer("wake_at", { mode: "timestamp_ms" }),
|
|
199
209
|
cursor: text("cursor"),
|
|
200
210
|
state: text("state", { mode: "json" }).$type().notNull(),
|
|
211
|
+
/** The claim of the runner driving the run (`run_index.generation`), only ever upward. */
|
|
212
|
+
claim: integer("claim").notNull().default(0),
|
|
213
|
+
/** Counts the writes of `state` and `status`: a person's write needs the number it read. */
|
|
214
|
+
rev: integer("rev").notNull().default(0),
|
|
201
215
|
error: text("error"),
|
|
202
216
|
/** What a running step is asking the person right now (a login, a code); null = nothing. */
|
|
203
217
|
ask: text("ask", { mode: "json" }).$type(),
|
|
@@ -296,6 +296,7 @@ async function searchAll(spaces, query, opts) {
|
|
|
296
296
|
return {
|
|
297
297
|
hits,
|
|
298
298
|
checked: each.every((f) => f.checked),
|
|
299
|
+
late: each.some((f) => f.late),
|
|
299
300
|
candidates: each.reduce((n, f) => n + f.candidates, 0),
|
|
300
301
|
filtered: each.some((f) => f.filtered !== null)
|
|
301
302
|
? each.reduce((n, f) => n + (f.filtered ?? 0), 0)
|