oda-engine 0.0.0-stage → 0.1.0
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 +151 -2
- package/bin/nowhere.mjs +352 -0
- package/lib/account.mjs +57 -0
- package/lib/agentModules.mjs +57 -0
- package/lib/devServer.mjs +351 -0
- package/lib/headless.mjs +231 -0
- package/lib/headlessPreview.mjs +212 -0
- package/lib/keys.mjs +517 -0
- package/lib/make.mjs +855 -0
- package/lib/mcp.mjs +537 -0
- package/lib/open.mjs +22 -0
- package/lib/preview.mjs +87 -0
- package/lib/previewRpc.mjs +134 -0
- package/lib/project.mjs +359 -0
- package/lib/publishFlow.mjs +90 -0
- package/lib/resources.mjs +50 -0
- package/lib/rules.mjs +60 -0
- package/lib/scaffold.mjs +42 -0
- package/lib/setup.mjs +59 -0
- package/lib/tools.mjs +668 -0
- package/package.json +51 -4
- package/template/game.config.json +9 -0
- package/template/scene.json +4 -0
- package/template/src/main.ts +11 -0
- package/vendor/DOCS.md +447 -0
- package/vendor/agent/appRun.mjs +520 -0
- package/vendor/agent/assets/brief.mjs +242 -0
- package/vendor/agent/assets/collider.mjs +531 -0
- package/vendor/agent/assets/environments/index.mjs +12 -0
- package/vendor/agent/assets/environments/worldlabs.mjs +161 -0
- package/vendor/agent/assets/fetch.mjs +168 -0
- package/vendor/agent/assets/footprint.mjs +13 -0
- package/vendor/agent/assets/gltf.mjs +547 -0
- package/vendor/agent/assets/hdr.mjs +269 -0
- package/vendor/agent/assets/imageOps.mjs +171 -0
- package/vendor/agent/assets/images/codex.mjs +307 -0
- package/vendor/agent/assets/images/fal.mjs +75 -0
- package/vendor/agent/assets/images/gemini.mjs +84 -0
- package/vendor/agent/assets/images/index.mjs +25 -0
- package/vendor/agent/assets/images/openai.mjs +75 -0
- package/vendor/agent/assets/images/stability.mjs +71 -0
- package/vendor/agent/assets/images/views.mjs +31 -0
- package/vendor/agent/assets/import.mjs +1352 -0
- package/vendor/agent/assets/inspect.mjs +465 -0
- package/vendor/agent/assets/jobs.mjs +196 -0
- package/vendor/agent/assets/ktx2.mjs +290 -0
- package/vendor/agent/assets/ledger.mjs +466 -0
- package/vendor/agent/assets/net.mjs +254 -0
- package/vendor/agent/assets/prices.json +39 -0
- package/vendor/agent/assets/providers/fal.mjs +115 -0
- package/vendor/agent/assets/providers/index.mjs +22 -0
- package/vendor/agent/assets/providers/meshy.mjs +119 -0
- package/vendor/agent/assets/providers/tripo.mjs +188 -0
- package/vendor/agent/assets/sources/ambientcg.mjs +129 -0
- package/vendor/agent/assets/sources/index.mjs +23 -0
- package/vendor/agent/assets/sources/polyhaven.mjs +237 -0
- package/vendor/agent/assets/sources/polypizza.mjs +121 -0
- package/vendor/agent/assets/splat.mjs +631 -0
- package/vendor/agent/assets/targets.mjs +122 -0
- package/vendor/agent/assets/tile.mjs +261 -0
- package/vendor/agent/assets/unzip.mjs +180 -0
- package/vendor/agent/blender/cleanup.py +360 -0
- package/vendor/agent/blender/convert.py +167 -0
- package/vendor/agent/blender/find.mjs +192 -0
- package/vendor/agent/blender/nw_export.py +104 -0
- package/vendor/agent/blender/nw_rubric.py +426 -0
- package/vendor/agent/blender/run.mjs +193 -0
- package/vendor/agent/blender/runner.py +252 -0
- package/vendor/agent/blender/sheet.py +743 -0
- package/vendor/agent/depth.mjs +134 -0
- package/vendor/agent/director/board.mjs +451 -0
- package/vendor/agent/director/contracts.mjs +663 -0
- package/vendor/agent/director/director.mjs +2365 -0
- package/vendor/agent/director/estimate.mjs +200 -0
- package/vendor/agent/director/gate.mjs +802 -0
- package/vendor/agent/director/limits.json +16 -0
- package/vendor/agent/director/methods.mjs +457 -0
- package/vendor/agent/director/policy.json +33 -0
- package/vendor/agent/director/prompts.mjs +244 -0
- package/vendor/agent/director/reading.mjs +341 -0
- package/vendor/agent/director/router.mjs +184 -0
- package/vendor/agent/director/seams.mjs +243 -0
- package/vendor/agent/director/session.mjs +643 -0
- package/vendor/agent/director/store.mjs +119 -0
- package/vendor/agent/director/taskGate.mjs +110 -0
- package/vendor/agent/director/teamLedger.mjs +118 -0
- package/vendor/agent/director/triage.mjs +63 -0
- package/vendor/agent/downloads.cjs +363 -0
- package/vendor/agent/flow.mjs +78 -0
- package/vendor/agent/guard.mjs +613 -0
- package/vendor/agent/host.mjs +1736 -0
- package/vendor/agent/language.mjs +58 -0
- package/vendor/agent/ledger.mjs +360 -0
- package/vendor/agent/locale.cjs +186 -0
- package/vendor/agent/loop/capacity.mjs +74 -0
- package/vendor/agent/loop/compose.mjs +127 -0
- package/vendor/agent/loop/gate.mjs +205 -0
- package/vendor/agent/loop/judge.mjs +189 -0
- package/vendor/agent/loop/levels.mjs +273 -0
- package/vendor/agent/loop/state.mjs +358 -0
- package/vendor/agent/notes.cjs +278 -0
- package/vendor/agent/pace.mjs +258 -0
- package/vendor/agent/panels.mjs +431 -0
- package/vendor/agent/prompt.mjs +342 -0
- package/vendor/agent/reference/board.mjs +410 -0
- package/vendor/agent/reference/compose.mjs +364 -0
- package/vendor/agent/reference/decode.mjs +56 -0
- package/vendor/agent/reference/facts.mjs +1874 -0
- package/vendor/agent/reference/png.mjs +107 -0
- package/vendor/agent/reference/records.mjs +63 -0
- package/vendor/agent/reference/web.mjs +252 -0
- package/vendor/agent/roles/artist.mjs +69 -0
- package/vendor/agent/roles/builder.mjs +79 -0
- package/vendor/agent/roles/checks.mjs +223 -0
- package/vendor/agent/roles/common.mjs +188 -0
- package/vendor/agent/roles/critic.mjs +171 -0
- package/vendor/agent/roles/index.mjs +39 -0
- package/vendor/agent/roles/modeller.mjs +142 -0
- package/vendor/agent/roles/qa.mjs +58 -0
- package/vendor/agent/roles/rubrics.mjs +79 -0
- package/vendor/agent/roles/sound.mjs +69 -0
- package/vendor/agent/rounds.cjs +333 -0
- package/vendor/agent/shared.mjs +284 -0
- package/vendor/agent/stopGate.mjs +574 -0
- package/vendor/agent/subagents.mjs +129 -0
- package/vendor/agent/tools/assets.mjs +499 -0
- package/vendor/agent/tools/blender.mjs +754 -0
- package/vendor/agent/tools/cards.mjs +479 -0
- package/vendor/agent/tools/choices.mjs +479 -0
- package/vendor/agent/tools/compose.mjs +74 -0
- package/vendor/agent/tools/environment.mjs +488 -0
- package/vendor/agent/tools/eyes.mjs +733 -0
- package/vendor/agent/tools/generate.mjs +338 -0
- package/vendor/agent/tools/guide.mjs +46 -0
- package/vendor/agent/tools/harness.mjs +193 -0
- package/vendor/agent/tools/image.mjs +643 -0
- package/vendor/agent/tools/index.mjs +162 -0
- package/vendor/agent/tools/look.mjs +578 -0
- package/vendor/agent/tools/loop.mjs +858 -0
- package/vendor/agent/tools/others.mjs +123 -0
- package/vendor/agent/tools/pictures.mjs +535 -0
- package/vendor/agent/tools/reference.mjs +366 -0
- package/vendor/agent/transcripts.mjs +118 -0
- package/vendor/agent-loop.mjs +602 -0
- package/vendor/agent-plugin/.claude-plugin/plugin.json +5 -0
- package/vendor/agent-plugin/skills/art-direction/SKILL.md +82 -0
- package/vendor/agent-plugin/skills/asset-legality/SKILL.md +101 -0
- package/vendor/agent-plugin/skills/asset-sources/SKILL.md +111 -0
- package/vendor/agent-plugin/skills/blender-modeling/SKILL.md +97 -0
- package/vendor/agent-plugin/skills/look-dev/SKILL.md +104 -0
- package/vendor/agent-plugin/skills/playtesting/SKILL.md +74 -0
- package/vendor/agent-plugin/skills/reference-loop/SKILL.md +102 -0
- package/vendor/agent-plugin/skills/sound-design/SKILL.md +60 -0
- package/vendor/agent-plugin/skills/style/SKILL.md +35 -0
- package/vendor/agent-plugin/skills/tsl-r185/SKILL.md +107 -0
- package/vendor/auth.cjs +570 -0
- package/vendor/build.cjs +953 -0
- package/vendor/catalog.json +455 -0
- package/vendor/connectors.cjs +688 -0
- package/vendor/eyes.mjs +733 -0
- package/vendor/gameExports.json +1390 -0
- package/vendor/git.cjs +222 -0
- package/vendor/models.json +57 -0
- package/vendor/publish.cjs +1018 -0
- package/vendor/refBoard.cjs +301 -0
- package/vendor/schema/dist/assets.d.ts +335 -0
- package/vendor/schema/dist/assets.js +439 -0
- package/vendor/schema/dist/brief.d.ts +357 -0
- package/vendor/schema/dist/brief.js +302 -0
- package/vendor/schema/dist/common.d.ts +9 -0
- package/vendor/schema/dist/common.js +13 -0
- package/vendor/schema/dist/config.d.ts +406 -0
- package/vendor/schema/dist/config.js +355 -0
- package/vendor/schema/dist/contract.d.ts +599 -0
- package/vendor/schema/dist/contract.js +1146 -0
- package/vendor/schema/dist/index.d.ts +14 -0
- package/vendor/schema/dist/index.js +21 -0
- package/vendor/schema/dist/look.d.ts +463 -0
- package/vendor/schema/dist/look.js +681 -0
- package/vendor/schema/dist/lookStats.d.ts +230 -0
- package/vendor/schema/dist/lookStats.js +768 -0
- package/vendor/schema/dist/pilot.d.ts +32 -0
- package/vendor/schema/dist/pilot.js +44 -0
- package/vendor/schema/dist/publish.d.ts +214 -0
- package/vendor/schema/dist/publish.js +291 -0
- package/vendor/schema/dist/scene.d.ts +75 -0
- package/vendor/schema/dist/scene.js +120 -0
- package/vendor/schema/dist/skyLight.d.ts +141 -0
- package/vendor/schema/dist/skyLight.js +436 -0
- package/vendor/schema/dist/style.d.ts +131 -0
- package/vendor/schema/dist/style.js +155 -0
- package/vendor/schema/package.json +1 -0
- package/vendor/selectionPrompt.mjs +51 -0
- package/vendor/useTools.mjs +195 -0
- package/vendor/userMessage.mjs +26 -0
- package/web-dist/assets/GaussianSplatUtils-CB77cP9U.js +1 -0
- package/web-dist/assets/KTX2Loader-6OIWUF7s.js +2 -0
- package/web-dist/assets/SPZLoader-zYj0Alfv.js +1 -0
- package/web-dist/assets/gaussianSplat-CJTI1sEh.js +1 -0
- package/web-dist/assets/index-CcjyyQco.css +1 -0
- package/web-dist/assets/index-DMyJcoZJ.js +693 -0
- package/web-dist/assets/meshopt_decoder.module-BvwdjiD3.js +1 -0
- package/web-dist/assets/zstddec.module-CfFeQW7d.js +1 -0
- package/web-dist/index.html +34 -0
package/vendor/git.cjs
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
const fs = require('node:fs')
|
|
2
|
+
const fsp = require('node:fs/promises')
|
|
3
|
+
const path = require('node:path')
|
|
4
|
+
const git = require('isomorphic-git')
|
|
5
|
+
|
|
6
|
+
// Every project is a git repository, and the studio is the one that commits.
|
|
7
|
+
// The history is the undo the creator never has to think about, and the root
|
|
8
|
+
// commit is the project's identity when it is published (repo_key): it
|
|
9
|
+
// survives a clone, a rename, and a deleted .nowhere/. isomorphic-git rather
|
|
10
|
+
// than the system binary because Windows has none by default, and the agent's
|
|
11
|
+
// Bash may be using the real one at the same time (hence the index.lock dance).
|
|
12
|
+
|
|
13
|
+
const DEFAULT_AUTHOR = { name: 'Oda Studio', email: 'studio@nowhere.local' }
|
|
14
|
+
const GITIGNORE = ['node_modules/', '.nowhere/', 'dist/', '.DS_Store'].join('\n') + '\n'
|
|
15
|
+
// How long a foreign index.lock is waited out before a commit is skipped.
|
|
16
|
+
const LOCK_RETRIES = 3
|
|
17
|
+
const LOCK_WAIT_MS = 250
|
|
18
|
+
|
|
19
|
+
let defaultAuthor = DEFAULT_AUTHOR
|
|
20
|
+
|
|
21
|
+
/** The author every commit gets unless the call says otherwise. Auth sets it
|
|
22
|
+
* to the signed-in account; null goes back to the studio's own name. */
|
|
23
|
+
function setDefaultAuthor(author) {
|
|
24
|
+
defaultAuthor = author?.name && author?.email ? { name: author.name, email: author.email } : DEFAULT_AUTHOR
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function authorFor(override) {
|
|
28
|
+
return override?.name && override?.email ? { name: override.name, email: override.email } : defaultAuthor
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
32
|
+
|
|
33
|
+
// One commit at a time per repository. The watcher's save and the agent's done
|
|
34
|
+
// can land in the same tick, and two writers on one index is how it corrupts.
|
|
35
|
+
const queues = new Map()
|
|
36
|
+
function serialized(root, task) {
|
|
37
|
+
const prev = queues.get(root) ?? Promise.resolve()
|
|
38
|
+
const next = prev.then(task, task)
|
|
39
|
+
queues.set(root, next)
|
|
40
|
+
next
|
|
41
|
+
.finally(() => {
|
|
42
|
+
if (queues.get(root) === next) queues.delete(root)
|
|
43
|
+
})
|
|
44
|
+
.catch(() => {})
|
|
45
|
+
return next
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** HEAD's sha, or null for a repository with no commits yet. */
|
|
49
|
+
async function headSha(root) {
|
|
50
|
+
try {
|
|
51
|
+
return await git.resolveRef({ fs, dir: root, ref: 'HEAD' })
|
|
52
|
+
} catch {
|
|
53
|
+
return null
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Root commits do not move, so the walk happens once per repository. The cache
|
|
58
|
+
// is re-validated by reading the commit back: a repository replaced under the
|
|
59
|
+
// same path would otherwise keep answering for the old one.
|
|
60
|
+
const rootCache = new Map()
|
|
61
|
+
|
|
62
|
+
/** The first commit on HEAD's first-parent line: the project's repo_key. */
|
|
63
|
+
async function rootCommitSha(root) {
|
|
64
|
+
const cached = rootCache.get(root)
|
|
65
|
+
if (cached) {
|
|
66
|
+
try {
|
|
67
|
+
await git.readCommit({ fs, dir: root, oid: cached })
|
|
68
|
+
return cached
|
|
69
|
+
} catch {
|
|
70
|
+
rootCache.delete(root)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
let oid = await headSha(root)
|
|
74
|
+
if (!oid) return null
|
|
75
|
+
for (;;) {
|
|
76
|
+
const { commit } = await git.readCommit({ fs, dir: root, oid })
|
|
77
|
+
if (commit.parent.length === 0) break
|
|
78
|
+
oid = commit.parent[0]
|
|
79
|
+
}
|
|
80
|
+
rootCache.set(root, oid)
|
|
81
|
+
return oid
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** The most recent commits, newest first. */
|
|
85
|
+
async function log(root, limit = 20) {
|
|
86
|
+
if (!(await headSha(root))) return []
|
|
87
|
+
const entries = await git.log({ fs, dir: root, depth: limit })
|
|
88
|
+
return entries.map((e) => ({
|
|
89
|
+
sha: e.oid,
|
|
90
|
+
message: e.commit.message.replace(/\n+$/, ''),
|
|
91
|
+
author: { name: e.commit.author.name, email: e.commit.author.email },
|
|
92
|
+
date: new Date(e.commit.author.timestamp * 1000).toISOString(),
|
|
93
|
+
parents: e.commit.parent,
|
|
94
|
+
}))
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** A file as each of the last `limit` commits had it, newest first, one entry
|
|
98
|
+
* per version: [{ sha, date, text }]. What a damaged scene.json is mended
|
|
99
|
+
* from. Read-only, so it needs no place in the commit queue. */
|
|
100
|
+
async function fileHistory(root, filepath, limit = 80) {
|
|
101
|
+
if (!(await headSha(root))) return []
|
|
102
|
+
const entries = await git.log({ fs, dir: root, depth: limit })
|
|
103
|
+
const versions = []
|
|
104
|
+
let last = null
|
|
105
|
+
for (const e of entries) {
|
|
106
|
+
try {
|
|
107
|
+
const { oid, blob } = await git.readBlob({ fs, dir: root, oid: e.oid, filepath })
|
|
108
|
+
if (oid === last) continue
|
|
109
|
+
last = oid
|
|
110
|
+
versions.push({
|
|
111
|
+
sha: e.oid,
|
|
112
|
+
date: new Date(e.commit.author.timestamp * 1000).toISOString(),
|
|
113
|
+
text: Buffer.from(blob).toString('utf8'),
|
|
114
|
+
})
|
|
115
|
+
} catch {
|
|
116
|
+
// Not in that commit.
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return versions
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// statusMatrix rows are [path, HEAD, WORKDIR, STAGE] with 0/1/2(/3) codes.
|
|
123
|
+
// Anything whose stage does not already mirror the working tree is re-staged,
|
|
124
|
+
// so the commit is always "what is on disk", including files the agent's own
|
|
125
|
+
// git left half-staged.
|
|
126
|
+
async function stageEverything(root) {
|
|
127
|
+
const rows = await git.statusMatrix({ fs, dir: root })
|
|
128
|
+
const changed = []
|
|
129
|
+
for (const [filepath, head, workdir, stage] of rows) {
|
|
130
|
+
if (workdir === 0) {
|
|
131
|
+
if (head === 1 || stage !== 0) {
|
|
132
|
+
await git.remove({ fs, dir: root, filepath })
|
|
133
|
+
changed.push(filepath)
|
|
134
|
+
}
|
|
135
|
+
} else if (workdir === 2 || stage !== 1) {
|
|
136
|
+
await git.add({ fs, dir: root, filepath })
|
|
137
|
+
changed.push(filepath)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return changed
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function waitForLock(root) {
|
|
144
|
+
const lock = path.join(root, '.git', 'index.lock')
|
|
145
|
+
for (let attempt = 0; attempt < LOCK_RETRIES; attempt++) {
|
|
146
|
+
if (!fs.existsSync(lock)) return true
|
|
147
|
+
await sleep(LOCK_WAIT_MS)
|
|
148
|
+
}
|
|
149
|
+
return !fs.existsSync(lock)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Commits whatever differs from HEAD, if anything does. `message` is a string,
|
|
154
|
+
* or a function of the changed paths (the watcher says how many files a save
|
|
155
|
+
* touched). Never throws: a save that cannot be committed is a warning in the
|
|
156
|
+
* log, not a broken studio.
|
|
157
|
+
*
|
|
158
|
+
* @returns {Promise<{committed:boolean, sha:string|null, changed:string[], skipped?:string, error?:string}>}
|
|
159
|
+
*/
|
|
160
|
+
function autoCommit(root, message, author) {
|
|
161
|
+
return serialized(root, async () => {
|
|
162
|
+
const result = { committed: false, sha: await headSha(root), changed: [] }
|
|
163
|
+
try {
|
|
164
|
+
if (!(await waitForLock(root))) {
|
|
165
|
+
// Someone else (the agent's Bash, most likely) holds the index. The
|
|
166
|
+
// next save picks these changes up; forcing the lock could lose theirs.
|
|
167
|
+
console.warn('[git] index.lock is held by another process; skipping this commit')
|
|
168
|
+
return { ...result, skipped: 'index.lock' }
|
|
169
|
+
}
|
|
170
|
+
const changed = await stageEverything(root)
|
|
171
|
+
if (changed.length === 0) return result
|
|
172
|
+
const text = typeof message === 'function' ? message(changed) : String(message)
|
|
173
|
+
const sha = await git.commit({ fs, dir: root, message: text, author: authorFor(author) })
|
|
174
|
+
return { committed: true, sha, changed }
|
|
175
|
+
} catch (err) {
|
|
176
|
+
console.warn(`[git] commit failed: ${err.message}`)
|
|
177
|
+
return { ...result, error: err.message }
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Makes sure the project is a repository with at least one commit. A project
|
|
184
|
+
* that has never seen git gets `init` on main, the studio's .gitignore and an
|
|
185
|
+
* `init: <title>` commit; one that already has history is left exactly as is.
|
|
186
|
+
*
|
|
187
|
+
* @returns {Promise<{created:boolean, sha:string|null}>}
|
|
188
|
+
*/
|
|
189
|
+
async function ensureRepo(root, title) {
|
|
190
|
+
const gitDir = path.join(root, '.git')
|
|
191
|
+
let created = false
|
|
192
|
+
if (!fs.existsSync(gitDir)) {
|
|
193
|
+
await git.init({ fs, dir: root, defaultBranch: 'main' })
|
|
194
|
+
created = true
|
|
195
|
+
}
|
|
196
|
+
let sha = await headSha(root)
|
|
197
|
+
if (sha) return { created, sha }
|
|
198
|
+
|
|
199
|
+
// About to make the first commit: without the ignore file it would sweep
|
|
200
|
+
// node_modules and the studio's own scratch dir into history forever. A
|
|
201
|
+
// hand-written .gitignore (a cloned repo with no commits) is respected.
|
|
202
|
+
const ignore = path.join(root, '.gitignore')
|
|
203
|
+
if (!fs.existsSync(ignore)) await fsp.writeFile(ignore, GITIGNORE, 'utf8')
|
|
204
|
+
|
|
205
|
+
const label = String(title ?? '').trim() || path.basename(root)
|
|
206
|
+
const r = await autoCommit(root, `init: ${label}`)
|
|
207
|
+
sha = r.sha
|
|
208
|
+
if (sha) rootCache.set(root, sha)
|
|
209
|
+
return { created, sha }
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
module.exports = {
|
|
213
|
+
DEFAULT_AUTHOR,
|
|
214
|
+
GITIGNORE,
|
|
215
|
+
setDefaultAuthor,
|
|
216
|
+
ensureRepo,
|
|
217
|
+
autoCommit,
|
|
218
|
+
headSha,
|
|
219
|
+
rootCommitSha,
|
|
220
|
+
log,
|
|
221
|
+
fileHistory,
|
|
222
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The models the build agent can run on, newest of each line only, checked against each vendor's own model page on 2026-10-13 (Claude's prices and tiers again on 2026-10-20). One file for the Settings picker (src), main.cjs and the agent host, and the one price source for the cost estimate in the studio context, the running total and the final cost line, helpers included (agent/ledger.mjs). `provider` is the connector whose key it runs on. `runtime` picks the loop: claude-agent-sdk (Claude's own harness), responses (OpenAI's Responses API, also served by xAI), chat (OpenAI-style Chat Completions), gemini (generateContent). `price` is USD per million input and output tokens up to `longPrompt.over` tokens of prompt; null when the vendor's page did not say. `longPrompt`: where the vendor bills a longer prompt at another rate, the price of every call whose whole prompt (input, cache writes and cache reads) is over `over` tokens. `cacheRead` and `cacheWrite`: what a cached prompt token costs as a share of the input price (default 0.1 and 1.25). `images`: whether screenshots can be shown to it. `thinking`: \"adaptive\" asks the SDK for adaptive thinking explicitly, on the models where per-request effort is known to work; the others keep the SDK's default. `effortCeiling`: the deepest effort the studio runs this model at, whatever the request (agent/depth.mjs fitDepth); default max. `thinkingPerCall`: thinking tokens one step may take before the host lowers the effort a level for the steps after it, down to medium; none when absent.",
|
|
3
|
+
"default": "claude-opus-5-5",
|
|
4
|
+
"providers": [
|
|
5
|
+
{
|
|
6
|
+
"id": "anthropic",
|
|
7
|
+
"name": "Claude",
|
|
8
|
+
"runtime": "claude-agent-sdk",
|
|
9
|
+
"models": [
|
|
10
|
+
{ "id": "claude-opus-5-5", "name": "Claude Opus 5.5", "price": [4, 20], "images": true, "thinking": "adaptive", "cacheRead": 0.05 },
|
|
11
|
+
{ "id": "claude-fable-5-2", "name": "Claude Fable 5.2", "price": [8, 40], "images": true, "thinking": "adaptive", "cacheRead": 0.025 },
|
|
12
|
+
{ "id": "claude-fable-5-1", "name": "Claude Fable 5.1", "price": [10, 50], "images": true, "cacheRead": 0.025 },
|
|
13
|
+
{ "id": "claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "price": [2, 10], "images": true, "thinking": "adaptive", "cacheRead": 0.05 },
|
|
14
|
+
{ "id": "claude-haiku-5-5", "name": "Claude Haiku 5.5", "price": [0.1, 0.5], "images": true, "longPrompt": { "over": 100000, "price": [0.5, 2.5] }, "cacheRead": 0.1, "effortCeiling": "high", "thinkingPerCall": 12000 }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "openai",
|
|
19
|
+
"name": "GPT",
|
|
20
|
+
"runtime": "responses",
|
|
21
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
22
|
+
"models": [
|
|
23
|
+
{ "id": "gpt-6-astra", "name": "GPT-6 Astra", "price": [10, 50], "images": true },
|
|
24
|
+
{ "id": "gpt-6.1-sol", "name": "GPT-6.1 Sol", "price": [2, 10], "images": true },
|
|
25
|
+
{ "id": "gpt-6-luna", "name": "GPT-6 Luna", "price": [0.1, 0.5], "images": true }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "gemini",
|
|
30
|
+
"name": "Gemini",
|
|
31
|
+
"runtime": "gemini",
|
|
32
|
+
"baseUrl": "https://generativelanguage.googleapis.com/v1beta",
|
|
33
|
+
"models": [
|
|
34
|
+
{ "id": "gemini-4-argon", "name": "Gemini 4 Argon", "price": null, "images": true },
|
|
35
|
+
{ "id": "gemini-3.8-flash", "name": "Gemini 3.8 Flash", "price": null, "images": true },
|
|
36
|
+
{ "id": "gemini-3.5-flash-lite", "name": "Gemini 3.5 Flash-Lite", "price": null, "images": true }
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "xai",
|
|
41
|
+
"name": "Grok",
|
|
42
|
+
"runtime": "responses",
|
|
43
|
+
"baseUrl": "https://api.x.ai/v1",
|
|
44
|
+
"models": [{ "id": "grok-4.7", "name": "Grok 4.7", "price": [2, 6], "images": true }]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "deepseek",
|
|
48
|
+
"name": "DeepSeek",
|
|
49
|
+
"runtime": "chat",
|
|
50
|
+
"baseUrl": "https://api.deepseek.com",
|
|
51
|
+
"models": [
|
|
52
|
+
{ "id": "deepseek-flash", "name": "DeepSeek V4.1 Flash", "price": null, "images": false },
|
|
53
|
+
{ "id": "deepseek-v4-pro", "name": "DeepSeek V4 Pro", "price": null, "images": false }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|