modelrig 0.11.1 → 0.12.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.
Files changed (182) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/adapters/anthropic.d.ts +4 -4
  3. package/dist/adapters/anthropic.d.ts.map +1 -1
  4. package/dist/adapters/anthropic.js +8 -1
  5. package/dist/adapters/deepseek.d.ts +2 -4
  6. package/dist/adapters/deepseek.d.ts.map +1 -1
  7. package/dist/adapters/deepseek.js +9 -5
  8. package/dist/adapters/gemini.d.ts +4 -1
  9. package/dist/adapters/gemini.d.ts.map +1 -1
  10. package/dist/adapters/gemini.js +16 -1
  11. package/dist/adapters/grok.d.ts +2 -4
  12. package/dist/adapters/grok.d.ts.map +1 -1
  13. package/dist/adapters/grok.js +8 -4
  14. package/dist/adapters/history-mapping.d.ts +126 -0
  15. package/dist/adapters/history-mapping.d.ts.map +1 -0
  16. package/dist/adapters/history-mapping.js +230 -0
  17. package/dist/adapters/openai-compat.d.ts +2 -4
  18. package/dist/adapters/openai-compat.d.ts.map +1 -1
  19. package/dist/adapters/openai-compat.js +9 -5
  20. package/dist/adapters/openai.d.ts +2 -4
  21. package/dist/adapters/openai.d.ts.map +1 -1
  22. package/dist/adapters/openai.js +8 -4
  23. package/dist/adapters/responses-api.d.ts.map +1 -1
  24. package/dist/adapters/responses-api.js +9 -4
  25. package/dist/artifacts/artifact.d.ts.map +1 -1
  26. package/dist/artifacts/artifact.js +79 -0
  27. package/dist/artifacts/conversation.d.ts +128 -0
  28. package/dist/artifacts/conversation.d.ts.map +1 -0
  29. package/dist/artifacts/conversation.js +172 -0
  30. package/dist/artifacts/index.d.ts +1 -1
  31. package/dist/artifacts/index.d.ts.map +1 -1
  32. package/dist/artifacts/media.d.ts +46 -0
  33. package/dist/artifacts/media.d.ts.map +1 -0
  34. package/dist/artifacts/media.js +88 -0
  35. package/dist/artifacts/run-context.d.ts +61 -2
  36. package/dist/artifacts/run-context.d.ts.map +1 -1
  37. package/dist/artifacts/run-context.js +183 -12
  38. package/dist/artifacts/scrub.d.ts +3 -0
  39. package/dist/artifacts/scrub.d.ts.map +1 -1
  40. package/dist/bakeoff/engine.d.ts.map +1 -1
  41. package/dist/bakeoff/engine.js +34 -7
  42. package/dist/bakeoff/eval-cases.d.ts +5 -0
  43. package/dist/bakeoff/eval-cases.d.ts.map +1 -1
  44. package/dist/bakeoff/eval-cases.js +10 -1
  45. package/dist/bakeoff/replay.d.ts +15 -0
  46. package/dist/bakeoff/replay.d.ts.map +1 -1
  47. package/dist/bakeoff/replay.js +19 -1
  48. package/dist/bakeoff/report.d.ts.map +1 -1
  49. package/dist/bakeoff/report.js +9 -2
  50. package/dist/bakeoff/turn-replay.d.ts +93 -0
  51. package/dist/bakeoff/turn-replay.d.ts.map +1 -0
  52. package/dist/bakeoff/turn-replay.js +150 -0
  53. package/dist/bakeoff/types.d.ts +12 -0
  54. package/dist/bakeoff/types.d.ts.map +1 -1
  55. package/dist/feedback/grade.d.ts +7 -2
  56. package/dist/feedback/grade.d.ts.map +1 -1
  57. package/dist/feedback/grade.js +14 -0
  58. package/dist/feedback/outcome.d.ts +103 -0
  59. package/dist/feedback/outcome.d.ts.map +1 -0
  60. package/dist/feedback/outcome.js +175 -0
  61. package/dist/gateway/history-bridge.d.ts +32 -0
  62. package/dist/gateway/history-bridge.d.ts.map +1 -0
  63. package/dist/gateway/history-bridge.js +64 -0
  64. package/dist/gateway/serve-client.d.ts.map +1 -1
  65. package/dist/gateway/serve-client.js +6 -0
  66. package/dist/index.d.ts +44 -1
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +106 -6
  69. package/dist/init/observe.d.ts.map +1 -1
  70. package/dist/init/observe.js +3 -3
  71. package/dist/registry/build.d.ts +4 -0
  72. package/dist/registry/build.d.ts.map +1 -1
  73. package/dist/registry/generation-models.d.ts +68 -0
  74. package/dist/registry/generation-models.d.ts.map +1 -0
  75. package/dist/registry/generation-models.js +168 -0
  76. package/dist/registry/model-kind.d.ts +34 -0
  77. package/dist/registry/model-kind.d.ts.map +1 -0
  78. package/dist/registry/model-kind.js +40 -0
  79. package/dist/registry/pricing-shape.d.ts +29 -1
  80. package/dist/registry/pricing-shape.d.ts.map +1 -1
  81. package/dist/registry/pricing-shape.js +9 -0
  82. package/dist/registry/pricing.d.ts +26 -0
  83. package/dist/registry/pricing.d.ts.map +1 -1
  84. package/dist/registry/pricing.js +29 -0
  85. package/dist/registry/rows.d.ts.map +1 -1
  86. package/dist/registry/rows.js +3 -1
  87. package/dist/registry/unit-pricing.d.ts +32 -0
  88. package/dist/registry/unit-pricing.d.ts.map +1 -0
  89. package/dist/registry/unit-pricing.js +62 -0
  90. package/dist/routes/input-loader.d.ts +38 -0
  91. package/dist/routes/input-loader.d.ts.map +1 -0
  92. package/dist/routes/input-loader.js +80 -0
  93. package/dist/routes/loader.d.ts.map +1 -1
  94. package/dist/routes/loader.js +3 -0
  95. package/dist/routes/resolved-bundle.d.ts +2 -0
  96. package/dist/routes/resolved-bundle.d.ts.map +1 -1
  97. package/dist/routes/resolved-bundle.js +3 -0
  98. package/dist/run/cost.d.ts +28 -0
  99. package/dist/run/cost.d.ts.map +1 -1
  100. package/dist/run/cost.js +74 -0
  101. package/dist/run/dispatch.d.ts +4 -1
  102. package/dist/run/dispatch.d.ts.map +1 -1
  103. package/dist/run/dispatch.js +3 -0
  104. package/dist/run/limits.d.ts +88 -0
  105. package/dist/run/limits.d.ts.map +1 -0
  106. package/dist/run/limits.js +155 -0
  107. package/dist/run/messages.d.ts +199 -0
  108. package/dist/run/messages.d.ts.map +1 -0
  109. package/dist/run/messages.js +430 -0
  110. package/dist/run/raw-finalize.d.ts +5 -2
  111. package/dist/run/raw-finalize.d.ts.map +1 -1
  112. package/dist/run/raw-finalize.js +8 -5
  113. package/dist/run/raw-request.d.ts.map +1 -1
  114. package/dist/run/raw-request.js +2 -1
  115. package/dist/run/raw.d.ts +10 -4
  116. package/dist/run/raw.d.ts.map +1 -1
  117. package/dist/run/raw.js +11 -3
  118. package/dist/run/record-attempt.d.ts.map +1 -1
  119. package/dist/run/record-attempt.js +16 -6
  120. package/dist/run/record-call.d.ts +13 -2
  121. package/dist/run/record-call.d.ts.map +1 -1
  122. package/dist/run/record-call.js +50 -7
  123. package/dist/run/run.d.ts.map +1 -1
  124. package/dist/run/run.js +12 -8
  125. package/dist/telemetry/attempt-meta.d.ts +49 -1
  126. package/dist/telemetry/attempt-meta.d.ts.map +1 -1
  127. package/dist/telemetry/attempt-meta.js +45 -1
  128. package/dist/telemetry/exporter.d.ts.map +1 -1
  129. package/dist/telemetry/exporter.js +2 -1
  130. package/dist/telemetry/grade-mappers.d.ts +1 -1
  131. package/dist/telemetry/grade-mappers.d.ts.map +1 -1
  132. package/dist/telemetry/grade-mappers.js +7 -1
  133. package/dist/telemetry/grade-task.d.ts +49 -0
  134. package/dist/telemetry/grade-task.d.ts.map +1 -0
  135. package/dist/telemetry/grade-task.js +85 -0
  136. package/dist/telemetry/grades-sql.d.ts +16 -1
  137. package/dist/telemetry/grades-sql.d.ts.map +1 -1
  138. package/dist/telemetry/grades-sql.js +64 -4
  139. package/dist/telemetry/ingest-protocol.d.ts +24 -1
  140. package/dist/telemetry/ingest-protocol.d.ts.map +1 -1
  141. package/dist/telemetry/ingest-protocol.js +72 -43
  142. package/dist/telemetry/otel-content.d.ts +31 -0
  143. package/dist/telemetry/otel-content.d.ts.map +1 -0
  144. package/dist/telemetry/otel-content.js +106 -0
  145. package/dist/telemetry/otel-hierarchy.d.ts +57 -0
  146. package/dist/telemetry/otel-hierarchy.d.ts.map +1 -0
  147. package/dist/telemetry/otel-hierarchy.js +155 -0
  148. package/dist/telemetry/otel-normalize.d.ts +15 -1
  149. package/dist/telemetry/otel-normalize.d.ts.map +1 -1
  150. package/dist/telemetry/otel-normalize.js +24 -39
  151. package/dist/telemetry/sinks.d.ts +4 -1
  152. package/dist/telemetry/sinks.d.ts.map +1 -1
  153. package/dist/telemetry/sinks.js +53 -34
  154. package/dist/telemetry/store-migrations.d.ts.map +1 -1
  155. package/dist/telemetry/store-migrations.js +8 -0
  156. package/dist/telemetry/store.d.ts +9 -0
  157. package/dist/telemetry/store.d.ts.map +1 -1
  158. package/dist/telemetry/store.js +10 -0
  159. package/dist/telemetry/uniform-rows.d.ts +43 -0
  160. package/dist/telemetry/uniform-rows.d.ts.map +1 -0
  161. package/dist/telemetry/uniform-rows.js +139 -0
  162. package/dist/types/failures-teaching.d.ts.map +1 -1
  163. package/dist/types/failures-teaching.js +11 -0
  164. package/dist/types/failures.d.ts +1 -1
  165. package/dist/types/failures.d.ts.map +1 -1
  166. package/dist/types/failures.js +2 -0
  167. package/dist/types/provider.d.ts +12 -0
  168. package/dist/types/provider.d.ts.map +1 -1
  169. package/dist/types/route.d.ts +13 -0
  170. package/dist/types/route.d.ts.map +1 -1
  171. package/dist/types/telemetry.d.ts +14 -1
  172. package/dist/types/telemetry.d.ts.map +1 -1
  173. package/docs/agent-skill/SKILL.md +16 -3
  174. package/docs/how-it-fits.md +3 -3
  175. package/docs/instrumentation.md +15 -6
  176. package/docs/llms.txt +55 -7
  177. package/docs/mcp-oracle.md +15 -4
  178. package/docs/quickstart.md +6 -5
  179. package/package.json +4 -2
  180. package/registry/registry.json +456 -0
  181. package/templates/creative-approval.json +81 -0
  182. package/templates/support-conversation.json +82 -0
