@tangle-network/agent-profile-materialize 1.1.129 → 1.1.131

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/index.d.ts CHANGED
@@ -557,6 +557,10 @@ declare function canonicalizeAgentCandidateProfilePlan(plan: AgentCandidateWorks
557
557
  /** Capture portable evidence of the exact canonical profile-plan bytes. */
558
558
  declare function captureAgentCandidateProfilePlan(plan: AgentCandidateWorkspacePlan): AgentCandidateProfilePlanEvidence;
559
559
  //#endregion
560
+ //#region src/plan-normalize.d.ts
561
+ /** Native argv must not carry a privately resolved profile value. */
562
+ declare function workspacePlanHasSecretArguments(plan: Pick<WorkspacePlan, "flags">): boolean;
563
+ //#endregion
560
564
  //#region src/plan-prompt.d.ts
561
565
  /**
562
566
  * The replacement text this launcher must bind to `control`, or `undefined`
@@ -1234,4 +1238,4 @@ declare function parseSandboxToolBinDirs(value: string | undefined): string[];
1234
1238
  */
1235
1239
  declare function bindLaunchToolBinDirs(env: Readonly<Record<string, string | undefined>>, toolBinDirs: readonly string[], appToolBinDirs?: readonly string[]): Record<string, string | undefined>;
1236
1240
  //#endregion
1237
- export { type AgentCandidateWorkspacePlan, type AgentCandidateWorkspacePlanReceipt, type ApplyAgentCandidateWorkspacePlanOptions, type ApplyWorkspacePlanOptions, BINDABLE_LAUNCH_CONTROLS, type BindableLaunchControl, CODEX_DISABLED_FEATURE_ARGS, type ConcurrentProfileRevision, EXECUTOR_SYSTEM_PROMPT_BINDINGS, type ExecutorSystemPromptBinding, HARNESS_LAUNCH_MATERIALIZE_OPTIONS, HARNESS_SKILL_DIRS, type HarnessId, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, type ManagedWorkspaceFileDigest, type ManagedWorkspaceManifest, type MaterializeCandidateProfileOptions, OPENCODE_NATIVE_TOOL_IDS, type OpenCodeMcpConfig, PI_MODELS_CONFIG_PATH, 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, PROFILE_BUNDLE_DEFAULT_MAX_BYTES, PROFILE_BUNDLE_MAX_BYTES, PROFILE_BUNDLE_MAX_FILES, PROFILE_BUNDLE_MAX_FILE_BYTES, PROFILE_BUNDLE_SCHEMA, type PiModelsConfigFile, type PiModelsConfigInput, type PiRuntimePaths, type PlanFile, type PlanFileRoot, type PlanFileSecretSlot, type PlanRequirement, PrimeHarnessStateError, type PrimeMaterializeOptions, type PrimeProfileControls, PrimeProfileError, type PrimeProfileErrorKind, type PrimeProfileSkill, type PrimeProfileSubagent, type PrimeThinkingLevel, ProfileBundleCache, ProfileBundleClaim, ProfileBundleClaimResult, ProfileBundleFileEntry, ProfileBundleManifest, ProfileUnsupportedError, type ResolveAgentProfileResourcesOptions, SANDBOX_TOOL_BIN_DIRS_ENV, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SKIPPABLE_DIMENSIONS, type SkippableDimension, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, type Unsupported, type WorkspacePlan, type WorkspacePlanApplication, type WorkspacePlanArgument, type WorkspacePlanArgumentTemplate, WorkspacePlanCleanupError, type WorkspacePlanConfigValue, type WorkspacePlanReceipt, type WorkspacePlanSecretSegment, type WorkspacePlanSpawnInputs, type WorkspacePlanSystemPromptBinding, type WorkspacePlanWrittenFile, admitProfileBundle, agentCandidateProfilePlanMaterial, applyAgentCandidateWorkspacePlan, applyWorkspacePlan, applyWorkspacePlanWithSecretProvider, assertPrimeModelAgreement, assertWorkspacePlanSupported, bindLaunchToolBinDirs, bindSecretSessionView, buildPiModelsConfig, buildPiModelsConfigFile, canonicalizeAgentCandidateProfilePlan, captureAgentCandidateProfilePlan, claimProfileBundle, codexDeveloperInstructionArgs, digestEnvName, enforceWorkspacePlanSupport, ensurePublicConcurrentProfileRoots, evictProfileBundles, executionControlConflict, harnessAutoLoadsAgentContextFile, hasPrimeProfileMaterial, hashWorkspacePlan, isExecutableProfileFile, isMaterializerHarness, isMaterializerMcpConfig, isSkippableDimension, joinSystemPromptAdditions, keepsHarnessSystemPrompt, markMaterializerContextFile, matchPrimeKernelDeadMarker, materializeCandidateProfile, materializePrimeProfileControls, materializeProfile, modelIdsMatch, normalizeSkillMd, openCodeMcpConfig, openCodeNativeToolId, openProfileBundleCache, parsePrimeModelsJson, parseSandboxToolBinDirs, preparePublicConcurrentProfileRevision, prepareSecretConcurrentProfileRevision, primeAgentDirEnv, primeApiKeyEnvNames, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId, primeThinkingLevel, profileBundleFileEntry, profileBundleFileTable, profileBundleManifestPath, profileFileBundleKey, prunePrimeProfileMaterial, qualifyModelId, readPrimeProfileControls, resolveAgentProfileResources, resolvePiRuntimePaths, secretSessionViewWorkspace, seedPrimeProfileSubagents, skillDirForHarness, stripPrimeJsonComments, sweepProfileBundleCache, takeSystemPromptBinding, unqualifyModelId, workspacePlanSecretCount, writePrimeAgentFile };
1241
+ export { type AgentCandidateWorkspacePlan, type AgentCandidateWorkspacePlanReceipt, type ApplyAgentCandidateWorkspacePlanOptions, type ApplyWorkspacePlanOptions, BINDABLE_LAUNCH_CONTROLS, type BindableLaunchControl, CODEX_DISABLED_FEATURE_ARGS, type ConcurrentProfileRevision, EXECUTOR_SYSTEM_PROMPT_BINDINGS, type ExecutorSystemPromptBinding, HARNESS_LAUNCH_MATERIALIZE_OPTIONS, HARNESS_SKILL_DIRS, type HarnessId, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, type ManagedWorkspaceFileDigest, type ManagedWorkspaceManifest, type MaterializeCandidateProfileOptions, OPENCODE_NATIVE_TOOL_IDS, type OpenCodeMcpConfig, PI_MODELS_CONFIG_PATH, 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, PROFILE_BUNDLE_DEFAULT_MAX_BYTES, PROFILE_BUNDLE_MAX_BYTES, PROFILE_BUNDLE_MAX_FILES, PROFILE_BUNDLE_MAX_FILE_BYTES, PROFILE_BUNDLE_SCHEMA, type PiModelsConfigFile, type PiModelsConfigInput, type PiRuntimePaths, type PlanFile, type PlanFileRoot, type PlanFileSecretSlot, type PlanRequirement, PrimeHarnessStateError, type PrimeMaterializeOptions, type PrimeProfileControls, PrimeProfileError, type PrimeProfileErrorKind, type PrimeProfileSkill, type PrimeProfileSubagent, type PrimeThinkingLevel, ProfileBundleCache, ProfileBundleClaim, ProfileBundleClaimResult, ProfileBundleFileEntry, ProfileBundleManifest, ProfileUnsupportedError, type ResolveAgentProfileResourcesOptions, SANDBOX_TOOL_BIN_DIRS_ENV, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SKIPPABLE_DIMENSIONS, type SkippableDimension, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, type Unsupported, type WorkspacePlan, type WorkspacePlanApplication, type WorkspacePlanArgument, type WorkspacePlanArgumentTemplate, WorkspacePlanCleanupError, type WorkspacePlanConfigValue, type WorkspacePlanReceipt, type WorkspacePlanSecretSegment, type WorkspacePlanSpawnInputs, type WorkspacePlanSystemPromptBinding, type WorkspacePlanWrittenFile, admitProfileBundle, agentCandidateProfilePlanMaterial, applyAgentCandidateWorkspacePlan, applyWorkspacePlan, applyWorkspacePlanWithSecretProvider, assertPrimeModelAgreement, assertWorkspacePlanSupported, bindLaunchToolBinDirs, bindSecretSessionView, buildPiModelsConfig, buildPiModelsConfigFile, canonicalizeAgentCandidateProfilePlan, captureAgentCandidateProfilePlan, claimProfileBundle, codexDeveloperInstructionArgs, digestEnvName, enforceWorkspacePlanSupport, ensurePublicConcurrentProfileRoots, evictProfileBundles, executionControlConflict, harnessAutoLoadsAgentContextFile, hasPrimeProfileMaterial, hashWorkspacePlan, isExecutableProfileFile, isMaterializerHarness, isMaterializerMcpConfig, isSkippableDimension, joinSystemPromptAdditions, keepsHarnessSystemPrompt, markMaterializerContextFile, matchPrimeKernelDeadMarker, materializeCandidateProfile, materializePrimeProfileControls, materializeProfile, modelIdsMatch, normalizeSkillMd, openCodeMcpConfig, openCodeNativeToolId, openProfileBundleCache, parsePrimeModelsJson, parseSandboxToolBinDirs, preparePublicConcurrentProfileRevision, prepareSecretConcurrentProfileRevision, primeAgentDirEnv, primeApiKeyEnvNames, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId, primeThinkingLevel, profileBundleFileEntry, profileBundleFileTable, profileBundleManifestPath, profileFileBundleKey, prunePrimeProfileMaterial, qualifyModelId, readPrimeProfileControls, resolveAgentProfileResources, resolvePiRuntimePaths, secretSessionViewWorkspace, seedPrimeProfileSubagents, skillDirForHarness, stripPrimeJsonComments, sweepProfileBundleCache, takeSystemPromptBinding, unqualifyModelId, workspacePlanHasSecretArguments, workspacePlanSecretCount, writePrimeAgentFile };
package/dist/index.js CHANGED
@@ -445,6 +445,10 @@ function normalizeWorkspacePlanArgument(value) {
445
445
  segments
446
446
  };
447
447
  }
