@goodandready/dsh-context-lens 0.1.1 → 0.1.3

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.
package/LICENSE CHANGED
@@ -11,3 +11,11 @@ furnished to do so, subject to the following conditions:
11
11
 
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/cordis.patch.yml CHANGED
@@ -1,2 +1,4 @@
1
- - id: dsh-context-lens
2
- name: '@goodandready/dsh-context-lens'
1
+ # dsh-context-lens: строка плагина в дереве загрузчика профиля.
2
+ - insert:
3
+ - id: dsh-context-lens
4
+ name: '@goodandready/dsh-context-lens'
package/lib/index.js CHANGED
@@ -17,6 +17,9 @@ const NS = '@goodandready/dsh-context-lens';
17
17
  // in-memory focus state
18
18
  let focusState = { paths: [], updatedAt: null };
19
19
 
20
+ const OUTPUT_SCHEMA = { type: 'object', properties: { success: { type: 'boolean' } }, additionalProperties: true };
21
+ const renderOutput = (_args, result) => JSON.stringify(result, null, 2);
22
+
20
23
  export function apply(ctx, config) {
21
24
  let getConfig = () => config;
22
25
 
@@ -46,6 +49,7 @@ export function apply(ctx, config) {
46
49
  },
47
50
  required: ['paths']
48
51
  },
52
+ output: { schema: OUTPUT_SCHEMA, render: renderOutput },
49
53
  execute: async (params) => {
50
54
  const paths = Array.isArray(params.paths) ? params.paths : [];
51
55
  focusState = { paths, updatedAt: new Date().toISOString() };
@@ -65,6 +69,7 @@ export function apply(ctx, config) {
65
69
  },
66
70
  required: ['text']
67
71
  },
72
+ output: { schema: OUTPUT_SCHEMA, render: renderOutput },
68
73
  execute: async (params) => {
69
74
  const cfg = getConfig();
70
75
  const mode = params.mode || cfg.compressionMode || 'balanced';
@@ -87,6 +92,7 @@ export function apply(ctx, config) {
87
92
  },
88
93
  required: ['code']
89
94
  },
95
+ output: { schema: OUTPUT_SCHEMA, render: renderOutput },
90
96
  execute: async (params) => {
91
97
  const cfg = getConfig();
92
98
  const maxDepth = params.maxDepth ?? cfg.astSkeletonMaxDepth ?? 3;
@@ -100,6 +106,7 @@ export function apply(ctx, config) {
100
106
  name: 'context_lens_stats',
101
107
  description: 'Show session token savings stats for context-lens',
102
108
  parameters: { type: 'object', properties: {} },
109
+ output: { schema: OUTPUT_SCHEMA, render: renderOutput },
103
110
  execute: async () => {
104
111
  const stats = tracker.getStats();
105
112
  const cfg = getConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-context-lens",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "DSH plugin for AST context compression, test log filtering, and token budget guard",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",