@wirecat/cli-core 0.424.0 → 0.425.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/cli/author.d.ts +5 -6
  3. package/dist/cli/author.js +9 -16
  4. package/dist/cli/config-issues.d.ts +20 -2
  5. package/dist/cli/config-issues.js +111 -17
  6. package/dist/cli/context.d.ts +2 -0
  7. package/dist/cli/context.js +17 -6
  8. package/dist/cli/dry-run-guard.d.ts +2 -0
  9. package/dist/cli/dry-run-guard.js +68 -0
  10. package/dist/cli/entry.js +14 -9
  11. package/dist/cli/index.d.ts +3 -3
  12. package/dist/cli/index.js +3 -2
  13. package/dist/cli/list-query.d.ts +2 -0
  14. package/dist/cli/list-query.js +5 -2
  15. package/dist/cli/messenger/store-maintenance-command.js +15 -5
  16. package/dist/cli/preview.d.ts +44 -5
  17. package/dist/cli/preview.js +26 -8
  18. package/dist/cli/program.js +30 -18
  19. package/dist/cli/runs/search.js +2 -0
  20. package/dist/cli/settings.js +13 -12
  21. package/dist/cli/shared-command-exports.js +3 -1
  22. package/dist/entities/index.d.ts +148 -0
  23. package/dist/entities/recorded-run.d.ts +84 -0
  24. package/dist/entities/recorded-run.js +15 -0
  25. package/dist/entities/store-maintenance.d.ts +64 -0
  26. package/dist/entities/store-maintenance.js +24 -1
  27. package/dist/mcp/agent.js +3 -4
  28. package/dist/mcp/bot/server.js +1 -1
  29. package/dist/mcp/meeting-preparation.js +2 -2
  30. package/dist/mcp/meeting-project-candidates.js +2 -2
  31. package/dist/mcp/meeting-series-inventory.js +2 -2
  32. package/dist/mcp/server.js +1 -1
  33. package/dist/mcp/surface.d.ts +3 -1
  34. package/dist/mcp/surface.js +20 -9
  35. package/dist/mcp/text.d.ts +1 -1
  36. package/dist/mcp/text.js +1 -1
  37. package/dist/mcp/tool.d.ts +1 -1
  38. package/dist/mcp/tool.js +3 -1
  39. package/dist/meetings/mcp/agent-text.d.ts +2 -0
  40. package/dist/meetings/mcp/agent-text.js +2 -0
  41. package/dist/meetings/mcp/index.d.ts +1 -1
  42. package/dist/meetings/mcp/index.js +3 -3
  43. package/dist/meetings/mcp/passage.js +2 -2
  44. package/dist/meetings/mcp/project-evidence.js +2 -2
  45. package/dist/meetings/mcp/search.js +2 -2
  46. package/dist/runs/error-detail.d.ts +42 -0
  47. package/dist/runs/error-detail.js +131 -0
  48. package/dist/runs/events.d.ts +4 -0
  49. package/dist/runs/events.js +2 -0
  50. package/dist/runs/log-attributes.js +2 -0
  51. package/dist/runs/recording.d.ts +5 -2
  52. package/dist/runs/recording.js +20 -19
  53. package/dist/runs/run-context.d.ts +37 -0
  54. package/dist/runs/run-context.js +148 -0
  55. package/dist/runs/run.d.ts +19 -3
  56. package/dist/runs/run.js +1 -0
  57. package/dist/store/exports.d.ts +2 -0
  58. package/dist/store/exports.js +2 -0
  59. package/dist/store/sqlite/store-contents.d.ts +47 -0
  60. package/dist/store/sqlite/store-contents.js +104 -0
  61. package/package.json +1 -1
@@ -3,13 +3,51 @@ import { type PermissionKey } from "../sends/permissions.js";
3
3
  import type { Settings } from "./settings.js";
4
4
  export declare class PreviewComplete extends Error {
5
5
  }
