feat: instructionsFilePath config field + skill bundle materialization

- config-schema: add instructionsFilePath UI field (Core group, text type)
- server/index.ts: set supportsInstructionsBundle=true, instructionsPathKey="instructionsFilePath"
- execute.ts: read instructionsFilePath file + desired skill markdown files from PVC; pass to buildJobManifest as instructionsContent / skillsBundleContent
- job-manifest.ts: accept instructionsContent + skillsBundleContent in JobBuildInput; prepend both to prompt via joinPromptSections; add instructionsChars + skillsBundleChars to promptMetrics
- index.ts: document instructionsFilePath and skills injection in agentConfigurationDoc
- CLAUDE.md: document skill materialization (ephemeral mode) and instructionsFilePath field
- Bump version to 0.1.18

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-04-24 22:06:07 +00:00
parent 13c2a3032b
commit 0fcc6f01c1
6 changed files with 37 additions and 17 deletions
+4 -1
View File
@@ -26,6 +26,7 @@ Core fields:
- model (string, required): OpenCode model id in provider/model format (e.g. anthropic/claude-sonnet-4-6)
- variant (string, optional): provider-specific reasoning/profile variant passed as --variant
- dangerouslySkipPermissions (boolean, optional): inject runtime config with permission.external_directory=allow; defaults to true
- instructionsFilePath (string, optional): absolute path to a markdown instructions file (e.g. AGENTS.md on the PVC); content is prepended to every run prompt as system instructions
- promptTemplate (string, optional): run prompt template
- extraArgs (string[], optional): additional CLI args appended to the opencode command
- env (object, optional): KEY=VALUE environment variables; overrides inherited vars from the Deployment
@@ -54,7 +55,9 @@ Inherited from Deployment (no config needed):
Notes:
- Session resume works via the shared /paperclip PVC (HOME=/paperclip)
- Skills are bundled in the container image
- Skills configured in Paperclip have their markdown content read from the PVC and prepended to each run prompt
- Desired skills are resolved from config (paperclipSkills / paperclipRuntimeSkills) at execute time
- instructionsFilePath content is prepended before skill content, then before the task prompt
- Prompts are delivered via a busybox init container writing to an emptyDir volume
- Runtime config (permission.external_directory=allow) is written inside the Job container
- OPENCODE_DISABLE_PROJECT_CONFIG=true is always set to prevent config file pollution
+7
View File
@@ -11,6 +11,13 @@ export function getConfigSchema(): AdapterConfigSchema {
hint: "Provider-specific reasoning/profile variant passed as --variant",
group: "Core",
},
{
key: "instructionsFilePath",
label: "Instructions File Path",
type: "text",
hint: "Absolute path to a markdown file (e.g. AGENTS.md) prepended as system instructions before the task prompt",
group: "Core",
},
{
key: "dangerouslySkipPermissions",
label: "Skip Permission Checks",
+2 -2
View File
@@ -20,8 +20,8 @@ export function createServerAdapter(): ServerAdapterModule {
supportsLocalAgentJwt: true,
agentConfigurationDoc,
getConfigSchema,
supportsInstructionsBundle: false,
instructionsPathKey: undefined,
supportsInstructionsBundle: true,
instructionsPathKey: "instructionsFilePath",
requiresMaterializedRuntimeSkills: false,
sessionManagement: getAdapterSessionManagement("opencode_local") ?? {
supportsSessionResume: true,