Replace local utility stubs with fork's adapter-utils imports

- Replace joinPromptSections, stringifyPaperclipWakePayload, and
  renderPaperclipWakePrompt with imports from adapter-utils/server-utils
  (the fork's renderPaperclipWakePrompt adds execution stage routing,
  resume delta sections, and full comment batch rendering)
- Replace local inferOpenAiCompatibleBiller with import from adapter-utils
- Declare sessionManagement using getAdapterSessionManagement("opencode_local")
  with fallback defaults for proper session compaction policy
- Add log redaction via redactHomePathUserSegments in streamPodLogs
- Bump peerDependency to >=0.3.1 and version to 0.1.14

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-14 11:00:33 +00:00
parent 193e68e99d
commit e53bcf2501
5 changed files with 22 additions and 52 deletions
+11
View File
@@ -1,4 +1,5 @@
import type { ServerAdapterModule } from "@paperclipai/adapter-utils";
import { getAdapterSessionManagement } from "@paperclipai/adapter-utils";
import { type, models, agentConfigurationDoc } from "../index.js";
import { execute } from "./execute.js";
import { testEnvironment } from "./test.js";
@@ -15,6 +16,16 @@ export function createServerAdapter(): ServerAdapterModule {
supportsLocalAgentJwt: true,
agentConfigurationDoc,
getConfigSchema,
sessionManagement: getAdapterSessionManagement("opencode_local") ?? {
supportsSessionResume: true,
nativeContextManagement: "unknown",
defaultSessionCompaction: {
enabled: true,
maxSessionRuns: 20,
maxRawInputTokens: 500_000,
maxSessionAgeHours: 24,
},
},
};
}