@moda-ai/cli 1.10.2 → 1.12.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 (59) hide show
  1. package/dist/agent-schemas.js +60 -3
  2. package/dist/auth.js +5 -1
  3. package/dist/cli.js +124 -38
  4. package/dist/config.js +5 -3
  5. package/dist/errors.d.ts +32 -0
  6. package/dist/errors.js +40 -0
  7. package/dist/exit-funnel.d.ts +14 -0
  8. package/dist/exit-funnel.js +49 -0
  9. package/dist/harness.js +18 -6
  10. package/dist/init/index.js +57 -4
  11. package/dist/init/sdk-guide.d.ts +28 -1
  12. package/dist/init/sdk-guide.js +102 -98
  13. package/dist/init/sdk-integration.d.ts +23 -3
  14. package/dist/init/sdk-integration.js +106 -24
  15. package/dist/init/skill-resolver.d.ts +19 -0
  16. package/dist/init/skill-resolver.js +78 -0
  17. package/dist/init/tenant.d.ts +6 -1
  18. package/dist/init/tenant.js +35 -11
  19. package/dist/manifest.d.ts +5 -0
  20. package/dist/manifest.js +111 -0
  21. package/dist/output.d.ts +44 -4
  22. package/dist/output.js +337 -32
  23. package/dist/prompts.d.ts +2 -1
  24. package/dist/prompts.js +38 -13
  25. package/dist/redact.d.ts +2 -0
  26. package/dist/redact.js +81 -0
  27. package/dist/schemas.d.ts +2 -2
  28. package/dist/skills-bundled.d.ts +35 -0
  29. package/dist/skills-bundled.js +157 -0
  30. package/dist/skills-manifest.d.ts +33 -0
  31. package/dist/skills-manifest.js +244 -0
  32. package/dist/skills.d.ts +8 -2
  33. package/dist/skills.js +55 -161
  34. package/package.json +6 -4
  35. package/skills/integration/index.json +123 -0
  36. package/skills/integration/integration-node-anthropic/EXAMPLE.md +59 -0
  37. package/skills/integration/integration-node-anthropic/SKILL.md +150 -0
  38. package/skills/integration/integration-node-generic/EXAMPLE.md +77 -0
  39. package/skills/integration/integration-node-generic/SKILL.md +170 -0
  40. package/skills/integration/integration-node-langchain/EXAMPLE.md +59 -0
  41. package/skills/integration/integration-node-langchain/SKILL.md +144 -0
  42. package/skills/integration/integration-node-openai/EXAMPLE.md +55 -0
  43. package/skills/integration/integration-node-openai/SKILL.md +148 -0
  44. package/skills/integration/integration-node-vercel-ai-sdk/EXAMPLE.md +55 -0
  45. package/skills/integration/integration-node-vercel-ai-sdk/SKILL.md +179 -0
  46. package/skills/integration/integration-node-vercel-ai-sdk/references/prompt-attribution.md +31 -0
  47. package/skills/integration/integration-python-anthropic/EXAMPLE.md +66 -0
  48. package/skills/integration/integration-python-anthropic/SKILL.md +153 -0
  49. package/skills/integration/integration-python-claude-agent-sdk/EXAMPLE.md +61 -0
  50. package/skills/integration/integration-python-claude-agent-sdk/SKILL.md +129 -0
  51. package/skills/integration/integration-python-generic/EXAMPLE.md +46 -0
  52. package/skills/integration/integration-python-generic/SKILL.md +146 -0
  53. package/skills/integration/integration-python-langchain/EXAMPLE.md +63 -0
  54. package/skills/integration/integration-python-langchain/SKILL.md +141 -0
  55. package/skills/integration/integration-python-openai/EXAMPLE.md +65 -0
  56. package/skills/integration/integration-python-openai/SKILL.md +151 -0
  57. package/skills/moda-cli/SKILL.md +51 -7
  58. package/dist/init/detect.d.ts +0 -9
  59. package/dist/init/detect.js +0 -179
