agent-qa 0.2.5 → 0.2.6

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/cli-main.cjs CHANGED
@@ -37,6 +37,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
37
  value: mod,
38
38
  enumerable: true
39
39
  }) : target, mod));
40
+ let _vostride_agent_qa_agent_local = require("@vostride/agent-qa-agent-local");
40
41
  let _vostride_agent_qa_core_run_text_output = require("@vostride/agent-qa-core/run-text-output");
41
42
  let commander = require("commander");
42
43
  let _vostride_agent_qa_core = require("@vostride/agent-qa-core");
@@ -46,7 +47,6 @@ let yaml = require("yaml");
46
47
  let picocolors = require("picocolors");
47
48
  picocolors = __toESM(picocolors, 1);
48
49
  let _vostride_agent_qa_model = require("@vostride/agent-qa-model");
49
- let _vostride_agent_qa_agent_local = require("@vostride/agent-qa-agent-local");
50
50
  let ai = require("ai");
51
51
  let zod = require("zod");
52
52
  let _vostride_agent_qa_schema = require("@vostride/agent-qa-schema");
@@ -1812,7 +1812,7 @@ function buildCuratorAuthor(deps) {
1812
1812
  maxRetries: 0,
1813
1813
  temperature: 0,
1814
1814
  maxOutputTokens: ceilings.maxOutput,
1815
- system: systemMessage.content,
1815
+ instructions: systemMessage.content,
1816
1816
  messages: turnMessages,
1817
1817
  ...deps.signal === void 0 ? {} : { abortSignal: deps.signal }
1818
1818
  });
@@ -1875,7 +1875,7 @@ function buildCuratorAuthor(deps) {
1875
1875
  maxRetries: 0,
1876
1876
  temperature: 0,
1877
1877
  maxOutputTokens: prompt.maxOutputTokens,
1878
- system: systemMessage.content,
1878
+ instructions: systemMessage.content,
1879
1879
  messages: turnMessages,
1880
1880
  ...deps.signal === void 0 ? {} : { abortSignal: deps.signal }
1881
1881
  });
@@ -1949,13 +1949,13 @@ var init_curator_author = __esmMin((() => {
1949
1949
  message: zod.z.string()
1950
1950
  }).strict()
1951
1951
  ]);
