@sqdr2/dsh-agent-studio-fusion 1.0.0 → 1.0.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.
- package/CHANGELOG.md +25 -0
- package/RELEASING.md +19 -4
- package/RELEASING.zh.md +19 -4
- package/lib/client.js +6569 -5867
- package/lib/client.js.map +1 -7
- package/lib/dsh-agent-studio-fusion.js +29190 -25628
- package/lib/types/host/acp/config.d.ts +11 -2
- package/lib/types/host/acp/types.d.ts +9 -1
- package/package.json +2 -1
- package/src/host/acp/agent-process.ts +1 -1
- package/src/host/acp/config.ts +15 -3
- package/src/host/acp/types.ts +9 -1
|
@@ -12,10 +12,19 @@ export declare const DEFAULT_CONTEXT_WINDOW = 200000;
|
|
|
12
12
|
export declare const AcpAgentProfileSchema: z<AcpAgentProfile>;
|
|
13
13
|
/** The `acp` block: `acp.agents` maps a provider route id to its profile. */
|
|
14
14
|
export declare const AcpConfigSchema: z<AcpConfig>;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Read the configured profiles; an absent block is an empty map, never an error.
|
|
17
|
+
*
|
|
18
|
+
* `agents` is declared volatile so the Host publishes a live-editable settings form, and
|
|
19
|
+
* a parsed Config therefore carries a `Volatile` reference there rather than the map. The
|
|
20
|
+
* reference is a `{ get() }` object whose only own key is `get`, so `Object.entries` over
|
|
21
|
+
* it yields the single route `"get"` — that route then reached the model catalog as a
|
|
22
|
+
* provider with an undefined profile, failing as `profile.models.length`. Unwrap the
|
|
23
|
+
* reference (and any plain value, for callers that hand in raw settings) before reading.
|
|
24
|
+
*/
|
|
16
25
|
export declare function agentsOf(config: {
|
|
17
26
|
acp?: {
|
|
18
|
-
agents?:
|
|
27
|
+
agents?: unknown;
|
|
19
28
|
};
|
|
20
29
|
} | undefined): ReadonlyMap<string, AcpAgentProfile>;
|
|
21
30
|
export declare function spawnFacts(profile: AcpAgentProfile): string;
|
|
@@ -38,7 +38,15 @@ export interface AcpAgentProfile {
|
|
|
38
38
|
startupTimeoutMs: number;
|
|
39
39
|
idleTimeoutMs: number;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* The `acp` configuration block: one profile per provider route.
|
|
43
|
+
*
|
|
44
|
+
* `agents` is declared volatile so the Host publishes a live-editable settings form, so a
|
|
45
|
+
* parsed Config carries a `{ get() }` reference at that key rather than a plain map. Read it
|
|
46
|
+
* through `agentsOf()`; `Object.entries(config.acp.agents)` sees only the reference's own
|
|
47
|
+
* `get` method. The type below describes the declared (input) shape, which is what the
|
|
48
|
+
* schema validates.
|
|
49
|
+
*/
|
|
42
50
|
export interface AcpConfig {
|
|
43
51
|
agents: Record<string, AcpAgentProfile>;
|
|
44
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqdr2/dsh-agent-studio-fusion",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
80
|
+
"@deepseek-ai/cosmokit": "~1.8.5",
|
|
80
81
|
"qrcode": "^1.5.4",
|
|
81
82
|
"undici": "^8.10.0"
|
|
82
83
|
},
|
|
@@ -536,7 +536,7 @@ export class AcpAgentProcess {
|
|
|
536
536
|
connection.agent.request(methods.agent.initialize, {
|
|
537
537
|
protocolVersion: PROTOCOL_VERSION,
|
|
538
538
|
clientCapabilities: {},
|
|
539
|
-
clientInfo: { name: PLUGIN_ID, version: '1.0.
|
|
539
|
+
clientInfo: { name: PLUGIN_ID, version: '1.0.1' },
|
|
540
540
|
}),
|
|
541
541
|
exited,
|
|
542
542
|
timeout,
|
package/src/host/acp/config.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import z from '@deepseek-ai/schemastery'
|
|
9
|
+
import { isVolatile } from '@deepseek-ai/cosmokit'
|
|
9
10
|
import type { AcpAgentProfile, AcpConfig, AcpModelProfile } from './types.js'
|
|
10
11
|
|
|
11
12
|
export const DEFAULT_MODEL_ID = 'default'
|
|
@@ -47,9 +48,20 @@ export const AcpConfigSchema: z<AcpConfig> = z.object({
|
|
|
47
48
|
agents: z.dict(AcpAgentProfileSchema).default({}).volatile() as unknown as z<Record<string, AcpAgentProfile>>,
|
|
48
49
|
})
|
|
49
50
|
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Read the configured profiles; an absent block is an empty map, never an error.
|
|
53
|
+
*
|
|
54
|
+
* `agents` is declared volatile so the Host publishes a live-editable settings form, and
|
|
55
|
+
* a parsed Config therefore carries a `Volatile` reference there rather than the map. The
|
|
56
|
+
* reference is a `{ get() }` object whose only own key is `get`, so `Object.entries` over
|
|
57
|
+
* it yields the single route `"get"` — that route then reached the model catalog as a
|
|
58
|
+
* provider with an undefined profile, failing as `profile.models.length`. Unwrap the
|
|
59
|
+
* reference (and any plain value, for callers that hand in raw settings) before reading.
|
|
60
|
+
*/
|
|
61
|
+
export function agentsOf(config: { acp?: { agents?: unknown } } | undefined): ReadonlyMap<string, AcpAgentProfile> {
|
|
62
|
+
const agents = config?.acp?.agents
|
|
63
|
+
const plain: unknown = isVolatile(agents) ? agents.get() : agents
|
|
64
|
+
return new Map(Object.entries(plain ?? {}) as [string, AcpAgentProfile][])
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
export function spawnFacts(profile: AcpAgentProfile): string {
|
package/src/host/acp/types.ts
CHANGED
|
@@ -44,7 +44,15 @@ export interface AcpAgentProfile {
|
|
|
44
44
|
idleTimeoutMs: number
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The `acp` configuration block: one profile per provider route.
|
|
49
|
+
*
|
|
50
|
+
* `agents` is declared volatile so the Host publishes a live-editable settings form, so a
|
|
51
|
+
* parsed Config carries a `{ get() }` reference at that key rather than a plain map. Read it
|
|
52
|
+
* through `agentsOf()`; `Object.entries(config.acp.agents)` sees only the reference's own
|
|
53
|
+
* `get` method. The type below describes the declared (input) shape, which is what the
|
|
54
|
+
* schema validates.
|
|
55
|
+
*/
|
|
48
56
|
export interface AcpConfig {
|
|
49
57
|
agents: Record<string, AcpAgentProfile>
|
|
50
58
|
}
|