@dsh-cc/command-stats 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;AAIlD,eAAO,MAAM,IAAI,kBAAkB,CAAA;AACnC,eAAO,MAAM,MAAM,UAAe,CAAA;AAQlC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAMxC"}
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,eAAO,MAAM,IAAI,kBAAkB,CAAA;AACnC,eAAO,MAAM,MAAM,UAAe,CAAA;AAQlC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAMxC"}
package/lib/index.js CHANGED
@@ -4,11 +4,12 @@
4
4
  * @module @dsh-cc/command-stats
5
5
  */
6
6
  import { foldStats, formatStatsReport } from "./stats.js";
7
+ import { helpable } from '@dsh-cc/command-usage';
7
8
  export const name = 'command-stats';
8
9
  export const inject = ['commands'];
9
10
  /** Execute `/stats` against the invocation's own session log. */
10
11
  function executeStats(invocation) {
11
- const report = foldStats(invocation.agent.session.events);
12
+ const report = foldStats(invocation.agent.session.snapshotEvents());
12
13
  return { kind: 'success', text: formatStatsReport(report) };
13
14
  }
14
15
  /**
@@ -16,10 +17,10 @@ function executeStats(invocation) {
16
17
  * @param ctx - context carrying the command registry.
17
18
  */
18
19
  export function apply(ctx) {
19
- ctx.commands.register({
20
+ ctx.commands.register(helpable({
20
21
  name: 'stats',
21
22
  description: 'show turn, step, tool-call, and token statistics for this session',
22
23
  handler: (invocation) => executeStats(invocation),
23
- });
24
+ }));
24
25
  }
25
26
  //# 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,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEzD,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAA;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,CAAC,CAAA;AAElC,iEAAiE;AACjE,SAAS,YAAY,CAAC,UAA6B;IACjD,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,CAAC,UAA6B,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;KACrE,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEhD,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAA;AACnC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,CAAC,CAAA;AAElC,iEAAiE;AACjE,SAAS,YAAY,CAAC,UAA6B;IACjD,MAAM,MAAM,GAAG,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;IACnE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,CAAC,UAA6B,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;KACrE,CAAC,CAAC,CAAA;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/command-stats",
3
3
  "description": "Human-facing slash command for session event statistics",
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",
@@ -24,12 +24,15 @@
24
24
  "lib"
25
25
  ],
26
26
  "license": "Apache-2.0",
27
+ "dependencies": {
28
+ "@dsh-cc/command-usage": "^0.6.1"
29
+ },
27
30
  "peerDependencies": {
28
- "@deepseek-ai/dsh-commands": ">=0.1.1-rc.2",
29
- "@deepseek-ai/dsh-invariants": ">=0.1.1-rc.2",
30
- "@deepseek-ai/dsh-llm": ">=0.1.1-rc.2",
31
- "@deepseek-ai/dsh-session": ">=0.1.1-rc.2",
32
- "@deepseek-ai/cordis": ">=0.1.1-rc.2"
31
+ "@deepseek-ai/dsh-commands": ">=0.1.2-rc.1",
32
+ "@deepseek-ai/dsh-invariants": ">=0.1.2-rc.1",
33
+ "@deepseek-ai/dsh-llm": ">=0.1.2-rc.1",
34
+ "@deepseek-ai/dsh-session": ">=0.1.2-rc.1",
35
+ "@deepseek-ai/cordis": ">=0.1.2-rc.1"
33
36
  },
34
37
  "devDependencies": {
35
38
  "@deepseek-ai/cordis-plugin-loader": "link:../../../../deepseek-harness/vendor/loader",