@bongos/core 1.18.0 → 1.18.18
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/.bongos-core.json +1740 -640
- package/.claude/skills/builder-box/SKILL.md +6 -0
- package/.claude/skills/builder-sequence/SKILL.md +97 -0
- package/.claude/skills/builder-ship/SKILL.md +8 -2
- package/.claude/skills/builder-start/SKILL.md +11 -0
- package/.claude/skills/builder-sync/SKILL.md +41 -0
- package/.claude/skills/fix-task/SKILL.md +64 -0
- package/.claude/skills/goal-create/SKILL.md +158 -0
- package/.claude/skills/goal-review/SKILL.md +3 -1
- package/.claude/skills/idea-triage/SKILL.md +14 -8
- package/.claude/skills/merge-mode/SKILL.md +2 -2
- package/.claude/skills/new-project/SKILL.md +1 -0
- package/.claude/skills/planning-session/SKILL.md +45 -18
- package/.env.local.example +4 -3
- package/README.md +5 -3
- package/bin/bongos.js +1 -0
- package/clients/bongos-client/README.md +2 -2
- package/clients/bongos-client/bongos-client.global.js +82 -18
- package/clients/bongos-client/index.cjs +82 -18
- package/clients/bongos-client/index.d.ts +131 -29
- package/clients/bongos-client/index.mjs +82 -18
- package/config/branding.neutral.json +11 -2
- package/config/governance.neutral.json +21 -0
- package/docs/adr/0043-git-ssh-trust-boundary-and-rank-floor-on-permission-paths.md +24 -0
- package/docs/adr/0090-metic-task-authoring.md +1 -1
- package/docs/adr/0142-project-context-is-prose-only.md +41 -0
- package/docs/adr/0143-onboarding-repo-picker-oauth-scope.md +35 -0
- package/docs/adr/0144-devbox-rehome-onto-cloudbongos-plane.md +41 -0
- package/docs/adr/0144-federated-single-logout-backchannel.md +42 -0
- package/docs/adr/0145-devbox-app-branding-driven-module.md +44 -0
- package/docs/adr/0145-free-hosted-project-tier-isolation-and-domain-separation.md +62 -0
- package/docs/adr/0146-configurable-reward-mode-cost-plus-only.md +53 -0
- package/docs/adr/0147-standalone-live-docs-regen.md +39 -0
- package/docs/adr/0148-task-scoped-box-source-access.md +48 -0
- package/docs/adr/0149-bongos-dev-local-launcher.md +57 -0
- package/docs/adr/0150-box-first-boot-bringup-vendored-instances.md +68 -0
- package/docs/adr/0151-governance-permissions-as-atom-ranks-as-roles.md +229 -0
- package/docs/adr/0152-landing-gate-served-by-the-core-app.md +92 -0
- package/docs/adr/0152-metic-task-abandonment.md +67 -0
- package/docs/adr/0153-sequential-chain-runner.md +51 -0
- package/docs/adr/0154-goal-owner-criterion-authoring.md +86 -0
- package/docs/adr/README.md +15 -2
- package/docs/api/openapi.json +2648 -483
- package/docs/api-reference.md +73 -13
- package/docs/architecture.md +4 -2
- package/docs/branding-contract.md +3 -1
- package/docs/canonical-permissions.md +21 -8
- package/docs/file-map.md +15 -7
- package/docs/onboarding/diagrams/01-task-lifecycle.mmd +2 -2
- package/docs/onboarding/diagrams/02-rank-ladder.mmd +3 -1
- package/docs/onboarding/diagrams/05-versioning.mmd +1 -3
- package/docs/onboarding/diagrams/assertions.json +4 -7
- package/docs/onboarding/drachmae-and-karma.md +3 -3
- package/docs/onboarding/primer.md +17 -16
- package/docs/onboarding/slash-commands.md +124 -0
- package/docs/recipes/builder-box-lifecycle.md +23 -0
- package/docs/recipes/devbox-app-release.md +14 -4
- package/docs/recipes/instance-first-run.md +16 -0
- package/docs/recipes/local-dev.md +81 -0
- package/docs/recipes/ops-gotchas.md +19 -1
- package/docs/recipes/overnight-builder.md +1 -1
- package/docs/recipes/packaging-the-core.md +13 -0
- package/docs/recipes/parallel-goal-waves.md +174 -0
- package/docs/recipes/ship-and-regrade.md +2 -2
- package/docs/recipes/standalone-live-docs.md +48 -0
- package/docs/recipes/upgrading-the-core.md +5 -2
- package/docs/recipes/work-on-a-task-from-your-dev-box.md +108 -0
- package/migrations/003_pms.sql +6 -7
- package/migrations/006_pms_v2.sql +3 -31
- package/migrations/039_newcomer_friendly_column.sql +5 -0
- package/migrations/102_remove_box_first_provision_approval.sql +4 -0
- package/migrations/core_192_github_oauth_tokens.sql +33 -0
- package/migrations/core_193_task_needs_rebase.sql +28 -0
- package/migrations/core_194_confirmed_backlog_clawback.sql +63 -0
- package/migrations/core_195_idea_triage_provenance.sql +57 -0
- package/migrations/core_196_session_reward_topup.sql +69 -0
- package/modules/autonomy/pollers/routine-timers.js +9 -8
- package/modules/builder-settings/wandering-prefs.js +61 -18
- package/modules/dev-box/app/README.md +73 -0
- package/modules/dev-box/app/assets/tray/mac-alertTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-alertTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-busyTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-busyTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-offTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-offTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-onTemplate.png +0 -0
- package/modules/dev-box/app/assets/tray/mac-onTemplate@2x.png +0 -0
- package/modules/dev-box/app/assets/tray/win-alert.png +0 -0
- package/modules/dev-box/app/assets/tray/win-busy.png +0 -0
- package/modules/dev-box/app/assets/tray/win-off.png +0 -0
- package/modules/dev-box/app/assets/tray/win-on.png +0 -0
- package/modules/dev-box/app/build-resources/dmg-background.png +0 -0
- package/modules/dev-box/app/build-resources/dmg-background@2x.png +0 -0
- package/modules/dev-box/app/build-resources/icon.png +0 -0
- package/modules/dev-box/app/electron-builder.tmpl.yml +95 -0
- package/modules/dev-box/app/electron-builder.yml +95 -0
- package/modules/dev-box/app/package-lock.json +5291 -0
- package/modules/dev-box/app/package.json +30 -0
- package/modules/dev-box/app/renderer/app.js +319 -0
- package/modules/dev-box/app/renderer/index.html +45 -0
- package/modules/dev-box/app/renderer/styles.css +246 -0
- package/modules/dev-box/app/renderer/theme.generated.css +16 -0
- package/modules/dev-box/app/scripts/apply-dmg-backdrop.sh +82 -0
- package/modules/dev-box/app/scripts/dmgbuild-settings.py +39 -0
- package/modules/dev-box/app/scripts/gen-brand.js +138 -0
- package/modules/dev-box/app/scripts/gen-dmg-backdrop.py +323 -0
- package/modules/dev-box/app/scripts/gen-icons.js +286 -0
- package/modules/dev-box/app/scripts/vendor-client.js +23 -0
- package/modules/dev-box/app/src/box-controller.js +287 -0
- package/modules/dev-box/app/src/brand.generated.json +13 -0
- package/modules/dev-box/app/src/brand.js +16 -0
- package/modules/dev-box/app/src/config.js +19 -0
- package/modules/dev-box/app/src/gds-client.js +90 -0
- package/modules/dev-box/app/src/main.js +610 -0
- package/modules/dev-box/app/src/pairing.js +57 -0
- package/modules/dev-box/app/src/preload.js +29 -0
- package/modules/dev-box/app/src/session-store.js +58 -0
- package/modules/dev-box/app/src/ssh-setup.js +569 -0
- package/modules/dev-box/app/src/task-picker.js +70 -0
- package/modules/dev-box/app/src/tray.js +99 -0
- package/modules/dev-box/app/src/updater.js +55 -0
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +698 -0
- package/modules/dev-box/app/test/unit.mjs +526 -0
- package/modules/dev-box/box-access.js +121 -4
- package/modules/dev-box/boxes.js +20 -0
- package/modules/dev-box/module.json +1 -1
- package/modules/dev-box/routes/box.js +87 -3
- package/modules/economy/credits.js +116 -25
- package/modules/economy/reward.js +8 -0
- package/modules/economy/streak.js +2 -1
- package/modules/governance/CLAUDE.md +15 -0
- package/modules/governance/catalog.js +419 -0
- package/modules/governance/config.js +174 -0
- package/modules/governance/db.js +125 -0
- package/modules/governance/migrations/governance_001_tables.sql +81 -0
- package/modules/governance/migrations/governance_002_seed_and_backfill.sql +103 -0
- package/modules/governance/migrations/governance_003_task_abandon_metic.sql +28 -0
- package/modules/governance/migrations/governance_004_criterion_create.sql +39 -0
- package/modules/governance/migrations/governance_005_resync_builder_rank_roles.sql +56 -0
- package/modules/governance/module.json +10 -0
- package/modules/governance/protected-surfaces.js +88 -0
- package/modules/governance/protected-surfaces.json +80 -0
- package/modules/governance/rank-roles.js +83 -0
- package/modules/governance/resolver.js +221 -0
- package/modules/governance/routes/governance.js +89 -0
- package/modules/governance/routes/role-sync.js +49 -0
- package/modules/governance/session-scopes.js +127 -0
- package/modules/governance/session-scopes.json +38 -0
- package/modules/hall-ui/public/atlas.css +117 -0
- package/modules/hall-ui/public/atlas.html +3 -114
- package/modules/hall-ui/public/brand-apply.js +34 -6
- package/modules/hall-ui/public/builders.js +187 -219
- package/modules/hall-ui/public/diagrams.html +2 -0
- package/modules/hall-ui/public/dom-utils.js +27 -0
- package/modules/hall-ui/public/drachmae.html +2 -0
- package/modules/hall-ui/public/drachmae.js +54 -1
- package/modules/hall-ui/public/gate.css +98 -0
- package/modules/hall-ui/public/gate.html +3 -95
- package/modules/hall-ui/public/goal-inbox.js +4 -1
- package/modules/hall-ui/public/goals-page.js +626 -114
- package/modules/hall-ui/public/goals.css +79 -1
- package/modules/hall-ui/public/goals.html +38 -11
- package/modules/hall-ui/public/hall-widgets.js +62 -52
- package/modules/hall-ui/public/harbor.css +123 -0
- package/modules/hall-ui/public/harbor.html +3 -120
- package/modules/hall-ui/public/index.html +11 -4
- package/modules/hall-ui/public/instances-panel.js +4 -1
- package/modules/hall-ui/public/modules.css +63 -0
- package/modules/hall-ui/public/modules.html +3 -60
- package/modules/hall-ui/public/my-projects.html +78 -0
- package/modules/hall-ui/public/my-projects.js +142 -0
- package/modules/hall-ui/public/new-project-wizard.js +7 -3
- package/modules/hall-ui/public/not-ready.html +2 -0
- package/modules/hall-ui/public/pair.css +73 -0
- package/modules/hall-ui/public/pair.html +3 -70
- package/modules/hall-ui/public/palette.js +302 -0
- package/modules/hall-ui/public/primer.css +13 -0
- package/modules/hall-ui/public/primer.html +2 -0
- package/modules/hall-ui/public/profile.html +2 -0
- package/modules/hall-ui/public/ranks.html +2 -0
- package/modules/hall-ui/public/roadmap.css +179 -0
- package/modules/hall-ui/public/roadmap.html +9 -172
- package/modules/hall-ui/public/roadmap.js +329 -316
- package/modules/hall-ui/public/scouting.html +45 -0
- package/modules/hall-ui/public/scouting.js +73 -0
- package/modules/hall-ui/public/sessions.css +16 -0
- package/modules/hall-ui/public/sessions.html +3 -13
- package/modules/hall-ui/public/settings.html +2 -0
- package/modules/hall-ui/public/settings.js +4 -4
- package/modules/hall-ui/public/shell.js +143 -18
- package/modules/hall-ui/public/style.css +231 -39
- package/modules/hall-ui/public/task-detail.js +347 -26
- package/modules/hall-ui/public/task.html +6 -1
- package/modules/hall-ui/public/watch.html +2 -0
- package/modules/hall-ui/public/work.html +8 -6
- package/modules/hall-ui/public/work.js +1 -1
- package/modules/ideas/inbox.js +61 -11
- package/modules/ideas/routes/inbox.js +23 -0
- package/modules/lifecycle/claim-eligibility.js +72 -0
- package/modules/lifecycle/db.js +519 -139
- package/modules/lifecycle/done-when.js +18 -3
- package/modules/lifecycle/github-push.js +19 -2
- package/modules/lifecycle/goal-advisory.js +114 -0
- package/modules/lifecycle/goal-authz.js +62 -0
- package/modules/lifecycle/lifecycle.js +9 -0
- package/modules/lifecycle/publish-reconciler.js +109 -6
- package/modules/lifecycle/routes/claims.js +68 -23
- package/modules/lifecycle/routes/done-when.js +110 -15
- package/modules/lifecycle/routes/goals.js +8 -38
- package/modules/lifecycle/routes/tasks.js +38 -6
- package/modules/lifecycle/ship-card.js +6 -0
- package/modules/onboarding/onboarding-state.js +1 -1
- package/modules/platform-identity/CLAUDE.md +15 -0
- package/modules/platform-identity/hub-device.js +147 -0
- package/modules/platform-identity/hub-keys.js +151 -0
- package/modules/platform-identity/migrations/platform_identity_001_tables.sql +114 -0
- package/modules/platform-identity/migrations/platform_identity_002_client_origin_index.sql +18 -0
- package/modules/platform-identity/migrations/platform_identity_003_project_memberships.sql +42 -0
- package/modules/platform-identity/migrations/platform_identity_004_projects.sql +44 -0
- package/modules/platform-identity/migrations/platform_identity_005_builder_activity.sql +42 -0
- package/modules/platform-identity/module.json +18 -0
- package/modules/platform-identity/platform-identity.js +531 -0
- package/modules/platform-identity/pollers/code-sweep.js +43 -0
- package/modules/platform-identity/routes/my-projects.js +140 -0
- package/modules/platform-identity/routes/projects.js +107 -0
- package/modules/platform-identity/routes/scouting.js +35 -0
- package/modules/platform-identity/routes/sso.js +402 -0
- package/modules/platform-identity/tests/platform-identity.mjs +388 -0
- package/modules/platform-identity/ui/.gitkeep +0 -0
- package/modules/security/routes/reports.js +10 -0
- package/modules/sessions/db.js +166 -21
- package/modules/sessions/module.json +1 -1
- package/modules/sessions/pollers/session-reward-reconcile.js +78 -0
- package/modules/sessions/routes/sessions.js +33 -0
- package/modules/status-ui/public/explore.html +54 -0
- package/modules/status-ui/public/explore.js +67 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/public-landing/assets/anim/idle/frame_00.webp +0 -0
- package/public-landing/assets/anim/idle/frame_01.webp +0 -0
- package/public-landing/assets/anim/idle/frame_02.webp +0 -0
- package/public-landing/assets/anim/idle/frame_03.webp +0 -0
- package/public-landing/assets/anim/idle/frame_04.webp +0 -0
- package/public-landing/assets/anim/idle/frame_05.webp +0 -0
- package/public-landing/assets/anim/idle/frame_06.webp +0 -0
- package/public-landing/assets/anim/idle/frame_07.webp +0 -0
- package/public-landing/assets/anim/idle/frame_08.webp +0 -0
- package/public-landing/assets/anim/idle/frame_09.webp +0 -0
- package/public-landing/assets/anim/idle/frame_10.webp +0 -0
- package/public-landing/assets/anim/idle/frame_11.webp +0 -0
- package/public-landing/assets/anim/idle/frame_12.webp +0 -0
- package/public-landing/assets/anim/idle/frame_13.webp +0 -0
- package/public-landing/assets/anim/idle/frame_14.webp +0 -0
- package/public-landing/assets/anim/idle/frame_15.webp +0 -0
- package/public-landing/assets/anim/idle/frame_16.webp +0 -0
- package/public-landing/assets/anim/idle/frame_17.webp +0 -0
- package/public-landing/assets/anim/idle/frame_18.webp +0 -0
- package/public-landing/assets/anim/idle/frame_19.webp +0 -0
- package/public-landing/assets/anim/idle/frame_20.webp +0 -0
- package/public-landing/assets/anim/idle/frame_21.webp +0 -0
- package/public-landing/assets/anim/idle/frame_22.webp +0 -0
- package/public-landing/assets/anim/idle/frame_23.webp +0 -0
- package/public-landing/assets/anim/idle/frame_24.webp +0 -0
- package/public-landing/assets/anim/idle/frame_25.webp +0 -0
- package/public-landing/assets/anim/idle/frame_26.webp +0 -0
- package/public-landing/assets/anim/idle/frame_27.webp +0 -0
- package/public-landing/assets/anim/idle/frame_28.webp +0 -0
- package/public-landing/assets/anim/idle/frame_29.webp +0 -0
- package/public-landing/assets/anim/idle/frame_30.webp +0 -0
- package/public-landing/assets/anim/idle/frame_31.webp +0 -0
- package/public-landing/assets/anim/idle/frame_32.webp +0 -0
- package/public-landing/assets/anim/idle/frame_33.webp +0 -0
- package/public-landing/assets/anim/idle/frame_34.webp +0 -0
- package/public-landing/assets/anim/idle/frame_35.webp +0 -0
- package/public-landing/assets/anim/idle/frame_36.webp +0 -0
- package/public-landing/assets/anim/idle/frame_37.webp +0 -0
- package/public-landing/assets/anim/idle/frame_38.webp +0 -0
- package/public-landing/assets/anim/idle/frame_39.webp +0 -0
- package/public-landing/assets/anim/idle/frame_40.webp +0 -0
- package/public-landing/assets/anim/idle/frame_41.webp +0 -0
- package/public-landing/assets/anim/idle/frame_42.webp +0 -0
- package/public-landing/assets/anim/idle/frame_43.webp +0 -0
- package/public-landing/create.html +252 -62
- package/public-landing/gate/README.md +137 -0
- package/public-landing/gate/dispmaps/bar.png +0 -0
- package/public-landing/gate/dispmaps/flat.png +0 -0
- package/public-landing/gate/dispmaps/key.png +0 -0
- package/public-landing/gate/index.html +587 -0
- package/public-landing/gate/previews/cloud-bongos.jpg +0 -0
- package/public-landing/gate/previews/off-the-boats.jpg +0 -0
- package/public-landing/gate/space.css +799 -0
- package/public-landing/gate/space.js +1826 -0
- package/public-landing/gate/sprites/enter.png +0 -0
- package/public-landing/gate/sprites/search.png +0 -0
- package/public-landing/gate/sprites/terminal-blank.png +0 -0
- package/public-landing/gate/sprites/tile.png +0 -0
- package/public-landing/world/assets/clouds/cloud-island-large.png +0 -0
- package/public-landing/world/assets/clouds/cloud-puff.png +0 -0
- package/public-landing/world/assets/creatures/creature-whale-cargo.png +0 -0
- package/public-landing/world/assets/creatures/creature-whale-glide.png +0 -0
- package/public-landing/world/assets/plates/plate-clouds-near.png +0 -0
- package/public-landing/world/assets/plates/scene-establishing.png +0 -0
- package/scripts/gds/abandon.js +6 -4
- package/scripts/gds/api.js +10 -5
- package/scripts/gds/api.ps1 +26 -0
- package/scripts/gds/api.sh +6 -0
- package/scripts/gds/audit-ships.js +7 -1
- package/scripts/gds/backfill-sessions.js +78 -18
- package/scripts/gds/backup.js +23 -1
- package/scripts/gds/box-connect-lib.js +124 -31
- package/scripts/gds/box-sync.js +66 -0
- package/scripts/gds/box.js +225 -53
- package/scripts/gds/cf-tunnel.js +145 -6
- package/scripts/gds/claim.js +34 -3
- package/scripts/gds/cli-lib.js +161 -21
- package/scripts/gds/code.js +6 -2
- package/scripts/gds/deploy-divergence.js +209 -0
- package/scripts/gds/dev-lib.js +309 -0
- package/scripts/gds/dev.js +322 -0
- package/scripts/gds/doctor.js +90 -61
- package/scripts/gds/fetch-art-key.js +1 -1
- package/scripts/gds/fetch-sound-prefs.js +2 -2
- package/scripts/gds/fitness.js +228 -12
- package/scripts/gds/gds-db-backup.service +16 -1
- package/scripts/gds/gds-db-offsite.service +9 -1
- package/scripts/gds/gen-api-client.js +1 -1
- package/scripts/gds/gen-api-docs.js +36 -14
- package/scripts/gds/gen-diagrams.js +45 -28
- package/scripts/gds/gen-file-map.js +2 -1
- package/scripts/gds/gen-freshness.js +32 -0
- package/scripts/gds/gen-repo-map.js +3 -2
- package/scripts/gds/gen-session-index.js +14 -5
- package/scripts/gds/hooks/pre-push.js +2 -2
- package/scripts/gds/init.js +60 -3
- package/scripts/gds/install-git-hooks.js +1 -1
- package/scripts/gds/key-card.js +15 -6
- package/scripts/gds/key-status.js +1 -1
- package/scripts/gds/linkify-refs.js +35 -9
- package/scripts/gds/lint-migrations.js +102 -0
- package/scripts/gds/login.js +58 -11
- package/scripts/gds/mirror-redact.js +5 -0
- package/scripts/gds/package-core.js +263 -4
- package/scripts/gds/paste-token.js +7 -1
- package/scripts/gds/preflight.js +126 -0
- package/scripts/gds/provision.js +268 -19
- package/scripts/gds/publish-manifest.js +22 -1
- package/scripts/gds/reauth.js +7 -3
- package/scripts/gds/regen-instance-docs.js +47 -0
- package/scripts/gds/run-unit-tests.js +42 -16
- package/scripts/gds/seed-bongos-v1-seo-tasks.js +104 -0
- package/scripts/gds/seed-bv1-profiles-tasks.js +126 -0
- package/scripts/gds/sequence.js +425 -0
- package/scripts/gds/session-cost.js +10 -1
- package/scripts/gds/setup.js +72 -5
- package/scripts/gds/shell.js +5 -3
- package/scripts/gds/ship.js +433 -59
- package/scripts/gds/smoke-gds.js +139 -8
- package/scripts/gds/start.js +171 -22
- package/scripts/gds/status.js +1 -1
- package/scripts/gds/triage.js +10 -9
- package/scripts/gds/upgrade.js +271 -7
- package/scripts/migrate.sh +10 -0
- package/scripts/status-mirror-sync.js +114 -84
- package/src/bongos/api-errors.js +1 -0
- package/src/bongos/auth.js +809 -107
- package/src/bongos/db-kernel.js +27 -0
- package/src/bongos/db.js +105 -0
- package/src/bongos/github-repos.js +93 -0
- package/src/bongos/module-scope-map.js +27 -1
- package/src/bongos/permission-path-check.js +136 -102
- package/src/bongos/repo-info.js +47 -11
- package/src/bongos/route-rank-check.js +429 -46
- package/src/bongos/routes/_helpers.js +12 -1
- package/src/bongos/routes/auth.js +312 -13
- package/src/bongos/routes/backup.js +58 -2
- package/src/bongos/routes/github.js +90 -0
- package/src/bongos/routes/instance.js +15 -3
- package/src/bongos/routes/me.js +35 -1
- package/src/bongos/routes.js +2 -0
- package/src/bongos/serve-internal.js +84 -15
- package/src/branding.js +49 -2
- package/src/instance-config.js +46 -0
- package/src/module-api.js +140 -1
- package/src/platform-server.js +86 -9
- package/tests/abandon_task.mjs +59 -3
- package/tests/api_cli_flags.mjs +53 -0
- package/tests/auth_page_gate.mjs +13 -0
- package/tests/backfill_sessions.mjs +127 -1
- package/tests/backup_cli.mjs +54 -0
- package/tests/bongos_box_connect.mjs +77 -0
- package/tests/box_access.mjs +130 -1
- package/tests/box_credential.mjs +125 -0
- package/tests/box_host_keys.mjs +24 -0
- package/tests/box_infra_resolve.mjs +149 -0
- package/tests/box_scope_session.mjs +6 -2
- package/tests/box_sync.mjs +55 -0
- package/tests/box_task_scope.mjs +99 -0
- package/tests/branding.mjs +41 -23
- package/tests/cf_ruleset_preflight.mjs +142 -0
- package/tests/cf_tunnel.mjs +37 -0
- package/tests/claim_gate_rebase.mjs +98 -0
- package/tests/clawback_confirmed_backlog.mjs +103 -0
- package/tests/cli_lib_formatters.mjs +20 -0
- package/tests/confirm_attribution.mjs +30 -46
- package/tests/credit_grant.mjs +198 -10
- package/tests/criterion_authoring_gate.mjs +272 -0
- package/tests/criterion_progress.mjs +33 -1
- package/tests/dev_lib.mjs +253 -0
- package/tests/devbox_artifact_gate.mjs +75 -0
- package/tests/devbox_dmg_backdrop.mjs +137 -0
- package/tests/devbox_icons.mjs +304 -0
- package/tests/devbox_installer_brand.mjs +232 -0
- package/tests/devbox_key_register.mjs +234 -0
- package/tests/docs_openapi_route.mjs +110 -0
- package/tests/doctor_hooks.mjs +141 -0
- package/tests/extract_json.mjs +140 -0
- package/tests/fitness.mjs +89 -0
- package/tests/gen_freshness.mjs +96 -0
- package/tests/github_repos_helpers.mjs +91 -0
- package/tests/github_token_store.mjs +121 -0
- package/tests/goal_advisory.mjs +251 -0
- package/tests/goal_criterion_confirm_ui.mjs +269 -0
- package/tests/goal_routes.mjs +59 -4
- package/tests/goal_tier.mjs +12 -3
- package/tests/governance_catalog.mjs +129 -0
- package/tests/governance_claim_eligibility.mjs +262 -0
- package/tests/governance_config.mjs +187 -0
- package/tests/governance_ownership_scope.mjs +410 -0
- package/tests/governance_page_gates.mjs +324 -0
- package/tests/governance_parity.mjs +336 -0
- package/tests/governance_principals.mjs +232 -0
- package/tests/governance_protected_surfaces.mjs +208 -0
- package/tests/governance_require_permission.mjs +223 -0
- package/tests/governance_resolver.mjs +84 -0
- package/tests/governance_role_sync.mjs +231 -0
- package/tests/governance_seed.mjs +127 -0
- package/tests/governance_session_scope.mjs +434 -0
- package/tests/governance_vanilla_boot.mjs +203 -0
- package/tests/grade_attribution.mjs +7 -7
- package/tests/hall_audit.mjs +223 -0
- package/tests/hall_nav.mjs +191 -0
- package/tests/hall_palette.mjs +206 -0
- package/tests/hall_signout.mjs +124 -0
- package/tests/hook_user_agents.mjs +10 -0
- package/tests/idea_triage.mjs +162 -0
- package/tests/idp_device_exchange.mjs +198 -0
- package/tests/idp_federation.mjs +100 -0
- package/tests/init.mjs +51 -0
- package/tests/instance_config.mjs +65 -0
- package/tests/instance_mismatch_guard.mjs +23 -6
- package/tests/instance_release_config.mjs +104 -0
- package/tests/linkify_refs.mjs +15 -2
- package/tests/migrations_forward_safe.mjs +86 -0
- package/tests/module_api.mjs +1 -1
- package/tests/module_contributions.mjs +55 -0
- package/tests/module_loader.mjs +10 -5
- package/tests/module_scope_active_claims.mjs +94 -0
- package/tests/needs_rebase.mjs +92 -0
- package/tests/one_active_claim_per_session.mjs +76 -0
- package/tests/override_attribution.mjs +10 -8
- package/tests/override_request_ownership.mjs +8 -4
- package/tests/package_core.mjs +246 -1
- package/tests/parse_cookie_decode.mjs +42 -0
- package/tests/pay_on_land.mjs +129 -0
- package/tests/platform_boot.mjs +100 -1
- package/tests/post_login_landing.mjs +42 -0
- package/tests/preflight_checks.mjs +72 -0
- package/tests/provision.mjs +289 -7
- package/tests/pruned_lockfile_integrity.mjs +79 -0
- package/tests/publish_branch_route.mjs +53 -0
- package/tests/publish_reconciler.mjs +187 -2
- package/tests/repo_info_binding.mjs +248 -0
- package/tests/reward_gate.mjs +11 -2
- package/tests/reward_mode_cost_plus_only.mjs +116 -0
- package/tests/reward_mode_surfacing.mjs +168 -0
- package/tests/route_permission_check.mjs +301 -0
- package/tests/route_rank_check.mjs +254 -12
- package/tests/route_validation.mjs +30 -0
- package/tests/sequence.mjs +267 -0
- package/tests/session_digest.mjs +44 -0
- package/tests/session_index.mjs +18 -6
- package/tests/session_records.mjs +39 -1
- package/tests/session_reward_on_land.mjs +381 -0
- package/tests/session_reward_reconcile.mjs +229 -0
- package/tests/ship_api_client_pathspec.mjs +100 -0
- package/tests/ship_base_flag.mjs +93 -0
- package/tests/ship_ci_deploy.mjs +140 -3
- package/tests/ship_upstream_deletion.mjs +57 -0
- package/tests/smoke_target.mjs +233 -0
- package/tests/start_env_guard.mjs +87 -0
- package/tests/start_rebase_warning.mjs +103 -0
- package/tests/status_mirror_sync.mjs +122 -0
- package/tests/stop_refcheck.mjs +19 -1
- package/tests/task_goal_link.mjs +15 -6
- package/tests/upgrade.mjs +393 -5
- package/tests/web_admission_status.mjs +162 -0
- package/tests/write_validation_gaps.mjs +110 -0
- package/.gitignore +0 -91
- package/docs/adr/0139-platform-history-migration-to-cloudbongos.md +0 -94
- package/docs/adr/0140-cloudbongos-standalone-reprovision.md +0 -43
- package/scripts/hall-preview/fixtures/access-requests.json +0 -20
- package/scripts/hall-preview/fixtures/achievements.json +0 -76
- package/scripts/hall-preview/fixtures/analytics__builder.json +0 -251
- package/scripts/hall-preview/fixtures/audit-log.json +0 -68
- package/scripts/hall-preview/fixtures/blockers__detail.json +0 -12
- package/scripts/hall-preview/fixtures/box__me.json +0 -5
- package/scripts/hall-preview/fixtures/boxes__cost-ledger.json +0 -69
- package/scripts/hall-preview/fixtures/builders__active-claims.json +0 -1
- package/scripts/hall-preview/fixtures/builders__directory.json +0 -81
- package/scripts/hall-preview/fixtures/builders__roster.json +0 -48
- package/scripts/hall-preview/fixtures/goals.json +0 -502
- package/scripts/hall-preview/fixtures/goals__25.json +0 -96
- package/scripts/hall-preview/fixtures/goals__26.json +0 -67
- package/scripts/hall-preview/fixtures/goals__3.json +0 -103
- package/scripts/hall-preview/fixtures/goals__35.json +0 -49
- package/scripts/hall-preview/fixtures/goals__conflicts.json +0 -154
- package/scripts/hall-preview/fixtures/goals__detail.json +0 -96
- package/scripts/hall-preview/fixtures/goals__inbox.json +0 -5
- package/scripts/hall-preview/fixtures/goals__requests.json +0 -3
- package/scripts/hall-preview/fixtures/grades__by-builder.json +0 -32
- package/scripts/hall-preview/fixtures/inbox.json +0 -330
- package/scripts/hall-preview/fixtures/inbox__detail.json +0 -15
- package/scripts/hall-preview/fixtures/instance.json +0 -124
- package/scripts/hall-preview/fixtures/leaderboard.json +0 -184
- package/scripts/hall-preview/fixtures/me.json +0 -476
- package/scripts/hall-preview/fixtures/me__art-key__own.json +0 -6
- package/scripts/hall-preview/fixtures/me__event-sound-prefs.json +0 -209
- package/scripts/hall-preview/fixtures/me__recent-ships.json +0 -304
- package/scripts/hall-preview/fixtures/me__render.json +0 -5
- package/scripts/hall-preview/fixtures/me__skill-prefs.json +0 -143
- package/scripts/hall-preview/fixtures/me__sound-prefs.json +0 -67
- package/scripts/hall-preview/fixtures/me__wandering.json +0 -43
- package/scripts/hall-preview/fixtures/override-requests.json +0 -15
- package/scripts/hall-preview/fixtures/provisioning__fleet.json +0 -1
- package/scripts/hall-preview/fixtures/provisioning__fleet__cost-ledger.json +0 -1
- package/scripts/hall-preview/fixtures/provisioning__instances.json +0 -1
- package/scripts/hall-preview/fixtures/public__analytics__ecosystem.json +0 -516
- package/scripts/hall-preview/fixtures/public__bounty-table.json +0 -37
- package/scripts/hall-preview/fixtures/public__cost-summary.json +0 -742
- package/scripts/hall-preview/fixtures/public__estimation-drift.json +0 -41
- package/scripts/hall-preview/fixtures/public__grades.json +0 -50
- package/scripts/hall-preview/fixtures/public__progress.json +0 -124
- package/scripts/hall-preview/fixtures/public__recent-shipped.json +0 -426
- package/scripts/hall-preview/fixtures/public__repo-health.json +0 -160
- package/scripts/hall-preview/fixtures/public__repo-info.json +0 -5
- package/scripts/hall-preview/fixtures/security__docs.json +0 -10
- package/scripts/hall-preview/fixtures/security__reports.json +0 -31
- package/scripts/hall-preview/fixtures/sessions__search.json +0 -9
- package/scripts/hall-preview/fixtures/tasks.json +0 -2420
- package/scripts/hall-preview/fixtures/tasks__claimable.json +0 -2555
- package/scripts/hall-preview/fixtures/tasks__detail.json +0 -111
- package/scripts/hall-preview/fixtures/tasks__peer-votes__feed.json +0 -330
- package/scripts/hall-preview/fixtures/versions.json +0 -89
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Cloud Bongos — landing gate</title>
|
|
7
|
+
<link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700&family=Fira+Code:wght@400;500&display=swap" rel="stylesheet" />
|
|
8
|
+
<link rel="stylesheet" href="space.css" />
|
|
9
|
+
<!-- Anti-flash (task 1985 follow-up): on a direct-orbs load — a vanity door
|
|
10
|
+
redirected here with ?entered=1 — hide the type-"bongos" entry from the
|
|
11
|
+
FIRST paint so it never flashes before space.js opens the orbs. This runs in
|
|
12
|
+
<head>, before <body> paints; space.js's openSpaceDirect() then clears
|
|
13
|
+
.direct-orbs so ESC-back-to-entry still works. Keep the door test below in
|
|
14
|
+
sync with brandForHost() in space.js. -->
|
|
15
|
+
<script>
|
|
16
|
+
(function () {
|
|
17
|
+
try {
|
|
18
|
+
var h = (location.hostname || '').toLowerCase();
|
|
19
|
+
var isDoor = /(^|\.)(claude|gemini)bongos\.com$/.test(h);
|
|
20
|
+
var entered = /[?&]entered=1(?:&|$)/.test(location.search || '');
|
|
21
|
+
if (entered && !isDoor) document.documentElement.className += ' direct-orbs';
|
|
22
|
+
} catch (e) {}
|
|
23
|
+
})();
|
|
24
|
+
</script>
|
|
25
|
+
<style>html.direct-orbs #entry { display: none !important; }</style>
|
|
26
|
+
<style>
|
|
27
|
+
*{ box-sizing:border-box; margin:0; padding:0; }
|
|
28
|
+
html,body{ height:100%; }
|
|
29
|
+
body{ font-family:"Baloo 2",system-ui,sans-serif; overflow:hidden; background:#0a0820; cursor:default; }
|
|
30
|
+
.stage{ position:fixed; inset:0; overflow:hidden; }
|
|
31
|
+
|
|
32
|
+
/* ---- moving sky-temple world ---- */
|
|
33
|
+
.world{ position:absolute; inset:0; z-index:0; }
|
|
34
|
+
.scene{ position:absolute; inset:-8%; width:116%; height:116%;
|
|
35
|
+
background:url("../world/assets/plates/scene-establishing.png") center/cover no-repeat;
|
|
36
|
+
animation:kenburns 40s ease-in-out infinite alternate; will-change:transform; }
|
|
37
|
+
/* zoomed further out than the original 1.06→1.16 so more of the sky-temple reads */
|
|
38
|
+
@keyframes kenburns{ 0%{transform:scale(1.0) translate(0,0)} 100%{transform:scale(1.08) translate(-2%,-3%)} }
|
|
39
|
+
.clouds-near{ position:absolute; left:-30%; right:-30%; bottom:-4%; height:46%;
|
|
40
|
+
background:url("../world/assets/plates/plate-clouds-near.png") center/contain repeat-x;
|
|
41
|
+
opacity:.85; animation:driftL 32s linear infinite; }
|
|
42
|
+
/* a thin drifting wisp (not the bubbly cloud-puff — off-theme vs the painterly sky) */
|
|
43
|
+
.puff{ position:absolute; top:15%; left:-24%; width:42%; aspect-ratio:1000/450;
|
|
44
|
+
background:url("../world/assets/plates/plate-clouds-near.png") center/contain no-repeat;
|
|
45
|
+
opacity:.7; animation:driftR 46s linear infinite; }
|
|
46
|
+
@keyframes driftL{ from{transform:translateX(0)} to{transform:translateX(-26%)} }
|
|
47
|
+
@keyframes driftR{ from{transform:translateX(0)} to{transform:translateX(180%)} }
|
|
48
|
+
.scene.plunge{ animation:plunge 1.5s ease-in forwards; }
|
|
49
|
+
@keyframes plunge{ to{ transform:scale(1.55) translateY(8%); } }
|
|
50
|
+
|
|
51
|
+
/* ---- descent: clouds rushing up + a warm flash ---- */
|
|
52
|
+
.crush-wrap{ position:absolute; inset:0; z-index:3; pointer-events:none; }
|
|
53
|
+
.crush{ position:absolute; bottom:-34%; aspect-ratio:720/401;
|
|
54
|
+
background:url("../world/assets/clouds/cloud-puff.png") center/contain no-repeat; opacity:0; }
|
|
55
|
+
.stage.falling .crush{ animation:crush var(--d) cubic-bezier(.4,.05,.3,1) var(--del) forwards; }
|
|
56
|
+
@keyframes crush{ 0%{transform:translateY(0) scale(var(--s));opacity:0} 14%{opacity:.96} 84%{opacity:.85}
|
|
57
|
+
100%{transform:translateY(-135vh) scale(var(--s));opacity:0} }
|
|
58
|
+
.flash{ position:absolute; inset:0; z-index:4; pointer-events:none; opacity:0;
|
|
59
|
+
background:radial-gradient(40% 35% at 50% 52%, rgba(255,240,205,.95), rgba(249,115,22,.35) 45%, transparent 72%); }
|
|
60
|
+
.stage.falling .flash{ animation:flash .7s ease-out forwards; }
|
|
61
|
+
@keyframes flash{ 0%{opacity:0;transform:scale(.5)} 28%{opacity:.92} 100%{opacity:0;transform:scale(1.7)} }
|
|
62
|
+
|
|
63
|
+
/* ---- scenes (transforms here are on the SCENE containers — they compose with
|
|
64
|
+
the per-pane drag transform on the children, so the two never fight) ---- */
|
|
65
|
+
.scene-l{ position:absolute; inset:0; z-index:2; display:flex; flex-direction:column;
|
|
66
|
+
align-items:center; justify-content:center; gap:20px; padding:30px; }
|
|
67
|
+
.gate{ transition:opacity .5s ease, transform .8s cubic-bezier(.4,0,.7,1), filter .6s ease; }
|
|
68
|
+
.stage.falling .gate{ opacity:0; transform:scale(1.28); filter:blur(9px); pointer-events:none; }
|
|
69
|
+
.land{ opacity:0; transform:translateY(54px) scale(.97); pointer-events:none;
|
|
70
|
+
transition:opacity .9s ease .25s, transform 1s cubic-bezier(.2,.8,.2,1) .25s; }
|
|
71
|
+
.stage.arrived .land{ opacity:1; transform:none; pointer-events:auto; }
|
|
72
|
+
|
|
73
|
+
/* the wordmark IS the logo (task 1893): no circle coin, one consistent brand
|
|
74
|
+
gold across every appearance of "{Brand} Bongos". */
|
|
75
|
+
.mark{ font-weight:700; font-size:21px; letter-spacing:.4px; color:var(--cb-gold);
|
|
76
|
+
display:flex; align-items:center; gap:10px; text-shadow:0 2px 12px rgba(40,20,6,.6); }
|
|
77
|
+
.mark b{ color:var(--cb-gold); }
|
|
78
|
+
|
|
79
|
+
.el{ position:relative; }
|
|
80
|
+
.el .lens{ position:absolute; border-radius:16px; }
|
|
81
|
+
.el img{ position:relative; display:block; width:100%; height:100%; object-fit:contain;
|
|
82
|
+
filter:drop-shadow(0 13px 28px rgba(30,16,4,.36)); pointer-events:none;
|
|
83
|
+
-webkit-user-drag:none; user-drag:none; }
|
|
84
|
+
|
|
85
|
+
.terminal{ width:464px; height:96px; }
|
|
86
|
+
.terminal .lens{ inset:16% 3%; -webkit-backdrop-filter:blur(2px) saturate(1.2);
|
|
87
|
+
backdrop-filter:blur(2px) saturate(1.2) url(#disp-bar); }
|
|
88
|
+
.cli{ position:absolute; inset:0; display:flex; align-items:center; padding:0 30px; z-index:2;
|
|
89
|
+
font-family:"Fira Code",monospace; font-size:27px; font-weight:500; letter-spacing:1px; user-select:none; }
|
|
90
|
+
.cli.shake{ animation:shake .32s; }
|
|
91
|
+
@keyframes shake{ 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(6px)}
|
|
92
|
+
60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }
|
|
93
|
+
.cli .p{ color:#fb923c; margin-right:14px; text-shadow:0 0 10px rgba(251,146,60,.5); }
|
|
94
|
+
.cli .c{ color:#f0e6d6; margin-right:.42em; }
|
|
95
|
+
.cli .typed b{ display:inline-block; color:#ffd98a; text-shadow:0 0 14px rgba(246,201,118,.6);
|
|
96
|
+
animation:pop .22s cubic-bezier(.2,1.4,.4,1); }
|
|
97
|
+
@keyframes pop{ 0%{transform:translateY(5px) scale(.4);opacity:0} 100%{transform:translateY(0) scale(1);opacity:1} }
|
|
98
|
+
.caret{ display:inline-block; width:12px; height:28px; background:#ffd98a; margin-left:3px; vertical-align:-4px;
|
|
99
|
+
box-shadow:0 0 12px rgba(246,201,118,.8); animation:blink 1.05s steps(1) infinite; }
|
|
100
|
+
@keyframes blink{ 0%,50%{opacity:1} 50.01%,100%{opacity:0} }
|
|
101
|
+
|
|
102
|
+
.hint{ font-family:"Fira Code",monospace; font-size:13px; letter-spacing:.4px; color:#f3ead9; height:18px;
|
|
103
|
+
text-shadow:0 1px 8px rgba(30,16,4,.8); }
|
|
104
|
+
.hint.flash-x{ color:#ffb0bd; }
|
|
105
|
+
.hint b{ color:#ffd98a; }
|
|
106
|
+
|
|
107
|
+
/* enter key — reveal uses opacity + blur ONLY (no transform), so the drag owns
|
|
108
|
+
transform once 'bongos' is typed. */
|
|
109
|
+
.enter{ width:150px; height:128px; opacity:0; filter:blur(6px); pointer-events:none;
|
|
110
|
+
transition:opacity .6s cubic-bezier(.2,.9,.25,1.1), filter .6s ease; }
|
|
111
|
+
.enter.lit{ opacity:1; filter:blur(0); pointer-events:auto; }
|
|
112
|
+
.enter .lens{ inset:13% 16%; -webkit-backdrop-filter:blur(1.5px) saturate(1.3);
|
|
113
|
+
backdrop-filter:blur(1.5px) saturate(1.3) url(#disp-key); box-shadow:0 0 42px rgba(249,115,22,.55); border-radius:18px; }
|
|
114
|
+
|
|
115
|
+
.search{ width:464px; height:62px; }
|
|
116
|
+
.search .lens{ inset:15% 2%; -webkit-backdrop-filter:blur(2px) saturate(1.2);
|
|
117
|
+
backdrop-filter:blur(2px) saturate(1.2) url(#disp-bar); }
|
|
118
|
+
.agent{ font-family:"Fira Code",monospace; font-size:12.5px; color:#4a3f37; display:flex; align-items:center; gap:7px;
|
|
119
|
+
text-shadow:0 1px 5px rgba(255,250,240,.7); }
|
|
120
|
+
.agent .dot{ width:7px; height:7px; border-radius:50%; background:#16a34a; box-shadow:0 0 9px #16a34a;
|
|
121
|
+
animation:pulse 1.6s ease-in-out infinite; }
|
|
122
|
+
@keyframes pulse{ 0%,100%{opacity:.45} 50%{opacity:1} }
|
|
123
|
+
.tiles{ display:flex; gap:18px; }
|
|
124
|
+
.tile{ width:136px; height:126px; }
|
|
125
|
+
.tile .lens{ inset:12% 11% 20% 11%; -webkit-backdrop-filter:blur(2.5px) saturate(1.2);
|
|
126
|
+
backdrop-filter:blur(2.5px) saturate(1.2) url(#disp-flat); }
|
|
127
|
+
|
|
128
|
+
.replay{ position:absolute; right:16px; bottom:14px; z-index:5; display:flex; align-items:center; gap:6px;
|
|
129
|
+
font-family:"Fira Code",monospace; font-size:11px; color:#fff; background:rgba(30,18,8,.4);
|
|
130
|
+
border:1px solid rgba(255,255,255,.25); border-radius:20px; padding:7px 14px; cursor:pointer;
|
|
131
|
+
opacity:0; pointer-events:none; transition:opacity .4s; }
|
|
132
|
+
.replay.show{ opacity:1; pointer-events:auto; }
|
|
133
|
+
|
|
134
|
+
/* draggable panes — the task-1534 elastic-tether physics, re-applied to the
|
|
135
|
+
drawn sprites (task 1541). Each pane keeps its laid-out spot as "home"; we
|
|
136
|
+
only ever apply transform:translate, so the responsive layout is untouched. */
|
|
137
|
+
.drag{ cursor:grab; touch-action:none; -webkit-user-select:none; user-select:none; will-change:transform; }
|
|
138
|
+
.drag.grabbing{ cursor:grabbing; }
|
|
139
|
+
</style>
|
|
140
|
+
</head>
|
|
141
|
+
<body class="view-entry">
|
|
142
|
+
<!-- ═══ dive cinematic (task 1729): clicking the Cloud Bongos orb flies you
|
|
143
|
+
from the space constellation, down through the clouds, into the Cloud
|
|
144
|
+
Bongos world (the download page). space.js plays #descent on the self-orb
|
|
145
|
+
click, then hands off to view-download under the flash. Skippable
|
|
146
|
+
(click/key/scroll); reduced motion drops straight into the world. The
|
|
147
|
+
island + clouds reuse the world's own art (../world/assets). -->
|
|
148
|
+
<div id="descent" aria-hidden="true">
|
|
149
|
+
<div class="descent-stars far" id="descent-stars-far"></div>
|
|
150
|
+
<div class="descent-stars near" id="descent-stars-near"></div>
|
|
151
|
+
<div class="descent-glow"></div>
|
|
152
|
+
<div class="descent-deck"></div>
|
|
153
|
+
<div class="descent-island"></div>
|
|
154
|
+
<div class="descent-clouds">
|
|
155
|
+
<span class="ic" style="--x:2%; --w:44%; --s:1.25; --d:1.2s; --del:0.85s"></span>
|
|
156
|
+
<span class="ic" style="--x:56%; --w:50%; --s:1.5; --d:1.15s; --del:0.97s"></span>
|
|
157
|
+
<span class="ic" style="--x:28%; --w:34%; --s:.95; --d:1.3s; --del:1.08s"></span>
|
|
158
|
+
<span class="ic" style="--x:-10%; --w:38%; --s:1.1; --d:1.25s; --del:1.18s"></span>
|
|
159
|
+
<span class="ic" style="--x:72%; --w:26%; --s:.7; --d:1.35s; --del:1.28s"></span>
|
|
160
|
+
<span class="ic" style="--x:18%; --w:42%; --s:1.35; --d:1.2s; --del:1.40s"></span>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="descent-flash"></div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<!-- ═══ space: the entry gate + the pannable sky of projects (tasks 1721, 1722) ═══
|
|
166
|
+
Every visit lands on the entry gate (type "bongos", in space); entering
|
|
167
|
+
reveals the circles. Click the Cloud Bongos orb to dive to the download
|
|
168
|
+
scene below; ESC rises back here. -->
|
|
169
|
+
<div id="space">
|
|
170
|
+
<div class="stars" id="starfield" aria-hidden="true"></div>
|
|
171
|
+
<!-- space-time sheet (task): a faint blueprint grid that dimples under each
|
|
172
|
+
orb's gravity (mass ∝ size³, same law as the physics). Drawn in space.js
|
|
173
|
+
behind the orbs so they rest ON the warped sheet. -->
|
|
174
|
+
<canvas id="space-grid" aria-hidden="true"></canvas>
|
|
175
|
+
<div id="space-canvas"></div>
|
|
176
|
+
|
|
177
|
+
<!-- entry gate: type "bongos" to enter, set in space (task 1722). Reuses the
|
|
178
|
+
terminal/enter sprites + CSS; driven by space.js, not the inline gate script. -->
|
|
179
|
+
<div class="scene-l entry" id="entry">
|
|
180
|
+
<div class="el terminal">
|
|
181
|
+
<div class="lens"></div>
|
|
182
|
+
<img src="sprites/terminal-blank.png" alt="" />
|
|
183
|
+
<div class="cli" id="cli">
|
|
184
|
+
<span class="p">></span><span class="c">cloud</span><span class="typed" id="typed"></span><span class="caret" id="caret"></span>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="hint" id="hint">type <b>bongos</b> to enter</div>
|
|
188
|
+
<div class="el enter" id="enter"><div class="lens"></div><img src="sprites/enter.png" alt="enter" /></div>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<!-- self-typing logo (task 1902): idles as the brand wordmark, then swaps the
|
|
192
|
+
lead word "Cloud" for lowercase platforms (claude, gemini, …) and re-types
|
|
193
|
+
"bongos" each time — like a terminal. Driven by mountLogoTerminal() in
|
|
194
|
+
space.js; .mk-lead is set by JS so applyBrand door-branding is handled
|
|
195
|
+
there (BRAND.display) at rest. -->
|
|
196
|
+
<div class="space-mark"><span class="mk-lead" id="mk-lead">cloud</span><b class="mk-tail" id="mk-tail"> bongos</b><span class="mk-caret" id="mk-caret"></span></div>
|
|
197
|
+
<div class="space-help">
|
|
198
|
+
<span><kbd>drag</kbd>pan</span><span class="sep">·</span>
|
|
199
|
+
<span><kbd>scroll</kbd>zoom</span><span class="sep">·</span>
|
|
200
|
+
<span><kbd>shift</kbd>search what's in view</span><span class="sep">·</span>
|
|
201
|
+
<span><kbd>click sky</kbd>add a project</span>
|
|
202
|
+
</div>
|
|
203
|
+
<!-- idle "create a project" ghost orb (task 1896): a faint dashed circle that
|
|
204
|
+
trails the cursor over EMPTY sky, lightly nudging the click-to-create
|
|
205
|
+
gesture. space.js positions it + toggles .show. -->
|
|
206
|
+
<div id="ghost-orb" aria-hidden="true"><span class="ghost-plus">+</span><span class="ghost-label">click to create a project</span></div>
|
|
207
|
+
<!-- minimap (task 1897): a live overview of the whole orb cluster in the
|
|
208
|
+
bottom-right, with a viewport rectangle for the current pan/zoom. Click
|
|
209
|
+
or drag it to recentre the view. Drawn in space.js drawMinimap(). -->
|
|
210
|
+
<div id="minimap" aria-hidden="true"><canvas id="minimap-canvas"></canvas></div>
|
|
211
|
+
<!-- space whale (task 1898): flies from the Cloud Bongos orb to a project when
|
|
212
|
+
it updates, and back again when a project pushes a module. Positioned +
|
|
213
|
+
animated in screen space by space.js so it tracks the live orb motion. -->
|
|
214
|
+
<div id="whale" aria-hidden="true"><img id="whale-img" src="" alt="" decoding="async" /></div>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
<!-- top-left ESC button (task 1913): return to the orbs from download/detail -->
|
|
218
|
+
<button id="esc-btn" type="button" aria-label="Back to the orbs"><kbd>esc</kbd> back</button>
|
|
219
|
+
|
|
220
|
+
<!-- ═══ view toggle: circle sky ⇄ table directory (task 1731) ═══
|
|
221
|
+
Shown only while browsing (view-space / view-table). Circles stay the
|
|
222
|
+
default landing; Table is the scannable/searchable/sortable alternative. -->
|
|
223
|
+
<div id="view-toggle" role="tablist" aria-label="Project view">
|
|
224
|
+
<button class="vt-btn active" id="vt-circles" role="tab" aria-selected="true" type="button" title="Circle sky view">
|
|
225
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="7" cy="8.5" r="3"></circle><circle cx="16.5" cy="7" r="2"></circle><circle cx="14.5" cy="16" r="3.6"></circle></svg>Sky
|
|
226
|
+
</button>
|
|
227
|
+
<button class="vt-btn" id="vt-table" role="tab" aria-selected="false" type="button" title="Table view">
|
|
228
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="4" y1="7" x2="20" y2="7"></line><line x1="4" y1="12" x2="20" y2="12"></line><line x1="4" y1="17" x2="20" y2="17"></line></svg>Table
|
|
229
|
+
</button>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- ═══ top-right cluster: enter builders' hall + GitHub identity chip ═══
|
|
233
|
+
Present on every post-entry view (orbs, table, download, detail) so the
|
|
234
|
+
way in and the account are always in the same corner.
|
|
235
|
+
• #cb-hall — the one uniform door into the project's builders' hall,
|
|
236
|
+
where a visitor can request access. Hard-linked to builders.cloudbongos.com:
|
|
237
|
+
the platform hall + SSO always live on cloudbongos, so this is correct on
|
|
238
|
+
all three domains (incl. the claude/gemini vanity doors) — no per-host JS.
|
|
239
|
+
• #cb-account (task 2094) — the one-stop GitHub login: signed out shows
|
|
240
|
+
"Sign in with GitHub"; signed in shows the avatar + login with a quiet
|
|
241
|
+
sign-out. Filled by space.js from /api/bongos/me. -->
|
|
242
|
+
<div id="cb-topright">
|
|
243
|
+
<a id="cb-hall" class="cb-hall" href="https://builders.cloudbongos.com">
|
|
244
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.8 14 5.2H2L8 1.8Z"/><path d="M3.4 5.6v6.4M6 5.6v6.4M10 5.6v6.4M12.6 5.6v6.4"/><path d="M2 12.4h12M1.4 14.2h13.2"/></svg>
|
|
245
|
+
<span class="cb-hall__label">Enter builders' hall</span>
|
|
246
|
+
</a>
|
|
247
|
+
<div id="cb-account" aria-live="polite"></div>
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<!-- ═══ table directory: every project, searchable + sortable (task 1731) ═══
|
|
251
|
+
A scannable alternative to the circle sky. Rows are built from the same
|
|
252
|
+
PROJECTS data in space.js; clicking a row dives in exactly like an orb. -->
|
|
253
|
+
<div id="table-view">
|
|
254
|
+
<div class="tv-head">
|
|
255
|
+
<div class="tv-mark">Cloud <b>Bongos</b><span class="tv-sub">project directory</span></div>
|
|
256
|
+
<div class="tv-search">
|
|
257
|
+
<svg class="mag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><line x1="16.5" y1="16.5" x2="21" y2="21"></line></svg>
|
|
258
|
+
<input id="tv-search-input" type="text" autocomplete="off" spellcheck="false" placeholder="Search projects by name, tag, description…" aria-label="Search projects" />
|
|
259
|
+
<span class="tv-count" id="tv-count"></span>
|
|
260
|
+
</div>
|
|
261
|
+
<button class="tv-add" id="tv-create" type="button"><span class="plus" aria-hidden="true">+</span> Open a project</button>
|
|
262
|
+
</div>
|
|
263
|
+
<div class="tv-scroll">
|
|
264
|
+
<table>
|
|
265
|
+
<thead>
|
|
266
|
+
<tr>
|
|
267
|
+
<th class="sortable" data-sort="name" scope="col">Project<span class="sort-ind" aria-hidden="true"></span></th>
|
|
268
|
+
<th class="sortable num" data-sort="builders" scope="col">Builders<span class="sort-ind" aria-hidden="true"></span></th>
|
|
269
|
+
<th class="sortable col-type" data-sort="type" scope="col">Type<span class="sort-ind" aria-hidden="true"></span></th>
|
|
270
|
+
<th class="col-tags" scope="col">Tags</th>
|
|
271
|
+
<th class="col-act" scope="col"><span class="cc-sr">Open</span></th>
|
|
272
|
+
</tr>
|
|
273
|
+
</thead>
|
|
274
|
+
<tbody id="tv-body"></tbody>
|
|
275
|
+
</table>
|
|
276
|
+
</div>
|
|
277
|
+
<div class="tv-foot"><kbd>esc</kbd> back to entry · click a row to open · click a column to sort</div>
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<!-- hover card, dive flash, search overlay, create panel, non-self detail -->
|
|
281
|
+
<div id="hovercard" aria-hidden="true"></div>
|
|
282
|
+
<div class="dive-flash" id="dive-flash" aria-hidden="true"></div>
|
|
283
|
+
|
|
284
|
+
<div id="searchbar" role="search">
|
|
285
|
+
<div class="bar">
|
|
286
|
+
<svg class="mag" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><line x1="16.5" y1="16.5" x2="21" y2="21"></line></svg>
|
|
287
|
+
<input id="search-input" type="text" autocomplete="off" spellcheck="false" placeholder="Search projects in view…" aria-label="Search projects in view" />
|
|
288
|
+
<span class="esc"><kbd>esc</kbd></span>
|
|
289
|
+
</div>
|
|
290
|
+
<div class="ctx"><span class="dot"></span>searching <b id="search-ctx-count">0</b> projects in view<span class="ai-soon"> · a Claude agent will answer here (coming soon)</span></div>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
<div class="overlay-scrim" id="create-scrim">
|
|
294
|
+
<div id="createpanel" role="dialog" aria-modal="true" aria-label="Open a Cloud Bongos project">
|
|
295
|
+
<h3>Open a project</h3>
|
|
296
|
+
<p class="sub">Drop a new circle into the sky. Give your Cloud Bongos project a name to get started.</p>
|
|
297
|
+
<label for="create-name">Project name</label>
|
|
298
|
+
<input id="create-name" type="text" autocomplete="off" placeholder="Northwind Notes" />
|
|
299
|
+
<div class="row">
|
|
300
|
+
<button class="btn-ghost" id="create-cancel" type="button">Cancel</button>
|
|
301
|
+
<button class="btn-go" id="create-go" type="button">Create project</button>
|
|
302
|
+
</div>
|
|
303
|
+
<div class="note" id="create-auth-note">Places your circle in the sky, then continues into the build wizard — you'll sign in with GitHub so the project is yours from the first beat.</div>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<!-- signed-out create gate (task 2094): a signed-out visitor who tries to
|
|
308
|
+
create a project is encouraged to sign in with GitHub first, instead of
|
|
309
|
+
being handed the name field and bounced through sign-in later. -->
|
|
310
|
+
<div class="overlay-scrim" id="signin-scrim">
|
|
311
|
+
<div id="signinpanel" role="dialog" aria-modal="true" aria-label="Sign in to create a project">
|
|
312
|
+
<h3>Sign in to create a project</h3>
|
|
313
|
+
<p class="sub">Every Cloud Bongos project belongs to you from the first beat — its own repository, its own hall of AI builders. Sign in with GitHub, then name your project.</p>
|
|
314
|
+
<a class="signin-go" id="signin-go" href="#">
|
|
315
|
+
<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
|
|
316
|
+
Sign in with GitHub
|
|
317
|
+
</a>
|
|
318
|
+
<button class="signin-dismiss" id="signin-dismiss" type="button">Not now</button>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<!-- handoff toast (task 2087): shown for a beat while the named orb settles,
|
|
323
|
+
before the page hands over to the /create build wizard -->
|
|
324
|
+
<div id="handoff-toast" role="status" aria-live="polite"></div>
|
|
325
|
+
|
|
326
|
+
<div id="detail" aria-hidden="true">
|
|
327
|
+
<div class="card"></div>
|
|
328
|
+
<div class="esc-hint"><kbd>esc</kbd> back to space</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div class="stage" id="stage" tabindex="0">
|
|
332
|
+
<div class="world">
|
|
333
|
+
<div class="scene" id="scene"></div>
|
|
334
|
+
<div class="clouds-near"></div>
|
|
335
|
+
<div class="puff"></div>
|
|
336
|
+
</div>
|
|
337
|
+
|
|
338
|
+
<div class="crush-wrap" aria-hidden="true">
|
|
339
|
+
<div class="crush" style="--d:1.5s;--del:0s;--s:1.3; left:6%; width:40%"></div>
|
|
340
|
+
<div class="crush" style="--d:1.45s;--del:.12s;--s:1.5; right:2%; width:46%"></div>
|
|
341
|
+
<div class="crush" style="--d:1.7s;--del:.26s;--s:.9; left:30%; width:30%"></div>
|
|
342
|
+
<div class="crush" style="--d:1.85s;--del:.4s;--s:.7; left:60%; width:24%"></div>
|
|
343
|
+
<div class="crush" style="--d:1.6s;--del:.18s;--s:1.1; left:-6%; width:34%"></div>
|
|
344
|
+
<div class="crush" style="--d:1.9s;--del:.5s;--s:.65; left:78%; width:22%"></div>
|
|
345
|
+
</div>
|
|
346
|
+
<div class="flash" aria-hidden="true"></div>
|
|
347
|
+
|
|
348
|
+
<!-- the download page (task 1722): reached DIRECTLY by clicking the Cloud
|
|
349
|
+
Bongos orb — no type-"bongos" gate here anymore (that moved to entry). -->
|
|
350
|
+
<div class="scene-l land" id="land">
|
|
351
|
+
<!-- the Bongo Buddha idle (ADR 0088 sprite), floating above the search bar
|
|
352
|
+
on a thin painterly cloud (frames injected + cycled by space.js). Not
|
|
353
|
+
draggable — it carries no .el/.mark class, so the stage drag script
|
|
354
|
+
leaves it alone. -->
|
|
355
|
+
<div class="buddha" id="buddha" aria-hidden="true">
|
|
356
|
+
<div class="buddha-glow"></div>
|
|
357
|
+
<img class="buddha-cloud" src="../world/assets/plates/plate-clouds-near.png" alt="" draggable="false" />
|
|
358
|
+
<div class="buddha-fig" id="buddha-fig"></div>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="mark">Cloud <b>Bongos</b></div>
|
|
361
|
+
<div class="el search"><div class="lens"></div><img src="sprites/search.png" alt="search" /></div>
|
|
362
|
+
<div class="agent"><span class="dot"></span>a Claude agent is handling your search</div>
|
|
363
|
+
<div class="tiles">
|
|
364
|
+
<div class="el tile"><div class="lens"></div><img src="sprites/tile.png" alt="download" /></div>
|
|
365
|
+
<div class="el tile"><div class="lens"></div><img src="sprites/tile.png" alt="download" /></div>
|
|
366
|
+
<div class="el tile"><div class="lens"></div><img src="sprites/tile.png" alt="download" /></div>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
|
|
372
|
+
<defs>
|
|
373
|
+
<filter id="disp-bar" x="-15%" y="-15%" width="130%" height="130%" color-interpolation-filters="sRGB">
|
|
374
|
+
<feImage href="dispmaps/bar.png" preserveAspectRatio="none" width="100%" height="100%" result="m" />
|
|
375
|
+
<feDisplacementMap in="SourceGraphic" in2="m" scale="48" xChannelSelector="R" yChannelSelector="G" />
|
|
376
|
+
</filter>
|
|
377
|
+
<filter id="disp-key" x="-15%" y="-15%" width="130%" height="130%" color-interpolation-filters="sRGB">
|
|
378
|
+
<feImage href="dispmaps/key.png" preserveAspectRatio="none" width="100%" height="100%" result="m" />
|
|
379
|
+
<feDisplacementMap in="SourceGraphic" in2="m" scale="64" xChannelSelector="R" yChannelSelector="G" />
|
|
380
|
+
</filter>
|
|
381
|
+
<filter id="disp-flat" x="-15%" y="-15%" width="130%" height="130%" color-interpolation-filters="sRGB">
|
|
382
|
+
<feImage href="dispmaps/flat.png" preserveAspectRatio="none" width="100%" height="100%" result="m" />
|
|
383
|
+
<feDisplacementMap in="SourceGraphic" in2="m" scale="26" xChannelSelector="R" yChannelSelector="G" />
|
|
384
|
+
</filter>
|
|
385
|
+
</defs>
|
|
386
|
+
</svg>
|
|
387
|
+
|
|
388
|
+
<script>
|
|
389
|
+
(function(){
|
|
390
|
+
/* ═══ download page (task 1722) ═══
|
|
391
|
+
The search + download-tiles "land" scene, over the temple world. Reached
|
|
392
|
+
DIRECTLY by clicking the Cloud Bongos orb (space.js) — the type-"bongos"
|
|
393
|
+
gate moved to the entry (in space), so there is no gate here. This script
|
|
394
|
+
now owns only the download reveal + the elastic-tether drag for its
|
|
395
|
+
sprites. */
|
|
396
|
+
var stage=document.getElementById('stage'), scene=document.getElementById('scene');
|
|
397
|
+
|
|
398
|
+
function showDownload(){ stage.classList.add('arrived'); setTimeout(function(){ measure(); }, 60); }
|
|
399
|
+
function hideDownload(){ stage.classList.remove('arrived','falling'); scene.classList.remove('plunge'); }
|
|
400
|
+
document.addEventListener('cb:show-download', showDownload);
|
|
401
|
+
document.addEventListener('cb:hide-download', hideDownload);
|
|
402
|
+
|
|
403
|
+
/* ═══ 1534: elastic-tether drag, re-applied to the drawn sprite panes ═══
|
|
404
|
+
TUNING — harder to pull free → THRESHOLD↑ · slower return → DRIFT_MAXV↓ ·
|
|
405
|
+
wider wander → WMAG↑ / TURN↓ · bouncier snap-back → DAMP↑. A tap (move <
|
|
406
|
+
DEADZONE) is NOT a drag — it falls through to type/dive, so the panes stay
|
|
407
|
+
both draggable AND clickable. */
|
|
408
|
+
var THRESHOLD=160, HOVER=3000, RETETHER=46, DEADZONE=5;
|
|
409
|
+
var DRIFT_MAXV=0.60, WMAG=0.060, TURN=0.22, K_DRIFT=0.0006, WCALM=150, DRIFT_DAMP=0.94;
|
|
410
|
+
var BOB_X=1.5, BOB_Y=1.3, BOB_EASE=0.12;
|
|
411
|
+
var K_HOME=0.022, STIFF=140, K_PULL=0.09, DAMP=0.867;
|
|
412
|
+
var K_FREE=0.34, DAMP_FREE=0.60;
|
|
413
|
+
var FRICTION=0.88, MAXV=70, DT=1000/60;
|
|
414
|
+
|
|
415
|
+
var marks = Array.prototype.slice.call(document.querySelectorAll('.stage .mark'));
|
|
416
|
+
var panes = Array.prototype.slice.call(document.querySelectorAll('.stage .el'));
|
|
417
|
+
var els = marks.concat(panes);
|
|
418
|
+
var tilesEl = document.querySelector('.stage .tiles');
|
|
419
|
+
|
|
420
|
+
var items = els.map(function(el,i){
|
|
421
|
+
el.classList.add('drag');
|
|
422
|
+
return { el:el, isTile:el.classList.contains('tile'),
|
|
423
|
+
hx:0,hy:0,hw:0,hh:0, ox:0,oy:0, pox:0,poy:0, vx:0,vy:0, tx:0,ty:0,
|
|
424
|
+
free:false, dragging:false, pending:false, moved:false, drifting:false, active:false,
|
|
425
|
+
restAt:null, driftStart:0, wTheta:Math.random()*6.283, bob:1,
|
|
426
|
+
phase:i*1.7, fjit:(i%5)*0.09-0.18, lastTX:0, lastTY:0, grabDX:0, grabDY:0, sx:0, sy:0 };
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
var W=innerWidth, H=innerHeight, zTop=10, tilesActive=0;
|
|
430
|
+
|
|
431
|
+
function measure(){
|
|
432
|
+
W=innerWidth; H=innerHeight;
|
|
433
|
+
items.forEach(function(it){
|
|
434
|
+
var r=it.el.getBoundingClientRect();
|
|
435
|
+
it.hx = r.left + r.width/2 - it.lastTX;
|
|
436
|
+
it.hy = r.top + r.height/2 - it.lastTY;
|
|
437
|
+
it.hw = r.width/2; it.hh = r.height/2;
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
measure();
|
|
441
|
+
if(document.fonts && document.fonts.ready){ document.fonts.ready.then(measure); }
|
|
442
|
+
addEventListener('resize', measure);
|
|
443
|
+
/* the two scenes translate/scale as you dive + replay; re-measure home once a
|
|
444
|
+
scene settles so a freshly-revealed pane drags from the right spot. */
|
|
445
|
+
['land'].forEach(function(id){
|
|
446
|
+
var sc=document.getElementById(id);
|
|
447
|
+
if(sc) sc.addEventListener('transitionend', function(e){ if(e.propertyName==='transform') measure(); });
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
function activate(it){
|
|
451
|
+
if(!it.active){ it.active=true; if(it.isTile) tilesActive++; }
|
|
452
|
+
it.el.style.zIndex = String(++zTop);
|
|
453
|
+
if(it.isTile && tilesEl) tilesEl.style.zIndex = String(++zTop);
|
|
454
|
+
}
|
|
455
|
+
function settle(it){
|
|
456
|
+
if(it.active){ it.active=false;
|
|
457
|
+
if(it.isTile){ tilesActive=Math.max(0,tilesActive-1); if(tilesActive===0 && tilesEl) tilesEl.style.zIndex=''; } }
|
|
458
|
+
it.el.style.zIndex='';
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
items.forEach(function(it){
|
|
462
|
+
it.el.addEventListener('dragstart', function(e){ e.preventDefault(); });
|
|
463
|
+
it.el.addEventListener('pointerdown', function(e){
|
|
464
|
+
it.pending=true; it.moved=false; it.dragging=false;
|
|
465
|
+
it.sx=e.clientX; it.sy=e.clientY;
|
|
466
|
+
it.drifting=false; it.restAt=null; it.driftStart=0;
|
|
467
|
+
it.grabDX = e.clientX - (it.hx+it.ox); it.grabDY = e.clientY - (it.hy+it.oy);
|
|
468
|
+
it.tx=it.ox; it.ty=it.oy;
|
|
469
|
+
try{ it.el.setPointerCapture(e.pointerId); }catch(_){}
|
|
470
|
+
/* NOTE: no preventDefault here — a tap must still focus the terminal (to
|
|
471
|
+
type) and fire the enter "dive". Drag only engages past DEADZONE. */
|
|
472
|
+
});
|
|
473
|
+
it.el.addEventListener('pointermove', function(e){
|
|
474
|
+
if(!it.pending) return;
|
|
475
|
+
if(!it.dragging){
|
|
476
|
+
if(Math.hypot(e.clientX-it.sx, e.clientY-it.sy) < DEADZONE) return;
|
|
477
|
+
it.dragging=true; it.moved=true; it.wTheta=Math.random()*6.283;
|
|
478
|
+
it.el.classList.add('grabbing'); activate(it);
|
|
479
|
+
}
|
|
480
|
+
e.preventDefault();
|
|
481
|
+
it.tx = (e.clientX-it.grabDX) - it.hx;
|
|
482
|
+
it.ty = (e.clientY-it.grabDY) - it.hy;
|
|
483
|
+
});
|
|
484
|
+
function endDrag(e){
|
|
485
|
+
if(!it.pending) return;
|
|
486
|
+
var wasDrag=it.dragging;
|
|
487
|
+
it.pending=false; it.dragging=false; it.el.classList.remove('grabbing');
|
|
488
|
+
try{ it.el.releasePointerCapture(e.pointerId); }catch(_){}
|
|
489
|
+
if(wasDrag){
|
|
490
|
+
if(it.free && Math.hypot(it.ox,it.oy)<RETETHER){ it.free=false; it.drifting=false; it.restAt=null; }
|
|
491
|
+
}
|
|
492
|
+
/* a tap (no drag) on a download pane has no action yet */
|
|
493
|
+
}
|
|
494
|
+
it.el.addEventListener('pointerup', endDrag);
|
|
495
|
+
it.el.addEventListener('pointercancel', endDrag);
|
|
496
|
+
it.el.addEventListener('dblclick', function(){ it.free=false; it.drifting=false; it.restAt=null; });
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
function clampOffset(it){
|
|
500
|
+
var minx=(it.hw+4)-it.hx, maxx=(W-it.hw-4)-it.hx;
|
|
501
|
+
if(maxx>minx){ if(it.ox<minx)it.ox=minx; else if(it.ox>maxx)it.ox=maxx; }
|
|
502
|
+
var miny=(it.hh+4)-it.hy, maxy=(H-it.hh-4)-it.hy;
|
|
503
|
+
if(maxy>miny){ if(it.oy<miny)it.oy=miny; else if(it.oy>maxy)it.oy=maxy; }
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
var simNow=performance.now(), acc=0, last=simNow;
|
|
507
|
+
|
|
508
|
+
function step(){
|
|
509
|
+
simNow+=DT;
|
|
510
|
+
for(var k=0;k<items.length;k++){
|
|
511
|
+
var it=items[k]; it.pox=it.ox; it.poy=it.oy;
|
|
512
|
+
var d, stiff, ax, ay;
|
|
513
|
+
if(it.dragging){
|
|
514
|
+
if(!it.free){
|
|
515
|
+
d=Math.hypot(it.ox,it.oy)||0.0001; stiff=Math.min(4,1+d/STIFF);
|
|
516
|
+
ax=(-it.ox)*K_HOME*stiff+(it.tx-it.ox)*K_PULL;
|
|
517
|
+
ay=(-it.oy)*K_HOME*stiff+(it.ty-it.oy)*K_PULL;
|
|
518
|
+
it.vx=(it.vx+ax)*DAMP; it.vy=(it.vy+ay)*DAMP;
|
|
519
|
+
} else {
|
|
520
|
+
ax=(it.tx-it.ox)*K_FREE; ay=(it.ty-it.oy)*K_FREE;
|
|
521
|
+
it.vx=(it.vx+ax)*DAMP_FREE; it.vy=(it.vy+ay)*DAMP_FREE;
|
|
522
|
+
}
|
|
523
|
+
if(it.vx>MAXV)it.vx=MAXV; else if(it.vx<-MAXV)it.vx=-MAXV;
|
|
524
|
+
if(it.vy>MAXV)it.vy=MAXV; else if(it.vy<-MAXV)it.vy=-MAXV;
|
|
525
|
+
} else if(!it.free){
|
|
526
|
+
d=Math.hypot(it.ox,it.oy)||0.0001; stiff=Math.min(4,1+d/STIFF);
|
|
527
|
+
ax=(-it.ox)*K_HOME*stiff; ay=(-it.oy)*K_HOME*stiff;
|
|
528
|
+
it.vx=(it.vx+ax)*DAMP; it.vy=(it.vy+ay)*DAMP;
|
|
529
|
+
if(it.vx>MAXV)it.vx=MAXV; else if(it.vx<-MAXV)it.vx=-MAXV;
|
|
530
|
+
if(it.vy>MAXV)it.vy=MAXV; else if(it.vy<-MAXV)it.vy=-MAXV;
|
|
531
|
+
} else if(!it.drifting){
|
|
532
|
+
it.vx*=FRICTION; it.vy*=FRICTION; it.driftStart=0;
|
|
533
|
+
if(Math.hypot(it.vx,it.vy)<0.05){ it.vx=0; it.vy=0; if(it.restAt===null) it.restAt=simNow; }
|
|
534
|
+
else it.restAt=null;
|
|
535
|
+
if(it.restAt!==null && simNow-it.restAt>=HOVER) it.drifting=true;
|
|
536
|
+
} else {
|
|
537
|
+
if(!it.driftStart) it.driftStart=simNow;
|
|
538
|
+
d=Math.hypot(it.ox,it.oy)||0.0001;
|
|
539
|
+
it.wTheta += (Math.random()-0.5)*TURN;
|
|
540
|
+
var wScale=Math.min(1,d/WCALM);
|
|
541
|
+
var elapsed=simNow-it.driftStart;
|
|
542
|
+
var homeGain=K_DRIFT*(1+Math.max(0,(elapsed-12000)/10000)*5);
|
|
543
|
+
ax=(-it.ox)*homeGain + Math.cos(it.wTheta)*WMAG*wScale;
|
|
544
|
+
ay=(-it.oy)*homeGain + Math.sin(it.wTheta)*WMAG*wScale;
|
|
545
|
+
it.vx=(it.vx+ax)*DRIFT_DAMP; it.vy=(it.vy+ay)*DRIFT_DAMP;
|
|
546
|
+
var sp=Math.hypot(it.vx,it.vy);
|
|
547
|
+
if(sp>1e-4){ var cap=DRIFT_MAXV*Math.tanh(sp/DRIFT_MAXV), f=cap/sp; it.vx*=f; it.vy*=f; }
|
|
548
|
+
if(d<3 && sp<0.3){ it.free=false; it.drifting=false; it.restAt=null;
|
|
549
|
+
it.ox=0; it.oy=0; it.pox=0; it.poy=0; it.vx=0; it.vy=0; settle(it); continue; }
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
it.bob += ((it.dragging?0:1)-it.bob)*BOB_EASE;
|
|
553
|
+
it.ox+=it.vx; it.oy+=it.vy;
|
|
554
|
+
clampOffset(it);
|
|
555
|
+
|
|
556
|
+
if(it.dragging && !it.free && Math.hypot(it.ox,it.oy)>THRESHOLD){ it.free=true; it.restAt=null; }
|
|
557
|
+
if(!it.dragging && !it.free && Math.hypot(it.vx,it.vy)<0.06 && Math.hypot(it.ox,it.oy)<0.5){
|
|
558
|
+
it.ox=0; it.oy=0; it.vx=0; it.vy=0; if(it.active) settle(it);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
function render(alpha, now){
|
|
564
|
+
for(var k=0;k<items.length;k++){
|
|
565
|
+
var it=items[k];
|
|
566
|
+
var ix=it.pox+(it.ox-it.pox)*alpha, iy=it.poy+(it.oy-it.poy)*alpha;
|
|
567
|
+
var bx=Math.sin(now*0.0011*(1+it.fjit)+it.phase)*BOB_X*it.bob;
|
|
568
|
+
var by=Math.cos(now*0.00094*(1+it.fjit)+it.phase*1.3)*BOB_Y*it.bob;
|
|
569
|
+
it.lastTX=ix+bx; it.lastTY=iy+by;
|
|
570
|
+
it.el.style.transform='translate('+it.lastTX.toFixed(2)+'px,'+it.lastTY.toFixed(2)+'px)';
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
function tick(now){
|
|
575
|
+
var ft=now-last; last=now; if(ft>250)ft=250; acc+=ft;
|
|
576
|
+
var guard=0;
|
|
577
|
+
while(acc>=DT && guard<10){ step(); acc-=DT; guard++; }
|
|
578
|
+
if(guard>=10) acc=0;
|
|
579
|
+
render(Math.max(0,Math.min(1,acc/DT)), now);
|
|
580
|
+
requestAnimationFrame(tick);
|
|
581
|
+
}
|
|
582
|
+
requestAnimationFrame(tick);
|
|
583
|
+
})();
|
|
584
|
+
</script>
|
|
585
|
+
<script src="space.js"></script>
|
|
586
|
+
</body>
|
|
587
|
+
</html>
|
|
Binary file
|
|
Binary file
|