Commit Graph

18 Commits

Author SHA1 Message Date
Chris Farhood 0fcc6f01c1 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>
2026-04-24 22:06:07 +00:00
Chris Farhood 3ed6e95085 feat: RBAC checks, ./cli export, adapter-utils range, models.ts
- Add secrets (create/delete/get) and persistentvolumeclaims (get) RBAC checks to testEnvironment
- Add ./cli export and picocolors dependency to package.json
- Change @paperclipai/adapter-utils peer dep to >= range
- Add src/server/models.ts with listK8sModels() returning OpenCode provider-prefixed model IDs
- Wire listModels into ServerAdapterModule (replaces static undefined models field)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-24 21:58:00 +00:00
Paperclip ea4db3ba9b chore: unscope package name to paperclip-adapter-opencode-k8s
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-21 10:26:43 +00:00
Chris Farhood f728db0d1a Bump version to 0.1.16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 23:45:26 -04:00
Chris Farhood 832ead94a3 Bump version to 0.1.15 for capability flag release
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:24:40 -04:00
Chris Farhood 4b6da9b17b Update adapter-utils to canary with capability flag types
Upgrade from ^2026.411.0-canary.8 to 2026.415.0-canary.7 to get
ServerAdapterModule capability flag fields (supportsInstructionsBundle,
instructionsPathKey, requiresMaterializedRuntimeSkills).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 20:20:04 -04:00
Pawla Abdul e53bcf2501 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>
2026-04-14 11:00:33 +00:00
Pawla Abdul b59f571e0b Fix peer dependency conflict by relaxing adapter-utils requirement
The peer dependency on @paperclipai/adapter-utils was pinned to
>=2026.411.0-canary.8 which conflicts with the stable 2026.403.0
version used by other adapters (claude-k8s, hermes-k8s). Since the
canary types (AdapterConfigSchema, getConfigSchema on ServerAdapterModule)
are only needed at compile time, we can safely relax the peer dep to
>=0.3.0 while keeping the canary as a devDependency for our own build.

Bumps version to 0.1.13.

Closes FAR-49

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-12 16:58:09 +00:00
Pawla Abdul 241da1d4f9 Use rich TranscriptEntry kinds in UI parser for pretty output
The UI parser was mapping all OpenCode JSONL events to plain stdout/stderr
transcript entries, causing the Paperclip UI to render everything as raw
terminal output. Updated parseStdoutLine to use structured kinds:

- text events → "assistant" (renders as chat bubbles)
- tool_use events → "tool_call" / "tool_result" (shows tool invocations)
- step_finish events → "result" (shows token/cost metrics)
- step_start events → "system" (shows step transitions)
- assistant events → "assistant" (nested content blocks)

Fixes FAR-43.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-12 15:15:19 +00:00
Pawla Abdul faa5f09984 Upgrade adapter-utils to canary with getConfigSchema type support
The UI wasn't surfacing config parameters because getConfigSchema wasn't
part of the ServerAdapterModule interface in adapter-utils >=0.3.0. The
canary release (2026.411.0-canary.8) adds ConfigFieldSchema,
AdapterConfigSchema, and getConfigSchema to the type. This removes the
local type augmentation workaround and the unsafe `as ServerAdapterModule`
cast, letting TypeScript properly validate the schema contract.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-12 14:58:07 +00:00
Chris Farhood 2927d3e47e Bump version to 0.1.10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 09:52:09 -04:00
Chris Farhood 1b3d4b6dfe Bump version to 0.1.9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 09:28:33 -04:00
Chris Farhood bbd579e7e2 Bump version to 0.1.8
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:58:45 -04:00
Chris Farhood 66893dc286 Bump version to 0.1.7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:33:25 -04:00
Chris Farhood ce666f6b54 Read all env vars from pod spec instead of static allowlist
- Remove INHERITED_ENV_KEYS; read directly from mainContainer.env
- Any Deployment env var is now forwarded automatically to Job pods
- Layer ordering preserved: pod spec → paperclip vars → agent config env

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:31:43 -04:00
Chris Farhood 6866da42bf Add tests, free-text model field, and K8s job improvements
- Add vitest with 26 passing tests for parse and job-manifest
- Set models to undefined for free-text model input
- Add fsGroupChangePolicy: "OnRootMismatch" to reduce volume chown delays
- Change job name prefix to agent-opencode- for adapter identification
- Add .npmrc to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 08:14:57 -04:00
Chris Farhood 75f54b1edc Update package name to @farhoodliquor scope and refresh README
- Rename to @farhoodliquor/paperclip-adapter-opencode-k8s
- Add .gitignore
- Emphasize RWX PVC requirement in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 23:18:12 -04:00
Chris Farhood be7c525063 Initial commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 23:08:05 -04:00