@vibeiao/sdk 0.1.56 → 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { SurvivalMode, SurvivalRecommendation, classifySurvivalMode, formatSurvi
6
6
  export { SurvivalIntegrationDecision, getSurvivalPlaybookDecision, getSurvivalPlaybookDecisionFromSelfReliance } from './survivalIntegration.js';
7
7
  export { EscapeHatchDecision, EscapeHatchPolicy, EscapeHatchSnapshot, evaluateEscapeHatch, formatEscapeHatchDecision } from './survivalEscapeHatch.js';
8
8
  export { MarketDiscoveryClient, MarketNeed, MarketSignal, deriveMarketNeeds, discoverMarketNeeds, extractMarketSignals, runMarketDiscovery } from './marketDiscovery.js';
9
- export { A as AdapterBestShotChecklistResult, a as AdapterPackKind, b as AdapterPackOptions, c as AdaptiveAdaptationPlan, d as AdaptiveExecution, e as AdaptiveFeedbackAggregate, f as AdaptivePolicyConfig, g as AdaptivePolicyDecision, h as AdaptivePolicyState, i as AdaptiveReflectionStore, j as AdaptiveTheme, k as AdaptiveVerification, l as AgentLaunchRuntimeOptions, m as AgentLaunchRuntimeResult, n as AgentResourceProvidersManifest, o as AgentReviewRuntimeOptions, p as AnalyticsPoint, q as ApiCreditProvider, r as ApiCreditProviderFactoryOptions, s as ApiCreditProviderPreset, t as ApiCreditProviderPresetInput, u as ApiResponse, B as BuybackEvent, C as CONTEXT_PACK_SECTION_ORDER, v as ContextPack, w as ContextPackBudget, x as ContextPackGateOptions, y as ContextPackGateResult, z as ContextPackInput, D as ContextPackOptions, E as ContextPackSectionKey, F as ContextPackSections, G as ContextPackState, H as DurabilityCheckpointWriteOptions, I as DurabilityProxyClientOptions, J as DurabilityRestoreDrillWriteOptions, K as ExecutionAdapter, L as ExecutionApplyResult, M as ExecutionDecisionRecord, N as ExecutionDryRunResult, O as ExecutionPostDeployVerifyResult, P as ExecutionRollbackResult, Q as ExecutionRolloutMode, R as ExecutionRunResult, S as ExecutionValidateResult, T as LISTING_NAME_MAX_LENGTH, U as LISTING_NAME_RECOMMENDED_MAX, V as LISTING_TAGLINE_MAX_LENGTH, W as LISTING_TAGLINE_RECOMMENDED_MAX, X as LaunchProfile, Y as LaunchReadinessInput, Z as LaunchReadinessResult, _ as LeaderboardEntry, $ as LeaderboardQuery, a0 as ListingNamingValidationOptions, a1 as ListingNamingValidationResult, a2 as ListingQuery, a3 as ListingReviewCreatePayload, a4 as ListingReviewResponsePayload, a5 as ListingVersionPayload, a6 as MarketingCampaign, a7 as MarketingLinkOptions, a8 as MemoryPingChallengeResponse, a9 as MemoryPingPayload, aa as OpenRouterCredits, ab as ProcurementCandidate, ac as ProcurementDecision, ad as ProcurementTaskProfile, ae as ProcurementWeights, af as ResourceProviderManifestEntry, ag as ResourceSnapshot, ah as ReviewGate, ai as ReviewGateRecord, aj as ReviewRequiredPayload, ak as RunAdaptiveReflectionOptions, al as RuntimeMigrationInput, am as RuntimeMigrationPlan, an as RuntimeStateSnapshot, ao as SdkAutoUpdatedRestartRequiredError, ap as SdkUpdateCheckOptions, aq as SdkUpdatePolicyCheckOptions, ar as SdkUpdateRequiredError, as as SdkUpdateStatus, TopupDecision, TopupRequest, TreasuryLedgerEvent, TreasuryPolicy, TreasuryPolicyV1, TreasuryState, at as VIBEIAO_IDL, au as VibeClient, av as VibeClientOptions, aw as VibeRegistry, ax as aggregateFeedbackSignals, ay as assertLaunchReady, az as assertSurvivalProvidersConfigured, aA as buildAdaptivePlan, aB as buildBadgeMarkdown, aC as buildClaimMessage, aD as buildDecisionRecord, aE as buildJupiterSwapUrl, aF as buildListingVersionMessage, aG as buildMemoryPingMessage, aH as buildOwnerTransferMessage, aI as buildProcurementPrompt, aJ as buildRaydiumSwapUrl, aK as buildReviewPrompt, aL as buildReviewRequired, aM as buildReviewResponseMessage, aN as buildRuntimeMigrationPlan, aO as buildSdkUpdateCommand, aP as buildShareCopy, aQ as buildShareLink, aR as buildTradeLinks, buildTreasuryLedgerEvent, aS as checkForSdkUpdate, aT as checkForSdkUpdatePolicy, aU as compareVersions, aV as createApiCreditProvider, aW as createApiCreditProviders, aX as createApiCreditProvidersFromManifest, aY as createCampaign, aZ as createContextPack, a_ as createCustomAdapter, a$ as createDurabilityProxyClient, b0 as createServiceApiAdapter, createTreasuryPolicy, b1 as createWebBundledAdapter, b2 as createWebStaticAdapter, b3 as createWorkflowAgentAdapter, b4 as decideProcurementForTask, b5 as estimateContextPackTokens, b6 as evaluateAdaptiveReflectionPolicy, b7 as evaluateContextPackGate, b8 as evaluateLaunchReadiness, evaluateTopupRequest, b9 as getResourceSnapshot, ba as normalizeListingText, bb as rankListingsForTask, bc as runAdapterBestShotChecklist, bd as runAdaptiveReflectionCycle, be as runAgentLaunchRuntime, bf as runAgentLaunchRuntimeCycle, bg as runAgentReviewRuntimeCycle, bh as runExecutionAdapter, bi as sanitizeListingNaming, bj as scoreListingForTask, bk as shouldAnnounceStateChange, treasuryStateFromSnapshot, bl as validateContextPack, bm as validateListingNaming, validateTreasuryPolicy, bn as verifyAdaptiveExecutionReadiness } from './treasuryGuardian.js';
9
+ export { A as AdapterBestShotChecklistResult, a as AdapterPackKind, b as AdapterPackOptions, c as AdaptiveAdaptationPlan, d as AdaptiveExecution, e as AdaptiveFeedbackAggregate, f as AdaptivePolicyConfig, g as AdaptivePolicyDecision, h as AdaptivePolicyState, i as AdaptiveReflectionStore, j as AdaptiveTheme, k as AdaptiveVerification, l as AgentCronCycleResult, m as AgentCronCycleState, n as AgentCronHealth, o as AgentCronReflectResult, p as AgentCronResearchResult, q as AgentCronRuntimeAdapter, r as AgentLaunchRuntimeOptions, s as AgentLaunchRuntimeResult, t as AgentResourceProvidersManifest, u as AgentReviewRuntimeOptions, v as AnalyticsPoint, w as ApiCreditProvider, x as ApiCreditProviderFactoryOptions, y as ApiCreditProviderPreset, z as ApiCreditProviderPresetInput, B as ApiResponse, C as BuybackEvent, D as CONTEXT_PACK_SECTION_ORDER, E as ContextPack, F as ContextPackBudget, G as ContextPackGateOptions, H as ContextPackGateResult, I as ContextPackInput, J as ContextPackOptions, K as ContextPackSectionKey, L as ContextPackSections, M as ContextPackState, N as DurabilityCheckpointWriteOptions, O as DurabilityProxyClientOptions, P as DurabilityRestoreDrillWriteOptions, Q as ExecutionAdapter, R as ExecutionApplyResult, S as ExecutionDecisionRecord, T as ExecutionDryRunResult, U as ExecutionPostDeployVerifyResult, V as ExecutionRollbackResult, W as ExecutionRolloutMode, X as ExecutionRunResult, Y as ExecutionValidateResult, Z as LISTING_NAME_MAX_LENGTH, _ as LISTING_NAME_RECOMMENDED_MAX, $ as LISTING_TAGLINE_MAX_LENGTH, a0 as LISTING_TAGLINE_RECOMMENDED_MAX, a1 as LaunchProfile, a2 as LaunchReadinessInput, a3 as LaunchReadinessResult, a4 as LeaderboardEntry, a5 as LeaderboardQuery, a6 as ListingNamingValidationOptions, a7 as ListingNamingValidationResult, a8 as ListingQuery, a9 as ListingReviewCreatePayload, aa as ListingReviewResponsePayload, ab as ListingVersionPayload, ac as MarketingCampaign, ad as MarketingLinkOptions, ae as MemoryPingChallengeResponse, af as MemoryPingPayload, ag as OpenRouterCredits, ah as ProcurementCandidate, ai as ProcurementDecision, aj as ProcurementTaskProfile, ak as ProcurementWeights, al as PublishCandidate, am as PublishDeployResult, an as PublishListingResult, ao as PublishListingType, ap as PublishPrepareResult, aq as PublishProductKind, ar as PublishRuntimeAdapter, as as PublishRuntimeMode, at as PublishRuntimeResult, au as PublishValidateResult, av as PublishVerifyResult, aw as ResourceProviderManifestEntry, ax as ResourceSnapshot, ay as ReviewGate, az as ReviewGateRecord, aA as ReviewRequiredPayload, aB as RunAdaptiveReflectionOptions, aC as RuntimeMigrationInput, aD as RuntimeMigrationPlan, aE as RuntimeStateSnapshot, aF as SdkAutoUpdatedRestartRequiredError, aG as SdkUpdateCheckOptions, aH as SdkUpdatePolicyCheckOptions, aI as SdkUpdateRequiredError, aJ as SdkUpdateStatus, TopupDecision, TopupRequest, TreasuryLedgerEvent, TreasuryPolicy, TreasuryPolicyV1, TreasuryState, aK as VIBEIAO_IDL, aL as VibeClient, aM as VibeClientOptions, aN as VibeRegistry, aO as aggregateFeedbackSignals, aP as assertLaunchReady, aQ as assertSurvivalProvidersConfigured, aR as buildAdaptivePlan, aS as buildBadgeMarkdown, aT as buildClaimMessage, aU as buildDecisionRecord, aV as buildJupiterSwapUrl, aW as buildListingVersionMessage, aX as buildMemoryPingMessage, aY as buildOwnerTransferMessage, aZ as buildProcurementPrompt, a_ as buildRaydiumSwapUrl, a$ as buildReviewPrompt, b0 as buildReviewRequired, b1 as buildReviewResponseMessage, b2 as buildRuntimeMigrationPlan, b3 as buildSdkUpdateCommand, b4 as buildShareCopy, b5 as buildShareLink, b6 as buildTradeLinks, buildTreasuryLedgerEvent, b7 as checkForSdkUpdate, b8 as checkForSdkUpdatePolicy, b9 as compareVersions, ba as createApiCreditProvider, bb as createApiCreditProviders, bc as createApiCreditProvidersFromManifest, bd as createCampaign, be as createContextPack, bf as createCustomAdapter, bg as createDurabilityProxyClient, bh as createServiceApiAdapter, createTreasuryPolicy, bi as createWebBundledAdapter, bj as createWebStaticAdapter, bk as createWorkflowAgentAdapter, bl as decideProcurementForTask, bm as estimateContextPackTokens, bn as evaluateAdaptiveReflectionPolicy, bo as evaluateContextPackGate, bp as evaluateLaunchReadiness, evaluateTopupRequest, bq as getResourceSnapshot, br as normalizeListingText, bs as rankListingsForTask, bt as runAdapterBestShotChecklist, bu as runAdaptiveReflectionCycle, bv as runAgentCronRuntimeCycle, bw as runAgentLaunchRuntime, bx as runAgentLaunchRuntimeCycle, by as runAgentPublishRuntimeCycle, bz as runAgentReviewRuntimeCycle, bA as runExecutionAdapter, bB as sanitizeListingNaming, bC as scoreListingForTask, bD as shouldAnnounceStateChange, treasuryStateFromSnapshot, bE as validateContextPack, bF as validateListingNaming, validateTreasuryPolicy, bG as verifyAdaptiveExecutionReadiness } from './treasuryGuardian.js';
10
10
  export { OUTCOME_BOUND_FLOW_SCHEMA, OUTCOME_BOUND_REQUIRED_GATES, OutcomeBoundRequiredGate, OutcomeBoundRunInput, OutcomeBoundRunStatus, assertOutcomeBoundCompleted, evaluateOutcomeBoundRun } from './outcomeBoundFlow.js';
11
11
  export { STRICT_MEMORY_RUNTIME_SCHEMA, StrictMemoryEvaluation, StrictMemoryEvaluationInput, StrictMemoryRuntimePreset, StrictMemoryTriggerSet, StrictMemoryUpgradeInput, StrictMemoryUpgradePolicy, StrictMemoryUpgradeResult, createStrictMemoryRuntimePreset, evaluateStrictMemoryExecution, isComplexTask, upgradeToStrictMemoryRuntimePreset } from './strictMemoryRuntime.js';
12
12
  export { I as IntentSignals, L as LaneMode, a as LaneSwitchDecision, O as ObjectiveChangeProposal, b as ObjectiveChangeSourceTrust, c as ObjectiveGuardDecision, d as ObjectiveGuardPolicy, P as PromptShieldDecision, e as PromptShieldFlag, f as PromptShieldInput, g as PromptShieldPolicy, h as PromptShieldRisk, i as PromptShieldTrustLevel, j as applyIntentArbitration, k as evaluateLaneSwitch, l as evaluateObjectiveChange, m as evaluatePromptShield, s as scoreBuildLane, n as scorePolishLane } from './agentLoop-DAkl2g28.js';
package/dist/index.js CHANGED
@@ -95,10 +95,10 @@ var normalizeSectionInput = (value, maxItemChars) => {
95
95
  const seen = /* @__PURE__ */ new Set();
96
96
  const output = [];
97
97
  for (const item of list) {
98
- const normalized = normalizeItem(String(item ?? ""), maxItemChars);
99
- if (!normalized || seen.has(normalized)) continue;
100
- seen.add(normalized);
101
- output.push(normalized);
98
+ const normalized2 = normalizeItem(String(item ?? ""), maxItemChars);
99
+ if (!normalized2 || seen.has(normalized2)) continue;
100
+ seen.add(normalized2);
101
+ output.push(normalized2);
102
102
  }
103
103
  return output;
104
104
  };
@@ -197,9 +197,9 @@ var createContextPack = (input, options = {}) => {
197
197
  const maxChars = Math.max(240, Number(options.maxChars ?? DEFAULT_MAX_CHARS));
198
198
  const maxTokens = Math.max(80, Number(options.maxTokens ?? DEFAULT_MAX_TOKENS));
199
199
  const maxItemChars = Math.max(16, Number(options.maxItemChars ?? DEFAULT_MAX_ITEM_CHARS));
200
- const normalized = buildSections(input, maxItemChars);
201
- const withinBudget = fitsBudget(normalized, maxChars, maxTokens);
202
- const sections = withinBudget ? copySections(normalized) : truncateToBudget(normalized, maxChars, maxTokens);
200
+ const normalized2 = buildSections(input, maxItemChars);
201
+ const withinBudget = fitsBudget(normalized2, maxChars, maxTokens);
202
+ const sections = withinBudget ? copySections(normalized2) : truncateToBudget(normalized2, maxChars, maxTokens);
203
203
  const usage = measuredJson(sections);
204
204
  return {
205
205
  schema: "context-pack/v1",
@@ -950,6 +950,212 @@ var runAgentLaunchRuntime = async (options) => {
950
950
  };
951
951
  var runAgentLaunchRuntimeCycle = runAgentLaunchRuntime;
952
952
 
953
+ // src/agentPublishRuntime.ts
954
+ var normalized = (v) => String(v || "").trim().toLowerCase();
955
+ var enforcePublishKindGuard = (candidate, listing) => {
956
+ const kind = candidate.productKind;
957
+ if (!kind) return "publish_gate_blocked:missing_product_kind";
958
+ const listingType = normalized(listing.listingType);
959
+ const category = normalized(listing.category);
960
+ if (!listingType) return "publish_gate_blocked:missing_listing_type";
961
+ if (!category) return "publish_gate_blocked:missing_listing_category";
962
+ if (kind === "agent_app") {
963
+ if (listingType !== "agent") return "publish_gate_blocked:agent_app_requires_agent_listing";
964
+ return null;
965
+ }
966
+ if (listingType !== "human") return "publish_gate_blocked:human_product_requires_human_listing";
967
+ if (kind === "human_game" && !category.includes("game")) {
968
+ return "publish_gate_blocked:human_game_requires_games_category";
969
+ }
970
+ if (kind === "human_saas" && !category.includes("saas")) {
971
+ return "publish_gate_blocked:human_saas_requires_saas_category";
972
+ }
973
+ return null;
974
+ };
975
+ var runAgentPublishRuntimeCycle = async (input) => {
976
+ const mode = input.mode ?? "enforce";
977
+ const adapter = input.adapter;
978
+ if (!adapter) {
979
+ return {
980
+ mode,
981
+ changed: false,
982
+ attempted: false,
983
+ published: false,
984
+ deployed: false,
985
+ verified: false,
986
+ reason: "no_adapter"
987
+ };
988
+ }
989
+ const prepared = await adapter.prepare();
990
+ if (!prepared.changed || !prepared.candidate) {
991
+ return {
992
+ mode,
993
+ changed: false,
994
+ attempted: false,
995
+ published: false,
996
+ deployed: false,
997
+ verified: false,
998
+ reason: prepared.reason || "no_candidate_change"
999
+ };
1000
+ }
1001
+ const candidate = prepared.candidate;
1002
+ const validate = await adapter.validate({ candidate });
1003
+ if (!validate.passed) {
1004
+ return {
1005
+ mode,
1006
+ changed: true,
1007
+ attempted: true,
1008
+ published: false,
1009
+ deployed: false,
1010
+ verified: false,
1011
+ reason: `validate_failed:${validate.reason || "unknown"}`,
1012
+ candidate,
1013
+ validate
1014
+ };
1015
+ }
1016
+ if (mode === "observe") {
1017
+ return {
1018
+ mode,
1019
+ changed: true,
1020
+ attempted: true,
1021
+ published: false,
1022
+ deployed: false,
1023
+ verified: false,
1024
+ reason: "observe_mode",
1025
+ candidate,
1026
+ validate
1027
+ };
1028
+ }
1029
+ const listing = await adapter.publish({ candidate });
1030
+ if (!listing?.listingId) {
1031
+ return {
1032
+ mode,
1033
+ changed: true,
1034
+ attempted: true,
1035
+ published: false,
1036
+ deployed: false,
1037
+ verified: false,
1038
+ reason: "publish_failed:missing_listing_id",
1039
+ candidate,
1040
+ validate,
1041
+ listing
1042
+ };
1043
+ }
1044
+ const gateError = enforcePublishKindGuard(candidate, listing);
1045
+ if (gateError) {
1046
+ return {
1047
+ mode,
1048
+ changed: true,
1049
+ attempted: true,
1050
+ published: false,
1051
+ deployed: false,
1052
+ verified: false,
1053
+ reason: gateError,
1054
+ candidate,
1055
+ validate,
1056
+ listing
1057
+ };
1058
+ }
1059
+ const deploy = await adapter.deploy({ candidate, listing });
1060
+ const deployed = Boolean(deploy && (deploy.productUrl || deploy.deployId));
1061
+ if (!deployed) {
1062
+ return {
1063
+ mode,
1064
+ changed: true,
1065
+ attempted: true,
1066
+ published: true,
1067
+ deployed: false,
1068
+ verified: false,
1069
+ reason: "deploy_failed:missing_deploy_evidence",
1070
+ candidate,
1071
+ validate,
1072
+ listing,
1073
+ deploy
1074
+ };
1075
+ }
1076
+ const verify = await adapter.verify({ candidate, listing, deploy });
1077
+ if (!verify.passed) {
1078
+ return {
1079
+ mode,
1080
+ changed: true,
1081
+ attempted: true,
1082
+ published: true,
1083
+ deployed: true,
1084
+ verified: false,
1085
+ reason: `verify_failed:${verify.reason || "unknown"}`,
1086
+ candidate,
1087
+ validate,
1088
+ listing,
1089
+ deploy,
1090
+ verify
1091
+ };
1092
+ }
1093
+ return {
1094
+ mode,
1095
+ changed: true,
1096
+ attempted: true,
1097
+ published: true,
1098
+ deployed: true,
1099
+ verified: true,
1100
+ reason: "published_deployed_verified",
1101
+ candidate,
1102
+ validate,
1103
+ listing,
1104
+ deploy,
1105
+ verify
1106
+ };
1107
+ };
1108
+
1109
+ // src/agentCronRuntime.ts
1110
+ var runAgentCronRuntimeCycle = async (input) => {
1111
+ const previous = input.state || {};
1112
+ const health = await input.adapter.health();
1113
+ const laneDecision = evaluateLaneSwitch({
1114
+ previousLane: previous.lane || "polish",
1115
+ previousGreenStreak: previous.greenStreak ?? Math.max(0, (health.greenStreak ?? 1) - 1),
1116
+ releaseReady: health.releaseReady,
1117
+ criticalPolishSignal: health.criticalPolishSignal,
1118
+ builderObjectiveAvailable: health.builderObjectiveAvailable,
1119
+ builderOnGreenStreak: input.builderOnGreenStreak ?? 3
1120
+ });
1121
+ const state = {
1122
+ lane: laneDecision.lane,
1123
+ greenStreak: laneDecision.greenStreak
1124
+ };
1125
+ if (!health.releaseReady) {
1126
+ return { message: `ALERT: release gate fail (${laneDecision.reason})`, state, laneDecision };
1127
+ }
1128
+ if (laneDecision.lane !== "builder") {
1129
+ return { message: "NO_REPLY", state, laneDecision };
1130
+ }
1131
+ const reflect = await input.adapter.reflect();
1132
+ if ((reflect.acted || 0) > 0) {
1133
+ return {
1134
+ message: `BUILDER_ACTED: acted=${reflect.acted}${reflect.summary ? ` ${reflect.summary}` : ""}`,
1135
+ state,
1136
+ laneDecision
1137
+ };
1138
+ }
1139
+ const research = await input.adapter.research();
1140
+ if (!research.ok) {
1141
+ return {
1142
+ message: `ALERT: builder proactive failed (research_failed:${research.reason || "unknown"})`,
1143
+ state,
1144
+ laneDecision
1145
+ };
1146
+ }
1147
+ const publish = await input.adapter.publish();
1148
+ if (publish.reason !== "published_deployed_verified") {
1149
+ return {
1150
+ message: `ALERT: builder proactive failed (${publish.reason})`,
1151
+ state,
1152
+ laneDecision,
1153
+ publish
1154
+ };
1155
+ }
1156
+ return { message: "BUILDER_BUILT: proactive_change_applied_and_validated", state, laneDecision, publish };
1157
+ };
1158
+
953
1159
  // src/runtimeMigration.ts
954
1160
  var buildRuntimeMigrationPlan = (input) => {
955
1161
  const blockers = [];
@@ -1112,7 +1318,7 @@ var ReviewGate = class {
1112
1318
  var DEFAULT_API_BASE = "https://api.vibeiao.com";
1113
1319
  var DEFAULT_WEB_BASE = "https://vibeiao.com";
1114
1320
  var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
1115
- var DEFAULT_SDK_VERSION = "0.1.55" ? "0.1.55" : "0.1.4";
1321
+ var DEFAULT_SDK_VERSION = "0.1.57" ? "0.1.57" : "0.1.4";
1116
1322
  var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
1117
1323
  var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
1118
1324
  var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
@@ -1338,11 +1544,11 @@ var extractCreditsFromPayload = (payload, creditsPath) => {
1338
1544
  return credits;
1339
1545
  };
1340
1546
  var defaultApiKeyEnvForProvider = (provider) => {
1341
- const normalized = normalizeProviderName(provider);
1342
- if (normalized === "openrouter") return "OPENROUTER_API_KEY";
1343
- if (normalized === "anthropic") return "ANTHROPIC_API_KEY";
1344
- if (normalized === "gemini") return "GEMINI_API_KEY";
1345
- return `${normalized.toUpperCase()}_API_KEY`;
1547
+ const normalized2 = normalizeProviderName(provider);
1548
+ if (normalized2 === "openrouter") return "OPENROUTER_API_KEY";
1549
+ if (normalized2 === "anthropic") return "ANTHROPIC_API_KEY";
1550
+ if (normalized2 === "gemini") return "GEMINI_API_KEY";
1551
+ return `${normalized2.toUpperCase()}_API_KEY`;
1346
1552
  };
1347
1553
  var providerConfigError = (providerName, detail, nextStep) => `provider_config_error:${providerName}:${detail}. ${nextStep}`;
1348
1554
  var providerFetchError = (providerName, detail) => `provider_fetch_failed:${providerName}:${detail}`;
@@ -2322,8 +2528,10 @@ export {
2322
2528
  rankListingsForTask,
2323
2529
  runAdapterBestShotChecklist,
2324
2530
  runAdaptiveReflectionCycle,
2531
+ runAgentCronRuntimeCycle,
2325
2532
  runAgentLaunchRuntime,
2326
2533
  runAgentLaunchRuntimeCycle,
2534
+ runAgentPublishRuntimeCycle,
2327
2535
  runAgentReviewRuntimeCycle,
2328
2536
  runExecutionAdapter,
2329
2537
  runMarketDiscovery,
@@ -8,7 +8,7 @@ import './survivalEscapeHatch.js';
8
8
  import './marketDiscovery.js';
9
9
  import './outcomeBoundFlow.js';
10
10
  import './strictMemoryRuntime.js';
11
- import './agentLoop-DAkl2g28.js';
11
+ import { L as LaneMode, a as LaneSwitchDecision } from './agentLoop-DAkl2g28.js';
12
12
  import './solana.js';
13
13
  import './compoundingMemory.js';
14
14
  import '@coral-xyz/anchor';
@@ -1162,6 +1162,113 @@ type AgentLaunchRuntimeResult = {
1162
1162
  declare const runAgentLaunchRuntime: (options: AgentLaunchRuntimeOptions) => Promise<AgentLaunchRuntimeResult>;
1163
1163
  declare const runAgentLaunchRuntimeCycle: (options: AgentLaunchRuntimeOptions) => Promise<AgentLaunchRuntimeResult>;
1164
1164
 
1165
+ type PublishRuntimeMode = 'observe' | 'enforce';
1166
+ type PublishProductKind = 'agent_app' | 'human_game' | 'human_saas';
1167
+ type PublishListingType = 'agent' | 'human';
1168
+ type PublishCandidate = {
1169
+ id: string;
1170
+ dir?: string;
1171
+ meta?: Record<string, unknown>;
1172
+ productKind?: PublishProductKind;
1173
+ };
1174
+ type PublishPrepareResult = {
1175
+ changed: boolean;
1176
+ candidate?: PublishCandidate;
1177
+ reason?: string;
1178
+ };
1179
+ type PublishValidateResult = {
1180
+ passed: boolean;
1181
+ reason?: string;
1182
+ metrics?: Record<string, number | string | boolean>;
1183
+ };
1184
+ type PublishListingResult = {
1185
+ listingId: string;
1186
+ claimId?: string;
1187
+ listingType?: PublishListingType;
1188
+ category?: string;
1189
+ };
1190
+ type PublishDeployResult = {
1191
+ productUrl?: string;
1192
+ deployId?: string;
1193
+ };
1194
+ type PublishVerifyResult = {
1195
+ passed: boolean;
1196
+ reason?: string;
1197
+ metrics?: Record<string, number | string | boolean>;
1198
+ };
1199
+ interface PublishRuntimeAdapter {
1200
+ prepare: () => Promise<PublishPrepareResult> | PublishPrepareResult;
1201
+ validate: (input: {
1202
+ candidate: PublishCandidate;
1203
+ }) => Promise<PublishValidateResult> | PublishValidateResult;
1204
+ publish: (input: {
1205
+ candidate: PublishCandidate;
1206
+ }) => Promise<PublishListingResult> | PublishListingResult;
1207
+ deploy: (input: {
1208
+ candidate: PublishCandidate;
1209
+ listing: PublishListingResult;
1210
+ }) => Promise<PublishDeployResult> | PublishDeployResult;
1211
+ verify: (input: {
1212
+ candidate: PublishCandidate;
1213
+ listing: PublishListingResult;
1214
+ deploy: PublishDeployResult;
1215
+ }) => Promise<PublishVerifyResult> | PublishVerifyResult;
1216
+ }
1217
+ type PublishRuntimeResult = {
1218
+ mode: PublishRuntimeMode;
1219
+ changed: boolean;
1220
+ attempted: boolean;
1221
+ published: boolean;
1222
+ deployed: boolean;
1223
+ verified: boolean;
1224
+ reason: string;
1225
+ candidate?: PublishCandidate;
1226
+ validate?: PublishValidateResult;
1227
+ listing?: PublishListingResult;
1228
+ deploy?: PublishDeployResult;
1229
+ verify?: PublishVerifyResult;
1230
+ };
1231
+ declare const runAgentPublishRuntimeCycle: (input: {
1232
+ mode?: PublishRuntimeMode;
1233
+ adapter?: PublishRuntimeAdapter;
1234
+ }) => Promise<PublishRuntimeResult>;
1235
+
1236
+ type AgentCronCycleState = {
1237
+ lane?: LaneMode;
1238
+ greenStreak?: number;
1239
+ };
1240
+ type AgentCronHealth = {
1241
+ releaseReady: boolean;
1242
+ criticalPolishSignal?: boolean;
1243
+ builderObjectiveAvailable?: boolean;
1244
+ greenStreak?: number;
1245
+ };
1246
+ type AgentCronReflectResult = {
1247
+ acted: number;
1248
+ summary?: string;
1249
+ };
1250
+ type AgentCronResearchResult = {
1251
+ ok: boolean;
1252
+ reason?: string;
1253
+ };
1254
+ interface AgentCronRuntimeAdapter {
1255
+ health: () => Promise<AgentCronHealth> | AgentCronHealth;
1256
+ reflect: () => Promise<AgentCronReflectResult> | AgentCronReflectResult;
1257
+ research: () => Promise<AgentCronResearchResult> | AgentCronResearchResult;
1258
+ publish: () => Promise<PublishRuntimeResult> | PublishRuntimeResult;
1259
+ }
1260
+ type AgentCronCycleResult = {
1261
+ message: string;
1262
+ state: AgentCronCycleState;
1263
+ laneDecision: LaneSwitchDecision;
1264
+ publish?: PublishRuntimeResult;
1265
+ };
1266
+ declare const runAgentCronRuntimeCycle: (input: {
1267
+ adapter: AgentCronRuntimeAdapter;
1268
+ state?: AgentCronCycleState;
1269
+ builderOnGreenStreak?: number;
1270
+ }) => Promise<AgentCronCycleResult>;
1271
+
1165
1272
  type RuntimeMigrationInput = {
1166
1273
  profile: AdapterPackKind;
1167
1274
  listingId: string;
@@ -1655,4 +1762,4 @@ declare const getResourceSnapshot: (options: {
1655
1762
  apiBase?: string;
1656
1763
  }) => Promise<ResourceSnapshot>;
1657
1764
 
1658
- export { type LeaderboardQuery as $, type AdapterBestShotChecklistResult as A, type BuybackEvent as B, CONTEXT_PACK_SECTION_ORDER as C, type ContextPackOptions as D, type ContextPackSectionKey as E, type ContextPackSections as F, type ContextPackState as G, type DurabilityCheckpointWriteOptions as H, type DurabilityProxyClientOptions as I, type DurabilityRestoreDrillWriteOptions as J, type ExecutionAdapter as K, type ExecutionApplyResult as L, type ExecutionDecisionRecord as M, type ExecutionDryRunResult as N, type ExecutionPostDeployVerifyResult as O, type ExecutionRollbackResult as P, type ExecutionRolloutMode as Q, type ExecutionRunResult as R, type ExecutionValidateResult as S, LISTING_NAME_MAX_LENGTH as T, type TopupDecision, type TopupRequest, type TreasuryLedgerEvent, type TreasuryPolicy, type TreasuryPolicyV1, type TreasuryState, LISTING_NAME_RECOMMENDED_MAX as U, LISTING_TAGLINE_MAX_LENGTH as V, LISTING_TAGLINE_RECOMMENDED_MAX as W, type LaunchProfile as X, type LaunchReadinessInput as Y, type LaunchReadinessResult as Z, type LeaderboardEntry as _, type AdapterPackKind as a, createDurabilityProxyClient as a$, type ListingNamingValidationOptions as a0, type ListingNamingValidationResult as a1, type ListingQuery as a2, type ListingReviewCreatePayload as a3, type ListingReviewResponsePayload as a4, type ListingVersionPayload as a5, type MarketingCampaign as a6, type MarketingLinkOptions as a7, type MemoryPingChallengeResponse as a8, type MemoryPingPayload as a9, buildAdaptivePlan as aA, buildBadgeMarkdown as aB, buildClaimMessage as aC, buildDecisionRecord as aD, buildJupiterSwapUrl as aE, buildListingVersionMessage as aF, buildMemoryPingMessage as aG, buildOwnerTransferMessage as aH, buildProcurementPrompt as aI, buildRaydiumSwapUrl as aJ, buildReviewPrompt as aK, buildReviewRequired as aL, buildReviewResponseMessage as aM, buildRuntimeMigrationPlan as aN, buildSdkUpdateCommand as aO, buildShareCopy as aP, buildShareLink as aQ, buildTradeLinks as aR, checkForSdkUpdate as aS, checkForSdkUpdatePolicy as aT, compareVersions as aU, createApiCreditProvider as aV, createApiCreditProviders as aW, createApiCreditProvidersFromManifest as aX, createCampaign as aY, createContextPack as aZ, createCustomAdapter as a_, type OpenRouterCredits as aa, type ProcurementCandidate as ab, type ProcurementDecision as ac, type ProcurementTaskProfile as ad, type ProcurementWeights as ae, type ResourceProviderManifestEntry as af, type ResourceSnapshot as ag, ReviewGate as ah, type ReviewGateRecord as ai, type ReviewRequiredPayload as aj, type RunAdaptiveReflectionOptions as ak, type RuntimeMigrationInput as al, type RuntimeMigrationPlan as am, type RuntimeStateSnapshot as an, SdkAutoUpdatedRestartRequiredError as ao, type SdkUpdateCheckOptions as ap, type SdkUpdatePolicyCheckOptions as aq, SdkUpdateRequiredError as ar, type SdkUpdateStatus as as, VIBEIAO_IDL as at, VibeClient as au, type VibeClientOptions as av, VibeRegistry as aw, aggregateFeedbackSignals as ax, assertLaunchReady as ay, assertSurvivalProvidersConfigured as az, type AdapterPackOptions as b, createServiceApiAdapter as b0, createWebBundledAdapter as b1, createWebStaticAdapter as b2, createWorkflowAgentAdapter as b3, decideProcurementForTask as b4, estimateContextPackTokens as b5, evaluateAdaptiveReflectionPolicy as b6, evaluateContextPackGate as b7, evaluateLaunchReadiness as b8, getResourceSnapshot as b9, normalizeListingText as ba, rankListingsForTask as bb, runAdapterBestShotChecklist as bc, runAdaptiveReflectionCycle as bd, runAgentLaunchRuntime as be, runAgentLaunchRuntimeCycle as bf, runAgentReviewRuntimeCycle as bg, runExecutionAdapter as bh, sanitizeListingNaming as bi, scoreListingForTask as bj, shouldAnnounceStateChange as bk, validateContextPack as bl, validateListingNaming as bm, verifyAdaptiveExecutionReadiness as bn, buildTreasuryLedgerEvent, type AdaptiveAdaptationPlan as c, createTreasuryPolicy, type AdaptiveExecution as d, type AdaptiveFeedbackAggregate as e, evaluateTopupRequest, type AdaptivePolicyConfig as f, type AdaptivePolicyDecision as g, type AdaptivePolicyState as h, type AdaptiveReflectionStore as i, type AdaptiveTheme as j, type AdaptiveVerification as k, type AgentLaunchRuntimeOptions as l, type AgentLaunchRuntimeResult as m, type AgentResourceProvidersManifest as n, type AgentReviewRuntimeOptions as o, type AnalyticsPoint as p, type ApiCreditProvider as q, type ApiCreditProviderFactoryOptions as r, type ApiCreditProviderPreset as s, type ApiCreditProviderPresetInput as t, treasuryStateFromSnapshot, type ApiResponse as u, type ContextPack as v, validateTreasuryPolicy, type ContextPackBudget as w, type ContextPackGateOptions as x, type ContextPackGateResult as y, type ContextPackInput as z };
1765
+ export { LISTING_TAGLINE_MAX_LENGTH as $, type AdapterBestShotChecklistResult as A, type ApiResponse as B, type BuybackEvent as C, CONTEXT_PACK_SECTION_ORDER as D, type ContextPack as E, type ContextPackBudget as F, type ContextPackGateOptions as G, type ContextPackGateResult as H, type ContextPackInput as I, type ContextPackOptions as J, type ContextPackSectionKey as K, type ContextPackSections as L, type ContextPackState as M, type DurabilityCheckpointWriteOptions as N, type DurabilityProxyClientOptions as O, type DurabilityRestoreDrillWriteOptions as P, type ExecutionAdapter as Q, type ExecutionApplyResult as R, type ExecutionDecisionRecord as S, type ExecutionDryRunResult as T, type TopupDecision, type TopupRequest, type TreasuryLedgerEvent, type TreasuryPolicy, type TreasuryPolicyV1, type TreasuryState, type ExecutionPostDeployVerifyResult as U, type ExecutionRollbackResult as V, type ExecutionRolloutMode as W, type ExecutionRunResult as X, type ExecutionValidateResult as Y, LISTING_NAME_MAX_LENGTH as Z, LISTING_NAME_RECOMMENDED_MAX as _, type AdapterPackKind as a, buildReviewPrompt as a$, LISTING_TAGLINE_RECOMMENDED_MAX as a0, type LaunchProfile as a1, type LaunchReadinessInput as a2, type LaunchReadinessResult as a3, type LeaderboardEntry as a4, type LeaderboardQuery as a5, type ListingNamingValidationOptions as a6, type ListingNamingValidationResult as a7, type ListingQuery as a8, type ListingReviewCreatePayload as a9, type ReviewRequiredPayload as aA, type RunAdaptiveReflectionOptions as aB, type RuntimeMigrationInput as aC, type RuntimeMigrationPlan as aD, type RuntimeStateSnapshot as aE, SdkAutoUpdatedRestartRequiredError as aF, type SdkUpdateCheckOptions as aG, type SdkUpdatePolicyCheckOptions as aH, SdkUpdateRequiredError as aI, type SdkUpdateStatus as aJ, VIBEIAO_IDL as aK, VibeClient as aL, type VibeClientOptions as aM, VibeRegistry as aN, aggregateFeedbackSignals as aO, assertLaunchReady as aP, assertSurvivalProvidersConfigured as aQ, buildAdaptivePlan as aR, buildBadgeMarkdown as aS, buildClaimMessage as aT, buildDecisionRecord as aU, buildJupiterSwapUrl as aV, buildListingVersionMessage as aW, buildMemoryPingMessage as aX, buildOwnerTransferMessage as aY, buildProcurementPrompt as aZ, buildRaydiumSwapUrl as a_, type ListingReviewResponsePayload as aa, type ListingVersionPayload as ab, type MarketingCampaign as ac, type MarketingLinkOptions as ad, type MemoryPingChallengeResponse as ae, type MemoryPingPayload as af, type OpenRouterCredits as ag, type ProcurementCandidate as ah, type ProcurementDecision as ai, type ProcurementTaskProfile as aj, type ProcurementWeights as ak, type PublishCandidate as al, type PublishDeployResult as am, type PublishListingResult as an, type PublishListingType as ao, type PublishPrepareResult as ap, type PublishProductKind as aq, type PublishRuntimeAdapter as ar, type PublishRuntimeMode as as, type PublishRuntimeResult as at, type PublishValidateResult as au, type PublishVerifyResult as av, type ResourceProviderManifestEntry as aw, type ResourceSnapshot as ax, ReviewGate as ay, type ReviewGateRecord as az, type AdapterPackOptions as b, buildReviewRequired as b0, buildReviewResponseMessage as b1, buildRuntimeMigrationPlan as b2, buildSdkUpdateCommand as b3, buildShareCopy as b4, buildShareLink as b5, buildTradeLinks as b6, checkForSdkUpdate as b7, checkForSdkUpdatePolicy as b8, compareVersions as b9, runExecutionAdapter as bA, sanitizeListingNaming as bB, scoreListingForTask as bC, shouldAnnounceStateChange as bD, validateContextPack as bE, validateListingNaming as bF, verifyAdaptiveExecutionReadiness as bG, createApiCreditProvider as ba, createApiCreditProviders as bb, createApiCreditProvidersFromManifest as bc, createCampaign as bd, createContextPack as be, createCustomAdapter as bf, createDurabilityProxyClient as bg, createServiceApiAdapter as bh, createWebBundledAdapter as bi, createWebStaticAdapter as bj, createWorkflowAgentAdapter as bk, decideProcurementForTask as bl, estimateContextPackTokens as bm, evaluateAdaptiveReflectionPolicy as bn, evaluateContextPackGate as bo, evaluateLaunchReadiness as bp, getResourceSnapshot as bq, normalizeListingText as br, rankListingsForTask as bs, runAdapterBestShotChecklist as bt, runAdaptiveReflectionCycle as bu, buildTreasuryLedgerEvent, runAgentCronRuntimeCycle as bv, runAgentLaunchRuntime as bw, runAgentLaunchRuntimeCycle as bx, runAgentPublishRuntimeCycle as by, runAgentReviewRuntimeCycle as bz, type AdaptiveAdaptationPlan as c, createTreasuryPolicy, type AdaptiveExecution as d, type AdaptiveFeedbackAggregate as e, evaluateTopupRequest, type AdaptivePolicyConfig as f, type AdaptivePolicyDecision as g, type AdaptivePolicyState as h, type AdaptiveReflectionStore as i, type AdaptiveTheme as j, type AdaptiveVerification as k, type AgentCronCycleResult as l, type AgentCronCycleState as m, type AgentCronHealth as n, type AgentCronReflectResult as o, type AgentCronResearchResult as p, type AgentCronRuntimeAdapter as q, type AgentLaunchRuntimeOptions as r, type AgentLaunchRuntimeResult as s, type AgentResourceProvidersManifest as t, treasuryStateFromSnapshot, type AgentReviewRuntimeOptions as u, type AnalyticsPoint as v, validateTreasuryPolicy, type ApiCreditProvider as w, type ApiCreditProviderFactoryOptions as x, type ApiCreditProviderPreset as y, type ApiCreditProviderPresetInput as z };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@vibeiao/sdk",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.1.56",
5
+ "version": "0.1.58",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {