@scotthuang/agent-knock-knock-deepseek-harness 0.1.0-rc.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/LICENSE +21 -0
- package/README.md +120 -0
- package/cordis.patch.yml +4 -0
- package/lib/callback-helper.d.ts +14 -0
- package/lib/callback-helper.js +122 -0
- package/lib/callback-helper.js.map +1 -0
- package/lib/constants.d.ts +20 -0
- package/lib/constants.js +26 -0
- package/lib/constants.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.js +310 -0
- package/lib/index.js.map +1 -0
- package/lib/ipc.d.ts +23 -0
- package/lib/ipc.js +212 -0
- package/lib/ipc.js.map +1 -0
- package/lib/profile.d.ts +18 -0
- package/lib/profile.js +144 -0
- package/lib/profile.js.map +1 -0
- package/lib/routes.d.ts +48 -0
- package/lib/routes.js +149 -0
- package/lib/routes.js.map +1 -0
- package/lib/schema-adapter.d.ts +12 -0
- package/lib/schema-adapter.js +98 -0
- package/lib/schema-adapter.js.map +1 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agent Knock Knock contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
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/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Agent Knock Knock for DeepSeek Harness
|
|
2
|
+
|
|
3
|
+
This package is the native DeepSeek Harness Web connector for Agent Knock
|
|
4
|
+
Knock (AKK). Installing the bundle adds `/akk` and the 16 AKK semantic tools to
|
|
5
|
+
every live Agent immediately. There is no `/akk-bind` step and no session id for
|
|
6
|
+
the user to copy.
|
|
7
|
+
|
|
8
|
+
The connector is developed in the AKK repository but is an independent npm
|
|
9
|
+
package. It does not modify DeepSeek Harness and has its own version, build,
|
|
10
|
+
tests, lockfile, bundle manifest, and future release tag.
|
|
11
|
+
|
|
12
|
+
## Compatibility
|
|
13
|
+
|
|
14
|
+
The first release intentionally supports exactly DeepSeek Harness
|
|
15
|
+
`0.1.1-rc.2` on the resident Web Host and Node.js `>=22.19.0`. Activation locates
|
|
16
|
+
the real `@deepseek-ai/dsh` launcher and requires that launcher plus its
|
|
17
|
+
`dsh-agent`, `dsh-commands`, `dsh-llm`, and `dsh-tools` package set to be exact
|
|
18
|
+
`0.1.1-rc.2`; an unsupported, missing, or split Host fails before mounting.
|
|
19
|
+
|
|
20
|
+
Headless/one-shot Harness processes, Host-exit callback continuity, and Windows
|
|
21
|
+
named pipes are not supported in this release.
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Once this connector has been published, add its bundle to the Web profile:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
dsh plugin --profile web add @scotthuang/agent-knock-knock-deepseek-harness@next
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For development in this repository, build the AKK root package and this child
|
|
32
|
+
package, then add the child directory with the DeepSeek Harness plugin command.
|
|
33
|
+
The published connector depends on the exact AKK runtime version `0.12.16` so
|
|
34
|
+
the Host Adapter API it was tested against cannot drift unexpectedly.
|
|
35
|
+
|
|
36
|
+
The optional bundle patch mounts only the Host plugin:
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
- insert:
|
|
40
|
+
- id: agent-knock-knock-deepseek-harness
|
|
41
|
+
name: '@scotthuang/agent-knock-knock-deepseek-harness'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Runtime model
|
|
45
|
+
|
|
46
|
+
- A slash-command invocation receives the exact DSH `Agent` from the command
|
|
47
|
+
service; a tool invocation receives the exact `exec.agent` from the tools
|
|
48
|
+
service.
|
|
49
|
+
- The connector validates `ctx.agents.get(agent.id) === agent` and creates a
|
|
50
|
+
private controller id containing a Host-instance nonce, an Agent-incarnation
|
|
51
|
+
nonce, and that Agent's id. Replacing an Agent with the same session id does
|
|
52
|
+
not inherit its route.
|
|
53
|
+
- One shared AKK lifecycle service runs per DSH Host. The root AKK Host Adapter
|
|
54
|
+
retains one private tool/command authority registry per exact Agent object.
|
|
55
|
+
- DSH receives a discovery schema projected into its enforced rc.2 subset.
|
|
56
|
+
Before a tool can reach the Host Adapter, the connector validates its input
|
|
57
|
+
against the complete original AKK JSON Schema, including conditional,
|
|
58
|
+
pattern, and numeric constraints that DSH discovery cannot represent.
|
|
59
|
+
- A private `0700` temporary directory contains the route-bound Host Profile
|
|
60
|
+
and Unix socket. The callback helper is launched with `process.execPath`; its
|
|
61
|
+
socket path and random token are inherited through an allowlisted environment
|
|
62
|
+
and never placed in command arguments.
|
|
63
|
+
- Completion callbacks go to the initiating Agent's route. A running Agent
|
|
64
|
+
receives `inject()` and an idle Agent receives `followup()`.
|
|
65
|
+
- The synchronous callback acknowledgement means the message was admitted to
|
|
66
|
+
the DSH inbox/session log. It does not claim that the model consumed the
|
|
67
|
+
message or that asynchronous persistence reached stable storage. AKK
|
|
68
|
+
`watch`/`status` remain the recovery path.
|
|
69
|
+
- A Host restart creates a new private Profile revision. A Terminal Watch
|
|
70
|
+
persists its complete initiating route, so callbacks owned by the previous
|
|
71
|
+
Host incarnation fail closed instead of being redirected to a new Agent.
|
|
72
|
+
There is deliberately no cross-restart callback continuity in this release;
|
|
73
|
+
inspect it with `status`, or `unwatch` it and create a fresh `watch` under
|
|
74
|
+
the new Host incarnation.
|
|
75
|
+
- Exact, process-lifetime idempotency records return the original acceptance id
|
|
76
|
+
for a duplicate. Reusing one idempotency key for different callback content
|
|
77
|
+
is rejected.
|
|
78
|
+
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
The connector accepts an optional lifecycle cadence and the existing AKK plugin
|
|
82
|
+
configuration object:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
- id: agent-knock-knock-deepseek-harness
|
|
86
|
+
name: '@scotthuang/agent-knock-knock-deepseek-harness'
|
|
87
|
+
config:
|
|
88
|
+
lifecycleIntervalMs: 5000
|
|
89
|
+
pluginConfig:
|
|
90
|
+
storeDir: /absolute/path/to/akk-store
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Development
|
|
94
|
+
|
|
95
|
+
Only the fast test tier is used during development:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
npm install
|
|
99
|
+
npm run typecheck
|
|
100
|
+
npm run test:fast
|
|
101
|
+
npm run pack:check
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
No connector package is published by these commands.
|
|
105
|
+
|
|
106
|
+
## Release safety
|
|
107
|
+
|
|
108
|
+
`npm run release:check` is check-only. The script rejects a dirty tree, a
|
|
109
|
+
non-`main` branch, an unsynchronized upstream, an existing npm version, and any
|
|
110
|
+
runtime `file:`, `link:`, or `workspace:` dependency.
|
|
111
|
+
|
|
112
|
+
Publishing additionally requires both explicit flags:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
npm run release:check -- --publish --confirm-version 0.1.0-rc.1
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Prereleases use npm tag `next`; stable versions use `latest`. Repository tags
|
|
119
|
+
and GitHub Releases use the connector-specific namespace
|
|
120
|
+
`deepseek-harness-v<version>` and are created separately after npm verification.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CallbackAcknowledgement } from "./routes.js";
|
|
2
|
+
export interface CallbackHelperArguments {
|
|
3
|
+
readonly controllerId: string;
|
|
4
|
+
readonly deliveryId: string;
|
|
5
|
+
readonly messageId: string;
|
|
6
|
+
readonly idempotencyKey: string;
|
|
7
|
+
}
|
|
8
|
+
/** Execute the Profile callback helper without exposing IPC authority in argv. */
|
|
9
|
+
export declare function runCallbackHelper(options: {
|
|
10
|
+
readonly arguments: CallbackHelperArguments;
|
|
11
|
+
readonly body: string;
|
|
12
|
+
readonly environment: Readonly<NodeJS.ProcessEnv>;
|
|
13
|
+
}): Promise<CallbackAcknowledgement>;
|
|
14
|
+
export declare function parseCallbackHelperArguments(argv: readonly string[]): CallbackHelperArguments;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { CALLBACK_MAX_REQUEST_BYTES, CALLBACK_SOCKET_ENV, CALLBACK_TOKEN_ENV, } from "./constants.js";
|
|
5
|
+
import { sendCallbackOverIpc } from "./ipc.js";
|
|
6
|
+
/** Execute the Profile callback helper without exposing IPC authority in argv. */
|
|
7
|
+
export async function runCallbackHelper(options) {
|
|
8
|
+
const socketPath = requiredEnvironment(options.environment[CALLBACK_SOCKET_ENV], CALLBACK_SOCKET_ENV);
|
|
9
|
+
const token = requiredEnvironment(options.environment[CALLBACK_TOKEN_ENV], CALLBACK_TOKEN_ENV);
|
|
10
|
+
const request = {
|
|
11
|
+
...options.arguments,
|
|
12
|
+
body: options.body,
|
|
13
|
+
token,
|
|
14
|
+
};
|
|
15
|
+
const response = await sendCallbackOverIpc({ socketPath, request });
|
|
16
|
+
return {
|
|
17
|
+
request: {
|
|
18
|
+
delivery_id: options.arguments.deliveryId,
|
|
19
|
+
message_id: options.arguments.messageId,
|
|
20
|
+
},
|
|
21
|
+
result: {
|
|
22
|
+
status: response.status,
|
|
23
|
+
...(response.acceptanceId ? { acceptance_id: response.acceptanceId } : {}),
|
|
24
|
+
...(response.errorCode ? { error_code: response.errorCode } : {}),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export function parseCallbackHelperArguments(argv) {
|
|
29
|
+
const values = new Map();
|
|
30
|
+
const supported = new Set([
|
|
31
|
+
"--controller-id",
|
|
32
|
+
"--delivery-id",
|
|
33
|
+
"--message-id",
|
|
34
|
+
"--idempotency-key",
|
|
35
|
+
]);
|
|
36
|
+
for (let index = 0; index < argv.length; index += 2) {
|
|
37
|
+
const flag = argv[index];
|
|
38
|
+
const value = argv[index + 1];
|
|
39
|
+
if (!flag || !supported.has(flag) || !value || values.has(flag)) {
|
|
40
|
+
throw new Error("invalid AKK callback helper arguments");
|
|
41
|
+
}
|
|
42
|
+
values.set(flag, value);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
controllerId: requiredArgument(values, "--controller-id"),
|
|
46
|
+
deliveryId: requiredArgument(values, "--delivery-id"),
|
|
47
|
+
messageId: requiredArgument(values, "--message-id"),
|
|
48
|
+
idempotencyKey: requiredArgument(values, "--idempotency-key"),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
async function main() {
|
|
52
|
+
let parsed;
|
|
53
|
+
try {
|
|
54
|
+
parsed = parseCallbackHelperArguments(process.argv.slice(2));
|
|
55
|
+
const body = await readStandardInput();
|
|
56
|
+
const acknowledgement = await runCallbackHelper({
|
|
57
|
+
arguments: parsed,
|
|
58
|
+
body,
|
|
59
|
+
environment: process.env,
|
|
60
|
+
});
|
|
61
|
+
process.stdout.write(`${JSON.stringify(acknowledgement)}\n`);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
if (parsed) {
|
|
65
|
+
const fallback = {
|
|
66
|
+
request: {
|
|
67
|
+
delivery_id: parsed.deliveryId,
|
|
68
|
+
message_id: parsed.messageId,
|
|
69
|
+
},
|
|
70
|
+
result: {
|
|
71
|
+
status: "retry",
|
|
72
|
+
error_code: "callback_ipc_unavailable",
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
process.stdout.write(`${JSON.stringify(fallback)}\n`);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
process.stderr.write("agent-knock-knock callback helper configuration is invalid\n");
|
|
79
|
+
process.exitCode = 2;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function readStandardInput() {
|
|
83
|
+
const chunks = [];
|
|
84
|
+
let bytes = 0;
|
|
85
|
+
for await (const chunk of process.stdin) {
|
|
86
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
87
|
+
bytes += buffer.length;
|
|
88
|
+
if (bytes > CALLBACK_MAX_REQUEST_BYTES) {
|
|
89
|
+
throw new Error("AKK callback body exceeded its limit");
|
|
90
|
+
}
|
|
91
|
+
chunks.push(buffer);
|
|
92
|
+
}
|
|
93
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
94
|
+
}
|
|
95
|
+
function requiredArgument(values, flag) {
|
|
96
|
+
const value = values.get(flag);
|
|
97
|
+
if (!value || value.trim() !== value) {
|
|
98
|
+
throw new Error(`missing ${flag}`);
|
|
99
|
+
}
|
|
100
|
+
return value;
|
|
101
|
+
}
|
|
102
|
+
function requiredEnvironment(value, name) {
|
|
103
|
+
if (!value || value.trim() !== value) {
|
|
104
|
+
throw new Error(`missing ${name}`);
|
|
105
|
+
}
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
if (isDirectExecution()) {
|
|
109
|
+
void main();
|
|
110
|
+
}
|
|
111
|
+
function isDirectExecution() {
|
|
112
|
+
if (!process.argv[1])
|
|
113
|
+
return false;
|
|
114
|
+
try {
|
|
115
|
+
return fs.realpathSync(fileURLToPath(import.meta.url)) ===
|
|
116
|
+
fs.realpathSync(process.argv[1]);
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=callback-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callback-helper.js","sourceRoot":"","sources":["../src/callback-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU/C,kFAAkF;AAClF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAIvC;IACC,MAAM,UAAU,GAAG,mBAAmB,CACpC,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,EACxC,mBAAmB,CACpB,CAAC;IACF,MAAM,KAAK,GAAG,mBAAmB,CAC/B,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,EACvC,kBAAkB,CACnB,CAAC;IACF,MAAM,OAAO,GAAG;QACd,GAAG,OAAO,CAAC,SAAS;QACpB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK;KACN,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,OAAO;QACL,OAAO,EAAE;YACP,WAAW,EAAE,OAAO,CAAC,S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C;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpD,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const CONNECTOR_NAME = "agent-knock-knock-deepseek-harness";
|
|
2
|
+
export declare const CONNECTOR_PACKAGE = "@scotthuang/agent-knock-knock-deepseek-harness";
|
|
3
|
+
export declare const CONNECTOR_VERSION = "0.1.0-rc.1";
|
|
4
|
+
export declare const DSH_LAUNCHER_PACKAGE = "@deepseek-ai/dsh";
|
|
5
|
+
export declare const SUPPORTED_DSH_VERSION = "0.1.1-rc.2";
|
|
6
|
+
export declare const SUPPORTED_DSH_RUNTIME_PACKAGES: readonly ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-tools"];
|
|
7
|
+
export declare const SUPPORTED_DSH_AGENT_VERSION = "0.1.1-rc.2";
|
|
8
|
+
export declare const DSH_HOST_ID = "deepseek-harness";
|
|
9
|
+
export declare const DSH_HOST_VERSION = "0.1.1-rc.2";
|
|
10
|
+
export declare const CONTROLLER_ID_ENV = "AKK_DSH_CONTROLLER_ID";
|
|
11
|
+
export declare const CALLBACK_SOCKET_ENV = "AKK_DSH_CALLBACK_SOCKET";
|
|
12
|
+
export declare const CALLBACK_TOKEN_ENV = "AKK_DSH_CALLBACK_TOKEN";
|
|
13
|
+
export declare const HOST_PROFILE_SELECTION_ENV = "AKK_HOST_PROFILE_SELECTION";
|
|
14
|
+
export declare const HOST_PROFILE_SOURCE_ENV = "AKK_HOST_PROFILE_SOURCE";
|
|
15
|
+
export declare const HOST_PROFILE_FINGERPRINT_ENV = "AKK_HOST_PROFILE_FINGERPRINT";
|
|
16
|
+
export declare const HOST_PROFILE_HOST_ENV = "AKK_HOST_PROFILE_HOST";
|
|
17
|
+
export declare const HOST_PROFILE_HOST_VERSION_ENV = "AKK_HOST_PROFILE_HOST_VERSION";
|
|
18
|
+
export declare const CALLBACK_MAX_REQUEST_BYTES: number;
|
|
19
|
+
export declare const CALLBACK_MAX_RESPONSE_BYTES: number;
|
|
20
|
+
export declare const CALLBACK_TIMEOUT_MS = 8000;
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const CONNECTOR_NAME = "agent-knock-knock-deepseek-harness";
|
|
2
|
+
export const CONNECTOR_PACKAGE = "@scotthuang/agent-knock-knock-deepseek-harness";
|
|
3
|
+
export const CONNECTOR_VERSION = "0.1.0-rc.1";
|
|
4
|
+
export const DSH_LAUNCHER_PACKAGE = "@deepseek-ai/dsh";
|
|
5
|
+
export const SUPPORTED_DSH_VERSION = "0.1.1-rc.2";
|
|
6
|
+
export const SUPPORTED_DSH_RUNTIME_PACKAGES = Object.freeze([
|
|
7
|
+
"@deepseek-ai/dsh-agent",
|
|
8
|
+
"@deepseek-ai/dsh-commands",
|
|
9
|
+
"@deepseek-ai/dsh-llm",
|
|
10
|
+
"@deepseek-ai/dsh-tools",
|
|
11
|
+
]);
|
|
12
|
+
export const SUPPORTED_DSH_AGENT_VERSION = SUPPORTED_DSH_VERSION;
|
|
13
|
+
export const DSH_HOST_ID = "deepseek-harness";
|
|
14
|
+
export const DSH_HOST_VERSION = SUPPORTED_DSH_VERSION;
|
|
15
|
+
export const CONTROLLER_ID_ENV = "AKK_DSH_CONTROLLER_ID";
|
|
16
|
+
export const CALLBACK_SOCKET_ENV = "AKK_DSH_CALLBACK_SOCKET";
|
|
17
|
+
export const CALLBACK_TOKEN_ENV = "AKK_DSH_CALLBACK_TOKEN";
|
|
18
|
+
export const HOST_PROFILE_SELECTION_ENV = "AKK_HOST_PROFILE_SELECTION";
|
|
19
|
+
export const HOST_PROFILE_SOURCE_ENV = "AKK_HOST_PROFILE_SOURCE";
|
|
20
|
+
export const HOST_PROFILE_FINGERPRINT_ENV = "AKK_HOST_PROFILE_FINGERPRINT";
|
|
21
|
+
export const HOST_PROFILE_HOST_ENV = "AKK_HOST_PROFILE_HOST";
|
|
22
|
+
export const HOST_PROFILE_HOST_VERSION_ENV = "AKK_HOST_PROFILE_HOST_VERSION";
|
|
23
|
+
export const CALLBACK_MAX_REQUEST_BYTES = 2 * 1024 * 1024;
|
|
24
|
+
export const CALLBACK_MAX_RESPONSE_BYTES = 64 * 1024;
|
|
25
|
+
export const CALLBACK_TIMEOUT_MS = 8_000;
|
|
26
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,oCAAoC,CAAC;AACnE,MAAM,CAAC,MAAM,iBAAiB,GAC5B,gDAAgD,CAAC;AACnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1D,wBAAwB;IACxB,2BAA2B;IAC3B,sBAAsB;IACtB,wBAAwB;CAChB,CAAC,CAAC;AACZ,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAEtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AACzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AACjE,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;AAE7E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1D,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,CAAC;AACrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Native, no-bind Agent Knock Knock integration for DeepSeek Harness Web. */
|
|
2
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
import z from "@deepseek-ai/schemastery";
|
|
4
|
+
import { createHostAdapter } from "@scotthuang/agent-knock-knock/host-adapter";
|
|
5
|
+
import { createCallbackIpcServer } from "./ipc.js";
|
|
6
|
+
import { createConnectorProfileResources } from "./profile.js";
|
|
7
|
+
export declare const name = "agent-knock-knock-deepseek-harness";
|
|
8
|
+
export declare const inject: string[];
|
|
9
|
+
export interface Config {
|
|
10
|
+
/** AKK reconciliation cadence for the one shared Host lifecycle service. */
|
|
11
|
+
lifecycleIntervalMs?: number;
|
|
12
|
+
/** Existing AKK plugin options such as storeDir or executor timeouts. */
|
|
13
|
+
pluginConfig?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export declare const Config: z<Config>;
|
|
16
|
+
/**
|
|
17
|
+
* Mount `/akk`, all 16 semantic AKK tools, one callback route table, and one
|
|
18
|
+
* Host-owned lifecycle service. No explicit bind command or per-session setup
|
|
19
|
+
* exists: the exact command/tool Agent becomes the callback owner lazily.
|
|
20
|
+
*/
|
|
21
|
+
export declare function apply(ctx: Context, config?: Config): Promise<() => Promise<void>>;
|
|
22
|
+
/** @internal Strict dependency seam used by the connector's native wiring tests. */
|
|
23
|
+
export interface ConnectorDependencies {
|
|
24
|
+
readonly assertSupportedDeepSeekHarness: () => void;
|
|
25
|
+
readonly createConnectorProfileResources: typeof createConnectorProfileResources;
|
|
26
|
+
readonly createCallbackIpcServer: typeof createCallbackIpcServer;
|
|
27
|
+
readonly createHostAdapter: typeof createHostAdapter;
|
|
28
|
+
}
|
|
29
|
+
/** @internal Mount with replaceable process/IPC seams for deterministic tests. */
|
|
30
|
+
export declare function applyWithDependencies(ctx: Context, config?: Config, dependencies?: Partial<ConnectorDependencies>): Promise<() => Promise<void>>;
|
|
31
|
+
export interface DeepSeekHarnessManifestResolver {
|
|
32
|
+
launcherManifest(): unknown;
|
|
33
|
+
runtimePackageManifest(packageName: string): unknown;
|
|
34
|
+
}
|
|
35
|
+
/** @internal Resolve compatibility evidence only from the real DSH launcher tree. */
|
|
36
|
+
export declare function createDeepSeekHarnessManifestResolver(launcherEntryPath?: string | undefined): DeepSeekHarnessManifestResolver;
|
|
37
|
+
/** @internal Fail before mounting if the launcher-owned DSH package set split. */
|
|
38
|
+
export declare function assertSupportedDeepSeekHarness(resolver?: DeepSeekHarnessManifestResolver): void;
|