@tangle-network/agent-eval 0.67.0 → 0.68.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/CHANGELOG.md +15 -0
- package/dist/campaign/index.js +9 -9
- package/dist/{chunk-MZ2IYGGN.js → chunk-E24XD7A2.js} +4 -278
- package/dist/chunk-E24XD7A2.js.map +1 -0
- package/dist/{chunk-NV2PF37Q.js → chunk-JFGZPUMU.js} +277 -3
- package/dist/chunk-JFGZPUMU.js.map +1 -0
- package/dist/contract/index.js +6 -6
- package/dist/index.d.ts +113 -5
- package/dist/index.js +100 -2
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/package.json +1 -1
- package/dist/chunk-MZ2IYGGN.js.map +0 -1
- package/dist/chunk-NV2PF37Q.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { A as AgentEvalError } from './errors-Dwqw-T_m.js';
|
|
|
25
25
|
export { a as AgentEvalErrorCode, C as CaptureIntegrityError, b as ConfigError, J as JudgeError, N as NotFoundError, R as ReplayError, V as ValidationError, c as VerificationError } from './errors-Dwqw-T_m.js';
|
|
26
26
|
import { a as FeedbackLabel, F as FeedbackTrajectoryStore, b as FeedbackTrajectory } from './feedback-trajectory-8hKC5EOb.js';
|
|
27
27
|
export { c as FeedbackArtifactType, d as FeedbackAttempt, e as FeedbackLabelKind, f as FeedbackLabelSource, g as FeedbackOptimizerRow, h as FeedbackOutcome, i as FeedbackReplayAdapter, j as FeedbackReplayResult, k as FeedbackSeverity, l as FeedbackSplitPolicy, m as FeedbackTask, n as FeedbackTrajectoryFilter, o as FileSystemFeedbackTrajectoryStore, I as InMemoryFeedbackTrajectoryStore, P as PreferenceMemoryEntry, p as ProposedSideEffect, q as assignFeedbackSplit, r as controlRunToFeedbackTrajectory, s as createFeedbackTrajectory, t as feedbackTrajectoriesToDatasetScenarios, u as feedbackTrajectoriesToOptimizerRows, v as feedbackTrajectoryToDatasetScenario, w as feedbackTrajectoryToOptimizerRow, x as parseFeedbackTrajectoriesJsonl, y as renderPreferenceMemoryMarkdown, z as replayFeedbackTrajectories, A as replayFeedbackTrajectory, B as serializeFeedbackTrajectoriesJsonl, C as summarizePreferenceMemory, D as withAssignedFeedbackSplit } from './feedback-trajectory-8hKC5EOb.js';
|
|
28
|
-
import { A as AgentProfile } from './agent-profile-DzcPHR1Z.js';
|
|
28
|
+
import { A as AgentProfile$1 } from './agent-profile-DzcPHR1Z.js';
|
|
29
29
|
export { a as BackendIntegrityError, B as BackendIntegrityReport, b as agentProfileHash, c as assertRealBackend, s as summarizeBackendIntegrity } from './agent-profile-DzcPHR1Z.js';
|
|
30
30
|
export { DataAcquisitionPlan, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFallbackPolicy, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRecommendedAction, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeResponsibleSurface, KnowledgeSensitivity, ScoreKnowledgeReadinessOptions, UserQuestion, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, knowledgeReadinessTracePayload, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from './knowledge/index.js';
|
|
31
31
|
import { h as ReleaseConfidenceThresholds, f as ReleaseConfidenceScorecard } from './release-report-CN8hJlhk.js';
|
|
@@ -2962,19 +2962,19 @@ interface ScorecardCell {
|
|
|
2962
2962
|
interface Scorecard {
|
|
2963
2963
|
cells: ScorecardCell[];
|
|
2964
2964
|
/** Profile definitions seen — keeps the scorecard self-describing. */
|
|
2965
|
-
profiles: Record<string, AgentProfile>;
|
|
2965
|
+
profiles: Record<string, AgentProfile$1>;
|
|
2966
2966
|
}
|
|
2967
2967
|
/** One append-only log line — a single cell's entry for a single commit. */
|
|
2968
2968
|
interface ScorecardLogLine {
|
|
2969
2969
|
scenarioId: string;
|
|
2970
2970
|
profileHash: string;
|
|
2971
2971
|
model: string;
|
|
2972
|
-
profile: AgentProfile;
|
|
2972
|
+
profile: AgentProfile$1;
|
|
2973
2973
|
entry: ScorecardEntry;
|
|
2974
2974
|
}
|
|
2975
2975
|
interface RecordRunsOptions {
|
|
2976
2976
|
/** The profile that produced these runs — keys the cell. */
|
|
2977
|
-
profile: AgentProfile;
|
|
2977
|
+
profile: AgentProfile$1;
|
|
2978
2978
|
commitSha: string;
|
|
2979
2979
|
/** Defaults to `new Date().toISOString()`. */
|
|
2980
2980
|
timestamp?: string;
|
|
@@ -5821,4 +5821,112 @@ declare function defaultRenderStudentPrompt<TInput>(args: {
|
|
|
5821
5821
|
* Throws on failure so the cell is recorded as failed, not silently zeroed. */
|
|
5822
5822
|
declare function defaultParseStudentLabel<TProduced>(rawContent: string, scenarioId: string): TProduced;
|
|
5823
5823
|
|
|
5824
|
-
export { ANALYST_SEVERITIES, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, AgentProfile, type AgreementResult, type AlignmentOp, Analyst, AnalystContext, AnalystCost, AnalystFinding, AnalystSeverity, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, Artifact$1 as Artifact, type Artifact as ArtifactCheckArtifact, type ArtifactEventLike, type ArtifactValidator, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, type CompletionRequirement, type CompletionVerdict, type ConceptComplexity, type ConceptFinding, type ConceptSpec, type ConceptWeightStrategy, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrectnessChecker, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateSandboxPoolOpts, type CreateTraceAnalystKindOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, D1ExperimentStore, type D1ExperimentStoreOptions, type D1Like, type D1PreparedStatementLike, DEFAULT_AGENT_SLOS, DEFAULT_COMPLEXITY_WEIGHTS, DEFAULT_FINDERS, DEFAULT_HARNESS_OBJECTIVES, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_RUN_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, DEFAULT_TRACE_ANALYST_KINDS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DiffPolicy, type DiffScorecardOptions, type DirEntry, type Direction, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type ErrorCountPattern, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, type ExtractOptions, type ExtractResult, FAILURE_MODE_KIND_SPEC, FINDING_SUBJECT_GRAMMAR_PROMPT, FINDING_SUBJECT_KINDS, type FactorContribution, type FactorialCell, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FileChange, FileSystemExperimentStore, type FileSystemExperimentStoreOptions, type FindingSubject, type FindingSubjectKind, FindingSubjectStringSchema, type FindingsDiff, FindingsStore, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, type HarnessAdapter, HarnessConfig, type HarnessExperimentConfig, type HarnessExperimentResult, type HarnessIntervention, type HarnessRunRequest, type HarnessRunResult, type HarnessScenario, type HarnessSelection, type HarnessVariant, type HarnessVariantReport, HoldoutAuditor, type HostedJudgeConfig, type HostedJudgeDimension, type HostedJudgeRequest, type HostedJudgeResponse, type HostedRunCriticConfig, type HostedRunScoreRequest, type HostedRunScoreResponse, type HttpGithubClientOptions, type HypothesisManifest, type HypothesisResult, IMPROVEMENT_KIND_SPEC, INTENT_MATCH_JUDGE_VERSION, type ImageData, InMemoryExperimentStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, type JudgeAdapterOpts, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeInput, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, KIND_EXPECTED_SUBJECTS, KNOWLEDGE_GAP_KIND_SPEC, KNOWLEDGE_POISONING_KIND_SPEC, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, type LlmCorrectnessCheckerOpts, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MatchResult, type MatcherResult, type MeasurementPolicy, type MergeOptions, MetricsCollector, type MuffledFinder, type MuffledFinding, MultiLayerVerifier, type MultiToolchainLayerConfig, type Mutator, Mutex, type Objective, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParetoResult, type ParseStudentLabel, type PersistedFinding, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type ProducedProposal, type ProducedState, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposalEventLike, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, RAW_FINDING_SCHEMA_PROMPT, type RawAnalystFinding, RawAnalystFindingSchema, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepoRef, type RequirementCheck, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run$1 as Run, type RunCommandInput, type RunCommandResult, type RunConfig, RunCritic, type RunCriticAdapterOpts, type RunCriticOptions, type RunDiff, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunScore, type RunScoreWeights, type RunTrace, type RuntimeEventLike, SEMANTIC_CONCEPT_JUDGE_VERSION, SKILL_USAGE_ANALYST, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type SatisfiedBy, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SemanticConceptJudgeAdapterOpts, type SemanticConceptJudgeInput, type SemanticConceptJudgeOptions, type SemanticConceptJudgeResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, Severity, type SignedManifest, type SignedManifestAlgo, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, SkillUsageAnalyst, type SkillUsageRecord, type SkillUsageReport, type SkillUsageScanConfig, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, Span, type SplitGoldOptions, type SteeringBundle, type SteeringDelta, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type SteeringRolePrompt, type StepAttribution, type SynthesisReason, type SynthesisTarget, type TaskGold, TestResult, type ThresholdContract, TokenCounter, type TokenSpec, type ToolCallEventLike, TraceAnalysisStore, type TraceAnalystAdapterOpts, type TraceAnalystGolden, type TraceAnalystKindSpec, TraceEmitter, TraceEvent, TraceStore, type TraceToolGroupName, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UNIVERSAL_FINDERS, type ValidationContext, type ValidationIssue, type ValidationResult, type VerifierAdapterOpts, VerifyContext, VerifyOptions, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkflowTopology, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, aggregatePrReviewScore, aggregateRunScore, analyzeAntiSlop, analyzeSeries, appendScorecard, assertCrossFamily, assertSingleBackend, attributeCounterfactuals, bisect, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildSkillUsageReport, buildTraceToolsForGroup, byteLengthRange, canaryLeakView, canonicalize, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, clamp01, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, composeValidators, containsAll, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createJudgeAdapter, createLlmCorrectnessChecker, createRunCriticAdapter, createSandboxPool, createSemanticConceptJudge, createSemanticConceptJudgeAdapter, createTraceAnalystAdapter, createTraceAnalystKind, createVerifierAdapter, crossTraceDiff, crowdingDistance, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultIsMaterial, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffFindings, diffScorecard, discoverPersonas, distillPlaybook, dominates, emitSkillUsageFindings, estimateCost, estimateTokens, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, extractProducedState, fieldAgreement, fileContains, fileExists, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, precision as goldenPrecision, hashContent, hashJson, htmlContainsElement, httpGithubClient, inMemoryReferenceReplayStore, isModelPriced, isOtelConfigured, jsonHasKeys, jsonShape, jsonlReferenceReplayStore, judgeFamily, keyPreserved, liftSeverity, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, matchGoldens, mergeLayerResults, mergeSteeringBundle, multiToolchainLayer, notBlocked, paraphraseRobustness, paraphraseRobustnessScenarios, paretoFrontier, paretoFrontierWithCrowding, parseCorrectnessResponse, parseFindingSubject, parseGoldJsonl, parseRawFinding, parseReflectionResponse, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, printDriverSummary, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatch, regexMatches, renderFindingSubject, renderMarkdownReport, renderPlaybookMarkdown, renderPriorFindings, renderSteeringText, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, resolveModelPricing, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runCounterfactual, runDistillation, runE2EWorkflow, runExpectations, runHarnessExperiment, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runSelfPlay, runSemanticConceptJudge, scalarScore, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, securityJudge, selectHarnessVariant, sentenceReorderMutator, signManifest, splitGold, statusAdvanced, summarizeHarnessResults, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toPrometheusText, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyCompletion, verifyManifest, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
|
5824
|
+
/**
|
|
5825
|
+
* @experimental — surface may evolve as production agents wire it in.
|
|
5826
|
+
*
|
|
5827
|
+
* Structured agent profile — the system prompt as named, addressable sections
|
|
5828
|
+
* instead of one opaque blob. The self-improvement loop targets ONE evolvable
|
|
5829
|
+
* `domain` section at a time (via `applyDomainPatch`); the role, environment,
|
|
5830
|
+
* tool conventions, and skill roster stay fixed so a candidate diff is
|
|
5831
|
+
* attributable to a single section rather than a whole-prompt rewrite.
|
|
5832
|
+
*
|
|
5833
|
+
* `renderProfile` emits the prompt in a fixed five-zone order — role,
|
|
5834
|
+
* Environment, Tool conventions, Skills, Domain guidance — mirroring the layout
|
|
5835
|
+
* of Harvey LAB's `harness/system_prompt.md` (workspace root, read-only
|
|
5836
|
+
* documents, output dir, skills dir). `profileToSurface` is the bridge to the
|
|
5837
|
+
* loop's string `MutableSurface`: a profile renders to exactly the text a
|
|
5838
|
+
* candidate is scored on.
|
|
5839
|
+
*
|
|
5840
|
+
* Distinct from the benchmark-cell `AgentProfile` in `src/agent-profile.ts`,
|
|
5841
|
+
* which fingerprints a (model, skills, prompt, tools) cell for the scorecard.
|
|
5842
|
+
* That one is the unit of variation; this one is the prompt CONTENT being
|
|
5843
|
+
* varied. Consume this module by its own path (`@tangle-network/agent-eval`
|
|
5844
|
+
* exposes it under the `profile` namespace) to avoid the name clash.
|
|
5845
|
+
*/
|
|
5846
|
+
/** A named, addressable region of the system prompt. `evolvable` marks whether
|
|
5847
|
+
* the self-improvement loop is allowed to patch its body; fixed scaffolding
|
|
5848
|
+
* (e.g. a compliance preamble) sets `evolvable: false`. */
|
|
5849
|
+
interface AgentProfileSection {
|
|
5850
|
+
id: string;
|
|
5851
|
+
title: string;
|
|
5852
|
+
body: string;
|
|
5853
|
+
evolvable: boolean;
|
|
5854
|
+
}
|
|
5855
|
+
/** A skill the agent can invoke. `triggers` are the phrases/conditions that
|
|
5856
|
+
* should activate it; `scriptsDir` points at its executable scripts when the
|
|
5857
|
+
* skill ships code (mirrors Harvey's `skills/<name>/scripts/`). */
|
|
5858
|
+
interface ProfileSkill {
|
|
5859
|
+
name: string;
|
|
5860
|
+
description: string;
|
|
5861
|
+
triggers: string[];
|
|
5862
|
+
scriptsDir?: string;
|
|
5863
|
+
}
|
|
5864
|
+
/** The structured system prompt. The first four fields are fixed scaffolding;
|
|
5865
|
+
* `domain` is the evolvable surface the loop optimizes. */
|
|
5866
|
+
interface AgentProfile {
|
|
5867
|
+
role: string;
|
|
5868
|
+
environment: string;
|
|
5869
|
+
toolConventions: string;
|
|
5870
|
+
skills: ProfileSkill[];
|
|
5871
|
+
domain: AgentProfileSection[];
|
|
5872
|
+
}
|
|
5873
|
+
/**
|
|
5874
|
+
* Emit the sectioned system prompt in fixed order: role text, then
|
|
5875
|
+
* `## Environment`, `## Tool conventions`, `## Skills` (each skill as
|
|
5876
|
+
* `### <name>` + description + triggers), `## Domain guidance` (each section as
|
|
5877
|
+
* `### <title>` + body). The order is load-bearing — the loop diffs rendered
|
|
5878
|
+
* text, and reordering would make every candidate look like a full rewrite.
|
|
5879
|
+
*/
|
|
5880
|
+
declare function renderProfile(p: AgentProfile): string;
|
|
5881
|
+
/** The string `MutableSurface` the self-improvement loop scores — a profile
|
|
5882
|
+
* renders to exactly the text a candidate is graded on. */
|
|
5883
|
+
declare function profileToSurface(p: AgentProfile): string;
|
|
5884
|
+
/**
|
|
5885
|
+
* The fixed-scaffolding baseline: a `role`/`environment`/`toolConventions`
|
|
5886
|
+
* profile with the stock skill roster and NO domain guidance. The
|
|
5887
|
+
* production profile is this plus shipped domain sections.
|
|
5888
|
+
*/
|
|
5889
|
+
declare function baselineProfile(args: {
|
|
5890
|
+
role: string;
|
|
5891
|
+
environment?: string;
|
|
5892
|
+
toolConventions?: string;
|
|
5893
|
+
skills?: ProfileSkill[];
|
|
5894
|
+
}): AgentProfile;
|
|
5895
|
+
/** The production profile: the baseline scaffolding plus the domain sections
|
|
5896
|
+
* shipped after self-improvement. Differs from the baseline ONLY in `domain`
|
|
5897
|
+
* (and any skills the caller layered into the baseline) — the role,
|
|
5898
|
+
* environment, and tool conventions are carried through unchanged. */
|
|
5899
|
+
declare function prodProfile(baseline: AgentProfile, shipped: AgentProfileSection[]): AgentProfile;
|
|
5900
|
+
/**
|
|
5901
|
+
* Section-scoped edit — replace the body of ONE domain section by id, leaving
|
|
5902
|
+
* every other section byte-identical. This is how the loop targets a single
|
|
5903
|
+
* evolvable surface. Throws on an unknown section id (a patch that hits no
|
|
5904
|
+
* section is a silent no-op otherwise — fail loud). Throws when the targeted
|
|
5905
|
+
* section is `evolvable: false`.
|
|
5906
|
+
*/
|
|
5907
|
+
declare function applyDomainPatch(p: AgentProfile, sectionId: string, newBody: string): AgentProfile;
|
|
5908
|
+
/**
|
|
5909
|
+
* Content hash of a single section — its loop identity. Delegates to the
|
|
5910
|
+
* campaign provenance `surfaceContentHash` (the same helper the loop's
|
|
5911
|
+
* provenance record uses for full surfaces), so a section hash is byte-for-byte
|
|
5912
|
+
* comparable with the `sha256:`-prefixed content hashes that record carries.
|
|
5913
|
+
* Two sections that render identically (same title + body) share a hash; the
|
|
5914
|
+
* `id` and `evolvable` flag are excluded — they are routing metadata, not
|
|
5915
|
+
* content.
|
|
5916
|
+
*/
|
|
5917
|
+
declare function sectionHash(section: AgentProfileSection): string;
|
|
5918
|
+
|
|
5919
|
+
type index_AgentProfile = AgentProfile;
|
|
5920
|
+
type index_AgentProfileSection = AgentProfileSection;
|
|
5921
|
+
type index_ProfileSkill = ProfileSkill;
|
|
5922
|
+
declare const index_applyDomainPatch: typeof applyDomainPatch;
|
|
5923
|
+
declare const index_baselineProfile: typeof baselineProfile;
|
|
5924
|
+
declare const index_prodProfile: typeof prodProfile;
|
|
5925
|
+
declare const index_profileToSurface: typeof profileToSurface;
|
|
5926
|
+
declare const index_renderProfile: typeof renderProfile;
|
|
5927
|
+
declare const index_sectionHash: typeof sectionHash;
|
|
5928
|
+
declare namespace index {
|
|
5929
|
+
export { type index_AgentProfile as AgentProfile, type index_AgentProfileSection as AgentProfileSection, type index_ProfileSkill as ProfileSkill, index_applyDomainPatch as applyDomainPatch, index_baselineProfile as baselineProfile, index_prodProfile as prodProfile, index_profileToSurface as profileToSurface, index_renderProfile as renderProfile, index_sectionHash as sectionHash };
|
|
5930
|
+
}
|
|
5931
|
+
|
|
5932
|
+
export { ANALYST_SEVERITIES, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, AgentProfile$1 as AgentProfile, type AgreementResult, type AlignmentOp, Analyst, AnalystContext, AnalystCost, AnalystFinding, AnalystSeverity, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, Artifact$1 as Artifact, type Artifact as ArtifactCheckArtifact, type ArtifactEventLike, type ArtifactValidator, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, type CompletionRequirement, type CompletionVerdict, type ConceptComplexity, type ConceptFinding, type ConceptSpec, type ConceptWeightStrategy, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrectnessChecker, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateSandboxPoolOpts, type CreateTraceAnalystKindOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, D1ExperimentStore, type D1ExperimentStoreOptions, type D1Like, type D1PreparedStatementLike, DEFAULT_AGENT_SLOS, DEFAULT_COMPLEXITY_WEIGHTS, DEFAULT_FINDERS, DEFAULT_HARNESS_OBJECTIVES, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_RUN_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, DEFAULT_TRACE_ANALYST_KINDS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DiffPolicy, type DiffScorecardOptions, type DirEntry, type Direction, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type ErrorCountPattern, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, type ExtractOptions, type ExtractResult, FAILURE_MODE_KIND_SPEC, FINDING_SUBJECT_GRAMMAR_PROMPT, FINDING_SUBJECT_KINDS, type FactorContribution, type FactorialCell, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FileChange, FileSystemExperimentStore, type FileSystemExperimentStoreOptions, type FindingSubject, type FindingSubjectKind, FindingSubjectStringSchema, type FindingsDiff, FindingsStore, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, type HarnessAdapter, HarnessConfig, type HarnessExperimentConfig, type HarnessExperimentResult, type HarnessIntervention, type HarnessRunRequest, type HarnessRunResult, type HarnessScenario, type HarnessSelection, type HarnessVariant, type HarnessVariantReport, HoldoutAuditor, type HostedJudgeConfig, type HostedJudgeDimension, type HostedJudgeRequest, type HostedJudgeResponse, type HostedRunCriticConfig, type HostedRunScoreRequest, type HostedRunScoreResponse, type HttpGithubClientOptions, type HypothesisManifest, type HypothesisResult, IMPROVEMENT_KIND_SPEC, INTENT_MATCH_JUDGE_VERSION, type ImageData, InMemoryExperimentStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, type JudgeAdapterOpts, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeInput, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, KIND_EXPECTED_SUBJECTS, KNOWLEDGE_GAP_KIND_SPEC, KNOWLEDGE_POISONING_KIND_SPEC, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, type LlmCorrectnessCheckerOpts, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MatchResult, type MatcherResult, type MeasurementPolicy, type MergeOptions, MetricsCollector, type MuffledFinder, type MuffledFinding, MultiLayerVerifier, type MultiToolchainLayerConfig, type Mutator, Mutex, type Objective, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParetoResult, type ParseStudentLabel, type PersistedFinding, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type ProducedProposal, type ProducedState, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposalEventLike, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, RAW_FINDING_SCHEMA_PROMPT, type RawAnalystFinding, RawAnalystFindingSchema, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepoRef, type RequirementCheck, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run$1 as Run, type RunCommandInput, type RunCommandResult, type RunConfig, RunCritic, type RunCriticAdapterOpts, type RunCriticOptions, type RunDiff, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunScore, type RunScoreWeights, type RunTrace, type RuntimeEventLike, SEMANTIC_CONCEPT_JUDGE_VERSION, SKILL_USAGE_ANALYST, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type SatisfiedBy, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SemanticConceptJudgeAdapterOpts, type SemanticConceptJudgeInput, type SemanticConceptJudgeOptions, type SemanticConceptJudgeResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, Severity, type SignedManifest, type SignedManifestAlgo, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, SkillUsageAnalyst, type SkillUsageRecord, type SkillUsageReport, type SkillUsageScanConfig, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, Span, type SplitGoldOptions, type SteeringBundle, type SteeringDelta, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type SteeringRolePrompt, type StepAttribution, type SynthesisReason, type SynthesisTarget, type TaskGold, TestResult, type ThresholdContract, TokenCounter, type TokenSpec, type ToolCallEventLike, TraceAnalysisStore, type TraceAnalystAdapterOpts, type TraceAnalystGolden, type TraceAnalystKindSpec, TraceEmitter, TraceEvent, TraceStore, type TraceToolGroupName, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UNIVERSAL_FINDERS, type ValidationContext, type ValidationIssue, type ValidationResult, type VerifierAdapterOpts, VerifyContext, VerifyOptions, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkflowTopology, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, aggregatePrReviewScore, aggregateRunScore, analyzeAntiSlop, analyzeSeries, appendScorecard, assertCrossFamily, assertSingleBackend, attributeCounterfactuals, bisect, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildSkillUsageReport, buildTraceToolsForGroup, byteLengthRange, canaryLeakView, canonicalize, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, clamp01, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, composeValidators, containsAll, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createJudgeAdapter, createLlmCorrectnessChecker, createRunCriticAdapter, createSandboxPool, createSemanticConceptJudge, createSemanticConceptJudgeAdapter, createTraceAnalystAdapter, createTraceAnalystKind, createVerifierAdapter, crossTraceDiff, crowdingDistance, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultIsMaterial, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffFindings, diffScorecard, discoverPersonas, distillPlaybook, dominates, emitSkillUsageFindings, estimateCost, estimateTokens, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, extractProducedState, fieldAgreement, fileContains, fileExists, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, precision as goldenPrecision, hashContent, hashJson, htmlContainsElement, httpGithubClient, inMemoryReferenceReplayStore, isModelPriced, isOtelConfigured, jsonHasKeys, jsonShape, jsonlReferenceReplayStore, judgeFamily, keyPreserved, liftSeverity, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, matchGoldens, mergeLayerResults, mergeSteeringBundle, multiToolchainLayer, notBlocked, paraphraseRobustness, paraphraseRobustnessScenarios, paretoFrontier, paretoFrontierWithCrowding, parseCorrectnessResponse, parseFindingSubject, parseGoldJsonl, parseRawFinding, parseReflectionResponse, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, printDriverSummary, index as profile, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatch, regexMatches, renderFindingSubject, renderMarkdownReport, renderPlaybookMarkdown, renderPriorFindings, renderSteeringText, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, resolveModelPricing, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runCounterfactual, runDistillation, runE2EWorkflow, runExpectations, runHarnessExperiment, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runSelfPlay, runSemanticConceptJudge, scalarScore, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, securityJudge, selectHarnessVariant, sentenceReorderMutator, signManifest, splitGold, statusAdvanced, summarizeHarnessResults, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toPrometheusText, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyCompletion, verifyManifest, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
package/dist/index.js
CHANGED
|
@@ -29,8 +29,9 @@ import {
|
|
|
29
29
|
runImprovementLoop,
|
|
30
30
|
scalarScore,
|
|
31
31
|
scoreRedTeamOutput,
|
|
32
|
+
surfaceContentHash,
|
|
32
33
|
toolNamesForRun
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JFGZPUMU.js";
|
|
34
35
|
import {
|
|
35
36
|
BackendIntegrityError,
|
|
36
37
|
assertRealBackend,
|
|
@@ -274,7 +275,9 @@ import {
|
|
|
274
275
|
ValidationError,
|
|
275
276
|
VerificationError
|
|
276
277
|
} from "./chunk-3BFEG2F6.js";
|
|
277
|
-
import
|
|
278
|
+
import {
|
|
279
|
+
__export
|
|
280
|
+
} from "./chunk-PZ5AY32C.js";
|
|
278
281
|
|
|
279
282
|
// src/run-score.ts
|
|
280
283
|
var DEFAULT_RUN_SCORE_WEIGHTS = {
|
|
@@ -10712,6 +10715,100 @@ function replacerSortKeys() {
|
|
|
10712
10715
|
return value;
|
|
10713
10716
|
};
|
|
10714
10717
|
}
|
|
10718
|
+
|
|
10719
|
+
// src/profile/index.ts
|
|
10720
|
+
var profile_exports = {};
|
|
10721
|
+
__export(profile_exports, {
|
|
10722
|
+
applyDomainPatch: () => applyDomainPatch,
|
|
10723
|
+
baselineProfile: () => baselineProfile,
|
|
10724
|
+
prodProfile: () => prodProfile,
|
|
10725
|
+
profileToSurface: () => profileToSurface,
|
|
10726
|
+
renderProfile: () => renderProfile,
|
|
10727
|
+
sectionHash: () => sectionHash
|
|
10728
|
+
});
|
|
10729
|
+
function renderSkill(skill) {
|
|
10730
|
+
const lines = [`### ${skill.name}`, skill.description];
|
|
10731
|
+
if (skill.triggers.length > 0) {
|
|
10732
|
+
lines.push(`Triggers: ${skill.triggers.join(", ")}`);
|
|
10733
|
+
}
|
|
10734
|
+
if (skill.scriptsDir !== void 0) {
|
|
10735
|
+
lines.push(`Scripts: ${skill.scriptsDir}`);
|
|
10736
|
+
}
|
|
10737
|
+
return lines.join("\n");
|
|
10738
|
+
}
|
|
10739
|
+
function renderProfile(p) {
|
|
10740
|
+
const zones = [
|
|
10741
|
+
p.role.trim(),
|
|
10742
|
+
`## Environment
|
|
10743
|
+
|
|
10744
|
+
${p.environment.trim()}`,
|
|
10745
|
+
`## Tool conventions
|
|
10746
|
+
|
|
10747
|
+
${p.toolConventions.trim()}`,
|
|
10748
|
+
`## Skills
|
|
10749
|
+
|
|
10750
|
+
${p.skills.length > 0 ? p.skills.map(renderSkill).join("\n\n") : "_No skills configured._"}`,
|
|
10751
|
+
`## Domain guidance
|
|
10752
|
+
|
|
10753
|
+
${p.domain.length > 0 ? p.domain.map((s) => `### ${s.title}
|
|
10754
|
+
|
|
10755
|
+
${s.body.trim()}`).join("\n\n") : "_No domain guidance yet._"}`
|
|
10756
|
+
];
|
|
10757
|
+
return zones.join("\n\n");
|
|
10758
|
+
}
|
|
10759
|
+
function profileToSurface(p) {
|
|
10760
|
+
return renderProfile(p);
|
|
10761
|
+
}
|
|
10762
|
+
var STOCK_SKILLS = [
|
|
10763
|
+
{
|
|
10764
|
+
name: "read-documents",
|
|
10765
|
+
description: "Read every source document under the read-only documents directory before drafting.",
|
|
10766
|
+
triggers: [
|
|
10767
|
+
"task references a source document",
|
|
10768
|
+
"instructions cite an exhibit, filing, or input file"
|
|
10769
|
+
]
|
|
10770
|
+
},
|
|
10771
|
+
{
|
|
10772
|
+
name: "write-deliverable",
|
|
10773
|
+
description: "Write deliverables to the output directory; use markdown for notes and the file-type skills for binary artifacts.",
|
|
10774
|
+
triggers: ["the task asks for a produced artifact", "a deliverable is named in the brief"]
|
|
10775
|
+
}
|
|
10776
|
+
];
|
|
10777
|
+
var ENVIRONMENT_PREAMBLE = "You are an AI agent executing a task within a single workspace root.\n\n- Workspace root: bash starts here. Use it for notes, scratch files, and intermediate work.\n- Documents directory: task source documents live here and are read-only \u2014 never write to them.\n- Output directory: write every deliverable here; relative write/edit paths route here automatically.\n- Skills directory: skill scripts live at <workspace>/skills/<name>/scripts/.";
|
|
10778
|
+
var TOOL_CONVENTIONS_PREAMBLE = "Use read to consume input files. Use write only for plain markdown (typically a response summary). Use edit for incremental refinement of a file you already created. External-boundary calls return typed outcomes \u2014 inspect success before using a value.";
|
|
10779
|
+
function baselineProfile(args) {
|
|
10780
|
+
return {
|
|
10781
|
+
role: args.role,
|
|
10782
|
+
environment: args.environment ?? ENVIRONMENT_PREAMBLE,
|
|
10783
|
+
toolConventions: args.toolConventions ?? TOOL_CONVENTIONS_PREAMBLE,
|
|
10784
|
+
skills: args.skills ?? STOCK_SKILLS,
|
|
10785
|
+
domain: []
|
|
10786
|
+
};
|
|
10787
|
+
}
|
|
10788
|
+
function prodProfile(baseline, shipped) {
|
|
10789
|
+
return { ...baseline, domain: [...baseline.domain, ...shipped] };
|
|
10790
|
+
}
|
|
10791
|
+
function applyDomainPatch(p, sectionId, newBody) {
|
|
10792
|
+
const idx = p.domain.findIndex((s) => s.id === sectionId);
|
|
10793
|
+
if (idx === -1) {
|
|
10794
|
+
throw new Error(
|
|
10795
|
+
`applyDomainPatch: no domain section "${sectionId}" (have: ${p.domain.map((s) => s.id).join(", ") || "<none>"})`
|
|
10796
|
+
);
|
|
10797
|
+
}
|
|
10798
|
+
const target = p.domain[idx];
|
|
10799
|
+
if (target === void 0) {
|
|
10800
|
+
throw new Error(`applyDomainPatch: domain section "${sectionId}" resolved to undefined`);
|
|
10801
|
+
}
|
|
10802
|
+
if (!target.evolvable) {
|
|
10803
|
+
throw new Error(`applyDomainPatch: domain section "${sectionId}" is not evolvable`);
|
|
10804
|
+
}
|
|
10805
|
+
const next = [...p.domain];
|
|
10806
|
+
next[idx] = { ...target, body: newBody };
|
|
10807
|
+
return { ...p, domain: next };
|
|
10808
|
+
}
|
|
10809
|
+
function sectionHash(section) {
|
|
10810
|
+
return surfaceContentHash(JSON.stringify({ title: section.title, body: section.body }));
|
|
10811
|
+
}
|
|
10715
10812
|
export {
|
|
10716
10813
|
AGENT_PROFILE_KINDS,
|
|
10717
10814
|
ANALYST_SEVERITIES,
|
|
@@ -11058,6 +11155,7 @@ export {
|
|
|
11058
11155
|
positionalBias,
|
|
11059
11156
|
printDriverSummary,
|
|
11060
11157
|
probeLlm,
|
|
11158
|
+
profile_exports as profile,
|
|
11061
11159
|
promptBisect,
|
|
11062
11160
|
proposeAutomatedPullRequest,
|
|
11063
11161
|
proposeSynthesisTargets,
|