@productlobster/plob 0.1.6 → 0.1.8

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/index.d.ts CHANGED
@@ -33,6 +33,7 @@ declare const EXIT_CODES: {
33
33
  readonly versionRevoked: 17;
34
34
  readonly serviceUnavailable: 18;
35
35
  readonly allotmentExhausted: 19;
36
+ readonly notAvailable: 20;
36
37
  readonly network: 70;
37
38
  };
38
39
  type CliExitCode = (typeof EXIT_CODES)[keyof typeof EXIT_CODES];
@@ -86,13 +87,31 @@ interface CommandRunnerDeps {
86
87
  mcpClientFactory: McpClientFactory;
87
88
  openUrl: (url: string) => Promise<void> | void;
88
89
  }
90
+ /**
91
+ * One more tool call on the command's open connection, with the first call's
92
+ * parsing and failure handling: the success envelope is unwrapped and parsed
93
+ * with `outputSchema`, and a failed call throws a {@link CliOperationalError}
94
+ * carrying the mapped code (`not_available` when the server does not offer the
95
+ * tool), which the runner renders like a failed first call.
96
+ */
97
+ type FollowUpToolCall = <TResponse>(toolName: string, toolArguments: Record<string, unknown>, outputSchema: {
98
+ parse(input: unknown): TResponse;
99
+ }) => Promise<TResponse>;
89
100
  interface CommandPostProcessContext {
90
101
  bearerToken: string;
102
+ /** A follow-up call on the same connection (PRO-4141, `analysis-pull`). */
103
+ callTool: FollowUpToolCall;
91
104
  endpoint: string;
92
105
  globalOptions: RunnerGlobalOptions;
93
106
  io: CliIO;
94
107
  }
95
108
  interface CommandSpec<TParsedResponse, TRenderedResponse = TParsedResponse> {
109
+ /**
110
+ * Render with `renderHuman` even when stdout is piped, and failures as human
111
+ * text on stderr (`analysis-pull --body-only`, whose stdout is the Markdown
112
+ * itself or nothing). `--json` still wins.
113
+ */
114
+ humanWhenPiped?: boolean;
96
115
  outputSchema?: {
97
116
  parse(input: unknown): TParsedResponse;
98
117
  };