@oldboydev/sheldon-darwin-arm64 0.2.0 → 0.2.1

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 (73) hide show
  1. package/SHA256SUMS +69 -18
  2. package/inventory.json +291 -36
  3. package/node_modules/@sheldon/cli/dist/commands/agents.js +85 -69
  4. package/node_modules/@sheldon/cli/dist/commands/mcp.js +1 -1
  5. package/node_modules/@sheldon/cli/dist/help/fonts/NunitoSans-VariableFont_YTLC_opsz_wdth_wght.ttf +0 -0
  6. package/node_modules/@sheldon/cli/dist/help/index.html +97 -0
  7. package/node_modules/@sheldon/cli/dist/help/manifest.json +121 -0
  8. package/node_modules/@sheldon/cli/dist/help/pages/agent.html +101 -0
  9. package/node_modules/@sheldon/cli/dist/help/pages/answer.html +110 -0
  10. package/node_modules/@sheldon/cli/dist/help/pages/bundle.html +124 -0
  11. package/node_modules/@sheldon/cli/dist/help/pages/compile.html +120 -0
  12. package/node_modules/@sheldon/cli/dist/help/pages/doctor.html +102 -0
  13. package/node_modules/@sheldon/cli/dist/help/pages/flow-compile-review.html +125 -0
  14. package/node_modules/@sheldon/cli/dist/help/pages/flow-end-to-end.html +147 -0
  15. package/node_modules/@sheldon/cli/dist/help/pages/flow-first-vault.html +100 -0
  16. package/node_modules/@sheldon/cli/dist/help/pages/image.html +107 -0
  17. package/node_modules/@sheldon/cli/dist/help/pages/ingest.html +156 -0
  18. package/node_modules/@sheldon/cli/dist/help/pages/init.html +98 -0
  19. package/node_modules/@sheldon/cli/dist/help/pages/mcp.html +135 -0
  20. package/node_modules/@sheldon/cli/dist/help/pages/migrate-state.html +100 -0
  21. package/node_modules/@sheldon/cli/dist/help/pages/plugin.html +120 -0
  22. package/node_modules/@sheldon/cli/dist/help/pages/project.html +110 -0
  23. package/node_modules/@sheldon/cli/dist/help/pages/query.html +110 -0
  24. package/node_modules/@sheldon/cli/dist/help/pages/review.html +114 -0
  25. package/node_modules/@sheldon/cli/dist/help/pages/search.html +103 -0
  26. package/node_modules/@sheldon/cli/dist/help/pages/topic.html +112 -0
  27. package/node_modules/@sheldon/cli/dist/help/pages/web.html +102 -0
  28. package/node_modules/@sheldon/cli/dist/help/styles.css +368 -0
  29. package/node_modules/@sheldon/cli/dist/help.js +84 -0
  30. package/node_modules/@sheldon/cli/dist/main.js +38 -0
  31. package/node_modules/@sheldon/cli/node_modules/@sheldon/agent-runtime/dist/command-executor.js +1 -1
  32. package/node_modules/@sheldon/cli/node_modules/@sheldon/agent-runtime/dist/index.js +1 -1
  33. package/node_modules/@sheldon/cli/node_modules/@sheldon/agent-runtime/dist/profiles.js +1 -5
  34. package/node_modules/@sheldon/cli/node_modules/@sheldon/plugin-host/dist/official-catalog.js +4 -3
  35. package/node_modules/@sheldon/cli/node_modules/@sheldon/plugin-source-image/node_modules/@sheldon/plugin-host/dist/official-catalog.js +4 -3
  36. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/client/assets/index-B8MAXTxb.js +13 -0
  37. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/client/assets/{index-BB6UWWie.css → index-DZRX97IO.css} +1 -1
  38. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/client/index.html +2 -2
  39. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/contract.js +18 -0
  40. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/server.js +26 -0
  41. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/wiki-markdown.js +75 -0
  42. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/wiki.js +175 -0
  43. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  44. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
  45. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
  46. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
  47. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
  48. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
  49. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
  50. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
  51. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
  52. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
  53. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
  54. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
  55. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  56. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
  57. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
  58. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
  59. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
  60. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
  61. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
  62. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
  63. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
  64. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
  65. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
  66. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
  67. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@fastify/static/node_modules/glob/node_modules/path-scurry/node_modules/lru-cache/package.json +17 -1
  68. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@sheldon/agent-runtime/dist/command-executor.js +1 -1
  69. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@sheldon/agent-runtime/dist/index.js +1 -1
  70. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/node_modules/@sheldon/agent-runtime/dist/profiles.js +1 -5
  71. package/package.json +1 -1
  72. package/sbom.spdx.json +1 -1
  73. package/node_modules/@sheldon/cli/node_modules/@sheldon/web/dist/client/assets/index-FrWwJl0U.js +0 -9
