@jaromil/gestalt 0.21.0 → 0.22.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/lib/legacy/gestalt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
set -Eeuo pipefail
|
|
4
4
|
IFS=$'\n\t'
|
|
5
5
|
|
|
6
|
-
readonly GESTALT_CLI_VERSION='0.
|
|
6
|
+
readonly GESTALT_CLI_VERSION='0.22.0'
|
|
7
7
|
readonly DEFAULT_INSTALL_BASE_URL='https://dyne.github.io/gestalt'
|
|
8
8
|
readonly DEFAULT_MARKETPLACE='dyne/gestalt-agents'
|
|
9
9
|
readonly DEFAULT_MARKETPLACE_NAME='dyne-gestalt-agents'
|
|
@@ -3657,11 +3657,11 @@ install_mobile() {
|
|
|
3657
3657
|
|
|
3658
3658
|
record_setup_provenance() {
|
|
3659
3659
|
node --input-type=module - "$codex_home" "$marketplace_setup" \
|
|
3660
|
-
"${BASH_SOURCE[0]}" "$GESTALT_CLI_VERSION" <<'NODE'
|
|
3660
|
+
"${BASH_SOURCE[0]}" "$GESTALT_CLI_VERSION" "${managed_agents_ref:-}" <<'NODE'
|
|
3661
3661
|
import { createHash } from 'node:crypto';
|
|
3662
3662
|
import { existsSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
3663
3663
|
import { join } from 'node:path';
|
|
3664
|
-
const [home, setup, manager, version] = process.argv.slice(2);
|
|
3664
|
+
const [home, setup, manager, version, ref] = process.argv.slice(2);
|
|
3665
3665
|
const digest = path => existsSync(path)
|
|
3666
3666
|
? createHash('sha256').update(readFileSync(path)).digest('hex') : null;
|
|
3667
3667
|
const outputs = Object.fromEntries([
|
|
@@ -3669,7 +3669,7 @@ const outputs = Object.fromEntries([
|
|
|
3669
3669
|
'agents/org-plan-executor.toml', 'agents/org-plan-reviewer.toml',
|
|
3670
3670
|
].map(path => [path, digest(join(home, path))]));
|
|
3671
3671
|
const provenance = JSON.stringify({ schemaVersion: 1, scope: 'setup-artifacts-only',
|
|
3672
|
-
runtimeEnforcement: false, manager: { version, sha256: digest(manager) },
|
|
3672
|
+
runtimeEnforcement: false, ...(ref ? { managedAgentsRef: ref } : {}), manager: { version, sha256: digest(manager) },
|
|
3673
3673
|
delegatedSetupSha256: digest(setup), outputs }, null, 2) + '\n';
|
|
3674
3674
|
const destination = join(home, '.gestalt-setup-provenance.json');
|
|
3675
3675
|
if (existsSync(destination) && readFileSync(destination, 'utf8') === provenance) process.exit(0);
|
|
@@ -3679,6 +3679,43 @@ renameSync(temporary, destination);
|
|
|
3679
3679
|
NODE
|
|
3680
3680
|
}
|
|
3681
3681
|
|
|
3682
|
+
# Use the same release selection and lossless TOML edit as the native manager.
|
|
3683
|
+
agents_marketplace_pin() {
|
|
3684
|
+
node --input-type=module - "${BASH_SOURCE[0]}" "$codex_home" "$marketplace_name" "$marketplace" "$@" <<'NODE'
|
|
3685
|
+
import { execFileSync } from 'node:child_process';
|
|
3686
|
+
import { existsSync, readFileSync, writeFileSync, statSync, chmodSync, renameSync } from 'node:fs';
|
|
3687
|
+
import { join } from 'node:path';
|
|
3688
|
+
import { runInNewContext } from 'node:vm';
|
|
3689
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3690
|
+
const [manager, home, name, marketplace, mode, expected] = process.argv.slice(2);
|
|
3691
|
+
const bundle = readFileSync(manager, 'utf8').match(/^\/\/ BEGIN BUNDLED PROFILE TOML PARSER\n([\s\S]*?)^\/\/ END BUNDLED PROFILE TOML PARSER/m);
|
|
3692
|
+
const { parse, verifyAgentsPin, planAgentsPin, setAgentsRef } = runInNewContext(bundle[1] + '\ngestaltProfileToml');
|
|
3693
|
+
const file = join(home, 'config.toml');
|
|
3694
|
+
const config = existsSync(file) ? readFileSync(file, 'utf8') : '';
|
|
3695
|
+
const gitDir = join(home, '.tmp', 'marketplaces', name, '.git');
|
|
3696
|
+
const git = args => execFileSync('git', args, { encoding: 'utf8', timeout: 60_000 });
|
|
3697
|
+
if (mode === 'verify') {
|
|
3698
|
+
verifyAgentsPin(config, git(['--git-dir', gitDir, 'rev-parse', '--verify', 'HEAD^{commit}']), expected);
|
|
3699
|
+
} else if (mode === 'record') {
|
|
3700
|
+
const updated = setAgentsRef(config, expected, isDeepStrictEqual);
|
|
3701
|
+
const temporary = join(home, '.gestalt-pin-' + process.pid);
|
|
3702
|
+
writeFileSync(temporary, updated, {flag: 'wx', mode: 0o600});
|
|
3703
|
+
chmodSync(temporary, statSync(file).mode & 0o777);
|
|
3704
|
+
renameSync(temporary, file);
|
|
3705
|
+
} else {
|
|
3706
|
+
const provenance = join(home, '.gestalt-setup-provenance.json');
|
|
3707
|
+
const pin = await planAgentsPin({ marketplace, marketplaceName: name, config, mode, git,
|
|
3708
|
+
readProvenance: () => existsSync(provenance) ? readFileSync(provenance, 'utf8') : undefined,
|
|
3709
|
+
installedGitDir: existsSync(gitDir) ? gitDir : undefined });
|
|
3710
|
+
if (pin) {
|
|
3711
|
+
console.log([pin.fresh ? 'add' : 'upgrade', pin.ref, pin.changing ? 'changed' : 'retained'].join(' '));
|
|
3712
|
+
} else if (parse(config).marketplaces?.[name]?.ref !== undefined) {
|
|
3713
|
+
console.log('operator-pinned');
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
NODE
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3682
3719
|
agents_setup_uses_node() {
|
|
3683
3720
|
[[ -f $marketplace_setup && -f ${marketplace_setup%.sh}.mjs && -f ${marketplace_setup%/*}/scripts/setup-agents.mjs ]]
|
|
3684
3721
|
}
|
|
@@ -3729,7 +3766,8 @@ NODE
|
|
|
3729
3766
|
run_marketplace_setup() {
|
|
3730
3767
|
local -r mode=$1
|
|
3731
3768
|
local -r include_extra_skills=$2
|
|
3732
|
-
local marketplace_action
|
|
3769
|
+
local marketplace_action pin_recipe pin_change managed_agents_ref=''
|
|
3770
|
+
local marketplace_cache=${marketplace_setup%/*}
|
|
3733
3771
|
# Bash can unwind this function before running the shell's EXIT trap.
|
|
3734
3772
|
agents_setup_stage='' agents_setup_handoff=false agents_setup_snapshot_ready=false
|
|
3735
3773
|
agents_codex_gate=false agents_gestalt_gate=false
|
|
@@ -3788,6 +3826,17 @@ run_marketplace_setup() {
|
|
|
3788
3826
|
rm -f -- "$codex_home/config.toml" || retain=true
|
|
3789
3827
|
fi
|
|
3790
3828
|
fi
|
|
3829
|
+
if ! "$retain" && [[ -n $agents_setup_stage && ( -f $agents_setup_stage/restore-marketplace || -d $agents_setup_stage/moved-marketplace ) ]]; then
|
|
3830
|
+
local cache=$codex_home/.tmp/marketplaces/$marketplace_name
|
|
3831
|
+
if [[ -e $cache || -L $cache ]]; then
|
|
3832
|
+
mv -- "$cache" "$agents_setup_stage/failed-marketplace" || retain=true
|
|
3833
|
+
fi
|
|
3834
|
+
if ! "$retain" && [[ -d $agents_setup_stage/moved-marketplace ]]; then
|
|
3835
|
+
mv -- "$agents_setup_stage/moved-marketplace" "$cache" || retain=true
|
|
3836
|
+
elif ! "$retain" && [[ -d $agents_setup_stage/previous-marketplace ]]; then
|
|
3837
|
+
mv -- "$agents_setup_stage/previous-marketplace" "$cache" || retain=true
|
|
3838
|
+
fi
|
|
3839
|
+
fi
|
|
3791
3840
|
setup_release_gates || retain=true
|
|
3792
3841
|
if "$retain"; then
|
|
3793
3842
|
log "Agents setup ownership or rollback is unconfirmed; preserved lock $agents_operation_lock and snapshot ${agents_setup_stage:-unavailable}"
|
|
@@ -3819,7 +3868,39 @@ run_marketplace_setup() {
|
|
|
3819
3868
|
fi
|
|
3820
3869
|
|
|
3821
3870
|
log "${marketplace_action} marketplace $marketplace in $codex_home"
|
|
3822
|
-
if [[ $
|
|
3871
|
+
if [[ $marketplace == dyne/gestalt-agents && $marketplace_name == dyne-gestalt-agents ]]; then
|
|
3872
|
+
pin_recipe=$(agents_marketplace_pin "$mode")
|
|
3873
|
+
if [[ -n $pin_recipe ]]; then
|
|
3874
|
+
IFS=' ' read -r marketplace_action managed_agents_ref pin_change <<< "$pin_recipe"
|
|
3875
|
+
fi
|
|
3876
|
+
fi
|
|
3877
|
+
if [[ -n $managed_agents_ref ]]; then
|
|
3878
|
+
log "using Gestalt Agents commit $managed_agents_ref"
|
|
3879
|
+
if [[ $pin_change == changed ]]; then
|
|
3880
|
+
[[ ! -L $marketplace_cache && ( ! -e $marketplace_cache || -d $marketplace_cache ) ]] ||
|
|
3881
|
+
die 'Agents marketplace cache must be a direct directory'
|
|
3882
|
+
if [[ -d $marketplace_cache ]]; then
|
|
3883
|
+
if [[ $marketplace_action == add ]]; then
|
|
3884
|
+
mv -- "$marketplace_cache" "$agents_setup_stage/moved-marketplace"
|
|
3885
|
+
else
|
|
3886
|
+
cp -pPR -- "$marketplace_cache" "$agents_setup_stage/previous-marketplace"
|
|
3887
|
+
fi
|
|
3888
|
+
fi
|
|
3889
|
+
touch "$agents_setup_stage/restore-marketplace"
|
|
3890
|
+
if [[ $marketplace_action == upgrade ]]; then
|
|
3891
|
+
# A concurrent Codex refresh can see the new ref as soon as it is recorded.
|
|
3892
|
+
agents_marketplace_pin record "$managed_agents_ref"
|
|
3893
|
+
fi
|
|
3894
|
+
fi
|
|
3895
|
+
if [[ $marketplace_action == add ]]; then
|
|
3896
|
+
CODEX_HOME=$codex_home codex plugin marketplace add "$marketplace@$managed_agents_ref"
|
|
3897
|
+
fi
|
|
3898
|
+
# Codex writes its refresh metadata on upgrade, including after a fresh add.
|
|
3899
|
+
CODEX_HOME=$codex_home codex plugin marketplace upgrade "$marketplace_name"
|
|
3900
|
+
agents_marketplace_pin verify "$managed_agents_ref"
|
|
3901
|
+
elif [[ $marketplace_action == operator-pinned ]]; then
|
|
3902
|
+
CODEX_HOME=$codex_home codex plugin marketplace upgrade "$marketplace_name"
|
|
3903
|
+
elif [[ $marketplace_action == add ]]; then
|
|
3823
3904
|
if ! CODEX_HOME=$codex_home codex plugin marketplace add "$marketplace"; then
|
|
3824
3905
|
log 'marketplace is already registered; attempting an upgrade'
|
|
3825
3906
|
CODEX_HOME=$codex_home codex plugin marketplace upgrade "$marketplace_name"
|
|
@@ -4366,21 +4447,25 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
4366
4447
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4367
4448
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4368
4449
|
*/
|
|
4369
|
-
var gestaltProfileToml=(()=>{var D=Object.defineProperty;var
|
|
4370
|
-
`,n===r&&(
|
|
4371
|
-
`))}return
|
|
4450
|
+
var gestaltProfileToml=(()=>{var D=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var J=(e,r)=>{for(var i in r)D(e,i,{get:r[i],enumerable:!0})},Y=(e,r,i,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of q(r))!H.call(e,s)&&s!==i&&D(e,s,{get:()=>r[s],enumerable:!(l=G(r,s))||l.enumerable});return e};var Q=e=>Y(D({},"__esModule",{value:!0}),e);var pe={};J(pe,{parse:()=>A,planAgentsPin:()=>R,setAgentsRef:()=>F,stringify:()=>P,verifyAgentsPin:()=>K});function X(e,r){let i=e.slice(0,r).split(/\r?\n/);return[i.length,i.pop().length+1]}function x(e,r,i){let l=e.split(/\r?\n/),s="",t=(Math.log10(r+1)|0)+1;for(let n=r-1;n<=r+1;n++){let a=l[n-1];a&&(s+=n.toString().padEnd(t," "),s+=": ",s+=a,s+=`
|
|
4451
|
+
`,n===r&&(s+=" ".repeat(t+i+2),s+=`^
|
|
4452
|
+
`))}return s}var u=class e extends Error{line;column;codeblock;constructor(r,i){let[l,s]=X(i.toml,i.ptr),t=x(i.toml,l,s);super(`Invalid TOML document: ${r}
|
|
4372
4453
|
|
|
4373
|
-
${
|
|
4374
|
-
`:i===102?n+="\f":i===114?n+="\r":i===101?n+="\x1B":i===34?n+='"':i===92?n+="\\":o.x("unrecognised escape sequence",e),s=e.p+1,f=0);else i!==32&&i!==9&&(f===2&&o.x("invalid escape: only line-ending whitespace may be escaped",e,s),f=!a&&i===92?1:0,s=e.p);o.x("unfinished string",e,r)}var Y=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i,C=class e extends Date{#r=!1;#i=!1;#e=null;constructor(r,i,t){let a=!0,l=!0,n="Z",s;if(typeof r=="string")if(i)e:{if(i<3){if(+r.slice(11,13)>23){r="";break e}i===2?(n=null,r+="Z"):(s=r.charCodeAt(r.length-1))!==90&&s!==122&&(n=r.slice(r.length-6)),t&&(r=r.slice(0,10)+"T"+r.slice(11))}else i===4&&(r=+r.slice(0,2)>23?"":`0000-01-01T${r}Z`);a=i!==4,l=i!==3}else{let f=r.match(Y);f?(f[1]||(a=!1,r=`0000-01-01T${r}`),l=!!f[2],l&&r[10]===" "&&(r=r.replace(" ","T")),f[2]&&+f[2]>23?r="":(n=f[3]||null,!n&&l&&(r+="Z"))):r=""}super(r),isNaN(this.getTime())||(this.#r=a,this.#i=l,this.#e=n)}isDateTime(){return this.#r&&this.#i}isLocal(){return!this.#r||!this.#i||!this.#e}isDate(){return this.#r&&!this.#i}isTime(){return this.#i&&!this.#r}isValid(){return this.#r||this.#i}toISOString(){let r=super.toISOString();if(this.isDate())return r.slice(0,10);if(this.isTime())return r.slice(11,23);if(this.#e===null)return r.slice(0,-1);if(this.#e==="Z"||this.#e==="z")return r;let i=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return i=this.#e[0]==="-"?i:-i,new Date(this.getTime()-i*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(r,i="Z"){let t=new e(r);return t.#e=i,t}static wrapAsLocalDateTime(r){let i=new e(r);return i.#e=null,i}static wrapAsLocalDate(r){let i=new e(r);return i.#i=!1,i.#e=null,i}static wrapAsLocalTime(r){let i=new e(r);return i.#r=!1,i.#e=null,i}};function h(e,r=10){return r===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+r}function v(e,r){return e===32||e===9||e===10||e===13||r&&(e===r||e===44)||e===35}function w(e,r){let i=e.p,t=e.s.charCodeAt(e.p);if(t===91||t===123){e.d--||o.x("document contains excessively nested structures. aborting.",e);let a=t===91?z(e):Z(e);return e.d++,a}return t===34||t===39?y(e):t===116?((e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)&&o.x("invalid value",e,i),e.p++,!0):t===102?((e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)&&o.x("invalid value",e,i),e.p++,!1):t===43||t===45?c(e,e.p,e.s.charCodeAt(++e.p),44-t,r):e.s.charCodeAt(e.p+4)===45&&e.s.charCodeAt(e.p+7)===45?H(e,t,r):e.s.charCodeAt(e.p+2)===58?J(e,t,r):c(e,e.p,t,0,r)}function c(e,r,i,t,a){let l=i,n=0,s=!1;if(l===105)return(e.s.charCodeAt(++e.p)!==110||e.s.charCodeAt(++e.p)!==102)&&o.x("invalid value",e,r),e.p++,(t||1)/0;if(l===110)return(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==110)&&o.x("invalid value",e,r),e.p++,NaN;if(l===48){if(++e.p>=e.s.length||v(l=e.s.charCodeAt(e.p),a))return e.bi===!0?0n:0;if(!t){if(l===120)return O(e,r,16,a);if(l===98)return O(e,r,2,a);if(l===111)return O(e,r,8,a)}l===46?n=2:l===101||l===69?n=4:o.x("illegal leading zero",e,r)}else h(l)||o.x("invalid value",e,r);for(;++e.p<e.s.length&&(l=e.s.charCodeAt(e.p),!v(l,a));)n||(n=1),l===95?(n&1||o.x("illegal underscore",e),n+=11,s=!0):n===1&&l===46?n=2:(n===1||n===3)&&(l===101||l===69)?n=4:n===4&&(l===43||l===45)||(h(l)?n>9?n-=11:n&1||n++:o.x("illegal character in numeric literal",e));if(!n){let u=(i-48)*(t||1);return e.bi===!0?BigInt(u):u}n&1||o.x("unfinished numeric value",e,r);let f=e.s.slice(r,e.p);return s&&(f=f.replaceAll("_","")),n>1?parseFloat(f):P(e,f,10,r)}function O(e,r,i,t){let a,l=1;for(;++e.p<e.s.length&&(a=e.s.charCodeAt(e.p),!v(a,t));)a===95?(l&1&&o.x("illegal underscore",e),l=3):h(a,i)?l&1&&l--:o.x("illegal character in numeric literal",e);l&1&&o.x("unfinished numeric value",e);let n=e.s.slice(r+2,e.p);return l&&(n=n.replaceAll("_","")),P(e,n,i,r)}function P(e,r,i,t){if(e.bi!==!0)e:{let a=parseInt(r,i);if(!Number.isSafeInteger(a)){if(e.bi)break e;o.x("integer value cannot be represented losslessly",e,t)}return a}return BigInt(i===10?r:(i===2?"0b":i===8?"0o":"0x")+r)}function H(e,r,i){let t=e.p++,a;if(!h(r)||!h(e.s.charCodeAt(e.p++))||!h(e.s.charCodeAt(e.p++))||!h(e.s.charCodeAt(e.p++)))return c(e,e.p=t,r,0,i);if(e.p+=5,h(e.s.charCodeAt(e.p++))||o.x("invalid date-time: date part is malformed",e,t),e.p>=e.s.length||((r=e.s.charCodeAt(e.p))!==32||(a=!0,!h(e.s.charCodeAt(e.p+1))))&&r!==84&&r!==116){let n=e.s.slice(t,e.p);return T(e,n,3,!1,t)}if(e.s.charCodeAt(e.p+=3)!==58&&o.x("invalid date-time: time part is malformed",e,t),e.s.charCodeAt(e.p+=3)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;h(e.s.charCodeAt(++e.p)););if(r=e.s.charCodeAt(e.p)){if(r===90||r===122){let n=e.s.slice(t,++e.p);return T(e,n,1,a,t,"[+00:00]")}if(r===43||r===45){let n=e.s.slice(t,e.p+=6);return T(e,n,1,a,t,!e.ld&&"["+e.s.slice(e.p-6,e.p)+"]")}}let l=e.s.slice(t,e.p);return T(e,l,2,a,t)}function J(e,r,i){let t=e.p;if(!h(r)||!h(e.s.charCodeAt(++e.p)))return c(e,--e.p,r,0,i);if(e.s.charCodeAt(e.p+=4)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;h(e.s.charCodeAt(++e.p)););let a=e.s.slice(t,e.p);return T(e,a,4,!1,t)}function T(e,r,i,t,a,l){if(e.ld){let n=new C(r,i,t);return n.isValid()||o.x("invalid date",e,a),n}try{switch(l&&(r+=l),i){case 1:return Temporal.ZonedDateTime.from(r);case 2:return Temporal.PlainDateTime.from(r);case 3:return Temporal.PlainDate.from(r);case 4:return Temporal.PlainTime.from(r)}}catch(n){o.x(n instanceof Error?n.message:""+n,e,a)}}function Q(e){for(;e.p<e.s.length;e.p++){let r=e.s.charCodeAt(e.p);if(r===10)break;if(r===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}(r<32&&r!==9||r===127)&&o.x("control characters are not allowed in comments",e)}}function A(e,r,i){let t;for(;e.p<e.s.length;){for(;e.p<e.s.length&&((t=e.s.charCodeAt(e.p))===32||t===9||!r&&(t===10||t===13&&e.s.charCodeAt(e.p+1)===10));)e.p++;if(i||t!==35)break;Q(e)}}function k(e,r=61){let i,t=0,a=[],l,n=e.s.charCodeAt(i=e.p);do{if(n===r)return t||o.x("unexpected end of key",e),t===1&&a.push(e.s.slice(l,e.p)),e.p++,a;n===46?(t||o.x("illegal empty bare key",e),t===1&&a.push(e.s.slice(l,e.p)),t=0):!t&&(n===34||n===39)?(n===e.s.charCodeAt(e.p+1)&&n===e.s.charCodeAt(e.p+2)&&o.x("illegal quoted key: multiline strings are not allowed",e),a.push(y(e)),t=2,e.p--):n===32||n===9?t===1&&(a.push(e.s.slice(l,e.p)),t=2):t===2||n<48&&n!==45||n>57&&n<65||n>90&&n<97&&n!==95||n>122?o.x("illegal character in key",e):t||(t=1,l=e.p)}while(n=e.s.charCodeAt(++e.p));o.x("incomplete key-value: cannot find end of key",e,i)}function Z(e){let r=e.p++,i=Object.create(null),t=new Set,a;for(;e.p<e.s.length;){if(A(e),(a=e.s.charCodeAt(e.p))===125)return e.p++,i;let l,n=i,s=!1,f=e.p,u=k(e);for(let d=0;d<u.length;d++){d&&(n=s?n[l]:n[l]=Object.create(null)),l=u[d],(s=Object.hasOwn(n,l))&&(typeof n[l]!="object"||t.has(n[l]))&&o.x("trying to redefine an already defined value",e,f);let g=l==="__proto__";if(e.uk&&(g||l==="constructor")){n=e.uk!==1&&o.x("document contains an unsafe property",e,f);break}!s&&g&&Object.defineProperty(n,l,{enumerable:!0,configurable:!0,writable:!0})}s&&o.x("trying to redefine an already defined value",e,f),A(e,!0,!0);let p=w(e,125);if(n&&typeof(n[l]=p)=="object"&&t.add(p),A(e),(a=e.s.charCodeAt(e.p++))===125)return i;a!==44&&o.x("expected comma or end of structure",e,e.p-1)}o.x("unfinished table",e,r)}function z(e){let r=e.p++,i=[],t;for(;e.p<e.s.length;){if(A(e),(t=e.s.charCodeAt(e.p))===93)return e.p++,i;if(i.push(w(e,93)),A(e),(t=e.s.charCodeAt(e.p++))===93)return i;t!==44&&o.x("expected comma or end of structure",e,e.p-1)}o.x("unfinished array",e,r)}function L(e,r,i,t,a){let l=i,n=t,s,f=!1,u;for(let p=0;p<r.length;p++){if(p){if(l=f?l[s]:l[s]=Object.create(null),n=(u=n[s]).c,a===0&&(u.t===1||u.t===2))return null;if(u.t===2){let d=l.length-1;l=l[d],n=n[d].c}}if(s=r[p],(f=Object.hasOwn(l,s))&&n[s]?.t===0&&n[s]?.d)return null;if(!f){let d=s==="__proto__";if(e.uk&&(d||s==="constructor"))return!1;d&&(Object.defineProperty(l,s,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(n,s,{enumerable:!0,configurable:!0,writable:!0})),n[s]={t:p<r.length-1&&a===2?3:a,d:!1,i:0,c:Object.create(null)}}}if(u=n[s],u.t!==a&&!(a===1&&u.t===3)||(a===2&&(u.d||(u.d=!0,l[s]=[]),l[s].push(l=Object.create(null)),u.c[u.i++]=u={t:1,d:!1,i:0,c:Object.create(null)}),u.d))return null;if(u.d=!0,a===1)l=f?l[s]:l[s]=Object.create(null);else if(a===0&&f)return null;return[s,l,u.c]}function V(e,r,i){(r===null||e.uk===2)&&o.x(r===null?"trying to redefine an already defined table or value":"document contains an unsafe property",e,i)}function E(e,r={}){let i={s:e,p:0,d:r.maxDepth??1e3,bi:r.integersAsBigInt??!1,ld:r.useLegacyDate??!0,uk:r.unsafeKeyBehaviour==="throw"?2:r.unsafeKeyBehaviour==="drop"?1:0},t=Object.create(null),a=Object.create(null),l,n=!1,s=t,f=a;for(e.charCodeAt(0)===65279&&i.p++,A(i);i.p<e.length;){if(e.charCodeAt(i.p)===91){let u=e.charCodeAt(++i.p)===91;l=i.p+=+u,n=!1;let p=k(i,93);u&&(e.charCodeAt(i.p)!==93&&o.x("expected end of table array declaration",i),i.p++);let d=L(i,p,t,a,u?2:1);d?(f=d[2],s=d[1]):(V(i,d,l),n=!0)}else{l=i.p;let u=k(i),p=L(i,u,s,f,0);!p&&!n&&V(i,p,l),A(i,!0,!0);let d=w(i,void 0);p&&!n&&(p[1][p[0]]=d)}A(i,!0),i.p<e.length&&(l=e.charCodeAt(i.p))!==10&&(l!==13||e.charCodeAt(i.p+1)!==10)&&o.x("each key-value declaration must be followed by an end-of-line",i),A(i)}return t}var X=/^[a-z0-9-_]+$/i,_=!!"".isWellFormed;function b(e){let r=typeof e;if(r==="object"){if(Array.isArray(e))return"array";if(typeof e.getUTCDate=="function"&&e instanceof Date)return"date";if(globalThis.Temporal){if(e.until){if(e instanceof Temporal.ZonedDateTime)return"temporal/tz+uc";if(e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainDate)return"temporal/uc";if(e instanceof Temporal.PlainTime||e instanceof Temporal.Instant)return"temporal";if(e instanceof Temporal.PlainYearMonth)return"temporal/x"}else if(e.toPlainDate&&e instanceof Temporal.PlainMonthDay||e.negated&&e instanceof Temporal.Duration)return"temporal/x"}}return r}function x(e){for(let r=0;r<e.length;r++)if(b(e[r])!=="object")return!1;return e.length!=0}function B(e){return JSON.stringify(e).replaceAll("\x7F","\\u007f")}function ee(e){return B(_?e.toWellFormed():e)}function M(e){if(X.test(e))return e;if(_&&!e.isWellFormed())throw new RangeError("key contains illegal lone surrogates");return B(e)}function S(e,r,i,t,a){if(i===0)throw new Error("Could not stringify the object: maximum object depth exceeded");switch(r){case"number":if(isNaN(e))return"nan";if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Number.isInteger(e)&&(t||!Number.isSafeInteger(e)))return e.toFixed(1);case"bigint":case"boolean":case"temporal":return e.toString();case"string":return ee(e);case"date":if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString();case"object":return re(e,i,t,a);case"array":return ie(e,i,t,a);case"temporal/tz+uc":if(a){let l=e.timeZoneId,n=l.charCodeAt(0);if(n!==43&&n!==45&&(n!==85&&n!==71&&n!==90&&n!==69||l!=="UTC"&&l!=="UCT"&&l!=="Universal"&&l!=="Zulu"&&!l.startsWith("GMT")&&l!=="Greenwich"&&!l.startsWith("Etc/")))throw new TypeError("Temporal objects with an IANA timezone are not allowed in Temporal strict mode")}case"temporal/uc":if(a&&e.calendarId!=="iso8601")throw new TypeError("Temporal objects with a non-default calendar are not allowed in Temporal strict mode");return e.toString({calendarName:"never",timeZoneName:"never"});case"temporal/x":throw new TypeError("Unsupported "+e[Symbol.toStringTag])}}function re(e,r,i,t){let a=Object.keys(e);if(a.length===0)return"{}";let l="{ ";for(let n=0;n<a.length;n++){let s=a[n];n&&(l+=", "),l+=M(s)+" = "+S(e[s],b(e[s]),r-1,i,t)}return l+" }"}function ie(e,r,i,t){if(e.length===0)return"[]";let a="[ ";for(let l=0;l<e.length;l++){if(l&&(a+=", "),e[l]===null||e[l]===void 0)throw new TypeError("arrays cannot contain null or undefined values");a+=S(e[l],b(e[l]),r-1,i,t)}return a+" ]"}function ne(e,r,i,t,a){if(i===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let l="";for(let n=0;n<e.length;n++)l+=`${l&&`
|
|
4454
|
+
${t}`,i),this.line=l,this.column=s,this.codeblock=t}static x(r,i,l){throw new e(r,{toml:i.s,ptr:l??i.p})}};function v(e){let r=e.p,i=e.s.charCodeAt(e.p++),l=i,s=i===39,t=i===e.s.charCodeAt(e.p)&&i===e.s.charCodeAt(e.p+1);t&&((i=e.s.charCodeAt(e.p+=2))===10?e.p++:i===13&&e.s.charCodeAt(e.p+1)===10&&(e.p+=2));let n="",a=e.p,o=0;for(;e.p<e.s.length;e.p++)if(i=e.s.charCodeAt(e.p),t&&(i===10||i===13&&e.s.charCodeAt(e.p+1)===10))o=o&&3;else if(i<32&&i!==9||i===127)u.x("control characters are not allowed in strings",e);else if((!o||o===3)&&i===l&&(!t||e.s.charCodeAt(e.p+1)===l&&e.s.charCodeAt(e.p+2)===l)){if(t&&(e.s.charCodeAt(e.p+3)===l&&e.p++,e.s.charCodeAt(e.p+3)===l&&e.p++),!o){let f=e.s.slice(a,e.p);n=n?n+f:f}return e.p+=t?3:1,n}else if(!o)!s&&i===92&&(n+=e.s.slice(a,a=e.p),o=1);else if(o===1)if(i===120||i===117||i===85){let f=e.p++-1,p=0,d=i===120?2:i===117?4:8;for(let m=0;m<d;m++,e.p++){let h=e.s.charCodeAt(e.p),w=h>=48&&h<=57?h-48:h>=65&&h<=70?h-65+10:h>=97&&h<=102?h-97+10:-1;w<0&&u.x("invalid non-hex character in unicode escape",e),p=p<<4|w}(p<0||p>1114111||p>=55296&&p<=57343)&&u.x("invalid unicode escape",e,f),n+=String.fromCodePoint(p),a=e.p--,o=0}else t&&(i===32||i===9)?o=2:(i===98?n+="\b":i===116?n+=" ":i===110?n+=`
|
|
4455
|
+
`:i===102?n+="\f":i===114?n+="\r":i===101?n+="\x1B":i===34?n+='"':i===92?n+="\\":u.x("unrecognised escape sequence",e),a=e.p+1,o=0);else i!==32&&i!==9&&(o===2&&u.x("invalid escape: only line-ending whitespace may be escaped",e,a),o=!s&&i===92?1:0,a=e.p);u.x("unfinished string",e,r)}var ee=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i,C=class e extends Date{#r=!1;#i=!1;#e=null;constructor(r,i,l){let s=!0,t=!0,n="Z",a;if(typeof r=="string")if(i)e:{if(i<3){if(+r.slice(11,13)>23){r="";break e}i===2?(n=null,r+="Z"):(a=r.charCodeAt(r.length-1))!==90&&a!==122&&(n=r.slice(r.length-6)),l&&(r=r.slice(0,10)+"T"+r.slice(11))}else i===4&&(r=+r.slice(0,2)>23?"":`0000-01-01T${r}Z`);s=i!==4,t=i!==3}else{let o=r.match(ee);o?(o[1]||(s=!1,r=`0000-01-01T${r}`),t=!!o[2],t&&r[10]===" "&&(r=r.replace(" ","T")),o[2]&&+o[2]>23?r="":(n=o[3]||null,!n&&t&&(r+="Z"))):r=""}super(r),isNaN(this.getTime())||(this.#r=s,this.#i=t,this.#e=n)}isDateTime(){return this.#r&&this.#i}isLocal(){return!this.#r||!this.#i||!this.#e}isDate(){return this.#r&&!this.#i}isTime(){return this.#i&&!this.#r}isValid(){return this.#r||this.#i}toISOString(){let r=super.toISOString();if(this.isDate())return r.slice(0,10);if(this.isTime())return r.slice(11,23);if(this.#e===null)return r.slice(0,-1);if(this.#e==="Z"||this.#e==="z")return r;let i=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return i=this.#e[0]==="-"?i:-i,new Date(this.getTime()-i*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(r,i="Z"){let l=new e(r);return l.#e=i,l}static wrapAsLocalDateTime(r){let i=new e(r);return i.#e=null,i}static wrapAsLocalDate(r){let i=new e(r);return i.#i=!1,i.#e=null,i}static wrapAsLocalTime(r){let i=new e(r);return i.#r=!1,i.#e=null,i}};function g(e,r=10){return r===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+r}function I(e,r){return e===32||e===9||e===10||e===13||r&&(e===r||e===44)||e===35}function T(e,r){let i=e.p,l=e.s.charCodeAt(e.p);if(l===91||l===123){e.d--||u.x("document contains excessively nested structures. aborting.",e);let s=l===91?V(e):L(e);return e.d++,s}return l===34||l===39?v(e):l===116?((e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)&&u.x("invalid value",e,i),e.p++,!0):l===102?((e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)&&u.x("invalid value",e,i),e.p++,!1):l===43||l===45?E(e,e.p,e.s.charCodeAt(++e.p),44-l,r):e.s.charCodeAt(e.p+4)===45&&e.s.charCodeAt(e.p+7)===45?re(e,l,r):e.s.charCodeAt(e.p+2)===58?ie(e,l,r):E(e,e.p,l,0,r)}function E(e,r,i,l,s){let t=i,n=0,a=!1;if(t===105)return(e.s.charCodeAt(++e.p)!==110||e.s.charCodeAt(++e.p)!==102)&&u.x("invalid value",e,r),e.p++,(l||1)/0;if(t===110)return(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==110)&&u.x("invalid value",e,r),e.p++,NaN;if(t===48){if(++e.p>=e.s.length||I(t=e.s.charCodeAt(e.p),s))return e.bi===!0?0n:0;if(!l){if(t===120)return S(e,r,16,s);if(t===98)return S(e,r,2,s);if(t===111)return S(e,r,8,s)}t===46?n=2:t===101||t===69?n=4:u.x("illegal leading zero",e,r)}else g(t)||u.x("invalid value",e,r);for(;++e.p<e.s.length&&(t=e.s.charCodeAt(e.p),!I(t,s));)n||(n=1),t===95?(n&1||u.x("illegal underscore",e),n+=11,a=!0):n===1&&t===46?n=2:(n===1||n===3)&&(t===101||t===69)?n=4:n===4&&(t===43||t===45)||(g(t)?n>9?n-=11:n&1||n++:u.x("illegal character in numeric literal",e));if(!n){let f=(i-48)*(l||1);return e.bi===!0?BigInt(f):f}n&1||u.x("unfinished numeric value",e,r);let o=e.s.slice(r,e.p);return a&&(o=o.replaceAll("_","")),n>1?parseFloat(o):z(e,o,10,r)}function S(e,r,i,l){let s,t=1;for(;++e.p<e.s.length&&(s=e.s.charCodeAt(e.p),!I(s,l));)s===95?(t&1&&u.x("illegal underscore",e),t=3):g(s,i)?t&1&&t--:u.x("illegal character in numeric literal",e);t&1&&u.x("unfinished numeric value",e);let n=e.s.slice(r+2,e.p);return t&&(n=n.replaceAll("_","")),z(e,n,i,r)}function z(e,r,i,l){if(e.bi!==!0)e:{let s=parseInt(r,i);if(!Number.isSafeInteger(s)){if(e.bi)break e;u.x("integer value cannot be represented losslessly",e,l)}return s}return BigInt(i===10?r:(i===2?"0b":i===8?"0o":"0x")+r)}function re(e,r,i){let l=e.p++,s;if(!g(r)||!g(e.s.charCodeAt(e.p++))||!g(e.s.charCodeAt(e.p++))||!g(e.s.charCodeAt(e.p++)))return E(e,e.p=l,r,0,i);if(e.p+=5,g(e.s.charCodeAt(e.p++))||u.x("invalid date-time: date part is malformed",e,l),e.p>=e.s.length||((r=e.s.charCodeAt(e.p))!==32||(s=!0,!g(e.s.charCodeAt(e.p+1))))&&r!==84&&r!==116){let n=e.s.slice(l,e.p);return b(e,n,3,!1,l)}if(e.s.charCodeAt(e.p+=3)!==58&&u.x("invalid date-time: time part is malformed",e,l),e.s.charCodeAt(e.p+=3)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;g(e.s.charCodeAt(++e.p)););if(r=e.s.charCodeAt(e.p)){if(r===90||r===122){let n=e.s.slice(l,++e.p);return b(e,n,1,s,l,"[+00:00]")}if(r===43||r===45){let n=e.s.slice(l,e.p+=6);return b(e,n,1,s,l,!e.ld&&"["+e.s.slice(e.p-6,e.p)+"]")}}let t=e.s.slice(l,e.p);return b(e,t,2,s,l)}function ie(e,r,i){let l=e.p;if(!g(r)||!g(e.s.charCodeAt(++e.p)))return E(e,--e.p,r,0,i);if(e.s.charCodeAt(e.p+=4)===58&&(e.p+=3),e.s.charCodeAt(e.p)===46)for(;g(e.s.charCodeAt(++e.p)););let s=e.s.slice(l,e.p);return b(e,s,4,!1,l)}function b(e,r,i,l,s,t){if(e.ld){let n=new C(r,i,l);return n.isValid()||u.x("invalid date",e,s),n}try{switch(t&&(r+=t),i){case 1:return Temporal.ZonedDateTime.from(r);case 2:return Temporal.PlainDateTime.from(r);case 3:return Temporal.PlainDate.from(r);case 4:return Temporal.PlainTime.from(r)}}catch(n){u.x(n instanceof Error?n.message:""+n,e,s)}}function ne(e){for(;e.p<e.s.length;e.p++){let r=e.s.charCodeAt(e.p);if(r===10)break;if(r===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}(r<32&&r!==9||r===127)&&u.x("control characters are not allowed in comments",e)}}function c(e,r,i){let l;for(;e.p<e.s.length;){for(;e.p<e.s.length&&((l=e.s.charCodeAt(e.p))===32||l===9||!r&&(l===10||l===13&&e.s.charCodeAt(e.p+1)===10));)e.p++;if(i||l!==35)break;ne(e)}}function O(e,r=61){let i,l=0,s=[],t,n=e.s.charCodeAt(i=e.p);do{if(n===r)return l||u.x("unexpected end of key",e),l===1&&s.push(e.s.slice(t,e.p)),e.p++,s;n===46?(l||u.x("illegal empty bare key",e),l===1&&s.push(e.s.slice(t,e.p)),l=0):!l&&(n===34||n===39)?(n===e.s.charCodeAt(e.p+1)&&n===e.s.charCodeAt(e.p+2)&&u.x("illegal quoted key: multiline strings are not allowed",e),s.push(v(e)),l=2,e.p--):n===32||n===9?l===1&&(s.push(e.s.slice(t,e.p)),l=2):l===2||n<48&&n!==45||n>57&&n<65||n>90&&n<97&&n!==95||n>122?u.x("illegal character in key",e):l||(l=1,t=e.p)}while(n=e.s.charCodeAt(++e.p));u.x("incomplete key-value: cannot find end of key",e,i)}function L(e){let r=e.p++,i=Object.create(null),l=new Set,s;for(;e.p<e.s.length;){if(c(e),(s=e.s.charCodeAt(e.p))===125)return e.p++,i;let t,n=i,a=!1,o=e.p,f=O(e);for(let d=0;d<f.length;d++){d&&(n=a?n[t]:n[t]=Object.create(null)),t=f[d],(a=Object.hasOwn(n,t))&&(typeof n[t]!="object"||l.has(n[t]))&&u.x("trying to redefine an already defined value",e,o);let m=t==="__proto__";if(e.uk&&(m||t==="constructor")){n=e.uk!==1&&u.x("document contains an unsafe property",e,o);break}!a&&m&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,writable:!0})}a&&u.x("trying to redefine an already defined value",e,o),c(e,!0,!0);let p=T(e,125);if(n&&typeof(n[t]=p)=="object"&&l.add(p),c(e),(s=e.s.charCodeAt(e.p++))===125)return i;s!==44&&u.x("expected comma or end of structure",e,e.p-1)}u.x("unfinished table",e,r)}function V(e){let r=e.p++,i=[],l;for(;e.p<e.s.length;){if(c(e),(l=e.s.charCodeAt(e.p))===93)return e.p++,i;if(i.push(T(e,93)),c(e),(l=e.s.charCodeAt(e.p++))===93)return i;l!==44&&u.x("expected comma or end of structure",e,e.p-1)}u.x("unfinished array",e,r)}function B(e,r,i,l,s){let t=i,n=l,a,o=!1,f;for(let p=0;p<r.length;p++){if(p){if(t=o?t[a]:t[a]=Object.create(null),n=(f=n[a]).c,s===0&&(f.t===1||f.t===2))return null;if(f.t===2){let d=t.length-1;t=t[d],n=n[d].c}}if(a=r[p],(o=Object.hasOwn(t,a))&&n[a]?.t===0&&n[a]?.d)return null;if(!o){let d=a==="__proto__";if(e.uk&&(d||a==="constructor"))return!1;d&&(Object.defineProperty(t,a,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(n,a,{enumerable:!0,configurable:!0,writable:!0})),n[a]={t:p<r.length-1&&s===2?3:s,d:!1,i:0,c:Object.create(null)}}}if(f=n[a],f.t!==s&&!(s===1&&f.t===3)||(s===2&&(f.d||(f.d=!0,t[a]=[]),t[a].push(t=Object.create(null)),f.c[f.i++]=f={t:1,d:!1,i:0,c:Object.create(null)}),f.d))return null;if(f.d=!0,s===1)t=o?t[a]:t[a]=Object.create(null);else if(s===0&&o)return null;return[a,t,f.c]}function M(e,r,i){(r===null||e.uk===2)&&u.x(r===null?"trying to redefine an already defined table or value":"document contains an unsafe property",e,i)}function A(e,r={}){let i={s:e,p:0,d:r.maxDepth??1e3,bi:r.integersAsBigInt??!1,ld:r.useLegacyDate??!0,uk:r.unsafeKeyBehaviour==="throw"?2:r.unsafeKeyBehaviour==="drop"?1:0},l=Object.create(null),s=Object.create(null),t,n=!1,a=l,o=s;for(e.charCodeAt(0)===65279&&i.p++,c(i);i.p<e.length;){if(e.charCodeAt(i.p)===91){let f=e.charCodeAt(++i.p)===91;t=i.p+=+f,n=!1;let p=O(i,93);f&&(e.charCodeAt(i.p)!==93&&u.x("expected end of table array declaration",i),i.p++);let d=B(i,p,l,s,f?2:1);d?(o=d[2],a=d[1]):(M(i,d,t),n=!0)}else{t=i.p;let f=O(i),p=B(i,f,a,o,0);!p&&!n&&M(i,p,t),c(i,!0,!0);let d=T(i,void 0);p&&!n&&(p[1][p[0]]=d)}c(i,!0),i.p<e.length&&(t=e.charCodeAt(i.p))!==10&&(t!==13||e.charCodeAt(i.p+1)!==10)&&u.x("each key-value declaration must be followed by an end-of-line",i),c(i)}return l}var te=/^[a-z0-9-_]+$/i,j=!!"".isWellFormed;function k(e){let r=typeof e;if(r==="object"){if(Array.isArray(e))return"array";if(typeof e.getUTCDate=="function"&&e instanceof Date)return"date";if(globalThis.Temporal){if(e.until){if(e instanceof Temporal.ZonedDateTime)return"temporal/tz+uc";if(e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainDate)return"temporal/uc";if(e instanceof Temporal.PlainTime||e instanceof Temporal.Instant)return"temporal";if(e instanceof Temporal.PlainYearMonth)return"temporal/x"}else if(e.toPlainDate&&e instanceof Temporal.PlainMonthDay||e.negated&&e instanceof Temporal.Duration)return"temporal/x"}}return r}function le(e){for(let r=0;r<e.length;r++)if(k(e[r])!=="object")return!1;return e.length!=0}function U(e){return JSON.stringify(e).replaceAll("\x7F","\\u007f")}function se(e){return U(j?e.toWellFormed():e)}function W(e){if(te.test(e))return e;if(j&&!e.isWellFormed())throw new RangeError("key contains illegal lone surrogates");return U(e)}function $(e,r,i,l,s){if(i===0)throw new Error("Could not stringify the object: maximum object depth exceeded");switch(r){case"number":if(isNaN(e))return"nan";if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Number.isInteger(e)&&(l||!Number.isSafeInteger(e)))return e.toFixed(1);case"bigint":case"boolean":case"temporal":return e.toString();case"string":return se(e);case"date":if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString();case"object":return ae(e,i,l,s);case"array":return oe(e,i,l,s);case"temporal/tz+uc":if(s){let t=e.timeZoneId,n=t.charCodeAt(0);if(n!==43&&n!==45&&(n!==85&&n!==71&&n!==90&&n!==69||t!=="UTC"&&t!=="UCT"&&t!=="Universal"&&t!=="Zulu"&&!t.startsWith("GMT")&&t!=="Greenwich"&&!t.startsWith("Etc/")))throw new TypeError("Temporal objects with an IANA timezone are not allowed in Temporal strict mode")}case"temporal/uc":if(s&&e.calendarId!=="iso8601")throw new TypeError("Temporal objects with a non-default calendar are not allowed in Temporal strict mode");return e.toString({calendarName:"never",timeZoneName:"never"});case"temporal/x":throw new TypeError("Unsupported "+e[Symbol.toStringTag])}}function ae(e,r,i,l){let s=Object.keys(e);if(s.length===0)return"{}";let t="{ ";for(let n=0;n<s.length;n++){let a=s[n];n&&(t+=", "),t+=W(a)+" = "+$(e[a],k(e[a]),r-1,i,l)}return t+" }"}function oe(e,r,i,l){if(e.length===0)return"[]";let s="[ ";for(let t=0;t<e.length;t++){if(t&&(s+=", "),e[t]===null||e[t]===void 0)throw new TypeError("arrays cannot contain null or undefined values");s+=$(e[t],k(e[t]),r-1,i,l)}return s+" ]"}function fe(e,r,i,l,s){if(i===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let t="";for(let n=0;n<e.length;n++)t+=`${t&&`
|
|
4375
4456
|
`}[[${r}]]
|
|
4376
|
-
`,
|
|
4377
|
-
`)+
|
|
4378
|
-
`)+
|
|
4379
|
-
`}}return e&&(n||!
|
|
4380
|
-
${n}`:`[${e}]`),n&&
|
|
4381
|
-
${
|
|
4382
|
-
`?
|
|
4383
|
-
`:a}
|
|
4457
|
+
`,t+=N(0,e[n],r,i,l,s);return t}function N(e,r,i,l,s,t){if(l===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let n="",a="",o=Object.keys(r);for(let f=0;f<o.length;f++){let p=o[f];if(r[p]!==null&&r[p]!==void 0){let d=k(r[p]);if(d==="symbol"||d==="function")throw new TypeError(`cannot serialize values of type '${d}'`);let m=W(p);if(d==="array"&&le(r[p]))a+=(a&&`
|
|
4458
|
+
`)+fe(r[p],i?`${i}.${m}`:m,l-1,s,t);else if(d==="object"){let h=i?`${i}.${m}`:m;a+=(a&&`
|
|
4459
|
+
`)+N(h,r[p],h,l-1,s,t)}else n+=m,n+=" = ",n+=$(r[p],d,l,s,t),n+=`
|
|
4460
|
+
`}}return e&&(n||!a)&&(n=n?`[${e}]
|
|
4461
|
+
${n}`:`[${e}]`),n&&a?`${n}
|
|
4462
|
+
${a}`:n||a}function P(e,{maxDepth:r=1e3,numbersAsFloat:i=!1,strictTemporal:l=!1}={}){if(k(e)!=="object")throw new TypeError("stringify can only be called with an object");let s=N(0,e,"",r,i,l);return s[s.length-1]!==`
|
|
4463
|
+
`?s+`
|
|
4464
|
+
`:s}var y="dyne-gestalt-agents",_="https://github.com/dyne/gestalt-agents.git",ue=/^[a-f0-9]{40}$/;async function R({marketplace:e,marketplaceName:r,config:i,mode:l,readProvenance:s,git:t,installedGitDir:n,windowsRevision:a}){if(e!=="dyne/gestalt-agents"||r!==y)return null;let o=A(i).marketplaces?.[y];if(o&&(o.source_type!=="git"||o.source!==_))return null;if(o?.ref!==void 0){let p=await s(),d;try{d=JSON.parse(p??"null")?.managedAgentsRef}catch(m){if(!(m instanceof SyntaxError))throw m}if(o.ref!==d)return null}let f;if(o&&l==="install"&&(o.ref||n))f=o.ref??(await t(["--git-dir",n,"rev-parse","--verify","HEAD^{commit}"])).trim();else if(a)f=a;else{let p=await t(["ls-remote","--tags","--sort=-version:refname",_,"refs/tags/v*"]),d=new Map;for(let m of p.split(/\r?\n/)){let h=/^([a-f0-9]{40})\s+refs\/tags\/(v\d+\.\d+\.\d+)(\^\{\})?$/.exec(m);h&&(h[3]||!d.has(h[2]))&&d.set(h[2],h[1])}f=d.values().next().value}if(!ue.test(f??""))throw new Error("Cannot determine an immutable Gestalt Agents release commit");return{ref:f,fresh:!o,changing:o?.ref!==f}}function K(e,r,i){let l=A(e).marketplaces?.[y];if(l?.source_type!=="git"||l.source!==_||l.ref!==i||r.trim()!==i)throw new Error("Codex did not activate the selected Gestalt Agents commit and ref")}function F(e,r,i){let l=A(e),s=l.marketplaces[y];if(s.ref===r)return e;let t=s.ref;s.ref=r;function n(a){try{return i(A(a),l)}catch{return!1}}if(t!==void 0)for(let a of e.matchAll(/(["'])([a-f0-9]{40})\1/g)){if(a[2]!==t)continue;let o=a.index+1,f=e.slice(0,o)+r+e.slice(o+t.length);if(n(f))return f}else{let a=e.includes(`\r
|
|
4465
|
+
`)?`\r
|
|
4466
|
+
`:`
|
|
4467
|
+
`;for(let o of e.matchAll(/(?:["']source_type["']|\bsource_type)\s*=\s*(?:"git"|'git')/g)){let f=o.index+o[0].length,p=e.indexOf(`
|
|
4468
|
+
`,f),d=p<0?e.length:p+1;for(let m of["",y+".","marketplaces."+y+"."]){let h=m+'ref = "'+r+'"',w=e.slice(0,f)+", "+h+e.slice(f);if(n(w))return w;let Z=e.slice(0,d)+(p<0?a:"")+h+a+e.slice(d);if(n(Z))return Z}}}throw new Error("Cannot record the Gestalt Agents ref without changing other Codex settings")}return Q(pe);})();
|
|
4384
4469
|
// END BUNDLED PROFILE TOML PARSER
|
|
4385
4470
|
const args = process.argv.slice(2);
|
|
4386
4471
|
const manager = process.env.GESTALT_MANAGER_BIN;
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"source": "src/cli/platform/native/owned-process.c",
|
|
3
3
|
"license": "MIT (full license in source)",
|
|
4
4
|
"sourceSha256": "8b8499245e4213e3e842497f815d4b0d19685bcd806b461fdacb66119500ad58",
|
|
5
|
-
"artifactSha256": "
|
|
5
|
+
"artifactSha256": "f8f57e20ef8d50b65822fd092051ce8cbb7cef94887bf4f6e077fe68663ffc64",
|
|
6
6
|
"platform": "win32",
|
|
7
7
|
"architecture": "x64",
|
|
8
8
|
"node": "v24.22.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"advapi32.lib",
|
|
24
24
|
"netapi32.lib"
|
|
25
25
|
],
|
|
26
|
-
"observedAt": "2026-12-
|
|
26
|
+
"observedAt": "2026-12-06T04:55:42.866Z",
|
|
27
27
|
"sourceInputs": [
|
|
28
28
|
{
|
|
29
29
|
"path": "src/cli/platform/native/owned-process.c",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaromil/gestalt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"description": "Manage Gestalt's isolated Codex profile, agent skills and Mobile installation",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"author": "Dyne.org foundation",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public",
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "5a63a3e13ba6feada1cc325581aadae20618f5dd"
|
|
48
48
|
}
|