create-workframe 0.1.5 → 0.1.6

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.
Files changed (181) hide show
  1. package/.dockerignore +22 -22
  2. package/.gitignore +73 -73
  3. package/LICENSE +201 -201
  4. package/NOTICE +12 -12
  5. package/README.md +40 -40
  6. package/SECURITY.md +38 -38
  7. package/bin/create-workframe.js +2816 -2814
  8. package/bin/workframe.js +329 -329
  9. package/docs/workspace-instructions/WORKFRAME_DISCORD.md +20 -20
  10. package/docs/workspace-instructions/WORKFRAME_DOCUMENTS_AND_ARTIFACTS.md +20 -20
  11. package/docs/workspace-instructions/WORKFRAME_KANBAN.md +20 -20
  12. package/docs/workspace-instructions/WORKFRAME_ONBOARDING.md +21 -21
  13. package/docs/workspace-instructions/WORKFRAME_ROUTING.md +29 -29
  14. package/docs/workspace-instructions/WORKFRAME_TELEGRAM.md +19 -19
  15. package/package.json +64 -64
  16. package/profiles/README.md +15 -15
  17. package/profiles/architect/AGENTS.md +29 -29
  18. package/profiles/architect/SOUL.md +44 -44
  19. package/profiles/architect/skills/devops/kanban-worker/SKILL.md +27 -27
  20. package/profiles/designer/AGENTS.md +26 -26
  21. package/profiles/designer/SOUL.md +31 -31
  22. package/profiles/designer/skills/devops/kanban-worker/SKILL.md +27 -27
  23. package/profiles/dev/AGENTS.md +28 -28
  24. package/profiles/dev/SOUL.md +31 -31
  25. package/profiles/dev/skills/devops/kanban-worker/SKILL.md +27 -27
  26. package/profiles/docs/AGENTS.md +27 -27
  27. package/profiles/docs/SOUL.md +30 -30
  28. package/profiles/docs/skills/devops/kanban-worker/SKILL.md +27 -27
  29. package/profiles/research/AGENTS.md +26 -26
  30. package/profiles/research/SOUL.md +31 -31
  31. package/profiles/research/skills/devops/kanban-worker/SKILL.md +27 -27
  32. package/profiles/visionary/AGENTS.md +25 -25
  33. package/profiles/visionary/SOUL.md +31 -31
  34. package/profiles/visionary/skills/devops/kanban-worker/SKILL.md +27 -27
  35. package/profiles/workframe-agent/AGENTS.md +37 -37
  36. package/profiles/workframe-agent/SETUP.md +185 -185
  37. package/profiles/workframe-agent/SOUL.md +61 -61
  38. package/profiles/workframe-agent/skills/devops/botfather/SKILL.md +85 -85
  39. package/profiles/workframe-agent/skills/devops/kanban-handoff-pattern/SKILL.md +58 -58
  40. package/profiles/workframe-agent/skills/devops/workframe-cohort/SKILL.md +54 -54
  41. package/prompts/WORKFRAME_PROMPT_TEMPLATES.md +16 -16
  42. package/rules/.hermes.md +11 -11
  43. package/rules/AGENTS.md +22 -22
  44. package/rules/workspace-README.md +5 -5
  45. package/scripts/apply-update-workframe.sh +91 -21
  46. package/scripts/bundle-workframe-ui.mjs +83 -83
  47. package/scripts/create_workframe_scaffold.py +648 -648
  48. package/scripts/ensure-compose-host-paths.mjs +51 -51
  49. package/scripts/lib/install-identity.mjs +212 -212
  50. package/scripts/lib/workframe-registry.mjs +290 -290
  51. package/scripts/new-project.mjs +68 -68
  52. package/scripts/select_agent_pack.py +31 -31
  53. package/scripts/set-compose-public-url.mjs +92 -92
  54. package/scripts/sync-canonical-to-package.mjs +164 -164
  55. package/shared/WORKFRAME_AGENT_LIBRARY.md +31 -31
  56. package/shared/WORKFRAME_AGENT_OPERATIONS.md +29 -29
  57. package/shared/WORKFRAME_AGENT_PACKS.json +64 -64
  58. package/shared/WORKFRAME_AGENT_PACKS.yaml +20 -20
  59. package/shared/WORKFRAME_CHAT_PERMISSION_MODEL.md +20 -20
  60. package/shared/WORKFRAME_HANDOFF_SCHEMA.md +25 -25
  61. package/shared/WORKFRAME_SKILL_CURATION.md +27 -27
  62. package/workframe-api/Dockerfile +14 -14
  63. package/workframe-api/README.md +24 -24
  64. package/workframe-api/action_proxy.py +131 -131
  65. package/workframe-api/auth_rate_limit.py +49 -49
  66. package/workframe-api/credential_vault.py +445 -445
  67. package/workframe-api/data/avatar-catalog.json +41 -41
  68. package/workframe-api/data/logo-catalog.json +14 -14
  69. package/workframe-api/data/user-avatar-catalog.json +18 -18
  70. package/workframe-api/email_sender.py +220 -220
  71. package/workframe-api/google_auth.py +90 -90
  72. package/workframe-api/install_api.py +359 -359
  73. package/workframe-api/internal_proxy_auth.py +150 -150
  74. package/workframe-api/llm_proxy.py +280 -280
  75. package/workframe-api/oidc_jwt.py +108 -108
  76. package/workframe-api/package.json +12 -12
  77. package/workframe-api/platform_auth.py +194 -194
  78. package/workframe-api/profile_secret_policy.py +86 -86
  79. package/workframe-api/public/assets/index-DPXu_lGn.css +1 -1
  80. package/workframe-api/public/assets/index-DYnLrCZZ.js +8 -8
  81. package/workframe-api/public/assets/index-DglUqFB_.js +8 -8
  82. package/workframe-api/public/index.html +12 -12
  83. package/workframe-api/requirements.txt +2 -2
  84. package/workframe-api/server.py +19866 -19866
  85. package/workframe-api/site_meta.py +271 -271
  86. package/workframe-api/stack_config.py +427 -427
  87. package/workframe-api/time-bind-chat.py +99 -99
  88. package/workframe-api/turn_credentials.py +226 -226
  89. package/workframe-api/updates.py +506 -506
  90. package/workframe-api/vault_kek.py +159 -159
  91. package/workframe-api/zk_auth.py +633 -633
  92. package/workframe-supervisor/Dockerfile +11 -11
  93. package/workframe-supervisor/profile_secret_policy.py +76 -76
  94. package/workframe-supervisor/server.py +860 -860
  95. package/workframe-ui/docker/nginx.conf +85 -85
  96. package/workframe-ui/public/assets/{arc-CnriPN3G.js → arc-DoYr2T5c.js} +1 -1
  97. package/workframe-ui/public/assets/architecture-7EHR7CIX-CmDi28hh.js +1 -0
  98. package/workframe-ui/public/assets/{architectureDiagram-3BPJPVTR-DYYB1Ic2.js → architectureDiagram-3BPJPVTR-Clher08G.js} +1 -1
  99. package/workframe-ui/public/assets/{blockDiagram-GPEHLZMM-Bn-fFOyj.js → blockDiagram-GPEHLZMM-Bdw9txrZ.js} +1 -1
  100. package/workframe-ui/public/assets/{c4Diagram-AAUBKEIU-BPPDtAnD.js → c4Diagram-AAUBKEIU-DlI_h_uo.js} +1 -1
  101. package/workframe-ui/public/assets/channel-DZYVoEdD.js +1 -0
  102. package/workframe-ui/public/assets/{chunk-2J33WTMH-Bz2CJiC3.js → chunk-2J33WTMH-ol-uwoeq.js} +1 -1
  103. package/workframe-ui/public/assets/{chunk-3OPIFGDE-B8aMeE1B.js → chunk-3OPIFGDE-7eDhBen0.js} +1 -1
  104. package/workframe-ui/public/assets/{chunk-4BX2VUAB-bLFHQTuT.js → chunk-4BX2VUAB-xPORD7Js.js} +1 -1
  105. package/workframe-ui/public/assets/{chunk-55IACEB6-BRxhx-lG.js → chunk-55IACEB6-Cwd7dr1z.js} +1 -1
  106. package/workframe-ui/public/assets/{chunk-5ZQYHXKU-BLyOgEJ8.js → chunk-5ZQYHXKU-Ckt4Sjy1.js} +1 -1
  107. package/workframe-ui/public/assets/{chunk-727SXJPM-DiuvBl7G.js → chunk-727SXJPM-sMk1op_G.js} +1 -1
  108. package/workframe-ui/public/assets/{chunk-AQP2D5EJ-BE1_aBdC.js → chunk-AQP2D5EJ-CMgSvr6H.js} +1 -1
  109. package/workframe-ui/public/assets/{chunk-BSJP7CBP-BicGsmBs.js → chunk-BSJP7CBP-Dx7GN0T4.js} +1 -1
  110. package/workframe-ui/public/assets/{chunk-CSCIHK7Q-C3VTns3d.js → chunk-CSCIHK7Q--OCu86u0.js} +1 -1
  111. package/workframe-ui/public/assets/{chunk-FMBD7UC4-DSiXY3bY.js → chunk-FMBD7UC4-CejmwJpz.js} +1 -1
  112. package/workframe-ui/public/assets/{chunk-KSCS5N6A-Cvw5s3fR.js → chunk-KSCS5N6A-CvOj2Yvp.js} +1 -1
  113. package/workframe-ui/public/assets/{chunk-L5ZTLDWV-jJifGdIQ.js → chunk-L5ZTLDWV-B0nGBjLU.js} +1 -1
  114. package/workframe-ui/public/assets/{chunk-LZXEDZCA-Maee1aqo.js → chunk-LZXEDZCA-Bdzvu227.js} +2 -2
  115. package/workframe-ui/public/assets/{chunk-ND2GUHAM-C77N3VAM.js → chunk-ND2GUHAM-CGR07jTY.js} +1 -1
  116. package/workframe-ui/public/assets/{chunk-NZK2D7GU-BY68lrPB.js → chunk-NZK2D7GU-CBojDPNC.js} +1 -1
  117. package/workframe-ui/public/assets/{chunk-O5CBEL6O-D_c4kWzh.js → chunk-O5CBEL6O-DBin5MPF.js} +1 -1
  118. package/workframe-ui/public/assets/chunk-QZHKN3VN-DwiajAaK.js +1 -0
  119. package/workframe-ui/public/assets/chunk-WU5MYG2G-Bz8vA5s7.js +1 -0
  120. package/workframe-ui/public/assets/{chunk-XPW4576I-DlQgvqBp.js → chunk-XPW4576I-TD7I7pcb.js} +1 -1
  121. package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-DQiq8od0.js +1 -0
  122. package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-DQiq8od0.js +1 -0
  123. package/workframe-ui/public/assets/{cose-bilkent-S5V4N54A-CHCOHDSd.js → cose-bilkent-S5V4N54A-Bmm5x5xm.js} +1 -1
  124. package/workframe-ui/public/assets/{dagre-BM42HDAG-CKPcSYwU.js → dagre-BM42HDAG-zU2r0aq2.js} +1 -1
  125. package/workframe-ui/public/assets/{diagram-2AECGRRQ-C6qe0jP-.js → diagram-2AECGRRQ-AL01qukm.js} +1 -1
  126. package/workframe-ui/public/assets/{diagram-5GNKFQAL-DhQhrieU.js → diagram-5GNKFQAL-DKi1xSMg.js} +1 -1
  127. package/workframe-ui/public/assets/{diagram-KO2AKTUF-Bqf6Iw1r.js → diagram-KO2AKTUF-DQJDQ-f-.js} +1 -1
  128. package/workframe-ui/public/assets/{diagram-LMA3HP47-Bt1ms2D2.js → diagram-LMA3HP47-B1oisGUj.js} +1 -1
  129. package/workframe-ui/public/assets/{diagram-OG6HWLK6-C0Rrxe1i.js → diagram-OG6HWLK6-DjpJKffk.js} +1 -1
  130. package/workframe-ui/public/assets/{dist-BLcLhTn6.js → dist-Jk20AnQG.js} +1 -1
  131. package/workframe-ui/public/assets/{erDiagram-TEJ5UH35-Cy1GbZVu.js → erDiagram-TEJ5UH35-Vu8RtLUf.js} +1 -1
  132. package/workframe-ui/public/assets/eventmodeling-FCH6USID-BXUnTe0c.js +1 -0
  133. package/workframe-ui/public/assets/{flowDiagram-I6XJVG4X-DL3ALqDG.js → flowDiagram-I6XJVG4X-CHAXEhbR.js} +1 -1
  134. package/workframe-ui/public/assets/{ganttDiagram-6RSMTGT7-CMpwBhXQ.js → ganttDiagram-6RSMTGT7-DhiEkfH8.js} +1 -1
  135. package/workframe-ui/public/assets/{gitGraph-WXDBUCRP-C0mwHUXL.js → gitGraph-WXDBUCRP-Cuq44XvU.js} +1 -1
  136. package/workframe-ui/public/assets/{gitGraphDiagram-PVQCEYII-6gzhWaF0.js → gitGraphDiagram-PVQCEYII-B7kgReRt.js} +1 -1
  137. package/workframe-ui/public/assets/index-72-j0sA5.js +129 -0
  138. package/workframe-ui/public/assets/index-auJ0bLMU.css +1 -0
  139. package/workframe-ui/public/assets/{info-J43DQDTF-Bb_wZTxU.js → info-J43DQDTF-oV4b3M4f.js} +1 -1
  140. package/workframe-ui/public/assets/{infoDiagram-5YYISTIA-601evYFV.js → infoDiagram-5YYISTIA-CthN4b6o.js} +1 -1
  141. package/workframe-ui/public/assets/{ishikawaDiagram-YF4QCWOH-BYtF-wHm.js → ishikawaDiagram-YF4QCWOH-oEGS3TKg.js} +1 -1
  142. package/workframe-ui/public/assets/{journeyDiagram-JHISSGLW-BMizyHzC.js → journeyDiagram-JHISSGLW-CXJsWmKF.js} +1 -1
  143. package/workframe-ui/public/assets/{kanban-definition-UN3LZRKU-CLLJsdnh.js → kanban-definition-UN3LZRKU-DTPo8yHW.js} +1 -1
  144. package/workframe-ui/public/assets/{line-BFiSvu-q.js → line-Bm9Pmcnz.js} +1 -1
  145. package/workframe-ui/public/assets/{linear-D6HYZ18_.js → linear-Cn-uD6eX.js} +1 -1
  146. package/workframe-ui/public/assets/{mermaid-parser.core-Cid5yDBQ.js → mermaid-parser.core-BBVSTQZ4.js} +2 -2
  147. package/workframe-ui/public/assets/{mermaid.core-DqIiju5Z.js → mermaid.core-DE668nUy.js} +3 -3
  148. package/workframe-ui/public/assets/{mindmap-definition-RKZ34NQL-Bg7xJdsz.js → mindmap-definition-RKZ34NQL-4qVsiwCf.js} +1 -1
  149. package/workframe-ui/public/assets/{packet-YPE3B663-1ebGt86D.js → packet-YPE3B663-CqJeoiFG.js} +1 -1
  150. package/workframe-ui/public/assets/{pie-LRSECV5Y-DJ9wOBC_.js → pie-LRSECV5Y-DcOqVssg.js} +1 -1
  151. package/workframe-ui/public/assets/{pieDiagram-4H26LBE5-BmK96Aus.js → pieDiagram-4H26LBE5-CosMnpAM.js} +1 -1
  152. package/workframe-ui/public/assets/{quadrantDiagram-W4KKPZXB-ByUqtWPZ.js → quadrantDiagram-W4KKPZXB-DtsnIK98.js} +1 -1
  153. package/workframe-ui/public/assets/{radar-GUYGQ44K-DN-Hkt96.js → radar-GUYGQ44K-BqLpJuWc.js} +1 -1
  154. package/workframe-ui/public/assets/{requirementDiagram-4Y6WPE33-ByU2r8gb.js → requirementDiagram-4Y6WPE33-Pb7cuX8_.js} +1 -1
  155. package/workframe-ui/public/assets/{sankeyDiagram-5OEKKPKP-elyWa0GK.js → sankeyDiagram-5OEKKPKP-BJBlMM1m.js} +1 -1
  156. package/workframe-ui/public/assets/{sequenceDiagram-3UESZ5HK-CzZwsAiK.js → sequenceDiagram-3UESZ5HK-i4HnjP39.js} +1 -1
  157. package/workframe-ui/public/assets/{src-5vgsM_dl.js → src-DIhmc_XG.js} +1 -1
  158. package/workframe-ui/public/assets/{stateDiagram-AJRCARHV-B0O5w5lJ.js → stateDiagram-AJRCARHV-Ba2iClPT.js} +1 -1
  159. package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-aUpqRAhy.js +1 -0
  160. package/workframe-ui/public/assets/{timeline-definition-PNZ67QCA-oyqa5w5y.js → timeline-definition-PNZ67QCA-CL4X9vSF.js} +1 -1
  161. package/workframe-ui/public/assets/{treeView-BLDUP644-MCV12-eP.js → treeView-BLDUP644-BJrjnbMj.js} +1 -1
  162. package/workframe-ui/public/assets/{treemap-LRROVOQU-DiA1P9n5.js → treemap-LRROVOQU-CN6H54RF.js} +1 -1
  163. package/workframe-ui/public/assets/{vennDiagram-CIIHVFJN-CO_4x7OR.js → vennDiagram-CIIHVFJN-Cee6sbUy.js} +1 -1
  164. package/workframe-ui/public/assets/{wardley-L42UT6IY-CmQNv6Xv.js → wardley-L42UT6IY-D0cXq60c.js} +1 -1
  165. package/workframe-ui/public/assets/{wardleyDiagram-YWT4CUSO-CJxDkbIj.js → wardleyDiagram-YWT4CUSO-CaH9XkCx.js} +1 -1
  166. package/workframe-ui/public/assets/{xychartDiagram-2RQKCTM6-B02MxgzG.js → xychartDiagram-2RQKCTM6-BEisgFoI.js} +1 -1
  167. package/workframe-ui/public/favicon.svg +7 -7
  168. package/workframe-ui/public/icons.svg +24 -24
  169. package/workframe-ui/public/index.html +47 -47
  170. package/workframe-ui/public/manifest.webmanifest +18 -18
  171. package/workframe-ui/public/workframe-config.json +3 -3
  172. package/workframe-ui/public/assets/architecture-7EHR7CIX-CFhr7xAe.js +0 -1
  173. package/workframe-ui/public/assets/channel-Dok_-T0o.js +0 -1
  174. package/workframe-ui/public/assets/chunk-QZHKN3VN-C3wwLrTa.js +0 -1
  175. package/workframe-ui/public/assets/chunk-WU5MYG2G-GFFSg2kf.js +0 -1
  176. package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-DKbGfT5Z.js +0 -1
  177. package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-DKbGfT5Z.js +0 -1
  178. package/workframe-ui/public/assets/eventmodeling-FCH6USID-C_PrceHe.js +0 -1
  179. package/workframe-ui/public/assets/index-DyO6K0TD.css +0 -1
  180. package/workframe-ui/public/assets/index-yvpSUs8T.js +0 -133
  181. package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-RXZRaSgT.js +0 -1