@@ -0,0 +1,78 @@
1
+ // src/init/skill-resolver.ts — deterministic resolution from detected project
2
+ // context to a bundled integration-skill id.
3
+ //
4
+ // Pure function, zero LLM involvement. The table is ordered; the first
5
+ // matching row wins. Wrapper frameworks beat raw providers: if the Vercel AI
6
+ // SDK or LangChain is present, the wrapper layer gets instrumented, never the
7
+ // underlying openai/anthropic client.
8
+ /** The §2.3 resolution table, encoded as data. Order matters. */
9
+ export const RESOLUTION_TABLE = [
10
+ { language: 'node', framework: 'vercel-ai-sdk', skillId: 'integration-node-vercel-ai-sdk' },
11
+ { language: 'node', framework: 'langchain', skillId: 'integration-node-langchain' },
12
+ { language: 'python', framework: 'langchain', skillId: 'integration-python-langchain' },
13
+ { language: 'python', framework: 'claude-agent-sdk', skillId: 'integration-python-claude-agent-sdk' },
14
+ { language: 'node', provider: 'openai', skillId: 'integration-node-openai' },
15
+ { language: 'node', provider: 'anthropic', skillId: 'integration-node-anthropic' },
16
+ { language: 'python', provider: 'openai', skillId: 'integration-python-openai' },
17
+ { language: 'python', provider: 'anthropic', skillId: 'integration-python-anthropic' },
18
+ { language: 'node', skillId: 'integration-node-generic' },
19
+ { language: 'python', skillId: 'integration-python-generic' },
20
+ ];
21
+ /**
22
+ * Resolve the detected context to a bundled skill id, or null when no
23
+ * language was detected (callers fall back to the slim generic guide).
24
+ */
25
+ export function resolveIntegrationSkillId(context) {
26
+ const languages = normalizeLanguages(context.languages);
27
+ const frameworks = normalizeFrameworks(context.frameworkHints);
28
+ const providers = normalizeProviders(context.providerHints);
29
+ for (const row of RESOLUTION_TABLE) {
30
+ if (!languages.has(row.language))
31
+ continue;
32
+ if (row.framework && !frameworks.has(row.framework))
33
+ continue;
34
+ if (row.provider && !providers.has(row.provider))
35
+ continue;
36
+ return row.skillId;
37
+ }
38
+ return null;
39
+ }
40
+ function normalizeLanguages(languages) {
41
+ const result = new Set();
42
+ for (const language of languages) {
43
+ const lower = language.toLowerCase();
44
+ if (lower.includes('node') || lower.includes('typescript') || lower.includes('javascript')) {
45
+ result.add('node');
46
+ }
47
+ if (lower.includes('python'))
48
+ result.add('python');
49
+ }
50
+ return result;
51
+ }
52
+ function normalizeFrameworks(frameworkHints) {
53
+ const result = new Set();
54
+ for (const hint of frameworkHints) {
55
+ const lower = hint.toLowerCase();
56
+ if (lower.includes('vercel ai sdk') || lower.includes('vercel-ai-sdk') || lower.includes('ai sdk')) {
57
+ result.add('vercel-ai-sdk');
58
+ }
59
+ if (lower.includes('langchain') || lower.includes('langgraph'))
60
+ result.add('langchain');
61
+ if (lower.includes('claude agent sdk') || lower.includes('claude-agent-sdk')) {
62
+ result.add('claude-agent-sdk');
63
+ }
64
+ }
65
+ return result;
66
+ }
67
+ function normalizeProviders(providerHints) {
68
+ const result = new Set();
69
+ for (const hint of providerHints) {
70
+ const lower = hint.toLowerCase();
71
+ if (lower.includes('openai'))
72
+ result.add('openai');
73
+ if (lower.includes('anthropic'))
74
+ result.add('anthropic');
75
+ }
76
+ return result;
77
+ }
78
+ //# sourceMappingURL=skill-resolver.js.map
@@ -4,6 +4,11 @@ interface BootstrapResult {
4
4
  tenantName: string;
5
5
  tenantSlug: string;
6
6
  }
7
- export declare function selectTenantAndCreateKey(): Promise<BootstrapResult>;
7
+ export declare function selectTenantAndCreateKey(options?: {
8
+ tenantId?: string;
9
+ nonInteractive?: boolean;
10
+ silent?: boolean;
11
+ resumeCommand?: string[];
12
+ }): Promise<BootstrapResult>;
8
13
  export {};
9
14
  //# sourceMappingURL=tenant.d.ts.map
@@ -2,7 +2,8 @@
2
2
  import { select } from '@inquirer/prompts';
3
3
  import { authFetch } from '../auth.js';
