@vibeiao/sdk 0.1.47 → 0.1.48
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/README.md +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +341 -14
- package/dist/treasuryGuardian.d.ts +124 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -691,6 +691,13 @@ Adaptive reflection policy is available for cadence-based adaptation (not per-re
|
|
|
691
691
|
- output `hold|observe|adapt` decision and optional bounded adaptation plan
|
|
692
692
|
- enforce `verify -> execute` sequencing in apply mode (no verify pass => no execution)
|
|
693
693
|
|
|
694
|
+
Adapter packs + migration helpers:
|
|
695
|
+
- use `createWebStaticAdapter`, `createWebBundledAdapter`, `createServiceApiAdapter`, `createWorkflowAgentAdapter`
|
|
696
|
+
- use `runAdapterBestShotChecklist` for profile-level launch checks
|
|
697
|
+
- use `runAgentLaunchRuntimeCycle` (alias of launch runtime) to enforce launch gate before publish execution
|
|
698
|
+
- use `buildRuntimeMigrationPlan` to migrate legacy runtime scripts to adapter-based review runtime
|
|
699
|
+
- use `shouldAnnounceStateChange` to suppress repetitive green cron/runtime notifications and only emit meaningful changes
|
|
700
|
+
|
|
694
701
|
You can also enforce dual-mode work arbitration:
|
|
695
702
|
- `owner_bound` agents: human-first (owner work preempts autonomous work)
|
|
696
703
|
- `unbound` agents: autonomous-first (run autonomous work by default)
|
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
|
|
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 ContextPackInput, y as ContextPackOptions, z as ContextPackSectionKey, D as ContextPackSections, E as DurabilityCheckpointWriteOptions, F as DurabilityProxyClientOptions, G as DurabilityRestoreDrillWriteOptions, H as ExecutionAdapter, I as ExecutionApplyResult, J as ExecutionDecisionRecord, K as ExecutionDryRunResult, L as ExecutionRollbackResult, M as ExecutionRolloutMode, N as ExecutionRunResult, O as ExecutionValidateResult, P as LISTING_NAME_MAX_LENGTH, Q as LISTING_NAME_RECOMMENDED_MAX, R as LISTING_TAGLINE_MAX_LENGTH, S as LISTING_TAGLINE_RECOMMENDED_MAX, T as LaunchProfile, U as LaunchReadinessInput, V as LaunchReadinessResult, W as LeaderboardEntry, X as LeaderboardQuery, Y as ListingNamingValidationOptions, Z as ListingNamingValidationResult, _ as ListingQuery, $ as ListingReviewCreatePayload, a0 as ListingReviewResponsePayload, a1 as ListingVersionPayload, a2 as MarketingCampaign, a3 as MarketingLinkOptions, a4 as MemoryPingChallengeResponse, a5 as MemoryPingPayload, a6 as OpenRouterCredits, a7 as ProcurementCandidate, a8 as ProcurementDecision, a9 as ProcurementTaskProfile, aa as ProcurementWeights, ab as ResourceProviderManifestEntry, ac as ResourceSnapshot, ad as ReviewGate, ae as ReviewGateRecord, af as ReviewRequiredPayload, ag as RunAdaptiveReflectionOptions, ah as RuntimeMigrationInput, ai as RuntimeMigrationPlan, aj as RuntimeStateSnapshot, ak as SdkAutoUpdatedRestartRequiredError, al as SdkUpdateCheckOptions, am as SdkUpdatePolicyCheckOptions, an as SdkUpdateRequiredError, ao as SdkUpdateStatus, TopupDecision, TopupRequest, TreasuryLedgerEvent, TreasuryPolicy, TreasuryPolicyV1, TreasuryState, ap as VIBEIAO_IDL, aq as VibeClient, ar as VibeClientOptions, as as VibeRegistry, at as aggregateFeedbackSignals, au as assertLaunchReady, av as assertSurvivalProvidersConfigured, aw as buildAdaptivePlan, ax as buildBadgeMarkdown, ay as buildClaimMessage, az as buildDecisionRecord, aA as buildJupiterSwapUrl, aB as buildListingVersionMessage, aC as buildMemoryPingMessage, aD as buildOwnerTransferMessage, aE as buildProcurementPrompt, aF as buildRaydiumSwapUrl, aG as buildReviewPrompt, aH as buildReviewRequired, aI as buildReviewResponseMessage, aJ as buildRuntimeMigrationPlan, aK as buildSdkUpdateCommand, aL as buildShareCopy, aM as buildShareLink, aN as buildTradeLinks, buildTreasuryLedgerEvent, aO as checkForSdkUpdate, aP as checkForSdkUpdatePolicy, aQ as compareVersions, aR as createApiCreditProvider, aS as createApiCreditProviders, aT as createApiCreditProvidersFromManifest, aU as createCampaign, aV as createContextPack, aW as createCustomAdapter, aX as createDurabilityProxyClient, aY as createServiceApiAdapter, createTreasuryPolicy, aZ as createWebBundledAdapter, a_ as createWebStaticAdapter, a$ as createWorkflowAgentAdapter, b0 as decideProcurementForTask, b1 as estimateContextPackTokens, b2 as evaluateAdaptiveReflectionPolicy, b3 as evaluateLaunchReadiness, evaluateTopupRequest, b4 as getResourceSnapshot, b5 as normalizeListingText, b6 as rankListingsForTask, b7 as runAdapterBestShotChecklist, b8 as runAdaptiveReflectionCycle, b9 as runAgentLaunchRuntime, ba as runAgentLaunchRuntimeCycle, bb as runAgentReviewRuntimeCycle, bc as runExecutionAdapter, bd as sanitizeListingNaming, be as scoreListingForTask, bf as shouldAnnounceStateChange, treasuryStateFromSnapshot, bg as validateContextPack, bh as validateListingNaming, validateTreasuryPolicy, bi 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 { d as ObjectiveChangeProposal, e as ObjectiveChangeSourceTrust, O as ObjectiveGuardDecision, c as ObjectiveGuardPolicy, P as PromptShieldDecision, f as PromptShieldFlag, b as PromptShieldInput, a as PromptShieldPolicy, g as PromptShieldRisk, h as PromptShieldTrustLevel, i as evaluateObjectiveChange, j as evaluatePromptShield } from './objectiveGuard-d1x0xgAD.js';
|
package/dist/index.js
CHANGED
|
@@ -545,16 +545,16 @@ var runAdaptiveReflectionCycle = async (opts) => {
|
|
|
545
545
|
objective: plan.objectiveDelta,
|
|
546
546
|
nowMs
|
|
547
547
|
});
|
|
548
|
-
const
|
|
548
|
+
const run2 = await runExecutionAdapter({
|
|
549
549
|
mode: rolloutMode,
|
|
550
550
|
record,
|
|
551
551
|
adapter: opts.execution.adapter
|
|
552
552
|
});
|
|
553
553
|
execution = {
|
|
554
|
-
attempted:
|
|
555
|
-
applied:
|
|
554
|
+
attempted: run2.attempted,
|
|
555
|
+
applied: run2.applied,
|
|
556
556
|
mode,
|
|
557
|
-
reason:
|
|
557
|
+
reason: run2.reason
|
|
558
558
|
};
|
|
559
559
|
} else {
|
|
560
560
|
execution = {
|
|
@@ -612,6 +612,321 @@ var runAgentReviewRuntimeCycle = async (opts) => {
|
|
|
612
612
|
});
|
|
613
613
|
};
|
|
614
614
|
|
|
615
|
+
// src/launchReadiness.ts
|
|
616
|
+
var evaluateLaunchReadiness = (input) => {
|
|
617
|
+
const blockers = [];
|
|
618
|
+
const notes = [];
|
|
619
|
+
if (!String(input.targetUser || "").trim()) blockers.push("missing_target_user");
|
|
620
|
+
if (!String(input.problemStatement || "").trim()) blockers.push("missing_problem_statement");
|
|
621
|
+
if (!Array.isArray(input.researchEvidence) || input.researchEvidence.length < 2) blockers.push("insufficient_research_evidence");
|
|
622
|
+
if (!String(input.designRationale || "").trim()) blockers.push("missing_design_rationale");
|
|
623
|
+
const qualityChecks = Array.isArray(input.qualityChecks) ? input.qualityChecks : [];
|
|
624
|
+
if (!qualityChecks.length) blockers.push("missing_quality_checks");
|
|
625
|
+
if (qualityChecks.some((q) => !q.passed)) blockers.push("quality_checks_failed");
|
|
626
|
+
if (!String(input.rollbackPlan || "").trim()) blockers.push("missing_rollback_plan");
|
|
627
|
+
const deployUrl = String(input.deploy?.url || "").trim();
|
|
628
|
+
const smokePassed = Boolean(input.deploy?.smokePassed);
|
|
629
|
+
const listingUpdated = Boolean(input.listing?.updated);
|
|
630
|
+
if (!deployUrl) blockers.push("missing_deploy_url");
|
|
631
|
+
if (!smokePassed) blockers.push("smoke_check_failed");
|
|
632
|
+
if (!listingUpdated) blockers.push("listing_not_updated");
|
|
633
|
+
const score = Math.max(0, 1 - blockers.length / 10);
|
|
634
|
+
if (!blockers.length) notes.push("launch_readiness_passed");
|
|
635
|
+
return {
|
|
636
|
+
ready: blockers.length === 0,
|
|
637
|
+
score,
|
|
638
|
+
blockers,
|
|
639
|
+
notes
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
var assertLaunchReady = (input) => {
|
|
643
|
+
const result = evaluateLaunchReadiness(input);
|
|
644
|
+
if (!result.ready) {
|
|
645
|
+
throw new Error(`launch_readiness_failed:${result.blockers.join(",")}`);
|
|
646
|
+
}
|
|
647
|
+
return result;
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
// src/adapterPacks.ts
|
|
651
|
+
import { execSync } from "child_process";
|
|
652
|
+
import path from "path";
|
|
653
|
+
import fs from "fs";
|
|
654
|
+
var run = (command, cwd) => {
|
|
655
|
+
execSync(command, { cwd, stdio: "pipe" });
|
|
656
|
+
};
|
|
657
|
+
var checkPaths = (cwd, required) => required.map((p) => ({
|
|
658
|
+
name: `path:${p}`,
|
|
659
|
+
passed: fs.existsSync(path.join(cwd, p)),
|
|
660
|
+
detail: path.join(cwd, p)
|
|
661
|
+
}));
|
|
662
|
+
var readPackageJson = (cwd) => {
|
|
663
|
+
const p = path.join(cwd, "package.json");
|
|
664
|
+
if (!fs.existsSync(p)) return null;
|
|
665
|
+
try {
|
|
666
|
+
return JSON.parse(fs.readFileSync(p, "utf8"));
|
|
667
|
+
} catch {
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
var checkWebStaticLinks = (cwd) => {
|
|
672
|
+
const indexPath = path.join(cwd, "index.html");
|
|
673
|
+
if (!fs.existsSync(indexPath)) {
|
|
674
|
+
return [
|
|
675
|
+
{ name: "index_has_css_link", passed: false, detail: "index.html missing" },
|
|
676
|
+
{ name: "index_has_script_ref", passed: false, detail: "index.html missing" }
|
|
677
|
+
];
|
|
678
|
+
}
|
|
679
|
+
const html = fs.readFileSync(indexPath, "utf8");
|
|
680
|
+
return [
|
|
681
|
+
{
|
|
682
|
+
name: "index_has_css_link",
|
|
683
|
+
passed: /<link[^>]+href=["'][^"']+\.css["']/i.test(html),
|
|
684
|
+
detail: "index.html should include a CSS asset link"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
name: "index_has_script_ref",
|
|
688
|
+
passed: /<script[^>]+src=["'][^"']+\.js["']/i.test(html),
|
|
689
|
+
detail: "index.html should include a JS asset script tag"
|
|
690
|
+
}
|
|
691
|
+
];
|
|
692
|
+
};
|
|
693
|
+
var runAdapterBestShotChecklist = (profile, options) => {
|
|
694
|
+
const checks = [];
|
|
695
|
+
const pkg = readPackageJson(options.cwd);
|
|
696
|
+
const scripts = pkg?.scripts || {};
|
|
697
|
+
if (profile === "web_static") {
|
|
698
|
+
checks.push(...checkPaths(options.cwd, options.requiredPaths || ["index.html", "style.css"]));
|
|
699
|
+
checks.push(...checkWebStaticLinks(options.cwd));
|
|
700
|
+
} else if (profile === "web_bundled") {
|
|
701
|
+
checks.push(...checkPaths(options.cwd, options.requiredPaths || ["package.json"]));
|
|
702
|
+
checks.push({ name: "package_has_build_script", passed: Boolean(scripts.build), detail: scripts.build });
|
|
703
|
+
checks.push({
|
|
704
|
+
name: "package_has_test_or_validate_script",
|
|
705
|
+
passed: Boolean(scripts.test || scripts.validate || options.validateCommand),
|
|
706
|
+
detail: String(scripts.test || scripts.validate || options.validateCommand || "")
|
|
707
|
+
});
|
|
708
|
+
checks.push({
|
|
709
|
+
name: "has_build_or_smoke_command",
|
|
710
|
+
passed: Boolean(options.buildCommand || options.smokeCommand),
|
|
711
|
+
detail: String(options.buildCommand || options.smokeCommand || "")
|
|
712
|
+
});
|
|
713
|
+
} else if (profile === "service_api") {
|
|
714
|
+
checks.push(...checkPaths(options.cwd, options.requiredPaths || ["package.json"]));
|
|
715
|
+
checks.push({ name: "has_deploy_command", passed: Boolean(options.deployCommand), detail: options.deployCommand });
|
|
716
|
+
checks.push({
|
|
717
|
+
name: "has_validate_or_smoke_command",
|
|
718
|
+
passed: Boolean(options.validateCommand || options.smokeCommand || scripts.test),
|
|
719
|
+
detail: String(options.validateCommand || options.smokeCommand || scripts.test || "")
|
|
720
|
+
});
|
|
721
|
+
checks.push({
|
|
722
|
+
name: "package_has_start_or_serve_script",
|
|
723
|
+
passed: Boolean(scripts.start || scripts.serve),
|
|
724
|
+
detail: String(scripts.start || scripts.serve || "")
|
|
725
|
+
});
|
|
726
|
+
} else if (profile === "workflow_agent") {
|
|
727
|
+
checks.push(...checkPaths(options.cwd, options.requiredPaths || ["package.json"]));
|
|
728
|
+
checks.push({
|
|
729
|
+
name: "has_validate_or_test_command",
|
|
730
|
+
passed: Boolean(options.validateCommand || scripts.test),
|
|
731
|
+
detail: String(options.validateCommand || scripts.test || "")
|
|
732
|
+
});
|
|
733
|
+
checks.push({
|
|
734
|
+
name: "has_apply_or_deploy_command",
|
|
735
|
+
passed: Boolean(options.deployCommand || scripts.start),
|
|
736
|
+
detail: String(options.deployCommand || scripts.start || "")
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
return {
|
|
740
|
+
profile,
|
|
741
|
+
passed: checks.every((c) => c.passed),
|
|
742
|
+
checks
|
|
743
|
+
};
|
|
744
|
+
};
|
|
745
|
+
var createWebStaticAdapter = (opts) => ({
|
|
746
|
+
dryRun: async () => {
|
|
747
|
+
const required = ["index.html", "style.css"];
|
|
748
|
+
const missing = required.filter((f) => !fs.existsSync(path.join(opts.cwd, f)));
|
|
749
|
+
return { feasible: missing.length === 0, reasons: missing.map((m) => `missing:${m}`) };
|
|
750
|
+
},
|
|
751
|
+
apply: async () => {
|
|
752
|
+
try {
|
|
753
|
+
if (opts.buildCommand) run(opts.buildCommand, opts.cwd);
|
|
754
|
+
if (opts.deployCommand) run(opts.deployCommand, opts.cwd);
|
|
755
|
+
return { applied: true, evidence: "web_static_deploy_applied" };
|
|
756
|
+
} catch (err) {
|
|
757
|
+
return { applied: false, reason: `web_static_apply_failed:${String(err)}` };
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
validate: async () => {
|
|
761
|
+
try {
|
|
762
|
+
if (opts.validateCommand) run(opts.validateCommand, opts.cwd);
|
|
763
|
+
if (opts.smokeCommand) run(opts.smokeCommand, opts.cwd);
|
|
764
|
+
return { passed: true, metrics: { profile: "web_static" } };
|
|
765
|
+
} catch (err) {
|
|
766
|
+
return { passed: false, reason: `web_static_validate_failed:${String(err)}` };
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
var createWebBundledAdapter = (opts) => ({
|
|
771
|
+
dryRun: async () => ({ feasible: true, reasons: [] }),
|
|
772
|
+
apply: async () => {
|
|
773
|
+
try {
|
|
774
|
+
run(opts.buildCommand || "npm run build", opts.cwd);
|
|
775
|
+
if (opts.deployCommand) run(opts.deployCommand, opts.cwd);
|
|
776
|
+
return { applied: true, evidence: "web_bundled_deploy_applied" };
|
|
777
|
+
} catch (err) {
|
|
778
|
+
return { applied: false, reason: `web_bundled_apply_failed:${String(err)}` };
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
validate: async () => {
|
|
782
|
+
try {
|
|
783
|
+
if (opts.validateCommand) run(opts.validateCommand, opts.cwd);
|
|
784
|
+
if (opts.smokeCommand) run(opts.smokeCommand, opts.cwd);
|
|
785
|
+
return { passed: true, metrics: { profile: "web_bundled" } };
|
|
786
|
+
} catch (err) {
|
|
787
|
+
return { passed: false, reason: `web_bundled_validate_failed:${String(err)}` };
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
var createWorkflowAgentAdapter = (opts) => ({
|
|
792
|
+
dryRun: async () => ({ feasible: true, reasons: [] }),
|
|
793
|
+
apply: async () => {
|
|
794
|
+
try {
|
|
795
|
+
if (opts.deployCommand) run(opts.deployCommand, opts.cwd);
|
|
796
|
+
return { applied: true, evidence: "workflow_agent_apply" };
|
|
797
|
+
} catch (err) {
|
|
798
|
+
return { applied: false, reason: `workflow_agent_apply_failed:${String(err)}` };
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
validate: async () => {
|
|
802
|
+
try {
|
|
803
|
+
if (opts.validateCommand) run(opts.validateCommand, opts.cwd);
|
|
804
|
+
return { passed: true, metrics: { profile: "workflow_agent" } };
|
|
805
|
+
} catch (err) {
|
|
806
|
+
return { passed: false, reason: `workflow_agent_validate_failed:${String(err)}` };
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
var createServiceApiAdapter = (opts) => ({
|
|
811
|
+
dryRun: async () => ({ feasible: true, reasons: [] }),
|
|
812
|
+
apply: async () => {
|
|
813
|
+
try {
|
|
814
|
+
if (opts.deployCommand) run(opts.deployCommand, opts.cwd);
|
|
815
|
+
return { applied: true, evidence: "service_api_apply" };
|
|
816
|
+
} catch (err) {
|
|
817
|
+
return { applied: false, reason: `service_api_apply_failed:${String(err)}` };
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
validate: async () => {
|
|
821
|
+
try {
|
|
822
|
+
if (opts.validateCommand) run(opts.validateCommand, opts.cwd);
|
|
823
|
+
if (opts.smokeCommand) run(opts.smokeCommand, opts.cwd);
|
|
824
|
+
return { passed: true, metrics: { profile: "service_api" } };
|
|
825
|
+
} catch (err) {
|
|
826
|
+
return { passed: false, reason: `service_api_validate_failed:${String(err)}` };
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
var createCustomAdapter = (adapter) => adapter;
|
|
831
|
+
|
|
832
|
+
// src/agentLaunchRuntime.ts
|
|
833
|
+
var runAgentLaunchRuntime = async (options) => {
|
|
834
|
+
if (!options.adapter) {
|
|
835
|
+
throw new Error("agent_launch_runtime_requires_execution_adapter");
|
|
836
|
+
}
|
|
837
|
+
const auditTrail = ["launch_runtime_start"];
|
|
838
|
+
let checklist;
|
|
839
|
+
let readinessInput = { ...options.readiness };
|
|
840
|
+
if (options.bestShot) {
|
|
841
|
+
checklist = runAdapterBestShotChecklist(options.bestShot.profile, options.bestShot.options);
|
|
842
|
+
auditTrail.push(`best_shot_checklist:${options.bestShot.profile}:${checklist.passed ? "pass" : "fail"}`);
|
|
843
|
+
readinessInput = {
|
|
844
|
+
...readinessInput,
|
|
845
|
+
qualityChecks: [
|
|
846
|
+
...readinessInput.qualityChecks || [],
|
|
847
|
+
...checklist.checks.map((c) => ({ name: `bestshot:${c.name}`, passed: c.passed, detail: c.detail }))
|
|
848
|
+
]
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
const readiness = evaluateLaunchReadiness(readinessInput);
|
|
852
|
+
const minScore = options.minScore ?? 0.8;
|
|
853
|
+
let verified = readiness.ready && readiness.score >= minScore;
|
|
854
|
+
let overrideApplied = false;
|
|
855
|
+
if (!verified && options.trustedOverride?.actor && options.trustedOverride?.reason) {
|
|
856
|
+
verified = true;
|
|
857
|
+
overrideApplied = true;
|
|
858
|
+
auditTrail.push(`trusted_override:${options.trustedOverride.actor}:${options.trustedOverride.reason}`);
|
|
859
|
+
}
|
|
860
|
+
const reasons = [
|
|
861
|
+
...readiness.blockers.length ? readiness.blockers : ["launch_readiness_passed"],
|
|
862
|
+
...checklist && !checklist.passed ? ["best_shot_checklist_failed"] : []
|
|
863
|
+
];
|
|
864
|
+
const record = buildDecisionRecord({
|
|
865
|
+
decision: verified ? "adapt" : "hold",
|
|
866
|
+
confidence: readiness.score,
|
|
867
|
+
verified,
|
|
868
|
+
reasons,
|
|
869
|
+
objective: options.objective || "best_shot_launch",
|
|
870
|
+
nowMs: options.nowMs
|
|
871
|
+
});
|
|
872
|
+
const requestedMode = options.rolloutMode || "shadow";
|
|
873
|
+
const mode = verified ? requestedMode : "observe";
|
|
874
|
+
const execution = await runExecutionAdapter({
|
|
875
|
+
mode,
|
|
876
|
+
record,
|
|
877
|
+
adapter: options.adapter
|
|
878
|
+
});
|
|
879
|
+
auditTrail.push(`execution:${execution.reason}`);
|
|
880
|
+
return { readiness, execution, checklist, overrideApplied, auditTrail };
|
|
881
|
+
};
|
|
882
|
+
var runAgentLaunchRuntimeCycle = runAgentLaunchRuntime;
|
|
883
|
+
|
|
884
|
+
// src/runtimeMigration.ts
|
|
885
|
+
var buildRuntimeMigrationPlan = (input) => {
|
|
886
|
+
const blockers = [];
|
|
887
|
+
const actions = [];
|
|
888
|
+
if (!input.listingId) blockers.push("missing_listing_id");
|
|
889
|
+
if (!input.cwd) blockers.push("missing_project_root");
|
|
890
|
+
if (input.hasLegacyExecutePlan) {
|
|
891
|
+
actions.push("replace_legacy_executePlan_with_execution_adapter");
|
|
892
|
+
}
|
|
893
|
+
if (!input.hasAdapter) {
|
|
894
|
+
blockers.push("missing_execution_adapter");
|
|
895
|
+
actions.push("implement_profile_adapter");
|
|
896
|
+
}
|
|
897
|
+
actions.push("wire_runAgentReviewRuntimeCycle_as_default");
|
|
898
|
+
actions.push("enable_verify_before_execute_apply_mode");
|
|
899
|
+
let rolloutMode = "shadow";
|
|
900
|
+
if (!blockers.length && input.hasAdapter) rolloutMode = "apply_limited";
|
|
901
|
+
return {
|
|
902
|
+
profile: input.profile,
|
|
903
|
+
ready: blockers.length === 0,
|
|
904
|
+
blockers,
|
|
905
|
+
actions,
|
|
906
|
+
suggestedConfig: {
|
|
907
|
+
executionMode: "apply",
|
|
908
|
+
rolloutMode,
|
|
909
|
+
allowImmediateOnly: true
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
// src/stateChangeNotifier.ts
|
|
915
|
+
var shouldAnnounceStateChange = (input) => {
|
|
916
|
+
const prev = input.previous;
|
|
917
|
+
const cur = input.current;
|
|
918
|
+
if (!prev) return { announce: true, reason: "initial_state" };
|
|
919
|
+
if (prev.status !== cur.status) return { announce: true, reason: "status_changed" };
|
|
920
|
+
if (Boolean(prev.ready) !== Boolean(cur.ready)) return { announce: true, reason: "readiness_changed" };
|
|
921
|
+
if ((prev.decision || "") !== (cur.decision || "") && cur.status !== "green") {
|
|
922
|
+
return { announce: true, reason: "decision_changed_non_green" };
|
|
923
|
+
}
|
|
924
|
+
if ((prev.reason || "") !== (cur.reason || "") && cur.status !== "green") {
|
|
925
|
+
return { announce: true, reason: "reason_changed_non_green" };
|
|
926
|
+
}
|
|
927
|
+
return { announce: false, reason: "no_meaningful_change" };
|
|
928
|
+
};
|
|
929
|
+
|
|
615
930
|
// src/index.ts
|
|
616
931
|
var SdkUpdateRequiredError = class extends Error {
|
|
617
932
|
status;
|
|
@@ -728,7 +1043,7 @@ var ReviewGate = class {
|
|
|
728
1043
|
var DEFAULT_API_BASE = "https://api.vibeiao.com";
|
|
729
1044
|
var DEFAULT_WEB_BASE = "https://vibeiao.com";
|
|
730
1045
|
var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
|
|
731
|
-
var DEFAULT_SDK_VERSION = "0.1.
|
|
1046
|
+
var DEFAULT_SDK_VERSION = "0.1.48" ? "0.1.48" : "0.1.4";
|
|
732
1047
|
var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
|
|
733
1048
|
var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
|
|
734
1049
|
var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
|
|
@@ -920,9 +1235,9 @@ var unwrap = (response) => {
|
|
|
920
1235
|
return response.data;
|
|
921
1236
|
};
|
|
922
1237
|
var normalizeProviderName = (value) => value.trim().toLowerCase().replace(/[^a-z0-9_-]/g, "");
|
|
923
|
-
var getByPath = (payload,
|
|
924
|
-
if (!
|
|
925
|
-
const segments =
|
|
1238
|
+
var getByPath = (payload, path2) => {
|
|
1239
|
+
if (!path2) return void 0;
|
|
1240
|
+
const segments = path2.split(".").map((part) => part.trim()).filter(Boolean);
|
|
926
1241
|
let current = payload;
|
|
927
1242
|
for (const segment of segments) {
|
|
928
1243
|
if (!current || typeof current !== "object" || !(segment in current)) {
|
|
@@ -1223,9 +1538,9 @@ var VibeClient = class {
|
|
|
1223
1538
|
};
|
|
1224
1539
|
}
|
|
1225
1540
|
}
|
|
1226
|
-
async get(
|
|
1541
|
+
async get(path2) {
|
|
1227
1542
|
await this.ensureLatestVersion();
|
|
1228
|
-
const response = await this.fetcher(`${this.baseUrl}${
|
|
1543
|
+
const response = await this.fetcher(`${this.baseUrl}${path2}`);
|
|
1229
1544
|
let payload = null;
|
|
1230
1545
|
try {
|
|
1231
1546
|
payload = await readJson(response);
|
|
@@ -1241,9 +1556,9 @@ var VibeClient = class {
|
|
|
1241
1556
|
}
|
|
1242
1557
|
return payload;
|
|
1243
1558
|
}
|
|
1244
|
-
async post(
|
|
1559
|
+
async post(path2, body) {
|
|
1245
1560
|
await this.ensureLatestVersion();
|
|
1246
|
-
const response = await this.fetcher(`${this.baseUrl}${
|
|
1561
|
+
const response = await this.fetcher(`${this.baseUrl}${path2}`, {
|
|
1247
1562
|
method: "POST",
|
|
1248
1563
|
headers: { "Content-Type": "application/json" },
|
|
1249
1564
|
body: JSON.stringify(body)
|
|
@@ -1263,9 +1578,9 @@ var VibeClient = class {
|
|
|
1263
1578
|
}
|
|
1264
1579
|
return payload;
|
|
1265
1580
|
}
|
|
1266
|
-
async del(
|
|
1581
|
+
async del(path2, body) {
|
|
1267
1582
|
await this.ensureLatestVersion();
|
|
1268
|
-
const response = await this.fetcher(`${this.baseUrl}${
|
|
1583
|
+
const response = await this.fetcher(`${this.baseUrl}${path2}`, {
|
|
1269
1584
|
method: "DELETE",
|
|
1270
1585
|
headers: { "Content-Type": "application/json" },
|
|
1271
1586
|
body: body === void 0 ? void 0 : JSON.stringify(body)
|
|
@@ -1860,6 +2175,7 @@ export {
|
|
|
1860
2175
|
VibeClient,
|
|
1861
2176
|
VibeRegistry,
|
|
1862
2177
|
aggregateFeedbackSignals,
|
|
2178
|
+
assertLaunchReady,
|
|
1863
2179
|
assertOutcomeBoundCompleted,
|
|
1864
2180
|
assertSurvivalProvidersConfigured,
|
|
1865
2181
|
buildAdaptivePlan,
|
|
@@ -1877,6 +2193,7 @@ export {
|
|
|
1877
2193
|
buildReviewPrompt,
|
|
1878
2194
|
buildReviewRequired,
|
|
1879
2195
|
buildReviewResponseMessage,
|
|
2196
|
+
buildRuntimeMigrationPlan,
|
|
1880
2197
|
buildSdkUpdateCommand,
|
|
1881
2198
|
buildShareCopy,
|
|
1882
2199
|
buildShareLink,
|
|
@@ -1894,19 +2211,25 @@ export {
|
|
|
1894
2211
|
createAutoSelfReliance,
|
|
1895
2212
|
createCampaign,
|
|
1896
2213
|
createContextPack,
|
|
2214
|
+
createCustomAdapter,
|
|
1897
2215
|
createDurabilityProxyClient,
|
|
1898
2216
|
createInMemoryReflectionStore,
|
|
1899
2217
|
createSelfRelianceMonitor,
|
|
1900
2218
|
createSelfReliancePolicy,
|
|
2219
|
+
createServiceApiAdapter,
|
|
1901
2220
|
createStrictMemoryRuntimePreset,
|
|
1902
2221
|
createSurvivalMiddleware,
|
|
1903
2222
|
createTreasuryPolicy,
|
|
2223
|
+
createWebBundledAdapter,
|
|
2224
|
+
createWebStaticAdapter,
|
|
2225
|
+
createWorkflowAgentAdapter,
|
|
1904
2226
|
decideProcurementForTask,
|
|
1905
2227
|
deriveMarketNeeds,
|
|
1906
2228
|
discoverMarketNeeds,
|
|
1907
2229
|
estimateContextPackTokens,
|
|
1908
2230
|
evaluateAdaptiveReflectionPolicy,
|
|
1909
2231
|
evaluateEscapeHatch,
|
|
2232
|
+
evaluateLaunchReadiness,
|
|
1910
2233
|
evaluateObjectiveChange,
|
|
1911
2234
|
evaluateOutcomeBoundRun,
|
|
1912
2235
|
evaluatePromptShield,
|
|
@@ -1925,7 +2248,10 @@ export {
|
|
|
1925
2248
|
isComplexTask,
|
|
1926
2249
|
normalizeListingText,
|
|
1927
2250
|
rankListingsForTask,
|
|
2251
|
+
runAdapterBestShotChecklist,
|
|
1928
2252
|
runAdaptiveReflectionCycle,
|
|
2253
|
+
runAgentLaunchRuntime,
|
|
2254
|
+
runAgentLaunchRuntimeCycle,
|
|
1929
2255
|
runAgentReviewRuntimeCycle,
|
|
1930
2256
|
runExecutionAdapter,
|
|
1931
2257
|
runMarketDiscovery,
|
|
@@ -1933,6 +2259,7 @@ export {
|
|
|
1933
2259
|
sanitizeListingNaming,
|
|
1934
2260
|
scoreListingForTask,
|
|
1935
2261
|
scoreReviewPriority,
|
|
2262
|
+
shouldAnnounceStateChange,
|
|
1936
2263
|
treasuryStateFromSnapshot,
|
|
1937
2264
|
upgradeToStrictMemoryRuntimePreset,
|
|
1938
2265
|
validateContextPack,
|
|
@@ -1037,6 +1037,128 @@ declare const runAgentReviewRuntimeCycle: (opts: AgentReviewRuntimeOptions) => P
|
|
|
1037
1037
|
policyState: AdaptivePolicyState;
|
|
1038
1038
|
}>;
|
|
1039
1039
|
|
|
1040
|
+
type LaunchProfile = 'web_static' | 'web_bundled' | 'service_api' | 'workflow_agent' | 'custom';
|
|
1041
|
+
type LaunchReadinessInput = {
|
|
1042
|
+
profile: LaunchProfile;
|
|
1043
|
+
targetUser: string;
|
|
1044
|
+
problemStatement: string;
|
|
1045
|
+
researchEvidence: Array<{
|
|
1046
|
+
source: string;
|
|
1047
|
+
summary: string;
|
|
1048
|
+
}>;
|
|
1049
|
+
designRationale: string;
|
|
1050
|
+
qualityChecks: Array<{
|
|
1051
|
+
name: string;
|
|
1052
|
+
passed: boolean;
|
|
1053
|
+
detail?: string;
|
|
1054
|
+
}>;
|
|
1055
|
+
rollbackPlan: string;
|
|
1056
|
+
deploy?: {
|
|
1057
|
+
url?: string;
|
|
1058
|
+
smokePassed?: boolean;
|
|
1059
|
+
};
|
|
1060
|
+
listing?: {
|
|
1061
|
+
listingId?: string;
|
|
1062
|
+
updated?: boolean;
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
type LaunchReadinessResult = {
|
|
1066
|
+
ready: boolean;
|
|
1067
|
+
score: number;
|
|
1068
|
+
blockers: string[];
|
|
1069
|
+
notes: string[];
|
|
1070
|
+
};
|
|
1071
|
+
declare const evaluateLaunchReadiness: (input: LaunchReadinessInput) => LaunchReadinessResult;
|
|
1072
|
+
declare const assertLaunchReady: (input: LaunchReadinessInput) => LaunchReadinessResult;
|
|
1073
|
+
|
|
1074
|
+
type AdapterPackKind = 'web_static' | 'web_bundled' | 'service_api' | 'workflow_agent' | 'custom';
|
|
1075
|
+
type AdapterPackOptions = {
|
|
1076
|
+
cwd: string;
|
|
1077
|
+
validateCommand?: string;
|
|
1078
|
+
buildCommand?: string;
|
|
1079
|
+
deployCommand?: string;
|
|
1080
|
+
smokeCommand?: string;
|
|
1081
|
+
requiredPaths?: string[];
|
|
1082
|
+
};
|
|
1083
|
+
type AdapterBestShotChecklistResult = {
|
|
1084
|
+
profile: AdapterPackKind;
|
|
1085
|
+
passed: boolean;
|
|
1086
|
+
checks: Array<{
|
|
1087
|
+
name: string;
|
|
1088
|
+
passed: boolean;
|
|
1089
|
+
detail?: string;
|
|
1090
|
+
}>;
|
|
1091
|
+
};
|
|
1092
|
+
declare const runAdapterBestShotChecklist: (profile: AdapterPackKind, options: AdapterPackOptions) => AdapterBestShotChecklistResult;
|
|
1093
|
+
declare const createWebStaticAdapter: (opts: AdapterPackOptions) => ExecutionAdapter;
|
|
1094
|
+
declare const createWebBundledAdapter: (opts: AdapterPackOptions) => ExecutionAdapter;
|
|
1095
|
+
declare const createWorkflowAgentAdapter: (opts: AdapterPackOptions) => ExecutionAdapter;
|
|
1096
|
+
declare const createServiceApiAdapter: (opts: AdapterPackOptions) => ExecutionAdapter;
|
|
1097
|
+
declare const createCustomAdapter: (adapter: ExecutionAdapter) => ExecutionAdapter;
|
|
1098
|
+
|
|
1099
|
+
type AgentLaunchRuntimeOptions = {
|
|
1100
|
+
rolloutMode?: ExecutionRolloutMode;
|
|
1101
|
+
adapter: ExecutionAdapter;
|
|
1102
|
+
readiness: LaunchReadinessInput;
|
|
1103
|
+
minScore?: number;
|
|
1104
|
+
objective?: string;
|
|
1105
|
+
nowMs?: number;
|
|
1106
|
+
bestShot?: {
|
|
1107
|
+
profile: AdapterPackKind;
|
|
1108
|
+
options: AdapterPackOptions;
|
|
1109
|
+
};
|
|
1110
|
+
trustedOverride?: {
|
|
1111
|
+
actor: string;
|
|
1112
|
+
reason: string;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
type AgentLaunchRuntimeResult = {
|
|
1116
|
+
readiness: LaunchReadinessResult;
|
|
1117
|
+
execution: Awaited<ReturnType<typeof runExecutionAdapter>>;
|
|
1118
|
+
checklist?: AdapterBestShotChecklistResult;
|
|
1119
|
+
overrideApplied: boolean;
|
|
1120
|
+
auditTrail: string[];
|
|
1121
|
+
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Required launch runtime: verify best-shot launch readiness before publish execution.
|
|
1124
|
+
*/
|
|
1125
|
+
declare const runAgentLaunchRuntime: (options: AgentLaunchRuntimeOptions) => Promise<AgentLaunchRuntimeResult>;
|
|
1126
|
+
declare const runAgentLaunchRuntimeCycle: (options: AgentLaunchRuntimeOptions) => Promise<AgentLaunchRuntimeResult>;
|
|
1127
|
+
|
|
1128
|
+
type RuntimeMigrationInput = {
|
|
1129
|
+
profile: AdapterPackKind;
|
|
1130
|
+
listingId: string;
|
|
1131
|
+
cwd: string;
|
|
1132
|
+
hasLegacyExecutePlan: boolean;
|
|
1133
|
+
hasAdapter: boolean;
|
|
1134
|
+
};
|
|
1135
|
+
type RuntimeMigrationPlan = {
|
|
1136
|
+
profile: AdapterPackKind;
|
|
1137
|
+
ready: boolean;
|
|
1138
|
+
blockers: string[];
|
|
1139
|
+
actions: string[];
|
|
1140
|
+
suggestedConfig: {
|
|
1141
|
+
executionMode: 'apply';
|
|
1142
|
+
rolloutMode: 'observe' | 'shadow' | 'apply_limited' | 'apply_full';
|
|
1143
|
+
allowImmediateOnly: boolean;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
declare const buildRuntimeMigrationPlan: (input: RuntimeMigrationInput) => RuntimeMigrationPlan;
|
|
1147
|
+
|
|
1148
|
+
type RuntimeStateSnapshot = {
|
|
1149
|
+
status: 'green' | 'degraded' | 'failing';
|
|
1150
|
+
ready?: boolean;
|
|
1151
|
+
decision?: string;
|
|
1152
|
+
reason?: string;
|
|
1153
|
+
};
|
|
1154
|
+
declare const shouldAnnounceStateChange: (input: {
|
|
1155
|
+
previous?: RuntimeStateSnapshot | null;
|
|
1156
|
+
current: RuntimeStateSnapshot;
|
|
1157
|
+
}) => {
|
|
1158
|
+
announce: boolean;
|
|
1159
|
+
reason: string;
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1040
1162
|
interface VibeClientOptions {
|
|
1041
1163
|
baseUrl?: string;
|
|
1042
1164
|
fetcher?: typeof fetch;
|
|
@@ -1315,7 +1437,7 @@ declare class ReviewGate {
|
|
|
1315
1437
|
assertClear(listingId: string, wallet: string): void;
|
|
1316
1438
|
}
|
|
1317
1439
|
|
|
1318
|
-
declare const compareVersions: (currentVersion: string, latestVersion: string) =>
|
|
1440
|
+
declare const compareVersions: (currentVersion: string, latestVersion: string) => 1 | 0 | -1;
|
|
1319
1441
|
declare const buildSdkUpdateCommand: (packageName?: string) => string;
|
|
1320
1442
|
declare const checkForSdkUpdate: (options?: SdkUpdateCheckOptions) => Promise<SdkUpdateStatus>;
|
|
1321
1443
|
declare const checkForSdkUpdatePolicy: (options: SdkUpdatePolicyCheckOptions) => Promise<SdkUpdateStatus>;
|
|
@@ -1496,4 +1618,4 @@ declare const getResourceSnapshot: (options: {
|
|
|
1496
1618
|
apiBase?: string;
|
|
1497
1619
|
}) => Promise<ResourceSnapshot>;
|
|
1498
1620
|
|
|
1499
|
-
export { type
|
|
1621
|
+
export { type ListingReviewCreatePayload as $, type AdapterBestShotChecklistResult as A, type BuybackEvent as B, CONTEXT_PACK_SECTION_ORDER as C, type ContextPackSections as D, type DurabilityCheckpointWriteOptions as E, type DurabilityProxyClientOptions as F, type DurabilityRestoreDrillWriteOptions as G, type ExecutionAdapter as H, type ExecutionApplyResult as I, type ExecutionDecisionRecord as J, type ExecutionDryRunResult as K, type ExecutionRollbackResult as L, type ExecutionRolloutMode as M, type ExecutionRunResult as N, type ExecutionValidateResult as O, LISTING_NAME_MAX_LENGTH as P, LISTING_NAME_RECOMMENDED_MAX as Q, LISTING_TAGLINE_MAX_LENGTH as R, LISTING_TAGLINE_RECOMMENDED_MAX as S, type LaunchProfile as T, type TopupDecision, type TopupRequest, type TreasuryLedgerEvent, type TreasuryPolicy, type TreasuryPolicyV1, type TreasuryState, type LaunchReadinessInput as U, type LaunchReadinessResult as V, type LeaderboardEntry as W, type LeaderboardQuery as X, type ListingNamingValidationOptions as Y, type ListingNamingValidationResult as Z, type ListingQuery as _, type AdapterPackKind as a, createWorkflowAgentAdapter as a$, type ListingReviewResponsePayload as a0, type ListingVersionPayload as a1, type MarketingCampaign as a2, type MarketingLinkOptions as a3, type MemoryPingChallengeResponse as a4, type MemoryPingPayload as a5, type OpenRouterCredits as a6, type ProcurementCandidate as a7, type ProcurementDecision as a8, type ProcurementTaskProfile as a9, buildJupiterSwapUrl as aA, buildListingVersionMessage as aB, buildMemoryPingMessage as aC, buildOwnerTransferMessage as aD, buildProcurementPrompt as aE, buildRaydiumSwapUrl as aF, buildReviewPrompt as aG, buildReviewRequired as aH, buildReviewResponseMessage as aI, buildRuntimeMigrationPlan as aJ, buildSdkUpdateCommand as aK, buildShareCopy as aL, buildShareLink as aM, buildTradeLinks as aN, checkForSdkUpdate as aO, checkForSdkUpdatePolicy as aP, compareVersions as aQ, createApiCreditProvider as aR, createApiCreditProviders as aS, createApiCreditProvidersFromManifest as aT, createCampaign as aU, createContextPack as aV, createCustomAdapter as aW, createDurabilityProxyClient as aX, createServiceApiAdapter as aY, createWebBundledAdapter as aZ, createWebStaticAdapter as a_, type ProcurementWeights as aa, type ResourceProviderManifestEntry as ab, type ResourceSnapshot as ac, ReviewGate as ad, type ReviewGateRecord as ae, type ReviewRequiredPayload as af, type RunAdaptiveReflectionOptions as ag, type RuntimeMigrationInput as ah, type RuntimeMigrationPlan as ai, type RuntimeStateSnapshot as aj, SdkAutoUpdatedRestartRequiredError as ak, type SdkUpdateCheckOptions as al, type SdkUpdatePolicyCheckOptions as am, SdkUpdateRequiredError as an, type SdkUpdateStatus as ao, VIBEIAO_IDL as ap, VibeClient as aq, type VibeClientOptions as ar, VibeRegistry as as, aggregateFeedbackSignals as at, assertLaunchReady as au, assertSurvivalProvidersConfigured as av, buildAdaptivePlan as aw, buildBadgeMarkdown as ax, buildClaimMessage as ay, buildDecisionRecord as az, type AdapterPackOptions as b, decideProcurementForTask as b0, estimateContextPackTokens as b1, evaluateAdaptiveReflectionPolicy as b2, evaluateLaunchReadiness as b3, getResourceSnapshot as b4, normalizeListingText as b5, rankListingsForTask as b6, runAdapterBestShotChecklist as b7, runAdaptiveReflectionCycle as b8, runAgentLaunchRuntime as b9, runAgentLaunchRuntimeCycle as ba, runAgentReviewRuntimeCycle as bb, runExecutionAdapter as bc, sanitizeListingNaming as bd, scoreListingForTask as be, shouldAnnounceStateChange as bf, validateContextPack as bg, validateListingNaming as bh, verifyAdaptiveExecutionReadiness as bi, 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 ContextPackInput as x, type ContextPackOptions as y, type ContextPackSectionKey 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.
|
|
5
|
+
"version": "0.1.48",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsup src/index.ts src/memory.ts src/compoundingMemory.ts src/selfReliance.ts src/solana.ts src/reflection.ts src/survivalPlaybook.ts src/survivalIntegration.ts src/survivalEscapeHatch.ts src/agentLoop.ts src/marketDiscovery.ts src/treasuryGuardian.ts src/humanAppLoop.ts src/outcomeBoundFlow.ts src/strictMemoryRuntime.ts --format esm --dts --tsconfig tsconfig.json --out-dir dist --define.__VIBEIAO_SDK_VERSION__=\\\"$npm_package_version\\\"",
|
|
32
|
-
"test:e2e-memory": "pnpm build && node --test test/memory.e2e.test.mjs"
|
|
32
|
+
"test:e2e-memory": "pnpm build && node --test test/memory.e2e.test.mjs",
|
|
33
|
+
"test": "pnpm build && node --test test/*.test.mjs"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@coral-xyz/anchor": "^0.30.1",
|