@khorsheed/dsh-context-guard 0.1.0 → 0.2.0
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/CHANGELOG.md +8 -0
- package/README.en.md +13 -9
- package/README.i18n.yaml +2 -2
- package/README.md +17 -13
- package/lib/client.js +22 -22
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/slots.d.ts +1 -1
- package/lib/types/client/slots.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +1 -2
- package/package.json +15 -16
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* running after the main request is rejected.
|
|
24
24
|
* @module @khorsheed/dsh-context-guard/client
|
|
25
25
|
*/
|
|
26
|
-
import type {
|
|
26
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
27
27
|
import { type ContextGuardConfig } from './config.ts';
|
|
28
28
|
import { NS } from './locales.ts';
|
|
29
29
|
export type { ContextGuardConfig } from './config.ts';
|
|
@@ -42,5 +42,5 @@ export declare const inject: string[];
|
|
|
42
42
|
* @param ctx - client root context.
|
|
43
43
|
* @param config - entry config (the section's composition base layer); defaults apply when the runner passes none.
|
|
44
44
|
*/
|
|
45
|
-
export declare function apply(ctx:
|
|
45
|
+
export declare function apply(ctx: Context, config?: Partial<ContextGuardConfig>): void;
|
|
46
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAoBlD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACpE,OAAO,EAAM,EAAE,EAAM,MAAM,cAAc,CAAA;AAKzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACtE,YAAY,EACV,uBAAuB,EAAE,oBAAoB,EAAE,gCAAgC,EAAE,6BAA6B,GAC/G,MAAM,YAAY,CAAA;AAEnB,iDAAiD;AACjD,OAAO,EAAE,EAAE,EAAE,CAAA;AAEb,gGAAgG;AAChG,eAAO,MAAM,MAAM,UAAoE,CAAA;AAEvF;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,IAAI,CA4C9E"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and the card react to the same live section.
|
|
6
6
|
*/
|
|
7
7
|
import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
8
|
-
import type { SettingsScope } from '@deepseek-ai/dsh-client-
|
|
8
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
9
9
|
import type { ContextGuardConfig } from './config.ts';
|
|
10
10
|
/** Injected action face of the composer-tool-row entry. */
|
|
11
11
|
export interface ContextGuardInjected {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/client/slots.ts"],"names":[],"mappings":"AAAA;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@@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMlD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAE1D;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,IAAI,CAQ9E"}
|
package/lib/types/index.js
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* (`thresholdRatio`, `maxTokens`) editable from the GUI instead of YAML.
|
|
8
8
|
* @module @khorsheed/dsh-context-guard
|
|
9
9
|
*/
|
|
10
|
-
import { settingsNamespace } from '@deepseek-ai/dsh-settings';
|
|
11
10
|
import { CONTEXT_GUARD_NS } from './namespace.js';
|
|
12
11
|
import { ContextGuardSettingsSchema } from './settings.js';
|
|
13
12
|
export { CONTEXT_GUARD_NS } from './namespace.js';
|
|
@@ -19,6 +18,6 @@ export { ContextGuardSettingsSchema } from './settings.js';
|
|
|
19
18
|
*/
|
|
20
19
|
export function apply(ctx, config = {}) {
|
|
21
20
|
ctx.inject(['settings'], (settingsCtx) => {
|
|
22
|
-
settingsCtx.settings.register(
|
|
21
|
+
settingsCtx.settings.register(CONTEXT_GUARD_NS, ContextGuardSettingsSchema, { base: config });
|
|
23
22
|
});
|
|
24
23
|
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"context",
|
|
9
9
|
"compaction"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.2.0",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "lib/index.js",
|
|
14
14
|
"types": "lib/types/index.d.ts",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"inject": [
|
|
37
37
|
"@deepseek-ai/dsh-api-remotes",
|
|
38
38
|
"@deepseek-ai/dsh-client-locale",
|
|
39
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
40
39
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
41
40
|
"@deepseek-ai/dsh-client-ui-primitives",
|
|
42
41
|
"@deepseek-ai/dsh-client-ui-settings"
|
|
@@ -44,8 +43,8 @@
|
|
|
44
43
|
"platform": "web"
|
|
45
44
|
},
|
|
46
45
|
"compat": {
|
|
47
|
-
"minHost": "0.1.
|
|
48
|
-
"verifiedHost": "0.1.
|
|
46
|
+
"minHost": "0.1.2-rc.1",
|
|
47
|
+
"verifiedHost": "0.1.2-rc.1"
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
"license": "MIT",
|
|
@@ -53,7 +52,6 @@
|
|
|
53
52
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
54
53
|
"@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
|
|
55
54
|
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
56
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
57
55
|
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
58
56
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.6",
|
|
59
57
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
|
|
@@ -64,17 +62,18 @@
|
|
|
64
62
|
},
|
|
65
63
|
"devDependencies": {
|
|
66
64
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
67
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.
|
|
69
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.
|
|
70
|
-
"@deepseek-ai/dsh-client-
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
76
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
65
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-rc.1",
|
|
66
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.2-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.2-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-invariants": "^0.1.2-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-session": "^0.1.2-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.2-rc.1",
|
|
78
77
|
"@testing-library/react": "^16.1.0",
|
|
79
78
|
"@types/react": "~18.3.1",
|
|
80
79
|
"react": "^18.2.0",
|