@tangle-network/agent-profile-materialize 0.27.5 → 0.28.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/dist/harness.d.ts CHANGED
@@ -8,17 +8,8 @@ export declare const OPENCODE_CONFIG_FILE = "opencode.json";
8
8
  export declare const OPENCODE_CONFIG_SCHEMA = "https://opencode.ai/config.json";
9
9
  export declare const OPENCODE_PRIMARY_AGENT_PREFIX = "tangle-profile-";
10
10
  export declare const CLAUDE_SETTINGS_PATH = ".tangle/claude-settings.json";
11
- export declare function harnessAutoLoadsContextFile(harness: HarnessId): boolean;
12
11
  /** Whether the shared materializer may place its context file in the harness agent directory. */
13
12
  export declare function harnessAutoLoadsAgentContextFile(harness: HarnessId): boolean;
14
- /**
15
- * The project context file this harness reads from cwd — its stable, documented
16
- * ALWAYS-LOADED surface. Exported so a caller lowering additive context (e.g. a
17
- * bare TUI's persona, which has no per-message system channel) targets the same
18
- * file the materializer writes instructions to, instead of keeping its own copy
19
- * of this per-harness map.
20
- */
21
- export declare function harnessContextFile(harness: HarnessId): string;
22
13
  /**
23
14
  * Why a harness refuses a system-prompt REPLACEMENT.
24
15
  *
package/dist/harness.js CHANGED
@@ -25,10 +25,6 @@ export const OPENCODE_CONFIG_FILE = "opencode.json";
25
25
  export const OPENCODE_CONFIG_SCHEMA = "https://opencode.ai/config.json";
26
26
  export const OPENCODE_PRIMARY_AGENT_PREFIX = "tangle-profile-";
27
27
  export const CLAUDE_SETTINGS_PATH = ".tangle/claude-settings.json";
28
- export function harnessAutoLoadsContextFile(harness) {
29
- assertMaterializerHarness(harness);
30
- return harness !== "opencode";
31
- }
32
28
  /** Whether the shared materializer may place its context file in the harness agent directory. */
33
29
  export function harnessAutoLoadsAgentContextFile(harness) {
34
30
  assertMaterializerHarness(harness);
@@ -36,25 +32,6 @@ export function harnessAutoLoadsAgentContextFile(harness) {
36
32
  // does not consume the shared agent-root plan produced by this predicate.
37
33
  return harness === "pi";
38
34
  }
39
- /**
40
- * The project context file this harness reads from cwd — its stable, documented
41
- * ALWAYS-LOADED surface. Exported so a caller lowering additive context (e.g. a
42
- * bare TUI's persona, which has no per-message system channel) targets the same
43
- * file the materializer writes instructions to, instead of keeping its own copy
44
- * of this per-harness map.
45
- */
46
- export function harnessContextFile(harness) {
47
- assertMaterializerHarness(harness);
48
- // The map is keyed by HarnessId, but callers reach this from runtime strings
49
- // (a registry spec name, a request field). A miss would otherwise return
50
- // undefined behind a `string` return type and surface as an undefined write
51
- // path much later.
52
- const path = CONTEXT_FILE[harness];
53
- if (!path) {
54
- throw new Error(`No project context file is known for harness "${harness}"`);
55
- }
56
- return path;
57
- }
58
35
  /**
59
36
  * Why a harness refuses a system-prompt REPLACEMENT.
60
37
  *
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { applyAgentCandidateWorkspacePlan, materializeCandidateProfile, } from "
2
2
  export type { AgentCandidateWorkspacePlan, AgentCandidateWorkspacePlanReceipt, ApplyAgentCandidateWorkspacePlanOptions, MaterializeCandidateProfileOptions, } from "./candidate-types.js";
3
3
  export { OPENCODE_NATIVE_TOOL_IDS, openCodeNativeToolId, } from "./control-maps.js";
4
4
  export type { HarnessId } from "./harness.js";
5
- export { HARNESS_SKILL_DIRS, harnessAutoLoadsAgentContextFile, harnessAutoLoadsContextFile, harnessContextFile, isMaterializerHarness, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, markMaterializerContextFile, skillDirForHarness, } from "./harness.js";
5
+ export { HARNESS_SKILL_DIRS, harnessAutoLoadsAgentContextFile, isMaterializerHarness, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, markMaterializerContextFile, skillDirForHarness, } from "./harness.js";
6
6
  export * from "./harness-prompt.js";
7
7
  export { type ConcurrentProfileRevision, ensurePublicConcurrentProfileRoots, type ManagedWorkspaceFileDigest, type ManagedWorkspaceManifest, preparePublicConcurrentProfileRevision, } from "./managed-workspace.js";
8
8
  export { isMaterializerMcpConfig } from "./mcp-config-ownership.js";
@@ -14,10 +14,10 @@ export { agentCandidateProfilePlanMaterial, canonicalizeAgentCandidateProfilePla
14
14
  export { takeSystemPromptBinding } from "./plan-prompt.js";
15
15
  export { assertWorkspacePlanSupported, enforceWorkspacePlanSupport, } from "./plan-support.js";
16
16
  export type { ApplyWorkspacePlanOptions, BindableLaunchControl, ExecutorSystemPromptBinding, PlanFile, PlanFileRoot, PlanFileSecretSlot, PlanRequirement, SkippableDimension, Unsupported, WorkspacePlan, WorkspacePlanApplication, WorkspacePlanArgument, WorkspacePlanArgumentTemplate, WorkspacePlanConfigValue, WorkspacePlanReceipt, WorkspacePlanSecretSegment, WorkspacePlanSpawnInputs, WorkspacePlanSystemPromptBinding, WorkspacePlanWrittenFile, } from "./plan-types.js";
17
- export { BINDABLE_LAUNCH_CONTROLS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, isExecutorSystemPromptBinding, isSkippableDimension, SKIPPABLE_DIMENSIONS, WorkspacePlanCleanupError, } from "./plan-types.js";
17
+ export { BINDABLE_LAUNCH_CONTROLS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, isSkippableDimension, SKIPPABLE_DIMENSIONS, WorkspacePlanCleanupError, } from "./plan-types.js";
18
18
  export { materializePrimeProfileControls, type PrimeMaterializeOptions, primeHarnessStatePath, prunePrimeProfileMaterial, seedPrimeProfileSubagents, writePrimeAgentFile, } from "./prime-agent-dir.js";
19
19
  export type { PrimeProfileErrorKind, PrimeThinkingLevel, } from "./prime-fork.js";
20
- export { matchPrimeKernelDeadMarker, PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_FORK_INSTALL, PRIME_FORK_PIN, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PRIME_THINKING_LEVELS, PrimeHarnessStateError, PrimeProfileError, parsePrimeModelsJson, primeAgentDirEnv, primeApiKeyEnvNames, primeThinkingLevel, stripPrimeJsonComments, } from "./prime-fork.js";
20
+ export { matchPrimeKernelDeadMarker, PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PRIME_THINKING_LEVELS, PrimeHarnessStateError, PrimeProfileError, parsePrimeModelsJson, primeAgentDirEnv, primeApiKeyEnvNames, primeThinkingLevel, stripPrimeJsonComments, } from "./prime-fork.js";
21
21
  export type { PrimeProfileControls, PrimeProfileSkill, PrimeProfileSubagent, } from "./prime-profile.js";
22
22
  export { assertPrimeModelAgreement, hasPrimeProfileMaterial, primeProfileNeedsAgentDir, primeSubagentEntryId, readPrimeProfileControls, } from "./prime-profile.js";
23
23
  export * from "./profile-bundle-cache.js";
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { applyAgentCandidateWorkspacePlan, materializeCandidateProfile, } from "./candidate.js";
2
2
  export { OPENCODE_NATIVE_TOOL_IDS, openCodeNativeToolId, } from "./control-maps.js";
3
- export { HARNESS_SKILL_DIRS, harnessAutoLoadsAgentContextFile, harnessAutoLoadsContextFile, harnessContextFile, isMaterializerHarness, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, markMaterializerContextFile, skillDirForHarness, } from "./harness.js";
3
+ export { HARNESS_SKILL_DIRS, harnessAutoLoadsAgentContextFile, isMaterializerHarness, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, markMaterializerContextFile, skillDirForHarness, } from "./harness.js";
4
4
  export * from "./harness-prompt.js";
5
5
  export { ensurePublicConcurrentProfileRoots, preparePublicConcurrentProfileRevision, } from "./managed-workspace.js";
6
6
  export { isMaterializerMcpConfig } from "./mcp-config-ownership.js";
@@ -11,9 +11,9 @@ export { applyWorkspacePlan, applyWorkspacePlanWithSecretProvider, } from "./pla
11
11
  export { agentCandidateProfilePlanMaterial, canonicalizeAgentCandidateProfilePlan, captureAgentCandidateProfilePlan, hashWorkspacePlan, } from "./plan-digest.js";
12
12
  export { takeSystemPromptBinding } from "./plan-prompt.js";
13
13
  export { assertWorkspacePlanSupported, enforceWorkspacePlanSupport, } from "./plan-support.js";
14
- export { BINDABLE_LAUNCH_CONTROLS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, isExecutorSystemPromptBinding, isSkippableDimension, SKIPPABLE_DIMENSIONS, WorkspacePlanCleanupError, } from "./plan-types.js";
14
+ export { BINDABLE_LAUNCH_CONTROLS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, isSkippableDimension, SKIPPABLE_DIMENSIONS, WorkspacePlanCleanupError, } from "./plan-types.js";
15
15
  export { materializePrimeProfileControls, primeHarnessStatePath, prunePrimeProfileMaterial, seedPrimeProfileSubagents, writePrimeAgentFile, } from "./prime-agent-dir.js";
16
- export { matchPrimeKernelDeadMarker, PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_FORK_INSTALL, PRIME_FORK_PIN, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PRIME_THINKING_LEVELS, PrimeHarnessStateError, PrimeProfileError, parsePrimeModelsJson, primeAgentDirEnv, primeApiKeyEnvNames, primeThinkingLevel, stripPrimeJsonComments, } from "./prime-fork.js";
16
+ export { matchPrimeKernelDeadMarker, PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PRIME_THINKING_LEVELS, PrimeHarnessStateError, PrimeProfileError, parsePrimeModelsJson, primeAgentDirEnv, primeApiKeyEnvNames, primeThinkingLevel, stripPrimeJsonComments, } from "./prime-fork.js";
17
17
  export { assertPrimeModelAgreement, hasPrimeProfileMaterial, primeProfileNeedsAgentDir, primeSubagentEntryId, readPrimeProfileControls, } from "./prime-profile.js";
18
18
  export * from "./profile-bundle-cache.js";
19
19
  export { executionControlConflict, materializeProfile, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, } from "./profile-materializer.js";
@@ -101,7 +101,6 @@ export interface Unsupported {
101
101
  */
102
102
  export declare const EXECUTOR_SYSTEM_PROMPT_BINDINGS: readonly ["opencode.agent-prompt"];
103
103
  export type ExecutorSystemPromptBinding = (typeof EXECUTOR_SYSTEM_PROMPT_BINDINGS)[number];
104
- export declare function isExecutorSystemPromptBinding(value: string): value is ExecutorSystemPromptBinding;
105
104
  /**
106
105
  * A system-prompt intent handed to the launcher that declared it owns the
107
106
  * control, instead of being lowered into the workspace.
@@ -16,10 +16,6 @@
16
16
  export const EXECUTOR_SYSTEM_PROMPT_BINDINGS = [
17
17
  "opencode.agent-prompt",
18
18
  ];
19
- const EXECUTOR_SYSTEM_PROMPT_BINDING_SET = new Set(EXECUTOR_SYSTEM_PROMPT_BINDINGS);
20
- export function isExecutorSystemPromptBinding(value) {
21
- return EXECUTOR_SYSTEM_PROMPT_BINDING_SET.has(value);
22
- }
23
19
  /**
24
20
  * The dimensions `materializeProfile`'s `skip` option honors.
25
21
  *
@@ -7,46 +7,9 @@
7
7
  * `--mode acp`) read these instead of each keeping a private copy, because a
8
8
  * fork bump must move one file, not two repositories.
9
9
  *
10
- * Every value here is verified against the pinned clone named by
11
- * {@link PRIME_FORK_PIN}; `tests/prime-fork-pin.test.ts` re-asserts them
12
- * against that clone when it is present, so a fork bump fails loudly in one
13
- * place.
10
+ * Every value here was read from PrimeIntellect-ai/prime-agent 0.7.0
11
+ * (be9e2fa0); a fork bump re-reads them against the new clone.
14
12
  */
15
- /** The prime-agent clone every constant in this module was read from. */
16
- export declare const PRIME_FORK_PIN: {
17
- readonly repo: "PrimeIntellect-ai/prime-agent";
18
- readonly version: "0.7.0";
19
- readonly commit: "be9e2fa0";
20
- /** Local clone used by the fork-pin test when it exists. */
21
- readonly clonePath: "/home/drew/bench-cache/prime-agent";
22
- /** Package root inside the clone that the file:line citations are relative to. */
23
- readonly packageRoot: "packages/coding-agent/src";
24
- };
25
- /**
26
- * The fork's package identity, and why it cannot be installed from the npm
27
- * registry.
28
- *
29
- * `@earendil-works/pi-coding-agent` on registry.npmjs.org serves the UPSTREAM
30
- * pi line (0.84.x); the fork's 0.7.x versions were never published there. The
31
- * two are wire-incompatible — different daemon schema revision, different
32
- * config dir, different agent-dir env var (see
33
- * {@link PRIME_AGENT_DIR_ENV_VARS}) — so `npm install -g` under that name
34
- * yields an agent none of this lowering was verified against. The fork must be
35
- * built from source and exposed under a `prime-agent` command name; its own
36
- * `bin` entry is `pi` (fork package.json `bin`), which is exactly how the wrong
37
- * binary ends up on `PATH` under the right-looking name.
38
- */
39
- export declare const PRIME_FORK_INSTALL: {
40
- readonly npmName: "@earendil-works/pi-coding-agent";
41
- /** The fork's own bin name — deliberately NOT the command to install it as. */
42
- readonly forkBinName: "pi";
43
- /** Command name an executor's binary path is expected to resolve to. */
44
- readonly expectedCommandName: "prime-agent";
45
- readonly sourceRepo: "https://github.com/PrimeIntellect-ai/prime-agent";
46
- /** Built entrypoint to expose as `prime-agent`. */
47
- readonly sourceEntrypoint: "packages/coding-agent/dist/bundle/cli.js";
48
- readonly reason: string;
49
- };
50
13
  /**
51
14
  * Env vars the agent resolves its config dir from, most-specific first.
52
15
  *
@@ -7,50 +7,9 @@
7
7
  * `--mode acp`) read these instead of each keeping a private copy, because a
8
8
  * fork bump must move one file, not two repositories.
9
9
  *
10
- * Every value here is verified against the pinned clone named by
11
- * {@link PRIME_FORK_PIN}; `tests/prime-fork-pin.test.ts` re-asserts them
12
- * against that clone when it is present, so a fork bump fails loudly in one
13
- * place.
10
+ * Every value here was read from PrimeIntellect-ai/prime-agent 0.7.0
11
+ * (be9e2fa0); a fork bump re-reads them against the new clone.
14
12
  */
15
- /** The prime-agent clone every constant in this module was read from. */
16
- export const PRIME_FORK_PIN = {
17
- repo: "PrimeIntellect-ai/prime-agent",
18
- version: "0.7.0",
19
- commit: "be9e2fa0",
20
- /** Local clone used by the fork-pin test when it exists. */
21
- clonePath: "/home/drew/bench-cache/prime-agent",
22
- /** Package root inside the clone that the file:line citations are relative to. */
23
- packageRoot: "packages/coding-agent/src",
24
- };
25
- /**
26
- * The fork's package identity, and why it cannot be installed from the npm
27
- * registry.
28
- *
29
- * `@earendil-works/pi-coding-agent` on registry.npmjs.org serves the UPSTREAM
30
- * pi line (0.84.x); the fork's 0.7.x versions were never published there. The
31
- * two are wire-incompatible — different daemon schema revision, different
32
- * config dir, different agent-dir env var (see
33
- * {@link PRIME_AGENT_DIR_ENV_VARS}) — so `npm install -g` under that name
34
- * yields an agent none of this lowering was verified against. The fork must be
35
- * built from source and exposed under a `prime-agent` command name; its own
36
- * `bin` entry is `pi` (fork package.json `bin`), which is exactly how the wrong
37
- * binary ends up on `PATH` under the right-looking name.
38
- */
39
- export const PRIME_FORK_INSTALL = {
40
- npmName: "@earendil-works/pi-coding-agent",
41
- /** The fork's own bin name — deliberately NOT the command to install it as. */
42
- forkBinName: "pi",
43
- /** Command name an executor's binary path is expected to resolve to. */
44
- expectedCommandName: "prime-agent",
45
- sourceRepo: "https://github.com/PrimeIntellect-ai/prime-agent",
46
- /** Built entrypoint to expose as `prime-agent`. */
47
- sourceEntrypoint: "packages/coding-agent/dist/bundle/cli.js",
48
- reason: "registry.npmjs.org serves the upstream pi line under @earendil-works/pi-coding-agent " +
49
- "(0.84.x); the prime-agent fork's 0.7.x versions do not exist there. Installing from " +
50
- "the registry yields a wire-incompatible agent with a different daemon schema, a " +
51
- "different config dir, and a different agent-dir env var. Build from source and expose " +
52
- "packages/coding-agent/dist/bundle/cli.js as `prime-agent`.",
53
- };
54
13
  /**
55
14
  * Env vars the agent resolves its config dir from, most-specific first.
56
15
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-profile-materialize",
3
- "version": "0.27.5",
3
+ "version": "0.28.1",
4
4
  "description": "Materialize an AgentProfile into the native per-harness workspace files (the one shared materializer for cli-bridge, agent-container, and VB).",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,14 +29,14 @@
29
29
  "@tangle-network/agent-interface-current": "npm:@tangle-network/agent-interface@5.0.0",
30
30
  "@types/node": "25.6.0",
31
31
  "typescript": "^6.0.3",
32
- "vitest": "^4.1.11"
32
+ "vitest": "^4.1.12"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@tangle-network/agent-interface": "^3.0.0 || ^4.0.0 || ^5.0.0"
36
36
  },
37
37
  "tangleRelease": {
38
- "sourceSha": "f732ccb687dad0ffb42d5902b9e76fedf2da4a88",
39
- "mergedAt": "2026-10-24T19:38:34-06:00"
38
+ "sourceSha": "17485174d5fa747c0c03376da7b1c0def19a5d42",
39
+ "mergedAt": "2026-10-25T19:02:09-06:00"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsc -p tsconfig.json",