@tangle-network/agent-profile-materialize 0.20.7 → 0.20.9
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/dist/harness-prompt.d.ts +2 -6
- package/dist/harness-prompt.js +19 -7
- package/package.json +3 -3
package/dist/harness-prompt.d.ts
CHANGED
|
@@ -10,12 +10,8 @@ import type { HarnessId } from "./harness.js";
|
|
|
10
10
|
* harness prompt to stay in force: that is what `appendSystemPrompt` means.
|
|
11
11
|
* A host that replaced it with its own template would delete exactly what the
|
|
12
12
|
* profile kept. On 2026-10-03 every Discovery research director ran under the
|
|
13
|
-
* sandbox's app-builder template this way
|
|
14
|
-
*
|
|
15
|
-
* Only a harness whose addition is a launch argument can carry the host's
|
|
16
|
-
* context as an addition. claude-code is the one wired end to end through the
|
|
17
|
-
* sidecar and the CLI adapter, so it is the only one listed. Every other
|
|
18
|
-
* harness keeps the host's replacement, unchanged.
|
|
13
|
+
* sandbox's app-builder template this way: claude-code through
|
|
14
|
+
* `--system-prompt`, opencode through a generated primary agent.
|
|
19
15
|
*/
|
|
20
16
|
export declare function keepsHarnessSystemPrompt(profile: AgentProfile | undefined, harness: HarnessId | string | undefined): boolean;
|
|
21
17
|
/** Join prompt additions in order, skipping empty ones. */
|
package/dist/harness-prompt.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Harnesses whose adapter can carry a host's environment context as an
|
|
3
|
+
* ADDITION to the harness's own system prompt:
|
|
4
|
+
*
|
|
5
|
+
* - claude-code and pi: `--append-system-prompt`.
|
|
6
|
+
* - opencode: the addition file that opencode.json names in `instructions`
|
|
7
|
+
* (OPENCODE_APPEND_SYSTEM_PROMPT_FILE). OpenCode's own prompt stays because
|
|
8
|
+
* no profile primary agent replaces it.
|
|
9
|
+
* - codex: `developer_instructions`, which codex sends after its own base
|
|
10
|
+
* instructions.
|
|
11
|
+
*
|
|
12
|
+
* Every other harness keeps the host's replacement, unchanged.
|
|
13
|
+
*/
|
|
14
|
+
const HARNESSES_WITH_ADDITIVE_HOST_PROMPT = new Set(["claude-code", "pi", "opencode", "codex"]);
|
|
1
15
|
/**
|
|
2
16
|
* Whether a run keeps the harness's own system prompt, so that a host's
|
|
3
17
|
* environment context joins the profile's addition instead of replacing the
|
|
@@ -8,12 +22,8 @@
|
|
|
8
22
|
* harness prompt to stay in force: that is what `appendSystemPrompt` means.
|
|
9
23
|
* A host that replaced it with its own template would delete exactly what the
|
|
10
24
|
* profile kept. On 2026-10-03 every Discovery research director ran under the
|
|
11
|
-
* sandbox's app-builder template this way
|
|
12
|
-
*
|
|
13
|
-
* Only a harness whose addition is a launch argument can carry the host's
|
|
14
|
-
* context as an addition. claude-code is the one wired end to end through the
|
|
15
|
-
* sidecar and the CLI adapter, so it is the only one listed. Every other
|
|
16
|
-
* harness keeps the host's replacement, unchanged.
|
|
25
|
+
* sandbox's app-builder template this way: claude-code through
|
|
26
|
+
* `--system-prompt`, opencode through a generated primary agent.
|
|
17
27
|
*/
|
|
18
28
|
export function keepsHarnessSystemPrompt(profile, harness) {
|
|
19
29
|
const prompt = profile?.prompt;
|
|
@@ -21,7 +31,9 @@ export function keepsHarnessSystemPrompt(profile, harness) {
|
|
|
21
31
|
return false;
|
|
22
32
|
const declaresIntent = (prompt.instructions?.length ?? 0) > 0 ||
|
|
23
33
|
prompt.appendSystemPrompt !== undefined;
|
|
24
|
-
return declaresIntent &&
|
|
34
|
+
return (declaresIntent &&
|
|
35
|
+
harness !== undefined &&
|
|
36
|
+
HARNESSES_WITH_ADDITIVE_HOST_PROMPT.has(harness));
|
|
25
37
|
}
|
|
26
38
|
/** Join prompt additions in order, skipping empty ones. */
|
|
27
39
|
export function joinSystemPromptAdditions(...additions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-profile-materialize",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.9",
|
|
4
4
|
"description": "Materialize an AgentProfile into the native per-harness workspace files (the one shared materializer for cli-bridge, agent-dev-container, and VB).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tangle-network/agent-interface": "2.
|
|
29
|
-
"@tangle-network/agent-interface-current": "npm:@tangle-network/agent-interface@2.
|
|
28
|
+
"@tangle-network/agent-interface": "2.17.0",
|
|
29
|
+
"@tangle-network/agent-interface-current": "npm:@tangle-network/agent-interface@2.17.0",
|
|
30
30
|
"@types/node": "25.6.0",
|
|
31
31
|
"typescript": "^6.0.3",
|
|
32
32
|
"vitest": "^4.1.11"
|