@piewf/cli 5.2.0 → 5.4.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.
@@ -248,7 +248,7 @@ function validateRunRecord(value) {
248
248
  }
249
249
  }
250
250
  function validateSnapshot(snapshot) {
251
- if (!object(snapshot) || typeof snapshot.script !== "string" || !snapshot.script || !jsonValue(snapshot.args) || !object(snapshot.metadata) || typeof snapshot.metadata.name !== "string" || !snapshot.metadata.name || (snapshot.metadata.description !== undefined && typeof snapshot.metadata.description !== "string") || !object(snapshot.settings) || !Number.isSafeInteger(snapshot.settings.concurrency) || Number(snapshot.settings.concurrency) < 1 || Number(snapshot.settings.concurrency) > 16 || !isList(snapshot.models) || snapshot.models.some((modelName) => typeof modelName !== "string") || !isList(snapshot.tools) || snapshot.tools.some((tool) => typeof tool !== "string") || !isList(snapshot.agentTypes) || snapshot.agentTypes.some((agentType) => typeof agentType !== "string") || !isList(snapshot.schemas))
251
+ if (!object(snapshot) || typeof snapshot.script !== "string" || !snapshot.script || !jsonValue(snapshot.args) || !object(snapshot.metadata) || typeof snapshot.metadata.name !== "string" || !snapshot.metadata.name || (snapshot.metadata.description !== undefined && typeof snapshot.metadata.description !== "string") || !object(snapshot.settings) || !Number.isSafeInteger(snapshot.settings.concurrency) || Number(snapshot.settings.concurrency) < 1 || Number(snapshot.settings.concurrency) > 16 || snapshot.settings.backgroundWidget !== undefined && typeof snapshot.settings.backgroundWidget !== "boolean" || !isList(snapshot.models) || snapshot.models.some((modelName) => typeof modelName !== "string") || !isList(snapshot.tools) || snapshot.tools.some((tool) => typeof tool !== "string") || !isList(snapshot.agentTypes) || snapshot.agentTypes.some((agentType) => typeof agentType !== "string") || !isList(snapshot.schemas))
252
252
  throw new Error("Persisted launch snapshot is invalid");
253
253
  if (snapshot.identityVersion !== undefined)
254
254
  positiveInteger(snapshot.identityVersion, "Persisted snapshot identity version");
@@ -1,6 +1,6 @@
1
1
  import { readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
2
2
  import { basename, dirname, extname, join, resolve } from "node:path";
3
- import { InMemoryCredentialStore } from "@earendil-works/pi-ai";
3
+ import { InMemoryCredentialStore, InMemoryModelsStore } from "@earendil-works/pi-ai";
4
4
  import { ModelRuntime, createAgentSessionFromServices, createAgentSessionServices, getAgentDir, hasTrustRequiringProjectResources, SessionManager, SettingsManager, } from "@earendil-works/pi-coding-agent";
5
5
  import { DEFAULT_SETTINGS, createLocalPiSession, errorText, isNodeError, isObject, loadSettings, prepareAgentSetupForInspection, resolveAgentResourcePolicy, resolveWorkflowSettings, resolveModelReference, parseThinking, parseRoleMarkdown, registeredWorkflowFunctions, registeredWorkflowRoleDirectoryRegistrations, workflowRoleDirectories, workflowProjectSettingsPath, workflowSettingsPath, } from "pi-extensible-workflows";
6
6
  import { loadingRegistry } from "pi-extensible-workflows";
@@ -73,7 +73,7 @@ async function discoverPi(cwd, agentDir) {
73
73
  const previousOffline = process.env.PI_OFFLINE;
74
74
  process.env.PI_OFFLINE = "1";
75
75
  try {
76
- const modelRuntime = await ModelRuntime.create({ credentials: await readCredentials(agentDir), modelsPath: join(agentDir, "models.json") });
76
+ const modelRuntime = await ModelRuntime.create({ credentials: await readCredentials(agentDir), modelsPath: join(agentDir, "models.json"), modelsStore: new InMemoryModelsStore() });
77
77
  const services = await createAgentSessionServices({
78
78
  cwd,
79
79
  agentDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piewf/cli",
3
- "version": "5.2.0",
3
+ "version": "5.4.0",
4
4
  "description": "CLI for pi-extensible-workflows",
5
5
  "homepage": "https://vekexasia.github.io/pi-extensible-workflows/",
6
6
  "repository": {
@@ -29,11 +29,12 @@
29
29
  "peerDependencies": {
30
30
  "@earendil-works/pi-ai": "*",
31
31
  "@earendil-works/pi-coding-agent": "*",
32
+ "@earendil-works/pi-tui": "*",
32
33
  "typebox": "*"
33
34
  },
34
35
  "devDependencies": {
35
- "@earendil-works/pi-ai": "0.82.1",
36
- "@earendil-works/pi-coding-agent": "0.82.1",
36
+ "@earendil-works/pi-ai": "0.84.1",
37
+ "@earendil-works/pi-coding-agent": "0.84.1",
37
38
  "@eslint/js": "10.0.1",
38
39
  "@types/node": "24.12.4",
39
40
  "eslint": "10.0.3",
@@ -45,7 +46,7 @@
45
46
  },
46
47
  "license": "MIT",
47
48
  "dependencies": {
48
- "pi-extensible-workflows": "5.2.0"
49
+ "pi-extensible-workflows": "5.4.0"
49
50
  },
50
51
  "publishConfig": {
51
52
  "access": "public"