@kynver-app/runtime 0.2.135 → 0.2.138
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/chat/chat-access-change-record.js +1 -1
- package/dist/chat/chat-turn-envelope.js +1 -1
- package/dist/chat/command-auth-proof.js +1 -1
- package/dist/cli.js +202 -202
- package/dist/daemon-tick-thread.js +53 -53
- package/dist/desktop-entry.js +155 -155
- package/dist/dispatch-claim-authorization.js +1 -1
- package/dist/index.js +227 -227
- package/dist/instruction-bundle/contract.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createHash as u}from"node:crypto";function o(e){return JSON.stringify(i(e))}function i(e){if(Array.isArray(e))return e.map(i);if(e&&typeof e=="object"){let
|
|
1
|
+
import{createHash as u}from"node:crypto";function o(e){return JSON.stringify(i(e))}function i(e){if(Array.isArray(e))return e.map(i);if(e&&typeof e=="object"){let n={};for(let t of Object.keys(e).sort())n[t]=i(e[t]);return n}return e}function v(e){return`ib1-${u("sha256").update(o(e),"utf8").digest("hex").slice(0,16)}`}function d(e){return`ib-${u("sha256").update(Buffer.from(e)).digest("hex").slice(0,12)}`}function a(e){if(!e)return null;let n=e.trim();if(!n)return null;if(/^[0-9a-fA-F]{64}$/.test(n))return new Uint8Array(n.match(/.{2}/g).map(t=>parseInt(t,16)));try{let t=Buffer.from(n,"base64");if(t.length===32)return new Uint8Array(t)}catch{}return null}function c(e){if(!e)return[];let n=[];for(let t of e.split(/[,\s]+/)){let r=a(t);r&&n.push(r)}return n}function s(e){if(!e||typeof e!="object")return!1;let n=e;if(typeof n.signature!="string"||!n.signature||typeof n.publicKeyId!="string"||!n.publicKeyId)return!1;let t=n.bundle;return!(!t||typeof t!="object"||typeof t.version!="string"||!t.version||typeof t.generatedAt!="string"||!Array.isArray(t.personas)||!t.instructions||typeof t.instructions!="object"||!t.policyThresholds||typeof t.policyThresholds!="object")}function p(e=process.env){if(e.NODE_ENV==="production")return!1;let n=e.KYNVER_ALLOW_DEV_SIGNING_KEYS?.trim().toLowerCase();return n==="1"||n==="true"||n==="yes"||n==="on"?!0:e.NODE_ENV==="test"||e.VITEST==="true"}var y="ib-3bab6314f0ba",f={"ib-3bab6314f0ba":"53a2040646cd479e1f5f1aea9abf7848ce8b62e32001efb8044dfd90e8ab87ed","ib-26e6c695da06":"bb1700f25b2ee7d7cdcdb9f446f0f44ef2cc22a3096bc161232fb658e7cdaf38","ib-49e76cb8052c":"8fc646b5c4f8f402120477452608398f035c3cddd2e7aa8bb328e97b84dcf6d8"};function l(e,n=process.env){for(let r of c(n.KYNVER_INSTRUCTION_BUNDLE_PUBLIC_KEY))if(d(r)===e)return r;if(e===y&&!p(n))return null;let t=f[e];return t?a(t):null}import{createPublicKey as h,verify as I}from"node:crypto";var b=Buffer.from("302a300506032b6570032100","hex");function R(e){return h({key:Buffer.concat([b,Buffer.from(e)]),format:"der",type:"spki"})}function m(e,n){if(!s(e))return{ok:!1,reason:"malformed signed bundle payload"};let t;try{t=Buffer.from(e.signature,"base64url")}catch{return{ok:!1,reason:"signature is not base64url"}}if(t.length!==64)return{ok:!1,reason:"signature is not a 64-byte Ed25519 signature"};try{let r=Buffer.from(o(e.bundle),"utf8");return I(null,r,R(n),t)?{ok:!0,bundle:e.bundle}:{ok:!1,reason:"Ed25519 signature mismatch"}}catch(r){return{ok:!1,reason:`signature verification failed: ${r.message}`}}}function B(e,n=process.env){if(!s(e))return{ok:!1,reason:"malformed signed bundle payload"};let t=l(e.publicKeyId,n);return t?m(e,t):{ok:!1,reason:`no verification key for publicKeyId "${e.publicKeyId}" (not pinned; set KYNVER_INSTRUCTION_BUNDLE_PUBLIC_KEY)`}}var g="embedded-1",w=[{slug:"ghost",displayName:"Ghost",description:"Orchestration persona.",dispatchLane:null,defaultRoleLane:"system"},{slug:"astra",displayName:"Astra",description:"Planning persona.",dispatchLane:"implementation",defaultRoleLane:"plan_author"},{slug:"rhea",displayName:"Rhea",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"mnemo",displayName:"Mnemo",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"sentinel",displayName:"Sentinel",description:"Review persona.",dispatchLane:"review",defaultRoleLane:"deep_reviewer"},{slug:"pixel",displayName:"Pixel",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"schema",displayName:"Schema",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"atlas",displayName:"Atlas",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"runtime_verifier"},{slug:"bridge",displayName:"Bridge",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"catalyst",displayName:"Catalyst",description:"Implementation persona.",dispatchLane:"implementation",defaultRoleLane:"implementer"},{slug:"lorentz",displayName:"Lorentz",description:"Review persona.",dispatchLane:"review",defaultRoleLane:"report_reviewer"},{slug:"dalton",displayName:"Dalton",description:"Landing persona.",dispatchLane:"landing",defaultRoleLane:"implementer"}],E={"worker.prompt.core_rules":["Structured final result (recommended): record completion as JSON with summary, files, PR URLs, verification, risks, and blockers.","Completion handoff (required): before you stop, summarize the outcome in your last message and append a heartbeat line with phase `complete` and a structured finalResult object. Commit your work cleanly and open a GitHub PR (draft OK) for substantial changes \u2014 never leave uncommitted changes behind without reporting them.","Review-only workers must not open new implementation PRs \u2014 review the existing PR and record a verdict in the final result. Prefer `gh pr view` / `gh pr diff`; if a local checkout is needed, use a disposable ref or detached worktree, not a checked-out `pr-*` branch.","Keep verification targeted to touched paths; avoid full-monorepo verification unless explicitly requested.","Do not run `npm publish`.","If verification fails, append a heartbeat line immediately with the failing command, reason, and next action."].join(`
|
|
2
2
|
`),"worker.prompt.progress.compact":"Plan progress: when planId is set, report progress with `kynver plan progress --plan <planId> --row <rowKey> --role implementer --status in_progress|running|partial|blocked`. Do not mark rows done from the worker CLI.","worker.prompt.progress.full":["Structured plan progress (required when planId is set):","- Report checkpoints with `kynver plan progress --plan <planId> --row <rowKey> --role implementer --status in_progress|running|partial|blocked`.","- When a slice is finished, emit `partial` with evidence (`--evidence pr:<url>`, `--evidence path:<file>`, or `--evidence command:<cmd>`).","- Do not propose or confirm row `done` from the worker CLI."].join(`
|
|
3
3
|
`),"worker.prompt.merge_gate.compact":"Verification cost control: prefer local verification before requesting CI runs; do not push empty commits to re-trigger CI; record verification evidence on the PR.","worker.prompt.merge_gate.full":["Verification cost control:","- Prefer local verification of touched paths before requesting any CI run.","- Do not push empty commits to re-trigger CI.","- Record verification evidence on the PR before requesting review."].join(`
|
|
4
4
|
`),"worker.prompt.plan_artifacts.compact":"Plan artifacts: when authoring or revising plan documents, open a GitHub PR early and iterate from that PR branch; do not leave the canonical plan only in a local worktree.","worker.prompt.plan_artifacts.full":["Plan artifacts (when authoring or revising plan documents):","- Create a feature branch and open a GitHub PR (draft OK) before substantial drafting; commit and push the plan file.","- Iterate on that PR branch and link the PR URL on the related task and progress evidence."].join(`
|
|
5
|
-
`)},_={"harness.maxTaskAttempts":4,"harness.dispatchCooldownMs":5e3,"daemon.idleIntervalMs":5*6e4,"daemon.maxIdleStreak":10},N={version:
|
|
5
|
+
`)},_={"harness.maxTaskAttempts":4,"harness.dispatchCooldownMs":5e3,"daemon.idleIntervalMs":5*6e4,"daemon.maxIdleStreak":10},N={version:g,generatedAt:"1970-01-01T00:00:00.000Z",personas:w,instructions:E,policyThresholds:_};export{N as EMBEDDED_INSTRUCTION_BUNDLE,g as EMBEDDED_INSTRUCTION_BUNDLE_VERSION,f as PINNED_INSTRUCTION_BUNDLE_PUBLIC_KEYS,o as canonicalJsonStringify,v as computeInstructionBundleVersion,d as deriveInstructionBundleKeyId,p as devSigningKeysAllowed,s as isSignedInstructionBundleShape,a as parseRawEd25519Key,c as parseRawEd25519KeyList,l as resolveInstructionBundlePublicKey,m as verifyInstructionBundleSignatureWithKey,B as verifySignedInstructionBundle};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kynver-app/runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.138",
|
|
4
4
|
"description": "Kynver AgentOS local execution runtime and CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"!dist/**/*.d.ts.map"
|
|
186
186
|
],
|
|
187
187
|
"scripts": {
|
|
188
|
-
"build": "esbuild src/provider-terminal-failure.ts src/cli.ts src/daemon-tick-thread.ts src/index.ts src/node-runtime-policy.ts src/local-run-store/index.ts src/worker-broker/index.ts src/worker-persona-catalog.ts src/instruction-bundle/contract.ts src/chat/command-auth-proof.ts src/chat/chat-turn-envelope.ts src/chat/chat-access-change-record.ts src/dispatch-claim-authorization.ts src/desktop-entry.ts src/server/monitor.ts src/server/landing.ts src/server/worker-policy.ts src/server/orchestration.ts src/server/adapter-contract.ts src/server/context-budget-receipt.ts src/server/context-budget.ts src/server/prompt.ts src/server/node-runtime-policy.ts src/server/model-routing.ts src/server/dispatch-routing.ts src/server/db-credentials.ts src/server/heavy-verification.ts src/server/memory-cost.ts src/server/pr-evidence.ts src/server/default-repo.ts src/server/cleanup.ts src/server/repo-search.ts src/server/harness-notice.ts src/server/memory-cost-enforce.ts src/server/wsl-crash-dumps.ts --bundle --platform=node --format=esm --packages=external --outbase=src --outdir=dist --minify && tsc -p tsconfig.json --emitDeclarationOnly && node scripts/chmod-cli-bin.mjs",
|
|
188
|
+
"build": "esbuild src/provider-terminal-failure.ts src/cli.ts src/daemon-tick-thread.ts src/index.ts src/node-runtime-policy.ts src/local-run-store/index.ts src/worker-broker/index.ts src/worker-persona-catalog.ts src/instruction-bundle/contract.ts src/chat/command-auth-proof.ts src/chat/chat-turn-envelope.ts src/chat/chat-access-change-record.ts src/dispatch-claim-authorization.ts src/desktop-entry.ts src/server/monitor.ts src/server/landing.ts src/server/worker-policy.ts src/server/orchestration.ts src/server/adapter-contract.ts src/server/context-budget-receipt.ts src/server/context-budget.ts src/server/prompt.ts src/server/node-runtime-policy.ts src/server/model-routing.ts src/server/dispatch-routing.ts src/server/db-credentials.ts src/server/heavy-verification.ts src/server/memory-cost.ts src/server/pr-evidence.ts src/server/default-repo.ts src/server/cleanup.ts src/server/repo-search.ts src/server/harness-notice.ts src/server/memory-cost-enforce.ts src/server/wsl-crash-dumps.ts --bundle --platform=node --format=esm --packages=external --outbase=src --outdir=dist --minify && node ../../scripts/package-tsc.mjs -p tsconfig.json --emitDeclarationOnly && node scripts/chmod-cli-bin.mjs",
|
|
189
189
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
190
190
|
"test": "vitest run --config vitest.config.ts",
|
|
191
191
|
"prepublishOnly": "node ../../scripts/npm-publish-guard.mjs && npm run build",
|