arkgate 4.8.6 → 4.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +55 -4
  2. package/README.md +37 -4
  3. package/bin/ark-dashboard.mjs +423 -0
  4. package/bin/ark-mcp-runtime.mjs +8 -2
  5. package/bin/ark.mjs +51 -3
  6. package/bin/lib/analysis-engine.mjs +5 -5
  7. package/bin/lib/doctor-human.mjs +9 -0
  8. package/bin/lib/doctor-plan.mjs +5 -1
  9. package/bin/lib/html-report.mjs +4 -2
  10. package/bin/lib/layer-description.mjs +27 -0
  11. package/bin/lib/prepare-write.mjs +7 -1
  12. package/dist/{configTypes-dy5PfTqS.d.ts → configTypes-0eHpocR3.d.ts} +4 -0
  13. package/dist/{diagnosticCatalog-D_DI7qrZ.d.ts → diagnosticCatalog-DxKCTBbp.d.ts} +3 -3
  14. package/dist/eslint/index.d.ts +1 -1
  15. package/dist/index.cjs +19 -19
  16. package/dist/index.d.ts +5 -4
  17. package/dist/index.js +20 -20
  18. package/dist/nestjs/index.cjs +5 -5
  19. package/dist/nestjs/index.d.ts +3 -3
  20. package/dist/nestjs/index.js +5 -5
  21. package/dist/runtime/index.cjs +15 -15
  22. package/dist/runtime/index.d.ts +6 -6
  23. package/dist/runtime/index.js +15 -15
  24. package/dist/{types-BuM8WNqe.d.ts → types-BK47clMl.d.ts} +1 -1
  25. package/dist/{types-DrqsOiTY.d.ts → types-DxvmJO-D.d.ts} +106 -2
  26. package/docs/README.md +12 -4
  27. package/docs/agent-guide.md +36 -1
  28. package/docs/ai-gates.md +13 -1
  29. package/docs/arkorder.md +11 -1
  30. package/docs/configuration.md +25 -3
  31. package/docs/develop.md +13 -6
  32. package/docs/enthusiast/README.md +13 -2
  33. package/docs/package-surface.md +21 -5
  34. package/docs/product-voice.md +25 -2
  35. package/docs/use.md +11 -3
  36. package/package.json +3 -1
  37. package/server.json +2 -2
  38. package/templates/agent-skills/ark-adopt/SKILL.md +19 -1
  39. package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
  40. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  41. package/templates/agent-skills/ark-place/SKILL.md +18 -4
  42. package/templates/skills/ark-adopt.md +19 -1
  43. package/templates/skills/ark-autopilot.md +1 -1
  44. package/templates/skills/ark-contract.md +1 -1
  45. package/templates/skills/ark-place.md +18 -4
package/bin/ark.mjs CHANGED
@@ -39,6 +39,36 @@ import { setupUsage, setupUsageAll, upgradeUsage } from './lib/first-run-help.mj
39
39
 
40
40
  const here = path.dirname(fileURLToPath(import.meta.url));
41
41
  const arkCheck = path.join(here, 'ark-check.mjs');
42
+ const arkDashboard = path.join(here, 'ark-dashboard.mjs');
43
+ const dashboardHelp = `arkgate dashboard (alias ark dashboard) — observability TUI.
44
+ Usage: arkgate dashboard [--url <snapshot-url>] [--interval <ms>]
45
+ Polls an ArkRun inspector; it does not start the kernel.`;
46
+
47
+ function withDashboardHelp(text, detailed) {
48
+ if (detailed) {
49
+ return text
50
+ .replace(
51
+ ' arkgate agents-md [--root',
52
+ ' arkgate dashboard [--url <snapshot-url>] [--interval <ms>]\n arkgate agents-md [--root'
53
+ )
54
+ .replace(
55
+ ' agents-md Version-matched',
56
+ ' dashboard ANSI observability TUI against a running ArkRun inspector (spawns ark-dashboard).\n agents-md Version-matched'
57
+ );
58
+ }
59
+ return text.replace(
60
+ ' arkgate-check --doctor status — one next step\n',
61
+ ' arkgate-check --doctor status — one next step\n arkgate dashboard observability TUI (inspector)\n'
62
+ );
63
+ }
64
+
65
+ function runDashboard(passthroughArgs) {
66
+ const result = spawnSync(process.execPath, [arkDashboard, ...passthroughArgs], {
67
+ stdio: 'inherit',
68
+ encoding: 'utf8',
69
+ });
70
+ return result.status ?? 1;
71
+ }
42
72
 
43
73
  /**
44
74
  * Day-zero architecture picture: freeze origin under `.ark/reports/` as soon as
@@ -93,6 +123,7 @@ function parseArgs(argv) {
93
123
  help: false,
94
124
  all: false,
95
125
  version: false,
126
+ passthrough: [],
96
127
  };
97
128
 
98
129
  const requireValue = (flag, index) => {
@@ -147,7 +178,14 @@ function parseArgs(argv) {
147
178
  else if (arg === '--help' || arg === '-h' || arg === 'help') args.help = true;
148
179
  else if (arg === '--all') args.all = true;
149
180
  else if (arg === '--version' || arg === '-V') args.version = true;
150
- else if (!arg.startsWith('-') && args.command === undefined) args.command = arg;
181
+ else if (!arg.startsWith('-') && args.command === undefined) {
182
+ args.command = arg;
183
+ // Dashboard owns its flags (--url/--interval); pass the rest through untouched.
184
+ if (arg === 'dashboard') {
185
+ args.passthrough = argv.slice(i + 1);
186
+ break;
187
+ }
188
+ }
151
189
  else throw new Error(`Unknown argument: ${arg}. Run arkgate --help for usage.`);
152
190
  }
153
191
 
@@ -782,11 +820,21 @@ async function main() {
782
820
  console.log(upgradeUsage());
783
821
  return 0;
784
822
  }
823
+ if (args.command === 'dashboard' && args.passthrough.some((arg) => ['--help', '-h', 'help'].includes(arg))) {
824
+ console.log(dashboardHelp);
825
+ return 0;
826
+ }
785
827
  if (args.help || !args.command) {
786
- console.log(args.all ? setupUsageAll() : setupUsage());
828
+ console.log(
829
+ withDashboardHelp(args.all ? setupUsageAll() : setupUsage(), Boolean(args.all))
830
+ );
787
831
  return 0;
788
832
  }
789
833
 
834
+ if (args.command === 'dashboard') {
835
+ return runDashboard(args.passthrough);
836
+ }
837
+
790
838
  if (args.requireWriteHook && !['start', 'init'].includes(args.command)) {
791
839
  console.error('--require-write-hook is supported by ark start and ark init.');
792
840
  return 2;
@@ -913,7 +961,7 @@ async function main() {
913
961
  }
914
962
 
915
963
  console.error(`Unknown command: ${args.command}`);
916
- console.error(setupUsage());
964
+ console.error(withDashboardHelp(setupUsage(), false));
917
965
  return 2;
918
966
  }
919
967