@kynver-app/runtime 0.1.172 → 0.2.0
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 +12 -1
- package/dist/chat/command-auth-proof.js +1 -1
- package/dist/cli.js +59 -58
- package/dist/completion-response.d.ts +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/context-budget-receipt.d.ts +96 -0
- package/dist/daemon-heartbeat.d.ts +7 -0
- package/dist/daemon-supervision/setup.d.ts +10 -1
- package/dist/dispatch-model-guard.d.ts +26 -0
- package/dist/dispatch-resource-gate.d.ts +20 -0
- package/dist/doctor/context-envelope-cli.d.ts +1 -0
- package/dist/doctor/context-envelope.d.ts +13 -0
- package/dist/doctor/context-envelope.probes.d.ts +25 -0
- package/dist/doctor/context-envelope.types.d.ts +42 -0
- package/dist/doctor/index.d.ts +3 -0
- package/dist/doctor/node-runtime-cli.d.ts +6 -0
- package/dist/doctor/node-runtime.d.ts +19 -0
- package/dist/executor-ref-routing.d.ts +14 -0
- package/dist/factory-steer-delivery.d.ts +7 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.js +85 -75
- package/dist/landing/land-pr-check-classify.d.ts +11 -0
- package/dist/model-routing.d.ts +1 -1
- package/dist/node-runtime-policy.d.ts +25 -0
- package/dist/node-runtime-policy.js +1 -0
- package/dist/paths.d.ts +1 -1
- package/dist/prompt.d.ts +36 -2
- package/dist/providers/claude.d.ts +2 -0
- package/dist/providers/cursor.d.ts +2 -0
- package/dist/providers/types.d.ts +4 -0
- package/dist/review-head-reconcile.d.ts +17 -0
- package/dist/run-store.d.ts +6 -0
- package/dist/runner-boundary/index.d.ts +6 -0
- package/dist/runner-boundary/runner-boundary.dispatch-guard.d.ts +4 -0
- package/dist/runner-boundary/runner-boundary.forge-legacy-migration.d.ts +23 -0
- package/dist/runner-boundary/runner-boundary.harness-root.d.ts +17 -0
- package/dist/runner-boundary/runner-boundary.resolve.d.ts +4 -0
- package/dist/runner-boundary/runner-boundary.run-guard.d.ts +12 -0
- package/dist/runner-boundary/runner-boundary.types.d.ts +31 -0
- package/dist/runtime-identity.d.ts +9 -0
- package/dist/runtime-memory-envelope.d.ts +16 -0
- package/dist/security-review-environment.d.ts +27 -0
- package/dist/server/cleanup.js +14 -14
- package/dist/server/default-repo.js +1 -1
- package/dist/server/monitor.js +7 -7
- package/dist/server/worker-policy.d.ts +2 -0
- package/dist/server/worker-policy.js +1 -1
- package/dist/status.d.ts +9 -0
- package/dist/supervisor.d.ts +2 -0
- package/dist/worker-execution-mode.d.ts +5 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Standalone Kynver AgentOS execution runtime and CLI (`kynver`).
|
|
4
4
|
|
|
5
|
+
## Supported Node.js
|
|
6
|
+
|
|
7
|
+
The Kynver fleet runs **Node.js 24.11.0+** (npm 11). The `0.1.x` line still
|
|
8
|
+
declares `engines >=18` for compatibility, but new runner hosts should install
|
|
9
|
+
Node 24 — the coming `0.2.0` release raises the enforced floor to `>=24.11.0`
|
|
10
|
+
and startup will fail closed below it. Check any host with:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
kynver doctor node-runtime # report-only JSON classification + remediation
|
|
14
|
+
```
|
|
15
|
+
|
|
5
16
|
## Quick start
|
|
6
17
|
|
|
7
18
|
```bash
|
|
@@ -24,7 +35,7 @@ kynver runner credential --agent-os-id <id>
|
|
|
24
35
|
|
|
25
36
|
The token (`krc1.*`) is stored in `~/.kynver/credentials` as `runnerToken` and sent as `X-Kynver-Runner-Token` on dispatch/sweep/completion/progress callbacks. It is bound to one `agentOsId` and a capability set (`tasks`, `harness`, `plans.progress`, `runtime.read`, `operator`). The server persists only a token hash plus audit metadata, so credentials can be listed, revoked, and rotated without exposing the clear token again.
|
|
26
37
|
|
|
27
|
-
Global env secrets
|
|
38
|
+
Global env secrets are accepted on by-id callbacks **only** when the deployment lists the workspace in `KYNVER_HARNESS_GLOBAL_SECRET_AGENT_OS_IDS` (first-party dogfood). Self-serve runners must use scoped `krc1.*` tokens. QStash-signed scheduler callbacks and internal cron fire routes are unchanged.
|
|
28
39
|
|
|
29
40
|
## CLI verbs
|
|
30
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash as c,createPrivateKey as d,createPublicKey as l,randomBytes as p,sign as m,verify as h}from"node:crypto";function f(e){return JSON.stringify(u(e))}function u(e){if(Array.isArray(e))return e.map(u);if(e&&typeof e=="object"){let r={};for(let n of Object.keys(e).sort())r[n]=u(e[n]);return r}return e}function o(e){if(!e)return null;let r=e.trim();if(!r)return null;if(/^[0-9a-fA-F]{64}$/.test(r))return new Uint8Array(r.match(/.{2}/g).map(n=>parseInt(n,16)));try{let n=Buffer.from(r,"base64");if(n.length===32)return new Uint8Array(n)}catch{}return null}var b=120,A=Buffer.from("302a300506032b6570032100","hex"),g=Buffer.from("302e020100300506032b657004220420","hex"),I="c0021e9312b0a479dbd2eb8dec0deedbe0dd6445eff431e372fa49fa21d42ffa",P={"ca-6297fb8e1773":"16ae5cb2a61f8c94cf1b86e8258f9c2f2ff6aba5e6136250a422209b6e866881"};function y(e){return`ca-${c("sha256").update(Buffer.from(e)).digest("hex").slice(0,12)}`}function K(e,r=process.env){let n=o(r.KYNVER_COMMAND_AUTH_PUBLIC_KEY);if(n)return y(n)!==e?null:n;if(r.NODE_ENV==="production")return null;let t=P[e];return t?o(t):null}function B(e){return l({key:Buffer.concat([A,Buffer.from(e)]),format:"der",type:"spki"})}function x(e,r){return!Array.isArray(e)||e.length!==r.length?!1:e.every((n,t)=>typeof n=="string"&&n===r[t])}function C(e){if(!e||typeof e!="object")return!1;let r=e;if(typeof r.signature!="string"||!r.signature||typeof r.publicKeyId!="string"||!r.publicKeyId)return!1;let n=r.payload;return!(!n||typeof n!="object"||n.v!==1||typeof n.agentOsId!="string"||!n.agentOsId||!Array.isArray(n.argv)||n.argv.some(t=>typeof t!="string")||typeof n.userId!="string"||!n.userId||typeof n.exp!="number"||!Number.isFinite(n.exp)||typeof n.nonce!="string"||!n.nonce)}function O(e,r,n=process.env,t=Math.floor(Date.now()/1e3)){if(!C(e))return{ok:!1,reason:"malformed command authorization proof"};if(e.payload.agentOsId!==r.agentOsId)return{ok:!1,reason:"agentOsId mismatch"};if(!x(e.payload.argv,r.argv))return{ok:!1,reason:"argv mismatch"};if(e.payload.exp<=t)return{ok:!1,reason:"proof expired"};let i=K(e.publicKeyId,n);if(!i)return{ok:!1,reason:`no verification key for publicKeyId "${e.publicKeyId}"`};let a;try{a=Buffer.from(e.signature,"base64url")}catch{return{ok:!1,reason:"signature is not base64url"}}if(a.length!==64)return{ok:!1,reason:"signature is not a 64-byte Ed25519 signature"};try{let s=Buffer.from(f(e.payload),"utf8");return h(null,s,B(i),a)?{ok:!0,payload:e.payload}:{ok:!1,reason:"Ed25519 signature mismatch"}}catch(s){return{ok:!1,reason:`signature verification failed: ${s.message}`}}}function k(e){let r=d({key:Buffer.concat([g,Buffer.from(e)]),format:"der",type:"pkcs8"}),n=l(r).export({format:"der",type:"spki"});return new Uint8Array(n.subarray(n.length-32))}function
|
|
1
|
+
import{createHash as c,createPrivateKey as d,createPublicKey as l,randomBytes as p,sign as m,verify as h}from"node:crypto";function f(e){return JSON.stringify(u(e))}function u(e){if(Array.isArray(e))return e.map(u);if(e&&typeof e=="object"){let r={};for(let n of Object.keys(e).sort())r[n]=u(e[n]);return r}return e}function o(e){if(!e)return null;let r=e.trim();if(!r)return null;if(/^[0-9a-fA-F]{64}$/.test(r))return new Uint8Array(r.match(/.{2}/g).map(n=>parseInt(n,16)));try{let n=Buffer.from(r,"base64");if(n.length===32)return new Uint8Array(n)}catch{}return null}var b=120,A=Buffer.from("302a300506032b6570032100","hex"),g=Buffer.from("302e020100300506032b657004220420","hex"),I="c0021e9312b0a479dbd2eb8dec0deedbe0dd6445eff431e372fa49fa21d42ffa",P={"ca-6297fb8e1773":"16ae5cb2a61f8c94cf1b86e8258f9c2f2ff6aba5e6136250a422209b6e866881"};function y(e){return`ca-${c("sha256").update(Buffer.from(e)).digest("hex").slice(0,12)}`}function K(e,r=process.env){let n=o(r.KYNVER_COMMAND_AUTH_PUBLIC_KEY);if(n)return y(n)!==e?null:n;if(r.NODE_ENV==="production")return null;if(n)return n;if(r.NODE_ENV==="production")return null;let t=P[e];return t?o(t):null}function B(e){return l({key:Buffer.concat([A,Buffer.from(e)]),format:"der",type:"spki"})}function x(e,r){return!Array.isArray(e)||e.length!==r.length?!1:e.every((n,t)=>typeof n=="string"&&n===r[t])}function C(e){if(!e||typeof e!="object")return!1;let r=e;if(typeof r.signature!="string"||!r.signature||typeof r.publicKeyId!="string"||!r.publicKeyId)return!1;let n=r.payload;return!(!n||typeof n!="object"||n.v!==1||typeof n.agentOsId!="string"||!n.agentOsId||!Array.isArray(n.argv)||n.argv.some(t=>typeof t!="string")||typeof n.userId!="string"||!n.userId||typeof n.exp!="number"||!Number.isFinite(n.exp)||typeof n.nonce!="string"||!n.nonce)}function O(e,r,n=process.env,t=Math.floor(Date.now()/1e3)){if(!C(e))return{ok:!1,reason:"malformed command authorization proof"};if(e.payload.agentOsId!==r.agentOsId)return{ok:!1,reason:"agentOsId mismatch"};if(!x(e.payload.argv,r.argv))return{ok:!1,reason:"argv mismatch"};if(e.payload.exp<=t)return{ok:!1,reason:"proof expired"};let i=K(e.publicKeyId,n);if(!i)return{ok:!1,reason:`no verification key for publicKeyId "${e.publicKeyId}"`};let a;try{a=Buffer.from(e.signature,"base64url")}catch{return{ok:!1,reason:"signature is not base64url"}}if(a.length!==64)return{ok:!1,reason:"signature is not a 64-byte Ed25519 signature"};try{let s=Buffer.from(f(e.payload),"utf8");return h(null,s,B(i),a)?{ok:!0,payload:e.payload}:{ok:!1,reason:"Ed25519 signature mismatch"}}catch(s){return{ok:!1,reason:`signature verification failed: ${s.message}`}}}function k(e){let r=d({key:Buffer.concat([g,Buffer.from(e)]),format:"der",type:"pkcs8"}),n=l(r).export({format:"der",type:"spki"});return new Uint8Array(n.subarray(n.length-32))}function S(e=process.env){let r=o(e.KYNVER_COMMAND_AUTH_KEY);if(!r&&e.NODE_ENV==="production")throw new Error("KYNVER_COMMAND_AUTH_KEY must be set in production; refusing to sign command proofs with the committed dev key.");let n=r??o(I),t=k(n);return{seed:n,rawPublicKey:t,publicKeyId:y(t),usingDevFallbackKey:!r}}function v(e,r){let n=d({key:Buffer.concat([g,Buffer.from(r.seed)]),format:"der",type:"pkcs8"}),t=Buffer.from(f(e),"utf8");return{payload:e,signature:m(null,t,n).toString("base64url"),publicKeyId:r.publicKeyId}}function D(e){let r=e.env??process.env,n=e.nowSec??Math.floor(Date.now()/1e3),t=e.ttlSec??b,i={v:1,agentOsId:e.agentOsId,argv:[...e.argv],userId:e.userId,exp:n+t,nonce:p(16).toString("base64url")};return v(i,S(r))}function N(e){return c("sha256").update(Buffer.from(e.rawPublicKey)).digest("hex").slice(0,16)}export{b as COMMAND_AUTH_PROOF_TTL_SEC,P as PINNED_COMMAND_AUTH_PUBLIC_KEYS,x as argvMatchesProof,N as commandAuthProofKeyFingerprint,y as deriveCommandAuthKeyId,C as isSignedCommandAuthProofShape,D as issueCommandAuthorizationProof,K as resolveCommandAuthPublicKey,S as resolveCommandAuthSigningKey,O as verifyCommandAuthorizationProof};
|