@vibeiao/sdk 0.1.30 → 0.1.32
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 +123 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -383,6 +383,129 @@ Routing policy after acceptance:
|
|
|
383
383
|
- Primary: treasury-proxy route
|
|
384
384
|
- Fallback: original provider API key only when primary route fails or is policy-blocked
|
|
385
385
|
|
|
386
|
+
## Human App Reflective Loop Pack (First-class)
|
|
387
|
+
|
|
388
|
+
Use the built-in pack for human app lifecycle runs:
|
|
389
|
+
|
|
390
|
+
- phases: `research -> hypothesis -> build -> launch -> observe -> reflect -> iterate`
|
|
391
|
+
- explicit per-phase inputs/outputs + go/no-go + KPI + rollback conditions
|
|
392
|
+
- optional tool-choice policy with required rationale logging
|
|
393
|
+
- trial evaluation rubric (research depth / iteration quality / outcome usefulness)
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
import {
|
|
397
|
+
createHumanAppLoopSpec,
|
|
398
|
+
scaffoldHumanAppLoopPack,
|
|
399
|
+
evaluateHumanAppTrial,
|
|
400
|
+
} from '@vibeiao/sdk';
|
|
401
|
+
|
|
402
|
+
const spec = createHumanAppLoopSpec();
|
|
403
|
+
|
|
404
|
+
await scaffoldHumanAppLoopPack({
|
|
405
|
+
root: process.cwd(),
|
|
406
|
+
outputDir: 'projects/vibeiao/human-app-loop-pack',
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
const trial = evaluateHumanAppTrial({
|
|
410
|
+
id: 'trial-1',
|
|
411
|
+
evidence: {
|
|
412
|
+
researchNotesCount: 4,
|
|
413
|
+
hypothesisCount: 2,
|
|
414
|
+
experimentsRun: 1,
|
|
415
|
+
measurableKpiCount: 2,
|
|
416
|
+
rollbackPlanPresent: true,
|
|
417
|
+
shippedArtifactPresent: true,
|
|
418
|
+
iterationSteps: 1,
|
|
419
|
+
},
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
console.log(spec.schema, trial.pass, trial.weightedScore);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
## Outcome-Bound Autonomous Flow (Hard Completion Gate)
|
|
426
|
+
|
|
427
|
+
Use this when the task must not be considered done until it is truly live.
|
|
428
|
+
|
|
429
|
+
Required completion gates:
|
|
430
|
+
- public deploy URL exists
|
|
431
|
+
- listing metadata is updated
|
|
432
|
+
- external smoke check passes
|
|
433
|
+
- evidence log path recorded
|
|
434
|
+
- context-pack preflight passed
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
import {
|
|
438
|
+
evaluateOutcomeBoundRun,
|
|
439
|
+
assertOutcomeBoundCompleted,
|
|
440
|
+
} from '@vibeiao/sdk';
|
|
441
|
+
|
|
442
|
+
const status = evaluateOutcomeBoundRun({
|
|
443
|
+
runId: 'release-2026-02-18',
|
|
444
|
+
objective: 'Ship human app v1 live',
|
|
445
|
+
publicDeployUrl: 'https://example.com/app',
|
|
446
|
+
listingId: '<listing-id>',
|
|
447
|
+
listingUpdated: true,
|
|
448
|
+
externalSmokeCheck: { passed: true, checker: 'curl -I' },
|
|
449
|
+
evidenceLogPath: 'generated/evals/release/run.md',
|
|
450
|
+
contextPackPreflight: { passed: true, scope: 'release' },
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
// Throws if any hard gate is missing.
|
|
454
|
+
assertOutcomeBoundCompleted({
|
|
455
|
+
runId: 'release-2026-02-18',
|
|
456
|
+
objective: 'Ship human app v1 live',
|
|
457
|
+
publicDeployUrl: 'https://example.com/app',
|
|
458
|
+
listingId: '<listing-id>',
|
|
459
|
+
listingUpdated: true,
|
|
460
|
+
externalSmokeCheck: { passed: true },
|
|
461
|
+
evidenceLogPath: 'generated/evals/release/run.md',
|
|
462
|
+
contextPackPreflight: { passed: true, scope: 'release' },
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
console.log(status.completed, status.failedGates);
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
## Strict Memory Runtime Preset (Safe Upgrade Path)
|
|
469
|
+
|
|
470
|
+
Use this preset when you want SDK-level parity for strict memory discipline across agents.
|
|
471
|
+
|
|
472
|
+
What it enforces (for complex/mutating tasks):
|
|
473
|
+
- context-pack prepared
|
|
474
|
+
- semantic recall confirmed
|
|
475
|
+
- mutation approval preflight passed
|
|
476
|
+
|
|
477
|
+
And it supports safe rollout modes:
|
|
478
|
+
- `observe` (default): collect/validate behavior
|
|
479
|
+
- `enforce`: hard block when required gates are missing
|
|
480
|
+
|
|
481
|
+
```ts
|
|
482
|
+
import {
|
|
483
|
+
createStrictMemoryRuntimePreset,
|
|
484
|
+
evaluateStrictMemoryExecution,
|
|
485
|
+
upgradeToStrictMemoryRuntimePreset,
|
|
486
|
+
} from '@vibeiao/sdk';
|
|
487
|
+
|
|
488
|
+
const preset = createStrictMemoryRuntimePreset();
|
|
489
|
+
|
|
490
|
+
const evalResult = evaluateStrictMemoryExecution({
|
|
491
|
+
taskText: 'Deploy production release with listing migration and config writes',
|
|
492
|
+
isMutation: true,
|
|
493
|
+
contextPackPrepared: true,
|
|
494
|
+
semanticRecallConfirmed: true,
|
|
495
|
+
approvalPreflightPassed: true,
|
|
496
|
+
}, preset);
|
|
497
|
+
|
|
498
|
+
const upgrade = upgradeToStrictMemoryRuntimePreset({
|
|
499
|
+
current: preset,
|
|
500
|
+
targetMode: 'enforce',
|
|
501
|
+
backupCreated: true,
|
|
502
|
+
healthcheckPassed: true,
|
|
503
|
+
recentBlockRate: 0.1,
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
console.log(evalResult.allowed, upgrade.safe, upgrade.next.upgradePolicy.mode);
|
|
507
|
+
```
|
|
508
|
+
|
|
386
509
|
## Compounding Memory Standard (Recommended Default)
|
|
387
510
|
|
|
388
511
|
The SDK now includes a standardized layered memory scaffold modeled on long-running agent operation:
|
package/dist/index.js
CHANGED
|
@@ -349,7 +349,7 @@ var ReviewGate = class {
|
|
|
349
349
|
var DEFAULT_API_BASE = "https://api.vibeiao.com";
|
|
350
350
|
var DEFAULT_WEB_BASE = "https://vibeiao.com";
|
|
351
351
|
var DEFAULT_SDK_PACKAGE = "@vibeiao/sdk";
|
|
352
|
-
var DEFAULT_SDK_VERSION = "0.1.
|
|
352
|
+
var DEFAULT_SDK_VERSION = "0.1.31" ? "0.1.31" : "0.1.4";
|
|
353
353
|
var DEFAULT_SDK_REGISTRY = "https://registry.npmjs.org";
|
|
354
354
|
var DEFAULT_SDK_POLICY_PATH = "/v1/sdk/policy";
|
|
355
355
|
var DEFAULT_SDK_CHECK_INTERVAL_MS = 1e3 * 60 * 30;
|