@inneranimalmedia/agentsam-sdk 2.6.7 → 2.6.8
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 +37 -0
- package/docs/REPO_FILE_MAP.txt +132 -0
- package/migrations/d1/0018_goap_control_plane_remaster.sql +40 -0
- package/migrations/d1/0019_agentsam_agent_run_plan_todo.sql +14 -0
- package/migrations/d1/README_PORTABLE_CONTROL_PLANE.md +20 -9
- package/migrations/runtime/0002_goap_blackboard_v1.sql +15 -0
- package/migrations/runtime/0004_agent_run_plan_linkage.sql +8 -0
- package/native/agentsam-machine/cli/Cargo.toml +8 -1
- package/native/agentsam-machine/cli/README.md +21 -0
- package/native/agentsam-machine/core/Cargo.toml +7 -0
- package/native/agentsam-machine/core/README.md +14 -0
- package/native/agentsam-machine/core/build.rs +33 -0
- package/native/agentsam-machine/core/contracts/source-types.v1.json +353 -0
- package/native/agentsam-machine/core/src/lib.rs +6 -0
- package/native/agentsam-machine/core/src/source_types.rs +2 -2
- package/package.json +16 -6
- package/packages/agentsam-errors/package.json +1 -1
- package/packages/agentsam-errors/src/index.js +1 -0
- package/packages/agentsam-errors/src/tool.js +56 -0
- package/packages/agentsam-errors/test/tool.test.mjs +58 -0
- package/packages/agentsam-goap/README.md +52 -0
- package/packages/agentsam-goap/package.json +37 -0
- package/packages/agentsam-goap/src/adapters/d1-sqlite.js +570 -0
- package/packages/agentsam-goap/src/adapters/memory.js +199 -0
- package/packages/agentsam-goap/src/contracts.js +226 -0
- package/packages/agentsam-goap/src/control-plane.js +112 -0
- package/packages/agentsam-goap/src/errors.js +157 -0
- package/packages/agentsam-goap/src/index.js +5 -0
- package/packages/agentsam-goap/src/world.js +202 -0
- package/packages/agentsam-goap/test/goap-control-plane.test.mjs +245 -0
- package/packages/agentsam-goap/test/world.test.mjs +79 -0
- package/packages/agentsam-nav/dist/Nav.d.ts +43 -0
- package/packages/agentsam-nav/dist/NavCollapsible.d.ts +10 -0
- package/packages/agentsam-nav/dist/NavContent.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavFooter.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavGroup.d.ts +3 -0
- package/packages/agentsam-nav/dist/NavHeader.d.ts +2 -0
- package/packages/agentsam-nav/dist/NavMenu.d.ts +22 -0
- package/packages/agentsam-nav/dist/NavProvider.d.ts +35 -0
- package/packages/agentsam-nav/dist/NavTrigger.d.ts +2 -0
- package/packages/agentsam-nav/dist/Surfaces.d.ts +41 -0
- package/packages/agentsam-nav/dist/browser.d.ts +11 -0
- package/packages/agentsam-nav/dist/browser.global.js +135 -0
- package/packages/agentsam-nav/dist/browser.js +7290 -0
- package/packages/agentsam-nav/dist/contracts.d.ts +76 -0
- package/packages/agentsam-nav/dist/index.d.ts +11 -0
- package/packages/agentsam-nav/dist/index.js +7291 -0
- package/packages/agentsam-nav/dist/legacy.css +83 -0
- package/packages/agentsam-nav/dist/shell.css +113 -0
- package/packages/agentsam-nav/dist/theme.css +113 -0
- package/packages/agentsam-nav/dist/utils.d.ts +1 -0
- package/packages/agentsam-repository/src/goap.js +13 -14
- package/packages/agentsam-repository/src/goap.js.bak-20260922011251 +670 -0
- package/packages/agentsam-repository/src/tickets.js +15 -22
- package/packages/agentsam-repository/test/goap-tickets-workspace-state.test.mjs +19 -8
- package/packages/connectors/cloudflare/package.json +3 -1
- package/packages/identity/tests/lane1-packed-consumer.test.mjs +1 -1
- package/python/agentsam_sdk/repository/intelligence/discovery.py +27 -2
- package/python/agentsam_sdk/repository/intelligence/git.py +4 -0
- package/python/tests/test_repository_intelligence.py +30 -0
- package/src/cli/command-catalog.js +2 -1
- package/src/cli.js +10 -1
- package/src/commands/goap-world.js +134 -0
- package/src/commands/goap.js +11 -4
- package/src/commands/machine-binary.js +33 -27
- package/src/commands/machine-runtime.js +266 -0
- package/src/commands/machine.js +122 -51
- package/src/commands/package.js +530 -0
- package/src/commands/plan-ledger.js +370 -0
- package/src/commands/plan.js +183 -0
- package/src/commands/skill.js +78 -17
- package/src/knowledge/source.js +1 -1
- package/src/lib/slash-commands.js +1 -1
- package/src/local/runtime-store.js +24 -2
- package/src/local/sqlite.js +17 -0
- package/src/sam/operations/package-audit.js +41 -0
- package/src/sam/seed.js +2 -0
- package/skills/grok-auth/SKILL.md +0 -110
- package/skills/grok-auth/agentsam.skill.json +0 -25
- package/skills/grok-auth/references/grok-identity.md +0 -64
- package/skills/grok-auth/references/per-user-data.md +0 -49
- package/skills/grok-auth/references/prewired-and-env.md +0 -54
- package/skills/grok-auth/references/session-ui.md +0 -133
- package/skills/grok-auth/references/sign-in-methods.md +0 -55
- package/skills/grok-auth/references/wiring.md +0 -71
- package/skills/grok-building-games/SKILL.md +0 -213
- package/skills/grok-building-games/agentsam.skill.json +0 -25
- package/skills/grok-building-games/references/3d-libs.md +0 -64
- package/skills/grok-building-games/references/ai-pathfinding.md +0 -122
- package/skills/grok-building-games/references/audio.md +0 -129
- package/skills/grok-building-games/references/babylon.md +0 -202
- package/skills/grok-building-games/references/collision-physics.md +0 -122
- package/skills/grok-building-games/references/ecs-architecture.md +0 -111
- package/skills/grok-building-games/references/game-feel-juice.md +0 -110
- package/skills/grok-building-games/references/genres/board-card-chess.md +0 -89
- package/skills/grok-building-games/references/genres/endless-runner.md +0 -83
- package/skills/grok-building-games/references/genres/fps.md +0 -105
- package/skills/grok-building-games/references/genres/platformer-2d.md +0 -97
- package/skills/grok-building-games/references/genres/puzzle-match3-tetris.md +0 -131
- package/skills/grok-building-games/references/genres/racing-kart.md +0 -106
- package/skills/grok-building-games/references/genres/topdown-twin-stick.md +0 -97
- package/skills/grok-building-games/references/genres/tower-defense.md +0 -84
- package/skills/grok-building-games/references/genres/voxel-minecraft.md +0 -89
- package/skills/grok-building-games/references/input.md +0 -139
- package/skills/grok-building-games/references/phaser.md +0 -277
- package/skills/grok-building-games/references/procedural-generation.md +0 -141
- package/skills/grok-building-games/references/save-persistence.md +0 -108
- package/skills/grok-building-games/references/threejs-foundational.md +0 -148
- package/skills/grok-controls/SKILL.md +0 -274
- package/skills/grok-controls/agentsam.skill.json +0 -25
- package/skills/grok-design-ui/SKILL.md +0 -122
- package/skills/grok-design-ui/agentsam.skill.json +0 -25
- package/skills/grok-design-ui/references/animations.md +0 -379
- package/skills/grok-design-ui/references/performance.md +0 -88
- package/skills/grok-design-ui/references/refined-ui.md +0 -384
- package/skills/grok-design-ui/references/surfaces.md +0 -247
- package/skills/grok-design-ui/references/typography.md +0 -123
- package/skills/grok-game-animation-frames/SKILL.md +0 -84
- package/skills/grok-game-animation-frames/agentsam.skill.json +0 -25
- package/skills/grok-game-asset-core/SKILL.md +0 -69
- package/skills/grok-game-asset-core/agentsam.skill.json +0 -25
- package/skills/grok-game-character-consistency/SKILL.md +0 -69
- package/skills/grok-game-character-consistency/agentsam.skill.json +0 -25
- package/skills/grok-game-tilesets/SKILL.md +0 -65
- package/skills/grok-game-tilesets/agentsam.skill.json +0 -25
- package/skills/grok-game-ui-icons/SKILL.md +0 -56
- package/skills/grok-game-ui-icons/agentsam.skill.json +0 -25
- package/skills/grok-generate2dmap/LICENSE +0 -21
- package/skills/grok-generate2dmap/SKILL.md +0 -120
- package/skills/grok-generate2dmap/SOURCE.md +0 -6
- package/skills/grok-generate2dmap/agentsam.skill.json +0 -25
- package/skills/grok-generate2dmap/references/deliverables.md +0 -101
- package/skills/grok-generate2dmap/references/layered-map-contract.md +0 -209
- package/skills/grok-generate2dmap/references/map-strategies.md +0 -341
- package/skills/grok-generate2dmap/references/object-production-gate.md +0 -24
- package/skills/grok-generate2dmap/references/pipeline.md +0 -149
- package/skills/grok-generate2dmap/references/prop-pack-contract.md +0 -174
- package/skills/grok-generate2dmap/references/side-scroll-stages.md +0 -29
- package/skills/grok-generate2dmap/scripts/compose_layered_preview.py +0 -157
- package/skills/grok-generate2dmap/scripts/extract_prop_pack.py +0 -369
- package/skills/grok-generate2dsprite/LICENSE +0 -21
- package/skills/grok-generate2dsprite/SKILL.md +0 -313
- package/skills/grok-generate2dsprite/SOURCE.md +0 -6
- package/skills/grok-generate2dsprite/agentsam.skill.json +0 -25
- package/skills/grok-generate2dsprite/references/modes.md +0 -124
- package/skills/grok-generate2dsprite/references/prompt-rules.md +0 -315
- package/skills/grok-generate2dsprite/scripts/generate2dsprite.py +0 -1031
- package/skills/grok-generate2dsprite/scripts/make_layout_guide.py +0 -109
- package/skills/grok-imagine/SKILL.md +0 -201
- package/skills/grok-imagine/agentsam.skill.json +0 -25
- package/skills/grok-multiplayer-p2p/SKILL.md +0 -111
- package/skills/grok-multiplayer-p2p/agentsam.skill.json +0 -25
- package/skills/grok-multiplayer-p2p/references/react-binding.md +0 -144
- package/skills/grok-multiplayer-p2p/references/signaling-relay.md +0 -269
- package/skills/grok-neon/SKILL.md +0 -157
- package/skills/grok-neon/agentsam.skill.json +0 -25
- package/skills/grok-og/SKILL.md +0 -102
- package/skills/grok-og/agentsam.skill.json +0 -25
- package/skills/grok-og/references/brand-pass.md +0 -53
- package/skills/grok-og/references/custom-card.md +0 -107
- package/skills/grok-og/references/favicon-and-icons.md +0 -48
- package/skills/grok-og/references/og-type-contract.md +0 -18
- package/skills/grok-og/references/placeholder-card.md +0 -21
- package/skills/grok-og/references/x-banner.md +0 -41
- package/skills/grok-threejs/SKILL.md +0 -67
- package/skills/grok-threejs/agentsam.skill.json +0 -25
- package/skills/grok-threejs/references/llms-full.txt +0 -2780
- package/skills/grok-video2dsprite/LICENSE +0 -21
- package/skills/grok-video2dsprite/SKILL.md +0 -236
- package/skills/grok-video2dsprite/SOURCE.md +0 -6
- package/skills/grok-video2dsprite/agentsam.skill.json +0 -25
- package/skills/grok-video2dsprite/references/pipeline.md +0 -90
- package/skills/grok-video2dsprite/references/prompt-rules.md +0 -63
- package/skills/grok-video2dsprite/scripts/video2dsprite.py +0 -490
- package/skills/grok-xai-api/SKILL.md +0 -152
- package/skills/grok-xai-api/agentsam.skill.json +0 -25
- package/test/account-session.test.mjs +0 -101
- package/test/agent-capabilities.test.mjs +0 -67
- package/test/app-authority-context.test.mjs +0 -32
- package/test/app-building-skills.test.mjs +0 -61
- package/test/apps-scaffold-contract.test.mjs +0 -115
- package/test/blender-cad.test.mjs +0 -146
- package/test/cad-docker.test.mjs +0 -96
- package/test/capabilities.test.mjs +0 -133
- package/test/cli/api-key-env-whoami.test.mjs +0 -129
- package/test/cli/catalog-authority.test.mjs +0 -64
- package/test/cli/codebaseindex-plan-ux.test.mjs +0 -37
- package/test/cli/eval-live.test.mjs +0 -219
- package/test/cli/go.test.mjs +0 -128
- package/test/cli/local-vault-and-provider-setup.test.mjs +0 -268
- package/test/cli/machine-command.test.mjs +0 -34
- package/test/cli/mcp-client.test.mjs +0 -256
- package/test/cli/preferences-runtime.test.mjs +0 -11
- package/test/cli/runtime-persist.test.mjs +0 -56
- package/test/cli/runtime-ui.test.mjs +0 -141
- package/test/cli/rust-command.test.mjs +0 -21
- package/test/cli/skill-npm-and-env.test.mjs +0 -52
- package/test/cli/status-actions.test.mjs +0 -88
- package/test/cli/wireframes-go-registry.test.mjs +0 -139
- package/test/cli-preferences.test.mjs +0 -46
- package/test/cloudflare-connector.test.mjs +0 -93
- package/test/cloudflare-runtime.test.mjs +0 -82
- package/test/context.test.mjs +0 -159
- package/test/credentials-audit.test.mjs +0 -113
- package/test/deploy-health-scan.test.mjs +0 -95
- package/test/deploy-receipt.test.mjs +0 -91
- package/test/dockerize.test.mjs +0 -93
- package/test/error-diagnostics.test.mjs +0 -124
- package/test/eval-context.test.mjs +0 -37
- package/test/execution-approvals.test.mjs +0 -27
- package/test/fixtures/cad/courtyard-house.json +0 -208
- package/test/fixtures/knowledge-rpc-worker.mjs +0 -16
- package/test/fixtures/project-authority/customer-app/.agentsam/app.json +0 -5
- package/test/fixtures/project-authority/customer-app/apps/my-product/index.ts +0 -1
- package/test/fixtures/project-authority/customer-app/wrangler.toml +0 -17
- package/test/gcloud-auth.test.mjs +0 -111
- package/test/go/build-source-identity.test.mjs +0 -31
- package/test/go/cloudflare-probe.test.mjs +0 -317
- package/test/go/distribution.test.mjs +0 -28
- package/test/google-cloud-connection.test.mjs +0 -83
- package/test/google-cloud-inventory.test.mjs +0 -64
- package/test/indexing-provider.test.mjs +0 -29
- package/test/init-options.test.mjs +0 -35
- package/test/integration/ai-access-onboarding.test.mjs +0 -47
- package/test/integration/app-command.test.mjs +0 -85
- package/test/integration/autorag-project-authority.integration.test.mjs +0 -51
- package/test/integration/autorag-runtime-discovery.test.mjs +0 -107
- package/test/integration/cad-discovery.test.mjs +0 -158
- package/test/integration/cad-docker-executor.test.mjs +0 -249
- package/test/integration/cad-execution.test.mjs +0 -184
- package/test/integration/cad-project-app.test.mjs +0 -31
- package/test/integration/cad-project-d1.test.mjs +0 -25
- package/test/integration/cad-project-native.test.mjs +0 -24
- package/test/integration/cad-project-workflow.test.mjs +0 -9
- package/test/integration/cad-project.test.mjs +0 -85
- package/test/integration/cli-help.test.mjs +0 -41
- package/test/integration/cms-app-scaffold.test.mjs +0 -77
- package/test/integration/cms-site-tenancy-contract.test.mjs +0 -268
- package/test/integration/codebaseindex-ingest.test.mjs +0 -255
- package/test/integration/core-client.integration.test.mjs +0 -55
- package/test/integration/database-hosted-honesty.test.mjs +0 -49
- package/test/integration/desktop-keychain-boundary.test.mjs +0 -45
- package/test/integration/error-runtime-rpc.test.mjs +0 -71
- package/test/integration/features-resolve.test.mjs +0 -147
- package/test/integration/hosted-work-host-authority.test.mjs +0 -47
- package/test/integration/icon-registry.test.mjs +0 -67
- package/test/integration/ingest-discover-models.test.mjs +0 -30
- package/test/integration/inspect-path-cli.test.mjs +0 -46
- package/test/integration/install-script.test.mjs +0 -110
- package/test/integration/inventory-core.test.mjs +0 -53
- package/test/integration/inventory-eligibility.test.mjs +0 -59
- package/test/integration/inventory-evidence.test.mjs +0 -125
- package/test/integration/knowledge-rpc.test.mjs +0 -112
- package/test/integration/local-fs.test.mjs +0 -113
- package/test/integration/local-provider-bridge.test.mjs +0 -65
- package/test/integration/local-studio-settings-production.test.mjs +0 -40
- package/test/integration/lockfile-sync.test.mjs +0 -26
- package/test/integration/merkle-cli.test.mjs +0 -61
- package/test/integration/merkle-persistence-identity.test.mjs +0 -48
- package/test/integration/plugins-cloudflare.integration.test.mjs +0 -28
- package/test/integration/provider-env-cli.test.mjs +0 -60
- package/test/integration/provider-factory.test.mjs +0 -197
- package/test/integration/repository-company-graph.test.mjs +0 -90
- package/test/integration/runtime-migrations.test.mjs +0 -87
- package/test/integration/runtime-status.integration.test.mjs +0 -227
- package/test/integration/sam-activity-recovery.test.mjs +0 -147
- package/test/integration/sam-decision.test.mjs +0 -584
- package/test/integration/sam-kernel.test.mjs +0 -99
- package/test/integration/sam-planning-astar.test.mjs +0 -279
- package/test/integration/scaffold-cloudflare.test.mjs +0 -46
- package/test/integration/skill-runtime.test.mjs +0 -240
- package/test/integration/storage-architecture.test.mjs +0 -154
- package/test/integration/store-discovery.test.mjs +0 -44
- package/test/integration/studio-fs-pty-e2e.test.mjs +0 -294
- package/test/integration/terminal-exec.integration.test.mjs +0 -86
- package/test/integration/theme-package-registry.test.mjs +0 -31
- package/test/integration/tool-runtime.test.mjs +0 -124
- package/test/integration/tool-schema.test.mjs +0 -59
- package/test/jr-dev-skill.test.mjs +0 -26
- package/test/knowledge-context-pack.test.mjs +0 -19
- package/test/knowledge-postgres.test.mjs +0 -40
- package/test/knowledge-service.test.mjs +0 -110
- package/test/knowledge.test.mjs +0 -206
- package/test/live/terminal-transport.live.test.mjs +0 -24
- package/test/local-sessions.test.mjs +0 -57
- package/test/local-studio-deploy.test.mjs +0 -83
- package/test/loopback-oauth.test.mjs +0 -53
- package/test/merkle-render.test.mjs +0 -31
- package/test/mini.test.mjs +0 -140
- package/test/model-catalog.test.mjs +0 -70
- package/test/models.test.mjs +0 -309
- package/test/npm10-lock.test.mjs +0 -29
- package/test/ollama.test.mjs +0 -137
- package/test/open-url.test.mjs +0 -64
- package/test/openai-responses.test.mjs +0 -155
- package/test/portable-context.test.mjs +0 -94
- package/test/project-config.test.mjs +0 -81
- package/test/project-rules.test.mjs +0 -44
- package/test/provider-credentials.test.mjs +0 -106
- package/test/rehydrate.test.mjs +0 -25
- package/test/release-hygiene.test.mjs +0 -42
- package/test/repository-snapshot-view.test.mjs +0 -112
- package/test/responses-runner.test.mjs +0 -465
- package/test/runtime-activity.test.mjs +0 -98
- package/test/sdk-worker-contract.test.mjs +0 -72
- package/test/security.test.mjs +0 -266
- package/test/setup-planner.test.mjs +0 -74
- package/test/setup-runtime.test.mjs +0 -51
- package/test/shell.test.mjs +0 -281
- package/test/skills.test.mjs +0 -22
- package/test/smoke.mjs +0 -122
- package/test/telemetry.test.mjs +0 -79
- package/test/terminal/local-pty.mock.test.mjs +0 -153
- package/test/terminal-machine-identity.test.mjs +0 -88
- package/test/theme-portability.test.mjs +0 -14
- package/test/tools-search.test.mjs +0 -73
- package/test/unit/website-assets-bindings.test.mjs +0 -60
- package/test/whoami-resume.test.mjs +0 -157
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Custom card: generate `public/og.jpg`
|
|
2
|
-
|
|
3
|
-
For prompt-craft, composition, and blind read-back verification, follow the
|
|
4
|
-
`imagine` and `game-asset-core` skills — this file owns the **card-specific**
|
|
5
|
-
contract only (size, lockup, wiring).
|
|
6
|
-
|
|
7
|
-
1. **Set the canvas with `aspect_ratio: "16:9"`.** The call looks like
|
|
8
|
-
`{ "prompt": "…", "aspect_ratio": "16:9" }` — ratio words in the prompt do
|
|
9
|
-
**not** set the canvas. At 2mp, 16:9 renders 1792×1008, so the normalize
|
|
10
|
-
below cover-crops to 1200×630 trimming only ~3% vertically, which a
|
|
11
|
-
centered title survives. A narrower canvas is what kills titles: from 3:2
|
|
12
|
-
the same crop takes **~21% vertically**, straight through the lockup.
|
|
13
|
-
Paths:
|
|
14
|
-
|
|
15
|
-
- **Default — one call with `aspect_ratio: "16:9"`:** `imagine_text_to_image`
|
|
16
|
-
with the art + baked title. **Check the output dimensions** via
|
|
17
|
-
`read_file` / Pillow on the returned `file_path`; if the ratio missed, reframe or use
|
|
18
|
-
the API path.
|
|
19
|
-
- **Reframe if needed:** pass the prior `file_path` into `imagine_image_to_image`
|
|
20
|
-
with **`aspect_ratio: "16:9"`** and a prompt like "extend the scenery
|
|
21
|
-
left and right into a wider frame; keep the title lettering and
|
|
22
|
-
central subject exactly as they are".
|
|
23
|
-
- **Optional — true 2:1 via the xAI Images API:** `POST
|
|
24
|
-
https://api.x.ai/v1/images/generations` with `"aspect_ratio": "2:1"`
|
|
25
|
-
and `response_format: "b64_json"` using the injected `XAI_API_KEY`
|
|
26
|
-
(see the `xai-api` skill). 2mp 2:1 is 1984×992; normalize then trims
|
|
27
|
-
only ~2.4% per side and nothing vertical.
|
|
28
|
-
|
|
29
|
-
Build the prompt from the app's theme, palette, and characters. If the
|
|
30
|
-
app already has a key generated asset (hero sprite, title scene), pass
|
|
31
|
-
its `file_path` into `imagine_image_to_image` so the card matches in-game art —
|
|
32
|
-
same 16:9 + check-the-output rule applies.
|
|
33
|
-
**Last resort only** (no `imagine_text_to_image` and no xAI Images API): stay
|
|
34
|
-
on whatever canvas you have and keep the entire title block inside the
|
|
35
|
-
**middle half** of the frame height, with the crop-clipping check in
|
|
36
|
-
step 6 as the gate.
|
|
37
|
-
2. **Bake the title in like a game cover.** Store-page covers (Stardew Valley,
|
|
38
|
-
Cuphead) lead with a short stylized logo-type title. Put the exact app name
|
|
39
|
-
in quotes in the prompt; 1–3 strong words; optional short tagline under the
|
|
40
|
-
title in smaller lettering (exact words in quotes).
|
|
41
|
-
- **Stack multi-word titles** into a two-line lockup ("SKY" over "STRIKE").
|
|
42
|
-
- **Center the block both ways** with generous margins — avoid "upper third"
|
|
43
|
-
/ percentage placement (models hug the edge).
|
|
44
|
-
- **Bound the width**: lettering spans roughly half to two-thirds of the
|
|
45
|
-
frame, never border to border.
|
|
46
|
-
- **Keep comfortable margins anyway.** From a 16:9 canvas the normalize
|
|
47
|
-
below trims only ~3% vertically; from a 2:1 API canvas it trims
|
|
48
|
-
nothing vertical and ~2.4% per side. The crop turns destructive when
|
|
49
|
-
the canvas comes back off-ratio — an edit that pinned to its input's
|
|
50
|
-
ratio, or a model miss — so **check the raw canvas dimensions before
|
|
51
|
-
cropping**, and re-ratio first if it isn't ~16:9 or 2:1.
|
|
52
|
-
3. **Verify glyphs *and* layout on read-back** (see `imagine` / `game-asset-core`
|
|
53
|
-
for the blind-describe loop). On a garble or layout miss, **regenerate with a
|
|
54
|
-
corrected prompt** — never try to move a logo with `imagine_image_to_image` (frame
|
|
55
|
-
translation / seams). After two failed attempts, ship the card **artwork-only**
|
|
56
|
-
(titleless).
|
|
57
|
-
|
|
58
|
-
**Intentional exception vs `imagine`'s "rebuild text with code" rule:** the
|
|
59
|
-
share card is a single static PNG; there is no reliable in-sandbox path to
|
|
60
|
-
composite crisp code-drawn lettering onto generative art for this asset, so
|
|
61
|
-
a clean titleless card is the correct fallback after two glyph failures.
|
|
62
|
-
4. **Normalize to exactly 1200×630 JPEG** with the baked-in ffmpeg (cover-crop —
|
|
63
|
-
from 16:9 this shaves ~3% top/bottom; from 2:1 ~2.4% per side and
|
|
64
|
-
nothing vertical). **JPEG, not PNG**: the card is
|
|
65
|
-
photographic generative art, and a PNG of it lands at 1–2 MB — heavy
|
|
66
|
-
enough that link scrapers (X card previews included) time out or skip the
|
|
67
|
-
image, so the card silently fails to unfurl. JPEG at this quality is
|
|
68
|
-
~150–300 KB with no visible loss at unfurl size:
|
|
69
|
-
|
|
70
|
-
```sh
|
|
71
|
-
ffmpeg -y -i card-raw.jpg \
|
|
72
|
-
-vf "scale=1200:630:force_original_aspect_ratio=increase,crop=1200:630" \
|
|
73
|
-
-q:v 4 /workspace/.grok/og.jpg.tmp
|
|
74
|
-
node scripts/write-atomic.mjs /workspace/.grok/og.jpg.tmp public/og.jpg
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
5. **Tell the injector the card is custom** — set `"card": "custom"` in
|
|
78
|
-
`src/lib/og/site.json`, handed over the same way, and keep `public/og.jpg`:
|
|
79
|
-
|
|
80
|
-
```sh
|
|
81
|
-
node scripts/write-atomic.mjs /workspace/.grok/site.json.tmp src/lib/og/site.json
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Bake also infers custom
|
|
85
|
-
from the file if the flag is missing, but brand-check still requires the
|
|
86
|
-
field. The injector emits the absolute `https://${host}/og.jpg` URL. Do not
|
|
87
|
-
add `og:image` to `__root.tsx`.
|
|
88
|
-
6. **Verify before finishing** (Pillow is installed; `ffprobe` is **not**):
|
|
89
|
-
|
|
90
|
-
```sh
|
|
91
|
-
python3 -c "
|
|
92
|
-
from PIL import Image; import os
|
|
93
|
-
im = Image.open('public/og.jpg')
|
|
94
|
-
kb = os.path.getsize('public/og.jpg') // 1024
|
|
95
|
-
print(im.size, f'{kb} KB')"
|
|
96
|
-
# expect: (1200, 630) and under 600 KB (keeps X and other scrapers
|
|
97
|
-
# reliable; target <= 300 KB — if over, bump -q:v up a step and re-encode)
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Read back the final `public/og.jpg`, not the pre-crop raw** — the crop
|
|
101
|
-
is where clipping happens. This is a **hard gate, not an impression**:
|
|
102
|
-
if any title glyph touches a frame edge or is visibly cut, the card is
|
|
103
|
-
**rejected** — do not ship it, whatever else is right about it. Fix the
|
|
104
|
-
ratio (step 1) or regenerate with the width bound restated; a shipped
|
|
105
|
-
decapitated title is worse than the placeholder. Then confirm the card
|
|
106
|
-
reads like *this* app at thumbnail size — clear subject, correctly
|
|
107
|
-
spelled title (if any), comfortable margins.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Favicon and PWA icons
|
|
2
|
-
|
|
3
|
-
## Favicon: hand-author `public/favicon.svg`
|
|
4
|
-
|
|
5
|
-
Every app gets one, and it works in live preview immediately (no host needed).
|
|
6
|
-
|
|
7
|
-
- **Write the SVG by hand — never `imagine_text_to_image`.** It must stay crisp at 16px:
|
|
8
|
-
one bold glyph or shape, flat fills from the app's design tokens, a square
|
|
9
|
-
`viewBox`, a handful of elements at most. For whimsical apps an emoji-text
|
|
10
|
-
SVG is a fine quick win:
|
|
11
|
-
|
|
12
|
-
```svg
|
|
13
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
14
|
-
<rect width="100" height="100" rx="20" fill="#1a1b26"/>
|
|
15
|
-
<text x="50" y="50" font-size="62" text-anchor="middle"
|
|
16
|
-
dominant-baseline="central">🥕</text>
|
|
17
|
-
</svg>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- Wire it in the root `head()`:
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
links: [
|
|
24
|
-
{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
|
|
25
|
-
{ rel: "stylesheet", href: appCss },
|
|
26
|
-
],
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
- Verify it renders non-blank and legible small (browser tab in a preview
|
|
30
|
-
screenshot, or read back a rasterized copy). Update it when the app's theme
|
|
31
|
-
or name changes meaning — it is part of the app's identity, not a set-and-forget.
|
|
32
|
-
|
|
33
|
-
## PWA icons: only for installable apps
|
|
34
|
-
|
|
35
|
-
When the app ships a web manifest (the user asked for installable / PWA /
|
|
36
|
-
home-screen behavior — do **not** invent a manifest just to have icons), add
|
|
37
|
-
raster icons derived from the favicon artwork so the identity stays
|
|
38
|
-
consistent:
|
|
39
|
-
|
|
40
|
-
- `public/icon-192.png` and `public/icon-512.png` — the favicon's glyph on
|
|
41
|
-
its tile, rasterized at size. Playwright (baked into the sandbox) can
|
|
42
|
-
screenshot the served `/favicon.svg` at a 192/512 viewport; or redraw the
|
|
43
|
-
same mark as a flat PNG. Keep it bold and flat — no photographic detail.
|
|
44
|
-
- A maskable variant (`"purpose": "maskable"`) needs the glyph inside the
|
|
45
|
-
center ~80% safe zone so launcher shapes don't clip it.
|
|
46
|
-
- Wire the manifest `icons` array plus `theme_color` / `background_color`
|
|
47
|
-
from the app's design tokens, and read the 192 back to confirm it stays
|
|
48
|
-
legible.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# `og:type` — why `x:game`, and the rejected alternatives
|
|
2
|
-
|
|
3
|
-
The game signal is written as `"type": "x:game"` in `src/lib/og/site.json`; the
|
|
4
|
-
platform injector turns it into `<meta property="og:type" content="x:game">`.
|
|
5
|
-
This will live forever in every shipped game, so the channel is fixed:
|
|
6
|
-
|
|
7
|
-
| Option | Verdict |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| **`site.json` `"type": "x:game"` → injector emits `<meta property="og:type" content="x:game">`** | **Chosen.** You write the field in `src/lib/og/site.json`; the PWA injector emits the standard OG content-type property. Value is a **namespaced type** (`x:game`) so it cannot be confused with a future global OGP `game` type or bare `website`. X's card pipeline keys off this exact emitted value. Do not put the meta tag in `__root.tsx`. Do not shorten to bare `game`. |
|
|
10
|
-
| **`og:type="game"` (no `x:`)** | **Rejected.** Looks like a global OGP type that does not exist on [ogp.me](https://ogp.me/#types); the product contract is the namespaced `x:game` string. |
|
|
11
|
-
| **`twitter:card`** | **Wrong layer for the game signal.** Layout only (`summary_large_image`). The PWA injector always emits it — do not treat the `og` skill as the place that adds it. Never use it as the game type. |
|
|
12
|
-
| **Separate `x:type` / `x:card` meta properties** | **Do not invent.** Extra properties double surface area (agents forget one of two tags). Namespacing inside `og:type`'s content (`x:game`) is enough. |
|
|
13
|
-
|
|
14
|
-
X (Twitter) uses `og:type="x:game"` when unfurling `*.grok.me` links to present
|
|
15
|
-
the card as a **game** rather than a generic website. This is a product contract
|
|
16
|
-
with X's card pipeline — keep the tag, and do not "correct" it to `website`
|
|
17
|
-
during refactors. Non-games should omit `og:type` or use `website` (the scraper
|
|
18
|
-
default).
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# The placeholder `og.grok.me` card (plain utility apps)
|
|
2
|
-
|
|
3
|
-
An app with no `public/og.jpg` unfurls with the hosted placeholder:
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
https://og.grok.me/v1/card.png?host={VITE_PUBLIC_HOSTNAME}&title={APP_NAME}
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
The injector builds that URL — do not paste it into `__root.tsx`.
|
|
10
|
-
|
|
11
|
-
- Optional theme colour: set `"color": "FF4D2E"` in `src/lib/og/site.json`
|
|
12
|
-
(6-digit hex, `#` optional). The injector appends `&color=` on the placeholder
|
|
13
|
-
URL; a themed URL written into `__root.tsx` is stripped. Custom cards ignore
|
|
14
|
-
`color`.
|
|
15
|
-
- On rename, update `APP_NAME` (tab title) **and** `site.json` `title` (share
|
|
16
|
-
card).
|
|
17
|
-
|
|
18
|
-
Live preview emits the same tags (the preview `X-Forwarded-Host` is a valid
|
|
19
|
-
image host). On publish the request `Host` is enough — do **not** write a `.env`
|
|
20
|
-
for it. Card pixels and `site.json` reach the unfurl on the **next deploy**
|
|
21
|
-
(identity is baked at `vite build`).
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# X feed card: `public/x-banner.jpg` (50:11)
|
|
2
|
-
|
|
3
|
-
**Games also ship a second, much wider card** that X uses in the feed (the
|
|
4
|
-
link-preview `og.jpg` is still required — this does not replace it). Write
|
|
5
|
-
`public/x-banner.jpg` at **exactly 50:11** (1200×264 — 1200 is the standard
|
|
6
|
-
max card width on the web, same as `og.jpg`). The injector emits
|
|
7
|
-
`x:game:image` (1200×264) from that file when the request has a public host.
|
|
8
|
-
Do **not** invent `x:game:og` or overload `og:image`. Do not add
|
|
9
|
-
`x:game:image` to `__root.tsx`.
|
|
10
|
-
|
|
11
|
-
Same JPEG / size discipline as `og.jpg` (keep it well under 600 KB).
|
|
12
|
-
**Custom `public/x-banner.jpg` — games only.** Use `imagine_text_to_image`
|
|
13
|
-
(or `imagine_image_to_image`) to generate a custom banner **only when the
|
|
14
|
-
app is a game**. Non-games omit the file — the injector then emits no
|
|
15
|
-
`x:game:image`. Do not paste `og.grok.me/v1/banner.png` (or any
|
|
16
|
-
`x:game:image`) into `__root.tsx`; the injector strips those tags.
|
|
17
|
-
Generate the art at 50:11 (`aspect_ratio: "50:11"` on
|
|
18
|
-
`imagine_text_to_image` — that ratio is on the Imagine schema; do **not**
|
|
19
|
-
substitute 16:9 and crop). Then normalize:
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
ffmpeg -y -i banner-raw.jpg \
|
|
23
|
-
-vf "scale=1200:264:force_original_aspect_ratio=increase,crop=1200:264" \
|
|
24
|
-
-q:v 4 /workspace/.grok/x-banner.jpg.tmp
|
|
25
|
-
node scripts/write-atomic.mjs /workspace/.grok/x-banner.jpg.tmp public/x-banner.jpg
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Safe lockup.** Unlike the centered `og.jpg` card, keep title, tagline, and
|
|
29
|
-
other critical content inside the **left-most 50% × top-most 80%** of the
|
|
30
|
-
finished 1200×264. Feed chrome overlays the **right ~25%** and **bottom
|
|
31
|
-
~20%**, so lettering there clashes. Raise the lockup above the midline (do
|
|
32
|
-
not vertically center it); comfortable left and top margins; never
|
|
33
|
-
edge-hug: a 50:11 frame decapitates edge-hugging lettering even faster than
|
|
34
|
-
the 1200×630 card. Scenery and characters may extend into those overlay
|
|
35
|
-
strips. Prompt Imagine in visual language — "title lockup in the left half,
|
|
36
|
-
sitting above the midline, empty strip along the bottom edge" — not
|
|
37
|
-
percentages. Reuse the link-cover art when you can (reframe the same scene
|
|
38
|
-
wider rather than inventing a second identity). Verify the 1200×264 JPEG
|
|
39
|
-
the same way as `og.jpg` (dimensions + under 600 KB + no clipped title).
|
|
40
|
-
Reject if any title or tagline glyph sits in the right half or the bottom
|
|
41
|
-
fifth of the frame.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: threejs
|
|
3
|
-
description: >
|
|
4
|
-
Official Three.js API and TSL (Three.js Shading Language) reference for LLM
|
|
5
|
-
code generation. Load when writing or debugging three.js / WebGL / WebGPU /
|
|
6
|
-
custom materials / shaders / GLTF / advanced three APIs beyond basic game
|
|
7
|
-
loop/controls. Prefer building-games for game correctness (loop, WASD,
|
|
8
|
-
camera, orientation); use this skill for full API/TSL depth. Triggers on
|
|
9
|
-
"three.js", "threejs", "WebGPU", "TSL", "NodeMaterial", "shader", "GLTF",
|
|
10
|
-
"MeshStandard", "OrbitControls", "WebGLRenderer".
|
|
11
|
-
metadata:
|
|
12
|
-
short-description: "Three.js + TSL full API (official llms-full reference)"
|
|
13
|
-
user-invocable: false
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
# Three.js (official LLM reference)
|
|
17
|
-
|
|
18
|
-
This skill vendors the **official** Three.js LLM documentation pack so the agent
|
|
19
|
-
can generate correct modern three.js without inventing outdated CDN/r128 APIs.
|
|
20
|
-
|
|
21
|
-
## Stack adaptation (this app builder)
|
|
22
|
-
|
|
23
|
-
You are in a **TanStack Start + React** workspace, not a bare HTML page:
|
|
24
|
-
|
|
25
|
-
| Official doc pattern | Do this here instead |
|
|
26
|
-
| --- | --- |
|
|
27
|
-
| `<script type="importmap">` + CDN three | **`npm install three`** (+ `@types/three` if needed); import from `"three"` / `"three/addons/…"` |
|
|
28
|
-
| Raw HTML canvas bootstrap | Prefer **@react-three/fiber + drei** for games/UI integration (`building-games` + `3d-libs.md`) |
|
|
29
|
-
| Standalone `WebGLRenderer` demo | Fine for a self-contained canvas module; still install three via npm so Vercel build has it |
|
|
30
|
-
| Always “latest” CDN version | Pin via **package.json** so dev and deploy match |
|
|
31
|
-
|
|
32
|
-
**three is not preinstalled** — add it with npm and leave it in `package.json`.
|
|
33
|
-
|
|
34
|
-
## When to load what
|
|
35
|
-
|
|
36
|
-
1. **Game / interactive 3D product** → start with **`building-games`** (loop, controls, orientation, camera, first-run, steer sign).
|
|
37
|
-
2. **R3F / drei / rapier wiring** → `building-games/references/3d-libs.md`.
|
|
38
|
-
3. **Deep three API, TSL, WebGPU, materials, loaders, postprocessing** → load
|
|
39
|
-
**`references/llms-full.txt`** (this skill’s full official dump).
|
|
40
|
-
|
|
41
|
-
Do **not** load `llms-full.txt` for simple 2D canvas games (Pong, tetris, etc.).
|
|
42
|
-
|
|
43
|
-
## Full reference
|
|
44
|
-
|
|
45
|
-
**Read on demand:**
|
|
46
|
-
|
|
47
|
-
```text
|
|
48
|
-
references/llms-full.txt
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Source: https://threejs.org/docs/llms-full.txt (pinned copy for offline sandbox use).
|
|
52
|
-
|
|
53
|
-
Contents include: modern imports, WebGLRenderer vs WebGPURenderer, TSL complete
|
|
54
|
-
reference, NodeMaterial, loaders, post-processing, compute, and API tables.
|
|
55
|
-
|
|
56
|
-
## Quick defaults for this product
|
|
57
|
-
|
|
58
|
-
- Prefer **WebGLRenderer** (or R3F default) unless the user needs TSL/WebGPU compute.
|
|
59
|
-
- Cap pixel ratio (`renderer.setPixelRatio(Math.min(devicePixelRatio, 2))` or R3F `dpr={[1,2]}`).
|
|
60
|
-
- Dispose geometries/materials/textures on teardown (three does not GC GPU resources).
|
|
61
|
-
- For games: still obey **`building-games`** control and orientation self-tests.
|
|
62
|
-
|
|
63
|
-
## Finish check
|
|
64
|
-
|
|
65
|
-
- three (and R3F stack if used) is in `package.json` and imports resolve.
|
|
66
|
-
- No r128 / cdnjs script-tag patterns.
|
|
67
|
-
- If TSL/WebGPU used: materials and imports match `llms-full` (node materials, `await renderer.init()`).
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema": "agentsam.skill.v1",
|
|
3
|
-
"id": "grok-threejs",
|
|
4
|
-
"name": "Grok \u00b7 threejs",
|
|
5
|
-
"description": "Three.js + TSL full API (official llms-full reference)",
|
|
6
|
-
"icon": "skill",
|
|
7
|
-
"slash": {
|
|
8
|
-
"suggested": "/grok-threejs"
|
|
9
|
-
},
|
|
10
|
-
"instructions": {
|
|
11
|
-
"source": "local_file",
|
|
12
|
-
"ref": "SKILL.md"
|
|
13
|
-
},
|
|
14
|
-
"execution": {
|
|
15
|
-
"mode": "turn",
|
|
16
|
-
"tools": [],
|
|
17
|
-
"operations": [],
|
|
18
|
-
"capabilities": []
|
|
19
|
-
},
|
|
20
|
-
"provenance": {
|
|
21
|
-
"source": "apps/local-studio/.grok/skills",
|
|
22
|
-
"vendor": "grok",
|
|
23
|
-
"status": "imported"
|
|
24
|
-
}
|
|
25
|
-
}
|