@pasko70/pibo 1.7.9 → 1.7.11

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.
Files changed (57) hide show
  1. package/dist/apps/chat/chat-request-normalizers.js +1 -1
  2. package/dist/apps/chat/chat-user-skill-routes.js +10 -13
  3. package/dist/apps/chat/model-catalog.js +1 -1
  4. package/dist/apps/chat/project-workflow-sessions.js +1 -1
  5. package/dist/apps/chat/ralph-api.js +1 -1
  6. package/dist/apps/chat/trace.js +1 -1
  7. package/dist/apps/chat/web-app.js +4 -1
  8. package/dist/apps/chat-ui/assets/{dist-D6ImmtZ3.js → dist--lraqdDn.js} +1 -1
  9. package/dist/apps/chat-ui/assets/{dist-CCOZbHCt.js → dist-6pcjNbPQ.js} +1 -1
  10. package/dist/apps/chat-ui/assets/{dist-Daom6uMW.js → dist-CMFjl7MX.js} +1 -1
  11. package/dist/apps/chat-ui/assets/{dist-DTJJ5-iA.js → dist-COlFTw2x.js} +1 -1
  12. package/dist/apps/chat-ui/assets/{dist-DDQWCHTh.js → dist-CZSEM5So.js} +1 -1
  13. package/dist/apps/chat-ui/assets/{dist-Dgs6LwMW.js → dist-CajLLpaw.js} +1 -1
  14. package/dist/apps/chat-ui/assets/{dist-Bg2k47fY.js → dist-CoCvyd4f.js} +1 -1
  15. package/dist/apps/chat-ui/assets/{dist-BLYDOjGT.js → dist-Dgz3iWay.js} +1 -1
  16. package/dist/apps/chat-ui/assets/{dist-BLQTYmgi.js → dist-IlQbTNzw.js} +1 -1
  17. package/dist/apps/chat-ui/assets/{dist-Bv912fTl.js → dist-YdEosvsr.js} +1 -1
  18. package/dist/apps/chat-ui/assets/{dist-LRUZKp77.js → dist-bLd-NaVv.js} +1 -1
  19. package/dist/apps/chat-ui/assets/{index-BnZ0V5cJ.js → index-HPWlrJwv.js} +3 -3
  20. package/dist/apps/chat-ui/index.html +1 -1
  21. package/dist/apps/chat-vscode-web/assets/{index-CiQZTRZH.js → index-Dge6XEYB.js} +1 -1
  22. package/dist/apps/chat-vscode-web/index.html +1 -1
  23. package/dist/apps/cli-ui/InkSessionApp.js +3 -3
  24. package/dist/apps/cli-ui/cliSessionsCommand.js +1 -1
  25. package/dist/apps/vscode-artifacts/latest.vsix +0 -0
  26. package/dist/apps/vscode-artifacts/{pibo-vscode-ext-1.7.9.vsix → pibo-vscode-ext-1.7.11.vsix} +0 -0
  27. package/dist/auth/login-actions.js +1 -1
  28. package/dist/auth/openai-codex-usage.js +1 -1
  29. package/dist/cli-session/fakeSessionSource.js +2 -2
  30. package/dist/cli.js +1 -1
  31. package/dist/core/compaction-prompt.js +2 -2
  32. package/dist/core/context-build.js +1 -1
  33. package/dist/core/context-guard.js +1 -1
  34. package/dist/core/routed-session.js +1 -1
  35. package/dist/core/runtime.js +1 -1
  36. package/dist/core/thinking.js +1 -1
  37. package/dist/gateway/tool.js +2 -2
  38. package/dist/gateway/web.js +5 -0
  39. package/dist/local/extension.js +2 -2
  40. package/dist/pi-packages/metadata.js +1 -1
  41. package/dist/plugins/chat-user-skills.js +41 -0
  42. package/dist/providers/glm.js +1 -1
  43. package/dist/providers/minimax.js +1 -1
  44. package/dist/providers/openai-gpt56.js +4 -4
  45. package/dist/ralph/cli.js +2 -2
  46. package/dist/ralph/service.js +13 -8
  47. package/dist/ralph/store.js +1 -1
  48. package/dist/runs/tools.js +2 -2
  49. package/dist/session-ui/commandCatalog.js +1 -1
  50. package/dist/subagents/tool.js +2 -2
  51. package/dist/tools/codex-compat.js +2 -2
  52. package/dist/tools/codex-image-generation.js +3 -3
  53. package/dist/tools/guides.js +1 -1
  54. package/dist/tools/runtime/tool.js +2 -2
  55. package/dist/web-annotations/tools.js +2 -2
  56. package/package.json +5 -3
  57. package/skills/builtin/pi-agent-harness/SKILL.md +1 -1
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="theme-color" content="#101d22" />
7
7
  <title>Pibo</title>
8
- <script type="module" crossorigin src="/apps/chat-vscode/assets/index-CiQZTRZH.js"></script>
8
+ <script type="module" crossorigin src="/apps/chat-vscode/assets/index-Dge6XEYB.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/apps/chat-vscode/assets/index-B5QK07zO.css">
10
10
  </head>