1952
- wireBundleSchema = zod.z.object({
1952
+ wireBundleSchema = zod.z.looseObject({
1953
1953
  kind: bundleKindSchema,
1954
1954
  subtype: factSubtypeSchema.optional(),
1955
1955
  anchors: zod.z.array(anchorSchema).min(1),
1956
1956
  summary: zod.z.string(),
1957
1957
  body: zod.z.string()
1958
- }).passthrough().superRefine((bundle, context) => {
1958
+ }).superRefine((bundle, context) => {
1959
1959
  if (bundle.kind === "fact" && bundle.subtype === void 0) context.addIssue({
1960
1960
  code: "custom",
1961
1961
  path: ["subtype"],
@@ -1968,44 +1968,44 @@ var init_curator_author = __esmMin((() => {
1968
1968
  });
1969
1969
  });
1970
1970
  wireDeltaSchema = zod.z.discriminatedUnion("kind", [
1971
- zod.z.object({
1971
+ zod.z.looseObject({
1972
1972
  kind: zod.z.literal("Add"),
1973
1973
  citedAliases: citedAliasesSchema,
1974
1974
  bundle: wireBundleSchema
1975
- }).passthrough(),
1976
- zod.z.object({
1975
+ }),
1976
+ zod.z.looseObject({
1977
1977
  kind: zod.z.literal("Confirm"),
1978
1978
  citedAliases: citedAliasesSchema,
1979
1979
  targetAlias: aliasSchema
1980
- }).passthrough(),
1981
- zod.z.object({
1980
+ }),
1981
+ zod.z.looseObject({
1982
1982
  kind: zod.z.literal("Supersede"),
1983
1983
  citedAliases: citedAliasesSchema,
1984
1984
  victimAlias: aliasSchema,
1985
1985
  newBundle: wireBundleSchema
1986
- }).passthrough(),
1987
- zod.z.object({
1986
+ }),
1987
+ zod.z.looseObject({
1988
1988
  kind: zod.z.literal("Deprecate"),
1989
1989
  citedAliases: citedAliasesSchema,
1990
1990
  targetAlias: aliasSchema,
1991
1991
  reason: zod.z.string().min(1)
1992
- }).passthrough(),
1993
- zod.z.object({
1992
+ }),
1993
+ zod.z.looseObject({
1994
1994
  kind: zod.z.literal("MintUnknown"),
1995
1995
  citedAliases: citedAliasesSchema,
1996
- conflict: zod.z.object({
1996
+ conflict: zod.z.looseObject({
1997
1997
  aliases: zod.z.array(aliasSchema).min(1),
1998
1998
  kind: zod.z.enum([
1999
1999
  "contradiction",
2000
2000
  "drift",
2001
2001
  "clarification"
2002
2002
  ])
2003
- }).passthrough()
2004
- }).passthrough(),
2005
- zod.z.object({
2003
+ })
2004
+ }),
2005
+ zod.z.looseObject({
2006
2006
  kind: zod.z.literal("Noop"),
2007
2007
  citedAliases: citedAliasesSchema
2008
- }).passthrough()
2008
+ })
2009
2009
  ]);
2010
2010
  DELTA_KINDS = /* @__PURE__ */ new Set([
2011
2011
  "Add",
@@ -2021,22 +2021,22 @@ var init_curator_author = __esmMin((() => {
2021
2021
  "boolean",
2022
2022
  "secret"
2023
2023
  ]);
2024
- extractionParameterSchema = zod.z.object({
2024
+ extractionParameterSchema = zod.z.looseObject({
2025
2025
  name: zod.z.string().min(1),
2026
2026
  type: procedureParamTypeSchema,
2027
2027
  required: zod.z.boolean(),
2028
- appliesTo: zod.z.array(zod.z.object({
2028
+ appliesTo: zod.z.array(zod.z.looseObject({
2029
2029
  stepOrdinal: zod.z.number().int().nonnegative(),
2030
2030
  field: zod.z.string().min(1)
2031
- }).passthrough()).min(1)
2032
- }).passthrough();
2033
- extractionCandidateSchema = zod.z.object({
2031
+ })).min(1)
2032
+ });
2033
+ extractionCandidateSchema = zod.z.looseObject({
2034
2034
  flowName: zod.z.string().min(1),
2035
2035
  stepSpan: zod.z.tuple([zod.z.number().int().nonnegative(), zod.z.number().int().nonnegative()]),
2036
2036
  parameters: zod.z.array(extractionParameterSchema),
2037
2037
  successAssertion: zod.z.string()
2038
- }).passthrough();
2039
- extractionProposalSchema = zod.z.object({ candidates: zod.z.array(extractionCandidateSchema).min(1) }).passthrough();
2038
+ });
2039
+ extractionProposalSchema = zod.z.looseObject({ candidates: zod.z.array(extractionCandidateSchema).min(1) });
2040
2040
  }));
2041
2041
  // src/daemon/server.ts
2042
2042
  function currentInvokeAgentProduct() {
@@ -2046,7 +2046,7 @@ function projectHash(projectRoot) {
2046
2046
  return (0, node_crypto.createHash)("sha256").update((0, node_path.resolve)(projectRoot)).digest("hex").slice(0, 12);
2047
2047
  }
2048
2048
  function instanceDiscriminator(instanceId) {
2049
- const validated = zod.z.string().uuid().parse(instanceId);
2049
+ const validated = zod.z.uuid().parse(instanceId);
2050
2050
  return (0, node_crypto.createHash)("sha256").update(validated).digest("hex").slice(0, 12);
2051
2051
  }
2052
2052
  /**
@@ -2473,10 +2473,10 @@ var init_server = __esmMin((() => {
2473
2473
  kind: zod.z.literal("candidates-enqueued"),
2474
2474
  requireReceipt: zod.z.boolean().default(false)
2475
2475
  }).strict();
2476
- nudgeResponseSchema = zod.z.object({ sessionId: zod.z.string().uuid() }).strict();
2476
+ nudgeResponseSchema = zod.z.object({ sessionId: zod.z.uuid() }).strict();
2477
2477
  daemonIdentitySchema = zod.z.object({
2478
2478
  schemaVersion: zod.z.literal(2),
2479
- instanceId: zod.z.string().uuid(),
2479
+ instanceId: zod.z.uuid(),
2480
2480
  pid: zod.z.number().int().positive()
2481
2481
  }).strict();
2482
2482
  DAEMON_FUNCTION_CALLER = Object.freeze({
@@ -2710,7 +2710,7 @@ var init_registration = __esmMin((() => {
2710
2710
  DAEMON_IDENTITY_HANDSHAKE_TIMEOUT_MS = 1e3;
2711
2711
  daemonRegistrationSchema = zod.z.object({
2712
2712
  schemaVersion: zod.z.literal(2),
2713
- instanceId: zod.z.string().uuid(),
2713
+ instanceId: zod.z.uuid(),
2714
2714
  pid: zod.z.number().int().positive(),
2715
2715
  socketPath: zod.z.string().min(1),
2716
2716
  startedAtMs: zod.z.number().int().nonnegative()
@@ -6976,9 +6976,10 @@ function buildJobModelCapability(profile, auth, mask, deps = {}) {
6976
6976
  content: [{
6977
6977
  type: "text",
6978
6978
  text: request.prompt
6979
- }, ...request.images.map((image) => ({
6980
- type: "image",
6981
- image
6979
+ }, ...request.images.map((data) => ({
6980
+ type: "file",
6981
+ mediaType: "image",
6982
+ data
6982
6983
  }))]
6983
6984
  }]
6984
6985
  })).text };
@@ -8206,11 +8207,11 @@ function loadLocalBindings(dir) {
8206
8207
  }
8207
8208
  var LocalAppBindingSchema, LocalDeviceBindingsSchema;
8208
8209
  var init_devices = __esmMin((() => {
8209
- LocalAppBindingSchema = zod.z.object({ path: zod.z.string().optional() }).strict();
8210
- LocalDeviceBindingsSchema = zod.z.object({
8210
+ LocalAppBindingSchema = zod.z.strictObject({ path: zod.z.string().optional() });
8211
+ LocalDeviceBindingsSchema = zod.z.strictObject({
8211
8212
  devices: zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.unknown())).optional(),
8212
8213
  apps: zod.z.record(zod.z.string(), LocalAppBindingSchema).optional()
8213
- }).strict();
8214
+ });
8214
8215
  }));
8215
8216
  // src/run-planner-limits.ts
8216
8217
  function previousStepCountOf(useBlock) {
@@ -10361,7 +10362,7 @@ function createCliCapabilityCatalogPort(options) {
10361
10362
  try {
10362
10363
  text = (await (0, ai.generateText)({
10363
10364
  model,
10364
- system: CITATION_SYSTEM_PROMPT,
10365
+ instructions: CITATION_SYSTEM_PROMPT,
10365
10366
  prompt: `Capability catalog:\n${groundingLinesOf(rows)}\n\nQuestion: ${query}`
10366
10367
  })).text;
10367
10368
  } catch {
@@ -11270,7 +11271,7 @@ function mcpMountPlanFor(config) {
11270
11271
  const blockDeclared = typeof declared === "object" && declared !== null;
11271
11272
  const block = blockDeclared ? declared : {};
11272
11273
  const enabled = block.enabled !== false;
11273
- const port = typeof block.port === "number" && Number.isInteger(block.port) && block.port >= 1 && block.port <= 65535 ? block.port : MCP_HTTP_DEFAULT_PORT;
11274
+ const port = typeof block.port === "number" && Number.isInteger(block.port) && block.port >= 0 && block.port <= 65535 ? block.port : MCP_HTTP_DEFAULT_PORT;
11274
11275
  return {
11275
11276
  mount: blockDeclared && enabled,
11276
11277
  port
@@ -17780,7 +17781,7 @@ function registerKnowledgeReadCommands(command) {
17780
17781
  const DRAIN_SESSION_RECEIPTS_FILE = "drain-session-receipts.jsonl";
17781
17782
  const drainSessionReceiptSchema = zod.z.object({
17782
17783
  ts: zod.z.string().min(1),
17783
- sessionId: zod.z.string().uuid(),
17784
+ sessionId: zod.z.uuid(),
17784
17785
  holderPid: zod.z.number().int().positive(),
17785
17786
  epoch: zod.z.number().int().nonnegative(),
17786
17787
  candidateIds: zod.z.array(zod.z.string()).refine((ids) => ids.every((id, index) => index === 0 || ids[index - 1] <= id), "candidateIds must be sorted"),
@@ -21246,10 +21247,10 @@ function createEntitiesCommand() {
21246
21247
  /** Eval stdout is a data channel. The SDK's default logger emits a one-time stdout tip. */
21247
21248
  function installEvalWarningLogger() {
21248
21249
  const previous = globalThis.AI_SDK_LOG_WARNINGS;
21249
- if (previous === false || typeof previous === "function") return () => {};
21250
- const logger = ({ warnings, provider, model }) => {
21251
- for (const warning of warnings) (0, _vostride_agent_qa_core_run_text_output.printRunText)(`AI SDK Warning (${provider} / ${model}): ${JSON.stringify(warning)}`, (text) => process.stderr.write(`${text}\n`));
21252
- };
21250
+ if (previous === false || typeof previous === "function" && !(0, _vostride_agent_qa_agent_local.isSdkWarningLogger)(previous)) return () => {};
21251
+ const logger = (0, _vostride_agent_qa_agent_local.createSdkWarningLogger)((line) => {
21252
+ (0, _vostride_agent_qa_core_run_text_output.printRunText)(line, (text) => process.stderr.write(`${text}\n`));
21253
+ });
21253
21254
  globalThis.AI_SDK_LOG_WARNINGS = logger;
21254
21255
  return () => {
21255
21256
  if (globalThis.AI_SDK_LOG_WARNINGS === logger) globalThis.AI_SDK_LOG_WARNINGS = previous;
@@ -23369,6 +23370,7 @@ function createAgentQaProgram() {
23369
23370
  program.option("--config <path>", "config file path", "agent-qa.config.yaml").option("--log-level <level>", "log verbosity: silent|error|warn|info|debug").option("--verbose", "shorthand for --log-level debug").option("--quiet", "shorthand for --log-level silent");
23370
23371
  program.hook("preAction", (_program, action) => {
23371
23372
  if (action.opts().json === true) (0, _vostride_agent_qa_core_run_text_output.reserveStdoutForData)();
23373
+ (0, _vostride_agent_qa_agent_local.installSdkWarningLogger)();
23372
23374
  });
23373
23375
  program.addCommand(createRunCommand());
23374
23376
  program.addCommand(createRunsCommand());