4
4
  import { resolveIngestUrl, saveCliConfig } from '../config.js';
5
- export async function selectTenantAndCreateKey() {
5
+ import { CliInputError, CliInputRequiredError } from '../errors.js';
6
+ export async function selectTenantAndCreateKey(options = {}) {
6
7
  // 1. Fetch CLI context
7
8
  const contextRes = await authFetch('/api/cli/context');
8
9
  if (!contextRes.ok) {
@@ -10,16 +11,39 @@ export async function selectTenantAndCreateKey() {
10
11
  throw new Error(`Failed to fetch context (${contextRes.status}): ${body}`);
11
12
  }
12
13
  const ctx = (await contextRes.json());
13
- console.log(` Authenticated as ${ctx.user.email}`);
14
+ if (!options.silent)
15
+ console.log(` Authenticated as ${ctx.user.email}`);
14
16
  // 2. Select tenant
15
17
  if (ctx.tenants.length === 0) {
16
- console.error(' No organizations found. Create one at https://moda.dev');
17
- process.exit(1);
18
+ throw new CliInputError('No organizations found. Create one at https://moda.dev', 'Create an organization in Moda, then rerun `moda init`.');
18
19
  }
19
20
  let tenantId;
20
- if (ctx.tenants.length === 1) {
21
+ if (options.tenantId) {
22
+ const selected = ctx.tenants.find((tenant) => tenant.id === options.tenantId);
23
+ if (!selected) {
24
+ throw new CliInputError(`Tenant '${options.tenantId}' is not available for the authenticated user.`, 'Run `moda init` without --tenant-id in a human terminal, or choose a tenant from the needs_input event.');
25
+ }
26
+ tenantId = selected.id;
27
+ if (!options.silent)
28
+ console.log(` Organization: ${selected.name}`);
29
+ }
30
+ else if (ctx.tenants.length === 1) {
21
31
  tenantId = ctx.tenants[0].id;
22
- console.log(` Organization: ${ctx.tenants[0].name}`);
32
+ if (!options.silent)
33
+ console.log(` Organization: ${ctx.tenants[0].name}`);
34
+ }
35
+ else if (options.nonInteractive) {
36
+ throw new CliInputRequiredError('Multiple Moda organizations are available; choose one and re-run with --tenant-id.', {
37
+ id: 'init_tenant_selection',
38
+ question: 'Select organization',
39
+ kind: 'select',
40
+ choices: ctx.tenants.map((tenant) => ({
41
+ value: tenant.id,
42
+ label: `${tenant.name} (${tenant.role})`,
43
+ resume_flags: ['--tenant-id', tenant.id],
44
+ })),
45
+ resume_command: options.resumeCommand,
46
+ }, 'Re-run `moda init --tenant-id <tenant_id>`.');
23
47
  }
24
48
  else {
25
49
  tenantId = await select({
@@ -37,9 +61,7 @@ export async function selectTenantAndCreateKey() {
37
61
  body: JSON.stringify({ tenantId }),
38
62
  });
39
63
  if (bootstrapRes.status === 403) {
40
- console.error(' Error: You need admin or owner access to create API keys.');
41
- console.error(' Ask your organization owner to upgrade your role.');
42
- process.exit(1);
64
+ throw new CliInputError('You need admin or owner access to create API keys.', 'Ask your organization owner to upgrade your role.');
43
65
  }
44
66
  if (!bootstrapRes.ok) {
45
67
  const body = await bootstrapRes.text();
@@ -55,8 +77,10 @@ export async function selectTenantAndCreateKey() {
55
77
  tenant_id: result.tenantId,
56
78
  ingest_url: resolveIngestUrl(),
57
79
  });
58
- console.log(' API key + tenant saved to ~/.moda/config.json\n');
59
- console.log(' (Set MODA_API_KEY / MODA_TENANT_ID to override for scripts/CI.)\n');
80
+ if (!options.silent) {
81
+ console.log(' API key + tenant saved to ~/.moda/config.json\n');
82
+ console.log(' (Set MODA_API_KEY / MODA_TENANT_ID to override for scripts/CI.)\n');
83
+ }
60
84
  return result;
61
85
  }
62
86
  //# sourceMappingURL=tenant.js.map
@@ -0,0 +1,5 @@
1
+ import type { CommandMetadata } from './command-registry.js';
2
+ export declare const MANIFEST_SCHEMA_VERSION = "moda.manifest.v1";
3
+ export declare function buildManifest(commands: CommandMetadata[]): Record<string, unknown>;
4
+ export declare function renderManifestHuman(manifest: Record<string, unknown>): string;
5
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1,111 @@
1
+ import { VERSION } from './config.js';
2
+ export const MANIFEST_SCHEMA_VERSION = 'moda.manifest.v1';
3
+ export function buildManifest(commands) {
4
+ return {
5
+ schema_version: MANIFEST_SCHEMA_VERSION,
6
+ cli_version: VERSION,
7
+ invocations: [
8
+ 'bunx @moda-ai/cli',
9
+ 'npx -y @moda-ai/cli',
10
+ 'moda',
11
+ ],
12
+ global_flags: [
13
+ '--agent',
14
+ '--stream',
15
+ '--json',
16
+ '--human',
17
+ '--profile <name>',
18
+ '--quiet',
19
+ '--no-telemetry',
20
+ '--no-update-check',
21
+ '--json-schemas',
22
+ ],
23
+ env: [
24
+ 'MODA_FORMAT',
25
+ 'MODA_AGENT',
26
+ 'MODA_API_KEY',
27
+ 'MODA_TENANT_ID',
28
+ 'MODA_PROFILE',
29
+ 'MODA_BASE_URL',
30
+ 'MODA_HEARTBEAT_MS',
31
+ 'MODA_AGENT_MAX_OUTPUT_BYTES',
32
+ 'MODA_CLI_TELEMETRY',
33
+ 'MODA_CLI_UPDATE_CHECK',
34
+ ],
35
+ exit_codes: [
36
+ { code: 0, name: 'ok', meaning: 'Command completed successfully.' },
37
+ { code: 1, name: 'error', meaning: 'Command, input, API, network, or unexpected failure.' },
38
+ { code: 3, name: 'degraded', meaning: 'Reserved for `moda ask` local fallback.' },
39
+ { code: 4, name: 'auth_required', meaning: 'Run login_command, then resume.' },
40
+ { code: 5, name: 'input_required', meaning: 'Choose from input_request choices, then resume.' },
41
+ { code: 130, name: 'cancelled', meaning: 'Interrupted or output consumer closed.' },
42
+ ],
43
+ events: [
44
+ event('started', 'First event for every agent stream.', false),
45
+ event('progress', 'Progress update while work continues.', false),
46
+ event('warning', 'Non-fatal warning or skipped action.', false),
47
+ event('artifact', 'File or artifact produced by a command.', false),
48
+ event('heartbeat', 'Idle liveness event emitted after MODA_HEARTBEAT_MS without output.', false),
49
+ event('needs_input', 'Terminal event requesting exit-and-reinvoke input.', true),
50
+ event('auth_required', 'Terminal event requesting authentication before retry.', true),
51
+ event('completed', 'Terminal success event.', true),
52
+ event('error', 'Terminal failure event.', true),
53
+ event('cancelled', 'Terminal cancellation event.', true),
54
+ event('approval_required', 'Deprecated; use needs_input.', true, true),
55
+ ],
56
+ schemas: [
57
+ 'moda.agent.v1',
58
+ 'moda.agent_event.v1',
59
+ 'moda.intelligence.v1',
60
+ 'production_ask.v0.1',
61
+ ],
62
+ commands: commands.map((command) => ({
63
+ name: command.name,
64
+ aliases: command.aliases ?? [],
65
+ summary: command.description,
66
+ output_modes: command.outputModes,
67
+ streaming: command.outputModes.includes('agent-stream') || command.outputModes.includes('agent'),
68
+ examples: command.examples,
69
+ auth: command.auth,
70
+ mutability: command.mutability,
71
+ exit_codes: exitCodesForCommand(command.name),
72
+ })),
73
+ concepts: [
74
+ { term: 'tenant', meaning: 'A Moda organization/workspace that owns data, prompts, skills, and API keys.' },
75
+ { term: 'profile', meaning: 'A named local CLI configuration under ~/.moda that selects environment, tenant, and secret references.' },
76
+ { term: 'harness', meaning: 'Moda’s local graph of runtime agents, prompts, tools, identities, and deployments in a codebase.' },
77
+ { term: 'harness report', meaning: 'A cited analyst artifact under .moda/ that justifies the harness graph before sync.' },
78
+ { term: 'conversation', meaning: 'A user-agent interaction thread stored in Moda analytics.' },
79
+ { term: 'trace', meaning: 'Raw OTLP span evidence for one run or conversation, exposed by `moda audit`.' },
80
+ { term: 'ingest key', meaning: 'A `moda_sk_` API key for SDKs, CI, and Data API calls. Treat it as a secret.' },
81
+ { term: 'CLI session token', meaning: 'A local browser-auth session token used by CLI auth/bootstrap flows, not by application SDKs.' },
82
+ { term: 'prompt', meaning: 'A code-first prompt file tracked by `.moda/prompts.yml` and synced to Moda.' },
83
+ { term: 'skill', meaning: 'A SKILL.md agent instruction file generated by or synced to Moda.' },
84
+ ],
85
+ };
86
+ }
87
+ export function renderManifestHuman(manifest) {
88
+ const commands = Array.isArray(manifest.commands) ? manifest.commands : [];
89
+ return [
90
+ `Moda CLI manifest ${manifest.cli_version ?? ''}`,
91
+ '',
92
+ 'Commands:',
93
+ ...commands.map((command) => {
94
+ const row = command;
95
+ return ` ${row.name ?? 'unknown'} - ${row.summary ?? ''}`;
96
+ }),
97
+ '',
98
+ 'Run `moda manifest --json` for the full machine-readable contract.',
99
+ ].join('\n');
100
+ }
101
+ function event(name, when, terminal, deprecated = false) {
102
+ return { name, event_version: 1, when, terminal, ...(deprecated ? { deprecated: true } : {}) };
103
+ }
104
+ function exitCodesForCommand(command) {
105
+ if (command === 'ask')
106
+ return [0, 1, 3, 4, 5, 130];
107
+ if (command === 'init' || command === 'harness')
108
+ return [0, 1, 4, 5, 130];
109
+ return [0, 1, 4, 130];
110
+ }
111
+ //# sourceMappingURL=manifest.js.map
package/dist/output.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type AgentAuthRequest, type AgentInputRequest } from './errors.js';
1
2
  export type CliOutputMode = 'human' | 'json' | 'agent' | 'agent-stream';
2
3
  export declare const AGENT_SCHEMA_VERSION = "moda.agent.v1";
3
4
  export declare const AGENT_EVENT_SCHEMA_VERSION = "moda.agent_event.v1";
@@ -6,12 +7,20 @@ export declare const AGENT_EVENT_SCHEMA_VERSION = "moda.agent_event.v1";
6
7
  * 0 ok — grounded answer from Moda Cloud intelligence.
7
8
  * 3 degraded — answer produced from a local/degraded fallback (lower trust).
8
9
  * 1 error — command/input/unexpected failure (see envelope `errors[]`).
10
+ * 4 auth — login or token renewal required before retrying.
11
+ * 5 input — non-interactive caller must choose and re-invoke.
12
+ * 130 cancel — interrupted or the output consumer closed the pipe.
9
13
  * `EXIT_DEGRADED` is intentionally distinct so a caller can tell a degraded
10
14
  * answer apart from both success and hard failure without parsing the payload.
11
15
  */
12
16
  export declare const EXIT_OK = 0;
13
17
  export declare const EXIT_ERROR = 1;
14
18
  export declare const EXIT_DEGRADED = 3;
19
+ export declare const EXIT_AUTH_REQUIRED = 4;
20
+ export declare const EXIT_INPUT_REQUIRED = 5;
21
+ export declare const EXIT_CANCELLED = 130;
22
+ export declare const AGENT_ERROR_CODES: readonly ["input_error", "api_error", "network_error", "auth_required", "input_required", "cancelled", "command_error", "unknown_error", "cloud_unavailable"];
23
+ export type AgentErrorCode = typeof AGENT_ERROR_CODES[number];
15
24
  export type AgentStatus = 'ok' | 'degraded' | 'error';
16
25
  export type AgentConfidence = 'high' | 'medium' | 'low' | 'unknown';
17
26
  export interface AgentSummary {
@@ -54,10 +63,12 @@ export interface AgentArtifact {
54
63
  description?: string;
55
64
  }
56
65
  export interface AgentError {
57
- code: string;
66
+ code: AgentErrorCode | string;
58
67
  message: string;
59
68
  cause?: string;
60
69
  suggested_commands?: string[];
70
+ input_request?: AgentInputRequest;
71
+ auth?: AgentAuthRequest;
61
72
  blocking: boolean;
62
73
  }
63
74
  export interface AgentEnvelope {
@@ -80,9 +91,12 @@ export interface AgentEnvelope {
80
91
  }
81
92
  export interface AgentEvent {
82
93
  schema_version: typeof AGENT_EVENT_SCHEMA_VERSION;
83
- event: 'started' | 'progress' | 'artifact' | 'approval_required' | 'completed' | 'error';
94
+ event: 'started' | 'progress' | 'artifact' | 'approval_required' | 'completed' | 'error' | 'heartbeat' | 'needs_input' | 'auth_required' | 'cancelled' | 'warning';
84
95
  command: string;
85
96
  generated_at: string;
97
+ run_id?: string;
98
+ seq?: number;
99
+ event_version?: number;
86
100
  status?: AgentStatus;
87
101
  phase?: string;
88
102
  message?: string;
@@ -90,6 +104,8 @@ export interface AgentEvent {
90
104
  artifact?: AgentArtifact;
91
105
  result?: AgentEnvelope;
92
106
  error?: AgentError;
107
+ input_request?: AgentInputRequest;
108
+ auth?: AgentAuthRequest;
93
109
  }
94
110
  export interface AgentWriteOptions {
95
111
  summary?: string | Partial<AgentSummary>;
@@ -109,7 +125,29 @@ export interface CliOutput {
109
125
  meta?: Record<string, unknown>;
110
126
  } & AgentWriteOptions): void;
111
127
  writeEvent(event: Omit<AgentEvent, 'schema_version' | 'command' | 'generated_at'>): void;
128
+ writeError(error: unknown): void;
129
+ writeCancelled(reason?: string): void;
130
+ hasTerminalOutput(): boolean;
131
+ close(): void;
112
132
  }
133
+ interface OutputRunState {
134
+ runId: string;
135
+ seq: number;
136
+ started: boolean;
137
+ terminal: boolean;
138
+ startedAt: number;
139
+ lastEventAt: number;
140
+ heartbeat?: NodeJS.Timeout;
141
+ }
142
+ /**
143
+ * True once an EPIPE from a closed stdout/stderr consumer has been observed.
144
+ * The stream error listeners above own this state; expose it so callers can
145
+ * detect consumer-cancelled runs explicitly instead of sniffing the global
146
+ * `process.exitCode`.
147
+ */
148
+ export declare function wasOutputCancelled(): boolean;
149
+ export declare function safeWriteStdout(text: string): boolean;
150
+ export declare function safeWriteStderr(text: string): boolean;
113
151
  /** Flag-only resolution (default human). Kept for callers that only have flags. */
114
152
  export declare function outputModeFromFlags(flags: Record<string, string>): CliOutputMode;
115
153
  /**
@@ -127,6 +165,7 @@ export declare function createCliOutput(options: {
127
165
  command: string;
128
166
  mode: CliOutputMode;
129
167
  quiet?: boolean;
168
+ runId?: string;
130
169
  }): CliOutput;
131
170
  export declare function createAgentEnvelope(options: {
132
171
  command: string;
@@ -135,7 +174,8 @@ export declare function createAgentEnvelope(options: {
135
174
  profile?: string;
136
175
  meta?: Record<string, unknown>;
137
176
  } & AgentWriteOptions): AgentEnvelope;
138
- export declare function createAgentErrorEnvelope(command: string, error: AgentError): AgentEnvelope;
139
- export declare function createAgentEvent(command: string, event: Omit<AgentEvent, 'schema_version' | 'command' | 'generated_at'>): AgentEvent;
177
+ export declare function createAgentErrorEnvelope(command: string, error: AgentError, runId?: string): AgentEnvelope;
178
+ export declare function createAgentEvent(command: string, event: Omit<AgentEvent, 'schema_version' | 'command' | 'generated_at' | 'run_id' | 'seq'>, state?: OutputRunState): AgentEvent;
140
179
  export declare function errorToAgentError(error: unknown): AgentError;
180
+ export {};
141
181
  //# sourceMappingURL=output.d.ts.map