@@ -1,68 +1,68 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Canonical dev/test bootstrap: bundle UI (meta layout only) → scaffold → auto-launch Phase B.
4
- *
5
- * Meta repo:
6
- * node packages/create-workframe/scripts/new-project.mjs BrandAuthority --out D:/Workframe --force
7
- *
8
- * Published npm (UI already bundled in package):
9
- * npx create-workframe BrandAuthority --out D:/Workframe --force
10
- */
11
- import fs from 'fs';
12
- import path from 'path';
13
- import { fileURLToPath } from 'url';
14
- import { spawnSync } from 'child_process';
15
-
16
- const PKG_ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
17
- const CLI = path.join(PKG_ROOT, 'bin', 'create-workframe.js');
18
- const BUNDLE = path.join(PKG_ROOT, 'scripts', 'bundle-workframe-ui.mjs');
19
- const UI_SOURCE = path.join(PKG_ROOT, '..', 'workframe-ui', 'package.json');
20
-
21
- function usage() {
22
- console.log(`new-project — scaffold + Phase B installer (Workframe UI bundled when developing from meta)
23
-
24
- Usage:
25
- node scripts/new-project.mjs <ProjectName> [--out DIR] [--force] [--no-launch] [--no-bundle]
26
-
27
- Examples:
28
- node scripts/new-project.mjs BrandAuthority --out D:/Workframe --force
29
- node scripts/new-project.mjs Demo --out /tmp/projects
30
-
31
- Notes:
32
- - Auto-bundles Workframe UI when run from the meta repo (workframe-ui source present).
33
- - Skips bundle when installed from npm (pre-bundled UI in the package).
34
- - Phase B installer opens in a new terminal; complete Hermes setup there.
35
- - Equivalent published command: npx create-workframe <ProjectName> --out <DIR> --force
36
- `);
37
- }
38
-
39
- const argv = process.argv.slice(2);
40
- if (!argv.length || argv.includes('-h') || argv.includes('--help')) {
41
- usage();
42
- process.exit(argv.length ? 0 : 1);
43
- }
44
-
45
- const noBundle = argv.includes('--no-bundle');
46
- const noLaunch = argv.includes('--no-launch');
47
- const forwarded = argv.filter((a) => a !== '--no-bundle');
48
-
49
- const isMetaDevLayout = fs.existsSync(UI_SOURCE);
50
- if (isMetaDevLayout && !noBundle) {
51
- console.log('Bundling Workframe UI into create-workframe…');
52
- const bundle = spawnSync(process.execPath, [BUNDLE], {
53
- stdio: 'inherit',
54
- cwd: path.dirname(BUNDLE),
55
- });
56
- if (bundle.status !== 0) process.exit(bundle.status ?? 1);
57
- } else if (!isMetaDevLayout && !noBundle) {
58
- console.log('Using pre-bundled Workframe UI from create-workframe package.');
59
- }
60
-
61
- const scaffold = spawnSync(process.execPath, [CLI, ...forwarded], { stdio: 'inherit' });
62
- if (scaffold.status !== 0) process.exit(scaffold.status ?? 1);
63
-
64
- if (!noLaunch) {
65
- console.log('');
66
- console.log('Next: complete Hermes setup in the Phase B installer window.');
67
- console.log('Re-open installer manually: .\\scripts\\start-install.ps1 or ./scripts/start-install.sh');
68
- }
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Canonical dev/test bootstrap: bundle UI (meta layout only) → scaffold → auto-launch Phase B.
4
+ *
5
+ * Meta repo:
6
+ * node packages/create-workframe/scripts/new-project.mjs BrandAuthority --out D:/Workframe --force
7
+ *
8
+ * Published npm (UI already bundled in package):
9
+ * npx create-workframe BrandAuthority --out D:/Workframe --force
10
+ */
11
+ import fs from 'fs';
12
+ import path from 'path';
13
+ import { fileURLToPath } from 'url';
14
+ import { spawnSync } from 'child_process';
15
+
16
+ const PKG_ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
17
+ const CLI = path.join(PKG_ROOT, 'bin', 'create-workframe.js');
18
+ const BUNDLE = path.join(PKG_ROOT, 'scripts', 'bundle-workframe-ui.mjs');
19
+ const UI_SOURCE = path.join(PKG_ROOT, '..', 'workframe-ui', 'package.json');
20
+
21
+ function usage() {
22
+ console.log(`new-project — scaffold + Phase B installer (Workframe UI bundled when developing from meta)
23
+
24
+ Usage:
25
+ node scripts/new-project.mjs <ProjectName> [--out DIR] [--force] [--no-launch] [--no-bundle]
26
+
27
+ Examples:
28
+ node scripts/new-project.mjs BrandAuthority --out D:/Workframe --force
29
+ node scripts/new-project.mjs Demo --out /tmp/projects
30
+
31
+ Notes:
32
+ - Auto-bundles Workframe UI when run from the meta repo (workframe-ui source present).
33
+ - Skips bundle when installed from npm (pre-bundled UI in the package).
34
+ - Phase B installer opens in a new terminal; complete Hermes setup there.
35
+ - Equivalent published command: npx create-workframe <ProjectName> --out <DIR> --force
36
+ `);
37
+ }
38
+
39
+ const argv = process.argv.slice(2);
40
+ if (!argv.length || argv.includes('-h') || argv.includes('--help')) {
41
+ usage();
42
+ process.exit(argv.length ? 0 : 1);
43
+ }
44
+
45
+ const noBundle = argv.includes('--no-bundle');
46
+ const noLaunch = argv.includes('--no-launch');
47
+ const forwarded = argv.filter((a) => a !== '--no-bundle');
48
+
49
+ const isMetaDevLayout = fs.existsSync(UI_SOURCE);
50
+ if (isMetaDevLayout && !noBundle) {
51
+ console.log('Bundling Workframe UI into create-workframe…');
52
+ const bundle = spawnSync(process.execPath, [BUNDLE], {
53
+ stdio: 'inherit',
54
+ cwd: path.dirname(BUNDLE),
55
+ });
56
+ if (bundle.status !== 0) process.exit(bundle.status ?? 1);
57
+ } else if (!isMetaDevLayout && !noBundle) {
58
+ console.log('Using pre-bundled Workframe UI from create-workframe package.');
59
+ }
60
+
61
+ const scaffold = spawnSync(process.execPath, [CLI, ...forwarded], { stdio: 'inherit' });
62
+ if (scaffold.status !== 0) process.exit(scaffold.status ?? 1);
63
+
64
+ if (!noLaunch) {
65
+ console.log('');
66
+ console.log('Next: complete Hermes setup in the Phase B installer window.');
67
+ console.log('Re-open installer manually: .\\scripts\\start-install.ps1 or ./scripts/start-install.sh');
68
+ }
@@ -1,31 +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()
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()
@@ -1,92 +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
- );
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
+ );