@dsh-cc/command-help 0.5.0 → 0.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEpE,eAAO,MAAM,IAAI,iBAAiB,CAAA;AAClC,eAAO,MAAM,MAAM,UAAe,CAAA;AAqBlC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAOxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMlD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEpE,eAAO,MAAM,IAAI,iBAAiB,CAAA;AAClC,eAAO,MAAM,MAAM,UAAe,CAAA;AAwBlC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CASxC"}
package/lib/index.js CHANGED
@@ -3,19 +3,22 @@
3
3
  * the detail for one named command, including its input hint.
4
4
  * @module @dsh-cc/command-help
5
5
  */
6
+ import { helpable } from '@dsh-cc/command-usage';
6
7
  import { formatHelpDetail, formatHelpList } from "./help.js";
7
8
  import { findPluginCommand, listPluginCommands } from "./plugins.js";
8
9
  export { formatPluginHelpDetail } from "./help.js";
9
10
  export { findPluginCommand, listPluginCommands } from "./plugins.js";
10
11
  export const name = 'command-help';
11
12
  export const inject = ['commands'];
13
+ /** Trailing guidance appended to the bare `/help` command index. */
14
+ const HELP_ARG_TIP = 'Tip: every command accepts a trailing `help` argument for usage details.';
12
15
  /** Execute `/help [cmd]`. */
13
16
  function executeHelp(ctx, invocation) {
14
17
  const descriptors = ctx.commands.list(invocation.agent);
15
18
  const pluginCommands = listPluginCommands(ctx);
16
19
  const token = invocation.rawInput.trim();
17
20
  if (token.length === 0) {
18
- return { kind: 'success', text: formatHelpList(descriptors, pluginCommands) };
21
+ return { kind: 'success', text: `${formatHelpList(descriptors, pluginCommands)}\n${HELP_ARG_TIP}` };
19
22
  }
20
23
  const lowered = token.toLowerCase();
21
24
  // Colon-form names (e.g. `codex:review`) cannot exist in the harness
@@ -32,11 +35,13 @@ function executeHelp(ctx, invocation) {
32
35
  * @param ctx - context carrying the command registry.
33
36
  */
34
37
  export function apply(ctx) {
35
- ctx.commands.register({
38
+ ctx.commands.register(helpable({
36
39
  name: 'help',
37
40
  description: 'list all slash commands, or show details for one (e.g. /help memory)',
38
41
  input: { hint: '[command]' },
39
42
  handler: (invocation) => executeHelp(ctx, invocation),
40
- });
43
+ }, {
44
+ notes: ['Tip: every command accepts a trailing `help` argument.'],
45
+ }));
41
46
  }
42
47
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,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AAiB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACjD,MAAM,MAAM,GAAG,gBAAgB,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;IAChE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,KAAK,yBAAyB,EAAE,CAAA;IACtF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,sEAAsE;QACnF,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC5B,OAAO,EAAE,CAAC,UAA6B,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC;KACzE,EAAE;QACD,KAAK,EAAE,CAAC,wDAAwD,CAAC;KAClE,CAAC,CAAC,CAAA;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/command-help",
3
3
  "description": "Human-facing slash command to list or detail available slash commands",
4
- "version": "0.5.0",
4
+ "version": "0.6.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dsh-cc/dsh-cc.git",
@@ -25,9 +25,9 @@
25
25
  ],
26
26
  "license": "Apache-2.0",
27
27
  "peerDependencies": {
28
- "@deepseek-ai/dsh-commands": ">=0.1.1-rc.2",
29
- "@deepseek-ai/dsh-invariants": ">=0.1.1-rc.2",
30
- "@deepseek-ai/cordis": ">=0.1.1-rc.2"
28
+ "@deepseek-ai/dsh-commands": ">=0.1.2-rc.1",
29
+ "@deepseek-ai/dsh-invariants": ">=0.1.2-rc.1",
30
+ "@deepseek-ai/cordis": ">=0.1.2-rc.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@deepseek-ai/cordis-plugin-loader": "link:../../../../deepseek-harness/vendor/loader",
@@ -39,5 +39,8 @@
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
+ },
43
+ "dependencies": {
44
+ "@dsh-cc/command-usage": "^0.6.1"
42
45
  }
43
46
  }