11
11
  <body>
@@ -699,8 +699,8 @@ async function executeSharedSlashCommand(command, source, state, setState, openS
699
699
  setState((current) => applyCommandResultToState(current, command, result.descriptor, status));
700
700
  return true;
701
701
  }
702
- const THINKING_LEVELS = ["current/default", "off", "minimal", "low", "medium", "high", "xhigh"];
703
- const APPLY_THINKING_LEVELS = new Set(["off", "minimal", "low", "medium", "high", "xhigh"]);
702
+ const THINKING_LEVELS = ["current/default", "off", "minimal", "low", "medium", "high", "xhigh", "max"];
703
+ const APPLY_THINKING_LEVELS = new Set(["off", "minimal", "low", "medium", "high", "xhigh", "max"]);
704
704
  async function selectCommandMenuItem(picker, item, source, state, setState, openSession) {
705
705
  if (item.disabled) {
706
706
  setState((current) => ({ ...current, message: item.description ? `${item.label}: ${item.description}` : `${item.label} is unavailable.`, error: undefined }));
@@ -787,7 +787,7 @@ function thinkingPickerState() {
787
787
  function validateThinkingLevel(value) {
788
788
  const level = value.trim().toLowerCase();
789
789
  if (!APPLY_THINKING_LEVELS.has(level))
790
- throw new Error(`Unsupported thinking level "${value}". Use off, minimal, low, medium, high, or xhigh.`);
790
+ throw new Error(`Unsupported thinking level "${value}". Use off, minimal, low, medium, high, xhigh, or max.`);
791
791
  }
792
792
  function modelProviderPickerState(providers) {
793
793
  return {
@@ -148,7 +148,7 @@ class DebugMockCliSessionRouter {
148
148
  const level = typeof params.level === "string" ? params.level : undefined;
149
149
  if (level)
150
150
  return { message: `Thinking level set to ${level}`, level, supported: true, changed: true };
151
- return { action: "show_thinking_menu", items: ["off", "minimal", "low", "medium", "high", "xhigh"].map((value) => ({ id: value, label: value })) };
151
+ return { action: "show_thinking_menu", items: ["off", "minimal", "low", "medium", "high", "xhigh", "max"].map((value) => ({ id: value, label: value })) };
152
152
  }
153
153
  if (event.action === "model") {
154
154
  const model = typeof params.model === "string" ? params.model : undefined;
@@ -1,4 +1,4 @@
1
- import { AuthStorage } from "@mariozechner/pi-coding-agent";
1
+ import { AuthStorage } from "@earendil-works/pi-coding-agent";
2
2
  import { randomBytes } from "node:crypto";
3
3
  const OPENAI_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
4
4
  const OPENAI_AUTHORIZE_URL = "https://auth.openai.com/oauth/authorize";
@@ -1,4 +1,4 @@
1
- import { AuthStorage } from "@mariozechner/pi-coding-agent";
1
+ import { AuthStorage } from "@earendil-works/pi-coding-agent";
2
2
  const OPENAI_CODEX_PROVIDER = "openai-codex";
3
3
  const OPENAI_CODEX_USAGE_URL = "https://chatgpt.com/backend-api/wham/usage";
4
4
  const OPENAI_JWT_CLAIM_PATH = "https://api.openai.com/auth";
@@ -343,9 +343,9 @@ export class FakeCliSessionSource {
343
343
  if (!level)
344
344
  return {
345
345
  action: "show_thinking_menu",
346
- items: ["off", "minimal", "low", "medium", "high", "xhigh"].map((value) => ({ id: value, label: value })),
346
+ items: ["off", "minimal", "low", "medium", "high", "xhigh", "max"].map((value) => ({ id: value, label: value })),
347
347
  };
348
- if (!["off", "minimal", "low", "medium", "high", "xhigh"].includes(level))
348
+ if (!["off", "minimal", "low", "medium", "high", "xhigh", "max"].includes(level))
349
349
  return {
350
350
  supported: false,
351
351
  unsupportedReason: `Unsupported thinking level ${level}.`,
package/dist/cli.js CHANGED
@@ -338,7 +338,7 @@ export async function runPiboCli(argv = process.argv) {
338
338
  .command("tui:routed")
339
339
  .helpOption("-h, --help", "Display help for command")
340
340
  .option("--show-thinking", "Show routed thinking deltas in the local TUI")
341
- .option("--thinking <level>", "Set routed thinking level: off, minimal, low, medium, high, xhigh", parsePiboThinkingLevel)
341
+ .option("--thinking <level>", "Set routed thinking level: off, minimal, low, medium, high, xhigh, max", parsePiboThinkingLevel)
342
342
  .argument("[profile]")
343
343
  .description("Start the local routed Pibo TUI")
344
344
  .action(async (profile, options) => {
@@ -2,8 +2,8 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
2
  import { readFile, writeFile } from "node:fs/promises";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { completeSimple } from "@mariozechner/pi-ai";
6
- import { buildSessionContext, convertToLlm, serializeConversation, } from "@mariozechner/pi-coding-agent";
5
+ import { completeSimple } from "@earendil-works/pi-ai/compat";
6
+ import { buildSessionContext, convertToLlm, serializeConversation, } from "@earendil-works/pi-coding-agent";
7
7
  const PROJECT_ROOT = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
8
8
  export const PIBO_LIBRARY_COMPACTION_PROMPT_PATH = resolve(PROJECT_ROOT, "context/pibo-compaction-prompt.md");
9
9
  function getCompactionPromptStatePath(cwd) {
@@ -244,7 +244,7 @@ async function readSkillMarkdown(path) {
244
244
  }
245
245
  }
246
246
  // Skills are advertised to the model via a small XML summary in the system
247
- // prompt (see formatSkillsForPrompt in @mariozechner/pi-coding-agent). Only the
247
+ // prompt (see formatSkillsForPrompt in @earendil-works/pi-coding-agent). Only the
248
248
  // name, description, and location land in the prompt; the full SKILL.md body
249
249
  // is loaded lazily by the model via the read tool. Mirror that exact
250
250
  // per-skill entry shape here so the inspector's token estimate matches what
@@ -1,4 +1,4 @@
1
- import { DEFAULT_COMPACTION_SETTINGS, buildSessionContext, estimateTokens, } from "@mariozechner/pi-coding-agent";
1
+ import { DEFAULT_COMPACTION_SETTINGS, buildSessionContext, estimateTokens, } from "@earendil-works/pi-coding-agent";
2
2
  export const PIBO_CONTEXT_GUARD_NOTICE = "Context safety interrupted this response before adding it to long-term context. Pibo is compacting the session before continuing.";
3
3
  const DEFAULT_MIN_COMPACTION_RESERVE_TOKENS = 1024;
4
4
  const FALLBACK_CONTEXT_WINDOW = 0;
@@ -1,4 +1,4 @@
1
- import { SessionManager, shouldCompact } from "@mariozechner/pi-coding-agent";
1
+ import { SessionManager, shouldCompact } from "@earendil-works/pi-coding-agent";
2
2
  import { getOpenAiCodexProviderUsageForActiveModel } from "../auth/openai-codex-usage.js";
3
3
  import { normalizeSessionErrorDetails, runtimeSessionErrorDetails } from "./session-errors.js";
4
4
  import { expandInlineSkills } from "./skill-expansion.js";
@@ -1,6 +1,6 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { isAbsolute, resolve } from "node:path";
3
- import { AuthStorage, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashToolDefinition, getAgentDir, InteractiveMode, SessionManager, } from "@mariozechner/pi-coding-agent";
3
+ import { AuthStorage, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashToolDefinition, getAgentDir, InteractiveMode, SessionManager, } from "@earendil-works/pi-coding-agent";
4
4
  import { DEFAULT_BUILTIN_TOOL_NAMES, InitialSessionContext, } from "./profiles.js";
5
5
  import { loadPiboModelDefaults, selectRequestedModelProfile, selectRequestedThinkingLevel } from "./model-defaults.js";
6
6
  import { createDefaultPiboProfile } from "../plugins/builtin.js";
@@ -1,4 +1,4 @@
1
- export const PIBO_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh"];
1
+ export const PIBO_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
2
2
  export function isPiboThinkingLevel(value) {
3
3
  return PIBO_THINKING_LEVELS.includes(value);
4
4
  }
@@ -1,5 +1,5 @@
1
- import { Type } from "@mariozechner/pi-ai";
2
- import { defineTool } from "@mariozechner/pi-coding-agent";
1
+ import { Type } from "@earendil-works/pi-ai";
2
+ import { defineTool } from "@earendil-works/pi-coding-agent";
3
3
  import { sendGatewayMessageAndWaitForReply } from "./request.js";
4
4
  export function createPiboGatewaySendTool(sendGatewayMessage = sendGatewayMessageAndWaitForReply) {
5
5
  return defineTool({
@@ -1,6 +1,7 @@
1
1
  import { createDefaultPiboPlugins } from "../plugins/builtin.js";
2
2
  import { createPiboBetterAuthPlugin } from "../plugins/better-auth.js";
3
3
  import { createPiboChatCustomAgentProfilesPlugin } from "../plugins/chat-custom-agents.js";
4
+ import { createPiboChatUserSkillsPlugin } from "../plugins/chat-user-skills.js";
4
5
  import { createPiboChatWebPlugin } from "../plugins/chat-web.js";
5
6
  import { createPiboChatVscodeWebPlugin } from "../plugins/chat-vscode-web.js";
6
7
  import { createPiboContextFilesPlugin } from "../plugins/context-files.js";
@@ -145,6 +146,10 @@ export function createWebPiboPluginRegistry(options = {}) {
145
146
  useDevAuth ? createPiboDevAuthPlugin() : createPiboBetterAuthPlugin(resolvedOptions.auth),
146
147
  createPiboWebHostPlugin({ announce: false, canonicalBaseURL: useDevAuth ? undefined : authBaseURL(resolvedOptions), gatewayMode: webGatewayMode(resolvedOptions, useDevAuth), ...resolvedOptions.web }),
147
148
  createPiboCronPlugin({ cronStorePath: resolvedOptions.chat?.cronStorePath, dataStorePath: resolvedOptions.chat?.dataStorePath, dataPayloadRootDir: resolvedOptions.chat?.dataPayloadRootDir }),
149
+ createPiboChatUserSkillsPlugin({
150
+ globalRoot: resolvedOptions.chat?.userSkillGlobalRoot,
151
+ workspaceRoot: resolvedOptions.chat?.userSkillWorkspaceRoot,
152
+ }),
148
153
  createPiboChatCustomAgentProfilesPlugin({ agentStorePath: resolvedOptions.chat?.agentStorePath }),
149
154
  createPiboRalphPlugin({ ralphStorePath: resolvedOptions.chat?.ralphStorePath, dataStorePath: resolvedOptions.chat?.dataStorePath, dataPayloadRootDir: resolvedOptions.chat?.dataPayloadRootDir }),
150
155
  createPiboContextFilesPlugin(resolvedOptions.contextFiles),
@@ -1,5 +1,5 @@
1
- import { AssistantMessageComponent, ToolExecutionComponent, UserMessageComponent, } from "@mariozechner/pi-coding-agent";
2
- import { Container, Spacer } from "@mariozechner/pi-tui";
1
+ import { AssistantMessageComponent, ToolExecutionComponent, UserMessageComponent, } from "@earendil-works/pi-coding-agent";
2
+ import { Container, Spacer } from "@earendil-works/pi-tui";
3
3
  import { parsePiboThinkingLevel } from "../core/thinking.js";
4
4
  const LOCAL_MESSAGE_TYPE = "pibo.local-routed";
5
5
  const STREAMING_WIDGET_KEY = "pibo.local.streaming";
@@ -2,7 +2,7 @@ import { execFile } from "node:child_process";
2
2
  import { existsSync, readFileSync, statSync } from "node:fs";
3
3
  import { basename, extname, resolve } from "node:path";
4
4
  import { promisify } from "node:util";
5
- import { DefaultPackageManager, getAgentDir, SettingsManager, } from "@mariozechner/pi-coding-agent";
5
+ import { DefaultPackageManager, getAgentDir, SettingsManager, } from "@earendil-works/pi-coding-agent";
6
6
  import { installOrResolvePiPackage } from "./installer.js";
7
7
  const execFileAsync = promisify(execFile);
8
8
  export async function inspectPiPackageSource(source, cwd = process.cwd()) {
@@ -0,0 +1,41 @@
1
+ import os from "node:os";
2
+ import { ScopedUserSkillManager } from "../user-skills/manager.js";
3
+ import { definePiboPlugin } from "./registry.js";
4
+ export function createPiboChatUserSkillsPlugin(options = {}) {
5
+ return definePiboPlugin({
6
+ id: "pibo.chat-user-skills",
7
+ name: "Pibo Chat User Skills",
8
+ register(api) {
9
+ const manager = new ScopedUserSkillManager({
10
+ globalRoot: options.globalRoot ?? os.homedir(),
11
+ workspaceRoot: options.workspaceRoot ?? process.cwd(),
12
+ });
13
+ const userSkills = [];
14
+ for (const [scope, scopedManager] of [["global", manager.global], ["workspace", manager.workspace]]) {
15
+ try {
16
+ userSkills.push(...scopedManager.list());
17
+ }
18
+ catch (error) {
19
+ console.warn(`[pibo] Skipping ${scope} startup user-skill registration: ${error instanceof Error ? error.message : String(error)}`);
20
+ }
21
+ }
22
+ const enabledSkillByName = new Map();
23
+ for (const skill of userSkills) {
24
+ if (!skill.enabled)
25
+ continue;
26
+ const existing = enabledSkillByName.get(skill.name);
27
+ if (!existing || skill.scope === "workspace")
28
+ enabledSkillByName.set(skill.name, skill);
29
+ }
30
+ for (const skill of enabledSkillByName.values()) {
31
+ try {
32
+ api.registerSkill({ name: skill.name, path: skill.path, enabled: true, kind: "user" });
33
+ }
34
+ catch (error) {
35
+ if (!(error instanceof Error) || error.message !== `Duplicate skill "${skill.name}"`)
36
+ throw error;
37
+ }
38
+ }
39
+ },
40
+ });
41
+ }
@@ -1,4 +1,4 @@
1
- import { getModels } from "@mariozechner/pi-ai";
1
+ import { getModels } from "@earendil-works/pi-ai/compat";
2
2
  import { OPENAI_COMPLETIONS_API, registerOpenAiCompatProvider, resetOpenAiCompatProviderRegistration, unregisterOpenAiCompatProvider, } from "./openai-compat.js";
3
3
  export const GLM_PROVIDER_ID = "glm";
4
4
  export const GLM_DEFAULT_BASE_URL = "https://api.z.ai/api/coding/paas/v4";
@@ -1,4 +1,4 @@
1
- import { getModels } from "@mariozechner/pi-ai";
1
+ import { getModels } from "@earendil-works/pi-ai/compat";
2
2
  import { OPENAI_COMPLETIONS_API, registerOpenAiCompatProvider, resetOpenAiCompatProviderRegistration, unregisterOpenAiCompatProvider, } from "./openai-compat.js";
3
3
  export const MINIMAX_PROVIDER_ID = "minimax";
4
4
  export const MINIMAX_CN_PROVIDER_ID = "minimax-cn";
@@ -1,5 +1,5 @@
1
- import { getModels } from "@mariozechner/pi-ai";
2
- import { getOAuthProvider } from "@mariozechner/pi-ai/oauth";
1
+ import { getModels } from "@earendil-works/pi-ai/compat";
2
+ import { getOAuthProvider } from "@earendil-works/pi-ai/oauth";
3
3
  export const OPENAI_PROVIDER_ID = "openai";
4
4
  export const OPENAI_RESPONSES_API = "openai-responses";
5
5
  export const OPENAI_BASE_URL = "https://api.openai.com/v1";
@@ -45,7 +45,7 @@ export function buildOpenAiGpt56Models(baseModels = getBuiltInOpenAiModels()) {
45
45
  api: OPENAI_RESPONSES_API,
46
46
  baseUrl: OPENAI_BASE_URL,
47
47
  contextWindow: OPENAI_GPT_56_CONTEXT_WINDOW,
48
- thinkingLevelMap: { off: null, xhigh: "xhigh" },
48
+ thinkingLevelMap: { off: null, xhigh: "xhigh", max: "max" },
49
49
  baseModels,
50
50
  modelCost: (model) => model.cost,
51
51
  });
@@ -56,7 +56,7 @@ export function buildOpenAiCodexGpt56Models(baseModels = getBuiltInOpenAiCodexMo
56
56
  api: OPENAI_CODEX_RESPONSES_API,
57
57
  baseUrl: OPENAI_CODEX_BASE_URL,
58
58
  contextWindow: OPENAI_CODEX_GPT_56_CONTEXT_WINDOW,
59
- thinkingLevelMap: { xhigh: "xhigh", minimal: "low" },
59
+ thinkingLevelMap: { xhigh: "xhigh", max: "max", minimal: "low" },
60
60
  baseModels,
61
61
  modelCost: (model) => ({ ...model.cost, cacheWrite: 0 }),
62
62
  });
package/dist/ralph/cli.js CHANGED
@@ -121,13 +121,13 @@ export async function runRalphCli(argv = process.argv) {
121
121
  else
122
122
  for (const job of jobs)
123
123
  console.log(formatRalphJobLine(job)); store.close(); });
124
- program.command('add').description('Create a Ralph job').option('--template <id>', 'Built-in job template id').option('--prompt <text>', 'Task prompt').option('--name <name>', 'Job name').option('--description <text>', 'Job description').option('--profile <profile>', 'Agent profile', DEFAULT_PIBO_PROFILE_NAME).option('--room <room-id>', 'Target room id').option('--default-chat', 'Target the shared default chat').option('--max-iterations <n>', 'Stop after n completed run attempts').option('--model <provider/model>', 'Runtime model override, for example openai/gpt-5').option('--thinking <level>', 'Runtime thinking level override: off, minimal, low, medium, high, xhigh').option('--fast', 'Enable runtime fast mode').option('--no-fast', 'Disable runtime fast mode')
124
+ program.command('add').description('Create a Ralph job').option('--template <id>', 'Built-in job template id').option('--prompt <text>', 'Task prompt').option('--name <name>', 'Job name').option('--description <text>', 'Job description').option('--profile <profile>', 'Agent profile', DEFAULT_PIBO_PROFILE_NAME).option('--room <room-id>', 'Target room id').option('--default-chat', 'Target the shared default chat').option('--max-iterations <n>', 'Stop after n completed run attempts').option('--model <provider/model>', 'Runtime model override, for example openai/gpt-5').option('--thinking <level>', 'Runtime thinking level override: off, minimal, low, medium, high, xhigh, max').option('--fast', 'Enable runtime fast mode').option('--no-fast', 'Disable runtime fast mode')
125
125
  .option('--start', 'Start immediately').option('--json', 'Print JSON').action((options) => { const base = templatePatch(options.template); const prompt = options.prompt ?? base.prompt; if (typeof prompt !== 'string' || !prompt.trim())
126
126
  throw new Error('Choose --template <id> or provide --prompt <text>'); const input = { name: options.name ?? base.name, description: options.description ?? base.description, enabled: options.start === true, target: targetFromOptions(options), profile: options.profile, prompt, maxIterations: options.maxIterations !== undefined ? maxIterations(options.maxIterations) : typeof base.maxIterations === 'number' ? base.maxIterations : undefined, stopPolicy: base.stopPolicy ?? undefined }; applyRuntimeCreateOptions(input, options); const store = createDefaultPiboRalphStore({ path: program.opts().store }); const job = store.createJob(input); if (options.json)
127
127
  printJson(job);
128
128
  else
129
129
  console.log(`${job.id}\t${job.enabled ? 'running' : 'stopped'}\t${job.name}`); store.close(); });
130
- program.command('edit').argument('<id>', 'Ralph job id').description('Update a Ralph job').option('--template <id>', 'Apply a built-in job template before explicit overrides').option('--prompt <text>', 'Task prompt').option('--name <name>', 'Job name').option('--description <text>', 'Job description').option('--profile <profile>', 'Agent profile').option('--room <room-id>', 'Target room id').option('--default-chat', 'Target the shared default chat').option('--max-iterations <n>', 'Stop after n completed run attempts').option('--model <provider/model>', 'Set runtime model override, for example openai/gpt-5').option('--clear-model', 'Clear runtime model override').option('--thinking <level>', 'Set runtime thinking level override: off, minimal, low, medium, high, xhigh').option('--clear-thinking', 'Clear runtime thinking level override').option('--fast', 'Enable runtime fast mode').option('--no-fast', 'Disable runtime fast mode').option('--clear-fast', 'Clear runtime fast mode override').option('--json', 'Print JSON').action((id, options) => { const store = createDefaultPiboRalphStore({ path: program.opts().store }); const patch = { ...templatePatch(options.template) }; if (options.name !== undefined)
130
+ program.command('edit').argument('<id>', 'Ralph job id').description('Update a Ralph job').option('--template <id>', 'Apply a built-in job template before explicit overrides').option('--prompt <text>', 'Task prompt').option('--name <name>', 'Job name').option('--description <text>', 'Job description').option('--profile <profile>', 'Agent profile').option('--room <room-id>', 'Target room id').option('--default-chat', 'Target the shared default chat').option('--max-iterations <n>', 'Stop after n completed run attempts').option('--model <provider/model>', 'Set runtime model override, for example openai/gpt-5').option('--clear-model', 'Clear runtime model override').option('--thinking <level>', 'Set runtime thinking level override: off, minimal, low, medium, high, xhigh, max').option('--clear-thinking', 'Clear runtime thinking level override').option('--fast', 'Enable runtime fast mode').option('--no-fast', 'Disable runtime fast mode').option('--clear-fast', 'Clear runtime fast mode override').option('--json', 'Print JSON').action((id, options) => { const store = createDefaultPiboRalphStore({ path: program.opts().store }); const patch = { ...templatePatch(options.template) }; if (options.name !== undefined)
131
131
  patch.name = options.name; if (options.description !== undefined)
132
132
  patch.description = options.description; if (options.profile !== undefined)
133
133
  patch.profile = options.profile; if (options.prompt !== undefined)
@@ -48,7 +48,7 @@ export class PiboRalphService {
48
48
  this.roomService = new ChatRoomService(this.dataStore);
49
49
  this.intervalMs = options.intervalMs ?? 5_000;
50
50
  this.maxConcurrentRuns = Math.max(1, options.maxConcurrentRuns ?? 2);
51
- this.runTimeoutMs = options.runTimeoutMs ?? 30 * 60_000;
51
+ this.runTimeoutMs = options.runTimeoutMs;
52
52
  }
53
53
  start() { if (!this.stopped)
54
54
  return; this.stopped = false; this.store.recoverInterruptedRuns(); this.unsubscribeProductEvents = this.options.context.subscribeProductEvents?.((event) => this.handleProductEvent(event)); this.arm(250); }
@@ -256,18 +256,23 @@ export class PiboRalphService {
256
256
  } const room = this.roomService.ensureDefaultRoom({ name: 'Shared Chat' }); return { roomId: room.id, workspace: room.workspace ?? getDefaultPiboWorkspace() }; }
257
257
  async emitMessageAndWait(piboSessionId, text, options = {}) {
258
258
  const eventId = `ralph_msg_${randomUUID()}`;
259
- return await new Promise((resolve, reject) => { let settled = false; let deltaAnswer = ''; let finalAnswer = ''; let lastSessionError; let unsubscribe; const timeout = setTimeout(() => finish(new Error(lastSessionError ? `Ralph run timed out after session error: ${lastSessionError}` : 'Ralph run timed out')), this.runTimeoutMs); const finish = (error) => { if (settled)
260
- return; settled = true; clearTimeout(timeout); unsubscribe?.(); if (error)
259
+ return await new Promise((resolve, reject) => { let settled = false; let deltaAnswer = ''; let finalAnswer = ''; let lastSessionError; let unsubscribe; let timeout; const finish = (error) => { if (settled)
260
+ return; settled = true; if (timeout)
261
+ clearTimeout(timeout); unsubscribe?.(); if (error)
261
262
  reject(error);
262
263
  else
263
- resolve(finalAnswer || deltaAnswer); }; unsubscribe = this.options.context.subscribe((event) => { if (event.piboSessionId !== piboSessionId)
264
+ resolve(finalAnswer || deltaAnswer); }; if (this.runTimeoutMs !== undefined)
265
+ timeout = setTimeout(() => finish(new Error(lastSessionError ? `Ralph run timed out after session error: ${lastSessionError}` : 'Ralph run timed out')), this.runTimeoutMs); unsubscribe = this.options.context.subscribe((event) => { if (event.piboSessionId !== piboSessionId)
264
266
  return; if ('eventId' in event && event.eventId !== eventId)
265
267
  return; if (event.type === 'assistant_delta')
266
- deltaAnswer += event.text; if (event.type === 'assistant_message')
267
- finalAnswer = event.text; if (event.type === 'message_finished')
268
- finish(); if (event.type === 'session_error') {
268
+ deltaAnswer += event.text; if (event.type === 'assistant_message') {
269
+ finalAnswer = event.text;
270
+ lastSessionError = undefined;
271
+ } if (event.type === 'message_finished')
272
+ finish(lastSessionError ? new Error(lastSessionError) : undefined); if (event.type === 'session_error') {
269
273
  lastSessionError = event.error;
270
- if (options.isCancelled?.())
274
+ const providerAttempt = event.errorDetails?.origin === 'provider' && Boolean(event.errorDetails.api || event.errorDetails.provider || event.errorDetails.model);
275
+ if (!providerAttempt || options.isCancelled?.())
271
276
  finish(new Error(event.error));
272
277
  } }); this.options.context.emit({ type: 'message', piboSessionId, id: eventId, source: 'service', text }).catch((error) => finish(error instanceof Error ? error : new Error(String(error)))); });
273
278
  }
@@ -111,7 +111,7 @@ function normalizeThinkingLevel(value) {
111
111
  if (value === undefined || value === null)
112
112
  return undefined;
113
113
  if (!isPiboThinkingLevel(value))
114
- throw new Error('thinkingLevel must be one of off, minimal, low, medium, high, xhigh');
114
+ throw new Error('thinkingLevel must be one of off, minimal, low, medium, high, xhigh, max');
115
115
  return value;
116
116
  }
117
117
  function normalizeFastMode(value) {
@@ -1,5 +1,5 @@
1
- import { StringEnum, Type } from "@mariozechner/pi-ai";
2
- import { defineTool } from "@mariozechner/pi-coding-agent";
1
+ import { StringEnum, Type } from "@earendil-works/pi-ai";
2
+ import { defineTool } from "@earendil-works/pi-coding-agent";
3
3
  function resultText(prefix, value) {
4
4
  return `${prefix}\n${JSON.stringify(value, null, 2)}`;
5
5
  }
@@ -18,7 +18,7 @@ export const WEB_PARITY_SLASH_COMMANDS = [
18
18
  { id: "kill", slash: "/kill", actionName: "kill", description: "Dispose the active session runtime.", group: "runtime", support: "terminal-adapted" },
19
19
  { id: "kill-all", slash: "/kill-all", actionName: "kill-all", description: "Dispose all routed runtimes for the selected app context when supported.", group: "runtime", support: "terminal-adapted" },
20
20
  { id: "fast", slash: "/fast", actionName: "fast_mode", description: "Toggle fast mode for the active session.", argumentHint: "[on|off]", group: "runtime", support: "terminal-adapted" },
21
- { id: "thinking", slash: "/thinking", actionName: "thinking", description: "Show or set model thinking level.", argumentHint: "[off|minimal|low|medium|high|xhigh]", group: "runtime", support: "terminal-adapted", terminalAdaptation: "Without an argument, open a keyboard picker." },
21
+ { id: "thinking", slash: "/thinking", actionName: "thinking", description: "Show or set model thinking level.", argumentHint: "[off|minimal|low|medium|high|xhigh|max]", group: "runtime", support: "terminal-adapted", terminalAdaptation: "Without an argument, open a keyboard picker." },
22
22
  { id: "model", slash: "/model", actionName: "model", description: "Choose an authenticated provider model.", group: "runtime", support: "terminal-adapted", terminalAdaptation: "Open provider and model pickers." },
23
23
  { id: "login", slash: "/login", actionName: "login", description: "Authenticate a model provider.", group: "runtime", support: "terminal-adapted", terminalAdaptation: "Show provider/auth-method instructions in terminal." },
24
24
  { id: "session-current", slash: "/session-current", actionName: "session-current", description: "Show metadata for the active session.", group: "session", support: "terminal-adapted" },
@@ -1,6 +1,6 @@
1
1
  import { createHash } from "node:crypto";
2
- import { Type } from "@mariozechner/pi-ai";
3
- import { defineTool } from "@mariozechner/pi-coding-agent";
2
+ import { Type } from "@earendil-works/pi-ai";
3
+ import { defineTool } from "@earendil-works/pi-coding-agent";
4
4
  function hashPart(value) {
5
5
  return createHash("sha256").update(value).digest("hex").slice(0, 12);
6
6
  }
@@ -1,8 +1,8 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { extname, isAbsolute, resolve } from "node:path";
4
- import { StringEnum, Type } from "@mariozechner/pi-ai";
5
- import { defineTool } from "@mariozechner/pi-coding-agent";
4
+ import { StringEnum, Type } from "@earendil-works/pi-ai";
5
+ import { defineTool } from "@earendil-works/pi-coding-agent";
6
6
  function resolveCwd(baseCwd, workdir) {
7
7
  if (!workdir || workdir.trim().length === 0)
8
8
  return baseCwd;
@@ -1,9 +1,9 @@
1
1
  import { mkdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { platform, release, arch } from "node:os";
3
3
  import { dirname, extname, isAbsolute, join, resolve } from "node:path";
4
- import { AuthStorage } from "@mariozechner/pi-coding-agent";
5
- import { Type } from "@mariozechner/pi-ai";
6
- import { defineTool } from "@mariozechner/pi-coding-agent";
4
+ import { AuthStorage } from "@earendil-works/pi-coding-agent";
5
+ import { Type } from "@earendil-works/pi-ai";
6
+ import { defineTool } from "@earendil-works/pi-coding-agent";
7
7
  import { getPiboHome } from "../core/pibo-home.js";
8
8
  const OPENAI_CODEX_PROVIDER = "openai-codex";
9
9
  const DEFAULT_CODEX_BACKEND_BASE_URL = "https://chatgpt.com/backend-api";
@@ -78,7 +78,7 @@ pibo ralph edit <job-id> --model openai/gpt-5 --thinking medium --no-fast --json
78
78
  pibo ralph edit <job-id> --clear-model --clear-thinking --clear-fast --json
79
79
  \`\`\`
80
80
 
81
- Use \`--model <provider/model>\`, \`--thinking off|minimal|low|medium|high|xhigh\`, and \`--fast\`/\`--no-fast\` to set runtime options. Use the \`--clear-*\` flags on \`edit\` to return to profile/default runtime behavior.
81
+ Use \`--model <provider/model>\`, \`--thinking off|minimal|low|medium|high|xhigh|max\`, and \`--fast\`/\`--no-fast\` to set runtime options. Use the \`--clear-*\` flags on \`edit\` to return to profile/default runtime behavior.
82
82
 
83
83
  ## Inspect and Debug
84
84
 
@@ -1,5 +1,5 @@
1
- import { StringEnum, Type } from "@mariozechner/pi-ai";
2
- import { defineTool } from "@mariozechner/pi-coding-agent";
1
+ import { StringEnum, Type } from "@earendil-works/pi-ai";
2
+ import { defineTool } from "@earendil-works/pi-coding-agent";
3
3
  export function createRuntimeToolProfile() {
4
4
  return {
5
5
  name: "runtime",
@@ -1,5 +1,5 @@
1
- import { StringEnum, Type } from "@mariozechner/pi-ai";
2
- import { defineTool } from "@mariozechner/pi-coding-agent";
1
+ import { StringEnum, Type } from "@earendil-works/pi-ai";
2
+ import { defineTool } from "@earendil-works/pi-coding-agent";
3
3
  import { WEB_ANNOTATION_STATUSES, } from "./types.js";
4
4
  import { createDefaultWebAnnotationStore } from "./store.js";
5
5
  import { assertWebAnnotationStatusTransition, sanitizeWebAnnotationText, WEB_ANNOTATION_LIMITS } from "./validation.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pasko70/pibo",
3
- "version": "1.7.9",
3
+ "version": "1.7.11",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "vscode": "./src/apps/chat-vscode/extension/src/vscode-shim.js"
@@ -52,8 +52,10 @@
52
52
  "prepack": "npm run build"
53
53
  },
54
54
  "dependencies": {
55
- "@mariozechner/pi-ai": "^0.73.1",
56
- "@mariozechner/pi-coding-agent": "^0.73.1",
55
+ "@earendil-works/pi-agent-core": "^0.80.6",
56
+ "@earendil-works/pi-ai": "^0.80.6",
57
+ "@earendil-works/pi-coding-agent": "^0.80.6",
58
+ "@earendil-works/pi-tui": "^0.80.6",
57
59
  "@mdxeditor/editor": "^3.55.0",
58
60
  "@modelcontextprotocol/sdk": "^1.29.0",
59
61
  "@tailwindcss/vite": "^4.2.4",
@@ -90,7 +90,7 @@ import {
90
90
  DefaultResourceLoader,
91
91
  SessionManager,
92
92
  SettingsManager,
93
- } from "@mariozechner/pi-coding-agent";
93
+ } from "@earendil-works/pi-coding-agent";
94
94
 
95
95
  const sessionManager = SessionManager.open(sessionFile, sessionDir, workspaceDir);
96
96
  const settingsManager = SettingsManager.create(workspaceDir, agentDir);