@dsh-cc/command-status 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;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAM7C,eAAO,MAAM,IAAI,mBAAmB,CAAA;AACpC,eAAO,MAAM,MAAM,UAAe,CAAA;AA8BlC;;;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;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAO7C,eAAO,MAAM,IAAI,mBAAmB,CAAA;AACpC,eAAO,MAAM,MAAM,UAAe,CAAA;AA8BlC;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAMxC"}
package/lib/index.js CHANGED
@@ -5,17 +5,18 @@
5
5
  * @module @dsh-cc/command-status
6
6
  */
7
7
  import { formatStatus, lastModel } from "./status.js";
8
+ import { helpable } from '@dsh-cc/command-usage';
8
9
  export const name = 'command-status';
9
10
  export const inject = ['commands'];
10
11
  /** Gather every line the current composition can report. */
11
12
  function gather(ctx, session) {
12
- const events = session.events;
13
+ const events = session.snapshotEvents();
13
14
  const modelRef = lastModel(events);
14
15
  let preset;
15
16
  const presets = ctx.get('permissionPresets');
16
17
  if (presets !== undefined) {
17
18
  try {
18
- preset = presets.current(events);
19
+ preset = presets.current(session);
19
20
  }
20
21
  catch {
21
22
  // The permission service may be mounted without its shell/approval
@@ -39,10 +40,10 @@ function executeStatus(ctx, invocation) {
39
40
  * @param ctx - context carrying the command registry.
40
41
  */
41
42
  export function apply(ctx) {
42
- ctx.commands.register({
43
+ ctx.commands.register(helpable({
43
44
  name: 'status',
44
45
  description: 'show current model, permission preset, session, and working directory',
45
46
  handler: (invocation) => executeStatus(ctx, invocation),
46
- });
47
+ }));
47
48
  }
48
49
  //# 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;;;;;GAKG;AAMH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAA;AAExE,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAA;AACpC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,CAAC,CAAA;AAElC,4DAA4D;AAC5D,SAAS,MAAM,CAAC,GAAY,EAAE,OAAgB;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC7B,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;IAClC,IAAI,MAA0B,CAAA;IAC9B,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAC5C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,mEAAmE;YACnE,oEAAoE;QACtE,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE;QACpF,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;QACzC,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,GAAG,EAAE,OAAO,CAAC,MAA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CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,mEAAmE;YACnE,oEAAoE;QACtE,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,KAAK,EAAE,EAAE;QACpF,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;QACzC,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE;KACzC,CAAA;AACH,CAAC;AAED,oEAAoE;AACpE,SAAS,aAAa,CAAC,GAAY,EAAE,UAA6B;IAChE,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACpD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,uEAAuE;QACpF,OAAO,EAAE,CAAC,UAA6B,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;KAC3E,CAAC,CAAC,CAAA;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/command-status",
3
3
  "description": "Human-facing slash command for a session status summary",
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-permission-presets": ">=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-permission-presets": ">=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",