@poncho-ai/harness 0.39.1 → 0.40.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.39.1 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
2
+ > @poncho-ai/harness@0.40.1 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
3
3
  > node scripts/embed-docs.js && tsup src/index.ts --format esm --dts
4
4
 
5
5
  [embed-docs] Generated poncho-docs.ts with 4 topics
@@ -8,9 +8,9 @@
8
8
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/isolate-TCWTUVG4.js 47.34 KB
12
- ESM dist/index.js 480.10 KB
13
- ESM ⚡️ Build success in 223ms
11
+ ESM dist/index.js 489.88 KB
12
+ ESM dist/isolate-VY35DGLM.js 49.43 KB
13
+ ESM ⚡️ Build success in 205ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 7012ms
16
- DTS dist/index.d.ts 73.95 KB
15
+ DTS ⚡️ Build success in 7664ms
16
+ DTS dist/index.d.ts 75.12 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,134 @@
1
1
  # @poncho-ai/harness
2
2
 
3
+ ## 0.40.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8dec90d`](https://github.com/cesr/poncho-ai/commit/8dec90d4df246b0cc16adc9fae61a568db67cbfe) Thanks [@cesr](https://github.com/cesr)! - fix(harness): accept "UTC" (and "GMT") as valid cron timezones
8
+
9
+ `AGENT.md` cron jobs with `timezone: "UTC"` were rejected at parse time
10
+ with `Invalid timezone at AGENT.md frontmatter cron.<job>: "UTC"`. The
11
+ validator was matching against `Intl.supportedValuesOf("timeZone")`,
12
+ which returns canonical IANA names only (`"Etc/UTC"`) and excludes
13
+ common aliases like `"UTC"` and `"GMT"`, even though `Intl.DateTimeFormat`
14
+ accepts them everywhere. The error message ironically cited `"UTC"`
15
+ itself as a valid example.
16
+
17
+ Now delegates to `Intl.DateTimeFormat` directly, which accepts `"UTC"`,
18
+ `"GMT"`, every IANA name, and any platform alias the runtime knows about.
19
+
20
+ ## 0.40.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [#105](https://github.com/cesr/poncho-ai/pull/105) [`e127174`](https://github.com/cesr/poncho-ai/commit/e12717415b1114c5e9a58e7c51fcf9e038218f9f) Thanks [@cesr](https://github.com/cesr)! - feat: tenant-authored skills in the VFS
25
+
26
+ Tenants can now author skills in their VFS at `/skills/<name>/SKILL.md`
27
+ (plus sibling files such as `scripts/*.ts` and `references/*.md`). VFS
28
+ skills are merged with the agent's repo skills per-tenant when building
29
+ the `<available_skills>` block in the system prompt; repo skills win on
30
+ name collision (a warning is logged for the dropped VFS skill).
31
+
32
+ VFS skills can ship runnable scripts in their tree (`scripts/foo.ts`
33
+ etc.); the agent runs them via the existing `run_code` tool with
34
+ `file: "/skills/<name>/scripts/foo.ts"`, which executes in the sandboxed
35
+ isolated-vm runtime. `run_skill_script` remains for repo-shipped skills
36
+ only (jiti, full Node access), and returns a clear redirect when
37
+ called against a VFS skill. The agent's tool-policy lookups still
38
+ resolve against repo skills only, so tenants cannot grant themselves
39
+ new MCP tools by uploading a SKILL.md (security boundary).
40
+
41
+ `run_code` is enhanced so skill-authored scripts feel natural:
42
+ - Accepts top-level `export const run = ...`, `export default function ...`,
43
+ and `export default <expr>;` (the keyword is stripped at strip-TypeScript
44
+ time; `export default <expr>` becomes a `__default` binding).
45
+ - New optional `input` parameter, exposed inside the script as the global
46
+ `__input`.
47
+ - If the script defines a top-level `run` / `default` / `main` / `handler`
48
+ function and doesn't `return` on its own, the dispatcher invokes that
49
+ function with `__input` and returns its result. Existing
50
+ return-style scripts are unaffected.
51
+
52
+ The CLI Files sidebar already exposes the VFS, so creating a tenant
53
+ skill is just writing to `/skills/...` from the UI or via the agent's
54
+ own VFS write tools — the harness invalidates its per-tenant skill
55
+ cache on writes under `/skills/`.
56
+
57
+ ### Patch Changes
58
+
59
+ - [`d24c152`](https://github.com/cesr/poncho-ai/commit/d24c152c1ecb9bfe59b086cb1f18a5ab43688223) Thanks [@cesr](https://github.com/cesr)! - fix(harness): cap `_toolResultArchive` size per conversation, FIFO-evict oldest
60
+
61
+ Heap-snapshot evidence from a 3.7 GB OOM showed 147,448 retained strings,
62
+ including 8 exact duplicates (~239 KB each) of the same browser-extracted
63
+ page text. The browser screenshot/snapshot skip-list from a prior fix
64
+ didn't help because page-text/web-extract tools still archived their
65
+ full payloads in `_toolResultArchive`, with no eviction across the
66
+ session.
67
+
68
+ Add a per-conversation archive byte cap (default 25 MB, configurable via
69
+ `PONCHO_TOOL_ARCHIVE_MAX_MB`). When a new archive write would push the
70
+ total over the cap, evict oldest entries (by `createdAt`) until we're
71
+ back under. Tool-name-agnostic, so it bounds memory regardless of which
72
+ tool returned the large payload.
73
+
74
+ - [`8de45a7`](https://github.com/cesr/poncho-ai/commit/8de45a7ac434fa928ae3b83deec52727073d4658) Thanks [@cesr](https://github.com/cesr)! - fix(harness): browser status/frame listeners no longer pin runInput across runs
75
+
76
+ Heap-snapshot evidence pointed to the actual leak: `BrowserSession.tabs[cid].statusListeners`
77
+ was retaining ~3.4 GB on a long browser session. Each `harness.run()`
78
+ registered two arrow-function listeners (frame + status) whose lexical
79
+ scope captured the entire run scope, including `input.parameters.__toolResultArchive`.
80
+ V8 captures the full enclosing scope into the closure's Context object
81
+ even for variables the listener body doesn't reference, so the runInput
82
+ was reachable through every listener.
83
+
84
+ Two fixes:
85
+ 1. The listeners are now produced by module-scope factories
86
+ (`makeBrowserFrameListener`, `makeBrowserStatusListener`) whose only
87
+ captured variable is the target event queue. The runInput is no longer
88
+ in scope when the closure is created.
89
+ 2. The listener cleanup at the end of `run()` is now in a `try/finally`,
90
+ so listeners are always removed — even when the run errors or the
91
+ consumer abandons the generator. Previously a thrown run would leave
92
+ listeners pinned forever.
93
+
94
+ - [`524df41`](https://github.com/cesr/poncho-ai/commit/524df411904bd00c07901695eda6d4dd07dde972) Thanks [@cesr](https://github.com/cesr)! - fix: persist harness messages on cancelled runs so the agent doesn't lose context
95
+
96
+ When a run was cancelled (Stop button, abort signal), `conversation.messages`
97
+ was updated with the partial assistant turn but `conversation._harnessMessages`
98
+ — the canonical history `loadCanonicalHistory` hands to the model on the next
99
+ turn — was left holding a snapshot from the _previous_ successful run. The
100
+ agent had no memory of the cancelled work, even though the user-facing UI
101
+ still showed it. The new verbose-mode harness toggle made this divergence
102
+ directly visible.
103
+
104
+ The fix plumbs an in-flight `messages` snapshot through the `run:cancelled`
105
+ event, trims it to a model-valid prefix (no orphan `tool_use`), and persists
106
+ it as `_harnessMessages` on every cancel path in the CLI.
107
+
108
+ - [`8e410a1`](https://github.com/cesr/poncho-ai/commit/8e410a15b246a2b129fded8d1c06b98878e5fd07) Thanks [@cesr](https://github.com/cesr)! - fix(harness): surface real `isolated-vm` load error instead of generic message
109
+
110
+ The previous error told users "Run: pnpm add isolated-vm" even when the
111
+ package was installed but the native binary couldn't be loaded — typically
112
+ because a Node upgrade left the installed prebuilds with the wrong ABI
113
+ version (e.g. Node 25 reports ABI 141 but `isolated-vm@6.1.2` only ships
114
+ abi127/abi137 prebuilds). Now the error includes the underlying load
115
+ message, the current Node version + ABI, and a hint to rebuild rather
116
+ than reinstall when the cause is a binary mismatch.
117
+
118
+ - [#105](https://github.com/cesr/poncho-ai/pull/105) [`e127174`](https://github.com/cesr/poncho-ai/commit/e12717415b1114c5e9a58e7c51fcf9e038218f9f) Thanks [@cesr](https://github.com/cesr)! - chore(harness): declare `engines.node` as `>=20.0.0 <25.0.0`
119
+
120
+ `isolated-vm@6.1.2` (the version harness uses for sandboxed code execution)
121
+ ships V8-ABI-specific prebuilt binaries up to ABI 137 (Node 24). Node 25
122
+ reports ABI 141 and has no matching prebuild, so the native module fails
123
+ to load. Declaring the upper bound makes pnpm/npm warn (or hard-fail with
124
+ `engine-strict`) at install time on Node 25, instead of surfacing as a
125
+ runtime error the first time `run_code` is invoked.
126
+
127
+ - [`2792d84`](https://github.com/cesr/poncho-ai/commit/2792d8448b304bf748f926ce42a91c76f37edf79) Thanks [@cesr](https://github.com/cesr)! - Include weekday (Mon/Tue/...) alongside the UTC date in the system prompt's time context, so models stop misidentifying the day of the week.
128
+
129
+ - Updated dependencies [[`524df41`](https://github.com/cesr/poncho-ai/commit/524df411904bd00c07901695eda6d4dd07dde972), [`9616060`](https://github.com/cesr/poncho-ai/commit/96160607502c2c0b05bc60b67b8fc012f4052ef1)]:
130
+ - @poncho-ai/sdk@1.10.0
131
+
3
132
  ## 0.39.1
4
133
 
5
134
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1030,7 +1030,6 @@ declare class AgentHarness {
1030
1030
  private readonly modelProviderInjected;
1031
1031
  private readonly dispatcher;
1032
1032
  readonly uploadStore?: UploadStore;
1033
- private skillContextWindow;
1034
1033
  private memoryStore?;
1035
1034
  private readonly tenantMemoryStores;
1036
1035
  private memoryConfig?;
@@ -1042,6 +1041,8 @@ declare class AgentHarness {
1042
1041
  private skillFingerprint;
1043
1042
  private lastSkillRefreshAt;
1044
1043
  private readonly activeSkillNames;
1044
+ private readonly skillCache;
1045
+ private readonly vfsSkillCollisionWarnings;
1045
1046
  private readonly registeredMcpToolNames;
1046
1047
  private otlpSpanProcessor?;
1047
1048
  private otlpTracerProvider?;
@@ -1085,6 +1086,15 @@ declare class AgentHarness {
1085
1086
  */
1086
1087
  private getMemoryStore;
1087
1088
  private listActiveSkills;
1089
+ /**
1090
+ * Resolve the skill set visible to a given tenant: repo skills plus that
1091
+ * tenant's VFS skills, with repo winning on name collision. Cached per
1092
+ * tenant; cache invalidates on VFS writes under /skills/ via
1093
+ * invalidateSkillsForTenant.
1094
+ */
1095
+ private getSkillsForTenant;
1096
+ invalidateSkillsForTenant(tenantId: string): void;
1097
+ private computeVfsSkillFingerprint;
1088
1098
  private getAgentMcpIntent;
1089
1099
  private getAgentScriptIntent;
1090
1100
  private getAgentMcpApprovalPatterns;
@@ -1180,6 +1190,12 @@ declare const createSearchTools: () => ToolDefinition[];
1180
1190
  * Merges the defaults with any extra paths provided via config.
1181
1191
  */
1182
1192
  declare const resolveSkillDirs: (workingDir: string, extraPaths?: string[]) => string[];
1193
+ type SkillSource = {
1194
+ kind: "repo";
1195
+ } | {
1196
+ kind: "vfs";
1197
+ tenantId: string;
1198
+ };
1183
1199
  interface SkillMetadata {
1184
1200
  /** Unique skill name from frontmatter. */
1185
1201
  name: string;
@@ -1194,9 +1210,11 @@ interface SkillMetadata {
1194
1210
  mcp: string[];
1195
1211
  scripts: string[];
1196
1212
  };
1197
- /** Absolute path to the skill directory. */
1213
+ /** Where this skill came from. */
1214
+ source: SkillSource;
1215
+ /** Absolute fs path (repo) or VFS path (vfs) to the skill directory. */
1198
1216
  skillDir: string;
1199
- /** Absolute path to the SKILL.md file. */
1217
+ /** Absolute fs path (repo) or VFS path (vfs) to the SKILL.md file. */
1200
1218
  skillPath: string;
1201
1219
  }
1202
1220
  /**
@@ -1205,29 +1223,39 @@ interface SkillMetadata {
1205
1223
  type SkillContextEntry = SkillMetadata & {
1206
1224
  instructions: string;
1207
1225
  };
1226
+ declare const parseSkillFrontmatter: (content: string) => {
1227
+ name: string;
1228
+ description: string;
1229
+ allowedTools: {
1230
+ mcp: string[];
1231
+ scripts: string[];
1232
+ };
1233
+ approvalRequired: {
1234
+ mcp: string[];
1235
+ scripts: string[];
1236
+ };
1237
+ } | undefined;
1208
1238
  declare const loadSkillMetadata: (workingDir: string, extraSkillPaths?: string[]) => Promise<SkillMetadata[]>;
1209
1239
  declare const buildSkillContextWindow: (skills: SkillMetadata[]) => string;
1210
- declare const loadSkillInstructions: (skill: SkillMetadata) => Promise<string>;
1211
- declare const readSkillResource: (skill: SkillMetadata, relativePath: string) => Promise<string>;
1240
+ declare const loadVfsSkillMetadata: (engine: StorageEngine, tenantId: string) => Promise<SkillMetadata[]>;
1241
+ declare const mergeSkills: (repoSkills: SkillMetadata[], vfsSkills: SkillMetadata[], onCollision?: (vfsSkill: SkillMetadata) => void) => SkillMetadata[];
1242
+ declare const loadSkillInstructions: (skill: SkillMetadata, engine?: StorageEngine) => Promise<string>;
1243
+ declare const readSkillResource: (skill: SkillMetadata, relativePath: string, engine?: StorageEngine) => Promise<string>;
1212
1244
  declare const loadSkillContext: (workingDir: string) => Promise<SkillContextEntry[]>;
1213
1245
 
1214
- /**
1215
- * Creates the built-in skill tools that implement progressive disclosure
1216
- * per the Agent Skills specification (https://agentskills.io/integrate-skills).
1217
- *
1218
- * - `activate_skill` — loads the full SKILL.md body on demand
1219
- * - `read_skill_resource` — reads a file from a skill directory (references, scripts, assets)
1220
- * - `list_skill_scripts` — lists runnable JavaScript/TypeScript scripts under scripts/
1221
- * - `run_skill_script` — executes a JavaScript/TypeScript module under scripts/
1222
- */
1223
- declare const createSkillTools: (skills: SkillMetadata[], options?: {
1246
+ interface CreateSkillToolsOptions {
1224
1247
  workingDir?: string;
1248
+ /** Resolve the skill set visible to a given tenant (repo + that tenant's VFS). */
1249
+ getSkills: (tenantId: string | undefined | null) => Promise<SkillMetadata[]>;
1250
+ /** Lazy accessor for the engine used for VFS reads when a skill's source is `vfs`. */
1251
+ storageEngine?: () => StorageEngine | undefined;
1225
1252
  onActivateSkill?: (name: string) => Promise<string[]> | string[];
1226
1253
  onDeactivateSkill?: (name: string) => Promise<string[]> | string[];
1227
1254
  onListActiveSkills?: () => string[];
1228
1255
  isScriptAllowed?: (skill: string, scriptPath: string) => boolean;
1229
1256
  isRootScriptAllowed?: (scriptPath: string) => boolean;
1230
- }) => ToolDefinition[];
1257
+ }
1258
+ declare const createSkillTools: (options: CreateSkillToolsOptions) => ToolDefinition[];
1231
1259
  declare const normalizeScriptPolicyPath: (relativePath: string) => string;
1232
1260
 
1233
1261
  declare const createReminderTools: (store: ReminderStore) => ToolDefinition[];
@@ -1810,4 +1838,4 @@ declare class AgentOrchestrator {
1810
1838
  recoverStaleSubagents(): Promise<void>;
1811
1839
  }
1812
1840
 
1813
- export { type ActiveConversationRun, type ActiveSubagentRun, type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, AgentOrchestrator, type ApprovalEventItem, type ArchivedToolResult$1 as ArchivedToolResult, type BashConfig, BashEnvironmentManager, type BashExecutionLimits, type BuiltInToolToggles, CALLBACK_LOCK_STALE_MS, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type ContinuationHooks, type Conversation, type ConversationCreateInit, type ConversationState, type ConversationStatusSnapshot, type ConversationStore, type ConversationSummary, type CronJobConfig, type EventSink, type ExecuteTurnResult, type HarnessOptions, type HarnessRunOutput, type HistorySource, InMemoryConversationStore, InMemoryEngine, InMemoryStateStore, type IsolateBinding, type IsolateConfig, LocalMcpBridge, LocalUploadStore, MAX_CONCURRENT_SUBAGENTS, MAX_CONTINUATION_COUNT, MAX_SUBAGENT_CALLBACK_COUNT, MAX_SUBAGENT_NESTING, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, type NetworkConfig, OPENAI_CODEX_CLIENT_ID, type OpenAICodexAuthConfig, type OpenAICodexDeviceAuthRequest, type OpenAICodexSession, type OrchestratorHooks, type OrchestratorOptions, type OtlpConfig, type OtlpOption, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PendingSubagentApproval, type PendingSubagentResult, type PendingToolCall, type PonchoConfig, PonchoFsAdapter, PostgresEngine, type ProviderConfig, type Recurrence, type RecurrenceType, type Reminder, type ReminderCreateInput, type ReminderStatus, type ReminderStore, type RemoteMcpServerConfig, type RunOutcome, type RunRequest, type RuntimeRenderContext, S3UploadStore, STALE_SUBAGENT_THRESHOLD_MS, STORAGE_SCHEMA_VERSION, type SecretsStore, type SkillContextEntry, type SkillMetadata, SqliteEngine, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type StorageEngine, type StorageFactoryOptions, type StorageProvider, type StoredApproval, type SubagentManager, type SubagentResult, type SubagentSpawnResult, type SubagentSummary, TOOL_RESULT_ARCHIVE_PARAM, type TelemetryConfig, TelemetryEmitter, type TenantTokenPayload, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type TurnDraftState, type TurnResultMetadata, type TurnSection, type UploadStore, type UploadsConfig, VFS_SCHEME, VercelBlobUploadStore, type VfsDirEntry, type VfsStat, applyTurnMetadata, buildAgentDirectoryName, buildApprovalCheckpoints, buildAssistantMetadata, buildSkillContextWindow, buildToolCompletedText, cloneSections, compactMessages, completeOpenAICodexDeviceAuth, computeNextOccurrence, createBashTool, createConversationStore, createConversationStoreFromEngine, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryStoreFromEngine, createMemoryTools, createModelProvider, createReminderStore, createReminderStoreFromEngine, createReminderTools, createSearchTools, createSecretsStore, createSkillTools, createStateStore, createStorageEngine, createSubagentTools, createTodoStoreFromEngine, createTurnDraftState, createUploadStore, createWriteTool, deleteOpenAICodexSession, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, executeConversationTurn, findSafeSplitPoint, flushTurnDraft, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getOpenAICodexAccessToken, getOpenAICodexAuthFilePath, getOpenAICodexRequiredScopes, getPonchoStoreRoot, isMessageArray, jsonSchemaToZod, loadCanonicalHistory, loadPonchoConfig, loadRunHistory, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeApprovalCheckpoint, normalizeOtlp, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, ponchoDocsTool, readOpenAICodexSession, readSkillResource, recordStandardTurnEvent, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveEnv, resolveMemoryConfig, resolveRunRequest, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent, startOpenAICodexDeviceAuth, verifyTenantToken, withToolResultArchiveParam, writeOpenAICodexSession };
1841
+ export { type ActiveConversationRun, type ActiveSubagentRun, type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, AgentOrchestrator, type ApprovalEventItem, type ArchivedToolResult$1 as ArchivedToolResult, type BashConfig, BashEnvironmentManager, type BashExecutionLimits, type BuiltInToolToggles, CALLBACK_LOCK_STALE_MS, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type ContinuationHooks, type Conversation, type ConversationCreateInit, type ConversationState, type ConversationStatusSnapshot, type ConversationStore, type ConversationSummary, type CreateSkillToolsOptions, type CronJobConfig, type EventSink, type ExecuteTurnResult, type HarnessOptions, type HarnessRunOutput, type HistorySource, InMemoryConversationStore, InMemoryEngine, InMemoryStateStore, type IsolateBinding, type IsolateConfig, LocalMcpBridge, LocalUploadStore, MAX_CONCURRENT_SUBAGENTS, MAX_CONTINUATION_COUNT, MAX_SUBAGENT_CALLBACK_COUNT, MAX_SUBAGENT_NESTING, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, type NetworkConfig, OPENAI_CODEX_CLIENT_ID, type OpenAICodexAuthConfig, type OpenAICodexDeviceAuthRequest, type OpenAICodexSession, type OrchestratorHooks, type OrchestratorOptions, type OtlpConfig, type OtlpOption, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PendingSubagentApproval, type PendingSubagentResult, type PendingToolCall, type PonchoConfig, PonchoFsAdapter, PostgresEngine, type ProviderConfig, type Recurrence, type RecurrenceType, type Reminder, type ReminderCreateInput, type ReminderStatus, type ReminderStore, type RemoteMcpServerConfig, type RunOutcome, type RunRequest, type RuntimeRenderContext, S3UploadStore, STALE_SUBAGENT_THRESHOLD_MS, STORAGE_SCHEMA_VERSION, type SecretsStore, type SkillContextEntry, type SkillMetadata, type SkillSource, SqliteEngine, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type StorageEngine, type StorageFactoryOptions, type StorageProvider, type StoredApproval, type SubagentManager, type SubagentResult, type SubagentSpawnResult, type SubagentSummary, TOOL_RESULT_ARCHIVE_PARAM, type TelemetryConfig, TelemetryEmitter, type TenantTokenPayload, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type TurnDraftState, type TurnResultMetadata, type TurnSection, type UploadStore, type UploadsConfig, VFS_SCHEME, VercelBlobUploadStore, type VfsDirEntry, type VfsStat, applyTurnMetadata, buildAgentDirectoryName, buildApprovalCheckpoints, buildAssistantMetadata, buildSkillContextWindow, buildToolCompletedText, cloneSections, compactMessages, completeOpenAICodexDeviceAuth, computeNextOccurrence, createBashTool, createConversationStore, createConversationStoreFromEngine, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryStoreFromEngine, createMemoryTools, createModelProvider, createReminderStore, createReminderStoreFromEngine, createReminderTools, createSearchTools, createSecretsStore, createSkillTools, createStateStore, createStorageEngine, createSubagentTools, createTodoStoreFromEngine, createTurnDraftState, createUploadStore, createWriteTool, deleteOpenAICodexSession, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, executeConversationTurn, findSafeSplitPoint, flushTurnDraft, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getOpenAICodexAccessToken, getOpenAICodexAuthFilePath, getOpenAICodexRequiredScopes, getPonchoStoreRoot, isMessageArray, jsonSchemaToZod, loadCanonicalHistory, loadPonchoConfig, loadRunHistory, loadSkillContext, loadSkillInstructions, loadSkillMetadata, loadVfsSkillMetadata, mergeSkills, normalizeApprovalCheckpoint, normalizeOtlp, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, parseSkillFrontmatter, ponchoDocsTool, readOpenAICodexSession, readSkillResource, recordStandardTurnEvent, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveEnv, resolveMemoryConfig, resolveRunRequest, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent, startOpenAICodexDeviceAuth, verifyTenantToken, withToolResultArchiveParam, writeOpenAICodexSession };