package/dist/index.js CHANGED
@@ -24,12 +24,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
24
24
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
25
25
  };
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.redactApiKey = exports.looksLikeApiKey = exports.hashApiKeySecret = exports.API_KEY_SECRET_BYTES = exports.API_KEY_SCOPES = exports.API_KEY_PREFIX = exports.resolveArtifactsConfig = exports.createToolRegistry = exports.SlotResolutionError = exports.assemblePrompt = exports.createEmbeddedPrompts = exports.createPromptResolver = exports.parseServedPrompt = exports.createPromptCache = exports.createApiPromptFetcher = exports.promptTemplateSha = exports.normalizeManifest = exports.parseAuthoringDoc = exports.assertValidManifest = exports.validateManifest = exports.resolveOtlpConfig = exports.parseOtlpHeaders = exports.decodeOtlpProtobufTraces = exports.looksLikeLogsPayload = exports.normalizeOtlpTraces = exports.startOtlpEmitterIfConfigured = exports.createOtlpEmitter = exports.TRACEPARENT_TAG = exports.parseTraceparent = exports.buildExportTraceRequest = exports.inferenceToSpan = exports.SEMCONV_VERSION = exports.SinkSendError = exports.createDirectSink = exports.createApiSink = exports.createTelemetryExporter = exports.RESERVED_TAG_KEYS = exports.resolvePipelineSha = exports.reservedTagNearMisses = exports.renderRequestForHash = exports.sanitizeMetaForWire = exports.isMetaSafeString = exports.summarizeAttemptMeta = exports.DEFAULT_INGEST_URL = exports.INGEST_PROTOCOL_VERSION_V1 = exports.INGEST_PROTOCOL_VERSION = exports.INGEST_PATH = exports.foreignOrgGrades = exports.stampBatch = exports.loadConfigFromEnv = void 0;
28
- exports.SSE_DONE = exports.MODELRIG_REQUEST_HEADERS = exports.MODELRIG_HEADERS = exports.GATEWAY_PROTOCOL_VERSION = exports.MODELS_PATH = exports.CHAT_COMPLETIONS_PATH = exports.classifyLane = exports.ALL_CAPABILITY_FLAGS = exports.PROVIDER_IDS = exports.RAW_ONLY_FIX_HINT = exports.rawOnlyRouteFailure = exports.requireRoutesDir = exports.RECORDED_TOOLTIP = exports.RECORDED_BADGE = exports.EXTERNAL_LANE = exports.RAW_LANE = exports.callLaneOf = exports.isRoutedLane = exports.runRawStream = exports.runRaw = exports.resolveCallConfigForRun = exports.hashUnitKey = exports.armName = exports.drawArm = exports.narrowExperiment = exports.pinFromResolved = exports.parseCallConfig = exports.narrowCallConfigPin = exports.getCallConfig = exports.createCallConfigResolver = exports.createApiCallConfigFetcher = exports.applyCallConfig = exports.assertMirrorSafe = exports.hashResolvedBundle = exports.resolveRouteBundle = exports.bundleFromResolved = exports.runStream = exports.evalCaseCaptureStore = exports.selectEvalCaseCaptures = exports.runBakeoffFromEvalCases = exports.extractEvidenceQuotes = exports.groundednessScore = exports.resolveDeterministicQuality = exports.fieldAccuracy = exports.exactMatch = exports.KEY_SHAPED_PREFIXES = exports.containsKeyShapedString = exports.scrubSecrets = exports.hasScope = exports.parseScopes = void 0;
29
- exports.serveabilityWarnings = exports.checkServeability = exports.writeRouteDraft = exports.buildRouteDraft = exports.splitModelKey = exports.seedCandidates = exports.loadRegistryRows = exports.signatureFor = exports.PROVIDER_SIGNATURES = exports.readObjectLiteral = exports.findCallSitesInText = exports.scanRepoForCallSites = exports.capabilitiesFor = exports.routeNameFor = exports.buildMigrationMarkdown = exports.runInit = exports.renderConfigErrorForTerminal = exports.describeConfigFailure = exports.teachConfigError = exports.classifyConfigProblem = exports.CONFIG_TEACHING = exports.mergeLoadedRoutes = exports.loadRoutesWithExtra = exports.loadRoutes = exports.RouteConfigError = exports.renderFailureForTerminal = exports.teach = exports.FAILURE_TEACHING = exports.isRigFailure = exports.RigFailureError = exports.extractCitations = exports.createTavilySearchProvider = exports.sampleQuality = exports.pairedRegret = exports.wilson95 = exports.aggregateVariantMetrics = exports.OUTPUT_MAX_BYTES = exports.retentionExpiry = exports.truncateOutput = exports.selectArmsToKeep = exports.buildBakeoffSamples = exports.createBakeoffSamplesClient = exports.deriveSwapDirection = exports.bakeoffEvidence = exports.computeProposal = exports.mirrorBakeoff = exports.runBakeoff = exports.replayVariant = exports.openTelemetryStore = exports.openCaptureStore = void 0;
30
- exports.RUNG1_MIN_GRADES = exports.computeCoverage = exports.computeParity = exports.factsUnderCredential = exports.factsFor = exports.PROBE_FRESHNESS_SLO_DAYS = exports.stalenessSentence = exports.probeFreshness = exports.callNotesFor = exports.evaluateChallengerEligibility = exports.requirementPredicates = exports.PREDICATE_GLOSS = exports.ALL_CAPABILITY_PREDICATES = exports.explainEmptySelection = exports.hasCapability = exports.selectModels = exports.parseCapabilityQuery = exports.capabilityFactsFromEntry = exports.loadRegistryFacts = exports.fingerprintSchema = exports.loadManifest = exports.SNAPSHOT_BASIS = exports.describePricingV2 = exports.tierRates = exports.synthesizeFromFlat = exports.seededCachePolicyProviders = exports.getCachePolicy = exports.DEFAULT_CACHE_HYSTERESIS = exports.classifyCacheVerdict = exports.effectiveInputRate = exports.estimateCostUsd = exports.getPricingV2 = exports.getPricing = exports.resolveCandidates = exports.OPENAI_COMPAT_HOSTS = exports.shapeFireworksModelId = exports.classifyCompatFailure = exports.buildOpenAICompatParams = exports.createOpenAICompatAdapter = exports.createGrokAdapter = exports.createAnthropicAdapter = exports.createDeepSeekAdapter = exports.createOpenAIAdapter = exports.destinationSupported = exports.servedDestinations = exports.DEFAULT_DESTINATION = exports.DESTINATIONS = exports.GEMINI_THINKING_CAPABLE_MODELS = exports.createGeminiAdapter = exports.PROVIDER_KEY_ENV = void 0;
31
- exports.ANALYTICS_SCAN_CAP = exports.selectableColumnsAreMetaSafe = exports.planAnalyticsRead = exports.evaluateAnalyticsQuery = exports.describeAnalyticsSchema = exports.parseQuery = exports.QueryGrammarError = exports.compileQuery = exports.writePriorsCells = exports.aggregatePairwiseFromTelemetry = exports.aggregatePriors = exports.DEFAULT_WATCH_MONTHLY_USD = exports.watchEnvelopeKey = exports.reserveWatchBudget = exports.WATCH_STATE_KEY = exports.createFileWatchStateStore = exports.createControlPlaneWatchStateStore = exports.createWatchStateStore = exports.saveWatchState = exports.loadWatchState = exports.computeWatchEvents = exports.buildPriceUniverse = exports.runWatchCycle = exports.DEFAULT_MONITOR_CONFIG = exports.createMonitorReads = exports.rollupConformRate = exports.evaluateConformDegradation = exports.runMonitorCycle = exports.assertTransition = exports.createProposalsClient = exports.MONITOR_SOURCE_PREFIX = exports.MONITOR_CYCLE_MARKER = exports.REGRET_MONITOR_MARGIN = exports.REGRET_MONITOR_MIN_N = exports.REGRET_MONITOR_BASELINE_DAYS = exports.REGRET_MONITOR_WINDOW_DAYS = exports.createRegretMonitorReads = exports.regretMonitorConfig = exports.cyclePointFromArtifact = exports.aggregateRegretBand = exports.evaluateRegretDrift = exports.runRegretMonitorCycle = exports.evaluateUpgradeOpportunities = exports.explainCacheContext = exports.PROPOSAL_TTL_DAYS = exports.regretBreachTriggerHash = exports.upgradeTriggerHash = exports.manualChallengerTriggerHash = exports.triggerHash = exports.evaluateEvents = void 0;
32
- exports.computeOdometer = exports.createSwapsClient = exports.executeSwap = exports.trialVariantName = exports.buildDeclareTrialChange = exports.buildRestoreYaml = exports.buildSwapChange = exports.runTelemetryQuery = exports.RESERVED_DIMENSION_NAMES = exports.METRIC_COLUMNS = exports.DIMENSION_COLUMNS = exports.sinceIsoFor = exports.savedQueryById = exports.SAVED_QUERIES = void 0;
27
+ exports.looksLikeApiKey = exports.hashApiKeySecret = exports.API_KEY_SECRET_BYTES = exports.API_KEY_SCOPES = exports.API_KEY_PREFIX = exports.resolveArtifactsConfig = exports.createToolRegistry = exports.SlotResolutionError = exports.assemblePrompt = exports.createEmbeddedPrompts = exports.createPromptResolver = exports.parseServedPrompt = exports.createPromptCache = exports.createApiPromptFetcher = exports.promptTemplateSha = exports.normalizeManifest = exports.parseAuthoringDoc = exports.assertValidManifest = exports.validateManifest = exports.resolveOtlpConfig = exports.parseOtlpHeaders = exports.decodeOtlpProtobufTraces = exports.looksLikeLogsPayload = exports.normalizeOtlpTraces = exports.startOtlpEmitterIfConfigured = exports.createOtlpEmitter = exports.TRACEPARENT_TAG = exports.parseTraceparent = exports.buildExportTraceRequest = exports.inferenceToSpan = exports.SEMCONV_VERSION = exports.SinkSendError = exports.createDirectSink = exports.createApiSink = exports.createTelemetryExporter = exports.RESERVED_TAG_KEYS = exports.resolvePipelineSha = exports.reservedTagNearMisses = exports.renderRequestForHash = exports.sanitizeMetaForWire = exports.isMetaSafeString = exports.summarizeAttemptMeta = exports.DEFAULT_INGEST_URL = exports.INGEST_PROTOCOL_VERSION_V1 = exports.INGEST_PROTOCOL_VERSION = exports.INGEST_PATH = exports.foreignOrgGrades = exports.stepTaskRegistration = exports.stampBatch = exports.loadConfigFromEnv = void 0;
28
+ exports.PROVIDER_IDS = exports.RAW_ONLY_FIX_HINT = exports.rawOnlyRouteFailure = exports.requireRoutesDir = exports.MAX_REGISTERED_STEPS_PER_BATCH = exports.TASK_NAME_RULE = exports.TASK_NAME_PATTERN = exports.isValidTaskName = exports.registrableStepTasks = exports.stepTaskOf = exports.gradeTaskOf = exports.RECORDED_TOOLTIP = exports.RECORDED_BADGE = exports.EXTERNAL_LANE = exports.RAW_LANE = exports.callLaneOf = exports.isRoutedLane = exports.runRawStream = exports.runRaw = exports.resolveCallConfigForRun = exports.hashUnitKey = exports.armName = exports.drawArm = exports.narrowExperiment = exports.pinFromResolved = exports.parseCallConfig = exports.narrowCallConfigPin = exports.getCallConfig = exports.createCallConfigResolver = exports.createApiCallConfigFetcher = exports.applyCallConfig = exports.assertMirrorSafe = exports.hashResolvedBundle = exports.resolveRouteBundle = exports.bundleFromResolved = exports.runStream = exports.evalCaseCaptureStore = exports.selectEvalCaseCaptures = exports.runBakeoffFromEvalCases = exports.extractEvidenceQuotes = exports.groundednessScore = exports.resolveDeterministicQuality = exports.fieldAccuracy = exports.exactMatch = exports.KEY_SHAPED_PREFIXES = exports.containsKeyShapedString = exports.scrubSecrets = exports.hasScope = exports.parseScopes = exports.redactApiKey = void 0;
29
+ exports.PROVIDER_SIGNATURES = exports.readObjectLiteral = exports.findCallSitesInText = exports.scanRepoForCallSites = exports.capabilitiesFor = exports.routeNameFor = exports.buildMigrationMarkdown = exports.runInit = exports.renderConfigErrorForTerminal = exports.describeConfigFailure = exports.teachConfigError = exports.classifyConfigProblem = exports.CONFIG_TEACHING = exports.mergeLoadedRoutes = exports.loadRoutesWithExtra = exports.loadRoutes = exports.RouteConfigError = exports.renderFailureForTerminal = exports.teach = exports.FAILURE_TEACHING = exports.isRigFailure = exports.RigFailureError = exports.extractCitations = exports.createTavilySearchProvider = exports.sampleQuality = exports.pairedRegret = exports.wilson95 = exports.aggregateVariantMetrics = exports.OUTPUT_MAX_BYTES = exports.retentionExpiry = exports.truncateOutput = exports.selectArmsToKeep = exports.buildBakeoffSamples = exports.createBakeoffSamplesClient = exports.deriveSwapDirection = exports.bakeoffEvidence = exports.computeProposal = exports.mirrorBakeoff = exports.runBakeoff = exports.replayVariant = exports.openTelemetryStore = exports.openCaptureStore = exports.SSE_DONE = exports.MODELRIG_REQUEST_HEADERS = exports.MODELRIG_HEADERS = exports.GATEWAY_PROTOCOL_VERSION = exports.MODELS_PATH = exports.CHAT_COMPLETIONS_PATH = exports.classifyLane = exports.ALL_CAPABILITY_FLAGS = void 0;
30
+ exports.callNotesFor = exports.evaluateChallengerEligibility = exports.requirementPredicates = exports.PREDICATE_GLOSS = exports.ALL_CAPABILITY_PREDICATES = exports.explainEmptySelection = exports.hasCapability = exports.selectModels = exports.parseCapabilityQuery = exports.capabilityFactsFromEntry = exports.loadRegistryFacts = exports.fingerprintSchema = exports.loadManifest = exports.SNAPSHOT_BASIS = exports.describePricingV2 = exports.tierRates = exports.synthesizeFromFlat = exports.seededCachePolicyProviders = exports.getCachePolicy = exports.DEFAULT_CACHE_HYSTERESIS = exports.classifyCacheVerdict = exports.effectiveInputRate = exports.estimateCostUsd = exports.getPricingV2 = exports.getPricing = exports.resolveCandidates = exports.OPENAI_COMPAT_HOSTS = exports.shapeFireworksModelId = exports.classifyCompatFailure = exports.buildOpenAICompatParams = exports.createOpenAICompatAdapter = exports.createGrokAdapter = exports.createAnthropicAdapter = exports.createDeepSeekAdapter = exports.createOpenAIAdapter = exports.destinationSupported = exports.servedDestinations = exports.DEFAULT_DESTINATION = exports.DESTINATIONS = exports.GEMINI_THINKING_CAPABLE_MODELS = exports.createGeminiAdapter = exports.PROVIDER_KEY_ENV = exports.serveabilityWarnings = exports.checkServeability = exports.writeRouteDraft = exports.buildRouteDraft = exports.splitModelKey = exports.seedCandidates = exports.loadRegistryRows = exports.signatureFor = void 0;
31
+ exports.writePriorsCells = exports.aggregatePairwiseFromTelemetry = exports.aggregatePriors = exports.DEFAULT_WATCH_MONTHLY_USD = exports.watchEnvelopeKey = exports.reserveWatchBudget = exports.WATCH_STATE_KEY = exports.createFileWatchStateStore = exports.createControlPlaneWatchStateStore = exports.createWatchStateStore = exports.saveWatchState = exports.loadWatchState = exports.computeWatchEvents = exports.buildPriceUniverse = exports.runWatchCycle = exports.DEFAULT_MONITOR_CONFIG = exports.createMonitorReads = exports.rollupConformRate = exports.evaluateConformDegradation = exports.runMonitorCycle = exports.assertTransition = exports.createProposalsClient = exports.MONITOR_SOURCE_PREFIX = exports.MONITOR_CYCLE_MARKER = exports.REGRET_MONITOR_MARGIN = exports.REGRET_MONITOR_MIN_N = exports.REGRET_MONITOR_BASELINE_DAYS = exports.REGRET_MONITOR_WINDOW_DAYS = exports.createRegretMonitorReads = exports.regretMonitorConfig = exports.cyclePointFromArtifact = exports.aggregateRegretBand = exports.evaluateRegretDrift = exports.runRegretMonitorCycle = exports.evaluateUpgradeOpportunities = exports.explainCacheContext = exports.PROPOSAL_TTL_DAYS = exports.regretBreachTriggerHash = exports.upgradeTriggerHash = exports.manualChallengerTriggerHash = exports.triggerHash = exports.evaluateEvents = exports.RUNG1_MIN_GRADES = exports.computeCoverage = exports.computeParity = exports.factsUnderCredential = exports.factsFor = exports.PROBE_FRESHNESS_SLO_DAYS = exports.stalenessSentence = exports.probeFreshness = void 0;
32
+ exports.turnNumberOf = exports.turnStepKey = exports.TURN_STEP_PREFIX = exports.toWireGrade = exports.OUTCOME_GRADER_PREFIX = exports.OUTCOME_NAME_PATTERN = exports.OutcomeValidationError = exports.uuidV5 = exports.outcomeGradeId = exports.deriveOutcomeScore = exports.outcomeGraderName = exports.outcomeSubject = exports.buildOutcomeGradeRow = exports.isSingleUserTurn = exports.chatSystemPrompt = exports.chatMessagesToHistory = exports.chatMessagesAsRouteHistory = exports.chatHistoryIsValid = exports.TurnReplayRefusedError = exports.turnReplayCase = exports.assertTurnReplayAllowed = exports.renderForCapture = exports.parseCaptureInput = exports.MESSAGES_CAPTURE_KIND = exports.MessagesInputError = exports.historyProblems = exports.canonicalizeHistory = exports.assertValidHistory = exports.computeOdometer = exports.createSwapsClient = exports.executeSwap = exports.trialVariantName = exports.buildDeclareTrialChange = exports.buildRestoreYaml = exports.buildSwapChange = exports.runTelemetryQuery = exports.RESERVED_DIMENSION_NAMES = exports.METRIC_COLUMNS = exports.DIMENSION_COLUMNS = exports.sinceIsoFor = exports.savedQueryById = exports.SAVED_QUERIES = exports.ANALYTICS_SCAN_CAP = exports.selectableColumnsAreMetaSafe = exports.planAnalyticsRead = exports.evaluateAnalyticsQuery = exports.describeAnalyticsSchema = exports.parseQuery = exports.QueryGrammarError = exports.compileQuery = void 0;
33
+ exports.UNSCREENED_MEDIA = exports.MEDIA_TYPE_PREFIXES = exports.MEDIA_MIME_ALLOWLIST = exports.isAllowedMediaType = exports.isMediaType = exports.CONTENT_OUTPUT_CHAIN = exports.CONTENT_INPUT_CHAIN = exports.extractGenerationContent = exports.numberTurns = exports.operationClassOf = exports.mergeGenerationEntries = exports.generationRegistryEntries = exports.buildGenerationLayer = exports.GENERATION_SNAPSHOT = exports.GENERATION_SOURCES = exports.nonRankableKeys = exports.isRankable = exports.kindOf = exports.isModelKind = exports.MODEL_KINDS = exports.getMapUnitRates = exports.estimateUnitCostUsd = exports.cleanUnits = exports.UNIT_KEYS = exports.runLimitRefusal = exports.enforceRunLimits = exports.limitFailureReason = exports.validateRunLimits = exports.toolCallSignature = exports.initialLimitState = exports.accumulateRunLimits = exports.checkRunLimits = exports.RunLimitExceeded = exports.LIMIT_FAILURE_REASONS = exports.RUN_TRIGGERS = exports.TurnCounter = exports.maxTurnOf = void 0;
33
34
  exports.createRig = createRig;
