create-workframe 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +22 -0
- package/.gitignore +73 -0
- package/LICENSE +201 -0
- package/NOTICE +12 -0
- package/README.md +111 -0
- package/SECURITY.md +40 -0
- package/bin/create-workframe.js +2814 -0
- package/bin/workframe.js +329 -0
- package/docs/workspace-instructions/WORKFRAME_DISCORD.md +20 -0
- package/docs/workspace-instructions/WORKFRAME_DOCUMENTS_AND_ARTIFACTS.md +20 -0
- package/docs/workspace-instructions/WORKFRAME_KANBAN.md +20 -0
- package/docs/workspace-instructions/WORKFRAME_ONBOARDING.md +21 -0
- package/docs/workspace-instructions/WORKFRAME_ROUTING.md +29 -0
- package/docs/workspace-instructions/WORKFRAME_TELEGRAM.md +19 -0
- package/package.json +67 -0
- package/profiles/README.md +15 -0
- package/profiles/architect/AGENTS.md +29 -0
- package/profiles/architect/SOUL.md +44 -0
- package/profiles/architect/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/designer/AGENTS.md +26 -0
- package/profiles/designer/SOUL.md +31 -0
- package/profiles/designer/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/dev/AGENTS.md +28 -0
- package/profiles/dev/SOUL.md +31 -0
- package/profiles/dev/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/docs/AGENTS.md +27 -0
- package/profiles/docs/SOUL.md +30 -0
- package/profiles/docs/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/research/AGENTS.md +26 -0
- package/profiles/research/SOUL.md +31 -0
- package/profiles/research/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/visionary/AGENTS.md +25 -0
- package/profiles/visionary/SOUL.md +31 -0
- package/profiles/visionary/skills/devops/kanban-worker/SKILL.md +27 -0
- package/profiles/workframe-agent/AGENTS.md +37 -0
- package/profiles/workframe-agent/SETUP.md +185 -0
- package/profiles/workframe-agent/SOUL.md +61 -0
- package/profiles/workframe-agent/skills/devops/botfather/SKILL.md +85 -0
- package/profiles/workframe-agent/skills/devops/kanban-handoff-pattern/SKILL.md +58 -0
- package/profiles/workframe-agent/skills/devops/workframe-cohort/SKILL.md +54 -0
- package/prompts/WORKFRAME_PROMPT_TEMPLATES.md +16 -0
- package/rules/.hermes.md +11 -0
- package/rules/AGENTS.md +22 -0
- package/rules/workspace-README.md +5 -0
- package/scripts/apply-update-hermes.sh +17 -0
- package/scripts/apply-update-workframe.sh +77 -0
- package/scripts/bootstrap-workspace-link.sh +8 -0
- package/scripts/bundle-workframe-ui.mjs +77 -0
- package/scripts/compose-docker-host.sh +37 -0
- package/scripts/create_workframe_scaffold.py +648 -0
- package/scripts/ensure-compose-host-paths.mjs +51 -0
- package/scripts/fix-zk-encryption-key.sh +35 -0
- package/scripts/lib/install-identity.mjs +212 -0
- package/scripts/lib/workframe-registry.mjs +290 -0
- package/scripts/new-project.mjs +68 -0
- package/scripts/restart-gateway-hermes.sh +12 -0
- package/scripts/security_audit.py +156 -0
- package/scripts/select_agent_pack.py +31 -0
- package/scripts/set-compose-public-url.mjs +92 -0
- package/scripts/setup-stack-secrets.sh +50 -0
- package/scripts/sync-canonical-to-package.mjs +146 -0
- package/scripts/test-scaffold.mjs +390 -0
- package/scripts/verify-public-deploy.sh +105 -0
- package/shared/WORKFRAME_AGENT_LIBRARY.md +31 -0
- package/shared/WORKFRAME_AGENT_OPERATIONS.md +29 -0
- package/shared/WORKFRAME_AGENT_PACKS.json +64 -0
- package/shared/WORKFRAME_AGENT_PACKS.yaml +20 -0
- package/shared/WORKFRAME_CHAT_PERMISSION_MODEL.md +20 -0
- package/shared/WORKFRAME_HANDOFF_SCHEMA.md +25 -0
- package/shared/WORKFRAME_SKILL_CURATION.md +27 -0
- package/shared/agent-avatars/ada.png +0 -0
- package/shared/agent-avatars/aibert.png +0 -0
- package/shared/agent-avatars/amelia.png +0 -0
- package/shared/agent-avatars/andy.png +0 -0
- package/shared/agent-avatars/arc.png +0 -0
- package/shared/agent-avatars/bob.png +0 -0
- package/shared/agent-avatars/buzz.png +0 -0
- package/shared/agent-avatars/carl.png +0 -0
- package/shared/agent-avatars/catalog.json +171 -0
- package/shared/agent-avatars/corbu.png +0 -0
- package/shared/agent-avatars/diana.png +0 -0
- package/shared/agent-avatars/ella.png +0 -0
- package/shared/agent-avatars/elvis.png +0 -0
- package/shared/agent-avatars/f1.png +0 -0
- package/shared/agent-avatars/f2.png +0 -0
- package/shared/agent-avatars/f3.png +0 -0
- package/shared/agent-avatars/f4.png +0 -0
- package/shared/agent-avatars/f5.png +0 -0
- package/shared/agent-avatars/f6.png +0 -0
- package/shared/agent-avatars/frida.png +0 -0
- package/shared/agent-avatars/george.png +0 -0
- package/shared/agent-avatars/grace.png +0 -0
- package/shared/agent-avatars/hedy.png +0 -0
- package/shared/agent-avatars/hermes.png +0 -0
- package/shared/agent-avatars/isaac.png +0 -0
- package/shared/agent-avatars/jes.png +0 -0
- package/shared/agent-avatars/john.png +0 -0
- package/shared/agent-avatars/joni.png +0 -0
- package/shared/agent-avatars/leo.png +0 -0
- package/shared/agent-avatars/louis.png +0 -0
- package/shared/agent-avatars/ludwig.png +0 -0
- package/shared/agent-avatars/m1.png +0 -0
- package/shared/agent-avatars/m2.png +0 -0
- package/shared/agent-avatars/m3.png +0 -0
- package/shared/agent-avatars/m4.png +0 -0
- package/shared/agent-avatars/m5.png +0 -0
- package/shared/agent-avatars/m6.png +0 -0
- package/shared/agent-avatars/marie.png +0 -0
- package/shared/agent-avatars/marilyn.png +0 -0
- package/shared/agent-avatars/neil.png +0 -0
- package/shared/agent-avatars/nikola.png +0 -0
- package/shared/agent-avatars/nina.png +0 -0
- package/shared/agent-avatars/paul.png +0 -0
- package/shared/agent-avatars/ringo.png +0 -0
- package/shared/agent-avatars/rosie.png +0 -0
- package/shared/agent-avatars/ste.png +0 -0
- package/shared/agent-avatars/steve.png +0 -0
- package/shared/agent-avatars/sun.png +0 -0
- package/shared/agent-avatars/tom.png +0 -0
- package/shared/agent-avatars/warren.png +0 -0
- package/shared/agent-avatars/woz.png +0 -0
- package/shared/agent-avatars/zaha.png +0 -0
- package/workframe-api/Dockerfile +14 -0
- package/workframe-api/README.md +28 -0
- package/workframe-api/action_proxy.py +131 -0
- package/workframe-api/auth_rate_limit.py +49 -0
- package/workframe-api/catalog/avatar-catalog.json +171 -0
- package/workframe-api/catalog/logo-catalog.json +86 -0
- package/workframe-api/catalog/user-avatar-catalog.json +171 -0
- package/workframe-api/credential_vault.py +445 -0
- package/workframe-api/data/.gitkeep +0 -0
- package/workframe-api/data/avatar-catalog.json +41 -0
- package/workframe-api/data/logo-catalog.json +14 -0
- package/workframe-api/data/user-avatar-catalog.json +18 -0
- package/workframe-api/email_sender.py +220 -0
- package/workframe-api/google_auth.py +90 -0
- package/workframe-api/install_api.py +359 -0
- package/workframe-api/internal_proxy_auth.py +150 -0
- package/workframe-api/llm_proxy.py +277 -0
- package/workframe-api/oidc_jwt.py +108 -0
- package/workframe-api/package.json +13 -0
- package/workframe-api/platform_auth.py +194 -0
- package/workframe-api/profile_secret_policy.py +86 -0
- package/workframe-api/public/assets/index-DPXu_lGn.css +1 -0
- package/workframe-api/public/assets/index-DYnLrCZZ.js +9 -0
- package/workframe-api/public/assets/index-DglUqFB_.js +9 -0
- package/workframe-api/public/index.html +12 -0
- package/workframe-api/requirements.txt +2 -0
- package/workframe-api/server.py +19646 -0
- package/workframe-api/site_meta.py +271 -0
- package/workframe-api/stack_config.py +427 -0
- package/workframe-api/tests/__init__.py +0 -0
- package/workframe-api/tests/db_setup.py +13 -0
- package/workframe-api/tests/test_admin_updates_gated.py +30 -0
- package/workframe-api/tests/test_agent_dm_bootstrap.py +196 -0
- package/workframe-api/tests/test_agent_profile_sync.py +76 -0
- package/workframe-api/tests/test_auth_email.py +222 -0
- package/workframe-api/tests/test_auth_hole_fix_selfcheck.py +99 -0
- package/workframe-api/tests/test_auth_rate_limit.py +19 -0
- package/workframe-api/tests/test_avatar_resolve.py +77 -0
- package/workframe-api/tests/test_child_soul_template.py +71 -0
- package/workframe-api/tests/test_credential_canary.py +135 -0
- package/workframe-api/tests/test_credential_isolation.py +448 -0
- package/workframe-api/tests/test_credential_resolution.py +206 -0
- package/workframe-api/tests/test_device_oauth.py +108 -0
- package/workframe-api/tests/test_doctor_repair.py +103 -0
- package/workframe-api/tests/test_ensure_profile_api.py +77 -0
- package/workframe-api/tests/test_gateway_compose_security.py +136 -0
- package/workframe-api/tests/test_install_secure_host.py +39 -0
- package/workframe-api/tests/test_internal_proxy_auth.py +125 -0
- package/workframe-api/tests/test_invite_runtime_bootstrap.py +72 -0
- package/workframe-api/tests/test_kanban_delegation.py +185 -0
- package/workframe-api/tests/test_llm_proxy.py +155 -0
- package/workframe-api/tests/test_login_access_policy.py +183 -0
- package/workframe-api/tests/test_mvp_model_bootstrap.py +75 -0
- package/workframe-api/tests/test_onboarding_bootstrap.py +248 -0
- package/workframe-api/tests/test_platform_auth.py +47 -0
- package/workframe-api/tests/test_profile_config_path.py +56 -0
- package/workframe-api/tests/test_profile_config_yaml_repair.py +63 -0
- package/workframe-api/tests/test_profile_create.py +72 -0
- package/workframe-api/tests/test_profile_identity_overlay.py +61 -0
- package/workframe-api/tests/test_profile_install_health.py +45 -0
- package/workframe-api/tests/test_profile_secret_policy.py +57 -0
- package/workframe-api/tests/test_profile_workspace_cwd.py +34 -0
- package/workframe-api/tests/test_provider_bootstrap.py +75 -0
- package/workframe-api/tests/test_provider_connect.py +54 -0
- package/workframe-api/tests/test_room_crud.py +192 -0
- package/workframe-api/tests/test_room_tenancy.py +701 -0
- package/workframe-api/tests/test_runtime_identity_backfill.py +34 -0
- package/workframe-api/tests/test_site_meta.py +81 -0
- package/workframe-api/tests/test_soul_stub.py +42 -0
- package/workframe-api/tests/test_space_member_sync.py +99 -0
- package/workframe-api/tests/test_stripe_stack_config.py +37 -0
- package/workframe-api/tests/test_supervisor_lifecycle.py +52 -0
- package/workframe-api/tests/test_turn_credential_vault.py +125 -0
- package/workframe-api/tests/test_updates.py +176 -0
- package/workframe-api/tests/test_user_cohort.py +113 -0
- package/workframe-api/tests/test_vault_envelope.py +110 -0
- package/workframe-api/tests/test_workspace_members.py +183 -0
- package/workframe-api/tests/test_workspace_messaging_sync.py +125 -0
- package/workframe-api/tests/test_workspace_provider_list.py +57 -0
- package/workframe-api/time-bind-chat.py +99 -0
- package/workframe-api/turn_credentials.py +226 -0
- package/workframe-api/updates.py +417 -0
- package/workframe-api/vault_kek.py +159 -0
- package/workframe-api/zk_auth.py +633 -0
- package/workframe-supervisor/Dockerfile +11 -0
- package/workframe-supervisor/profile_secret_policy.py +76 -0
- package/workframe-supervisor/server.py +787 -0
- package/workframe-supervisor/tests/test_exec_guard.py +42 -0
- package/workframe-supervisor/tests/test_server_import.py +21 -0
- package/workframe-ui/docker/nginx.conf +85 -0
- package/workframe-ui/public/assets/1-DLJbBkOb.png +0 -0
- package/workframe-ui/public/assets/10-uwRwj5ce.png +0 -0
- package/workframe-ui/public/assets/11-5OuV9F_e.png +0 -0
- package/workframe-ui/public/assets/12-u_axjxW-.png +0 -0
- package/workframe-ui/public/assets/13-ldSvcMsH.png +0 -0
- package/workframe-ui/public/assets/14-xdcALEYD.png +0 -0
- package/workframe-ui/public/assets/15-aZ4snEFB.png +0 -0
- package/workframe-ui/public/assets/16-L_5-DttY.png +0 -0
- package/workframe-ui/public/assets/2-zOPZTppD.png +0 -0
- package/workframe-ui/public/assets/3-Dc3WoVu5.png +0 -0
- package/workframe-ui/public/assets/4-C50hk7_m.png +0 -0
- package/workframe-ui/public/assets/5-Eweetkq4.png +0 -0
- package/workframe-ui/public/assets/6-5sOXgfkw.png +0 -0
- package/workframe-ui/public/assets/7-BqRBCbiC.png +0 -0
- package/workframe-ui/public/assets/8-DEDKS94h.png +0 -0
- package/workframe-ui/public/assets/9-DNj34GW-.png +0 -0
- package/workframe-ui/public/assets/ada-DsvuOc9n.png +0 -0
- package/workframe-ui/public/assets/aibert-BCz8Lo8H.png +0 -0
- package/workframe-ui/public/assets/amelia-DUf3EBGu.png +0 -0
- package/workframe-ui/public/assets/andy-Cpymuhhx.png +0 -0
- package/workframe-ui/public/assets/arc-CBDYvkAF.js +1 -0
- package/workframe-ui/public/assets/architecture-7EHR7CIX-CtbQKTuT.js +1 -0
- package/workframe-ui/public/assets/architectureDiagram-3BPJPVTR-XnBRKeW0.js +36 -0
- package/workframe-ui/public/assets/array-BifhSqXX.js +1 -0
- package/workframe-ui/public/assets/avatars/ada.png +0 -0
- package/workframe-ui/public/assets/avatars/aibert.png +0 -0
- package/workframe-ui/public/assets/avatars/amelia.png +0 -0
- package/workframe-ui/public/assets/avatars/andy.png +0 -0
- package/workframe-ui/public/assets/avatars/bob.png +0 -0
- package/workframe-ui/public/assets/avatars/buzz.png +0 -0
- package/workframe-ui/public/assets/avatars/carl.png +0 -0
- package/workframe-ui/public/assets/avatars/catalog.json +171 -0
- package/workframe-ui/public/assets/avatars/corbu.png +0 -0
- package/workframe-ui/public/assets/avatars/diana.png +0 -0
- package/workframe-ui/public/assets/avatars/elvis.png +0 -0
- package/workframe-ui/public/assets/avatars/frida.png +0 -0
- package/workframe-ui/public/assets/avatars/george.png +0 -0
- package/workframe-ui/public/assets/avatars/grace.png +0 -0
- package/workframe-ui/public/assets/avatars/hedy.png +0 -0
- package/workframe-ui/public/assets/avatars/hermes.png +0 -0
- package/workframe-ui/public/assets/avatars/isaac.png +0 -0
- package/workframe-ui/public/assets/avatars/john.png +0 -0
- package/workframe-ui/public/assets/avatars/joni.png +0 -0
- package/workframe-ui/public/assets/avatars/leo.png +0 -0
- package/workframe-ui/public/assets/avatars/louis.png +0 -0
- package/workframe-ui/public/assets/avatars/ludwig.png +0 -0
- package/workframe-ui/public/assets/avatars/marie.png +0 -0
- package/workframe-ui/public/assets/avatars/marilyn.png +0 -0
- package/workframe-ui/public/assets/avatars/nikola.png +0 -0
- package/workframe-ui/public/assets/avatars/nina.png +0 -0
- package/workframe-ui/public/assets/avatars/paul.png +0 -0
- package/workframe-ui/public/assets/avatars/ringo.png +0 -0
- package/workframe-ui/public/assets/avatars/rosie.png +0 -0
- package/workframe-ui/public/assets/avatars/steve.png +0 -0
- package/workframe-ui/public/assets/avatars/sun.png +0 -0
- package/workframe-ui/public/assets/avatars/warren.png +0 -0
- package/workframe-ui/public/assets/avatars/woz.png +0 -0
- package/workframe-ui/public/assets/avatars/zaha.png +0 -0
- package/workframe-ui/public/assets/blockDiagram-GPEHLZMM-VYHUfVhd.js +132 -0
- package/workframe-ui/public/assets/bob-DRz-48Id.png +0 -0
- package/workframe-ui/public/assets/branding/banner.png +0 -0
- package/workframe-ui/public/assets/branding/og-default.png +0 -0
- package/workframe-ui/public/assets/branding/workframe'white.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-1.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-2.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-3.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-4.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-5.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-banner.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-logo-horizontal-mini.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-logo-horizontal-nano.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-logo-horizontal.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-logo-vertical-alt.png +0 -0
- package/workframe-ui/public/assets/branding/workframe-logo-vertical.png +0 -0
- package/workframe-ui/public/assets/branding/workframe.png +0 -0
- package/workframe-ui/public/assets/buzz-mC4PtMvC.png +0 -0
- package/workframe-ui/public/assets/c4Diagram-AAUBKEIU-BTjUcJpm.js +10 -0
- package/workframe-ui/public/assets/carl-CtE74db_.png +0 -0
- package/workframe-ui/public/assets/channel-Dy4Z4-jn.js +1 -0
- package/workframe-ui/public/assets/chunk-2J33WTMH-w7uu7R-b.js +1 -0
- package/workframe-ui/public/assets/chunk-3OPIFGDE-Cb9LtnDX.js +62 -0
- package/workframe-ui/public/assets/chunk-4BX2VUAB-DiQ-qCwH.js +1 -0
- package/workframe-ui/public/assets/chunk-55IACEB6-C-mLFr7z.js +1 -0
- package/workframe-ui/public/assets/chunk-5ZQYHXKU-DOesfiCI.js +2 -0
- package/workframe-ui/public/assets/chunk-727SXJPM-BJ3oBZuz.js +206 -0
- package/workframe-ui/public/assets/chunk-AQP2D5EJ-CCA6xpGs.js +231 -0
- package/workframe-ui/public/assets/chunk-BSJP7CBP-a0cMNFb2.js +1 -0
- package/workframe-ui/public/assets/chunk-CSCIHK7Q-kuqN8EIY.js +122 -0
- package/workframe-ui/public/assets/chunk-FMBD7UC4-DyPgYHCg.js +15 -0
- package/workframe-ui/public/assets/chunk-KSCS5N6A-CdUuvR0V.js +10 -0
- package/workframe-ui/public/assets/chunk-L5ZTLDWV-Dq9NoWmK.js +1 -0
- package/workframe-ui/public/assets/chunk-LZXEDZCA-p74rddlO.js +2 -0
- package/workframe-ui/public/assets/chunk-ND2GUHAM-DBD2u1Gz.js +1 -0
- package/workframe-ui/public/assets/chunk-NNHCCRGN-DlpIbxXb.js +159 -0
- package/workframe-ui/public/assets/chunk-NZK2D7GU-BeIeYFnd.js +1 -0
- package/workframe-ui/public/assets/chunk-O5CBEL6O-ClHc56ib.js +70 -0
- package/workframe-ui/public/assets/chunk-QZHKN3VN-CtBEchFK.js +1 -0
- package/workframe-ui/public/assets/chunk-WU5MYG2G-B9pBtriN.js +1 -0
- package/workframe-ui/public/assets/chunk-XPW4576I-EFr8R_1p.js +32 -0
- package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-BMAEA8jI.js +1 -0
- package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-BMAEA8jI.js +1 -0
- package/workframe-ui/public/assets/corbu-KiaMXzXQ.png +0 -0
- package/workframe-ui/public/assets/cose-bilkent-S5V4N54A-C7aPBODd.js +1 -0
- package/workframe-ui/public/assets/cytoscape.esm-h6BdjjI9.js +321 -0
- package/workframe-ui/public/assets/dagre-BM42HDAG-BdU1Rv-H.js +4 -0
- package/workframe-ui/public/assets/dagre-Bx709z4p.js +1 -0
- package/workframe-ui/public/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/workframe-ui/public/assets/diagram-2AECGRRQ-DWowSo85.js +43 -0
- package/workframe-ui/public/assets/diagram-5GNKFQAL-MnxBbceO.js +10 -0
- package/workframe-ui/public/assets/diagram-KO2AKTUF-DQaLRXFf.js +3 -0
- package/workframe-ui/public/assets/diagram-LMA3HP47-CQaBud9k.js +24 -0
- package/workframe-ui/public/assets/diagram-OG6HWLK6-D8bAXbY9.js +24 -0
- package/workframe-ui/public/assets/diana-DW0MsL38.png +0 -0
- package/workframe-ui/public/assets/dist-DGpTLHr_.js +1 -0
- package/workframe-ui/public/assets/elvis-LCFaZIcT.png +0 -0
- package/workframe-ui/public/assets/erDiagram-TEJ5UH35-1E-xSvBK.js +85 -0
- package/workframe-ui/public/assets/eventmodeling-FCH6USID-D75cstNT.js +1 -0
- package/workframe-ui/public/assets/flowDiagram-I6XJVG4X-CgOVD5hu.js +162 -0
- package/workframe-ui/public/assets/frida-CXFA0w3F.png +0 -0
- package/workframe-ui/public/assets/ganttDiagram-6RSMTGT7-JFYAIauo.js +292 -0
- package/workframe-ui/public/assets/george-DBSH2Sm2.png +0 -0
- package/workframe-ui/public/assets/gitGraph-WXDBUCRP-B9REenIl.js +1 -0
- package/workframe-ui/public/assets/gitGraphDiagram-PVQCEYII-BQ7NcMSn.js +106 -0
- package/workframe-ui/public/assets/grace-BhV0UPc0.png +0 -0
- package/workframe-ui/public/assets/graphlib-B8gBHxth.js +1 -0
- package/workframe-ui/public/assets/hedy-BR2IHift.png +0 -0
- package/workframe-ui/public/assets/hermes-CqCzcE0y.png +0 -0
- package/workframe-ui/public/assets/index-Dnw6vjqb.js +133 -0
- package/workframe-ui/public/assets/index-DpAGxump.css +1 -0
- package/workframe-ui/public/assets/info-J43DQDTF-CL6-eTjH.js +1 -0
- package/workframe-ui/public/assets/infoDiagram-5YYISTIA-LJTODW4W.js +2 -0
- package/workframe-ui/public/assets/init-D6jRqBbL.js +1 -0
- package/workframe-ui/public/assets/isaac-D1nhJAuv.png +0 -0
- package/workframe-ui/public/assets/ishikawaDiagram-YF4QCWOH-bchrQVuo.js +70 -0
- package/workframe-ui/public/assets/john-zSPWwNi4.png +0 -0
- package/workframe-ui/public/assets/joni-BFLoyfJP.png +0 -0
- package/workframe-ui/public/assets/journeyDiagram-JHISSGLW-DkrvYuxP.js +139 -0
- package/workframe-ui/public/assets/kanban-definition-UN3LZRKU-DFRbj0IG.js +89 -0
- package/workframe-ui/public/assets/katex-Vhh-h91d.js +257 -0
- package/workframe-ui/public/assets/leo-C_3IOL11.png +0 -0
- package/workframe-ui/public/assets/line-Vd48P7-O.js +1 -0
- package/workframe-ui/public/assets/linear-Ckizh2G7.js +1 -0
- package/workframe-ui/public/assets/louis-DEEECFSX.png +0 -0
- package/workframe-ui/public/assets/ludwig-_hoKhhyK.png +0 -0
- package/workframe-ui/public/assets/marie-DET6MsfO.png +0 -0
- package/workframe-ui/public/assets/marilyn-DTqwt8Yh.png +0 -0
- package/workframe-ui/public/assets/mermaid-parser.core-Bkimsnqj.js +4 -0
- package/workframe-ui/public/assets/mermaid.core-x0TvVuPo.js +9 -0
- package/workframe-ui/public/assets/mindmap-definition-RKZ34NQL-6ykAFPEz.js +96 -0
- package/workframe-ui/public/assets/nikola-B4PtHrJv.png +0 -0
- package/workframe-ui/public/assets/nina-BYbrOn0d.png +0 -0
- package/workframe-ui/public/assets/ordinal-hYBb2elL.js +1 -0
- package/workframe-ui/public/assets/packet-YPE3B663-Dw3xgMDt.js +1 -0
- package/workframe-ui/public/assets/path-BWPyau1x.js +1 -0
- package/workframe-ui/public/assets/paul-CGURYQIn.png +0 -0
- package/workframe-ui/public/assets/pie-LRSECV5Y-DATysawG.js +1 -0
- package/workframe-ui/public/assets/pieDiagram-4H26LBE5-SJKD1S0S.js +30 -0
- package/workframe-ui/public/assets/project-logos/1.png +0 -0
- package/workframe-ui/public/assets/project-logos/10.png +0 -0
- package/workframe-ui/public/assets/project-logos/11.png +0 -0
- package/workframe-ui/public/assets/project-logos/12.png +0 -0
- package/workframe-ui/public/assets/project-logos/13.png +0 -0
- package/workframe-ui/public/assets/project-logos/14.png +0 -0
- package/workframe-ui/public/assets/project-logos/15.png +0 -0
- package/workframe-ui/public/assets/project-logos/16.png +0 -0
- package/workframe-ui/public/assets/project-logos/2.png +0 -0
- package/workframe-ui/public/assets/project-logos/3.png +0 -0
- package/workframe-ui/public/assets/project-logos/4.png +0 -0
- package/workframe-ui/public/assets/project-logos/5.png +0 -0
- package/workframe-ui/public/assets/project-logos/6.png +0 -0
- package/workframe-ui/public/assets/project-logos/7.png +0 -0
- package/workframe-ui/public/assets/project-logos/8.png +0 -0
- package/workframe-ui/public/assets/project-logos/9.png +0 -0
- package/workframe-ui/public/assets/project-logos/catalog.json +86 -0
- package/workframe-ui/public/assets/quadrantDiagram-W4KKPZXB-BrYDZX8q.js +7 -0
- package/workframe-ui/public/assets/radar-GUYGQ44K-BmWYPCds.js +1 -0
- package/workframe-ui/public/assets/requirementDiagram-4Y6WPE33-DwL9Mc8e.js +84 -0
- package/workframe-ui/public/assets/ringo-WhfUNOyY.png +0 -0
- package/workframe-ui/public/assets/rosie-CAtcIf87.png +0 -0
- package/workframe-ui/public/assets/rough.esm-CSKSodPl.js +1 -0
- package/workframe-ui/public/assets/sankeyDiagram-5OEKKPKP-DYIFsL8h.js +40 -0
- package/workframe-ui/public/assets/sequenceDiagram-3UESZ5HK-0-FPkFk8.js +162 -0
- package/workframe-ui/public/assets/src-B_od6b6h.js +1 -0
- package/workframe-ui/public/assets/stateDiagram-AJRCARHV-BQCiBk6u.js +1 -0
- package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-B89jAMFF.js +1 -0
- package/workframe-ui/public/assets/steve-CgXXJ9EZ.png +0 -0
- package/workframe-ui/public/assets/sun-BLNAhoZd.png +0 -0
- package/workframe-ui/public/assets/timeline-definition-PNZ67QCA-DS3tFcXj.js +120 -0
- package/workframe-ui/public/assets/treeView-BLDUP644-DSyUCKLY.js +1 -0
- package/workframe-ui/public/assets/treemap-LRROVOQU-CEZaNh5Y.js +1 -0
- package/workframe-ui/public/assets/vennDiagram-CIIHVFJN-CD-Vc9NF.js +34 -0
- package/workframe-ui/public/assets/wardley-L42UT6IY-Drq5w1Mc.js +1 -0
- package/workframe-ui/public/assets/wardleyDiagram-YWT4CUSO-DouXDJoF.js +78 -0
- package/workframe-ui/public/assets/warren-DIH7UKMY.png +0 -0
- package/workframe-ui/public/assets/woz-D2yleG-V.png +0 -0
- package/workframe-ui/public/assets/xychartDiagram-2RQKCTM6-DDf_Lol5.js +7 -0
- package/workframe-ui/public/assets/zaha-wersOEq9.png +0 -0
- package/workframe-ui/public/favicon.ico +0 -0
- package/workframe-ui/public/favicon.svg +7 -0
- package/workframe-ui/public/icons.svg +24 -0
- package/workframe-ui/public/index.html +50 -0
- package/workframe-ui/public/manifest.webmanifest +18 -0
- package/workframe-ui/public/workframe-config.json +4 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Static security hygiene scan for the Workframe package source."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
10
|
+
|
|
11
|
+
SECRET_PATTERNS = {
|
|
12
|
+
'aws_access_key': re.compile(r'AKIA[0-9A-Z]{16}'),
|
|
13
|
+
'github_pat': re.compile(r'ghp_[A-Za-z0-9]{36}'),
|
|
14
|
+
'slack_token': re.compile(r'xox[baprs]-[A-Za-z0-9-]{10,}'),
|
|
15
|
+
'telegram_bot_token': re.compile(r'\b\d{8,10}:[A-Za-z0-9_-]{35}\b'),
|
|
16
|
+
'discord_token': re.compile(r'[MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27}'),
|
|
17
|
+
'private_key': re.compile(r'-----BEGIN (?:RSA|EC|OPENSSH|DSA|PGP|PRIVATE) KEY-----'),
|
|
18
|
+
'generic_secret_assignment': re.compile(r'(?i)(api[_-]?key|token|secret)\s*[:=]\s*["\']?[A-Za-z0-9_\-]{16,}'),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
IGNORE_PARTS = {'.venv', '__pycache__', '.pytest_cache', 'node_modules'}
|
|
22
|
+
|
|
23
|
+
REQUIRED_IGNORE_PATTERNS = [
|
|
24
|
+
'Agents/', '.env', '*.db', 'logs/', 'memories/', 'sessions/', 'kanban/',
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
INSTANCE_ARTIFACT_PATTERNS = [
|
|
28
|
+
re.compile(r'\buser_id\b', re.IGNORECASE),
|
|
29
|
+
re.compile(r'\bmessage_id\b', re.IGNORECASE),
|
|
30
|
+
re.compile(r'\bgateway_state\b', re.IGNORECASE),
|
|
31
|
+
re.compile(r'\bkanban\.db\b', re.IGNORECASE),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
# Project-specific / PII-adjacent names — must not appear in publishable templates
|
|
35
|
+
BANNED_TERM_PATTERNS = [
|
|
36
|
+
('glitch', re.compile(r'\bglitch\b', re.IGNORECASE)),
|
|
37
|
+
('zeta', re.compile(r'\bzeta\b', re.IGNORECASE)),
|
|
38
|
+
('alan', re.compile(r'\balan\b', re.IGNORECASE)),
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
# Skip docs that document the ban itself
|
|
42
|
+
BANNED_TERM_SKIP = {'security_audit.py'}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def iter_files(root: Path):
|
|
46
|
+
for p in root.rglob('*'):
|
|
47
|
+
if not p.is_file():
|
|
48
|
+
continue
|
|
49
|
+
if any(part in IGNORE_PARTS for part in p.parts):
|
|
50
|
+
continue
|
|
51
|
+
yield p
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def scan_secrets():
|
|
55
|
+
findings = []
|
|
56
|
+
for p in iter_files(ROOT):
|
|
57
|
+
rel = p.relative_to(ROOT).as_posix()
|
|
58
|
+
text = p.read_text(errors='ignore')
|
|
59
|
+
for name, pattern in SECRET_PATTERNS.items():
|
|
60
|
+
for m in pattern.finditer(text):
|
|
61
|
+
findings.append({
|
|
62
|
+
'severity': 'high',
|
|
63
|
+
'type': 'secret_pattern',
|
|
64
|
+
'rule': name,
|
|
65
|
+
'file': rel,
|
|
66
|
+
'excerpt': m.group(0)[:80],
|
|
67
|
+
})
|
|
68
|
+
return findings
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def scan_gitignore_coverage():
|
|
72
|
+
findings = []
|
|
73
|
+
gi = ROOT / '.gitignore'
|
|
74
|
+
if not gi.exists():
|
|
75
|
+
findings.append({
|
|
76
|
+
'severity': 'high',
|
|
77
|
+
'type': 'missing_gitignore',
|
|
78
|
+
'file': '.gitignore',
|
|
79
|
+
'rule': 'required file missing',
|
|
80
|
+
})
|
|
81
|
+
return findings
|
|
82
|
+
|
|
83
|
+
content = gi.read_text(errors='ignore')
|
|
84
|
+
for req in REQUIRED_IGNORE_PATTERNS:
|
|
85
|
+
if req not in content:
|
|
86
|
+
findings.append({
|
|
87
|
+
'severity': 'medium',
|
|
88
|
+
'type': 'gitignore_gap',
|
|
89
|
+
'file': '.gitignore',
|
|
90
|
+
'rule': f'missing pattern {req}',
|
|
91
|
+
})
|
|
92
|
+
return findings
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def scan_instance_artifacts():
|
|
96
|
+
findings = []
|
|
97
|
+
for p in iter_files(ROOT):
|
|
98
|
+
if p.name in {'.gitignore', '.dockerignore', '.npmignore'}:
|
|
99
|
+
continue
|
|
100
|
+
rel = p.relative_to(ROOT).as_posix()
|
|
101
|
+
text = p.read_text(errors='ignore')
|
|
102
|
+
for pattern in INSTANCE_ARTIFACT_PATTERNS:
|
|
103
|
+
for m in pattern.finditer(text):
|
|
104
|
+
findings.append({
|
|
105
|
+
'severity': 'medium',
|
|
106
|
+
'type': 'instance_artifact_reference',
|
|
107
|
+
'file': rel,
|
|
108
|
+
'rule': pattern.pattern,
|
|
109
|
+
'excerpt': m.group(0),
|
|
110
|
+
})
|
|
111
|
+
return findings
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def scan_banned_terms():
|
|
115
|
+
findings = []
|
|
116
|
+
for p in iter_files(ROOT):
|
|
117
|
+
rel = p.relative_to(ROOT).as_posix()
|
|
118
|
+
if p.name in BANNED_TERM_SKIP:
|
|
119
|
+
continue
|
|
120
|
+
text = p.read_text(errors='ignore')
|
|
121
|
+
for term, pattern in BANNED_TERM_PATTERNS:
|
|
122
|
+
for m in pattern.finditer(text):
|
|
123
|
+
findings.append({
|
|
124
|
+
'severity': 'medium',
|
|
125
|
+
'type': 'banned_term',
|
|
126
|
+
'rule': term,
|
|
127
|
+
'file': rel,
|
|
128
|
+
'excerpt': m.group(0),
|
|
129
|
+
})
|
|
130
|
+
return findings
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def main():
|
|
134
|
+
findings = []
|
|
135
|
+
findings.extend(scan_secrets())
|
|
136
|
+
findings.extend(scan_gitignore_coverage())
|
|
137
|
+
findings.extend(scan_instance_artifacts())
|
|
138
|
+
findings.extend(scan_banned_terms())
|
|
139
|
+
|
|
140
|
+
high = [f for f in findings if f['severity'] == 'high']
|
|
141
|
+
medium = [f for f in findings if f['severity'] == 'medium']
|
|
142
|
+
|
|
143
|
+
report = {
|
|
144
|
+
'root': str(ROOT),
|
|
145
|
+
'findings_total': len(findings),
|
|
146
|
+
'high': len(high),
|
|
147
|
+
'medium': len(medium),
|
|
148
|
+
'findings': findings,
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
print(json.dumps(report, indent=2))
|
|
152
|
+
raise SystemExit(1 if high else 0)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
if __name__ == '__main__':
|
|
156
|
+
main()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import argparse
|
|
3
|
+
import json
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
DEFAULT = Path(__file__).resolve().parents[1] / 'shared' / 'WORKFRAME_AGENT_PACKS.json'
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
ap = argparse.ArgumentParser(description='Print profiles for a Workframe starter pack')
|
|
10
|
+
ap.add_argument('pack', nargs='?', help='Pack name (vanilla/core/product/engineering/full)')
|
|
11
|
+
ap.add_argument('--list', action='store_true', help='List packs')
|
|
12
|
+
ap.add_argument('--file', default=str(DEFAULT), help='Path to WORKFRAME_AGENT_PACKS.json')
|
|
13
|
+
args = ap.parse_args()
|
|
14
|
+
|
|
15
|
+
data = json.loads(Path(args.file).read_text())
|
|
16
|
+
packs = data.get('packs', {})
|
|
17
|
+
|
|
18
|
+
if args.list or not args.pack:
|
|
19
|
+
for name, info in packs.items():
|
|
20
|
+
print(f"{name}: {info.get('description','')}")
|
|
21
|
+
return
|
|
22
|
+
|
|
23
|
+
pack = packs.get(args.pack)
|
|
24
|
+
if not pack:
|
|
25
|
+
raise SystemExit(f"Unknown pack: {args.pack}. Use --list")
|
|
26
|
+
|
|
27
|
+
for p in pack.get('profiles', []):
|
|
28
|
+
print(p)
|
|
29
|
+
|
|
30
|
+
if __name__ == '__main__':
|
|
31
|
+
main()
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Set public URL keys in compose .env (APP_BASE_URL, WORKFRAME_PUBLIC_HOST, CORS, ALLOWED_HOSTS).
|
|
4
|
+
* HERMES_DASHBOARD_PUBLIC_URL is derived from APP_BASE_URL in docker-compose.yml.
|
|
5
|
+
* Usage: node set-compose-public-url.mjs https://dev.example.com [--env path/to/.env]
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
|
|
13
|
+
if (args.includes('--self-check')) {
|
|
14
|
+
function normalizePublicUrl(raw) {
|
|
15
|
+
let u = String(raw || '').trim();
|
|
16
|
+
if (!u) throw new Error('url required');
|
|
17
|
+
if (!/^https?:\/\//i.test(u)) u = `https://${u}`;
|
|
18
|
+
const parsed = new URL(u);
|
|
19
|
+
if (!parsed.hostname) throw new Error('invalid hostname');
|
|
20
|
+
return `https://${parsed.hostname}`;
|
|
21
|
+
}
|
|
22
|
+
if (normalizePublicUrl('dev.example.com') !== 'https://dev.example.com') {
|
|
23
|
+
throw new Error('normalizePublicUrl failed');
|
|
24
|
+
}
|
|
25
|
+
console.log('self-check ok');
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const envFlag = args.indexOf('--env');
|
|
30
|
+
let envPath =
|
|
31
|
+
envFlag >= 0 ? args[envFlag + 1] : path.join(path.dirname(fileURLToPath(import.meta.url)), '../../infra/compose/workframe/.env');
|
|
32
|
+
const urlArg = args.find((a) => !a.startsWith('--') && a !== envPath);
|
|
33
|
+
|
|
34
|
+
if (!urlArg?.trim()) {
|
|
35
|
+
console.error('Usage: node set-compose-public-url.mjs <https://host> [--env path/to/.env]');
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function normalizePublicUrl(raw) {
|
|
40
|
+
let u = String(raw || '').trim();
|
|
41
|
+
if (!u) throw new Error('url required');
|
|
42
|
+
if (!/^https?:\/\//i.test(u)) u = `https://${u}`;
|
|
43
|
+
const parsed = new URL(u);
|
|
44
|
+
if (!parsed.hostname) throw new Error('invalid hostname');
|
|
45
|
+
return `https://${parsed.hostname}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function hostnameFromUrl(url) {
|
|
49
|
+
return new URL(url).hostname;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function setKv(text, key, val) {
|
|
53
|
+
const line = `${key}=${val}`;
|
|
54
|
+
const re = new RegExp(`^${key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}=.*$`, 'm');
|
|
55
|
+
if (re.test(text)) return text.replace(re, line);
|
|
56
|
+
return `${text}${text.endsWith('\n') || !text ? '' : '\n'}${line}\n`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const publicUrl = normalizePublicUrl(urlArg);
|
|
60
|
+
const host = hostnameFromUrl(publicUrl);
|
|
61
|
+
|
|
62
|
+
if (!fs.existsSync(envPath)) {
|
|
63
|
+
const example = `${envPath}.example`;
|
|
64
|
+
if (fs.existsSync(example)) {
|
|
65
|
+
fs.mkdirSync(path.dirname(envPath), { recursive: true });
|
|
66
|
+
fs.copyFileSync(example, envPath);
|
|
67
|
+
console.log(`Created ${envPath} from example`);
|
|
68
|
+
} else {
|
|
69
|
+
throw new Error(`Missing env file: ${envPath}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
let text = fs.readFileSync(envPath, 'utf8');
|
|
74
|
+
text = setKv(text, 'APP_BASE_URL', publicUrl);
|
|
75
|
+
text = setKv(text, 'WORKFRAME_PUBLIC_HOST', host);
|
|
76
|
+
text = setKv(text, 'ALLOWED_HOSTS', host);
|
|
77
|
+
text = setKv(text, 'CORS_ALLOW_ORIGIN', publicUrl);
|
|
78
|
+
fs.writeFileSync(envPath, text);
|
|
79
|
+
|
|
80
|
+
console.log(
|
|
81
|
+
JSON.stringify(
|
|
82
|
+
{
|
|
83
|
+
ok: true,
|
|
84
|
+
env: envPath,
|
|
85
|
+
app_base_url: publicUrl,
|
|
86
|
+
hermes_dashboard_public_url: `${publicUrl}/hermes-dashboard`,
|
|
87
|
+
host,
|
|
88
|
+
},
|
|
89
|
+
null,
|
|
90
|
+
2,
|
|
91
|
+
),
|
|
92
|
+
);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Append production stack secrets to a Workframe .env (idempotent).
|
|
3
|
+
# Usage: bash scripts/workframe/setup-stack-secrets.sh path/to/.env
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
ENV_FILE="${1:-/workspace/.env}"
|
|
7
|
+
|
|
8
|
+
append_if_missing() {
|
|
9
|
+
local key="$1"
|
|
10
|
+
local value="$2"
|
|
11
|
+
local comment="${3:-}"
|
|
12
|
+
if [[ -f "$ENV_FILE" ]] && grep -q "^${key}=" "$ENV_FILE"; then
|
|
13
|
+
echo "${key} already exists in ${ENV_FILE}"
|
|
14
|
+
return 0
|
|
15
|
+
fi
|
|
16
|
+
mkdir -p "$(dirname "$ENV_FILE")"
|
|
17
|
+
{
|
|
18
|
+
[[ -n "$comment" ]] && printf '\n# %s\n' "$comment"
|
|
19
|
+
printf '%s=%s\n' "$key" "$value"
|
|
20
|
+
} >>"$ENV_FILE"
|
|
21
|
+
echo "${key} generated and appended to ${ENV_FILE}"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
rand_hex() {
|
|
25
|
+
openssl rand -hex 32 2>/dev/null || python3 - <<'PY'
|
|
26
|
+
import secrets
|
|
27
|
+
print(secrets.token_hex(32))
|
|
28
|
+
PY
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
rand_b64() {
|
|
32
|
+
python3 - <<'PY'
|
|
33
|
+
import base64, os
|
|
34
|
+
print(base64.b64encode(os.urandom(32)).decode())
|
|
35
|
+
PY
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
rand_proxy() {
|
|
39
|
+
python3 - <<'PY'
|
|
40
|
+
import secrets
|
|
41
|
+
print(secrets.token_urlsafe(32))
|
|
42
|
+
PY
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
append_if_missing WORKFRAME_SUPERVISOR_TOKEN "${WORKFRAME_SUPERVISOR_TOKEN:-$(rand_hex)}" \
|
|
46
|
+
"Workframe supervisor token. Keep this secret."
|
|
47
|
+
append_if_missing WORKFRAME_PROXY_TOKEN "${WORKFRAME_PROXY_TOKEN:-$(rand_proxy)}" \
|
|
48
|
+
"Internal LLM/action proxy secret — gateway + API must match."
|
|
49
|
+
append_if_missing WORKFRAME_VAULT_KEK "${WORKFRAME_VAULT_KEK:-$(rand_b64)}" \
|
|
50
|
+
"Credential vault KEK (32-byte base64). Required for public_multi_user."
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copy canonical Workframe BFF into create-workframe package tree before npm pack.
|
|
4
|
+
* Run from ProjectX root: node packages/create-workframe/scripts/sync-canonical-to-package.mjs
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const PKG_ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
const PROJECTX_ROOT = path.resolve(PKG_ROOT, '../..');
|
|
13
|
+
const CANONICAL_API = path.join(PROJECTX_ROOT, 'services/workframe-api');
|
|
14
|
+
const PKG_API = path.join(PKG_ROOT, 'workframe-api');
|
|
15
|
+
const CANONICAL_SUPERVISOR = path.join(PROJECTX_ROOT, 'services/workframe-supervisor');
|
|
16
|
+
const PKG_SUPERVISOR = path.join(PKG_ROOT, 'workframe-supervisor');
|
|
17
|
+
|
|
18
|
+
const SKIP_DIRS = new Set([
|
|
19
|
+
'data',
|
|
20
|
+
'__pycache__',
|
|
21
|
+
'.pytest_cache',
|
|
22
|
+
'.venv',
|
|
23
|
+
'node_modules',
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
const SKIP_FILES = new Set([
|
|
27
|
+
'board.db',
|
|
28
|
+
'workframe.db',
|
|
29
|
+
'auth.db',
|
|
30
|
+
'fix_crlf.py',
|
|
31
|
+
'insert_endpoints.py',
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
function shouldSkip(name, isDir) {
|
|
35
|
+
if (SKIP_DIRS.has(name)) return true;
|
|
36
|
+
if (!isDir && SKIP_FILES.has(name)) return true;
|
|
37
|
+
if (!isDir && name.endsWith('.pyc')) return true;
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function copyTree(src, dst) {
|
|
42
|
+
if (!fs.existsSync(src)) throw new Error(`Missing canonical source: ${src}`);
|
|
43
|
+
fs.rmSync(dst, { recursive: true, force: true });
|
|
44
|
+
fs.mkdirSync(dst, { recursive: true });
|
|
45
|
+
|
|
46
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
47
|
+
if (shouldSkip(entry.name, entry.isDirectory())) continue;
|
|
48
|
+
const from = path.join(src, entry.name);
|
|
49
|
+
const to = path.join(dst, entry.name);
|
|
50
|
+
if (entry.isDirectory()) copyTree(from, to);
|
|
51
|
+
else fs.copyFileSync(from, to);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function removeIfExists(p) {
|
|
56
|
+
if (fs.existsSync(p)) fs.rmSync(p, { recursive: true, force: true });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log(`Sync canonical BFF: ${CANONICAL_API} -> ${PKG_API}`);
|
|
60
|
+
copyTree(CANONICAL_API, PKG_API);
|
|
61
|
+
|
|
62
|
+
console.log(`Sync canonical supervisor: ${CANONICAL_SUPERVISOR} -> ${PKG_SUPERVISOR}`);
|
|
63
|
+
copyTree(CANONICAL_SUPERVISOR, PKG_SUPERVISOR);
|
|
64
|
+
|
|
65
|
+
const dataDir = path.join(PKG_API, 'data');
|
|
66
|
+
fs.mkdirSync(dataDir, { recursive: true });
|
|
67
|
+
const gitkeep = path.join(dataDir, '.gitkeep');
|
|
68
|
+
if (!fs.existsSync(gitkeep)) fs.writeFileSync(gitkeep, '');
|
|
69
|
+
|
|
70
|
+
const catalogSrc = path.join(CANONICAL_API, 'data', 'avatar-catalog.json');
|
|
71
|
+
const catalogDst = path.join(PKG_API, 'data', 'avatar-catalog.json');
|
|
72
|
+
if (fs.existsSync(catalogSrc)) {
|
|
73
|
+
fs.mkdirSync(path.dirname(catalogDst), { recursive: true });
|
|
74
|
+
fs.copyFileSync(catalogSrc, catalogDst);
|
|
75
|
+
}
|
|
76
|
+
for (const name of ['user-avatar-catalog.json', 'logo-catalog.json']) {
|
|
77
|
+
const src = path.join(CANONICAL_API, 'data', name);
|
|
78
|
+
const dst = path.join(PKG_API, 'data', name);
|
|
79
|
+
if (fs.existsSync(src)) {
|
|
80
|
+
fs.mkdirSync(path.dirname(dst), { recursive: true });
|
|
81
|
+
fs.copyFileSync(src, dst);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const missionControl = path.join(PKG_ROOT, 'mission-control');
|
|
86
|
+
removeIfExists(missionControl);
|
|
87
|
+
console.log('Removed deprecated mission-control from package tree');
|
|
88
|
+
|
|
89
|
+
const uiSrcMirror = path.join(PKG_ROOT, 'workframe-ui', 'src');
|
|
90
|
+
removeIfExists(uiSrcMirror);
|
|
91
|
+
console.log('Removed stale workframe-ui/src mirror (canonical UI is apps/web)');
|
|
92
|
+
|
|
93
|
+
const applyScripts = [
|
|
94
|
+
'apply-update-hermes.sh',
|
|
95
|
+
'apply-update-workframe.sh',
|
|
96
|
+
'restart-gateway-hermes.sh',
|
|
97
|
+
'compose-docker-host.sh',
|
|
98
|
+
'setup-stack-secrets.sh',
|
|
99
|
+
'bootstrap-workspace-link.sh',
|
|
100
|
+
'verify-public-deploy.sh',
|
|
101
|
+
'fix-zk-encryption-key.sh',
|
|
102
|
+
'set-compose-public-url.mjs',
|
|
103
|
+
'ensure-compose-host-paths.mjs',
|
|
104
|
+
];
|
|
105
|
+
for (const name of applyScripts) {
|
|
106
|
+
const src = path.join(PROJECTX_ROOT, 'scripts/workframe', name);
|
|
107
|
+
const dst = path.join(PKG_ROOT, 'scripts', name);
|
|
108
|
+
if (!fs.existsSync(src)) throw new Error(`Missing apply script: ${src}`);
|
|
109
|
+
fs.mkdirSync(path.dirname(dst), { recursive: true });
|
|
110
|
+
fs.copyFileSync(src, dst);
|
|
111
|
+
console.log(`Synced ${name} -> package/scripts/`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const publicDeploySrc = path.join(PROJECTX_ROOT, 'infra/compose/workframe/PUBLIC_DEPLOY.md');
|
|
115
|
+
const publicDeployDst = path.join(PKG_ROOT, 'docs/PUBLIC_DEPLOY.md');
|
|
116
|
+
if (fs.existsSync(publicDeploySrc)) {
|
|
117
|
+
fs.mkdirSync(path.dirname(publicDeployDst), { recursive: true });
|
|
118
|
+
fs.copyFileSync(publicDeploySrc, publicDeployDst);
|
|
119
|
+
console.log('Synced PUBLIC_DEPLOY.md -> package/docs/');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
for (const name of ['LICENSE', 'NOTICE', 'SECURITY.md']) {
|
|
123
|
+
const src = path.join(PROJECTX_ROOT, name);
|
|
124
|
+
const dst = path.join(PKG_ROOT, name);
|
|
125
|
+
if (!fs.existsSync(src)) throw new Error(`Missing publish file: ${src}`);
|
|
126
|
+
fs.copyFileSync(src, dst);
|
|
127
|
+
console.log(`Synced ${name} -> package/`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const uiStale = [
|
|
131
|
+
'components.json',
|
|
132
|
+
'eslint.config.js',
|
|
133
|
+
'index.html',
|
|
134
|
+
'package.json',
|
|
135
|
+
'README.md',
|
|
136
|
+
'tsconfig.app.json',
|
|
137
|
+
'tsconfig.json',
|
|
138
|
+
'tsconfig.node.json',
|
|
139
|
+
'vite.config.ts',
|
|
140
|
+
'scripts',
|
|
141
|
+
];
|
|
142
|
+
for (const name of uiStale) {
|
|
143
|
+
removeIfExists(path.join(PKG_ROOT, 'workframe-ui', name));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
console.log('Canonical sync complete. Run bundle-workframe-ui.mjs next.');
|