@poncho-ai/harness 0.29.0 → 0.31.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.29.0 build /Users/cesar/Dev/latitude/poncho-ai/packages/harness
2
+ > @poncho-ai/harness@0.31.0 build /Users/cesar/Dev/latitude/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,8 +8,8 @@
8
8
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/index.js 297.56 KB
12
- ESM ⚡️ Build success in 32ms
11
+ ESM dist/index.js 314.45 KB
12
+ ESM ⚡️ Build success in 89ms
13
13
  DTS Build start
14
- DTS ⚡️ Build success in 4608ms
15
- DTS dist/index.d.ts 30.41 KB
14
+ DTS ⚡️ Build success in 4040ms
15
+ DTS dist/index.d.ts 32.56 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @poncho-ai/harness
2
2
 
3
+ ## 0.31.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add OpenAI Codex OAuth provider support with one-time auth bootstrap and runtime token refresh.
8
+
9
+ This adds `openai-codex` model provider support, `poncho auth` login/status/logout/export commands, onboarding updates, and Codex request compatibility handling for OAuth-backed Responses API calls.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies []:
14
+ - @poncho-ai/sdk@1.7.0
15
+
16
+ ## 0.30.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [`193c367`](https://github.com/cesr/poncho-ai/commit/193c367568dce22a470dff6acd022c221be3b722) Thanks [@cesr](https://github.com/cesr)! - Unified continuation logic across all entry points (chat, cron, subagents, SDK) with mid-stream soft deadline checkpointing and proper context preservation across continuation boundaries.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [[`193c367`](https://github.com/cesr/poncho-ai/commit/193c367568dce22a470dff6acd022c221be3b722)]:
25
+ - @poncho-ai/sdk@1.6.3
26
+
3
27
  ## 0.29.0
4
28
 
