perstack 0.0.106 → 0.0.108
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/bin/cli.js
CHANGED
|
@@ -1137,10 +1137,12 @@ async function resolveAllExperts(config, env) {
|
|
|
1137
1137
|
if (experts[delegateKey]) continue;
|
|
1138
1138
|
const result = await client.experts.get(delegateKey);
|
|
1139
1139
|
if (!result.ok) throw new PerstackError(`Failed to resolve delegate "${delegateKey}": ${result.error.message}`);
|
|
1140
|
-
const
|
|
1141
|
-
if (!
|
|
1142
|
-
|
|
1143
|
-
|
|
1140
|
+
const allExperts = result.data.data.definition.experts;
|
|
1141
|
+
if (!allExperts[delegateKey]) throw new PerstackError(`Expert "${delegateKey}" not found in API response`);
|
|
1142
|
+
for (const [key, expert] of Object.entries(allExperts)) if (!experts[key]) {
|
|
1143
|
+
experts[key] = toRuntimeExpert(key, expert);
|
|
1144
|
+
for (const nestedDelegate of expert.delegates ?? []) if (!experts[nestedDelegate]) toResolve.add(nestedDelegate);
|
|
1145
|
+
}
|
|
1144
1146
|
}
|
|
1145
1147
|
return experts;
|
|
1146
1148
|
}
|
|
@@ -21308,7 +21310,7 @@ async function expertVersionsHandler(scopeName, options) {
|
|
|
21308
21310
|
|
|
21309
21311
|
//#endregion
|
|
21310
21312
|
//#region ../../packages/runtime/package.json
|
|
21311
|
-
var version$1 = "0.0.
|
|
21313
|
+
var version$1 = "0.0.123";
|
|
21312
21314
|
|
|
21313
21315
|
//#endregion
|
|
21314
21316
|
//#region ../../packages/runtime/src/helpers/usage.ts
|
|
@@ -77269,7 +77271,7 @@ function validateRuntimeVersion(experts) {
|
|
|
77269
77271
|
//#endregion
|
|
77270
77272
|
//#region ../../packages/runtime/src/helpers/setup-experts.ts
|
|
77271
77273
|
async function setupExperts(setting, resolveExpertToRun) {
|
|
77272
|
-
const resolveFn = resolveExpertToRun ?? (await import("../resolve-expert-
|
|
77274
|
+
const resolveFn = resolveExpertToRun ?? (await import("../resolve-expert-CwaeoRiD.js")).resolveExpertToRun;
|
|
77273
77275
|
const { expertKey } = setting;
|
|
77274
77276
|
const experts = { ...setting.experts };
|
|
77275
77277
|
const clientOptions = {
|
|
@@ -119474,7 +119476,7 @@ const selectionReducer = (_state, action) => {
|
|
|
119474
119476
|
}
|
|
119475
119477
|
};
|
|
119476
119478
|
const SelectionApp = (props) => {
|
|
119477
|
-
const { showHistory,
|
|
119479
|
+
const { showHistory, configuredExperts, recentExperts, historyJobs, onLoadCheckpoints, onComplete } = props;
|
|
119478
119480
|
const { exit } = useApp();
|
|
119479
119481
|
const allExperts = (0, import_react.useMemo)(() => {
|
|
119480
119482
|
const configured = configuredExperts.map((e) => ({
|
|
@@ -119509,20 +119511,6 @@ const SelectionApp = (props) => {
|
|
|
119509
119511
|
onComplete,
|
|
119510
119512
|
exit
|
|
119511
119513
|
]);
|
|
119512
|
-
(0, import_react.useEffect)(() => {
|
|
119513
|
-
if (initialExpertKey) {
|
|
119514
|
-
onComplete({
|
|
119515
|
-
expertKey: initialExpertKey,
|
|
119516
|
-
checkpoint: initialCheckpoint
|
|
119517
|
-
});
|
|
119518
|
-
exit();
|
|
119519
|
-
}
|
|
119520
|
-
}, [
|
|
119521
|
-
initialExpertKey,
|
|
119522
|
-
initialCheckpoint,
|
|
119523
|
-
onComplete,
|
|
119524
|
-
exit
|
|
119525
|
-
]);
|
|
119526
119514
|
const completeWithExpert = (0, import_react.useCallback)((expertKey, checkpoint) => {
|
|
119527
119515
|
setExitResult({
|
|
119528
119516
|
expertKey,
|
|
@@ -119600,7 +119588,7 @@ const SelectionApp = (props) => {
|
|
|
119600
119588
|
handleSwitchToExperts,
|
|
119601
119589
|
handleSwitchToHistory
|
|
119602
119590
|
]);
|
|
119603
|
-
if (exitResult
|
|
119591
|
+
if (exitResult) return null;
|
|
119604
119592
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
|
|
119605
119593
|
flexDirection: "column",
|
|
119606
119594
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputAreaProvider, {
|
|
@@ -119618,8 +119606,16 @@ const SelectionApp = (props) => {
|
|
|
119618
119606
|
/**
|
|
119619
119607
|
* Renders the selection TUI phase.
|
|
119620
119608
|
* Returns a promise that resolves with the selection result (expert and checkpoint).
|
|
119609
|
+
*
|
|
119610
|
+
* When `initialExpertKey` is provided, returns immediately without rendering the TUI.
|
|
119611
|
+
* This avoids Ink lifecycle issues in compiled binaries where React effects may not
|
|
119612
|
+
* fire before the process exits.
|
|
119621
119613
|
*/
|
|
119622
119614
|
async function renderSelection(params) {
|
|
119615
|
+
if (params.initialExpertKey) return {
|
|
119616
|
+
expertKey: params.initialExpertKey,
|
|
119617
|
+
checkpoint: params.initialCheckpoint
|
|
119618
|
+
};
|
|
119623
119619
|
return new Promise((resolve, reject) => {
|
|
119624
119620
|
let selectionResult;
|
|
119625
119621
|
const { waitUntilExit } = render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectionApp, {
|
|
@@ -119773,7 +119769,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
|
|
|
119773
119769
|
//#endregion
|
|
119774
119770
|
//#region package.json
|
|
119775
119771
|
var name = "perstack";
|
|
119776
|
-
var version = "0.0.
|
|
119772
|
+
var version = "0.0.108";
|
|
119777
119773
|
var description = "PerStack CLI";
|
|
119778
119774
|
|
|
119779
119775
|
//#endregion
|