dsh-web-search-pro 0.2.0 → 0.2.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/CHANGELOG.md +179 -0
- package/README.md +197 -32
- package/assets/skills/dsh-web-search-pro/SKILL.md +14 -13
- package/assets/skills/dsh-web-search-pro/references/config.md +36 -0
- package/assets/skills/dsh-web-search-pro/references/sources.md +19 -4
- package/assets/skills/dsh-web-search-pro/references/troubleshooting.md +3 -1
- package/catalog/sources.v1.json +22 -12
- package/lib/actions/approval.js +50 -1
- package/lib/actions/approval.js.map +1 -1
- package/lib/actions/config.js +274 -0
- package/lib/actions/config.js.map +1 -0
- package/lib/actions/errors.js +8 -1
- package/lib/actions/errors.js.map +1 -1
- package/lib/actions/format.js +10 -0
- package/lib/actions/format.js.map +1 -1
- package/lib/actions/index-view.js +2 -2
- package/lib/actions/index-view.js.map +1 -1
- package/lib/actions/read.js +7 -3
- package/lib/actions/read.js.map +1 -1
- package/lib/actions/registry.js +3 -1
- package/lib/actions/registry.js.map +1 -1
- package/lib/actions/run.js +2 -2
- package/lib/actions/run.js.map +1 -1
- package/lib/actions/schema.js +18 -0
- package/lib/actions/schema.js.map +1 -1
- package/lib/actions/search.js +12 -6
- package/lib/actions/search.js.map +1 -1
- package/lib/actions/sources.js +116 -41
- package/lib/actions/sources.js.map +1 -1
- package/lib/actions/types.js +19 -1
- package/lib/actions/types.js.map +1 -1
- package/lib/browser-access.js +25 -0
- package/lib/browser-access.js.map +1 -1
- package/lib/catalog/recommend.js +11 -3
- package/lib/catalog/recommend.js.map +1 -1
- package/lib/catalog/schema.js +3 -1
- package/lib/catalog/schema.js.map +1 -1
- package/lib/cli/builtin-specs.js +341 -0
- package/lib/cli/builtin-specs.js.map +1 -0
- package/lib/cli/chain.js +193 -0
- package/lib/cli/chain.js.map +1 -0
- package/lib/cli/chains-spec.js +118 -0
- package/lib/cli/chains-spec.js.map +1 -0
- package/lib/cli/engine.js +99 -0
- package/lib/cli/engine.js.map +1 -0
- package/lib/cli/opencli-sites.js +83 -0
- package/lib/cli/opencli-sites.js.map +1 -0
- package/lib/cli/opencli.js +153 -0
- package/lib/cli/opencli.js.map +1 -0
- package/lib/cli/probe.js +128 -0
- package/lib/cli/probe.js.map +1 -0
- package/lib/cli/runner.js +564 -0
- package/lib/cli/runner.js.map +1 -0
- package/lib/cli/spec.js +496 -0
- package/lib/cli/spec.js.map +1 -0
- package/lib/cli/time-text.js +79 -0
- package/lib/cli/time-text.js.map +1 -0
- package/lib/cli/trial.js +57 -0
- package/lib/cli/trial.js.map +1 -0
- package/lib/client/SettingsCard.js +14 -32
- package/lib/client/SettingsCard.js.map +1 -1
- package/lib/client/agent-mark.js +27 -0
- package/lib/client/agent-mark.js.map +1 -0
- package/lib/client/card-frame.js +118 -0
- package/lib/client/card-frame.js.map +1 -0
- package/lib/client/cli-form.js +257 -0
- package/lib/client/cli-form.js.map +1 -0
- package/lib/client/field-docs.js +130 -0
- package/lib/client/field-docs.js.map +1 -0
- package/lib/client/field-keys.js +81 -0
- package/lib/client/field-keys.js.map +1 -0
- package/lib/client/field-rows.js +71 -0
- package/lib/client/field-rows.js.map +1 -0
- package/lib/client/fill.js +3 -0
- package/lib/client/fill.js.map +1 -0
- package/lib/client/form-specs.js +15 -1
- package/lib/client/form-specs.js.map +1 -1
- package/lib/client/form.js +296 -27
- package/lib/client/form.js.map +1 -1
- package/lib/client/group-advanced.js +23 -0
- package/lib/client/group-advanced.js.map +1 -0
- package/lib/client/group-agent.js +28 -0
- package/lib/client/group-agent.js.map +1 -0
- package/lib/client/group-cli.js +136 -0
- package/lib/client/group-cli.js.map +1 -0
- package/lib/client/group-common.js +29 -0
- package/lib/client/group-common.js.map +1 -0
- package/lib/client/group-judge.js +67 -0
- package/lib/client/group-judge.js.map +1 -0
- package/lib/client/group-order.js +201 -0
- package/lib/client/group-order.js.map +1 -0
- package/lib/client/group-runtime.js +33 -0
- package/lib/client/group-runtime.js.map +1 -0
- package/lib/client/group-sources.js +83 -0
- package/lib/client/group-sources.js.map +1 -0
- package/lib/client/groups-basic.js +36 -0
- package/lib/client/groups-basic.js.map +1 -0
- package/lib/client/index.js.map +1 -1
- package/lib/client/json-list.js +50 -0
- package/lib/client/json-list.js.map +1 -0
- package/lib/client/locales.js +666 -215
- package/lib/client/locales.js.map +1 -1
- package/lib/client/order.js +192 -0
- package/lib/client/order.js.map +1 -0
- package/lib/client/overlay-ops.js +46 -0
- package/lib/client/overlay-ops.js.map +1 -0
- package/lib/client/sources-table.js +1 -0
- package/lib/client/sources-table.js.map +1 -1
- package/lib/client/styles.js +74 -47
- package/lib/client/styles.js.map +1 -1
- package/lib/client/text-view.js +98 -0
- package/lib/client/text-view.js.map +1 -0
- package/lib/client/ui-kit.js +120 -0
- package/lib/client/ui-kit.js.map +1 -0
- package/lib/client/validators.js +22 -0
- package/lib/client/validators.js.map +1 -1
- package/lib/client.js +9151 -1987
- package/lib/client.js.map +1 -1
- package/lib/config-fillers.js +53 -0
- package/lib/config-fillers.js.map +1 -0
- package/lib/config-groups.js +49 -0
- package/lib/config-groups.js.map +1 -0
- package/lib/config.js +87 -107
- package/lib/config.js.map +1 -1
- package/lib/default-chain.js +66 -0
- package/lib/default-chain.js.map +1 -0
- package/lib/deps.js +109 -102
- package/lib/deps.js.map +1 -1
- package/lib/engine-error.js +19 -0
- package/lib/engine-error.js.map +1 -0
- package/lib/engines.js +32 -115
- package/lib/engines.js.map +1 -1
- package/lib/fetch.js +23 -4
- package/lib/fetch.js.map +1 -1
- package/lib/index.js +30 -5
- package/lib/index.js.map +1 -1
- package/lib/overlay-types.js +88 -0
- package/lib/overlay-types.js.map +1 -0
- package/lib/overlay.js +683 -0
- package/lib/overlay.js.map +1 -0
- package/lib/pipeline/candidates.js +27 -1
- package/lib/pipeline/candidates.js.map +1 -1
- package/lib/pipeline/compile.js +63 -0
- package/lib/pipeline/compile.js.map +1 -1
- package/lib/pipeline/confidence.js +64 -0
- package/lib/pipeline/confidence.js.map +1 -0
- package/lib/pipeline/fusion.js +50 -3
- package/lib/pipeline/fusion.js.map +1 -1
- package/lib/pipeline/plan.js +2 -2
- package/lib/pipeline/plan.js.map +1 -1
- package/lib/pipeline/render.js +20 -2
- package/lib/pipeline/render.js.map +1 -1
- package/lib/pipeline/run.js +21 -7
- package/lib/pipeline/run.js.map +1 -1
- package/lib/pipeline/sources-spec.js +19 -3
- package/lib/pipeline/sources-spec.js.map +1 -1
- package/lib/providers/builtin.js +13 -14
- package/lib/providers/builtin.js.map +1 -1
- package/lib/providers/deepseek.js +348 -0
- package/lib/providers/deepseek.js.map +1 -0
- package/lib/providers/http.js.map +1 -1
- package/lib/providers/keyed-meta.js +7 -0
- package/lib/providers/keyed-meta.js.map +1 -1
- package/lib/providers/platforms.js +118 -58
- package/lib/providers/platforms.js.map +1 -1
- package/lib/providers/registry.js.map +1 -1
- package/lib/restart.js +47 -0
- package/lib/restart.js.map +1 -0
- package/lib/router.js +203 -27
- package/lib/router.js.map +1 -1
- package/lib/rpc-types.js +15 -0
- package/lib/rpc-types.js.map +1 -0
- package/lib/rpc.js +85 -0
- package/lib/rpc.js.map +1 -0
- package/lib/tools.js +10 -4
- package/lib/tools.js.map +1 -1
- package/lib/types/actions/approval.d.ts +11 -0
- package/lib/types/actions/config.d.ts +54 -0
- package/lib/types/actions/format.d.ts +9 -2
- package/lib/types/actions/run.d.ts +1 -0
- package/lib/types/actions/schema.d.ts +7 -1
- package/lib/types/actions/sources.d.ts +29 -3
- package/lib/types/actions/types.d.ts +28 -2
- package/lib/types/browser-access.d.ts +17 -0
- package/lib/types/catalog/recommend.d.ts +4 -0
- package/lib/types/catalog/schema.d.ts +2 -0
- package/lib/types/cli/builtin-specs.d.ts +38 -0
- package/lib/types/cli/chain.d.ts +83 -0
- package/lib/types/cli/chains-spec.d.ts +48 -0
- package/lib/types/cli/engine.d.ts +50 -0
- package/lib/types/cli/opencli-sites.d.ts +24 -0
- package/lib/types/cli/opencli.d.ts +77 -0
- package/lib/types/cli/probe.d.ts +53 -0
- package/lib/types/cli/runner.d.ts +126 -0
- package/lib/types/cli/spec.d.ts +269 -0
- package/lib/types/cli/time-text.d.ts +12 -0
- package/lib/types/cli/trial.d.ts +19 -0
- package/lib/types/client/SettingsCard.d.ts +17 -1
- package/lib/types/client/agent-mark.d.ts +22 -0
- package/lib/types/client/card-frame.d.ts +35 -0
- package/lib/types/client/cli-form.d.ts +97 -0
- package/lib/types/client/field-docs.d.ts +15 -0
- package/lib/types/client/field-keys.d.ts +41 -0
- package/lib/types/client/field-rows.d.ts +70 -0
- package/lib/types/client/fill.d.ts +2 -0
- package/lib/types/client/form-specs.d.ts +12 -3
- package/lib/types/client/form.d.ts +79 -1
- package/lib/types/client/group-advanced.d.ts +9 -0
- package/lib/types/client/group-agent.d.ts +20 -0
- package/lib/types/client/group-cli.d.ts +52 -0
- package/lib/types/client/group-common.d.ts +12 -0
- package/lib/types/client/group-judge.d.ts +17 -0
- package/lib/types/client/group-order.d.ts +26 -0
- package/lib/types/client/group-runtime.d.ts +15 -0
- package/lib/types/client/group-sources.d.ts +46 -0
- package/lib/types/client/groups-basic.d.ts +18 -0
- package/lib/types/client/index.d.ts +8 -0
- package/lib/types/client/json-list.d.ts +21 -0
- package/lib/types/client/locales.d.ts +1079 -196
- package/lib/types/client/order.d.ts +102 -0
- package/lib/types/client/overlay-ops.d.ts +37 -0
- package/lib/types/client/styles.d.ts +56 -41
- package/lib/types/client/text-view.d.ts +22 -0
- package/lib/types/client/ui-kit.d.ts +200 -0
- package/lib/types/client/validators.d.ts +6 -0
- package/lib/types/config-fillers.d.ts +9 -0
- package/lib/types/config-groups.d.ts +23 -0
- package/lib/types/config.d.ts +265 -216
- package/lib/types/default-chain.d.ts +63 -0
- package/lib/types/deps.d.ts +25 -23
- package/lib/types/engine-error.d.ts +12 -0
- package/lib/types/engines.d.ts +45 -10
- package/lib/types/fetch.d.ts +12 -3
- package/lib/types/index.d.ts +164 -146
- package/lib/types/overlay-types.d.ts +98 -0
- package/lib/types/overlay.d.ts +141 -0
- package/lib/types/pipeline/candidates.d.ts +19 -0
- package/lib/types/pipeline/compile.d.ts +11 -0
- package/lib/types/pipeline/confidence.d.ts +35 -0
- package/lib/types/pipeline/fusion.d.ts +23 -1
- package/lib/types/pipeline/render.d.ts +16 -0
- package/lib/types/pipeline/run.d.ts +3 -1
- package/lib/types/pipeline/sources-spec.d.ts +5 -2
- package/lib/types/pipeline/types.d.ts +37 -0
- package/lib/types/providers/deepseek.d.ts +130 -0
- package/lib/types/providers/http.d.ts +2 -1
- package/lib/types/providers/keyed-meta.d.ts +5 -0
- package/lib/types/providers/platforms.d.ts +15 -3
- package/lib/types/providers/registry.d.ts +10 -0
- package/lib/types/restart.d.ts +52 -0
- package/lib/types/router.d.ts +69 -9
- package/lib/types/rpc-types.d.ts +79 -0
- package/lib/types/rpc.d.ts +41 -0
- package/lib/types/tools.d.ts +6 -0
- package/lib/types/util.d.ts +16 -1
- package/lib/util.js +17 -4
- package/lib/util.js.map +1 -1
- package/package.json +51 -43
- package/scripts/check-client-bundle.mjs +1 -1
- package/scripts/cli-login-check.mjs +214 -0
- package/lib/client/RubricEditor.js +0 -47
- package/lib/client/RubricEditor.js.map +0 -1
- package/lib/client/fields.js +0 -31
- package/lib/client/fields.js.map +0 -1
- package/lib/types/client/RubricEditor.d.ts +0 -6
- package/lib/types/client/fields.d.ts +0 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-web-search-pro",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Enhanced, persistent web search plugin for DeepSeek Harness — multi-engine routing (DeepSeek/Exa/DDG/Bing/Jina + GitHub/B站/YouTube/V2EX/小红书/Twitter/Reddit/RSS), SQLite+LRU cache, userscript-style extraction, and Playwright rendering.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,18 +34,19 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@anweat/dsh-browser": "^0.2.0",
|
|
37
|
-
"@deepseek-ai/cordis": "4.0.4",
|
|
38
|
-
"@deepseek-ai/dsh-api-remotes": ">=0.2.0-rc.2 <0.2.1-0",
|
|
39
|
-
"@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.2 <0.2.1-0",
|
|
40
|
-
"@deepseek-ai/dsh-client-store": ">=0.2.0-rc.2 <0.2.1-0",
|
|
41
|
-
"@deepseek-ai/dsh-client-ui-
|
|
42
|
-
"@deepseek-ai/dsh-client-ui-
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-
|
|
44
|
-
"@deepseek-ai/dsh-client-ui-
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/
|
|
37
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
38
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
39
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
40
|
+
"@deepseek-ai/dsh-client-store": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
46
|
+
"@deepseek-ai/dsh-credentials": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
47
|
+
"@deepseek-ai/dsh-settings": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
48
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.2.1-0 || >=0.2.1-rc.2 <0.2.2-0",
|
|
49
|
+
"@deepseek-ai/schemastery": "^3.18.5"
|
|
49
50
|
},
|
|
50
51
|
"peerDependenciesMeta": {
|
|
51
52
|
"@anweat/dsh-browser": {
|
|
@@ -60,6 +61,9 @@
|
|
|
60
61
|
"@deepseek-ai/dsh-client-store": {
|
|
61
62
|
"optional": true
|
|
62
63
|
},
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-primitives": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
63
67
|
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
64
68
|
"optional": true
|
|
65
69
|
},
|
|
@@ -94,35 +98,38 @@
|
|
|
94
98
|
"node-html-parser": "^9.0.4"
|
|
95
99
|
},
|
|
96
100
|
"devDependencies": {
|
|
97
|
-
"@anweat/dsh-browser": "0.2.
|
|
98
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
99
|
-
"@deepseek-ai/cordis-plugin-group": "1.0.
|
|
100
|
-
"@deepseek-ai/cordis-plugin-include": "1.0.
|
|
101
|
-
"@deepseek-ai/cosmokit": "~1.8.
|
|
102
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
103
|
-
"@deepseek-ai/dsh-api-remotes": "0.2.
|
|
104
|
-
"@deepseek-ai/dsh-app-boot": "0.2.
|
|
105
|
-
"@deepseek-ai/dsh-client-locale": "0.2.
|
|
106
|
-
"@deepseek-ai/dsh-client-store": "0.2.
|
|
107
|
-
"@deepseek-ai/dsh-client-ui-
|
|
108
|
-
"@deepseek-ai/dsh-client-ui-
|
|
109
|
-
"@deepseek-ai/dsh-client-ui-
|
|
110
|
-
"@deepseek-ai/dsh-client-ui-
|
|
111
|
-
"@deepseek-ai/dsh-
|
|
112
|
-
"@deepseek-ai/dsh-
|
|
113
|
-
"@deepseek-ai/dsh-
|
|
114
|
-
"@deepseek-ai/dsh-launch-environment": "0.2.
|
|
115
|
-
"@deepseek-ai/dsh-
|
|
116
|
-
"@deepseek-ai/dsh-
|
|
117
|
-
"@deepseek-ai/dsh-sandbox
|
|
118
|
-
"@deepseek-ai/dsh-
|
|
119
|
-
"@deepseek-ai/dsh-
|
|
120
|
-
"@deepseek-ai/dsh-
|
|
121
|
-
"@deepseek-ai/dsh-
|
|
122
|
-
"@deepseek-ai/dsh-
|
|
123
|
-
"@deepseek-ai/dsh-
|
|
124
|
-
"@deepseek-ai/dsh-
|
|
125
|
-
"@deepseek-ai/
|
|
101
|
+
"@anweat/dsh-browser": "0.2.1",
|
|
102
|
+
"@deepseek-ai/cordis": "^4.0.5",
|
|
103
|
+
"@deepseek-ai/cordis-plugin-group": "1.0.5",
|
|
104
|
+
"@deepseek-ai/cordis-plugin-include": "1.0.10",
|
|
105
|
+
"@deepseek-ai/cosmokit": "~1.8.6",
|
|
106
|
+
"@deepseek-ai/dsh-agent": "0.2.1-rc.3",
|
|
107
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.1-rc.3",
|
|
108
|
+
"@deepseek-ai/dsh-app-boot": "0.2.1-rc.3",
|
|
109
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
110
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.3",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
113
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.3",
|
|
115
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
116
|
+
"@deepseek-ai/dsh-credentials": "0.2.1-rc.3",
|
|
117
|
+
"@deepseek-ai/dsh-home-paths": "0.2.1-rc.3",
|
|
118
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.1-rc.3",
|
|
119
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.3",
|
|
120
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.3",
|
|
121
|
+
"@deepseek-ai/dsh-sandbox": "0.2.1-rc.3",
|
|
122
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.1-rc.3",
|
|
123
|
+
"@deepseek-ai/dsh-scope": "0.2.1-rc.3",
|
|
124
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.3",
|
|
125
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.3",
|
|
126
|
+
"@deepseek-ai/dsh-settings": "0.2.1-rc.3",
|
|
127
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.3",
|
|
128
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.3",
|
|
129
|
+
"@deepseek-ai/dsh-user-approval": "0.2.1-rc.3",
|
|
130
|
+
"@deepseek-ai/dsh-web": "0.2.1-rc.3",
|
|
131
|
+
"@deepseek-ai/dsh-working-directory": "0.2.1-rc.3",
|
|
132
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
126
133
|
"@types/js-yaml": "^4.0.9",
|
|
127
134
|
"@types/node": "^22.0.0",
|
|
128
135
|
"@types/react": "~18.3.1",
|
|
@@ -161,7 +168,8 @@
|
|
|
161
168
|
"scripts": {
|
|
162
169
|
"build": "node scripts/clean-lib.mjs && tsc -p tsconfig.json && tsdown",
|
|
163
170
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
164
|
-
"test": "node --test --experimental-transform-types test/*.test.ts",
|
|
171
|
+
"test": "node --import ./test/isolate-path.mjs --test --experimental-transform-types test/*.test.ts",
|
|
172
|
+
"test:live-cli": "WSP_LIVE_CLI=1 node --import ./test/isolate-path.mjs --test --experimental-transform-types test/cli-live.test.ts",
|
|
165
173
|
"test:client-bundle": "node scripts/check-client-bundle.mjs",
|
|
166
174
|
"verify": "pnpm run typecheck && pnpm run test:peers && pnpm run build && pnpm test && pnpm run test:client-bundle",
|
|
167
175
|
"test:peers": "node test/compat/check-peer-ranges.js",
|
|
@@ -6,7 +6,7 @@ const sourceMap = JSON.parse(await readFile(new URL('../lib/client.js.map', impo
|
|
|
6
6
|
const imports = [...source.matchAll(/\brequire\((['"])([^'"]+)\1\)/g)].map(match => match[2])
|
|
7
7
|
const allowed = new Set([
|
|
8
8
|
'react', 'react/jsx-runtime', 'react-dom', 'react-dom/client',
|
|
9
|
-
'@deepseek-ai/cordis', '@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-ui-slots',
|
|
9
|
+
'@deepseek-ai/cordis', '@deepseek-ai/dsh-client-store', '@deepseek-ai/dsh-client-ui-slots', '@deepseek-ai/dsh-client-ui-primitives',
|
|
10
10
|
])
|
|
11
11
|
const forbidden = [...new Set(imports.filter(id => !allowed.has(id)))].sort()
|
|
12
12
|
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-login-check.mjs - 登录类 CLI 的一键陪测脚本(由用户本人运行)。
|
|
3
|
+
*
|
|
4
|
+
* 做什么:对 xhs、zhihu、rdt、twitter(以及你点名的独立 opencli 站点)逐个执行
|
|
5
|
+
* 1) 插件自己的契约探测(只跑该工具的 --version 与 `search --help`,不搜索、不登录);
|
|
6
|
+
* 2) 与插件完全相同的登录闸门:缺少已保存的登录文件 / 缺少 TWITTER_AUTH_TOKEN+TWITTER_CT0 就跳过,
|
|
7
|
+
* 并给出和插件一样的提示——这样不会触发 xhs / rdt 在没有登录文件时自行读取浏览器 Cookie 的行为;
|
|
8
|
+
* 3) 闸门通过才用插件的内置规格(和插件运行时是同一份 argv、同一个解析器)执行一次只读搜索;
|
|
9
|
+
* 4) 打印解析结果摘要,并把原始 stdout/stderr(已脱敏)和 summary.json 存到输出目录。
|
|
10
|
+
*
|
|
11
|
+
* 不做什么:任何登录命令(xhs login / zhihu login / rdt login / opencli ... login);任何写操作;
|
|
12
|
+
* 不读你的 Cookie 或 Token 内容(只检查登录文件“是否存在”;Token 只通过环境变量交给 twitter 子进程,
|
|
13
|
+
* 保存的原始输出里会被替换)。独立 opencli 会驱动你自己的 Chrome,所以默认不跑,需要 --opencli 点名站点。
|
|
14
|
+
*
|
|
15
|
+
* 用法(在插件包目录内;需要先 `pnpm build`,或使用已发布的包):
|
|
16
|
+
* node scripts/cli-login-check.mjs [--only xhs,zhihu,rdt,twitter] [--count 3] [--out DIR]
|
|
17
|
+
* [--opencli xiaohongshu,twitter,reddit,zhihu] [--query-<id> "词"] [--yes]
|
|
18
|
+
* 例:node scripts/cli-login-check.mjs --only xhs --yes
|
|
19
|
+
* 例:TWITTER_AUTH_TOKEN=... TWITTER_CT0=... node scripts/cli-login-check.mjs --only twitter --yes
|
|
20
|
+
*
|
|
21
|
+
* 退出码:0 = 脚本跑完(无论各 CLI 是否通过,结果看摘要);2 = 参数错误或用户未确认。
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import fs from 'node:fs'
|
|
25
|
+
import os from 'node:os'
|
|
26
|
+
import path from 'node:path'
|
|
27
|
+
import readline from 'node:readline'
|
|
28
|
+
import { pathToFileURL } from 'node:url'
|
|
29
|
+
|
|
30
|
+
const lib = rel => import(pathToFileURL(path.join(path.dirname(new URL(import.meta.url).pathname), '..', 'lib', rel)).href)
|
|
31
|
+
|
|
32
|
+
let modules
|
|
33
|
+
try {
|
|
34
|
+
const [{ builtinSpecById }, probe, runner, spec, opencli, util] = await Promise.all([
|
|
35
|
+
lib('cli/builtin-specs.js'), lib('cli/probe.js'), lib('cli/runner.js'), lib('cli/spec.js'), lib('cli/opencli.js'), lib('util.js'),
|
|
36
|
+
])
|
|
37
|
+
modules = { builtinSpecById, ...probe, ...runner, ...spec, ...opencli, runCli: util.runCli }
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('找不到插件的构建产物 lib/(先在包目录运行 `pnpm build`):' + (error instanceof Error ? error.message : String(error)))
|
|
40
|
+
process.exit(2)
|
|
41
|
+
}
|
|
42
|
+
const {
|
|
43
|
+
builtinSpecById, probeCli, savedLoginPresent, missingEnv, loginHint, runCliSearchDetailed, searchSpecFor, listOpencliSites, planOpencliSearch, OPENCLI_PROBE, runCli,
|
|
44
|
+
} = modules
|
|
45
|
+
|
|
46
|
+
// ── 参数 ────────────────────────────────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
const args = process.argv.slice(2)
|
|
49
|
+
const flag = name => args.includes('--' + name)
|
|
50
|
+
const value = name => { const i = args.indexOf('--' + name); return i >= 0 ? args[i + 1] : undefined }
|
|
51
|
+
if (flag('help') || flag('h')) { console.log(fs.readFileSync(new URL(import.meta.url), 'utf8').split('*/')[0] + '*/'); process.exit(0) }
|
|
52
|
+
|
|
53
|
+
const ALL = ['xhs', 'zhihu', 'rdt', 'twitter']
|
|
54
|
+
const only = (value('only') ?? ALL.join(',')).split(',').map(s => s.trim()).filter(Boolean)
|
|
55
|
+
const unknown = only.filter(id => !ALL.includes(id))
|
|
56
|
+
if (unknown.length) { console.error('未知的 CLI:' + unknown.join(', ') + '(可选:' + ALL.join(', ') + ')'); process.exit(2) }
|
|
57
|
+
const count = Math.min(Math.max(Number(value('count') ?? 3) || 3, 1), 10)
|
|
58
|
+
const opencliSites = (value('opencli') ?? '').split(',').map(s => s.trim()).filter(Boolean)
|
|
59
|
+
const OPENCLI_PLATFORMS = ['xiaohongshu', 'twitter', 'reddit', 'zhihu']
|
|
60
|
+
const badSites = opencliSites.filter(site => !OPENCLI_PLATFORMS.includes(site))
|
|
61
|
+
if (badSites.length) { console.error('--opencli 只接受:' + OPENCLI_PLATFORMS.join(', ')); process.exit(2) }
|
|
62
|
+
|
|
63
|
+
/** 每个 CLI 的默认查询:中文平台用中文,其余用英文。可用 --query-xhs "词" 覆盖。 */
|
|
64
|
+
const DEFAULT_QUERY = { xhs: '露营装备测评', zhihu: '大模型 备案', rdt: 'rust async runtime', twitter: 'DeepSeek Harness' }
|
|
65
|
+
const PLATFORM_OF = { xhs: 'xiaohongshu', zhihu: 'zhihu', rdt: 'reddit', twitter: 'twitter' }
|
|
66
|
+
const queryOf = id => value('query-' + id) ?? DEFAULT_QUERY[id]
|
|
67
|
+
|
|
68
|
+
const stamp = new Date().toISOString().replace(/[:.]/g, '-')
|
|
69
|
+
const outDir = path.resolve(value('out') ?? path.join(process.cwd(), 'cli-login-check-' + stamp))
|
|
70
|
+
|
|
71
|
+
// ── 确认 ────────────────────────────────────────────────────────────────────
|
|
72
|
+
|
|
73
|
+
function plan() {
|
|
74
|
+
const lines = ['将要执行(全部只读;不会运行任何登录命令):']
|
|
75
|
+
for (const id of only) {
|
|
76
|
+
const s = builtinSpecById(id)
|
|
77
|
+
lines.push(' - ' + id + ':' + [s.bins[0], ...searchSpecFor(s, s.platforms[0]).argv].join(' ').replace('{query}', JSON.stringify(queryOf(id))).replace('{count}', String(count)))
|
|
78
|
+
}
|
|
79
|
+
for (const site of opencliSites) lines.push(' - opencli(驱动你自己的 Chrome):opencli ' + site + ' search <查询> -f json')
|
|
80
|
+
lines.push('输出目录:' + outDir)
|
|
81
|
+
return lines.join('\n')
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async function confirm() {
|
|
85
|
+
console.log(plan())
|
|
86
|
+
if (flag('yes')) return true
|
|
87
|
+
if (!process.stdin.isTTY) { console.error('非交互环境:请加 --yes 确认。'); return false }
|
|
88
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
|
89
|
+
const answer = await new Promise(resolve => rl.question('继续?[y/N] ', resolve))
|
|
90
|
+
rl.close()
|
|
91
|
+
return /^y(es)?$/i.test(String(answer).trim())
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ── 脱敏与摘要 ──────────────────────────────────────────────────────────────
|
|
95
|
+
|
|
96
|
+
const SECRET_KEY = /(cookie|token|secret|session|auth|password|a1|z_c0|d_c0|ct0)/i
|
|
97
|
+
|
|
98
|
+
/** 把原始输出里敏感键的值、已知环境变量的值和 xsec_token 参数替换掉,再写盘。 */
|
|
99
|
+
function redact(text, env) {
|
|
100
|
+
let out = text
|
|
101
|
+
for (const name of ['TWITTER_AUTH_TOKEN', 'TWITTER_CT0']) { const v = env[name]; if (v && v.length >= 6) out = out.split(v).join('[redacted]') }
|
|
102
|
+
out = out.replace(/("(?:[^"\\]|\\.)*")(\s*:\s*)"((?:[^"\\]|\\.)*)"/g, (m, key, colon, val) => (SECRET_KEY.test(key) && val.length > 6 && !/^https?:/.test(val) ? key + colon + '"[redacted]"' : m))
|
|
103
|
+
return out.replace(/(xsec_token=)[^&"\s]+/g, '$1REDACTED')
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const short = (text, n = 90) => { const t = String(text ?? '').replace(/\s+/g, ' ').trim(); return t.length > n ? t.slice(0, n - 1) + '…' : t }
|
|
107
|
+
|
|
108
|
+
/** 一眼能看出的垃圾:字段名当标题、占位符文本、重复链接、非 http 链接。 */
|
|
109
|
+
function junkChecks(sources) {
|
|
110
|
+
const problems = []
|
|
111
|
+
const seen = new Set()
|
|
112
|
+
for (const s of sources) {
|
|
113
|
+
if (!/^https?:\/\//.test(s.url)) problems.push('非 http(s) 链接:' + short(s.url))
|
|
114
|
+
if (seen.has(s.url)) problems.push('重复链接:' + short(s.url))
|
|
115
|
+
seen.add(s.url)
|
|
116
|
+
if (!s.title || !s.title.trim()) problems.push('空标题:' + short(s.url))
|
|
117
|
+
else if (/^[A-Za-z_][\w.-]*:$/.test(s.title)) problems.push('标题是字段名:' + s.title)
|
|
118
|
+
for (const field of ['title', 'snippet']) if (/(^|[|·] )(NA|None|null|undefined)( |$)/.test(s[field] ?? '')) problems.push(field + ' 含占位符:' + short(s[field]))
|
|
119
|
+
if (s.publishedAt !== undefined && Number.isNaN(Date.parse(s.publishedAt))) problems.push('publishedAt 不是日期:' + s.publishedAt)
|
|
120
|
+
}
|
|
121
|
+
return problems
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ── 单个 CLI ────────────────────────────────────────────────────────────────
|
|
125
|
+
|
|
126
|
+
async function checkOne(label, spec, platform, query, runOptions = {}) {
|
|
127
|
+
const row = { id: label, platform, query, status: 'skipped', note: '' }
|
|
128
|
+
const t0 = Date.now()
|
|
129
|
+
const probe = await probeCli(spec, { force: true })
|
|
130
|
+
row.probe = { state: probe.state, version: probe.version, path: probe.path, reason: probe.reason }
|
|
131
|
+
console.log('\n=== ' + label + '(平台 ' + platform + ')')
|
|
132
|
+
console.log(' 探测:' + probe.state + (probe.version ? ' ' + probe.version : '') + (probe.path ? ' @ ' + probe.path : '') + (probe.reason ? ' - ' + probe.reason : ''))
|
|
133
|
+
if (probe.state !== 'detected') { row.note = probe.state === 'missing' ? '未安装:' + spec.packageNote : '已安装但契约不符:' + (probe.reason ?? ''); console.log(' 跳过:' + row.note); return row }
|
|
134
|
+
|
|
135
|
+
// 与插件一致的登录闸门(runCliSearchDetailed 内部会再检查一遍,这里只是先给出明确说明)。
|
|
136
|
+
const missing = missingEnv(spec)
|
|
137
|
+
if (missing.length) { row.note = '缺少环境变量 ' + missing.join(' / ') + ';' + loginHint(spec); row.status = 'needs_login'; console.log(' 跳过(未登录):' + row.note); return row }
|
|
138
|
+
if (savedLoginPresent(spec) === false) {
|
|
139
|
+
row.note = '没有已保存的登录文件(' + (spec.login?.savedCredentialPaths ?? []).join(', ') + ');' + loginHint(spec) + (spec.login?.readsBrowserCookiesWithoutLogin ? '。没有登录文件时该工具会自己读取浏览器 Cookie,所以脚本不运行它' : '')
|
|
140
|
+
row.status = 'needs_login'; console.log(' 跳过(未登录):' + row.note); return row
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const base = path.join(outDir, label.replace(/[^\w.-]/g, '_'))
|
|
144
|
+
const argv = searchSpecFor(spec, platform).argv
|
|
145
|
+
console.log(' 执行:' + [probe.path ?? spec.bins[0], ...argv].join(' ').replace('{query}', JSON.stringify(query)).replace('{count}', String(count)))
|
|
146
|
+
let raw
|
|
147
|
+
const capture = async (bin, runArgs, opts) => { raw = await runCli(bin, runArgs, opts); return raw }
|
|
148
|
+
try {
|
|
149
|
+
const { sources, skipped } = await runCliSearchDetailed(spec, { query, count }, { platform, bin: probe.path, run: capture, ...runOptions })
|
|
150
|
+
row.status = 'ok'
|
|
151
|
+
row.resultCount = sources.length
|
|
152
|
+
row.skipped = skipped
|
|
153
|
+
row.sample = sources.slice(0, 3).map(s => ({ ...s, url: redact(s.url, process.env) }))
|
|
154
|
+
row.junk = junkChecks(sources)
|
|
155
|
+
row.withPublishedAt = sources.filter(s => s.publishedAt).length
|
|
156
|
+
row.withSnippet = sources.filter(s => s.snippet).length
|
|
157
|
+
console.log(' 结果:' + sources.length + ' 条(请求 ' + count + ';无链接被跳过 ' + skipped + ';带时间 ' + row.withPublishedAt + ';带摘要 ' + row.withSnippet + ')')
|
|
158
|
+
row.sample.forEach((s, i) => console.log(' ' + (i + 1) + '. ' + short(s.title, 70) + ' ' + short(s.url, 80) + (s.publishedAt ? ' [' + s.publishedAt + ']' : '')))
|
|
159
|
+
console.log(' 自动检查:' + (row.junk.length ? '发现问题 ' + row.junk.length + ' 个' : '未发现垃圾行') )
|
|
160
|
+
row.junk.forEach(p => console.log(' ! ' + p))
|
|
161
|
+
} catch (error) {
|
|
162
|
+
row.status = 'error'
|
|
163
|
+
row.code = error?.code
|
|
164
|
+
row.note = (error instanceof Error ? error.message : String(error))
|
|
165
|
+
row.hint = error?.hint
|
|
166
|
+
console.log(' 失败:[' + (row.code ?? 'error') + '] ' + short(row.note, 300) + (row.hint ? '\n 提示:' + row.hint : ''))
|
|
167
|
+
if (raw) console.log(' 工具原话(脱敏,前 240 字符):' + short(redact(raw.stderr.trim() || raw.stdout.trim(), process.env), 240))
|
|
168
|
+
}
|
|
169
|
+
row.ms = Date.now() - t0
|
|
170
|
+
if (raw) {
|
|
171
|
+
fs.mkdirSync(outDir, { recursive: true })
|
|
172
|
+
const env = process.env
|
|
173
|
+
fs.writeFileSync(base + '.stdout.txt', redact(raw.stdout, env))
|
|
174
|
+
fs.writeFileSync(base + '.stderr.txt', redact(raw.stderr, env))
|
|
175
|
+
row.raw = { exit: raw.code, timedOut: !!raw.timedOut, stdout: base + '.stdout.txt', stderr: base + '.stderr.txt', stdoutBytes: raw.stdout.length }
|
|
176
|
+
console.log(' 原始输出(已脱敏):' + row.raw.stdout + '(exit ' + raw.code + ',' + raw.stdout.length + ' 字符)')
|
|
177
|
+
}
|
|
178
|
+
return row
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// ── 主流程 ──────────────────────────────────────────────────────────────────
|
|
182
|
+
|
|
183
|
+
if (!(await confirm())) { console.error('已取消,没有运行任何东西。'); process.exit(2) }
|
|
184
|
+
fs.mkdirSync(outDir, { recursive: true })
|
|
185
|
+
|
|
186
|
+
console.log('\n主机:' + os.platform() + ' ' + os.release() + ',Node ' + process.version + ';HOME=' + os.homedir())
|
|
187
|
+
const rows = []
|
|
188
|
+
for (const id of only) rows.push(await checkOne(id, builtinSpecById(id), PLATFORM_OF[id], queryOf(id)))
|
|
189
|
+
|
|
190
|
+
if (opencliSites.length) {
|
|
191
|
+
const probe = await probeCli(OPENCLI_PROBE, { force: true })
|
|
192
|
+
console.log('\n=== opencli(独立):' + probe.state + (probe.version ? ' ' + probe.version : '') + (probe.reason ? ' - ' + probe.reason : ''))
|
|
193
|
+
if (probe.state === 'detected') {
|
|
194
|
+
await listOpencliSites({ force: true })
|
|
195
|
+
for (const site of opencliSites) {
|
|
196
|
+
// 与插件完全相同的计划:命令表里的 search 条目、是否带后台窗口 / 临时会话 / 不保留标签页参数、生成的规格。
|
|
197
|
+
const plan = await planOpencliSearch(site, site)
|
|
198
|
+
if (!plan.spec) { rows.push({ id: 'opencli:' + site, platform: site, status: 'skipped', note: plan.problem ?? '生成的规格无效' }); console.log(' ' + site + ':跳过 - ' + rows.at(-1).note); continue }
|
|
199
|
+
const spec = plan.spec
|
|
200
|
+
console.log(' ' + site + ':' + (plan.silent ? '带 --window background --site-session ephemeral --keep-tab false(不抢焦点,用完关标签页)' : '该命令不支持后台窗口参数,按默认方式运行'))
|
|
201
|
+
// 登录态在 Chrome 里,无法本地检查;这里就是用户点名要跑的那一次。
|
|
202
|
+
rows.push(await checkOne('opencli:' + site, { ...spec, probe: OPENCLI_PROBE.probe }, site, DEFAULT_QUERY[Object.keys(PLATFORM_OF).find(k => PLATFORM_OF[k] === site)] ?? 'DeepSeek', { skipCredentialGate: true }))
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
for (const site of opencliSites) rows.push({ id: 'opencli:' + site, platform: site, status: 'skipped', note: probe.reason ?? 'opencli 不可用' })
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const summary = { date: new Date().toISOString(), node: process.version, platform: os.platform(), count, results: rows }
|
|
210
|
+
fs.writeFileSync(path.join(outDir, 'summary.json'), JSON.stringify(summary, null, 2))
|
|
211
|
+
console.log('\n──────── 汇总 ────────')
|
|
212
|
+
for (const r of rows) console.log(r.id.padEnd(18) + r.status.padEnd(12) + (r.status === 'ok' ? r.resultCount + ' 条' + (r.junk?.length ? ',有 ' + r.junk.length + ' 个问题' : '') : short(r.note, 70)))
|
|
213
|
+
console.log('\n完整结果:' + path.join(outDir, 'summary.json'))
|
|
214
|
+
console.log('把上面的汇总和 summary.json(以及对应的 *.stdout.txt)发给我即可;里面没有 Cookie / Token。')
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { styles as css } from "./styles.js";
|
|
3
|
-
/** Label and hint keys of each rubric text control. */
|
|
4
|
-
const CONTROLS = [
|
|
5
|
-
{ key: 'version', label: 'rubricVersion', hint: 'rubricVersionHint', kind: 'line' },
|
|
6
|
-
{ key: 'instructions', label: 'rubricInstructions', hint: 'rubricInstructionsHint', kind: 'area' },
|
|
7
|
-
{ key: 'criteria', label: 'rubricCriteria', hint: 'rubricCriteriaHint', kind: 'area' },
|
|
8
|
-
{ key: 'maxStateChars', label: 'rubricMaxState', hint: 'rubricMaxStateHint', kind: 'number' },
|
|
9
|
-
{ key: 'maxCandidateChars', label: 'rubricMaxCandidate', hint: 'rubricMaxCandidateHint', kind: 'number' },
|
|
10
|
-
];
|
|
11
|
-
/** The built-in value of a control, shown as the placeholder while the entry leaves it blank. */
|
|
12
|
-
function builtinText(rubric, key) {
|
|
13
|
-
switch (key) {
|
|
14
|
-
case 'version': return rubric.builtin.version;
|
|
15
|
-
case 'instructions': return rubric.builtin.instructions;
|
|
16
|
-
case 'criteria': return rubric.builtin.criteria.join('\n');
|
|
17
|
-
case 'maxStateChars': return String(rubric.builtin.maxStateChars);
|
|
18
|
-
case 'maxCandidateChars': return String(rubric.builtin.maxCandidateChars);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* One built-in rubric: its active version, and an override editor whose controls are views of one staged entry
|
|
23
|
-
* (version, instructions, levels, limits). The problems shown are the ones the server would act on: it ignores an
|
|
24
|
-
* invalid override and uses the built-in, so the card refuses to save one.
|
|
25
|
-
*/
|
|
26
|
-
function Rubric(props) {
|
|
27
|
-
const { t, rubric, disabled } = props;
|
|
28
|
-
const idBase = `web-search-pro-rubric-${rubric.id}`;
|
|
29
|
-
return (_jsxs("div", { className: css.rubric, "data-web-search-pro-rubric": rubric.id, children: [_jsxs("div", { className: css.rubricHead, children: [_jsxs("span", { children: [_jsx("strong", { children: rubric.id }), _jsxs("span", { className: css.badge, children: [t('rubricActive'), ": ", rubric.activeVersion] }), _jsx("span", { className: css.badge, "data-on": rubric.editing || undefined, children: rubric.editing ? t('rubricOverrideOn') : `${t('rubricBuiltin')} ${rubric.builtin.version}` })] }), _jsx("span", { children: rubric.editing
|
|
30
|
-
? _jsx("button", { type: "button", className: css.linkButton, disabled: disabled, onClick: () => { props.restoreRubric(rubric.id); }, children: t('rubricRestore') })
|
|
31
|
-
: _jsx("button", { type: "button", className: css.linkButton, disabled: disabled, onClick: () => { props.startRubric(rubric.id); }, children: t('rubricCreate') }) })] }), _jsx("p", { className: css.hint, children: rubric.description }), rubric.editing ? (_jsx("div", { className: css.grid, children: CONTROLS.filter(control => control.key !== 'criteria' || rubric.kind === 'score').map((control) => {
|
|
32
|
-
const id = `${idBase}-${control.key}`;
|
|
33
|
-
const value = rubric.entry[control.key];
|
|
34
|
-
const common = {
|
|
35
|
-
id, value, disabled, placeholder: builtinText(rubric, control.key), spellCheck: false,
|
|
36
|
-
'aria-invalid': rubric.invalid || undefined,
|
|
37
|
-
};
|
|
38
|
-
return (_jsxs("div", { className: `${css.field} ${control.kind === 'area' ? css.fullRow : ''}`, children: [_jsx("label", { className: css.label, htmlFor: id, children: t(control.label) }), control.kind === 'area'
|
|
39
|
-
? _jsx("textarea", { ...common, className: `${css.input} ${css.textarea} ${css.code}`, rows: control.key === 'criteria' ? 5 : 6, onChange: event => { props.editRubric(rubric.id, control.key, event.currentTarget.value); } })
|
|
40
|
-
: _jsx("input", { ...common, className: css.input, type: "text", inputMode: control.kind === 'number' ? 'numeric' : undefined, onChange: event => { props.editRubric(rubric.id, control.key, event.currentTarget.value); } }), _jsx("p", { className: css.hint, children: t(control.hint) })] }, control.key));
|
|
41
|
-
}) })) : null, rubric.problems.length > 0 ? (_jsx("ul", { className: rubric.invalid ? css.problem : css.warning, role: "alert", "data-web-search-pro-rubric-problems": true, children: rubric.problems.map((problem, index) => _jsx("li", { children: problem }, index)) })) : null] }));
|
|
42
|
-
}
|
|
43
|
-
export function RubricEditor(props) {
|
|
44
|
-
const { t, state } = props;
|
|
45
|
-
return (_jsxs("div", { "data-web-search-pro-rubrics": true, children: [_jsx("p", { className: css.hint, children: t('rubricNotes') }), state.rubrics.map(rubric => _jsx(Rubric, { t: t, rubric: rubric, disabled: props.disabled, editRubric: props.editRubric, startRubric: props.startRubric, restoreRubric: props.restoreRubric }, rubric.id)), state.unknownRubrics.length > 0 ? _jsxs("p", { className: css.warning, role: "note", children: [t('rubricUnknown'), " ", state.unknownRubrics.join(', ')] }) : null] }));
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=RubricEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RubricEditor.js","sourceRoot":"","sources":["../../src/client/RubricEditor.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,IAAI,GAAG,EAAE,MAAM,aAAa,CAAA;AAI3C,uDAAuD;AACvD,MAAM,QAAQ,GAA2I;IACvJ,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE;IACnF,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,MAAM,EAAE;IAClG,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,EAAE;IACtF,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC7F,EAAE,GAAG,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,QAAQ,EAAE;CAC1G,CAAA;AAED,iGAAiG;AACjG,SAAS,WAAW,CAAC,MAAuB,EAAE,GAAkB;IAC9D,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,SAAS,CAAC,CAAC,OA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./styles.js";
|
|
3
|
-
function FieldShell(props) {
|
|
4
|
-
return (_jsxs("div", { className: `${css.field} ${props.state?.invalid ? css.fieldInvalid : ''}`, children: [_jsxs("div", { className: css.fieldHeading, children: [_jsx("label", { className: css.label, htmlFor: props.id, children: props.label }), props.field && props.state?.overridden ? (_jsx("button", { type: "button", className: css.reset, disabled: props.disabled, onClick: () => { props.onReset?.(props.field); }, children: props.resetLabel })) : null] }), props.children, props.state?.message ? _jsx("p", { className: css.problem, role: "alert", "data-web-search-pro-problem": true, children: props.state.message }) : null, _jsx("p", { className: css.hint, children: props.state?.invalid && !props.state.message ? props.invalidLabel : props.hint }), props.state?.warning ? _jsx("p", { className: css.warning, role: "note", "data-web-search-pro-warning": true, children: props.state.warning }) : null] }));
|
|
5
|
-
}
|
|
6
|
-
export function TextField(props) {
|
|
7
|
-
const id = `web-search-pro-${props.field}`;
|
|
8
|
-
return (_jsx(FieldShell, { id: id, label: props.label, hint: props.hint, field: props.field, state: props.state, disabled: props.disabled, resetLabel: props.t('reset'), invalidLabel: props.t('invalid'), onReset: props.reset, children: _jsx("input", { id: id, className: css.input, type: props.type ?? 'text', inputMode: props.type === 'number' ? 'decimal' : undefined, value: props.state.text, placeholder: props.placeholder, disabled: props.disabled, "aria-invalid": props.state.invalid || undefined, onChange: event => { props.edit(props.field, event.currentTarget.value); } }) }));
|
|
9
|
-
}
|
|
10
|
-
export function JsonField(props) {
|
|
11
|
-
const id = `web-search-pro-${props.field}`;
|
|
12
|
-
return (_jsx(FieldShell, { id: id, label: props.label, hint: props.hint, field: props.field, state: props.state, disabled: props.disabled, resetLabel: props.t('reset'), invalidLabel: props.t('invalidJson'), onReset: props.reset, children: _jsx("textarea", { id: id, className: `${css.input} ${css.textarea} ${css.code}`, rows: props.rows ?? 5, value: props.state.text, disabled: props.disabled, spellCheck: false, "aria-invalid": props.state.invalid || undefined, onChange: event => { props.edit(props.field, event.currentTarget.value); } }) }));
|
|
13
|
-
}
|
|
14
|
-
export function SelectField(props) {
|
|
15
|
-
const id = `web-search-pro-${props.field}`;
|
|
16
|
-
// A stored value no option names (a provider id of a settings file the draft no longer defines) stays selectable, so it is never lost silently.
|
|
17
|
-
const known = props.options.some(option => option.value === props.state.text);
|
|
18
|
-
return (_jsx(FieldShell, { id: id, label: props.label, hint: props.hint, field: props.field, state: props.state, disabled: props.disabled, resetLabel: props.t('reset'), invalidLabel: props.t('invalid'), onReset: props.reset, children: _jsxs("select", { id: id, className: `${css.input} ${css.select}`, value: props.state.text, disabled: props.disabled, "aria-invalid": props.state.invalid || undefined, onChange: event => { props.edit(props.field, event.currentTarget.value); }, children: [props.emptyLabel !== undefined ? _jsx("option", { value: "", children: props.emptyLabel }) : null, !known && props.state.text !== '' ? _jsx("option", { value: props.state.text, children: props.state.text }) : null, props.options.map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] }) }));
|
|
19
|
-
}
|
|
20
|
-
export function ToggleField(props) {
|
|
21
|
-
const checked = props.state.text === 'true';
|
|
22
|
-
return (_jsxs("div", { className: css.toggleField, children: [_jsxs("label", { className: css.toggleLabel, children: [_jsx("input", { id: `web-search-pro-${props.field}`, className: css.checkbox, type: "checkbox", checked: checked, disabled: props.disabled, onChange: event => { props.edit(props.field, String(event.currentTarget.checked)); } }), _jsxs("span", { className: css.toggleCopy, children: [_jsx("span", { className: css.label, children: props.label }), _jsx("span", { className: css.hint, children: props.hint }), props.state.message ? _jsx("span", { className: css.problem, role: "alert", children: props.state.message }) : null, props.state.warning ? _jsx("span", { className: css.warning, role: "note", children: props.state.warning }) : null] })] }), props.state.overridden ? (_jsx("button", { type: "button", className: css.reset, disabled: props.disabled, onClick: () => { props.reset(props.field); }, children: props.t('reset') })) : null] }));
|
|
23
|
-
}
|
|
24
|
-
export function CredentialField(props) {
|
|
25
|
-
const inputId = `web-search-pro-credential-${props.id}`;
|
|
26
|
-
const status = props.state.loading
|
|
27
|
-
? props.t('credentialChecking')
|
|
28
|
-
: props.state.configured ? props.t('credentialSet') : props.t('credentialUnset');
|
|
29
|
-
return (_jsx(FieldShell, { id: inputId, label: props.label, hint: props.hint, disabled: props.disabled || !props.state.writable, resetLabel: props.t('reset'), invalidLabel: props.t('invalid'), children: _jsxs("div", { className: css.secretRow, children: [_jsx("input", { id: inputId, className: css.input, type: "password", autoComplete: "new-password", value: props.state.text, placeholder: status, disabled: props.disabled || !props.state.writable, onChange: event => { props.edit(props.id, event.currentTarget.value); } }), _jsx("span", { className: css.credentialStatus, "data-configured": props.state.configured ? 'true' : undefined, children: status })] }) }));
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=fields.js.map
|
package/lib/client/fields.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/client/fields.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,IAAI,GAAG,EAAE,MAAM,aAAa,CAAA;AAc3C,SAAS,UAAU,CAAC,KAAsB;IACxC,OAAO,CACL,eAAK,SAAS,EAAE,GAAG,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,aAC5E,eAAK,SAAS,EAAE,GAAG,CAAC,YAAY,aAC9B,gBAAO,SAAS,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,YAAG,KAAK,CAAC,KAAK,GAAS,EACpE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CACxC,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,GAAG,CAAC,KAAK,EACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAqB,CAAC,CAAA,CAAC,CAAC,YAE9D,KAAK,CAAC,UAAU,GACV,CACV,C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AAO,EACX,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EACjD,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,EAC5B,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,YAEhC,eAAK,SAAS,EAAE,GAAG,CAAC,SAAS,aAC3B,gBACE,EAAE,EAAE,OAAO,EACX,SAAS,EAAE,GAAG,CAAC,KAAK,EACpB,IAAI,EAAC,UAAU,EACf,YAAY,EAAC,cAAc,EAC3B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EACvB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EACjD,QAAQ,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA,CAAC,CAAC,GACtE,EACF,eAAM,SAAS,EAAE,GAAG,CAAC,gBAAgB,qBAAmB,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAAG,MAAM,GAAQ,IAChH,GACK,CACd,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { WebSearchCardState } from './form.ts';
|
|
2
|
-
import type { SettingsCardProps } from './index.ts';
|
|
3
|
-
export declare function RubricEditor(props: Pick<SettingsCardProps, 't' | 'editRubric' | 'startRubric' | 'restoreRubric'> & {
|
|
4
|
-
state: WebSearchCardState;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
}): import("react").JSX.Element;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { CredentialId, CardFieldState, SettingField } from './form.ts';
|
|
2
|
-
import type { SettingsCardProps } from './index.ts';
|
|
3
|
-
export declare function TextField(props: {
|
|
4
|
-
field: SettingField;
|
|
5
|
-
state: CardFieldState;
|
|
6
|
-
label: string;
|
|
7
|
-
hint: string;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
t: SettingsCardProps['t'];
|
|
10
|
-
edit: SettingsCardProps['edit'];
|
|
11
|
-
reset: SettingsCardProps['resetField'];
|
|
12
|
-
type?: 'text' | 'number';
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
}): import("react").JSX.Element;
|
|
15
|
-
export declare function JsonField(props: {
|
|
16
|
-
field: SettingField;
|
|
17
|
-
state: CardFieldState;
|
|
18
|
-
label: string;
|
|
19
|
-
hint: string;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
rows?: number;
|
|
22
|
-
t: SettingsCardProps['t'];
|
|
23
|
-
edit: SettingsCardProps['edit'];
|
|
24
|
-
reset: SettingsCardProps['resetField'];
|
|
25
|
-
}): import("react").JSX.Element;
|
|
26
|
-
export declare function SelectField(props: {
|
|
27
|
-
field: SettingField;
|
|
28
|
-
state: CardFieldState;
|
|
29
|
-
label: string;
|
|
30
|
-
hint: string;
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
/** `value` is what is stored; an empty value is offered as `emptyLabel` (the default applies). */
|
|
33
|
-
options: readonly {
|
|
34
|
-
value: string;
|
|
35
|
-
label: string;
|
|
36
|
-
}[];
|
|
37
|
-
emptyLabel?: string;
|
|
38
|
-
t: SettingsCardProps['t'];
|
|
39
|
-
edit: SettingsCardProps['edit'];
|
|
40
|
-
reset: SettingsCardProps['resetField'];
|
|
41
|
-
}): import("react").JSX.Element;
|
|
42
|
-
export declare function ToggleField(props: {
|
|
43
|
-
field: SettingField;
|
|
44
|
-
state: CardFieldState;
|
|
45
|
-
label: string;
|
|
46
|
-
hint: string;
|
|
47
|
-
disabled: boolean;
|
|
48
|
-
t: SettingsCardProps['t'];
|
|
49
|
-
edit: SettingsCardProps['edit'];
|
|
50
|
-
reset: SettingsCardProps['resetField'];
|
|
51
|
-
}): import("react").JSX.Element;
|
|
52
|
-
export declare function CredentialField(props: {
|
|
53
|
-
id: CredentialId;
|
|
54
|
-
label: string;
|
|
55
|
-
hint: string;
|
|
56
|
-
state: {
|
|
57
|
-
text: string;
|
|
58
|
-
configured: boolean;
|
|
59
|
-
writable: boolean;
|
|
60
|
-
loading: boolean;
|
|
61
|
-
};
|
|
62
|
-
disabled: boolean;
|
|
63
|
-
t: SettingsCardProps['t'];
|
|
64
|
-
edit: SettingsCardProps['editCredential'];
|
|
65
|
-
}): import("react").JSX.Element;
|