feat(kit): materialize the agent-context profile beside the workspace

agent-context@1 was listed as supported, but a Kit's contributed guidance
never reached the agent. At container create archie now writes the
workload's profile file (CLAUDE.md, AGENTS.md, ...) beside the workspace
with a Kits index: a staged body is pointed at where the image holds it,
an inline one gets its own file the index points at. The profile never
inlines a Kit's text. The files are written as root, so a run can read
but not change them, and are rewritten on every create.

The workspace moves to /archie/workspace so the profile sits in a real
parent directory rather than /, which some CLIs stop short of when they
look upward for instruction files.

Part of archie-core-egkf.6.
This commit is contained in:
sam committed 2026-09-28 02:12:29 +10:00
1 parent 70f9b1b87c
commit 525dbb14a7
3 files changed
+111 -4

No files matched your search

+5
View File
@@ -91,6 +91,11 @@ func StartKit(ctx context.Context, cli *client.Client, s KitSpec) (string, error
return fail(fmt.Errorf("write kit file %s: %w", f.Path, err))
}
}
for _, f := range s.Launch.Context {
if err := writeKitFile(ctx, cli, created.ID, "0", f.Path, f.Content, f.Mode, nil); err != nil {
return fail(fmt.Errorf("write agent context %s: %w", f.Path, err))
}
}
for i, h := range s.Launch.Startup {
if err := runHook(ctx, cli, created.ID, h); err != nil {
return fail(fmt.Errorf("startup hook %d: %w", i+1, err))