Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/scripts/own30b-pkv-lib.sh # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / scripts / own30b-pkv-lib.sh` 274 lines ยท 12218 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 2 # Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # Shared helpers of the persistent KV chip scripts (sc#507 #508 #509). Sourced, never run. 17 # CHIP-ONLY callers: own30b-pkv-chip-check.sh, own30b-pkv-bench.sh, own30b-pkv-ops-check.sh. 18 # 19 # Rules every caller inherits: 20 # - refuses while the live server on :18091 answers (no override: two omega processes on 21 # the chip at once is UNKNOWN territory), and refuses an occupied port (PKV_CHECK_PORT, 22 # default 18098; never 18091, 18092 or 18095, which belong to other services); 23 # - starts its own aien-serve-http only on 127.0.0.1:$PORT, stops only the PID it started; 24 # - key: atlas-vault entry AIEN_KV_STORE_KEY by default (`atlas-vault run AIEN_KV_STORE_KEY 25 # --`, the key never passes through this shell), or PKV_CHECK_EPHEMERAL_KEY=1 for a 26 # throwaway key held only in this shell and the child's environment; never printed or saved; 27 # - evidence: raw files in the evidence dir, a summary, SHA256SUMS over every file. 28 # shellcheck shell=bash disable=SC2034 # DRY, fail, SERVER_JOB, ... are read by the callers 29 30 PKV_LIVE_PORT=18091 31 MODEL=${OWN30B_MODEL_DIR:-$HOME/models/qwen3-30b-a3b-instruct-2507-fp8} 32 PORT=${PKV_CHECK_PORT:-18098} 33 PKV_RESERVED_PORTS="18091 18092 18095" # live 30B, spark-mail, spark-cockpit 34 pkv_port_reserved() { case " $PKV_RESERVED_PORTS " in *" $1 "*) return 0 ;; esac; return 1; } 35 base="http://127.0.0.1:$PORT" 36 DRY=0 37 SERVER_JOB= 38 39 pkv_usage_args() { #