mirror of
https://github.com/simstudioai/sim.git
synced 2026-08-29 02:27:35 +08:00
4508ec75d2
* fix(cli): resolve blockers and majors from a full command-surface audit Audit of all 222 CLI leaves against a live deployment, plus fixes for every defect it confirmed. Blockers: - An unrecognized --profile resolved to built-in defaults, so a typo silently targeted production and transmitted the API key there. - sim logs follow sent an undeclared query key and failed on every invocation. - sim workflows run exited 0 on a failed run, so CI reported success. - knowledge connectors documents update matched rows already in the target state, making exclude and restore permanent no-ops. - PDF text layers below the OCR threshold are transcribed by a model and stored verbatim with no record that it happened. Majors include: rollback --version was swallowed by the program-level flag and silently did nothing; nullable string flags could not send null despite their help promising it; six protocol commands discarded excess arguments, dropping files on upload; sim chat crashed with EPIPE when piped to head; tables import dropped malformed CSV rows without reporting them; audit-logs required an organization id no API surface exposed; secrets could not opt out of redaction or read a value from a file; bulk deletes and moves exited 0 having done nothing; and MCP registrations were destroyed by undeploy rather than restored. Adds extraction_method to documents so OCR output is distinguishable from parsed text, and reports the applied scope on billing logs so the two ledger questions are no longer indistinguishable. * fix(mcp): bound MCP restore by server and re-check uniqueness under the lock Two gaps in the archive/restore lifecycle this branch introduced. The candidate query bounded archived rows and deduplicated to one per server afterwards, so several archived generations stacked on one server consumed the whole budget and every other server the workflow had been published on fell out of the result with no warning. Deduplication moves into SQL so the bound applies to servers, preserving most-recently-updated-per-server. The live-registration check ran before the server lock was acquired, so a concurrent tool create could land in between and the restore would un-archive a second live row for the same server and workflow, violating the partial unique index and rolling back the whole deployment. That check now runs under the lock alongside the tool-name, capacity, and metadata-budget checks it belongs with. * fix(review): address round-three review findings across CLI and server Restore now picks candidate servers by recency: DISTINCT ON forces its own key to lead the sort, so bounding on that statement kept the lexicographically lowest server ids and left a workflow's most recently used servers archived. Deduplication and bounding are now separate stages. CLI: a total miss on tables move reported only in notFound exited 0; unsetting a key or removing a profile mutated the first duplicate INI block while reads merged later ones, so the removal appeared to succeed and did nothing; an import that rejected cells but no rows showed a clean progress line; and the --run-id help implied idempotency it does not provide. Server: a run with no recorded output projection let block-name selectors past the new validation; the billing window comparison still fired on a bound that parsed but failed the shared schema; CSV rejection accounting reached only the streaming path, so buffered and synchronous imports still dropped records silently, through to the Copilot tool that reports them; case-insensitive tag name uniqueness now serializes on the knowledge-base row the delete paths already lock; and a failed sync claim reports the lifecycle reason rather than always claiming a sync is in progress. Reverts an over-scrub from the previous commit: workspace-file-imports is consumed only by Copilot, so naming save_upload and glob there is the correct remediation rather than a leak, and the sweep that guards against leaks now exempts it explicitly. Corrects two contract descriptions that promised a bulk tag save would rename or relocate an occupied slot, which it deliberately no longer does. * fix(cli): remove flags a caller cannot use, and correct three that misled Removes surface that should not have shipped: - `files uploads get` is hidden. Its `--upload-token` was required, and the token is minted and consumed inside a single `files upload`, which completes or aborts its session before returning. Nothing in the CLI could produce the value, so the command answered every invocation by asking for something unobtainable. The same flag is dropped from the two table-import commands, where a CLI-created import is already queryable without it. - The `--no-<flag>` companion that sent JSON null is gone. `--no-X` means "send boolean false" on thirty-seven other flags, and one spelling should not carry two meanings. `--description ''` already clears the displayed value, and the help now warns that the literal word null is stored as text rather than suggesting a substitute, because on the OAuth client fields null revokes a stored grant and an empty string does not. - The document extraction method column and its contract field are reverted. Nothing read them, they were null for every existing document, and the name collided with the parser metadata field that already exists. Corrects flags that misled: the workflow move destination is `--to`, matching its two siblings rather than meaning the opposite of `--folder` one command over; `files list --recursive` is a bare flag like the four folder deletes rather than a twelve-alias string; the dispatch row cap takes a count instead of its wire object; `--yes` no longer claims to be required on commands that accept `--dry-run`; cancelling every run on a table is confirm-gated; and the retry-processing negation, which the route rejects, is suppressed. Extends the guard that missed all of this: it swept only `--x-` prefixes over generated commands, so a header spelled without one was invisible to it. It now derives every header name from the operation table and sweeps the assembled program. * fix(mcp): budget MCP restore against the workflow's live server fanout Restore bounded its candidates at the per-workflow server limit counting archived rows only, never subtracting the memberships the workflow already holds live. The fanout validation a few lines later in the same deploy transaction counts live servers against that same limit, so a workflow with both live and archived registrations could restore past it and roll the whole deployment back. The candidate query now bounds on the remaining headroom, and the budget is re-checked under the server locks and spent once per accepted candidate, so a create that lands between the count and the unarchive cannot push it over. Candidates that do not fit are dropped by recency, matching how the set is already selected, and stay archived with a warning naming the workflow, the server, and the reason — restore still never throws inside the deploy transaction. One residual is left open deliberately: a create on a server outside the candidate set is serialized by neither the locks nor the recount. Closing it would need a workflow-level lock, which would change the ordering every other writer here depends on, and the create path runs its own limit check. * fix(mcp): stop restore spending its budget on servers it cannot restore A server can hold both a live registration and archived ones for the same workflow: the partial unique index constrains only the live row. Such a server was counted twice — once shrinking the restore budget, once consuming one of its slots — before the liveness check under the lock skipped it. While the bound was the full server limit that waste was invisible; once the bound became the remaining headroom, every slot spent that way cost a registration that could have been restored. The candidate query now excludes servers the workflow is already live on, so the budget and the candidate set agree. The exclusion sits on the inner stage, before deduplication and the bound, and is a pre-lock optimisation only: the check under the server lock stays authoritative, because the query can go stale between reading and unarchiving. Candidates rejected for a tool-name collision, the per-server cap, or the metadata budget are still not replaced. That case is only knowable under the lock, so replacing it would mean fetching past the bound and locking servers outside the candidate set, widening an ordering every writer here relies on.
149 lines
8.1 KiB
JSON
149 lines
8.1 KiB
JSON
{
|
|
"name": "simstudio",
|
|
"packageManager": "bun@1.3.14",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"license": "Apache-2.0",
|
|
"workspaces": [
|
|
"apps/*",
|
|
"packages/*"
|
|
],
|
|
"scripts": {
|
|
"build": "turbo run build",
|
|
"dev": "turbo run dev",
|
|
"dev:sockets": "cd apps/realtime && bun run dev",
|
|
"dev:full": "bunx concurrently -n \"App,Realtime\" -c \"cyan,magenta\" \"cd apps/sim && bun run dev\" \"cd apps/realtime && bun run dev\"",
|
|
"dev:full:capped": "bunx concurrently -n \"App,Realtime\" -c \"cyan,magenta\" \"cd apps/sim && bun run dev:capped\" \"cd apps/realtime && bun run dev\"",
|
|
"test": "bun run test:setup && bun run test:icon-path-precision && bun run test:tool-registry-boundary && bun run test:generators && turbo run test",
|
|
"test:setup": "bun run --cwd packages/sim-setup test",
|
|
"test:icon-path-precision": "bunx vitest run scripts/check-icon-path-precision.test.ts",
|
|
"test:tool-registry-boundary": "bunx vitest run scripts/check-tool-registry-boundary.test.ts",
|
|
"test:generators": "bunx vitest run scripts/generate-v2-cli-api.test.ts scripts/generate-docs.test.ts",
|
|
"format": "turbo run format",
|
|
"format:check": "turbo run format:check",
|
|
"lint": "turbo run lint",
|
|
"lint:check": "turbo run lint:check",
|
|
"lint:helm": "helm lint ./helm/sim --strict --values ./helm/sim/test/values-lint.yaml",
|
|
"lint:all": "turbo run lint && bun run lint:helm",
|
|
"check": "turbo run format:check",
|
|
"check:boundaries": "bun run scripts/check-monorepo-boundaries.ts",
|
|
"check:api-validation": "bun run scripts/check-api-validation-contracts.ts --check",
|
|
"check:fork-dependent-coverage": "bun run scripts/check-fork-dependent-coverage.ts",
|
|
"generate:openapi": "bun run scripts/generate-openapi.ts",
|
|
"check:openapi": "bun run scripts/check-openapi.ts",
|
|
"generate:cli-api": "bun run scripts/generate-v2-cli-api.ts",
|
|
"check:cli-api": "bun run scripts/generate-v2-cli-api.ts --check",
|
|
"generate:cli-docs": "bun run scripts/generate-cli-docs.ts",
|
|
"check:cli-docs": "bun run scripts/generate-cli-docs.ts --check",
|
|
"check:canonical-index": "bun run scripts/check-canonical-index-surface.ts",
|
|
"check:cron-parity": "bun run scripts/check-cron-parity.ts",
|
|
"check:api-validation:strict": "bun run scripts/check-api-validation-contracts.ts --check --enforce-boundary-baseline",
|
|
"check:realtime-prune": "bun run scripts/check-realtime-prune-graph.ts",
|
|
"check:tool-request-boundary": "bun run scripts/check-tool-request-boundary.ts",
|
|
"check:tool-registry-boundary": "bun run scripts/check-tool-registry-boundary.ts --check",
|
|
"check:trigger-block-cycle": "bun run scripts/check-trigger-block-cycle.ts",
|
|
"check:import-specifiers": "bun run scripts/check-import-specifiers.ts",
|
|
"check:sql-date-binding": "bun run scripts/check-sql-date-binding.ts",
|
|
"check:zustand-v5": "bun run scripts/check-zustand-v5-selectors.ts",
|
|
"check:react-query": "bun run scripts/check-react-query-patterns.ts --check",
|
|
"check:client-boundary": "bun run scripts/check-client-boundary-imports.ts --check",
|
|
"check:utils": "bun run scripts/check-utils-enforcement.ts",
|
|
"check:canvas-sentences": "bun run apps/sim/scripts/check-canvas-sentences.ts --require-coverage",
|
|
"check:bare-icons": "bun run scripts/check-bare-icons.ts",
|
|
"check:icon-paths": "bun run scripts/check-icon-paths.ts",
|
|
"check:icon-path-precision": "bun run scripts/check-icon-path-precision.ts",
|
|
"check:migrations": "bun run scripts/check-migrations-safety.ts",
|
|
"check:native-typecheck": "bun run scripts/check-native-typecheck.ts",
|
|
"check:source-text": "bun run scripts/check-source-text.ts",
|
|
"check:audits": "bun run scripts/run-audits.ts",
|
|
"check:skills": "bun run scripts/sync-skills.ts --check",
|
|
"check:desktop-bridge": "bun run scripts/check-desktop-bridge-contract.ts --check",
|
|
"check:desktop-ipc": "bun run scripts/check-desktop-ipc-contract.ts",
|
|
"check:route-verbs": "bun run scripts/check-route-verbs.ts",
|
|
"desktop-bridge-contract:update": "bun run scripts/check-desktop-bridge-contract.ts --update",
|
|
"mship-contracts:generate": "bun run scripts/sync-mothership-stream-contract.ts",
|
|
"mship-contracts:check": "bun run scripts/sync-mothership-stream-contract.ts --check",
|
|
"billing-protocol-contract:generate": "bun run scripts/sync-billing-protocol-contract.ts",
|
|
"billing-protocol-contract:check": "bun run scripts/sync-billing-protocol-contract.ts --check",
|
|
"tool-metadata:generate": "bun run scripts/sync-tool-metadata.ts",
|
|
"tool-metadata:check": "bun run scripts/sync-tool-metadata.ts --check",
|
|
"deployment-config:generate": "bun run scripts/generate-deployment-config.ts",
|
|
"deployment-config:check": "bun run scripts/generate-deployment-config.ts --check",
|
|
"integration-catalog:check": "bun run scripts/check-integration-catalog.ts",
|
|
"docs:check": "bun run scripts/generate-docs.ts --check",
|
|
"mship-tools:generate": "bun run scripts/sync-tool-catalog.ts",
|
|
"mship-tools:check": "bun run scripts/sync-tool-catalog.ts --check",
|
|
"trace-spans-contract:generate": "bun run scripts/sync-trace-spans-contract.ts",
|
|
"trace-spans-contract:check": "bun run scripts/sync-trace-spans-contract.ts --check",
|
|
"trace-attributes-contract:generate": "bun run scripts/sync-trace-attributes-contract.ts",
|
|
"trace-attributes-contract:check": "bun run scripts/sync-trace-attributes-contract.ts --check",
|
|
"trace-attribute-values-contract:generate": "bun run scripts/sync-trace-attribute-values-contract.ts",
|
|
"trace-attribute-values-contract:check": "bun run scripts/sync-trace-attribute-values-contract.ts --check",
|
|
"trace-events-contract:generate": "bun run scripts/sync-trace-events-contract.ts",
|
|
"trace-events-contract:check": "bun run scripts/sync-trace-events-contract.ts --check",
|
|
"metrics-contract:generate": "bun run scripts/sync-metrics-contract.ts",
|
|
"metrics-contract:check": "bun run scripts/sync-metrics-contract.ts --check",
|
|
"vfs-snapshot-contract:generate": "bun run scripts/sync-vfs-snapshot-contract.ts",
|
|
"vfs-snapshot-contract:check": "bun run scripts/sync-vfs-snapshot-contract.ts --check",
|
|
"docs-manifest:generate": "bun run scripts/sync-docs-manifest.ts",
|
|
"docs-manifest:check": "bun run scripts/sync-docs-manifest.ts --check",
|
|
"mship:generate": "bun run scripts/generate-mship-contracts.ts",
|
|
"mship:check": "bun run scripts/generate-mship-contracts.ts --check",
|
|
"library:covers": "bun run scripts/generate-library-covers.tsx",
|
|
"library:covers:check": "bun run scripts/generate-library-covers.tsx --check",
|
|
"skills:sync": "bun run scripts/sync-skills.ts",
|
|
"sim": "bun run packages/sim-cli/src/index.ts",
|
|
"sim-setup": "bun run packages/sim-setup/src/index.ts",
|
|
"agent-stream-docs:generate": "bun run scripts/sync-agent-stream-docs.ts",
|
|
"agent-stream-docs:check": "bun run scripts/sync-agent-stream-docs.ts --check",
|
|
"prepare": "bun husky",
|
|
"type-check": "turbo run type-check",
|
|
"release": "bun run scripts/create-single-release.ts"
|
|
},
|
|
"overrides": {
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"next": "16.3.1",
|
|
"@next/env": "16.3.1",
|
|
"drizzle-orm": "^0.45.2",
|
|
"postgres": "^3.4.5",
|
|
"minimatch": "^10.2.5",
|
|
"mermaid": "11.16.1",
|
|
"zod": "4.3.6",
|
|
"e2b": "^2.36.1"
|
|
},
|
|
"optionalDependencies": {
|
|
"@next/swc-darwin-arm64": "16.3.1",
|
|
"@next/swc-darwin-x64": "16.3.1",
|
|
"@next/swc-linux-arm64-gnu": "16.3.1",
|
|
"@next/swc-linux-x64-gnu": "16.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/parser": "7.29.2",
|
|
"@biomejs/biome": "2.0.0-beta.5",
|
|
"@clack/prompts": "1.7.0",
|
|
"@octokit/rest": "^21.0.0",
|
|
"@types/opentype.js": "1.3.10",
|
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
"@vercel/og": "0.6.8",
|
|
"chalk": "5.6.2",
|
|
"glob": "13.0.0",
|
|
"gray-matter": "4.0.3",
|
|
"husky": "9.1.7",
|
|
"json-schema-to-typescript": "15.0.4",
|
|
"lint-staged": "16.0.0",
|
|
"opentype.js": "1.3.4",
|
|
"sharp": "0.35.3",
|
|
"turbo": "2.9.14"
|
|
},
|
|
"lint-staged": {
|
|
"*.{js,jsx,ts,tsx,json,css,scss}": [
|
|
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
|
|
]
|
|
},
|
|
"trustedDependencies": [
|
|
"isolated-vm",
|
|
"sharp"
|
|
]
|
|
}
|