448
+ /** Native argv must not carry a privately resolved profile value. */
449
+ function workspacePlanHasSecretArguments(plan) {
450
+ return plan.flags.some((argument) => typeof normalizeWorkspacePlanArgument(argument) !== "string");
451
+ }
448
452
  //#endregion
449
453
  //#region src/plan-prompt.ts
450
454
  function promptIntentFields(source, project) {
@@ -4731,7 +4735,7 @@ function secretOpenCodePlan(sourcePlan, providerConfig, secretReferences) {
4731
4735
  };
4732
4736
  plan = referencePublicMcpHeaders(plan, secretReferences);
4733
4737
  if (plan.files.some((file) => file.relPath.startsWith(".config/opencode/"))) throw new Error("Secret OpenCode reserves its native config directory");
4734
- if (Object.values(plan.env).some((value) => typeof value !== "string") || plan.flags.some((argument) => typeof normalizeWorkspacePlanArgument(argument) !== "string")) throw new Error("Secret OpenCode refuses a profile secret in its launch environment or arguments");
4738
+ if (Object.values(plan.env).some((value) => typeof value !== "string") || workspacePlanHasSecretArguments(plan)) throw new Error("Secret OpenCode refuses a profile secret in its launch environment or arguments");
4735
4739
  return plan;
4736
4740
  }