34
35
  const build_adapters_1 = require("./adapters/build-adapters");
35
36
  const config_1 = require("./config");
@@ -56,6 +57,7 @@ const status_1 = require("./status");
56
57
  const deprecations_1 = require("./deprecations");
57
58
  const otlp_emitter_1 = require("./telemetry/otlp-emitter");
58
59
  const grade_1 = require("./feedback/grade");
60
+ const outcome_1 = require("./feedback/outcome"); // ARC-α
59
61
  const facts_1 = require("./registry/facts");
60
62
  const engine_1 = require("./bakeoff/engine");
61
63
  const replay_1 = require("./bakeoff/replay");
@@ -254,6 +256,8 @@ function createRig(config) {
254
256
  },
255
257
  recordCall: (input) => (0, record_call_1.recordCall)(rawDeps, input),
256
258
  grade: gradeApi.grade,
259
+ outcome: (0, outcome_1.makeOutcomeApi)(telemetry).outcome, // ARC-α (ARC-3)
260
+ conversation: (id, opts) => artifactNamespace.run.conversation(id, opts), // ARC-α (ARC-1)
257
261
  replay(route, opts) {
258
262
  return (0, replay_1.replayVariant)(deps, captureStoreForReplay(), {
259
263
  route,
@@ -341,6 +345,7 @@ Object.defineProperty(exports, "loadConfigFromEnv", { enumerable: true, get: fun
341
345
  // prettier-ignore
342
346
  var ingest_protocol_1 = require("./telemetry/ingest-protocol");
343
347
  Object.defineProperty(exports, "stampBatch", { enumerable: true, get: function () { return ingest_protocol_1.stampBatch; } });
348
+ Object.defineProperty(exports, "stepTaskRegistration", { enumerable: true, get: function () { return ingest_protocol_1.stepTaskRegistration; } });
344
349
  Object.defineProperty(exports, "foreignOrgGrades", { enumerable: true, get: function () { return ingest_protocol_1.foreignOrgGrades; } });
345
350
  Object.defineProperty(exports, "INGEST_PATH", { enumerable: true, get: function () { return ingest_protocol_1.INGEST_PATH; } });
346
351
  Object.defineProperty(exports, "INGEST_PROTOCOL_VERSION", { enumerable: true, get: function () { return ingest_protocol_1.INGEST_PROTOCOL_VERSION; } });
@@ -481,6 +486,14 @@ Object.defineProperty(exports, "RAW_LANE", { enumerable: true, get: function ()
481
486
  Object.defineProperty(exports, "EXTERNAL_LANE", { enumerable: true, get: function () { return lanes_1.EXTERNAL_LANE; } });
482
487
  Object.defineProperty(exports, "RECORDED_BADGE", { enumerable: true, get: function () { return lanes_1.RECORDED_BADGE; } });
483
488
  Object.defineProperty(exports, "RECORDED_TOOLTIP", { enumerable: true, get: function () { return lanes_1.RECORDED_TOOLTIP; } });
489
+ var grade_task_1 = require("./telemetry/grade-task");
490
+ Object.defineProperty(exports, "gradeTaskOf", { enumerable: true, get: function () { return grade_task_1.gradeTaskOf; } });
491
+ Object.defineProperty(exports, "stepTaskOf", { enumerable: true, get: function () { return grade_task_1.stepTaskOf; } });
492
+ Object.defineProperty(exports, "registrableStepTasks", { enumerable: true, get: function () { return grade_task_1.registrableStepTasks; } });
493
+ Object.defineProperty(exports, "isValidTaskName", { enumerable: true, get: function () { return grade_task_1.isValidTaskName; } });
494
+ Object.defineProperty(exports, "TASK_NAME_PATTERN", { enumerable: true, get: function () { return grade_task_1.TASK_NAME_PATTERN; } });
495
+ Object.defineProperty(exports, "TASK_NAME_RULE", { enumerable: true, get: function () { return grade_task_1.TASK_NAME_RULE; } });
496
+ Object.defineProperty(exports, "MAX_REGISTERED_STEPS_PER_BATCH", { enumerable: true, get: function () { return grade_task_1.MAX_REGISTERED_STEPS_PER_BATCH; } });
484
497
  // CE-8 runRaw-only (routesDir: null): the string-narrowing guard route-required
485
498
  // consumers (server, oracle) use, plus the teaching failure it throws.
486
499
  var rawonly_2 = require("./run/rawonly");
@@ -745,3 +758,90 @@ var swaps_client_1 = require("./savings/swaps-client");
745
758
  Object.defineProperty(exports, "createSwapsClient", { enumerable: true, get: function () { return swaps_client_1.createSwapsClient; } });
746
759
  var odometer_1 = require("./savings/odometer");
747
760
  Object.defineProperty(exports, "computeOdometer", { enumerable: true, get: function () { return odometer_1.computeOdometer; } });
761
+ // ── ARC-β: messages-native lane (agent-archetypes spec §4) ──────────────────
762
+ // `rig.run(route, { input, messages })` on an `input: messages` route, and `runRaw({ ..., messages })`.
763
+ // The spec's `ChatMessage` is exported as `HistoryMessage` (`ChatMessage` is the gateway's OpenAI wire type).
764
+ var messages_1 = require("./run/messages");
765
+ Object.defineProperty(exports, "assertValidHistory", { enumerable: true, get: function () { return messages_1.assertValidHistory; } });
766
+ Object.defineProperty(exports, "canonicalizeHistory", { enumerable: true, get: function () { return messages_1.canonicalize; } });
767
+ Object.defineProperty(exports, "historyProblems", { enumerable: true, get: function () { return messages_1.historyProblems; } });
768
+ Object.defineProperty(exports, "MessagesInputError", { enumerable: true, get: function () { return messages_1.MessagesInputError; } });
769
+ Object.defineProperty(exports, "MESSAGES_CAPTURE_KIND", { enumerable: true, get: function () { return messages_1.MESSAGES_CAPTURE_KIND; } });
770
+ Object.defineProperty(exports, "parseCaptureInput", { enumerable: true, get: function () { return messages_1.parseCaptureInput; } });
771
+ Object.defineProperty(exports, "renderForCapture", { enumerable: true, get: function () { return messages_1.renderForCapture; } });
772
+ var turn_replay_1 = require("./bakeoff/turn-replay"); // turn replay (M15 guard)
773
+ Object.defineProperty(exports, "assertTurnReplayAllowed", { enumerable: true, get: function () { return turn_replay_1.assertTurnReplayAllowed; } });
774
+ Object.defineProperty(exports, "turnReplayCase", { enumerable: true, get: function () { return turn_replay_1.turnReplayCase; } });
775
+ Object.defineProperty(exports, "TurnReplayRefusedError", { enumerable: true, get: function () { return turn_replay_1.TurnReplayRefusedError; } });
776
+ var history_bridge_1 = require("./gateway/history-bridge"); // gateway pass-through
777
+ Object.defineProperty(exports, "chatHistoryIsValid", { enumerable: true, get: function () { return history_bridge_1.chatHistoryIsValid; } });
778
+ Object.defineProperty(exports, "chatMessagesAsRouteHistory", { enumerable: true, get: function () { return history_bridge_1.chatMessagesAsRouteHistory; } });
779
+ Object.defineProperty(exports, "chatMessagesToHistory", { enumerable: true, get: function () { return history_bridge_1.chatMessagesToHistory; } });
780
+ Object.defineProperty(exports, "chatSystemPrompt", { enumerable: true, get: function () { return history_bridge_1.chatSystemPrompt; } });
781
+ Object.defineProperty(exports, "isSingleUserTurn", { enumerable: true, get: function () { return history_bridge_1.isSingleUserTurn; } });
782
+ // ── ARC-α (agent archetypes: conversations, outcomes, run limits) — append-only block (roadmap §4). ──
783
+ var outcome_2 = require("./feedback/outcome");
784
+ Object.defineProperty(exports, "buildOutcomeGradeRow", { enumerable: true, get: function () { return outcome_2.buildOutcomeGradeRow; } });
785
+ Object.defineProperty(exports, "outcomeSubject", { enumerable: true, get: function () { return outcome_2.outcomeSubject; } });
786
+ Object.defineProperty(exports, "outcomeGraderName", { enumerable: true, get: function () { return outcome_2.outcomeGraderName; } });
787
+ Object.defineProperty(exports, "deriveOutcomeScore", { enumerable: true, get: function () { return outcome_2.deriveOutcomeScore; } });
788
+ Object.defineProperty(exports, "outcomeGradeId", { enumerable: true, get: function () { return outcome_2.outcomeGradeId; } });
789
+ Object.defineProperty(exports, "uuidV5", { enumerable: true, get: function () { return outcome_2.uuidV5; } });
790
+ Object.defineProperty(exports, "OutcomeValidationError", { enumerable: true, get: function () { return outcome_2.OutcomeValidationError; } });
791
+ Object.defineProperty(exports, "OUTCOME_NAME_PATTERN", { enumerable: true, get: function () { return outcome_2.OUTCOME_NAME_PATTERN; } });
792
+ Object.defineProperty(exports, "OUTCOME_GRADER_PREFIX", { enumerable: true, get: function () { return outcome_2.OUTCOME_GRADER_PREFIX; } });
793
+ var grade_mappers_1 = require("./telemetry/grade-mappers");
794
+ Object.defineProperty(exports, "toWireGrade", { enumerable: true, get: function () { return grade_mappers_1.toWireGrade; } });
795
+ var conversation_1 = require("./artifacts/conversation");
796
+ Object.defineProperty(exports, "TURN_STEP_PREFIX", { enumerable: true, get: function () { return conversation_1.TURN_STEP_PREFIX; } });
797
+ Object.defineProperty(exports, "turnStepKey", { enumerable: true, get: function () { return conversation_1.turnStepKey; } });
798
+ Object.defineProperty(exports, "turnNumberOf", { enumerable: true, get: function () { return conversation_1.turnNumberOf; } });
799
+ Object.defineProperty(exports, "maxTurnOf", { enumerable: true, get: function () { return conversation_1.maxTurnOf; } });
800
+ Object.defineProperty(exports, "TurnCounter", { enumerable: true, get: function () { return conversation_1.TurnCounter; } });
801
+ var attempt_meta_2 = require("./telemetry/attempt-meta");
802
+ Object.defineProperty(exports, "RUN_TRIGGERS", { enumerable: true, get: function () { return attempt_meta_2.RUN_TRIGGERS; } });
803
+ Object.defineProperty(exports, "LIMIT_FAILURE_REASONS", { enumerable: true, get: function () { return attempt_meta_2.LIMIT_FAILURE_REASONS; } });
804
+ var limits_1 = require("./run/limits");
805
+ Object.defineProperty(exports, "RunLimitExceeded", { enumerable: true, get: function () { return limits_1.RunLimitExceeded; } });
806
+ Object.defineProperty(exports, "checkRunLimits", { enumerable: true, get: function () { return limits_1.checkRunLimits; } });
807
+ Object.defineProperty(exports, "accumulateRunLimits", { enumerable: true, get: function () { return limits_1.accumulate; } });
808
+ Object.defineProperty(exports, "initialLimitState", { enumerable: true, get: function () { return limits_1.initialLimitState; } });
809
+ Object.defineProperty(exports, "toolCallSignature", { enumerable: true, get: function () { return limits_1.toolCallSignature; } });
810
+ Object.defineProperty(exports, "validateRunLimits", { enumerable: true, get: function () { return limits_1.validateRunLimits; } });
811
+ Object.defineProperty(exports, "limitFailureReason", { enumerable: true, get: function () { return limits_1.limitFailureReason; } });
812
+ var run_context_1 = require("./artifacts/run-context");
813
+ Object.defineProperty(exports, "enforceRunLimits", { enumerable: true, get: function () { return run_context_1.enforceRunLimits; } });
814
+ Object.defineProperty(exports, "runLimitRefusal", { enumerable: true, get: function () { return run_context_1.runLimitRefusal; } });
815
+ // ── ARC-γ (agent archetypes: generated media, OTLP-in v1) — append-only block (roadmap §4). ──
816
+ var attempt_meta_3 = require("./telemetry/attempt-meta");
817
+ Object.defineProperty(exports, "UNIT_KEYS", { enumerable: true, get: function () { return attempt_meta_3.UNIT_KEYS; } });
818
+ Object.defineProperty(exports, "cleanUnits", { enumerable: true, get: function () { return attempt_meta_3.cleanUnits; } });
819
+ var cost_1 = require("./run/cost");
820
+ Object.defineProperty(exports, "estimateUnitCostUsd", { enumerable: true, get: function () { return cost_1.estimateUnitCostUsd; } });
821
+ var pricing_2 = require("./registry/pricing");
822
+ Object.defineProperty(exports, "getMapUnitRates", { enumerable: true, get: function () { return pricing_2.getMapUnitRates; } });
823
+ var model_kind_1 = require("./registry/model-kind");
824
+ Object.defineProperty(exports, "MODEL_KINDS", { enumerable: true, get: function () { return model_kind_1.MODEL_KINDS; } });
825
+ Object.defineProperty(exports, "isModelKind", { enumerable: true, get: function () { return model_kind_1.isModelKind; } });
826
+ Object.defineProperty(exports, "kindOf", { enumerable: true, get: function () { return model_kind_1.kindOf; } });
827
+ Object.defineProperty(exports, "isRankable", { enumerable: true, get: function () { return model_kind_1.isRankable; } });
828
+ Object.defineProperty(exports, "nonRankableKeys", { enumerable: true, get: function () { return model_kind_1.nonRankableKeys; } });
829
+ var generation_models_1 = require("./registry/generation-models");
830
+ Object.defineProperty(exports, "GENERATION_SOURCES", { enumerable: true, get: function () { return generation_models_1.GENERATION_SOURCES; } });
831
+ Object.defineProperty(exports, "GENERATION_SNAPSHOT", { enumerable: true, get: function () { return generation_models_1.GENERATION_SNAPSHOT; } });
832
+ Object.defineProperty(exports, "buildGenerationLayer", { enumerable: true, get: function () { return generation_models_1.buildGenerationLayer; } });
833
+ Object.defineProperty(exports, "generationRegistryEntries", { enumerable: true, get: function () { return generation_models_1.generationRegistryEntries; } });
834
+ Object.defineProperty(exports, "mergeGenerationEntries", { enumerable: true, get: function () { return generation_models_1.mergeGenerationEntries; } });
835
+ var otel_hierarchy_1 = require("./telemetry/otel-hierarchy");
836
+ Object.defineProperty(exports, "operationClassOf", { enumerable: true, get: function () { return otel_hierarchy_1.operationClassOf; } });
837
+ Object.defineProperty(exports, "numberTurns", { enumerable: true, get: function () { return otel_hierarchy_1.numberTurns; } });
838
+ var otel_content_1 = require("./telemetry/otel-content");
839
+ Object.defineProperty(exports, "extractGenerationContent", { enumerable: true, get: function () { return otel_content_1.extractGenerationContent; } });
840
+ Object.defineProperty(exports, "CONTENT_INPUT_CHAIN", { enumerable: true, get: function () { return otel_content_1.CONTENT_INPUT_CHAIN; } });
841
+ Object.defineProperty(exports, "CONTENT_OUTPUT_CHAIN", { enumerable: true, get: function () { return otel_content_1.CONTENT_OUTPUT_CHAIN; } });
842
+ var media_1 = require("./artifacts/media");
843
+ Object.defineProperty(exports, "isMediaType", { enumerable: true, get: function () { return media_1.isMediaType; } });
844
+ Object.defineProperty(exports, "isAllowedMediaType", { enumerable: true, get: function () { return media_1.isAllowedMediaType; } });
845
+ Object.defineProperty(exports, "MEDIA_MIME_ALLOWLIST", { enumerable: true, get: function () { return media_1.MEDIA_MIME_ALLOWLIST; } });
846
+ Object.defineProperty(exports, "MEDIA_TYPE_PREFIXES", { enumerable: true, get: function () { return media_1.MEDIA_TYPE_PREFIXES; } });
847
+ Object.defineProperty(exports, "UNSCREENED_MEDIA", { enumerable: true, get: function () { return media_1.UNSCREENED_MEDIA; } });
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/init/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;kFACkF;AAClF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS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AE,EAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EACrF,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,GACxB,MAAM,CA4HR;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,cAAmB,GAAG,aAAa,CA6DzF"}
@@ -108,7 +108,7 @@ export type StepCall = Omit<RecordCallInput, "stepKey">;
108
108
  /** Record one step: report the provider call (tokens → cost on /runs and
109
109
  * /inferences), save prompt + raw + parsed, link lineage, flag conformance.
110
110
  * Leave \`call\` out only when you have no usage numbers; the step then shows
111
- * "cost n/a". */
111
+ * "—" for its cost ("cost n/a" with Developer details on). */
112
112
  export function recordStep(
113
113
  stepKey: string,
114
114
  work: { prompt: string; rawText: string; json: unknown; conforms: boolean; call?: StepCall },
@@ -226,7 +226,7 @@ function buildObserveMarkdown(plans, seamPath, result, path) {
226
226
  lines.push("## 2. Open a run context around the pipeline", "", boundary === null
227
227
  ? "Wrap your pipeline's entry point in `withRun(...)` from the seam helper:"
228
228
  : `Your pipeline entry looks like \`${boundary}\` (the shallowest detected call site — a` +
229
- " heuristic; move this if your real entry is elsewhere). Wrap it in `withRun(...)`:", "", "```diff", `+ import { withRun } from "${boundaryImport}";`, "", "- export async function runPipeline(input) {", "- /* ... your steps ... */", "- }", "+ export async function runPipeline(input) {", "+ return withRun(", `+ { pipeline: "my-pipeline", episodeKey: input.attemptId, environment: ${ENV_EXPR} },`, "+ async () => {", "+ /* ... your steps ... */", "+ },", "+ );", "+ }", "```", "", "## 3. Record each step's work products", "", "Each detected model call is one step. After the call parses its output, add a `recordStep`", "(the diffs below quote the call line so you can find it). Its `call` field reports what the", "provider returned through `rig.recordCall`, so the step carries tokens and a cost and the call", "shows on /inferences as \"recorded · unverified\". Time the call (`const t0 = Date.now()` before,", "`const latencyMs = Date.now() - t0` after) and rename `res` to your response variable:", "");
229
+ " heuristic; move this if your real entry is elsewhere). Wrap it in `withRun(...)`:", "", "```diff", `+ import { withRun } from "${boundaryImport}";`, "", "- export async function runPipeline(input) {", "- /* ... your steps ... */", "- }", "+ export async function runPipeline(input) {", "+ return withRun(", `+ { pipeline: "my-pipeline", episodeKey: input.attemptId, environment: ${ENV_EXPR} },`, "+ async () => {", "+ /* ... your steps ... */", "+ },", "+ );", "+ }", "```", "", "## 3. Record each step's work products", "", "Each detected model call is one step. After the call parses its output, add a `recordStep`", "(the diffs below quote the call line so you can find it). Its `call` field reports what the", "provider returned through `rig.recordCall`, so the step carries tokens and a cost and the call", "shows on /inferences as \"Reported by your code\" (\"recorded · unverified\" with Developer details on).", "Time the call (`const t0 = Date.now()` before,", "`const latencyMs = Date.now() - t0` after) and rename `res` to your response variable:", "");
230
230
  // Group the per-site wiring diffs by file so each file gets one import line.
231
231
  const byFile = new Map();
232
232
  for (const plan of plans) {
@@ -242,7 +242,7 @@ function buildObserveMarkdown(plans, seamPath, result, path) {
242
242
  }
243
243
  lines.push("```", "");
244
244
  }
245
- lines.push("## 4. See it", "", "Run your pipeline once, then open the console: **Runs** lists the run, `/runs/[id]` renders", "the semantic chain (artifacts grouped by step, with hashes and evaluation badges), and", "`/artifacts/[id]` shows one artifact's lineage, and **Inferences** lists each recorded call", "with its cost. A step you wired without `call` shows **cost n/a**: ModelRig has no usage", "numbers for it. In a script that exits, `await closeRig()` once at the end so the last batch", "ships. Calls your code makes outside `recordStep` stay invisible: https://modelrig.dev/not-captured.html", "", "## When you are ready to migrate (later, optional)", "", "Observe answers *what is my pipeline doing?* When you want to *change what serves a step*,", "that is route extraction (T2) — a separate, behaviour-affecting move behind its own review:", "`modelrig init --scope <this pipeline>`. Observe first is the safer order.", "");
245
+ lines.push("## 4. See it", "", "Run your pipeline once, then open the console: **Runs** lists the run, `/runs/[id]` renders", "the semantic chain (artifacts grouped by step, with hashes and evaluation badges), and", "`/artifacts/[id]` shows one artifact's lineage, and **Inferences** lists each recorded call", "with its cost. A step you wired without `call` shows **—** for its cost (**cost n/a** with", "Developer details on): ModelRig has no usage", "numbers for it. In a script that exits, `await closeRig()` once at the end so the last batch", "ships. Calls your code makes outside `recordStep` stay invisible: https://modelrig.dev/not-captured.html", "", "## When you are ready to migrate (later, optional)", "", "Observe answers *what is my pipeline doing?* When you want to *change what serves a step*,", "that is route extraction (T2) — a separate, behaviour-affecting move behind its own review:", "`modelrig init --scope <this pipeline>`. Observe first is the safer order.", "");
246
246
  return `${lines.join("\n")}\n`;
247
247
  }
248
248
  function runObserve(deps, options = {}) {
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import type { ModelFacts } from "./claims";
11
11
  import type { ModelPricingV2 } from "./pricing-shape";
12
+ import type { ModelKind } from "./model-kind";
12
13
  export interface DeclaredLayer {
13
14
  readonly as_of: string;
14
15
  readonly source: string;
@@ -168,6 +169,9 @@ export interface Discrepancy {
168
169
  }
169
170
  export interface RegistryEntry {
170
171
  readonly model_key: string;
172
+ /** ARC-4 (ARC-D5): absent ⇒ `llm`. Any other kind is a DECLARED-ONLY
173
+ * generation model — unprobed and never ranked (model-kind.ts). */
174
+ readonly kind?: ModelKind;
171
175
  readonly declared: DeclaredLayer | null;
172
176
  readonly probed: ProbedLayer | null;
173
177
  readonly observed: ObservedLayer | null;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/registry/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,kBAA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BV;AAED;;qDAEqD;AACrD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG9F"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * ARC-4 (ARC-D5) — DECLARED-ONLY generation models in the registry.
3
+ *
4
+ * A short, reviewed list of widely used image / video / text-to-speech /
5
+ * speech-to-text models whose UNIT price we can source. Every price is READ
6
+ * from the vendored LiteLLM snapshot (data/pricing-map.json at the pinned SHA)
7
+ * by {@link buildGenerationLayer} — never typed in by hand — and carries its
8
+ * provenance: the snapshot key, the field, and the upstream pricing page when
9
+ * the snapshot names one. A model whose snapshot entry has no usable unit rate
10
+ * gets NO price (honest absence), not a guess (L5).
11
+ *
12
+ * These entries are:
13
+ * - declared-only and UNPROBED (no probe suite measures generation quality);
14
+ * - NEVER ranked: `kind` ≠ `llm` keeps them out of RigIndex, the leaderboard,
15
+ * capability selection and the console mirror (model-kind.ts `isRankable`,
16
+ * pinned by rank-wall-kind.test.ts);
17
+ * - observed only through `rig.recordCall({ units })` — no adapter exists.
18
+ *
19
+ * Output: registry/layers/generation.json (build-generation.ts writes it;
20
+ * build-registry.ts merges it). Pure — the snapshot is passed in.
21
+ */
22
+ import type { DeclaredLayer, RegistryEntry } from "./build";
23
+ import type { GenerationKind } from "./model-kind";
24
+ import type { GenerationPricingV2 } from "./pricing-shape";
25
+ /** The pinned snapshot this layer reads (upstream/litellm.pin.json). */
26
+ export declare const GENERATION_SNAPSHOT: {
27
+ readonly sha: "de706a35a6";
28
+ readonly pinnedDate: "2026-07-30";
29
+ };
30
+ /** The reviewed list: registry model_key → the snapshot key its price is read
31
+ * from. Adding a model is a reviewed edit HERE; the price follows the source. */
32
+ export declare const GENERATION_SOURCES: ReadonlyArray<{
33
+ readonly modelKey: string;
34
+ readonly mapKey: string;
35
+ }>;
36
+ /** One layer row: the kind + the declared block. */
37
+ export interface GenerationLayerEntry {
38
+ readonly kind: GenerationKind;
39
+ readonly declared: Omit<DeclaredLayer, "pricing_v2"> & {
40
+ readonly pricing_v2: GenerationPricingV2 | null;
41
+ };
42
+ }
43
+ export type GenerationLayer = Readonly<Record<string, GenerationLayerEntry>>;
44
+ /** A registry entry for a generation model (RegistryEntry with a kind and the
45
+ * generation price block). */
46
+ export type GenerationRegistryEntry = Omit<RegistryEntry, "declared"> & {
47
+ readonly kind: GenerationKind;
48
+ readonly declared: GenerationLayerEntry["declared"];
49
+ };
50
+ interface SnapshotEntry {
51
+ readonly mode?: string;
52
+ readonly source?: string;
53
+ readonly [key: string]: unknown;
54
+ }
55
+ /** Build the generation layer from the snapshot. Throws on a source key the
56
+ * snapshot does not carry or whose mode is not a generation mode — a reviewed
57
+ * list entry that no longer resolves must fail the build, not vanish. */
58
+ export declare function buildGenerationLayer(snapshot: Readonly<Record<string, SnapshotEntry>>): GenerationLayer;
59
+ /** The layer as registry entries (no probed/observed layer, no notes/facts). */
60
+ export declare function generationRegistryEntries(layer: GenerationLayer): GenerationRegistryEntry[];
61
+ /** Merge the generation entries into a registry's model list: any existing
62
+ * entry with the same key is REPLACED (the layer is the source of truth for
63
+ * these keys), and the list stays sorted by model_key like buildRegistry. */
64
+ export declare function mergeGenerationEntries<T extends {
65
+ readonly model_key: string;
66
+ }>(models: readonly T[], layer: GenerationLayer): Array<T | GenerationRegistryEntry>;
67
+ export {};
68
+ //# sourceMappingURL=generation-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-models.d.ts","sourceRoot":"","sources":["../../src/registry/generation-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,iBAAiB,CAAC;AAE1E,wEAAwE;AACxE,eAAO,MAAM,mBAAmB;;;CA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AAM,EAAE,SAAS,CAAC,EAAE,EACpB,KAAK,EAAE,eAAe,GACrB,KAAK,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAKpC"}
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ /**
3
+ * ARC-4 (ARC-D5) — DECLARED-ONLY generation models in the registry.
4
+ *
5
+ * A short, reviewed list of widely used image / video / text-to-speech /
6
+ * speech-to-text models whose UNIT price we can source. Every price is READ
7
+ * from the vendored LiteLLM snapshot (data/pricing-map.json at the pinned SHA)
8
+ * by {@link buildGenerationLayer} — never typed in by hand — and carries its
9
+ * provenance: the snapshot key, the field, and the upstream pricing page when
10
+ * the snapshot names one. A model whose snapshot entry has no usable unit rate
11
+ * gets NO price (honest absence), not a guess (L5).
12
+ *
13
+ * These entries are:
14
+ * - declared-only and UNPROBED (no probe suite measures generation quality);
15
+ * - NEVER ranked: `kind` ≠ `llm` keeps them out of RigIndex, the leaderboard,
16
+ * capability selection and the console mirror (model-kind.ts `isRankable`,
17
+ * pinned by rank-wall-kind.test.ts);
18
+ * - observed only through `rig.recordCall({ units })` — no adapter exists.
19
+ *
20
+ * Output: registry/layers/generation.json (build-generation.ts writes it;
21
+ * build-registry.ts merges it). Pure — the snapshot is passed in.
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.GENERATION_SOURCES = exports.GENERATION_SNAPSHOT = void 0;
25
+ exports.buildGenerationLayer = buildGenerationLayer;
26
+ exports.generationRegistryEntries = generationRegistryEntries;
27
+ exports.mergeGenerationEntries = mergeGenerationEntries;
28
+ /** The pinned snapshot this layer reads (upstream/litellm.pin.json). */
29
+ exports.GENERATION_SNAPSHOT = { sha: "de706a35a6", pinnedDate: "2026-07-30" };
30
+ /** The reviewed list: registry model_key → the snapshot key its price is read
31
+ * from. Adding a model is a reviewed edit HERE; the price follows the source. */
32
+ exports.GENERATION_SOURCES = [
33
+ { modelKey: "openai/dall-e-3", mapKey: "dall-e-3" },
34
+ { modelKey: "gemini/imagen-4.0-generate-001", mapKey: "gemini/imagen-4.0-generate-001" },
35
+ { modelKey: "gemini/imagen-4.0-fast-generate-001", mapKey: "gemini/imagen-4.0-fast-generate-001" },
36
+ { modelKey: "black_forest_labs/flux-pro-1.1", mapKey: "black_forest_labs/flux-pro-1.1" },
37
+ { modelKey: "stability/sd3.5-large", mapKey: "stability/sd3.5-large" },
38
+ { modelKey: "gemini/veo-3.1-generate-preview", mapKey: "gemini/veo-3.1-generate-preview" },
39
+ { modelKey: "gemini/veo-3.1-fast-generate-preview", mapKey: "gemini/veo-3.1-fast-generate-preview" },
40
+ { modelKey: "openai/sora-2", mapKey: "sora-2" },
41
+ { modelKey: "openai/tts-1", mapKey: "tts-1" },
42
+ { modelKey: "elevenlabs/eleven_multilingual_v2", mapKey: "elevenlabs/eleven_multilingual_v2" },
43
+ { modelKey: "openai/whisper-1", mapKey: "whisper-1" },
44
+ { modelKey: "deepgram/nova-3", mapKey: "deepgram/nova-3" },
45
+ ];
46
+ const MODE_KIND = {
47
+ image_generation: "image_gen",
48
+ video_generation: "video_gen",
49
+ audio_speech: "tts",
50
+ audio_transcription: "stt",
51
+ };
52
+ function rate(v) {
53
+ return typeof v === "number" && Number.isFinite(v) && v > 0 ? v : null;
54
+ }
55
+ /** Strip binary float noise (0.000015 × 1e6 = 15.000000000000002). */
56
+ function clean(n) {
57
+ return Number(n.toPrecision(12));
58
+ }
59
+ /** The billed unit rate the snapshot publishes for this mode, as
60
+ * {modality field, value, snapshot field}. Mirrors pricing.ts getMapUnitRates. */
61
+ function unitRateOf(e) {
62
+ switch (e.mode) {
63
+ case "image_generation": {
64
+ const out = rate(e.output_cost_per_image);
65
+ if (out !== null)
66
+ return { field: "image_per_unit", value: out, from: "output_cost_per_image" };
67
+ const inp = rate(e.input_cost_per_image);
68
+ return inp !== null ? { field: "image_per_unit", value: inp, from: "input_cost_per_image" } : null;
69
+ }
70
+ case "video_generation": {
71
+ const pv = rate(e.output_cost_per_video_per_second);
72
+ if (pv !== null)
73
+ return { field: "video_per_second", value: pv, from: "output_cost_per_video_per_second" };
74
+ const ps = rate(e.output_cost_per_second);
75
+ return ps !== null ? { field: "video_per_second", value: ps, from: "output_cost_per_second" } : null;
76
+ }
77
+ case "audio_speech": {
78
+ const pc = rate(e.input_cost_per_character);
79
+ if (pc !== null)
80
+ return { field: "characters_per_million", value: clean(pc * 1000000), from: "input_cost_per_character" };
81
+ const ps = rate(e.output_cost_per_second);
82
+ return ps !== null ? { field: "audio_per_second", value: ps, from: "output_cost_per_second" } : null;
83
+ }
84
+ case "audio_transcription": {
85
+ const ps = rate(e.input_cost_per_second);
86
+ return ps !== null ? { field: "audio_per_second", value: ps, from: "input_cost_per_second" } : null;
87
+ }
88
+ default:
89
+ return null;
90
+ }
91
+ }
92
+ const BASIS = {
93
+ image_gen: "per generated image · as filed under the snapshot key · declared-only (unprobed)",
94
+ video_gen: "per second of generated video · as filed under the snapshot key · declared-only (unprobed)",
95
+ tts: "per input character (shown per 1M) · as filed under the snapshot key · declared-only (unprobed)",
96
+ stt: "per second of input audio · as filed under the snapshot key · declared-only (unprobed)",
97
+ };
98
+ const NULL_FLAGS = {
99
+ supports_response_schema: null,
100
+ supports_web_search: null,
101
+ supports_prompt_caching: null,
102
+ adapter_structured_native: null,
103
+ adapter_grounded_native: null,
104
+ supports_image_input: null,
105
+ };
106
+ /** Build the generation layer from the snapshot. Throws on a source key the
107
+ * snapshot does not carry or whose mode is not a generation mode — a reviewed
108
+ * list entry that no longer resolves must fail the build, not vanish. */
109
+ function buildGenerationLayer(snapshot) {
110
+ const out = {};
111
+ const asOf = exports.GENERATION_SNAPSHOT.pinnedDate;
112
+ for (const { modelKey, mapKey } of exports.GENERATION_SOURCES) {
113
+ const e = snapshot[mapKey];
114
+ if (e === undefined)
115
+ throw new Error(`generation source ${modelKey}: snapshot key "${mapKey}" not found`);
116
+ const kind = typeof e.mode === "string" ? MODE_KIND[e.mode] : undefined;
117
+ if (kind === undefined)
118
+ throw new Error(`generation source ${modelKey}: snapshot mode "${String(e.mode)}" is not a generation mode`);
119
+ const upstream = typeof e.source === "string" && /^https?:\/\//.test(e.source) ? ` (upstream: ${e.source})` : "";
120
+ const unit = unitRateOf(e);
121
+ const source = unit !== null
122
+ ? `litellm-pricing-map@${exports.GENERATION_SNAPSHOT.sha} key "${mapKey}" mode ${e.mode} field ${unit.from}${upstream}`
123
+ : `litellm-pricing-map@${exports.GENERATION_SNAPSHOT.sha} key "${mapKey}" — no unit rate published (unpriced)`;
124
+ const pricingV2 = unit === null
125
+ ? null
126
+ : {
127
+ base: null,
128
+ tiers: null,
129
+ context_bands: null,
130
+ batch_discount: null,
131
+ modality: { [unit.field]: unit.value, provenance: { source, as_of: asOf } },
132
+ source,
133
+ as_of: asOf,
134
+ basis: BASIS[kind],
135
+ };
136
+ out[modelKey] = {
137
+ kind,
138
+ declared: {
139
+ as_of: asOf,
140
+ source: `declared-only generation model (unprobed, never ranked) · ${source}`,
141
+ pricing: null,
142
+ pricing_v2: pricingV2,
143
+ flags: NULL_FLAGS,
144
+ },
145
+ };
146
+ }
147
+ return out;
148
+ }
149
+ /** The layer as registry entries (no probed/observed layer, no notes/facts). */
150
+ function generationRegistryEntries(layer) {
151
+ return Object.entries(layer).map(([modelKey, row]) => ({
152
+ model_key: modelKey,
153
+ kind: row.kind,
154
+ declared: row.declared,
155
+ probed: null,
156
+ observed: null,
157
+ discrepancies: [],
158
+ callNotes: [],
159
+ facts: null,
160
+ }));
161
+ }
162
+ /** Merge the generation entries into a registry's model list: any existing
163
+ * entry with the same key is REPLACED (the layer is the source of truth for
164
+ * these keys), and the list stays sorted by model_key like buildRegistry. */
165
+ function mergeGenerationEntries(models, layer) {
166
+ const keys = new Set(Object.keys(layer));
167
+ return [...models.filter((m) => !keys.has(m.model_key)), ...generationRegistryEntries(layer)].sort((a, b) => a.model_key < b.model_key ? -1 : 1);
168
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * ARC-4 (ARC-D5) — the registry `kind` vocabulary. An entry without `kind` is an
3
+ * `llm` (the implicit default — every entry before ARC-γ). The other kinds are
4
+ * DECLARED-ONLY generation models: unprobed, never ranked, priced per unit
5
+ * (images, seconds, characters) rather than per token, and observed only through
6
+ * `rig.recordCall({ units })` — ModelRig ships no adapter for them.
7
+ *
8
+ * PURE and import-free on purpose: the RigIndex / leaderboard builders import it
9
+ * to keep non-`llm` kinds out of rank, and their import closure is walled
10
+ * (rigindex-wall.test.ts).
11
+ */
12
+ export declare const MODEL_KINDS: readonly ["llm", "image_gen", "video_gen", "tts", "stt"];
13
+ export type ModelKind = (typeof MODEL_KINDS)[number];
14
+ /** The generation kinds (everything but `llm`). */
15
+ export type GenerationKind = Exclude<ModelKind, "llm">;
16
+ export declare function isModelKind(v: unknown): v is ModelKind;
17
+ /** An entry's kind: its declared `kind`, else `llm`. An unrecognized value is
18
+ * treated as NOT `llm` (fail-closed: it can never sneak into rank). */
19
+ export declare function kindOf(entry: {
20
+ readonly kind?: unknown;
21
+ }): ModelKind | "unknown";
22
+ /** THE rank wall predicate: only an `llm` entry may enter RigIndex, the
23
+ * leaderboard, or capability selection. */
24
+ export declare function isRankable(entry: {
25
+ readonly kind?: unknown;
26
+ }): boolean;
27
+ /** The model keys of every non-rankable entry in a registry model list — the
28
+ * set the RigIndex builder refuses (its inputs are probe files, not registry
29
+ * entries, so it is handed the keys). */
30
+ export declare function nonRankableKeys(models: ReadonlyArray<{
31
+ readonly model_key: string;
32
+ readonly kind?: unknown;
33
+ }>): Set<string>;
34
+ //# sourceMappingURL=model-kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-kind.d.ts","sourceRoot":"","sources":["../../src/registry/model-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,WAAW,0DAA2D,CAAC;AACpF,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAEvD,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,SAAS,CAEtD;AAED;uEACuE;AACvE,wBAAgB,MAAM,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAAG,SAAS,CAGhF;AAED;2CAC2C;AAC3C,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAEtE;AAED;;yCAEyC;AACzC,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAE3H"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /**
3
+ * ARC-4 (ARC-D5) — the registry `kind` vocabulary. An entry without `kind` is an
4
+ * `llm` (the implicit default — every entry before ARC-γ). The other kinds are
5
+ * DECLARED-ONLY generation models: unprobed, never ranked, priced per unit
6
+ * (images, seconds, characters) rather than per token, and observed only through
7
+ * `rig.recordCall({ units })` — ModelRig ships no adapter for them.
8
+ *
9
+ * PURE and import-free on purpose: the RigIndex / leaderboard builders import it
10
+ * to keep non-`llm` kinds out of rank, and their import closure is walled
11
+ * (rigindex-wall.test.ts).
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.MODEL_KINDS = void 0;
15
+ exports.isModelKind = isModelKind;
16
+ exports.kindOf = kindOf;
17
+ exports.isRankable = isRankable;
18
+ exports.nonRankableKeys = nonRankableKeys;
19
+ exports.MODEL_KINDS = ["llm", "image_gen", "video_gen", "tts", "stt"];
20
+ function isModelKind(v) {
21
+ return typeof v === "string" && exports.MODEL_KINDS.includes(v);
22
+ }
23
+ /** An entry's kind: its declared `kind`, else `llm`. An unrecognized value is
24
+ * treated as NOT `llm` (fail-closed: it can never sneak into rank). */
25
+ function kindOf(entry) {
26
+ if (entry.kind === undefined || entry.kind === null)
27
+ return "llm";
28
+ return isModelKind(entry.kind) ? entry.kind : "unknown";
29
+ }
30
+ /** THE rank wall predicate: only an `llm` entry may enter RigIndex, the
31
+ * leaderboard, or capability selection. */
32
+ function isRankable(entry) {
33
+ return kindOf(entry) === "llm";
34
+ }
35
+ /** The model keys of every non-rankable entry in a registry model list — the
36
+ * set the RigIndex builder refuses (its inputs are probe files, not registry
37
+ * entries, so it is handed the keys). */
38
+ function nonRankableKeys(models) {
39
+ return new Set(models.filter((m) => !isRankable(m)).map((m) => m.model_key));
40
+ }