@tangle-network/agent-runtime 0.104.0 → 0.105.0
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/README.md +176 -42
- package/dist/agent.js +4 -4
- package/dist/candidate-execution/index.d.ts +2 -2
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{chunk-2QJSNOGK.js → chunk-C5RTIBNZ.js} +2 -2
- package/dist/{chunk-SNSMRT6H.js → chunk-CTRA64LY.js} +3 -3
- package/dist/{chunk-ZXICDSAK.js → chunk-H5QPIZNX.js} +2 -2
- package/dist/{chunk-2X65HYMI.js → chunk-HLKC4UYB.js} +1 -13
- package/dist/chunk-HLKC4UYB.js.map +1 -0
- package/dist/{chunk-3PPVCS75.js → chunk-HNP72PNU.js} +3 -10
- package/dist/chunk-HNP72PNU.js.map +1 -0
- package/dist/chunk-OPVWXJ2H.js +75 -0
- package/dist/chunk-OPVWXJ2H.js.map +1 -0
- package/dist/{chunk-B7K7V22Y.js → chunk-RDOAVVHY.js} +2 -2
- package/dist/{chunk-L5DST3QC.js → chunk-SMQXZGLZ.js} +1 -1
- package/dist/chunk-SMQXZGLZ.js.map +1 -0
- package/dist/{chunk-FJI3EXU3.js → chunk-UHEZW5BU.js} +1104 -588
- package/dist/chunk-UHEZW5BU.js.map +1 -0
- package/dist/{chunk-HAO4CXHP.js → chunk-VISA6CI3.js} +3 -3
- package/dist/{chunk-2UABGGUB.js → chunk-WMTCUOQL.js} +5 -5
- package/dist/{chunk-ATDFUJYI.js → chunk-WRTOVNN4.js} +4 -4
- package/dist/{chunk-ATDFUJYI.js.map → chunk-WRTOVNN4.js.map} +1 -1
- package/dist/{chunk-SBTWKPVR.js → chunk-WSTRQZYQ.js} +1 -1
- package/dist/chunk-WSTRQZYQ.js.map +1 -0
- package/dist/{chunk-5HNDYWUT.js → chunk-XBG2W2VW.js} +13 -3
- package/dist/chunk-XBG2W2VW.js.map +1 -0
- package/dist/{chunk-STJEHM5F.js → chunk-YJZA2BIK.js} +2 -2
- package/dist/{chunk-STJEHM5F.js.map → chunk-YJZA2BIK.js.map} +1 -1
- package/dist/{completion-gate-Bv47cOnn.d.ts → completion-gate-BMy5LGoP.d.ts} +1 -1
- package/dist/{coordination-CxtzMxSM.d.ts → coordination-BZZSVYpZ.d.ts} +2 -2
- package/dist/index.d.ts +101 -177
- package/dist/index.js +373 -235
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +49 -40
- package/dist/intelligence.js +14 -57
- package/dist/intelligence.js.map +1 -1
- package/dist/knowledge.d.ts +4 -4
- package/dist/knowledge.js +8 -8
- package/dist/{local-harness-CtK9dSny.d.ts → local-harness-BDNcl6jI.d.ts} +1 -1
- package/dist/{loop-runner-bin-DUOGtvOl.d.ts → loop-runner-bin-68aoM9-7.d.ts} +3 -11
- package/dist/loop-runner-bin.d.ts +4 -6
- package/dist/loop-runner-bin.js +5 -5
- package/dist/loops.d.ts +11 -11
- package/dist/loops.js +5 -5
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +7 -8
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/primeintellect/index.d.ts +2 -3
- package/dist/primeintellect/index.js +5 -6
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/{protected-model-port-DzkUY3HQ.d.ts → protected-model-port-B4t-OQjL.d.ts} +1 -1
- package/dist/{improve--2A0gK1-.d.ts → redact-BuFjxBUJ.d.ts} +201 -160
- package/dist/{structural-rollout-C4mabf87.d.ts → structural-rollout-DEh6CEsa.d.ts} +2 -2
- package/dist/{supervise-7q9F5brx.d.ts → supervise-4_48wwvy.d.ts} +2 -2
- package/dist/testing.js +9 -9
- package/dist/testing.js.map +1 -1
- package/dist/{worktree-fanout-WsOzt8qu.d.ts → worktree-fanout-DxhAWr5Z.d.ts} +2 -2
- package/package.json +6 -5
- package/skills/build-with-agent-runtime/SKILL.md +15 -9
- package/skills/loop-writer/SKILL.md +1 -1
- package/dist/chunk-2X65HYMI.js.map +0 -1
- package/dist/chunk-3PPVCS75.js.map +0 -1
- package/dist/chunk-5HNDYWUT.js.map +0 -1
- package/dist/chunk-FJI3EXU3.js.map +0 -1
- package/dist/chunk-L5DST3QC.js.map +0 -1
- package/dist/chunk-SBTWKPVR.js.map +0 -1
- /package/dist/{chunk-2QJSNOGK.js.map → chunk-C5RTIBNZ.js.map} +0 -0
- /package/dist/{chunk-SNSMRT6H.js.map → chunk-CTRA64LY.js.map} +0 -0
- /package/dist/{chunk-ZXICDSAK.js.map → chunk-H5QPIZNX.js.map} +0 -0
- /package/dist/{chunk-B7K7V22Y.js.map → chunk-RDOAVVHY.js.map} +0 -0
- /package/dist/{chunk-HAO4CXHP.js.map → chunk-VISA6CI3.js.map} +0 -0
- /package/dist/{chunk-2UABGGUB.js.map → chunk-WMTCUOQL.js.map} +0 -0
package/dist/intelligence.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AgentProfileDiff, AgentProfile, AgentImprovementProposal, AgentProfileMcpServer, AgentImprovementActivationTarget, Sha256Digest, AgentImprovementSurface, AgentCandidateExperiment, AgentImprovementActivationIntent, AgentCandidateExperimentMaterial, AgentImprovementMeasuredComparison, AgentCandidateExperimentMeasurement, AgentImprovementReviewDecision, AgentCandidateBenchmarkCellRef, AgentImprovementReview, AgentImprovementActivation, CandidateExecutionEvidence, AgentImprovementActivationTargetState, AgentImprovementActivationTargetTransition } from '@tangle-network/agent-interface';
|
|
2
2
|
export { AgentImprovementActivation, AgentImprovementActivationIntent, AgentImprovementActivationOutcome, AgentImprovementActivationResult, AgentImprovementMeasuredComparison, AgentImprovementProposal, AgentImprovementReview, AgentImprovementReviewDecision, CandidateExecutionEvidence, AgentCandidateProfileActivation as CandidateProfileMaterialization } from '@tangle-network/agent-interface';
|
|
3
|
+
import { I as ImproveOptions, a as ImproveResult, b as ImproveMethodResult, R as Redactor } from './redact-BuFjxBUJ.js';
|
|
4
|
+
export { d as defaultRedactor, r as resolveRedactor } from './redact-BuFjxBUJ.js';
|
|
3
5
|
import { c as LoopTraceEvent } from './types-BCoemcXU.js';
|
|
4
6
|
import { b as ToolSpec, c as RuntimeTelemetryOptions } from './sanitize-DEbPNtyI.js';
|
|
5
7
|
import { R as RuntimeStreamEvent } from './types-BwoZWq-i.js';
|
|
6
|
-
import { P as PrepareAgentCandidateExecutionOptions, E as ExecutePreparedAgentCandidateOptions, A as AgentCandidateExecutionClaimStore, C as CreateProtectedAgentCandidateModelPortOptions } from './protected-model-port-
|
|
7
|
-
export { p as parseCandidateProfileMaterialization } from './protected-model-port-
|
|
8
|
+
import { P as PrepareAgentCandidateExecutionOptions, E as ExecutePreparedAgentCandidateOptions, A as AgentCandidateExecutionClaimStore, C as CreateProtectedAgentCandidateModelPortOptions } from './protected-model-port-B4t-OQjL.js';
|
|
9
|
+
export { p as parseCandidateProfileMaterialization } from './protected-model-port-B4t-OQjL.js';
|
|
8
10
|
import { A as AgentImprovementActivationTargetPlan } from './activation-Cm-9MMX1.js';
|
|
9
11
|
export { a as AgentImprovementActivationReconciliation, b as AgentImprovementActivationResultStore, c as AgentImprovementActivationTransition, d as AgentImprovementActivationTransitionInput, C as CreateAgentImprovementActivationResultOptions, E as ExecuteAgentImprovementActivationInput, e as ExecuteAgentImprovementActivationOptions, f as createAgentImprovementActivationResult, g as executeAgentImprovementActivation, v as verifyAgentImprovementActivationResult } from './activation-Cm-9MMX1.js';
|
|
10
12
|
import { TraceStore } from '@tangle-network/agent-eval';
|
|
@@ -14,12 +16,11 @@ import { c as AgentCandidateRunFinalization, d as AgentCandidateTaskExecution, e
|
|
|
14
16
|
import { AgentEnvironmentProviderRef, AgentEnvironmentProviderRegistry } from './environment-provider.js';
|
|
15
17
|
import { AnalystFinding } from '@tangle-network/agent-eval/analyst';
|
|
16
18
|
import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-CmYCMbFT.js';
|
|
17
|
-
import {
|
|
19
|
+
import { OptimizationPackageSource, OptimizationMethodComparison, OptimizationTokenUsage } from '@tangle-network/agent-eval/campaign';
|
|
20
|
+
import './local-harness-BDNcl6jI.js';
|
|
21
|
+
import 'node:child_process';
|
|
18
22
|
import '@tangle-network/sandbox';
|
|
19
23
|
import './types-CvNwMzQt.js';
|
|
20
|
-
import '@tangle-network/agent-eval/campaign';
|
|
21
|
-
import './local-harness-CtK9dSny.js';
|
|
22
|
-
import 'node:child_process';
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
*
|
|
@@ -134,39 +135,6 @@ interface EffortOverridesCompiled {
|
|
|
134
135
|
*/
|
|
135
136
|
declare function compileEffort(settings: EffortSettings): EffortOverridesCompiled;
|
|
136
137
|
|
|
137
|
-
/**
|
|
138
|
-
*
|
|
139
|
-
* Redaction for Intelligence trace export. The trace carries the customer's
|
|
140
|
-
* real input/output; before any of it leaves the process it passes through a
|
|
141
|
-
* `Redactor`. The default scrubs the obvious leak classes (API keys, bearer
|
|
142
|
-
* tokens, emails, private keys) from strings and walks nested objects/arrays,
|
|
143
|
-
* but a customer with domain-specific PII supplies their own `redact` hook.
|
|
144
|
-
*
|
|
145
|
-
* This is intentionally narrower than `src/sanitize.ts` (which redacts the
|
|
146
|
-
* runtime's *event envelope* field-by-field): here the value is opaque
|
|
147
|
-
* customer payload, so the scrub is value-shaped, not schema-shaped.
|
|
148
|
-
*
|
|
149
|
-
* @experimental
|
|
150
|
-
*/
|
|
151
|
-
/** A redactor maps an arbitrary trace value to a safe-to-export value. Pure;
|
|
152
|
-
* must not throw on cyclic input (the default tolerates cycles). */
|
|
153
|
-
type Redactor = (value: unknown) => unknown;
|
|
154
|
-
/**
|
|
155
|
-
* The built-in redactor. Walks objects and arrays; replaces values under
|
|
156
|
-
* secret-bearing keys wholesale; scrubs in-value patterns from every string.
|
|
157
|
-
* Cycle-safe (a seen-set short-circuits self-referential payloads to
|
|
158
|
-
* `'[circular]'`), depth-bounded, and total — never throws on customer input.
|
|
159
|
-
*/
|
|
160
|
-
declare function defaultRedactor(value: unknown): unknown;
|
|
161
|
-
/**
|
|
162
|
-
* Resolve the redactor a client uses. A caller-supplied hook replaces the
|
|
163
|
-
* default entirely (the customer owns their PII rules); absent one, the
|
|
164
|
-
* built-in `defaultRedactor` runs. Returning `false` is the explicit opt-out —
|
|
165
|
-
* NO redaction, for a caller who has already sanitized upstream and wants raw
|
|
166
|
-
* fidelity. Opt-out is loud (an explicit `false`), never a silent default.
|
|
167
|
-
*/
|
|
168
|
-
declare function resolveRedactor(redact: Redactor | false | undefined): Redactor;
|
|
169
|
-
|
|
170
138
|
/**
|
|
171
139
|
*
|
|
172
140
|
* Tangle Intelligence — the RECEIVE half of the loop (pull-by-default).
|
|
@@ -886,6 +854,47 @@ declare function createExactProcessCandidateExperimentExecutor(options: CreateEx
|
|
|
886
854
|
/** Compose host-owned execution ports with protected model access for one exact-process run. */
|
|
887
855
|
declare function createProtectedExactProcessCandidateExperimentExecutor(options: CreateProtectedExactProcessCandidateExperimentExecutorOptions): ProtectedExactProcessCandidateExperimentExecutor;
|
|
888
856
|
|
|
857
|
+
type OptimizationProvenance = NonNullable<OptimizationMethodComparison['best']['provenance']>;
|
|
858
|
+
interface OptimizationActivationReceipt {
|
|
859
|
+
kind: 'optimization-activation-receipt';
|
|
860
|
+
method: string;
|
|
861
|
+
source: OptimizationPackageSource;
|
|
862
|
+
bridge?: OptimizationPackageSource;
|
|
863
|
+
modules?: OptimizationProvenance['modules'];
|
|
864
|
+
python?: OptimizationProvenance['python'];
|
|
865
|
+
models?: {
|
|
866
|
+
candidate?: NonNullable<AgentProfile['model']>;
|
|
867
|
+
optimizer?: string;
|
|
868
|
+
};
|
|
869
|
+
usage: {
|
|
870
|
+
optimizerEvaluations: number;
|
|
871
|
+
optimizerTokens?: OptimizationTokenUsage;
|
|
872
|
+
};
|
|
873
|
+
cost: {
|
|
874
|
+
optimization: OptimizationReceiptCost;
|
|
875
|
+
finalTest: OptimizationReceiptCost;
|
|
876
|
+
total: OptimizationReceiptCost;
|
|
877
|
+
};
|
|
878
|
+
invocation: {
|
|
879
|
+
runtimeInvocationId: string;
|
|
880
|
+
optimizerRunId: string;
|
|
881
|
+
compatibleOptimizerRunId?: string;
|
|
882
|
+
resumed: boolean;
|
|
883
|
+
artifactDir: string;
|
|
884
|
+
};
|
|
885
|
+
developmentDataDigest: Sha256Digest;
|
|
886
|
+
digest: Sha256Digest;
|
|
887
|
+
}
|
|
888
|
+
interface OptimizationReceiptCost {
|
|
889
|
+
totalUsd: number;
|
|
890
|
+
accountingComplete: boolean;
|
|
891
|
+
incompleteReasons: string[];
|
|
892
|
+
}
|
|
893
|
+
/** Build a detached receipt only for methods backed by an identified external optimizer. */
|
|
894
|
+
declare function createOptimizationActivationReceipt(improvement: ImproveMethodResult): OptimizationActivationReceipt | undefined;
|
|
895
|
+
/** Read and verify the optimizer evidence carried by a measured proposal. */
|
|
896
|
+
declare function optimizationActivationReceiptFromMetadata(metadata: AgentImprovementMeasuredComparison['metadata']): OptimizationActivationReceipt | undefined;
|
|
897
|
+
|
|
889
898
|
type AgentImprovementProfileActivationTarget = Omit<AgentImprovementActivationTargetPlan, 'surface'> & {
|
|
890
899
|
surface: AgentImprovementProfileSurface;
|
|
891
900
|
};
|
|
@@ -1423,4 +1432,4 @@ interface DoctorReport {
|
|
|
1423
1432
|
*/
|
|
1424
1433
|
declare function createIntelligenceClient(config: IntelligenceConfig): IntelligenceClient;
|
|
1425
1434
|
|
|
1426
|
-
export { AGENT_IMPROVEMENT_PROFILE_SURFACES, type AgentCandidateExecutionHostPorts, AgentCandidateExperimentCellExecutionError, type AgentCandidateExperimentCellPlacement, type AgentImprovementActivationTargetIdentity, AgentImprovementActivationTargetPlan, type AgentImprovementExperimentMaterial, type AgentImprovementProfileActivationPreparation, type AgentImprovementProfileActivationTarget, type AgentImprovementProfileReplacement, type AgentImprovementProfileSurface, type AgentImprovementProfileTargetState, type AgentImprovementProfileTargetTransition, type AgentImprovementProposalSubmissionState, type AgentImprovementTargetProfileDiffOptions, type AppliedIntelligence, type CapabilityAuth, type CapabilityInterface, type CapabilityManifest, CapabilityNotAdmittedError, type CapabilitySurface, type CertProvenance, type CertifiedArtifact, type CertifiedCapability, type CertifiedCapabilitySummary, type CertifiedProfile, type CertifiedPromptSource, type CertifiedPromptSourceOptions, type CertifiedPromptSurface, type ContentRef, type CorpusAccess, type CreateAgentImprovementActivationOptions, type CreateAgentImprovementProposalOptions, type CreateExactProcessCandidateExperimentExecutorOptions, type CreateProtectedExactProcessCandidateExperimentExecutorOptions, type CredentialRef, type DeliveryBinding, type DeliveryBindingKind, type DiffProvenance, type DoctorReport, type EffortOverrides, type EffortOverridesCompiled, type EffortSettings, type EffortTier, type ExactProcessCandidateExperimentExecution, type ExactProcessCandidateExperimentExecutor, type ExecuteAgentCandidateExperimentCellOptions, type HostSpec, type IntelligenceAgent, type IntelligenceClient, type IntelligenceConfig, type IntelligenceHookConfig, type IntelligenceWrapped, type JsonSchema, type ModeReadiness, type ProposeAgentImprovementOptions, type ProposeAgentImprovementResult, type ProposedProfileDiff, type ProtectedExactProcessCandidateExperimentExecutor, type ProvisionedHost, type PullCertifiedOptions, type PullOutcome, type RecordTraceMeta,
|
|
1435
|
+
export { AGENT_IMPROVEMENT_PROFILE_SURFACES, type AgentCandidateExecutionHostPorts, AgentCandidateExperimentCellExecutionError, type AgentCandidateExperimentCellPlacement, type AgentImprovementActivationTargetIdentity, AgentImprovementActivationTargetPlan, type AgentImprovementExperimentMaterial, type AgentImprovementProfileActivationPreparation, type AgentImprovementProfileActivationTarget, type AgentImprovementProfileReplacement, type AgentImprovementProfileSurface, type AgentImprovementProfileTargetState, type AgentImprovementProfileTargetTransition, type AgentImprovementProposalSubmissionState, type AgentImprovementTargetProfileDiffOptions, type AppliedIntelligence, type CapabilityAuth, type CapabilityInterface, type CapabilityManifest, CapabilityNotAdmittedError, type CapabilitySurface, type CertProvenance, type CertifiedArtifact, type CertifiedCapability, type CertifiedCapabilitySummary, type CertifiedProfile, type CertifiedPromptSource, type CertifiedPromptSourceOptions, type CertifiedPromptSurface, type ContentRef, type CorpusAccess, type CreateAgentImprovementActivationOptions, type CreateAgentImprovementProposalOptions, type CreateExactProcessCandidateExperimentExecutorOptions, type CreateProtectedExactProcessCandidateExperimentExecutorOptions, type CredentialRef, type DeliveryBinding, type DeliveryBindingKind, type DiffProvenance, type DoctorReport, type EffortOverrides, type EffortOverridesCompiled, type EffortSettings, type EffortTier, type ExactProcessCandidateExperimentExecution, type ExactProcessCandidateExperimentExecutor, type ExecuteAgentCandidateExperimentCellOptions, type HostSpec, type IntelligenceAgent, type IntelligenceClient, type IntelligenceConfig, type IntelligenceHookConfig, type IntelligenceWrapped, type JsonSchema, type ModeReadiness, type OptimizationActivationReceipt, type OptimizationReceiptCost, type ProposeAgentImprovementOptions, type ProposeAgentImprovementResult, type ProposedProfileDiff, type ProtectedExactProcessCandidateExperimentExecutor, type ProvisionedHost, type PullCertifiedOptions, type PullOutcome, type RecordTraceMeta, Redactor, type RepoConfig, type ResolveCtx, type ResolvedHook, type ResolvedRetrieval, type ResolvedSubagent, type ResolvedSurface, type ReviewAgentImprovementInput, type RunAgentCandidateExperimentOptions, type RunAgentCandidateExperimentResult, type RunRecord, type RunReport, type SubmitAgentImprovementProposalOptions, type SubmitAgentImprovementProposalOutcome, type TraceHandle, type TraceMeta, type TraceOutcome, type UsageClass, type UsageSplit, type VerifyCandidateExecutionEvidenceOptions, agentImprovementProfileSurfaceDigest, agentImprovementProfileSurfaceInput, agentImprovementTargetProfileDiffs, buildAgentImprovementActivationTargets, compileEffort, composeCertifiedProfile, composeCertifiedProfileFromWire, composeCertifiedPrompt, createAgentImprovementActivation, createAgentImprovementMeasuredComparison, createAgentImprovementProposal, createCertifiedPromptSource, createExactProcessCandidateExperimentExecutor, createIntelligenceClient, createOptimizationActivationReceipt, createProtectedExactProcessCandidateExperimentExecutor, defaultEffortTier, exactProcessCandidateExperimentExecutionSupport, executeAgentCandidateExperimentCell, isAgentImprovementProfileSurface, isIntelligenceOff, manifestFromProfile, normalizeCertifiedProfile, optimizationActivationReceiptFromMetadata, prepareAgentImprovementProfileActivation, proposeAgentImprovement, pullCertified, resolveEffort, resolveIntelligenceBaseUrl, reviewAgentImprovementProposal, runAgentCandidateExperiment, submitAgentImprovementProposal, verifyAgentImprovementActivation, verifyAgentImprovementProposal, verifyAgentImprovementReview, verifyCandidateExecutionEvidence, withIntelligence };
|
package/dist/intelligence.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultRedactor,
|
|
3
|
+
resolveRedactor
|
|
4
|
+
} from "./chunk-OPVWXJ2H.js";
|
|
1
5
|
import {
|
|
2
6
|
createProtectedAgentCandidateModelPort,
|
|
3
7
|
exactProcessProviderAsCandidateExecutor
|
|
4
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H5QPIZNX.js";
|
|
5
9
|
import {
|
|
6
10
|
createAgentImprovementActivationResult,
|
|
7
11
|
executeAgentImprovementActivation,
|
|
8
12
|
verifyAgentImprovementActivationResult
|
|
9
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VISA6CI3.js";
|
|
10
14
|
import {
|
|
11
15
|
AGENT_IMPROVEMENT_PROFILE_SURFACES,
|
|
12
16
|
AgentCandidateExperimentCellExecutionError,
|
|
@@ -17,8 +21,10 @@ import {
|
|
|
17
21
|
createAgentImprovementActivation,
|
|
18
22
|
createAgentImprovementMeasuredComparison,
|
|
19
23
|
createAgentImprovementProposal,
|
|
24
|
+
createOptimizationActivationReceipt,
|
|
20
25
|
executeAgentCandidateExperimentCell,
|
|
21
26
|
isAgentImprovementProfileSurface,
|
|
27
|
+
optimizationActivationReceiptFromMetadata,
|
|
22
28
|
proposeAgentImprovement,
|
|
23
29
|
reviewAgentImprovementProposal,
|
|
24
30
|
runAgentCandidateExperiment,
|
|
@@ -26,7 +32,7 @@ import {
|
|
|
26
32
|
verifyAgentImprovementProposal,
|
|
27
33
|
verifyAgentImprovementReview,
|
|
28
34
|
verifyCandidateExecutionEvidence
|
|
29
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UHEZW5BU.js";
|
|
30
36
|
import {
|
|
31
37
|
AGENT_CANDIDATE_EXECUTION_SUPPORT,
|
|
32
38
|
applyExactAgentProfileDiff,
|
|
@@ -34,8 +40,8 @@ import {
|
|
|
34
40
|
omitUndefinedObjectFields,
|
|
35
41
|
parseAgentCandidateProfileActivation,
|
|
36
42
|
parseExactAgentProfile
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-WSTRQZYQ.js";
|
|
44
|
+
import "./chunk-YJZA2BIK.js";
|
|
39
45
|
import "./chunk-UPWGXKXB.js";
|
|
40
46
|
import {
|
|
41
47
|
buildLoopOtelSpans,
|
|
@@ -43,7 +49,7 @@ import {
|
|
|
43
49
|
createOtelExporter,
|
|
44
50
|
flatOtelSpan
|
|
45
51
|
} from "./chunk-2VZYRB55.js";
|
|
46
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-HLKC4UYB.js";
|
|
47
53
|
import "./chunk-ISPWRSEC.js";
|
|
48
54
|
import {
|
|
49
55
|
resolveAgentEnvironmentProvider
|
|
@@ -350,57 +356,6 @@ function compileEffort(settings) {
|
|
|
350
356
|
};
|
|
351
357
|
}
|
|
352
358
|
|
|
353
|
-
// src/intelligence/redact.ts
|
|
354
|
-
var redactedMarker = "[redacted]";
|
|
355
|
-
var secretKeyPattern = /(api[-_]?key|secret|token|password|passwd|authorization|auth|private[-_]?key|credential|access[-_]?key|client[-_]?secret|session[-_]?(id|token)|cookie|bearer)/i;
|
|
356
|
-
var valuePatterns = [
|
|
357
|
-
// Bearer tokens.
|
|
358
|
-
/\bBearer\s+[A-Za-z0-9._\-+/=]{8,}/gi,
|
|
359
|
-
// Provider-style API keys (sk-..., sk-tan-..., pk_live_..., ghp_...).
|
|
360
|
-
/\b(?:sk|pk|rk|ak)[-_][A-Za-z0-9_-]{12,}/g,
|
|
361
|
-
/\bgh[pousr]_[A-Za-z0-9]{20,}/g,
|
|
362
|
-
// AWS access key ids.
|
|
363
|
-
/\bAKIA[0-9A-Z]{16}\b/g,
|
|
364
|
-
// PEM private-key blocks.
|
|
365
|
-
/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,
|
|
366
|
-
// Email addresses.
|
|
367
|
-
/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g
|
|
368
|
-
];
|
|
369
|
-
function scrubString(input) {
|
|
370
|
-
let out = input;
|
|
371
|
-
for (const pattern of valuePatterns) {
|
|
372
|
-
out = out.replace(pattern, redactedMarker);
|
|
373
|
-
}
|
|
374
|
-
return out;
|
|
375
|
-
}
|
|
376
|
-
function defaultRedactor(value) {
|
|
377
|
-
return walk(value, /* @__PURE__ */ new WeakSet(), 0);
|
|
378
|
-
}
|
|
379
|
-
var maxDepth = 32;
|
|
380
|
-
function walk(value, seen, depth) {
|
|
381
|
-
if (depth > maxDepth) return "[truncated]";
|
|
382
|
-
if (typeof value === "string") return scrubString(value);
|
|
383
|
-
if (value === null || typeof value !== "object") return value;
|
|
384
|
-
if (seen.has(value)) return "[circular]";
|
|
385
|
-
seen.add(value);
|
|
386
|
-
if (Array.isArray(value)) {
|
|
387
|
-
return value.map((item) => walk(item, seen, depth + 1));
|
|
388
|
-
}
|
|
389
|
-
const out = {};
|
|
390
|
-
for (const [key, v] of Object.entries(value)) {
|
|
391
|
-
if (secretKeyPattern.test(key)) {
|
|
392
|
-
out[key] = redactedMarker;
|
|
393
|
-
continue;
|
|
394
|
-
}
|
|
395
|
-
out[key] = walk(v, seen, depth + 1);
|
|
396
|
-
}
|
|
397
|
-
return out;
|
|
398
|
-
}
|
|
399
|
-
function resolveRedactor(redact) {
|
|
400
|
-
if (redact === false) return (value) => value;
|
|
401
|
-
return redact ?? defaultRedactor;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
359
|
// src/intelligence/capability.ts
|
|
405
360
|
var CapabilityNotAdmittedError = class extends Error {
|
|
406
361
|
kind;
|
|
@@ -1493,6 +1448,7 @@ export {
|
|
|
1493
1448
|
createCertifiedPromptSource,
|
|
1494
1449
|
createExactProcessCandidateExperimentExecutor,
|
|
1495
1450
|
createIntelligenceClient,
|
|
1451
|
+
createOptimizationActivationReceipt,
|
|
1496
1452
|
createProtectedExactProcessCandidateExperimentExecutor,
|
|
1497
1453
|
defaultEffortTier,
|
|
1498
1454
|
defaultRedactor,
|
|
@@ -1503,6 +1459,7 @@ export {
|
|
|
1503
1459
|
isIntelligenceOff,
|
|
1504
1460
|
manifestFromProfile,
|
|
1505
1461
|
normalizeCertifiedProfile,
|
|
1462
|
+
optimizationActivationReceiptFromMetadata,
|
|
1506
1463
|
parseAgentCandidateProfileActivation as parseCandidateProfileMaterialization,
|
|
1507
1464
|
prepareAgentImprovementProfileActivation,
|
|
1508
1465
|
proposeAgentImprovement,
|