4737
4741
  /** Codex's native readback identifies which held values belong to MCP servers. */
@@ -4747,7 +4751,7 @@ async function secretCodexPlan(plan, references, provider) {
4747
4751
  references[name] = ref?.format === "bearer" ? `Bearer ${raw}` : raw;
4748
4752
  env[variable] = `{env:${name}}`;
4749
4753
  }
4750
- if (plan.flags.some((argument) => typeof normalizeWorkspacePlanArgument(argument) !== "string")) throw new Error("Secret Codex refuses a profile secret in native arguments");
4754
+ if (workspacePlanHasSecretArguments(plan)) throw new Error("Secret Codex refuses a profile secret in native arguments");
4751
4755
  return {
4752
4756
  ...plan,
4753
4757
  env
@@ -5026,4 +5030,4 @@ function bindLaunchToolBinDirs(env, toolBinDirs, appToolBinDirs = parseSandboxTo
5026
5030
  };
5027
5031
  }
5028
5032
  //#endregion
5029
- export { BINDABLE_LAUNCH_CONTROLS, CODEX_DISABLED_FEATURE_ARGS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, HARNESS_LAUNCH_MATERIALIZE_OPTIONS, HARNESS_SKILL_DIRS, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, OPENCODE_NATIVE_TOOL_IDS, PI_MODELS_CONFIG_PATH, 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, PROFILE_BUNDLE_DEFAULT_MAX_BYTES, PROFILE_BUNDLE_MAX_BYTES, PROFILE_BUNDLE_MAX_FILES, PROFILE_BUNDLE_MAX_FILE_BYTES, PROFILE_BUNDLE_SCHEMA, PrimeHarnessStateError, PrimeProfileError, ProfileUnsupportedError, SANDBOX_TOOL_BIN_DIRS_ENV, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SKIPPABLE_DIMENSIONS, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, WorkspacePlanCleanupError, admitProfileBundle, agentCandidateProfilePlanMaterial, applyAgentCandidateWorkspacePlan, applyWorkspacePlan, applyWorkspacePlanWithSecretProvider, assertPrimeModelAgreement, assertWorkspacePlanSupported, bindLaunchToolBinDirs, bindSecretSessionView, buildPiModelsConfig, buildPiModelsConfigFile, canonicalizeAgentCandidateProfilePlan, captureAgentCandidateProfilePlan, claimProfileBundle, codexDeveloperInstructionArgs, digestEnvName, enforceWorkspacePlanSupport, ensurePublicConcurrentProfileRoots, evictProfileBundles, executionControlConflict, harnessAutoLoadsAgentContextFile, hasPrimeProfileMaterial, hashWorkspacePlan, isExecutableProfileFile, isMaterializerHarness, isMaterializerMcpConfig, isSkippableDimension, joinSystemPromptAdditions, keepsHarnessSystemPrompt, markMaterializerContextFile, matchPrimeKernelDeadMarker, materializeCandidateProfile, materializePrimeProfileControls, materializeProfile, modelIdsMatch, normalizeSkillMd, openCodeMcpConfig, openCodeNativeToolId, openProfileBundleCache, parsePrimeModelsJson, parseSandboxToolBinDirs, preparePublicConcurrentProfileRevision, prepareSecretConcurrentProfileRevision, primeAgentDirEnv, primeApiKeyEnvNames, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId, primeThinkingLevel, profileBundleFileEntry, profileBundleFileTable, profileBundleManifestPath, profileFileBundleKey, prunePrimeProfileMaterial, qualifyModelId, readPrimeProfileControls, resolveAgentProfileResources, resolvePiRuntimePaths, secretSessionViewWorkspace, seedPrimeProfileSubagents, skillDirForHarness, stripPrimeJsonComments, sweepProfileBundleCache, takeSystemPromptBinding, unqualifyModelId, workspacePlanSecretCount, writePrimeAgentFile };
5033
+ export { BINDABLE_LAUNCH_CONTROLS, CODEX_DISABLED_FEATURE_ARGS, EXECUTOR_SYSTEM_PROMPT_BINDINGS, HARNESS_LAUNCH_MATERIALIZE_OPTIONS, HARNESS_SKILL_DIRS, MATERIALIZER_CONTEXT_PATHS, MATERIALIZER_HARNESSES, OPENCODE_NATIVE_TOOL_IDS, PI_MODELS_CONFIG_PATH, 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, PROFILE_BUNDLE_DEFAULT_MAX_BYTES, PROFILE_BUNDLE_MAX_BYTES, PROFILE_BUNDLE_MAX_FILES, PROFILE_BUNDLE_MAX_FILE_BYTES, PROFILE_BUNDLE_SCHEMA, PrimeHarnessStateError, PrimeProfileError, ProfileUnsupportedError, SANDBOX_TOOL_BIN_DIRS_ENV, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SKIPPABLE_DIMENSIONS, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, WorkspacePlanCleanupError, admitProfileBundle, agentCandidateProfilePlanMaterial, applyAgentCandidateWorkspacePlan, applyWorkspacePlan, applyWorkspacePlanWithSecretProvider, assertPrimeModelAgreement, assertWorkspacePlanSupported, bindLaunchToolBinDirs, bindSecretSessionView, buildPiModelsConfig, buildPiModelsConfigFile, canonicalizeAgentCandidateProfilePlan, captureAgentCandidateProfilePlan, claimProfileBundle, codexDeveloperInstructionArgs, digestEnvName, enforceWorkspacePlanSupport, ensurePublicConcurrentProfileRoots, evictProfileBundles, executionControlConflict, harnessAutoLoadsAgentContextFile, hasPrimeProfileMaterial, hashWorkspacePlan, isExecutableProfileFile, isMaterializerHarness, isMaterializerMcpConfig, isSkippableDimension, joinSystemPromptAdditions, keepsHarnessSystemPrompt, markMaterializerContextFile, matchPrimeKernelDeadMarker, materializeCandidateProfile, materializePrimeProfileControls, materializeProfile, modelIdsMatch, normalizeSkillMd, openCodeMcpConfig, openCodeNativeToolId, openProfileBundleCache, parsePrimeModelsJson, parseSandboxToolBinDirs, preparePublicConcurrentProfileRevision, prepareSecretConcurrentProfileRevision, primeAgentDirEnv, primeApiKeyEnvNames, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId, primeThinkingLevel, profileBundleFileEntry, profileBundleFileTable, profileBundleManifestPath, profileFileBundleKey, prunePrimeProfileMaterial, qualifyModelId, readPrimeProfileControls, resolveAgentProfileResources, resolvePiRuntimePaths, secretSessionViewWorkspace, seedPrimeProfileSubagents, skillDirForHarness, stripPrimeJsonComments, sweepProfileBundleCache, takeSystemPromptBinding, unqualifyModelId, workspacePlanHasSecretArguments, workspacePlanSecretCount, writePrimeAgentFile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-profile-materialize",
3
- "version": "1.1.129",
3
+ "version": "1.1.131",
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": {
@@ -37,8 +37,8 @@
37
37
  "@tangle-network/agent-interface": "^5.10.27"
38
38
  },
39
39
  "tangleRelease": {
40
- "sourceSha": "2bff5bb99292ab3af6b5aa5ac656feafd846f712",
41
- "mergedAt": "2026-11-16T21:21:04-08:00"
40
+ "sourceSha": "d522be025a42648ba71373567e2f957163c1d960",
41
+ "mergedAt": "2026-11-17T11:39:17-08:00"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsdown",