scenri 0.10.0 → 0.10.1
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 +23 -0
- package/dist/{chunk-WORM6GB3.js → chunk-UUYMUOZQ.js} +22 -4
- package/dist/{cli-EXASA5BK.js → cli-3KKS7BE4.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/serve.js +121 -14
- package/dist/{src-4N4TS3HO.js → src-QZZDZM7I.js} +3 -3
- package/package.json +1 -1
- package/studio-dist/assets/index-D1MJJGXq.js +107 -0
- package/studio-dist/assets/{index-CVbs0aDq.css → index-ELZxH19c.css} +1 -1
- package/studio-dist/index.html +2 -2
- package/studio-dist/assets/index-CyQ6cSKd.js +0 -107
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1](https://github.com/tonygorb/Scenri/compare/v0.10.0...v0.10.1) (2026-09-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add placeTip function for hover card positioning ([de6d069](https://github.com/tonygorb/Scenri/commit/de6d069024b3d0c4b305f945a15322b1290d6458))
|
|
9
|
+
* add presenter duplication and deletion functionality ([11c83be](https://github.com/tonygorb/Scenri/commit/11c83be7ee167435fc8a6656c938380ec9b08c68))
|
|
10
|
+
* duplicate or delete a saved presenter from its card ([2e4dc00](https://github.com/tonygorb/Scenri/commit/2e4dc008f3bccbf9a9b2e444331bd2627775f1f4))
|
|
11
|
+
* enhance presenter view and retry functionality ([dbeb9e9](https://github.com/tonygorb/Scenri/commit/dbeb9e9e48c52510ebb9ca2949a27e0cebfb69ca))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* a fresh library keeps started_at through the status rebuild ([14aced1](https://github.com/tonygorb/Scenri/commit/14aced1fa5d0b841e8202b639e3ae95b615598ac))
|
|
17
|
+
* centre the Create first run and dock the assets panel from 1024 ([b102204](https://github.com/tonygorb/Scenri/commit/b102204d3e42107319a72923aea28de3e04298f2))
|
|
18
|
+
* retry in the same card, side profiles, chip fields and rails ([0fd3099](https://github.com/tonygorb/Scenri/commit/0fd309969320b0fe8f22cba0940cdf16f5bc68a4))
|
|
19
|
+
* type and lint errors in the chip field and the reference set ([53e5314](https://github.com/tonygorb/Scenri/commit/53e5314120de03cf7a5c4c3ef1d9946655e567a3))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* **release:** pin the next version to 0.10.1 ([85a5df4](https://github.com/tonygorb/Scenri/commit/85a5df4711c81c30b60b18dfbd4a16098adff98b))
|
|
25
|
+
|
|
3
26
|
## [0.10.0](https://github.com/tonygorb/Scenri/compare/v0.9.4...v0.10.0) (2026-09-16)
|
|
4
27
|
|
|
5
28
|
|
|
@@ -205,12 +205,13 @@ function widenNodeStatusCheck(db) {
|
|
|
205
205
|
brief TEXT,
|
|
206
206
|
archived INTEGER NOT NULL DEFAULT 0,
|
|
207
207
|
duration_ms INTEGER,
|
|
208
|
+
started_at TEXT,
|
|
208
209
|
batch_id TEXT,
|
|
209
210
|
batch_index INTEGER NOT NULL DEFAULT 0
|
|
210
211
|
);
|
|
211
212
|
INSERT INTO nodes_new
|
|
212
213
|
SELECT id, project_id, parent_id, kind, prompt, engine_id, status, images, cost_usd, kept, error,
|
|
213
|
-
created_at, overlays, brief, archived, duration_ms, batch_id, batch_index
|
|
214
|
+
created_at, overlays, brief, archived, duration_ms, started_at, batch_id, batch_index
|
|
214
215
|
FROM nodes;
|
|
215
216
|
DROP TABLE nodes;
|
|
216
217
|
ALTER TABLE nodes_new RENAME TO nodes;
|
|
@@ -525,6 +526,9 @@ function openDb(homeDir) {
|
|
|
525
526
|
if (!nodeCols.includes("duration_ms")) {
|
|
526
527
|
db.exec("ALTER TABLE nodes ADD COLUMN duration_ms INTEGER");
|
|
527
528
|
}
|
|
529
|
+
if (!nodeCols.includes("started_at")) {
|
|
530
|
+
db.exec("ALTER TABLE nodes ADD COLUMN started_at TEXT");
|
|
531
|
+
}
|
|
528
532
|
if (!nodeCols.includes("batch_id")) {
|
|
529
533
|
db.exec("ALTER TABLE nodes ADD COLUMN batch_id TEXT");
|
|
530
534
|
}
|
|
@@ -707,7 +711,7 @@ var LINEAGE_SIBLINGS_RADIUS = 25;
|
|
|
707
711
|
var LINEAGE_CHILDREN_MAX = 60;
|
|
708
712
|
var LINEAGE_HISTORY_MAX = 60;
|
|
709
713
|
var FEED_COLS = `n.id, n.project_id, n.parent_id, n.kind, substr(n.prompt, 1, ${PROMPT_HEAD_CHARS}) AS prompt_head,
|
|
710
|
-
n.engine_id, n.status, n.images, n.cost_usd, n.duration_ms, n.kept, n.error, n.created_at, n.brief, n.archived,
|
|
714
|
+
n.engine_id, n.status, n.images, n.cost_usd, n.duration_ms, n.kept, n.error, n.created_at, n.started_at, n.brief, n.archived,
|
|
711
715
|
n.batch_id, n.batch_index, ${CHILD_COUNT_SQL} AS child_count`;
|
|
712
716
|
function rowToFeedNode(r) {
|
|
713
717
|
return {
|
|
@@ -724,6 +728,7 @@ function rowToFeedNode(r) {
|
|
|
724
728
|
kept: !!r.kept,
|
|
725
729
|
error: r.error,
|
|
726
730
|
createdAt: r.created_at,
|
|
731
|
+
startedAt: r.started_at ?? r.created_at,
|
|
727
732
|
brief: r.brief ? JSON.parse(r.brief) : null,
|
|
728
733
|
archived: !!r.archived,
|
|
729
734
|
batchId: r.batch_id ?? null,
|
|
@@ -1112,6 +1117,19 @@ function createStore(db) {
|
|
|
1112
1117
|
cancelNode(id) {
|
|
1113
1118
|
db.prepare("UPDATE nodes SET status='cancelled' WHERE id=?").run(id);
|
|
1114
1119
|
},
|
|
1120
|
+
/**
|
|
1121
|
+
* Run this shot again on the same row. The card keeps its place: id,
|
|
1122
|
+
* brief, prompt, parent and created_at stay put. Status goes back to
|
|
1123
|
+
* running, the old error and pictures go, so the tile becomes the wait.
|
|
1124
|
+
* started_at moves to now so the clock on the card is this run, not the
|
|
1125
|
+
* minutes the first attempt already spent.
|
|
1126
|
+
*/
|
|
1127
|
+
reopenNode(id) {
|
|
1128
|
+
db.prepare(
|
|
1129
|
+
"UPDATE nodes SET status='running', error=NULL, images='[]', duration_ms=NULL, cost_usd=0, started_at=strftime('%Y-%m-%d %H:%M:%f','now') WHERE id=?"
|
|
1130
|
+
).run(id);
|
|
1131
|
+
return this.getNode(id);
|
|
1132
|
+
},
|
|
1115
1133
|
getNode(id) {
|
|
1116
1134
|
const r = db.prepare(`SELECT n.*, ${CHILD_COUNT_SQL} AS child_count FROM nodes n WHERE n.id=?`).get(id);
|
|
1117
1135
|
return r ? rowToNode(r) : null;
|
|
@@ -2157,5 +2175,5 @@ function createCore(homeDir = defaultHome()) {
|
|
|
2157
2175
|
}
|
|
2158
2176
|
|
|
2159
2177
|
export { ASPECT_TOLERANCE, BUDGET_EXHAUSTED, EDIT_REFERENCE_ROLE_DIRECTIVE, REFERENCE_ROLE_DIRECTIVE, SCHEMA_VERSION, STEM_MIN, SchemaTooNewError, SpendCapError, TRIGRAM_MIN, budgetSize, createCatalogStore, createCore, createStore, defaultHome, fold, ftsMatch, matchesQuery, ratioLabel, searchTerms, termMatches, uniqueProjectSlug, uniqueSetSlug, uniqueSlug };
|
|
2160
|
-
//# sourceMappingURL=chunk-
|
|
2161
|
-
//# sourceMappingURL=chunk-
|
|
2178
|
+
//# sourceMappingURL=chunk-UUYMUOZQ.js.map
|
|
2179
|
+
//# sourceMappingURL=chunk-UUYMUOZQ.js.map
|
|
@@ -463,7 +463,7 @@ async function addOrRepair(ownEntry, say, over) {
|
|
|
463
463
|
}
|
|
464
464
|
async function rememberDecline(home) {
|
|
465
465
|
try {
|
|
466
|
-
const { createCore } = await import('./src-
|
|
466
|
+
const { createCore } = await import('./src-QZZDZM7I.js');
|
|
467
467
|
const core = createCore(home);
|
|
468
468
|
try {
|
|
469
469
|
core.store.setSetting("desktop.prompt", "declined");
|
|
@@ -530,5 +530,5 @@ function tail(path, bytes = 4096) {
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
export { addToDesktop, assetsDirFor, installDeps, runDesktopCommand, runExecFile, runOpenCommand };
|
|
533
|
-
//# sourceMappingURL=cli-
|
|
534
|
-
//# sourceMappingURL=cli-
|
|
533
|
+
//# sourceMappingURL=cli-3KKS7BE4.js.map
|
|
534
|
+
//# sourceMappingURL=cli-3KKS7BE4.js.map
|
package/dist/index.js
CHANGED
|
@@ -86,12 +86,12 @@ try {
|
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
88
|
case "desktop": {
|
|
89
|
-
const { runDesktopCommand } = await import('./cli-
|
|
89
|
+
const { runDesktopCommand } = await import('./cli-3KKS7BE4.js');
|
|
90
90
|
process.exit(await runDesktopCommand(command, fileURLToPath(import.meta.url)));
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
case "open": {
|
|
94
|
-
const { runOpenCommand } = await import('./cli-
|
|
94
|
+
const { runOpenCommand } = await import('./cli-3KKS7BE4.js');
|
|
95
95
|
process.exit(await runOpenCommand(fileURLToPath(import.meta.url)));
|
|
96
96
|
break;
|
|
97
97
|
}
|
package/dist/serve.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createUpdateChecker, classify, isReleaseTriplet, findNpm, stageVersion } from './chunk-FYQ5BAFA.js';
|
|
2
2
|
import { shouldAdoptRunning, anotherScenriLines, portBusyLines } from './chunk-CMLJGPYC.js';
|
|
3
|
-
import { SchemaTooNewError, createCore, BUDGET_EXHAUSTED, SpendCapError,
|
|
3
|
+
import { SchemaTooNewError, createCore, BUDGET_EXHAUSTED, SpendCapError, EDIT_REFERENCE_ROLE_DIRECTIVE, REFERENCE_ROLE_DIRECTIVE, ratioLabel, searchTerms, termMatches, budgetSize, SCHEMA_VERSION, ASPECT_TOLERANCE } from './chunk-UUYMUOZQ.js';
|
|
4
4
|
import { detectInstallKind } from './chunk-PAIAXRAC.js';
|
|
5
5
|
export { detectInstallKind } from './chunk-PAIAXRAC.js';
|
|
6
6
|
import { readMeta, repoSlug } from './chunk-Y3ZPBPLP.js';
|
|
@@ -7403,6 +7403,10 @@ var assetRef = (hash) => {
|
|
|
7403
7403
|
const h = String(hash ?? "");
|
|
7404
7404
|
return /^[a-f0-9]{32}$/.test(h) ? `asset:${h}` : null;
|
|
7405
7405
|
};
|
|
7406
|
+
var _hashOf = (ref) => {
|
|
7407
|
+
const s = String(ref ?? "");
|
|
7408
|
+
return s.startsWith("asset:") ? s.slice(6) : null;
|
|
7409
|
+
};
|
|
7406
7410
|
function brandCharacters(brandJson) {
|
|
7407
7411
|
return Array.isArray(brandJson?.characters) ? brandJson.characters : [];
|
|
7408
7412
|
}
|
|
@@ -7546,6 +7550,49 @@ function mintRevision(base, input) {
|
|
|
7546
7550
|
const { supersededBy: _head, ...rest } = built.presenter;
|
|
7547
7551
|
return { ok: true, presenter: { ...rest, id: mintId(PRESENTER_ID_PREFIX), revisionOf: base.id } };
|
|
7548
7552
|
}
|
|
7553
|
+
function duplicatePresenterRecord(source, name) {
|
|
7554
|
+
const hashes = (rows) => (rows ?? []).map((r) => _hashOf(r.file)).filter((h) => !!h);
|
|
7555
|
+
const built = presenterRecordFrom({
|
|
7556
|
+
name,
|
|
7557
|
+
promptName: source.promptName ?? source.name,
|
|
7558
|
+
presentation: source.presentation,
|
|
7559
|
+
descriptor: source.descriptor,
|
|
7560
|
+
ageRange: source.ageRange,
|
|
7561
|
+
hair: source.hair,
|
|
7562
|
+
identityNotes: source.identityNotes,
|
|
7563
|
+
negativeConstraints: source.negativeConstraints,
|
|
7564
|
+
suitableCategories: source.suitableCategories,
|
|
7565
|
+
shotHashes: hashes(source.shots),
|
|
7566
|
+
sourceHashes: hashes(source.sourceRefs),
|
|
7567
|
+
previewHash: _hashOf(source.preview),
|
|
7568
|
+
avatarHash: _hashOf(source.avatar),
|
|
7569
|
+
source: source.source,
|
|
7570
|
+
likeness: source.likeness,
|
|
7571
|
+
facial: source.facial,
|
|
7572
|
+
skin: source.skin,
|
|
7573
|
+
build: source.build,
|
|
7574
|
+
identityEdits: source.identityEdits
|
|
7575
|
+
});
|
|
7576
|
+
if (!built.ok) return built;
|
|
7577
|
+
const presenter = { ...built.presenter };
|
|
7578
|
+
if (source.shots?.length) presenter.shots = source.shots.map((s) => ({ ...s }));
|
|
7579
|
+
if (source.notes) presenter.notes = source.notes;
|
|
7580
|
+
return { ok: true, presenter };
|
|
7581
|
+
}
|
|
7582
|
+
function duplicatePresenter(core, brandId, presenterId, name) {
|
|
7583
|
+
const brand = core.store.getBrand(brandId);
|
|
7584
|
+
if (!brand) return { ok: false, error: "brand not found", status: 404 };
|
|
7585
|
+
const id = headOf(brand.json, presenterId);
|
|
7586
|
+
const source = brandCharacters(brand.json).find((c) => c?.id === id);
|
|
7587
|
+
if (!source) return { ok: false, error: "presenter not found", status: 404 };
|
|
7588
|
+
if (!isCustomPresenter(source)) return { ok: false, error: "this presenter is not editable", status: 400 };
|
|
7589
|
+
const built = duplicatePresenterRecord(source, name);
|
|
7590
|
+
if (!built.ok) return { ok: false, error: built.error, status: 400 };
|
|
7591
|
+
commit(core, brand.id, (json) => {
|
|
7592
|
+
json.characters = [...brandCharacters(json), built.presenter];
|
|
7593
|
+
});
|
|
7594
|
+
return { ok: true, presenter: built.presenter, brand: core.store.getBrand(brand.id) };
|
|
7595
|
+
}
|
|
7549
7596
|
function likenessOf(raw) {
|
|
7550
7597
|
if (!raw || typeof raw !== "object") return void 0;
|
|
7551
7598
|
const at = str3(raw.attestedAt, 40);
|
|
@@ -9542,8 +9589,8 @@ var VIEW_ROLES = [
|
|
|
9542
9589
|
{ id: "back", tier: "supplementary", from: ["portrait", "front"], label: "back view" },
|
|
9543
9590
|
{ id: "left", tier: "supplementary", from: ["portrait", "front"], label: "left view" },
|
|
9544
9591
|
// Never from the left: drawing one profile off the other is the surest way
|
|
9545
|
-
// to put a trait on the wrong side of a face.
|
|
9546
|
-
{ id: "right", tier: "supplementary", from: ["portrait", "front"
|
|
9592
|
+
// to put a trait on the wrong side of a face.
|
|
9593
|
+
{ id: "right", tier: "supplementary", from: ["portrait", "front"], label: "right view" }
|
|
9547
9594
|
];
|
|
9548
9595
|
var idsWhere = (want) => VIEW_ROLES.filter(want).map((r) => r.id);
|
|
9549
9596
|
var PRESENTER_VIEWS = idsWhere(() => true);
|
|
@@ -10233,11 +10280,8 @@ function rolledFrom(rec) {
|
|
|
10233
10280
|
if (!keep) return said;
|
|
10234
10281
|
return said ? `${said}, ${keep}` : keep;
|
|
10235
10282
|
}
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
const deps = DEPENDS[view];
|
|
10239
|
-
if (view !== "right" || !namesASide(rec.keep)) return deps;
|
|
10240
|
-
return deps.filter((d) => d !== "left");
|
|
10283
|
+
function refDeps(_rec, view) {
|
|
10284
|
+
return DEPENDS[view];
|
|
10241
10285
|
}
|
|
10242
10286
|
function usableSource(rec, hash) {
|
|
10243
10287
|
const filings = rec.analysis?.photos;
|
|
@@ -10838,6 +10882,14 @@ function registerAssetBuildRoutes(app, deps) {
|
|
|
10838
10882
|
const after = core.store.getBrand(brand.id);
|
|
10839
10883
|
return { presenter: brandCharacters(after?.json).find((c) => c.id === older.id), brand: after };
|
|
10840
10884
|
});
|
|
10885
|
+
app.post("/api/brands/:id/presenters/:presenterId/duplicate", async (req, reply) => {
|
|
10886
|
+
const brand = brandOr404(req, reply);
|
|
10887
|
+
if (!brand) return;
|
|
10888
|
+
const id = String(req.params.presenterId);
|
|
10889
|
+
const result = duplicatePresenter(core, brand.id, id, req.body?.name);
|
|
10890
|
+
if (!result.ok) return reply.status(result.status).send({ error: result.error });
|
|
10891
|
+
return { presenter: result.presenter, brand: result.brand };
|
|
10892
|
+
});
|
|
10841
10893
|
app.delete("/api/brands/:id/presenters/:presenterId", async (req, reply) => {
|
|
10842
10894
|
const brand = brandOr404(req, reply);
|
|
10843
10895
|
if (!brand) return;
|
|
@@ -11651,6 +11703,29 @@ function registerImageRoutes(app, deps) {
|
|
|
11651
11703
|
|
|
11652
11704
|
// src/release/notes.data.ts
|
|
11653
11705
|
var RELEASES = [
|
|
11706
|
+
{
|
|
11707
|
+
version: "0.10.1",
|
|
11708
|
+
date: "2026-09-16",
|
|
11709
|
+
title: "A saved presenter can be duplicated or deleted straight from its card.",
|
|
11710
|
+
sections: [
|
|
11711
|
+
{
|
|
11712
|
+
heading: "Presenters",
|
|
11713
|
+
body: "A saved presenter's card has a menu, on a right click or its corner button. Duplicate presenter makes an independent copy under a name you choose, with the same pictures and nothing drawn again, and Delete presenter removes one. The library and the Create picker update at once. The right side view is drawn from the face and full body instead of the left side, so a detail on one side stays there, and each category in the details can be removed with its own button."
|
|
11714
|
+
},
|
|
11715
|
+
{
|
|
11716
|
+
heading: "Shots",
|
|
11717
|
+
body: "Try again on a failed or stopped shot runs it again in the same card, with its clock starting from zero. A shot that stopped because a provider ran out of credit can be tried again once it is topped up. In an open shot, the column of shots scrolls and keeps the one you are looking at in the middle."
|
|
11718
|
+
},
|
|
11719
|
+
{
|
|
11720
|
+
heading: "Create",
|
|
11721
|
+
body: "A brand with no shots yet opens Create with its welcome centred again. The examples move one card per arrow and keep their arrows on touch screens, and a picture's credit stays on screen near the edge of the window. From 1024 pixels wide the assets panel sits beside the canvas."
|
|
11722
|
+
},
|
|
11723
|
+
{
|
|
11724
|
+
heading: "Fixes",
|
|
11725
|
+
body: "Chip remove buttons keep the chip's colour, carousel arrows no longer disappear while pointed at, and a presenter's reference pictures keep their arrows on the pictures, with the face filling its frame."
|
|
11726
|
+
}
|
|
11727
|
+
]
|
|
11728
|
+
},
|
|
11654
11729
|
{
|
|
11655
11730
|
version: "0.10.0",
|
|
11656
11731
|
date: "2026-09-16",
|
|
@@ -12674,7 +12749,7 @@ function registerDesktopRoutes(app, deps) {
|
|
|
12674
12749
|
record: null
|
|
12675
12750
|
};
|
|
12676
12751
|
}
|
|
12677
|
-
const { installDeps } = await import('./cli-
|
|
12752
|
+
const { installDeps } = await import('./cli-3KKS7BE4.js');
|
|
12678
12753
|
const { desktopStatus } = await import('./install-VXJPLYWM.js');
|
|
12679
12754
|
return desktopStatus(installDeps(runtime.entry));
|
|
12680
12755
|
});
|
|
@@ -12682,7 +12757,7 @@ function registerDesktopRoutes(app, deps) {
|
|
|
12682
12757
|
if (!runtime.entry) {
|
|
12683
12758
|
return { ok: false, reason: "unsupported", message: "Desktop shortcuts are not available on this system yet." };
|
|
12684
12759
|
}
|
|
12685
|
-
const { addToDesktop } = await import('./cli-
|
|
12760
|
+
const { addToDesktop } = await import('./cli-3KKS7BE4.js');
|
|
12686
12761
|
return addToDesktop(runtime.entry);
|
|
12687
12762
|
});
|
|
12688
12763
|
app.get("/api/desktop", async () => {
|
|
@@ -13400,7 +13475,7 @@ function buildServer(opts) {
|
|
|
13400
13475
|
else reserved.delete(engineId);
|
|
13401
13476
|
}
|
|
13402
13477
|
}
|
|
13403
|
-
|
|
13478
|
+
const startNodeRun = async (req, reply, reuseId) => {
|
|
13404
13479
|
const {
|
|
13405
13480
|
projectId,
|
|
13406
13481
|
parentId = null,
|
|
@@ -13424,7 +13499,7 @@ function buildServer(opts) {
|
|
|
13424
13499
|
const origin = await attentionCropOrigin(args.srcBuf, args.srcSize, plan2);
|
|
13425
13500
|
const window = { left: origin.left, top: origin.top, width: plan2.width, height: plan2.height };
|
|
13426
13501
|
const label = FORMATS.find((f) => f.id === args.fmt.id)?.label ?? `${args.fmt.w}x${args.fmt.h}`;
|
|
13427
|
-
const node2 = core.store.addNode({
|
|
13502
|
+
const node2 = reuseId ? core.store.reopenNode(reuseId) : core.store.addNode({
|
|
13428
13503
|
projectId: project.id,
|
|
13429
13504
|
parentId: args.parentId,
|
|
13430
13505
|
kind: "edit",
|
|
@@ -13847,7 +13922,7 @@ function buildServer(opts) {
|
|
|
13847
13922
|
}
|
|
13848
13923
|
const billedId = runEngine.capabilities().id;
|
|
13849
13924
|
core.ledger.assertUnderCap(billedId, estimate + (reserved.get(billedId) ?? 0));
|
|
13850
|
-
const nodes = kind === "generation" ? core.store.addNodes({
|
|
13925
|
+
const nodes = reuseId ? [core.store.reopenNode(reuseId)] : kind === "generation" ? core.store.addNodes({
|
|
13851
13926
|
projectId: project.id,
|
|
13852
13927
|
parentId: resolvedParentId,
|
|
13853
13928
|
kind,
|
|
@@ -14030,6 +14105,38 @@ function buildServer(opts) {
|
|
|
14030
14105
|
).catch((err) => app.log.error({ err }, "node run failed"));
|
|
14031
14106
|
const allWarnings = [...compiled2?.warnings ?? [], ...extraWarnings];
|
|
14032
14107
|
return reply.status(202).send({ ...node, siblings: nodes, ...allWarnings.length ? { warnings: allWarnings } : {} });
|
|
14108
|
+
};
|
|
14109
|
+
app.post("/api/nodes", async (req, reply) => startNodeRun(req, reply));
|
|
14110
|
+
app.post("/api/nodes/:id/retry", async (req, reply) => {
|
|
14111
|
+
const id = req.params.id;
|
|
14112
|
+
const n = core.store.getNode(id);
|
|
14113
|
+
if (!n) return reply.status(404).send({ error: "node not found" });
|
|
14114
|
+
if (n.status === "running") return reply.status(409).send({ error: "already running" });
|
|
14115
|
+
if (n.status === "done") return reply.status(400).send({ error: "finished shots start a new take" });
|
|
14116
|
+
if (n.status !== "error" && n.status !== "cancelled") {
|
|
14117
|
+
return reply.status(400).send({ error: "cannot retry this shot" });
|
|
14118
|
+
}
|
|
14119
|
+
if (n.kind !== "generation" && n.kind !== "edit") {
|
|
14120
|
+
return reply.status(400).send({ error: "cannot retry this shot" });
|
|
14121
|
+
}
|
|
14122
|
+
const brief = n.brief ?? {};
|
|
14123
|
+
return startNodeRun(
|
|
14124
|
+
{
|
|
14125
|
+
body: {
|
|
14126
|
+
projectId: n.projectId,
|
|
14127
|
+
parentId: n.parentId,
|
|
14128
|
+
kind: n.kind,
|
|
14129
|
+
prompt: n.prompt,
|
|
14130
|
+
engineId: n.engineId,
|
|
14131
|
+
count: 1,
|
|
14132
|
+
brief: n.brief,
|
|
14133
|
+
...brief.sourceImage ? { sourceImage: brief.sourceImage } : {},
|
|
14134
|
+
...brief.reshape ? { reshape: brief.reshape } : {}
|
|
14135
|
+
}
|
|
14136
|
+
},
|
|
14137
|
+
reply,
|
|
14138
|
+
id
|
|
14139
|
+
);
|
|
14033
14140
|
});
|
|
14034
14141
|
app.post("/api/nodes/:id/cancel", async (req, reply) => {
|
|
14035
14142
|
const id = req.params.id;
|
|
@@ -14290,7 +14397,7 @@ async function run() {
|
|
|
14290
14397
|
}
|
|
14291
14398
|
}
|
|
14292
14399
|
const ownEntry = fileURLToPath(import.meta.url);
|
|
14293
|
-
const { addToDesktop, installDeps } = await import('./cli-
|
|
14400
|
+
const { addToDesktop, installDeps } = await import('./cli-3KKS7BE4.js');
|
|
14294
14401
|
const { refreshLauncher } = await import('./refresh-5HBDLLLB.js');
|
|
14295
14402
|
const { askOnTerminal, offerDesktop, shouldOfferDesktop } = await import('./offer-W6NJXMWT.js');
|
|
14296
14403
|
const { launcherInstalled } = await import('./paths-6ZXRZUHY.js');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ASPECT_TOLERANCE, BUDGET_EXHAUSTED, EDIT_REFERENCE_ROLE_DIRECTIVE, REFERENCE_ROLE_DIRECTIVE, SCHEMA_VERSION, STEM_MIN, SchemaTooNewError, SpendCapError, TRIGRAM_MIN, budgetSize, createCatalogStore, createCore, createStore, defaultHome, fold, ftsMatch, matchesQuery, ratioLabel, searchTerms, termMatches, uniqueProjectSlug, uniqueSetSlug, uniqueSlug } from './chunk-
|
|
2
|
-
//# sourceMappingURL=src-
|
|
3
|
-
//# sourceMappingURL=src-
|
|
1
|
+
export { ASPECT_TOLERANCE, BUDGET_EXHAUSTED, EDIT_REFERENCE_ROLE_DIRECTIVE, REFERENCE_ROLE_DIRECTIVE, SCHEMA_VERSION, STEM_MIN, SchemaTooNewError, SpendCapError, TRIGRAM_MIN, budgetSize, createCatalogStore, createCore, createStore, defaultHome, fold, ftsMatch, matchesQuery, ratioLabel, searchTerms, termMatches, uniqueProjectSlug, uniqueSetSlug, uniqueSlug } from './chunk-UUYMUOZQ.js';
|
|
2
|
+
//# sourceMappingURL=src-QZZDZM7I.js.map
|
|
3
|
+
//# sourceMappingURL=src-QZZDZM7I.js.map
|