5
29
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -176,6 +176,10 @@ interface Conversation {
176
176
  /** Harness-internal message chain preserved across continuation runs.
177
177
  * Cleared when a run completes without continuation. */
178
178
  _continuationMessages?: Message[];
179
+ /** Number of continuation pickups for the current multi-step run.
180
+ * Reset when a run completes without continuation. Used to enforce
181
+ * a maximum continuation count across all entry points. */
182
+ _continuationCount?: number;
179
183
  /** Full structured message chain from the last harness run, including
180
184
  * tool-call and tool-result messages the model needs for context.
181
185
  * Unlike `_continuationMessages`, this is always set after a run
@@ -410,6 +414,13 @@ interface PonchoConfig extends McpConfig {
410
414
  openai?: {
411
415
  apiKeyEnv?: string;
412
416
  };
417
+ openaiCodex?: {
418
+ refreshTokenEnv?: string;
419
+ accessTokenEnv?: string;
420
+ accessTokenExpiresAtEnv?: string;
421
+ accountIdEnv?: string;
422
+ authFilePathEnv?: string;
423
+ };
413
424
  anthropic?: {
414
425
  apiKeyEnv?: string;
415
426
  };
@@ -529,6 +540,38 @@ interface TodoItem {
529
540
  updatedAt: number;
530
541
  }
531
542
 
543
+ declare const OPENAI_CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
544
+ interface OpenAICodexAuthConfig {
545
+ refreshTokenEnv?: string;
546
+ accessTokenEnv?: string;
547
+ accessTokenExpiresAtEnv?: string;
548
+ accountIdEnv?: string;
549
+ authFilePathEnv?: string;
550
+ }
551
+ interface OpenAICodexSession {
552
+ refreshToken: string;
553
+ accessToken?: string;
554
+ accessTokenExpiresAt?: number;
555
+ accountId?: string;
556
+ }
557
+ declare const getOpenAICodexAuthFilePath: (config?: OpenAICodexAuthConfig) => string;
558
+ declare const readOpenAICodexSession: (config?: OpenAICodexAuthConfig) => Promise<OpenAICodexSession | undefined>;
559
+ declare const writeOpenAICodexSession: (session: OpenAICodexSession, config?: OpenAICodexAuthConfig) => Promise<void>;
560
+ declare const deleteOpenAICodexSession: (config?: OpenAICodexAuthConfig) => Promise<void>;
561
+ declare const getOpenAICodexAccessToken: (config?: OpenAICodexAuthConfig) => Promise<{
562
+ accessToken: string;
563
+ accountId?: string;
564
+ }>;
565
+ interface OpenAICodexDeviceAuthRequest {
566
+ deviceAuthId: string;
567
+ userCode: string;
568
+ verificationUrl: string;
569
+ intervalMs: number;
570
+ }
571
+ declare const getOpenAICodexRequiredScopes: () => string[];
572
+ declare const startOpenAICodexDeviceAuth: () => Promise<OpenAICodexDeviceAuthRequest>;
573
+ declare const completeOpenAICodexDeviceAuth: (request: OpenAICodexDeviceAuthRequest) => Promise<OpenAICodexSession>;
574
+
532
575
  type ModelProviderFactory = (modelName: string) => LanguageModel;
533
576
  /**
534
577
  * Returns the context window size (in tokens) for a given model name.
@@ -540,6 +583,7 @@ interface ProviderConfig {
540
583
  openai?: {
541
584
  apiKeyEnv?: string;
542
585
  };
586
+ openaiCodex?: OpenAICodexAuthConfig;
543
587
  anthropic?: {
544
588
  apiKeyEnv?: string;
545
589
  };
@@ -842,4 +886,4 @@ declare class TelemetryEmitter {
842
886
 
843
887
  declare const createSubagentTools: (manager: SubagentManager) => ToolDefinition[];
844
888
 
845
- export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type Conversation, type ConversationState, type ConversationStore, type ConversationSummary, type CronJobConfig, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, LocalUploadStore, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, type OtlpConfig, type OtlpOption, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PendingSubagentResult, type PonchoConfig, type ProviderConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, S3UploadStore, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type SubagentManager, type SubagentResult, type SubagentSpawnResult, type SubagentSummary, type TelemetryConfig, TelemetryEmitter, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type UploadStore, type UploadsConfig, VercelBlobUploadStore, buildAgentDirectoryName, buildSkillContextWindow, compactMessages, createConversationStore, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryTools, createModelProvider, createSearchTools, createSkillTools, createStateStore, createSubagentTools, createUploadStore, createWriteTool, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, findSafeSplitPoint, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeOtlp, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, ponchoDocsTool, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent };
889
+ export { type AgentFrontmatter, AgentHarness, type AgentIdentity, type AgentLimitsConfig, type AgentModelConfig, type BuiltInToolToggles, type CompactMessagesOptions, type CompactResult, type CompactionConfig, type Conversation, type ConversationState, type ConversationStore, type ConversationSummary, type CronJobConfig, type HarnessOptions, type HarnessRunOutput, InMemoryConversationStore, InMemoryStateStore, LatitudeCapture, type LatitudeCaptureConfig, LocalMcpBridge, LocalUploadStore, type MainMemory, type McpConfig, type MemoryConfig, type MemoryStore, type MessagingChannelConfig, type ModelProviderFactory, OPENAI_CODEX_CLIENT_ID, type OpenAICodexAuthConfig, type OpenAICodexDeviceAuthRequest, type OpenAICodexSession, type OtlpConfig, type OtlpOption, PONCHO_UPLOAD_SCHEME, type ParsedAgent, type PendingSubagentResult, type PonchoConfig, type ProviderConfig, type RemoteMcpServerConfig, type RuntimeRenderContext, S3UploadStore, STORAGE_SCHEMA_VERSION, type SkillContextEntry, type SkillMetadata, type StateConfig, type StateProviderName, type StateStore, type StorageConfig, type SubagentManager, type SubagentResult, type SubagentSpawnResult, type SubagentSummary, type TelemetryConfig, TelemetryEmitter, type ToolAccess, type ToolCall, ToolDispatcher, type ToolExecutionResult, type UploadStore, type UploadsConfig, VercelBlobUploadStore, buildAgentDirectoryName, buildSkillContextWindow, compactMessages, completeOpenAICodexDeviceAuth, createConversationStore, createDefaultTools, createDeleteDirectoryTool, createDeleteTool, createEditTool, createMemoryStore, createMemoryTools, createModelProvider, createSearchTools, createSkillTools, createStateStore, createSubagentTools, createUploadStore, createWriteTool, deleteOpenAICodexSession, deriveUploadKey, ensureAgentIdentity, estimateTokens, estimateTotalTokens, findSafeSplitPoint, generateAgentId, getAgentStoreDirectory, getModelContextWindow, getOpenAICodexAccessToken, getOpenAICodexAuthFilePath, getOpenAICodexRequiredScopes, getPonchoStoreRoot, jsonSchemaToZod, loadPonchoConfig, loadSkillContext, loadSkillInstructions, loadSkillMetadata, normalizeOtlp, normalizeScriptPolicyPath, parseAgentFile, parseAgentMarkdown, ponchoDocsTool, readOpenAICodexSession, readSkillResource, renderAgentPrompt, resolveAgentIdentity, resolveCompactionConfig, resolveMemoryConfig, resolveSkillDirs, resolveStateConfig, slugifyStorageComponent, startOpenAICodexDeviceAuth, writeOpenAICodexSession };