@huaweidevtools/aishell-dsh-huaweicloud-docs 0.0.14 → 0.0.16
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/README.md +4 -6
- package/lib/index.js +13 -13
- package/lib/types/index.d.ts +19 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,13 +20,9 @@ authority.
|
|
|
20
20
|
|
|
21
21
|
The index itself is ~35 KB of product names — real value, but a per-turn cost of roughly 9k tokens, of which any one task needs a single entry. So the section carries the pointer, and the model fetches the index — and then the one product under it — with the web-fetch tool it already has. That is the shape `llms.txt` exists for.
|
|
22
22
|
|
|
23
|
-
The URL answers: `https://support.huaweicloud.com/llms.txt` returns the index as `text/plain` (~35 KB), and each product entry links to that product's own file — ECS, for one, resolves to ~500 KB of real documentation. `web_fetch`'s User-Agent is `deepseek-harness/0.0.1 (+https://github.com/deepseek-ai)`.
|
|
24
|
-
|
|
25
|
-
That User-Agent is not something the model can set. `web_fetch` exposes no header parameter — the value is a plugin `Config` field (`userAgent`) defaulting to the constant above. So any instruction to fetch with a particular browser User-Agent is unactionable for the model, and this package issues none.
|
|
26
|
-
|
|
27
23
|
## Where it sits in the prompt
|
|
28
24
|
|
|
29
|
-
Early — immediately after the deployment persona prefix, ahead of every policy and tool section. Background knowledge
|
|
25
|
+
Early — immediately after the deployment persona prefix, ahead of every policy and tool section. Background knowledge belongs before the model starts planning, rather than arriving once it has already reached the tool list.
|
|
30
26
|
|
|
31
27
|
Measured against the real `SystemPrompt` service, the assembled prompt reads:
|
|
32
28
|
|
|
@@ -39,7 +35,9 @@ tool:* 1000+
|
|
|
39
35
|
deployment:persona-suffix 10200
|
|
40
36
|
```
|
|
41
37
|
|
|
42
|
-
So it lands inside the persona envelope (the prefix opens at `0`, the suffix closes at `10200`) and before every policy and tool slot.
|
|
38
|
+
So it lands inside the persona envelope (the prefix opens at `0`, the suffix closes at `10200`) and before every policy and tool slot.
|
|
39
|
+
|
|
40
|
+
The position is a number (`HUAWEICLOUD_DOCS_ORDER = 100`) rather than one of the framework's named slots, because its placement table is closed: `PromptSectionOrderName` is `keyof` a fixed constant, so a `HUAWEICLOUD_DOCS` name has nowhere to go. The table leaves the gap between `0` and `500` empty, and `100` sits inside it. The orders bracketing that gap are the only two available — below `0` is before the persona opens, and at or above `500` is inside the policy band, where background reads as an instruction.
|
|
43
41
|
|
|
44
42
|
A section rather than a runtime context because the URL never changes. `context()` is for facts that flip — the read-only policy uses it for exactly that reason — and a constant belongs in a section.
|
|
45
43
|
|
package/lib/index.js
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Position of the documentation pointer in the assembled prompt.
|
|
4
4
|
*
|
|
5
|
-
* A number
|
|
6
|
-
* `PromptSectionOrderName` is `keyof` a fixed
|
|
7
|
-
* `getSectionOrder('HUAWEICLOUD_DOCS')`
|
|
8
|
-
* slot for product-domain background.
|
|
9
|
-
* that table, so this is the one place this package departs from them.
|
|
5
|
+
* A number rather than one of the framework's named slots, because its
|
|
6
|
+
* placement table is closed: `PromptSectionOrderName` is `keyof` a fixed
|
|
7
|
+
* constant, so `getSectionOrder('HUAWEICLOUD_DOCS')` returns `undefined` —
|
|
8
|
+
* there is no slot for product-domain background.
|
|
10
9
|
*
|
|
11
|
-
* The table
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* The table leaves the gap between the persona prefix (0) and the first policy
|
|
11
|
+
* (500) empty, and 100 sits inside it. The two orders that bracket that gap are
|
|
12
|
+
* the only two that exist: below 0 is before the persona opens, which is before
|
|
13
|
+
* `harness:identity` at -1000 — ahead of the prompt having said what it is —
|
|
14
|
+
* and at or above 500 is inside the policy band, where background reads as an
|
|
15
|
+
* instruction. 100 puts this after the persona opens and before anything the
|
|
16
|
+
* model is asked to reason about.
|
|
17
17
|
*/
|
|
18
18
|
const HUAWEICLOUD_DOCS_ORDER = 100;
|
|
19
19
|
/** Name this contribution registers under; unique across the assembled prompt. */
|
|
@@ -23,8 +23,8 @@ const DOCS_INDEX_URL = "https://support.huaweicloud.com/llms.txt";
|
|
|
23
23
|
/**
|
|
24
24
|
* What the model reads.
|
|
25
25
|
*
|
|
26
|
-
* The last sentence
|
|
27
|
-
*
|
|
26
|
+
* The last sentence carries the weight: a model asked about a product's quotas
|
|
27
|
+
* or billing answers from memory unless told not to, and those numbers move
|
|
28
28
|
* between releases. Naming the authority is what makes the pointer worth
|
|
29
29
|
* carrying.
|
|
30
30
|
*/
|
package/lib/types/index.d.ts
CHANGED
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
* ## Where it sits in the prompt
|
|
23
23
|
*
|
|
24
24
|
* Early: immediately after the deployment persona prefix, ahead of every policy
|
|
25
|
-
* and tool section. Background knowledge
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* and tool section. Background knowledge belongs before the model starts
|
|
26
|
+
* planning — it should know where to look things up, not discover it once it has
|
|
27
|
+
* reached the tool list.
|
|
28
28
|
*
|
|
29
|
-
* Measured
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Measured against the real `SystemPrompt` service, the assembled prompt reads
|
|
30
|
+
* `harness:identity`, the persona prefix, this section, then the policy and
|
|
31
|
+
* tool slots, then the persona suffix.
|
|
32
32
|
*
|
|
33
33
|
* @module @huaweidevtools/aishell-dsh-huaweicloud-docs
|
|
34
34
|
*/
|
|
@@ -36,18 +36,18 @@ import type { Context } from '@deepseek-ai/cordis';
|
|
|
36
36
|
/**
|
|
37
37
|
* Position of the documentation pointer in the assembled prompt.
|
|
38
38
|
*
|
|
39
|
-
* A number
|
|
40
|
-
* `PromptSectionOrderName` is `keyof` a fixed
|
|
41
|
-
* `getSectionOrder('HUAWEICLOUD_DOCS')`
|
|
42
|
-
* slot for product-domain background.
|
|
43
|
-
* that table, so this is the one place this package departs from them.
|
|
39
|
+
* A number rather than one of the framework's named slots, because its
|
|
40
|
+
* placement table is closed: `PromptSectionOrderName` is `keyof` a fixed
|
|
41
|
+
* constant, so `getSectionOrder('HUAWEICLOUD_DOCS')` returns `undefined` —
|
|
42
|
+
* there is no slot for product-domain background.
|
|
44
43
|
*
|
|
45
|
-
* The table
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
44
|
+
* The table leaves the gap between the persona prefix (0) and the first policy
|
|
45
|
+
* (500) empty, and 100 sits inside it. The two orders that bracket that gap are
|
|
46
|
+
* the only two that exist: below 0 is before the persona opens, which is before
|
|
47
|
+
* `harness:identity` at -1000 — ahead of the prompt having said what it is —
|
|
48
|
+
* and at or above 500 is inside the policy band, where background reads as an
|
|
49
|
+
* instruction. 100 puts this after the persona opens and before anything the
|
|
50
|
+
* model is asked to reason about.
|
|
51
51
|
*/
|
|
52
52
|
export declare const HUAWEICLOUD_DOCS_ORDER = 100;
|
|
53
53
|
/** Name this contribution registers under; unique across the assembled prompt. */
|
|
@@ -57,8 +57,8 @@ export declare const DOCS_INDEX_URL = "https://support.huaweicloud.com/llms.txt"
|
|
|
57
57
|
/**
|
|
58
58
|
* What the model reads.
|
|
59
59
|
*
|
|
60
|
-
* The last sentence
|
|
61
|
-
*
|
|
60
|
+
* The last sentence carries the weight: a model asked about a product's quotas
|
|
61
|
+
* or billing answers from memory unless told not to, and those numbers move
|
|
62
62
|
* between releases. Naming the authority is what makes the pointer worth
|
|
63
63
|
* carrying.
|
|
64
64
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huaweidevtools/aishell-dsh-huaweicloud-docs",
|
|
3
3
|
"description": "Points DSH's model at Huawei Cloud's product documentation index (support.huaweicloud.com/llms.txt)",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|