@crouton-kit/crouter 0.2.4 → 0.2.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.
@@ -8,7 +8,7 @@ import { handleError, hint, out, info } from '../core/output.js';
8
8
  import { implementHandoffPrompt, planHandoffPrompt, reviewHandoffPrompt, } from '../prompts/agent.js';
9
9
  // Seconds before the originating pane is closed in fire-and-forget workflow
10
10
  // handoffs (plan/implement/review). Override with --kill-after.
11
- const DEFAULT_KILL_SECS = 10;
11
+ const DEFAULT_KILL_SECS = 2;
12
12
  async function readStdin() {
13
13
  const chunks = [];
14
14
  for await (const chunk of process.stdin) {
@@ -33,6 +33,12 @@ function wrapSkill(name, path, content) {
33
33
  function formatNeighborQualifier(s) {
34
34
  return s.plugin === SCOPE_SKILL_PLUGIN ? `${s.scope}:${s.name}` : `${s.plugin}/${s.name}`;
35
35
  }
36
+ function formatNeighborKeywords(s) {
37
+ const kw = s.frontmatter.keywords;
38
+ if (!kw || kw.length === 0)
39
+ return '';
40
+ return ` — [${kw.join(', ')}]`;
41
+ }
36
42
  function buildNeighborsSection(skill) {
37
43
  const siblings = listSkillSiblings(skill);
38
44
  const children = listSkillChildren(skill);
@@ -40,14 +46,14 @@ function buildNeighborsSection(skill) {
40
46
  return null;
41
47
  const lines = [
42
48
  '## Neighbors',
43
- '*Auto-discovered from filesystem. Use `--no-neighbors` to suppress.*',
49
+ '*Auto-discovered from filesystem. Use `--no-neighbors` to suppress. ' +
50
+ 'Run `crtr skill show <name>` for full description + body.*',
44
51
  '',
45
52
  ];
46
53
  if (siblings.length > 0) {
47
54
  lines.push('**Siblings:**');
48
55
  for (const s of siblings) {
49
- const desc = s.frontmatter.description !== undefined ? s.frontmatter.description : '';
50
- lines.push(`- \`${formatNeighborQualifier(s)}\`${desc ? ` — ${desc}` : ''}`);
56
+ lines.push(`- \`${formatNeighborQualifier(s)}\`${formatNeighborKeywords(s)}`);
51
57
  }
52
58
  if (children.length > 0)
53
59
  lines.push('');
@@ -55,8 +61,7 @@ function buildNeighborsSection(skill) {
55
61
  if (children.length > 0) {
56
62
  lines.push('**Nested:**');
57
63
  for (const s of children) {
58
- const desc = s.frontmatter.description !== undefined ? s.frontmatter.description : '';
59
- lines.push(`- \`${formatNeighborQualifier(s)}\`${desc ? ` — ${desc}` : ''}`);
64
+ lines.push(`- \`${formatNeighborQualifier(s)}\`${formatNeighborKeywords(s)}`);
60
65
  }
61
66
  }
62
67
  return lines.join('\n');
@@ -81,11 +86,11 @@ export function registerSkillCommands(program) {
81
86
  .command('skill [nameOrVerb] [rest...]')
82
87
  .description('manage and inspect skills')
83
88
  .option('--frontmatter', 'include YAML frontmatter in the printed body')
84
- .addHelpText('after', '\nRun `crtr skill` (no args) for intent-based routing and SKILL.md format reference.\n\n' +
85
- SKILL_IDENTIFIER_HELP)
89
+ .addHelpText('before', '\n' + skillPrompt() + '\n')
90
+ .addHelpText('after', '\n' + SKILL_IDENTIFIER_HELP)
86
91
  .action(async (nameOrVerb, _rest, opts) => {
87
92
  if (nameOrVerb === undefined) {
88
- out(skillPrompt());
93
+ skill.help();
89
94
  return;
90
95
  }
91
96
  if (!KNOWN_VERBS.has(nameOrVerb)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crouton-kit/crouter",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "crtr — fast access to skills, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",