6
- export declare const preview: (command: Command, settings: Pick<Settings, "permissions" | "permissionSources" | "configPath" | "savedPermissions" | "profile">, tool: string, keyOf?: (path: readonly string[]) => PermissionKey | null | undefined) => {
6
+ export declare const preview: (command: Command, settings: Pick<Settings, "permissions" | "permissionSources" | "configPath" | "savedPermissions" | "profile">, tool: string, keyOf?: (path: readonly string[]) => PermissionKey | null | undefined, messenger?: boolean) => {
7
7
  preview: boolean;
8
8
  path: string[];
9
- permission: {
10
- key: string | null;
11
- level: "allow" | "ask" | "readonly";
9
+ permission?: {
10
+ key: PermissionKey | null;
11
+ level: string;
12
+ } | undefined;
13
+ validation: {
14
+ arguments: string;
15
+ permissions: string;
16
+ targets: string;
17
+ businessRules: string;
18
+ };
19
+ effects: {
20
+ actionInvoked: boolean;
21
+ writeReserved: boolean;
22
+ messengerContacted?: boolean | undefined;
23
+ serviceContacted: boolean;
24
+ configurationRead: boolean;
12
25
  };
26
+ arguments: ({
27
+ name: string;
28
+ reference: string;
29
+ } | {
30
+ name: string;
31
+ supplied: boolean;
32
+ bytes: number | undefined;
33
+ })[];
34
+ options: string[];
35
+ trust: string;
36
+ };
37
+ /**
38
+ * `messenger_contacted` stays for the messengers, whose callers may read it; `service_contacted` says the same
39
+ * for every tool. Without `permission` nothing was checked: a host that is not `run` has no settings to check.
40
+ */
41
+ export declare const previewBody: (command: Command, permission: {
42
+ key: PermissionKey | null;
43
+ level: string;
44
+ } | undefined, messenger: boolean) => {
45
+ preview: boolean;
46
+ path: string[];
47
+ permission?: {
48
+ key: PermissionKey | null;
49
+ level: string;
50
+ } | undefined;
13
51
  validation: {
14
52
  arguments: string;
15
53
  permissions: string;
@@ -19,7 +57,8 @@ export declare const preview: (command: Command, settings: Pick<Settings, "permi
19
57
  effects: {
20
58
  actionInvoked: boolean;
21
59
  writeReserved: boolean;
22
- messengerContacted: boolean;
60
+ messengerContacted?: boolean | undefined;
61
+ serviceContacted: boolean;
23
62
  configurationRead: boolean;
24
63
  };
25
64
  arguments: ({
@@ -6,11 +6,11 @@ import { commandPathOf } from "./command-contract.js";
6
6
  import { refuseUnknownPermissionKeys } from "./permission-keys.js";
7
7
  export class PreviewComplete extends Error {
8
8
  }
9
- export const preview = (command, settings, tool, keyOf) => {
9
+ export const preview = (command, settings, tool, keyOf, messenger = true) => {
10
10
  const path = commandPathOf(command);
11
11
  const { permissions } = settings;
12
12
  refuseUnknownPermissionKeys(command, settings, tool, keyOf && ((one) => keyOf(commandPathOf(one))));
13
- const key = keyForCommand(path);
13
+ const key = keyOf?.(path) ?? keyForCommand(path);
14
14
  const level = key ? levelFor(permissions, key).level : "allow";
15
15
  for (const source of readKeysForCommand(path)) {
16
16
  if (levelFor(permissions, source).level === "deny")
@@ -21,18 +21,36 @@ export const preview = (command, settings, tool, keyOf) => {
21
21
  (key !== null && key !== undefined && WRITE_KEYS.includes(key));
22
22
  if (level === "deny" || (writes && level === "readonly"))
23
23
  throw new CliError("permission_error", `this profile does not permit ${path.join(" ")}`, { permission: key });
24
- const targets = new Set(["chat", "message", "person", "profile"]);
24
+ return previewBody(command, { key: key ?? null, level }, messenger);
25
+ };
26
+ const TARGETS = new Set(["chat", "message", "person", "profile"]);
27
+ /**
28
+ * `messenger_contacted` stays for the messengers, whose callers may read it; `service_contacted` says the same
29
+ * for every tool. Without `permission` nothing was checked: a host that is not `run` has no settings to check.
30
+ */
31
+ export const previewBody = (command, permission, messenger) => {
25
32
  return {
26
33
  preview: true,
27
- path,
28
- permission: { key: key ?? null, level },
29
- validation: { arguments: "parsed", permissions: "checked", targets: "unresolved", businessRules: "not-executed" },
30
- effects: { actionInvoked: false, writeReserved: false, messengerContacted: false, configurationRead: true },
34
+ path: commandPathOf(command),
35
+ ...(permission ? { permission } : {}),
36
+ validation: {
37
+ arguments: "parsed",
38
+ permissions: permission ? "checked" : "not-checked",
39
+ targets: "unresolved",
40
+ businessRules: "not-executed",
41
+ },
42
+ effects: {
43
+ actionInvoked: false,
44
+ writeReserved: false,
45
+ ...(messenger ? { messengerContacted: false } : {}),
46
+ serviceContacted: false,
47
+ configurationRead: permission !== undefined,
48
+ },
31
49
  arguments: command.registeredArguments.map((argument, at) => {
32
50
  const value = command.processedArgs[at];
33
51
  return {
34
52
  name: argument.name(),
35
- ...(targets.has(argument.name()) && typeof value === "string"
53
+ ...(TARGETS.has(argument.name()) && typeof value === "string"
36
54
  ? { reference: value }
37
55
  : { supplied: value !== undefined, bytes: typeof value === "string" ? Buffer.byteLength(value) : undefined }),
38
56
  };
@@ -10,6 +10,7 @@ import { isCliFailure, isCommanderFailure } from "../errors/failures.js";
10
10
  import { failureContext } from "../errors/reasons.js";
11
11
  import { envName, readOnlyLockOf, readOnlyRefusal } from "../ports/app.js";
12
12
  import { recorded, wasSettled } from "../runs/recording.js";
13
+ import { runContextOf } from "../runs/run-context.js";
13
14
  import { processRun, useAsProcessRun } from "../runs/scope.js";
14
15
  import { AUTHORITY_KEY, BOT_API_KEY, isBotApi, keyForCommand } from "../sends/permissions.js";
15
16
  import { logParsedArgv, logVersion } from "./argv-log.js";
@@ -191,6 +192,7 @@ const runOnce = async (argv, definition, options) => {
191
192
  const exit = {};
192
193
  const environment = {
193
194
  ...options,
195
+ argv,
194
196
  streams: control.streams,
195
197
  signal: options.signal ? AbortSignal.any([control.signal, options.signal]) : control.signal,
196
198
  commandSignal: control.signal,
@@ -267,16 +269,18 @@ const runOnce = async (argv, definition, options) => {
267
269
  const path = commandPathOf(action);
268
270
  const lock = readOnlyLockOf(definition.app, commandEnv);
269
271
  const input = options.stdin ?? process.stdin;
270
- await setupAtStart({
271
- command,
272
- env: commandEnv,
273
- contentLanguages: definition.app.contentLanguages,
274
- path,
275
- headless,
276
- readOnlyLock: lock,
277
- input,
278
- terminal: !options.streams && input.isTTY === true && process.stderr.isTTY === true,
279
- });
272
+ // The first-run questions write the shared config; a dry run writes nothing.
273
+ if (!flags.dryRun)
274
+ await setupAtStart({
275
+ command,
276
+ env: commandEnv,
277
+ contentLanguages: definition.app.contentLanguages,
278
+ path,
279
+ headless,
280
+ readOnlyLock: lock,
281
+ input,
282
+ terminal: !options.streams && input.isTTY === true && process.stderr.isTTY === true,
283
+ });
280
284
  if (lock && isLogin(action) && !flags.dryRun)
281
285
  throw readOnlyRefusal(lock, "log in or out");
282
286
  if (lock && isStoreChange(action) && !flags.dryRun)
@@ -385,7 +389,7 @@ const runOnce = async (argv, definition, options) => {
385
389
  configPath: resolved.configPath ?? "",
386
390
  profile: resolved.profile,
387
391
  ...(resolved.savedPermissions ? { savedPermissions: resolved.savedPermissions } : {}),
388
- }, command, definition.configuration?.permissionKey);
392
+ }, command, definition.configuration?.permissionKey, definition.app.messenger !== false);
389
393
  renderAnswer(action, outputFor(action), itemOf(snakeKeys(previewed)));
390
394
  throw new PreviewComplete();
391
395
  }
@@ -412,7 +416,7 @@ const runOnce = async (argv, definition, options) => {
412
416
  refuseJoinedPath(program, words.filter((word) => !word.startsWith("-")), profile !== undefined && !/\s/.test(profile) ? [profile] : []);
413
417
  }
414
418
  catch (failure) {
415
- const settled = await settleFailure(failure, { definition, program, rest: lifted, profile, options });
419
+ const settled = await settleFailure(failure, { definition, program, rest: lifted, argv, profile, options });
416
420
  return report(streams, reporting, failed(definition, program, lifted, failure, settled, debug));
417
421
  }
418
422
  if (profile !== undefined)
@@ -427,7 +431,7 @@ const runOnce = async (argv, definition, options) => {
427
431
  const message = `"${profile}" is not a command, so it was read as a profile name — and no command followed it. ` +
428
432
  `Run \`${command} --help\` for the commands, or \`${command} ${profile} account show\` if "${profile}" is your profile.`;
429
433
  const failure = new CliError("validation_error", message, { param: "profile" });
430
- const settled = await settleFailure(failure, { definition, program, rest, profile, options });
434
+ const settled = await settleFailure(failure, { definition, program, rest, argv, profile, options });
431
435
  return report(streams, reporting, failed(definition, program, rest, failure, settled, debug));
432
436
  }
433
437
  try {
@@ -472,10 +476,10 @@ const runOnce = async (argv, definition, options) => {
472
476
  message += ` — "${profile}" is not a command, so it was read as a profile name — which left "${rest[0]}" to be one.`;
473
477
  }
474
478
  const failure = new CliError("validation_error", message);
475
- const settled = await settleFailure(failure, { definition, program, rest, profile, options });
479
+ const settled = await settleFailure(failure, { definition, program, rest, argv, profile, options });
476
480
  return report(streams, reporting, failed(definition, program, rest, failure, settled, debug));
477
481
  }
478
- const settled = await settleFailure(error, { definition, program, rest, profile, options });
482
+ const settled = await settleFailure(error, { definition, program, rest, argv, profile, options });
479
483
  const exit = report(streams, reporting, failed(definition, program, rest, error, settled, debug));
480
484
  return signalExit ?? exit;
481
485
  }
@@ -562,9 +566,9 @@ const settleFailure = async (failure, state) => {
562
566
  /**
563
567
  * **Every failure is kept as a run** — a usage error, a configuration that will not load, a command
564
568
  * that never opens a run — unless recording was turned off. One its own run already kept is skipped.
565
- * Only the command's words are named, never its arguments: those can be a message.
569
+ * Its arguments are kept masked (`maskArgv`): a value that can be a message never is.
566
570
  */
567
- const keepFailure = async (failure, { definition, program, rest, profile, options }) => {
571
+ const keepFailure = async (failure, { definition, program, rest, argv, profile, options }) => {
568
572
  if (wasSettled(failure))
569
573
  return;
570
574
  const env = options.env ?? process.env;
@@ -577,9 +581,17 @@ const keepFailure = async (failure, { definition, program, rest, profile, option
577
581
  catch {
578
582
  // A configuration that will not load is a failure worth keeping too; the flags are all there is to go on.
579
583
  }
584
+ const command = `${options.agent ? "mcp " : ""}${path || definition.app.command}`;
580
585
  await recorded({
581
586
  app: definition.app,
582
- command: `${options.agent ? "mcp " : ""}${path || definition.app.command}`,
587
+ command,
588
+ context: runContextOf({
589
+ bin: definition.app.command,
590
+ command: path ? command : options.agent ? "mcp" : "",
591
+ program,
592
+ argv,
593
+ env,
594
+ }),
583
595
  profile: settings ? namedProfile(settings) : profile,
584
596
  record: false,
585
597
  keepFailed: settings?.keepFailedRuns ?? !rest.includes("--no-record"),
@@ -8,6 +8,8 @@ const FIELDS = [
8
8
  "opcode",
9
9
  "seq",
10
10
  "status",
11
+ "method",
12
+ "endpoint_template",
11
13
  "bytes",
12
14
  "ids",
13
15
  "counts",
@@ -7,7 +7,7 @@ import { envName, readOnlyLockOf } from "../ports/app.js";
7
7
  import { assertOverridesTighten, CEILING_KEY, LEVELS, layerPermissions, permissionOverrides, RESOURCES, } from "../sends/permissions.js";
8
8
  import { storePath } from "../store/path.js";
9
9
  import { sharedConfigPath } from "../store/shared-config.js";
10
- import { issueMessage, parseConfigText, publicIssue, savedPermissionKeys, schemaIssues, withoutIssues, } from "./config-issues.js";
10
+ import { checkConfigText, issueMessage, parseConfigText, publicIssue, savedPermissionKeys, schemaIssues, } from "./config-issues.js";
11
11
  import { DEFAULT_CONFIG, ensureDefaultConfig } from "./default-config.js";
12
12
  import { profilesHere } from "./messenger/accounts.js";
13
13
  import { usableProfileName } from "./profile.js";
@@ -157,14 +157,15 @@ export const settingsFor = (app, extension = {}) => {
157
157
  };
158
158
  /** The file with every problem found; what loads is the file without the settings they name. */
159
159
  const loadConfig = (path) => {
160
- const read = readRaw(path);
161
- if ("issue" in read)
162
- return { config: { profiles: {} }, issues: [read.issue], raw: undefined };
163
- if (read.raw === undefined)
164
- return { config: { profiles: {} }, issues: [], raw: undefined };
165
- const issues = schemaIssues(read.raw, readSchema, context(path));
166
- const parsed = v.safeParse(readSchema, withoutIssues(read.raw, issues));
167
- return { config: (parsed.success ? parsed.output : { profiles: {} }), issues, raw: read.raw };
160
+ let text;
161
+ try {
162
+ text = readFileSync(path, "utf8");
163
+ }
164
+ catch {
165
+ return { config: { profiles: {} }, issues: [] };
166
+ }
167
+ const { config, issues } = checkConfigText(text, { file: path, tool: app.command, schema: readSchema });
168
+ return { config: (config ?? { profiles: {} }), issues };
168
169
  };
169
170
  /**
170
171
  * A lock pins a process to one profile: the owner sets it where an agent runs, and a first word
@@ -207,7 +208,7 @@ export const settingsFor = (app, extension = {}) => {
207
208
  }
208
209
  const loaded = loadConfig(configPath);
209
210
  if (loaded.issues.length > 0 && !options.withIssues)
210
- throw new CliError("configuration_error", issueMessage(loaded.issues.map(publicIssue)));
211
+ throw new CliError("configuration_error", issueMessage(loaded.issues));
211
212
  const { config } = loaded;
212
213
  const lock = given(env[PROFILE_LOCK]);
213
214
  const named = first([
@@ -330,7 +331,7 @@ export const settingsFor = (app, extension = {}) => {
330
331
  },
331
332
  configured,
332
333
  shared,
333
- configIssues: loaded.issues.map(publicIssue),
334
+ configIssues: loaded.issues,
334
335
  savedPermissions: savedPermissionKeys(config),
335
336
  };
336
337
  // The file was checked by the schema; a flag was not, and `--limit abc` is `NaN` by the time it
@@ -351,7 +352,7 @@ export const settingsFor = (app, extension = {}) => {
351
352
  const configuredProfiles = (options = {}) => {
352
353
  const { config, issues } = loadConfig(configPathFor(options));
353
354
  if (issues.length > 0 && !options.withIssues)
354
- throw new CliError("configuration_error", issueMessage(issues.map(publicIssue)));
355
+ throw new CliError("configuration_error", issueMessage(issues));
355
356
  return namedProfiles(config);
356
357
  };
357
358
  /**
@@ -5,6 +5,7 @@ import { botMcpCommand as botMcpCommandDefinition } from "./bot/mcp.js";
5
5
  import { botMessagesCommand as botMessagesCommandDefinition } from "./bot/messages.js";
6
6
  import { commandsCommand as commandsCommandDefinition } from "./commands-command.js";
7
7
  import { configCommand as configCommandDefinition } from "./config-command.js";
8
+ import { honoursDryRun } from "./dry-run-guard.js";
8
9
  import { guideCommand as guideCommandDefinition } from "./guide.js";
9
10
  import { addMeetingBatchCommand as addMeetingBatchCommandDefinition } from "./meeting-batch.js";
10
11
  import { addMeetingPreparationCommand as addMeetingPreparationCommandDefinition } from "./meeting-preparation-command.js";
@@ -48,9 +49,10 @@ import { tasksCommand as tasksCommandDefinition, tasksStatsCommand as tasksStats
48
49
  import { topicsCommand as topicsCommandDefinition } from "./messenger/topics-command.js";
49
50
  import { watchCommand as watchCommandDefinition } from "./messenger/watch-command.js";
50
51
  import { runsCommand as runsCommandDefinition } from "./runs/command.js";
51
- import { sharedCommand } from "./shared-contracts.js";
52
+ import { sharedCommand as protectedCommand } from "./shared-contracts.js";
52
53
  import { skillCommand as skillCommandDefinition } from "./skill-command.js";
53
54
  import { upgradeCommand as upgradeCommandDefinition } from "./upgrade-command.js";
55
+ const sharedCommand = (factory) => honoursDryRun(protectedCommand(factory));
54
56
  export const botAdminsCommand = sharedCommand(botAdminsCommandDefinition);
55
57
  export const botMembersCommand = sharedCommand(botMembersCommandDefinition);
56
58
  export const generatedApiCommand = sharedCommand(generatedApiCommandDefinition);
@@ -7016,6 +7016,34 @@ export declare const ENTITIES: {
7016
7016
  readonly operations: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7017
7017
  readonly codes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7018
7018
  readonly trace_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7019
+ readonly cli_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7020
+ readonly argv: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7021
+ readonly unknown_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7022
+ readonly agent: v.OptionalSchema<v.StrictObjectSchema<{
7023
+ readonly kind: v.StringSchema<undefined>;
7024
+ readonly session_id: v.NullableSchema<v.StringSchema<undefined>, undefined>;
7025
+ }, undefined>, undefined>;
7026
+ readonly error: v.OptionalSchema<v.StrictObjectSchema<{
7027
+ readonly class: v.StringSchema<undefined>;
7028
+ readonly code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7029
+ readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7030
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7031
+ readonly operation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7032
+ readonly http: v.OptionalSchema<v.StrictObjectSchema<{
7033
+ readonly method: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7034
+ readonly endpoint_template: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7035
+ readonly status: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7036
+ }, undefined>, undefined>;
7037
+ readonly provider: v.OptionalSchema<v.StrictObjectSchema<{
7038
+ readonly key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7039
+ readonly code: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
7040
+ }, undefined>, undefined>;
7041
+ readonly causes: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
7042
+ readonly class: v.StringSchema<undefined>;
7043
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7044
+ }, undefined>, undefined>, undefined>;
7045
+ readonly stack: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7046
+ }, undefined>, undefined>;
7019
7047
  readonly directory: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7020
7048
  readonly event_count: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7021
7049
  readonly events: v.OptionalSchema<v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>, undefined>;
@@ -7050,6 +7078,34 @@ export declare const ENTITIES: {
7050
7078
  readonly operations: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7051
7079
  readonly codes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7052
7080
  readonly trace_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7081
+ readonly cli_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7082
+ readonly argv: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7083
+ readonly unknown_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7084
+ readonly agent: v.OptionalSchema<v.StrictObjectSchema<{
7085
+ readonly kind: v.StringSchema<undefined>;
7086
+ readonly session_id: v.NullableSchema<v.StringSchema<undefined>, undefined>;
7087
+ }, undefined>, undefined>;
7088
+ readonly error: v.OptionalSchema<v.StrictObjectSchema<{
7089
+ readonly class: v.StringSchema<undefined>;
7090
+ readonly code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7091
+ readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7092
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7093
+ readonly operation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7094
+ readonly http: v.OptionalSchema<v.StrictObjectSchema<{
7095
+ readonly method: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7096
+ readonly endpoint_template: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7097
+ readonly status: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7098
+ }, undefined>, undefined>;
7099
+ readonly provider: v.OptionalSchema<v.StrictObjectSchema<{
7100
+ readonly key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7101
+ readonly code: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
7102
+ }, undefined>, undefined>;
7103
+ readonly causes: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
7104
+ readonly class: v.StringSchema<undefined>;
7105
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7106
+ }, undefined>, undefined>, undefined>;
7107
+ readonly stack: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7108
+ }, undefined>, undefined>;
7053
7109
  readonly directory: v.StringSchema<undefined>;
7054
7110
  readonly event_count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
7055
7111
  readonly events: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
@@ -7083,6 +7139,34 @@ export declare const ENTITIES: {
7083
7139
  readonly operations: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7084
7140
  readonly codes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7085
7141
  readonly trace_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7142
+ readonly cli_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7143
+ readonly argv: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7144
+ readonly unknown_command: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7145
+ readonly agent: v.OptionalSchema<v.StrictObjectSchema<{
7146
+ readonly kind: v.StringSchema<undefined>;
7147
+ readonly session_id: v.NullableSchema<v.StringSchema<undefined>, undefined>;
7148
+ }, undefined>, undefined>;
7149
+ readonly error: v.OptionalSchema<v.StrictObjectSchema<{
7150
+ readonly class: v.StringSchema<undefined>;
7151
+ readonly code: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7152
+ readonly reason: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7153
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7154
+ readonly operation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7155
+ readonly http: v.OptionalSchema<v.StrictObjectSchema<{
7156
+ readonly method: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7157
+ readonly endpoint_template: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7158
+ readonly status: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7159
+ }, undefined>, undefined>;
7160
+ readonly provider: v.OptionalSchema<v.StrictObjectSchema<{
7161
+ readonly key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7162
+ readonly code: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
7163
+ }, undefined>, undefined>;
7164
+ readonly causes: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
7165
+ readonly class: v.StringSchema<undefined>;
7166
+ readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7167
+ }, undefined>, undefined>, undefined>;
7168
+ readonly stack: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
7169
+ }, undefined>, undefined>;
7086
7170
  readonly events: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
7087
7171
  readonly events_truncated: v.BooleanSchema<undefined>;
7088
7172
  }, undefined>;
@@ -9352,6 +9436,42 @@ export declare const ENTITIES: {
9352
9436
  opens: v.LiteralSchema<false, undefined>;
9353
9437
  error: v.StringSchema<undefined>;
9354
9438
  }, undefined>, v.StrictObjectSchema<{
9439
+ readonly by_provider: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
9440
+ readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9441
+ readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9442
+ readonly emails: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9443
+ readonly documents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9444
+ readonly meetings: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9445
+ readonly provider: v.StringSchema<undefined>;
9446
+ readonly accounts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9447
+ }, undefined>, undefined>, undefined>;
9448
+ readonly by_chat_kind: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
9449
+ readonly provider: v.StringSchema<undefined>;
9450
+ readonly kind: v.StringSchema<undefined>;
9451
+ readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9452
+ readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9453
+ }, undefined>, undefined>, undefined>;
9454
+ readonly by_account: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
9455
+ readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9456
+ readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9457
+ readonly emails: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9458
+ readonly documents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9459
+ readonly meetings: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9460
+ readonly provider: v.StringSchema<undefined>;
9461
+ readonly account_id: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9462
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
9463
+ }, undefined>, undefined>, undefined>;
9464
+ readonly by_year: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
9465
+ readonly provider: v.StringSchema<undefined>;
9466
+ readonly year: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9467
+ readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9468
+ }, undefined>, undefined>, undefined>;
9469
+ readonly by_attachment_kind: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
9470
+ readonly type: v.StringSchema<undefined>;
9471
+ readonly kind: v.StringSchema<undefined>;
9472
+ readonly count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9473
+ readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9474
+ }, undefined>, undefined>, undefined>;
9355
9475
  readonly path: v.StringSchema<undefined>;
9356
9476
  readonly exists: v.LiteralSchema<true, undefined>;
9357
9477
  readonly bytes: v.StrictObjectSchema<{
@@ -9368,6 +9488,10 @@ export declare const ENTITIES: {
9368
9488
  readonly accounts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9369
9489
  readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9370
9490
  readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9491
+ readonly emails: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9492
+ readonly documents: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9493
+ readonly meetings: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9494
+ readonly events: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9371
9495
  readonly attachments: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9372
9496
  readonly identities: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9373
9497
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
@@ -9375,6 +9499,10 @@ export declare const ENTITIES: {
9375
9499
  readonly accounts: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9376
9500
  readonly chats: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9377
9501
  readonly messages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9502
+ readonly emails: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9503
+ readonly documents: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9504
+ readonly meetings: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9505
+ readonly events: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9378
9506
  readonly attachments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9379
9507
  readonly identities: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
9380
9508
  };
@@ -9382,12 +9510,20 @@ export declare const ENTITIES: {
9382
9510
  accounts?: number | undefined;
9383
9511
  chats?: number | undefined;
9384
9512
  messages?: number | undefined;
9513
+ emails?: number | undefined;
9514
+ documents?: number | undefined;
9515
+ meetings?: number | undefined;
9516
+ events?: number | undefined;
9385
9517
  attachments?: number | undefined;
9386
9518
  identities?: number | undefined;
9387
9519
  }, {
9388
9520
  accounts?: number | undefined;
9389
9521
  chats?: number | undefined;
9390
9522
  messages?: number | undefined;
9523
+ emails?: number | undefined;
9524
+ documents?: number | undefined;
9525
+ meetings?: number | undefined;
9526
+ events?: number | undefined;
9391
9527
  attachments?: number | undefined;
9392
9528
  identities?: number | undefined;
9393
9529
  }>;
@@ -9395,6 +9531,10 @@ export declare const ENTITIES: {
9395
9531
  accounts?: number | undefined;
9396
9532
  chats?: number | undefined;
9397
9533
  messages?: number | undefined;
9534
+ emails?: number | undefined;
9535
+ documents?: number | undefined;
9536
+ meetings?: number | undefined;
9537
+ events?: number | undefined;
9398
9538
  attachments?: number | undefined;
9399
9539
  identities?: number | undefined;
9400
9540
  }, v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.NumberIssue | v.StrictObjectIssue>;
@@ -9403,6 +9543,10 @@ export declare const ENTITIES: {
9403
9543
  accounts?: number | undefined;
9404
9544
  chats?: number | undefined;
9405
9545
  messages?: number | undefined;
9546
+ emails?: number | undefined;
9547
+ documents?: number | undefined;
9548
+ meetings?: number | undefined;
9549
+ events?: number | undefined;
9406
9550
  attachments?: number | undefined;
9407
9551
  identities?: number | undefined;
9408
9552
  };
@@ -9410,6 +9554,10 @@ export declare const ENTITIES: {
9410
9554
  accounts?: number | undefined;
9411
9555
  chats?: number | undefined;
9412
9556
  messages?: number | undefined;
9557
+ emails?: number | undefined;
9558
+ documents?: number | undefined;
9559
+ meetings?: number | undefined;
9560
+ events?: number | undefined;
9413
9561
  attachments?: number | undefined;
9414
9562
  identities?: number | undefined;
9415
9563
  };