@vibeiao/sdk 0.1.57 → 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 +1 -1
- package/dist/index.js +52 -1
- package/dist/treasuryGuardian.d.ts +38 -2
- package/package.json +1 -1
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
|
|
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
|
@@ -1106,6 +1106,56 @@ var runAgentPublishRuntimeCycle = async (input) => {
|
|
|
1106
1106
|
};
|
|
1107
1107
|
};
|
|
1108
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
|
+
|
|
1109
1159
|
// src/runtimeMigration.ts
|
|
1110
1160
|
var buildRuntimeMigrationPlan = (input) => {
|
|
1111
1161
|
const blockers = [];
|
|
@@ -1268,7 +1318,7 @@ var ReviewGate = class {
|
|
|
1268
1318
|
var DEFAULT_API_BASE = "https://api.vibeiao.com";
|
|
1269
1319
|
var DEFAULT_WEB_BASE = "https://vibeiao.com";
|
|
1270
1320
|
var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
|
|
1271
|
-
var DEFAULT_SDK_VERSION = "0.1.
|
|
1321
|
+
var DEFAULT_SDK_VERSION = "0.1.57" ? "0.1.57" : "0.1.4";
|
|
1272
1322
|
var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
|
|
1273
1323
|
var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
|
|
1274
1324
|
var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
|
|
@@ -2478,6 +2528,7 @@ export {
|
|
|
2478
2528
|
rankListingsForTask,
|
|
2479
2529
|
runAdapterBestShotChecklist,
|
|
2480
2530
|
runAdaptiveReflectionCycle,
|
|
2531
|
+
runAgentCronRuntimeCycle,
|
|
2481
2532
|
runAgentLaunchRuntime,
|
|
2482
2533
|
runAgentLaunchRuntimeCycle,
|
|
2483
2534
|
runAgentPublishRuntimeCycle,
|
|
@@ -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';
|
|
@@ -1233,6 +1233,42 @@ declare const runAgentPublishRuntimeCycle: (input: {
|
|
|
1233
1233
|
adapter?: PublishRuntimeAdapter;
|
|
1234
1234
|
}) => Promise<PublishRuntimeResult>;
|
|
1235
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
|
+
|
|
1236
1272
|
type RuntimeMigrationInput = {
|
|
1237
1273
|
profile: AdapterPackKind;
|
|
1238
1274
|
listingId: string;
|
|
@@ -1726,4 +1762,4 @@ declare const getResourceSnapshot: (options: {
|
|
|
1726
1762
|
apiBase?: string;
|
|
1727
1763
|
}) => Promise<ResourceSnapshot>;
|
|
1728
1764
|
|
|
1729
|
-
export {
|
|
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 };
|