@@ -21,6 +21,7 @@ import { configureMcpConsumer, doctorMcp, installSheldonSkill, serveMcp } from '
21
21
  import { buildBundle, createBundle, diffBundles, validateBundle } from './commands/bundle.js';
22
22
  import { startWebServer } from '@sheldon/web';
23
23
  import { createWebApplication } from './web-api.js';
24
+ import { openHelpPage, readHelpPageIds, resolveHelpPage, resolveHelpRoot } from './help.js';
24
25
  import { createOfficialCatalogClient, currentPlatform } from './official-catalog.js';
25
26
  export async function runCli(args, dependencies = {}) {
26
27
  const stdout = [];
@@ -83,6 +84,14 @@ export async function runCli(args, dependencies = {}) {
83
84
  };
84
85
  }
85
86
  const message = error instanceof Error ? error.message : String(error);
87
+ if (message.startsWith('HELP_PAGE_MISSING:')) {
88
+ stderr.push(`Error: ${message}\nTarget: offline help\nRecovery: run sheldon help --path and confirm the help files are installed.\n`);
89
+ return {
90
+ exitCode: 1,
91
+ stdout: stdout.join(''),
92
+ stderr: stderr.join('')
93
+ };
94
+ }
86
95
  stderr.push(`Error: ${message}\nTarget: command execution\nRecovery: review the command and retry.\n`);
87
96
  return {
88
97
  exitCode: 1,
@@ -101,6 +110,14 @@ function configureCommander(command, stdout, stderr) {
101
110
  }
102
111
  function createProgram(context, dependencies) {
103
112
  const program = new Command('sheldon').description('Build and use a local, reviewable knowledge vault.');
113
+ program.helpCommand(false);
114
+ program.command('help [topic]').description('Show CLI help, or open offline HTML help.').option('--html', 'open offline HTML help in the default browser').option('--path', 'print the offline HTML help directory').action(async (topic, options, command)=>{
115
+ const parent = command.parent;
116
+ if (!parent) {
117
+ throw new Error('Help command is missing its parent program.');
118
+ }
119
+ await executeHelp(topic, options, parent, context, dependencies);
120
+ });
104
121
  program.command('init [path]').description('Create a Sheldon vault and save it as the local default.').addOption(new Option('--yes', 'accept the proposed default path')).action((path, options)=>executeInit(path, options, context));
105
122
  program.command('doctor').description('Check the vault, local databases, plugins, and agent tools.').option('--vault <path>', 'explicit vault path').action((options)=>executeDoctor(options, context));
106
123
  program.command('migrate-state').description('Copy legacy plugin state to this platform state directory after hash verification.').requiredOption('--from <directory>', 'legacy Sheldon application-state directory').action(async (options)=>{
@@ -157,6 +174,27 @@ function createProgram(context, dependencies) {
157
174
  language.command('remove <code>').description('Remove installed OCR language data.').action((code)=>removeImageLanguageCommand(code, context));
158
175
  return program;
159
176
  }
177
+ async function executeHelp(topic, options, program, context, dependencies) {
178
+ const helpRoot = resolveHelpRoot(dependencies.helpRoot);
179
+ if (options.path) {
180
+ context.write(helpRoot);
181
+ return;
182
+ }
183
+ if (options.html) {
184
+ const page = resolveHelpPage(topic, helpRoot, await readHelpPageIds(helpRoot));
185
+ await openHelpPage(page, dependencies.openHelp);
186
+ return;
187
+ }
188
+ if (!topic) {
189
+ program.outputHelp();
190
+ return;
191
+ }
192
+ const command = program.commands.find((candidate)=>candidate.name() === topic || candidate.aliases().includes(topic));
193
+ if (!command || command.name() === 'help') {
194
+ throw new Error(`Unknown help topic '${topic}'.`);
195
+ }
196
+ command.outputHelp();
197
+ }
160
198
  function agentKind(value) {
161
199
  if (isAgentKind(value)) return value;
162
200
  throw new InvalidArgumentError(`Agent must be ${formatAgentKindList()}.`);
@@ -253,7 +253,7 @@ async function readTextIfPresent(path) {
253
253
  function terminate(child) {
254
254
  if (!child.killed) child.kill('SIGKILL');
255
255
  }
256
- function buildChildEnvironment(source, allowlist) {
256
+ export function buildChildEnvironment(source, allowlist) {
257
257
  const environment = sanitizedEnvironment(source);
258
258
  for (const key of [
259
259
  'HOME',
@@ -1,6 +1,6 @@
1
1
  export { createClaudeCommandAdapter, createClaudeQueryAdapter, createCodexCommandAdapter, createCodexQueryAdapter, createCommandAdapter, createGrokCommandAdapter, createGrokQueryAdapter, createQueryCommandAdapter } from './adapters.js';
2
2
  export { ProposalPromotionError, ProposalValidationError } from './errors.js';
3
- export { JsonCommandExecutor } from './command-executor.js';
3
+ export { JsonCommandExecutor, buildChildEnvironment } from './command-executor.js';
4
4
  export { isProposalId, PROPOSAL_SCHEMA_VERSION, summarizeProposal, validateProposal } from './proposal.js';
5
5
  export { ProposalStore } from './proposal-store.js';
6
6
  export { AGENT_PROFILE_IDS, formatAgentKindList, isAgentKind, listAgentProfiles, requireAgentProfile } from './profiles.js';
@@ -1,8 +1,3 @@
1
- export const AGENT_PROFILE_IDS = [
2
- 'codex',
3
- 'claude',
4
- 'grok'
5
- ];
6
1
  const profiles = [
7
2
  {
8
3
  id: 'codex',
@@ -102,6 +97,7 @@ const profiles = [
102
97
  }
103
98
  }
104
99
  ];
100
+ export const AGENT_PROFILE_IDS = profiles.map((profile)=>profile.id);
105
101
  export function isAgentKind(value) {
106
102
  return AGENT_PROFILE_IDS.includes(value);
107
103
  }
@@ -53,7 +53,8 @@ function parseCatalogDocument(value) {
53
53
  }
54
54
  const publishedAt = timestamp(document.publishedAt);
55
55
  const plugins = pluginEntries(document.plugins);
56
- const languages = languageEntries(document.languages);
56
+ const imagePlatforms = plugins.find((plugin)=>plugin.id === 'source.image')?.platforms ?? SUPPORTED_PLATFORMS;
57
+ const languages = languageEntries(document.languages, imagePlatforms);
57
58
  return {
58
59
  schemaVersion: 1,
59
60
  publishedAt,
@@ -91,7 +92,7 @@ function pluginEntries(value) {
91
92
  });
92
93
  return entries.sort((left, right)=>left.id.localeCompare(right.id));
93
94
  }
94
- function languageEntries(value) {
95
+ function languageEntries(value, imagePlatforms) {
95
96
  if (!Array.isArray(value)) schemaInvalid();
96
97
  const codes = new Set();
97
98
  const entries = value.map((candidate)=>{
@@ -111,7 +112,7 @@ function languageEntries(value) {
111
112
  return {
112
113
  owner: 'source.image',
113
114
  code: entry.code,
114
- artifacts: artifactRecord(entry.artifacts, SUPPORTED_PLATFORMS)
115
+ artifacts: artifactRecord(entry.artifacts, imagePlatforms)
115
116
  };
116
117
  });
117
118
  return entries.sort((left, right)=>left.code.localeCompare(right.code));
@@ -53,7 +53,8 @@ function parseCatalogDocument(value) {
53
53
  }
54
54
  const publishedAt = timestamp(document.publishedAt);
55
55
  const plugins = pluginEntries(document.plugins);
56
- const languages = languageEntries(document.languages);
56
+ const imagePlatforms = plugins.find((plugin)=>plugin.id === 'source.image')?.platforms ?? SUPPORTED_PLATFORMS;
57
+ const languages = languageEntries(document.languages, imagePlatforms);
57
58
  return {
58
59
  schemaVersion: 1,
59
60
  publishedAt,
@@ -91,7 +92,7 @@ function pluginEntries(value) {
91
92
  });
92
93
  return entries.sort((left, right)=>left.id.localeCompare(right.id));
93
94
  }
94
- function languageEntries(value) {
95
+ function languageEntries(value, imagePlatforms) {
95
96
  if (!Array.isArray(value)) schemaInvalid();
96
97
  const codes = new Set();
97
98
  const entries = value.map((candidate)=>{
@@ -111,7 +112,7 @@ function languageEntries(value) {
111
112
  return {
112
113
  owner: 'source.image',
113
114
  code: entry.code,
114
- artifacts: artifactRecord(entry.artifacts, SUPPORTED_PLATFORMS)
115
+ artifacts: artifactRecord(entry.artifacts, imagePlatforms)
115
116
  };
116
117
  });
117
118
  return entries.sort((left, right)=>left.code.localeCompare(right.code));