@vibeiao/sdk 0.1.50 → 0.1.51
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 +41 -18
- package/dist/treasuryGuardian.d.ts +12 -1
- 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 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
|
|
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';
|
|
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, O as ObjectiveChangeProposal, a as ObjectiveChangeSourceTrust, b as ObjectiveGuardDecision, c as ObjectiveGuardPolicy, P as PromptShieldDecision, d as PromptShieldFlag, e as PromptShieldInput, f as PromptShieldPolicy, g as PromptShieldRisk, h as PromptShieldTrustLevel, i as applyIntentArbitration, j as evaluateObjectiveChange, k as evaluatePromptShield, s as scoreBuildLane, l as scorePolishLane } from './agentLoop-Dn6aMtRD.js';
|
package/dist/index.js
CHANGED
|
@@ -287,25 +287,48 @@ var runExecutionAdapter = async (input) => {
|
|
|
287
287
|
return { mode, attempted: true, applied: false, validated: false, rolledBack: false, reason: apply.reason || "apply_not_applied", dryRun, apply };
|
|
288
288
|
}
|
|
289
289
|
const validate = await adapter.validate({ record, apply });
|
|
290
|
-
if (validate.passed) {
|
|
291
|
-
|
|
290
|
+
if (!validate.passed) {
|
|
291
|
+
if (adapter.rollback) {
|
|
292
|
+
const rollback = await adapter.rollback({ record, apply, validate });
|
|
293
|
+
return {
|
|
294
|
+
mode,
|
|
295
|
+
attempted: true,
|
|
296
|
+
applied: true,
|
|
297
|
+
validated: false,
|
|
298
|
+
rolledBack: rollback.rolledBack,
|
|
299
|
+
reason: rollback.rolledBack ? "rolled_back_after_validation_fail" : "validation_fail_rollback_failed",
|
|
300
|
+
dryRun,
|
|
301
|
+
apply,
|
|
302
|
+
validate,
|
|
303
|
+
rollback
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
return { mode, attempted: true, applied: true, validated: false, rolledBack: false, reason: "validation_failed_no_rollback", dryRun, apply, validate };
|
|
292
307
|
}
|
|
293
|
-
if (adapter.
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
308
|
+
if (adapter.postDeployVerify) {
|
|
309
|
+
const postDeployVerify = await adapter.postDeployVerify({ record, apply, validate });
|
|
310
|
+
if (!postDeployVerify.passed) {
|
|
311
|
+
if (adapter.rollback) {
|
|
312
|
+
const rollback = await adapter.rollback({ record, apply, validate });
|
|
313
|
+
return {
|
|
314
|
+
mode,
|
|
315
|
+
attempted: true,
|
|
316
|
+
applied: true,
|
|
317
|
+
validated: false,
|
|
318
|
+
rolledBack: rollback.rolledBack,
|
|
319
|
+
reason: rollback.rolledBack ? "rolled_back_after_postdeploy_verify_fail" : "postdeploy_verify_fail_rollback_failed",
|
|
320
|
+
dryRun,
|
|
321
|
+
apply,
|
|
322
|
+
validate,
|
|
323
|
+
postDeployVerify,
|
|
324
|
+
rollback
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
return { mode, attempted: true, applied: true, validated: false, rolledBack: false, reason: "postdeploy_verify_failed_no_rollback", dryRun, apply, validate, postDeployVerify };
|
|
328
|
+
}
|
|
329
|
+
return { mode, attempted: true, applied: true, validated: true, rolledBack: false, reason: "applied_validated_and_verified", dryRun, apply, validate, postDeployVerify };
|
|
307
330
|
}
|
|
308
|
-
return { mode, attempted: true, applied: true, validated:
|
|
331
|
+
return { mode, attempted: true, applied: true, validated: true, rolledBack: false, reason: "applied_and_validated", dryRun, apply, validate };
|
|
309
332
|
};
|
|
310
333
|
|
|
311
334
|
// src/adaptiveReflection.ts
|
|
@@ -1088,7 +1111,7 @@ var ReviewGate = class {
|
|
|
1088
1111
|
var DEFAULT_API_BASE = "https://api.vibeiao.com";
|
|
1089
1112
|
var DEFAULT_WEB_BASE = "https://vibeiao.com";
|
|
1090
1113
|
var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
|
|
1091
|
-
var DEFAULT_SDK_VERSION = "0.1.
|
|
1114
|
+
var DEFAULT_SDK_VERSION = "0.1.50" ? "0.1.50" : "0.1.4";
|
|
1092
1115
|
var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
|
|
1093
1116
|
var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
|
|
1094
1117
|
var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
|
|
@@ -853,6 +853,11 @@ type ExecutionValidateResult = {
|
|
|
853
853
|
metrics?: Record<string, number | string | boolean>;
|
|
854
854
|
reason?: string;
|
|
855
855
|
};
|
|
856
|
+
type ExecutionPostDeployVerifyResult = {
|
|
857
|
+
passed: boolean;
|
|
858
|
+
reason?: string;
|
|
859
|
+
metrics?: Record<string, number | string | boolean>;
|
|
860
|
+
};
|
|
856
861
|
type ExecutionRollbackResult = {
|
|
857
862
|
rolledBack: boolean;
|
|
858
863
|
reason?: string;
|
|
@@ -868,6 +873,11 @@ interface ExecutionAdapter {
|
|
|
868
873
|
record: ExecutionDecisionRecord;
|
|
869
874
|
apply: ExecutionApplyResult;
|
|
870
875
|
}) => Promise<ExecutionValidateResult> | ExecutionValidateResult;
|
|
876
|
+
postDeployVerify?: (input: {
|
|
877
|
+
record: ExecutionDecisionRecord;
|
|
878
|
+
apply: ExecutionApplyResult;
|
|
879
|
+
validate: ExecutionValidateResult;
|
|
880
|
+
}) => Promise<ExecutionPostDeployVerifyResult> | ExecutionPostDeployVerifyResult;
|
|
871
881
|
rollback?: (input: {
|
|
872
882
|
record: ExecutionDecisionRecord;
|
|
873
883
|
apply: ExecutionApplyResult;
|
|
@@ -884,6 +894,7 @@ type ExecutionRunResult = {
|
|
|
884
894
|
dryRun?: ExecutionDryRunResult;
|
|
885
895
|
apply?: ExecutionApplyResult;
|
|
886
896
|
validate?: ExecutionValidateResult;
|
|
897
|
+
postDeployVerify?: ExecutionPostDeployVerifyResult;
|
|
887
898
|
rollback?: ExecutionRollbackResult;
|
|
888
899
|
};
|
|
889
900
|
declare const buildDecisionRecord: (input: {
|
|
@@ -1644,4 +1655,4 @@ declare const getResourceSnapshot: (options: {
|
|
|
1644
1655
|
apiBase?: string;
|
|
1645
1656
|
}) => Promise<ResourceSnapshot>;
|
|
1646
1657
|
|
|
1647
|
-
export { type
|
|
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 };
|