An open-source, faster Devin alternative
TypeScript
feat: surface prompt-defined Flue repositories
Igor Zalutskiecb542e9fb71
diff --git a/cmd/oc/internal/commands/agent_build.go b/cmd/oc/internal/commands/agent_build.goindex 2dda6158..936821a7 100644--- a/cmd/oc/internal/commands/agent_build.go+++ b/cmd/oc/internal/commands/agent_build.go@@ -32,11 +32,12 @@ var agentBuildCmd = &cobra.Command{}result, err := fluebuild.Build(cmd.Context(), fluebuild.Options{- Dir: dir,- Target: target,- OutputDir: output,- BuilderVersion: Version,- CheckOnly: checkOnly,+ Dir: dir,+ Target: target,+ OutputDir: output,+ BuilderVersion: Version,+ SynthesisTemplateVersion: os.Getenv("OC_FLUE_SYNTH_TEMPLATE_VERSION"),+ CheckOnly: checkOnly,})if err != nil {return errdiff --git a/cmd/oc/internal/commands/agent_deploy_flue.go b/cmd/oc/internal/commands/agent_deploy_flue.goindex eef1ba1b..dc987743 100644--- a/cmd/oc/internal/commands/agent_deploy_flue.go+++ b/cmd/oc/internal/commands/agent_deploy_flue.go@@ -19,6 +19,7 @@ import ("io""net/http""os"+ "path/filepath""time""github.com/opensandbox/opensandbox/cmd/oc/internal/client"@@ -38,6 +39,11 @@ type artifactUploadResponse struct {}func deployFlue(cmd *cobra.Command, sc *client.Client, dir string, m *manifest, noActivate bool) error {+ if isPromptDefinedFlueRoot(dir) {+ return fmt.Errorf(+ "prompt-defined Flue agents currently deploy from GitHub: push this directory, then choose Agents → Create agent → Import from GitHub",+ )+ }// 1. Run the same credential, manifest, engine, and lockfile projection as// the managed builder before any authenticated API call. --check-only// never executes repository code and never needs installed dependencies.@@ -156,6 +162,28 @@ func deployFlue(cmd *cobra.Command, sc *client.Client, dir string, m *manifest,return nil}+func isPromptDefinedFlueRoot(dir string) bool {+ regular := func(name string) bool {+ info, err := os.Lstat(name)+ return err == nil && info.Mode().IsRegular()+ }+ if !regular(filepath.Join(dir, "prompt.md")) {+ return false+ }+ for _, marker := range []string{+ "package.json",+ "flue.config.ts",+ "flue.config.js",+ "flue.config.mjs",+ "flue.config.cjs",+ } {+ if _, err := os.Lstat(filepath.Join(dir, marker)); err == nil {+ return false+ }+ }+ return true+}+func presentFlueBuildError(err error) error {var credentialErr *fluebuild.CredentialErrorif !errors.As(err, &credentialErr) {diff --git a/cmd/oc/internal/commands/agent_deploy_flue_test.go b/cmd/oc/internal/commands/agent_deploy_flue_test.goindex 3ced6f88..d74f4a6e 100644--- a/cmd/oc/internal/commands/agent_deploy_flue_test.go+++ b/cmd/oc/internal/commands/agent_deploy_flue_test.go@@ -441,6 +441,30 @@ func TestDeployFlueBlocksOnLeakedKey(t *testing.T) {}}+func TestPromptDefinedFlueRootGetsGithubRecoveryInsteadOfNpmError(t *testing.T) {+ dir := t.TempDir()+ writeFile(t, filepath.Join(dir, "prompt.md"), "Help the user.\n", 0o644)+ if !isPromptDefinedFlueRoot(dir) {+ t.Fatal("expected prompt-defined root")+ }+ cmd := &cobra.Command{}+ cmd.SetContext(context.Background())+ err := deployFlue(+ cmd,+ client.NewSessionsAPI("http://127.0.0.1:0", "must-not-be-used"),+ dir,+ &manifest{},+ false,+ )+ if err == nil || !strings.Contains(err.Error(), "deploy from GitHub") {+ t.Fatalf("expected GitHub recovery, got %v", err)+ }+ writeFile(t, filepath.Join(dir, "package.json"), "{}\n", 0o644)+ if isPromptDefinedFlueRoot(dir) {+ t.Fatal("a package marker must select the complete-app path")+ }+}+func writeFile(t *testing.T, path, content string, mode os.FileMode) {t.Helper()if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {diff --git a/cmd/oc/internal/commands/agent_init.go b/cmd/oc/internal/commands/agent_init.goindex 596235f9..c7e230b7 100644--- a/cmd/oc/internal/commands/agent_init.go+++ b/cmd/oc/internal/commands/agent_init.go@@ -12,7 +12,7 @@ const agentTomlTmpl = `name = %qmodel = %q[runtime]-family = %q # claude | codex | pi+family = %q # claude | codex | pi | fluetype = "default"[limits]@@ -40,6 +40,7 @@ var agentInitCmd = &cobra.Command{Short: "Scaffold a deployable agent directory (agent.toml + prompt.md + skills/)",Example: " oc agent init\n" +" oc agent init ./agents/triage --name triage --model anthropic/claude-sonnet-5\n" ++ " oc agent init ./agents/edge --runtime flue\n" +" oc agent init && $EDITOR prompt.md && oc agent deploy",Args: cobra.MaximumNArgs(1),RunE: func(cmd *cobra.Command, args []string) error {@@ -79,7 +80,14 @@ var agentInitCmd = &cobra.Command{fmt.Printf(" create %s\n", f.path)created++}- fmt.Printf("\nScaffolded %d file(s). Edit prompt.md, then: oc agent deploy %s\n", created, dir)+ if runtime == "flue" {+ fmt.Printf(+ "\nScaffolded %d file(s). Edit prompt.md, push this directory to GitHub, then import it from Agents → Create agent.\n",+ created,+ )+ } else {+ fmt.Printf("\nScaffolded %d file(s). Edit prompt.md, then: oc agent deploy %s\n", created, dir)+ }return nil},}@@ -87,5 +95,5 @@ var agentInitCmd = &cobra.Command{func init() {agentInitCmd.Flags().String("name", "", "Agent name (default: the directory name)")agentInitCmd.Flags().String("model", "anthropic/claude-sonnet-5", "Model")- agentInitCmd.Flags().String("runtime", "claude", "Runtime family (claude|codex|pi)")+ agentInitCmd.Flags().String("runtime", "claude", "Runtime family (claude|codex|pi|flue)")}diff --git a/cmd/oc/internal/fluebuild/fluebuild.go b/cmd/oc/internal/fluebuild/fluebuild.goindex 3259c14f..1dec6ef7 100644--- a/cmd/oc/internal/fluebuild/fluebuild.go+++ b/cmd/oc/internal/fluebuild/fluebuild.go@@ -72,7 +72,8 @@ type Bundle struct {}type Builder struct {- Version string `json:"version"`+ Version string `json:"version"`+ SynthesisTemplate string `json:"synthesis_template,omitempty"`}// Vars is named so callers cannot accidentally replace the manifest-derived@@ -133,9 +134,11 @@ type Options struct {OutputDir stringBuilderVersion stringNodeVersion string- CheckOnly bool- BuildStdout io.Writer- BuildStderr io.Writer+ // SynthesisTemplateVersion is a trusted managed-builder identity; local builds leave it empty.+ SynthesisTemplateVersion string+ CheckOnly bool+ BuildStdout io.Writer+ BuildStderr io.Writer}type Result struct {@@ -181,7 +184,7 @@ func Build(ctx context.Context, opts Options) (Result, error) {opts.BuilderVersion = "oc@" + opts.BuilderVersion}- projection, err := inspect(ctx, opts.Dir, opts.BuilderVersion, opts.NodeVersion)+ projection, err := inspect(ctx, opts.Dir, opts.BuilderVersion, opts.NodeVersion, opts.SynthesisTemplateVersion)if err != nil {return Result{}, err}@@ -276,6 +279,12 @@ func ValidateDeployment(deployment Deployment, requireArtifact bool) error {if !strings.HasPrefix(deployment.Builder.Version, "oc@") || strings.TrimPrefix(deployment.Builder.Version, "oc@") == "" {return fmt.Errorf("deployment builder.version must use oc@<version>")}+ if deployment.Builder.SynthesisTemplate != "" {+ valid := regexp.MustCompile(`^[a-z0-9][a-z0-9._-]{0,127}$`)+ if !valid.MatchString(deployment.Builder.SynthesisTemplate) {+ return fmt.Errorf("deployment builder.synthesis_template is invalid")+ }+ }if !requireArtifact {if deployment.Flue.Wrangler != nil || deployment.Bundle != nil {return fmt.Errorf("check-only deployment must omit flue.wrangler and bundle")@@ -298,7 +307,7 @@ func ValidateDeployment(deployment Deployment, requireArtifact bool) error {return nil}-func inspect(ctx context.Context, dir, builderVersion, nodeVersion string) (Deployment, error) {+func inspect(ctx context.Context, dir, builderVersion, nodeVersion, synthesisTemplateVersion string) (Deployment, error) {findings, err := credscan.ScanDir(dir)if err != nil {return Deployment{}, fmt.Errorf("credential scan: %w", err)@@ -381,7 +390,10 @@ func inspect(ctx context.Context, dir, builderVersion, nodeVersion string) (DeplModel: m.Model,Vars: m.Vars,Runtime: m.Runtime,- Builder: Builder{Version: builderVersion},+ Builder: Builder{+ Version: builderVersion,+ SynthesisTemplate: synthesisTemplateVersion,+ },}, nil}diff --git a/cmd/oc/internal/fluebuild/fluebuild_test.go b/cmd/oc/internal/fluebuild/fluebuild_test.goindex 13182632..56d39366 100644--- a/cmd/oc/internal/fluebuild/fluebuild_test.go+++ b/cmd/oc/internal/fluebuild/fluebuild_test.go@@ -55,6 +55,30 @@ func TestCheckOnlyMatchesFrozenProjectionWithoutExecutingRepositoryCode(t *testi}}+func TestCheckOnlyCarriesTrustedSynthesisTemplateIdentity(t *testing.T) {+ dir := copyFixture(t)+ result, err := Build(context.Background(), Options{+ Dir: dir,+ CheckOnly: true,+ BuilderVersion: testBuilderVersion,+ NodeVersion: testNodeVersion,+ SynthesisTemplateVersion: "flue-prompt-template-v1",+ })+ if err != nil {+ t.Fatalf("check-only: %v", err)+ }+ if got := result.Deployment.Builder.SynthesisTemplate; got != "flue-prompt-template-v1" {+ t.Fatalf("synthesis template = %q", got)+ }+ raw, err := json.Marshal(result.Deployment)+ if err != nil {+ t.Fatal(err)+ }+ if !bytes.Contains(raw, []byte(`"synthesis_template":"flue-prompt-template-v1"`)) {+ t.Fatalf("deployment omitted synthesis identity: %s", raw)+ }+}+func TestBuildWritesDeterministicArtifactContract(t *testing.T) {if runtime.GOOS == "windows" {t.Skip("fake Flue binary is a POSIX shell script")diff --git a/docs/agent-sessions/agents.mdx b/docs/agent-sessions/agents.mdxindex d74b9ca1..794a7286 100644--- a/docs/agent-sessions/agents.mdx+++ b/docs/agent-sessions/agents.mdx@@ -9,10 +9,10 @@ An **agent** is a reusable identity, runtime, model, and deployed behavior. Ever<Note>The [dashboard](https://app.opencomputer.dev) starts with **Import fromGitHub** and keeps **Configure manually** available. Repository import- recognizes a complete [Flue](/agent-sessions/flue) app; prompt- or skills-only- folders are not converted into an agent. You can also deploy a local Flue- checkout with `oc agent deploy`. Both Flue paths produce the same deployment- and revision history.+ recognizes both a complete [Flue](/agent-sessions/flue) app and a+ prompt-defined Flue root containing `agent.toml`, `prompt.md`, and optional+ `skills/`. You can also deploy a local full-app checkout with `oc agent+ deploy`. Both paths produce the same deployment and revision history.</Note><CodeGroup>@@ -62,7 +62,7 @@ For a built-in runtime, the only behavior an agent needs is a **model** and a **| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- || **Default agent** | `name` + `model` (+ a prompt) | a working agent on the default runtime — no setup || **+ Skills** | [`SKILL.md` folders](/agent-sessions/skills) (upload a `.zip`, or include in a repo) | reusable procedures the agent loads when relevant — still the default runtime |-| **+ Source-controlled deployment** | link a manually configured built-in agent to `prompt.md` + `skills/`, or import a complete Flue app from a self-contained npm root | versioned [deployments and revisions](/agent-sessions/revisions); Flue imports also include durable build logs |+| **+ Source-controlled deployment** | link a built-in agent to `prompt.md` + `skills/`, or import a prompt-defined or complete Flue app from GitHub | versioned [deployments and revisions](/agent-sessions/revisions); Flue imports also include durable build logs || **+ Custom runtime** _(coming soon)_ | bring your own runtime image | full control of the execution environment |At every built-in rung the agent is a small directory, at most `agent.toml` + `prompt.md` + `skills/`. You can stop at any rung; most agents never go past skills.@@ -71,7 +71,7 @@ At every built-in rung the agent is a small directory, at most `agent.toml` + `pChoose **Agents → Create agent → Import from GitHub**, install the OpenComputer GitHub App if needed, and select a repository, production branch, and root. **Review agent** resolves one exact commit without running repository code.-- A complete Flue root shows its entrypoint, model, Managed model access, and an editable OpenComputer agent name.+- A prompt-defined or complete Flue root shows its entrypoint, model, Managed model access, and an editable OpenComputer agent name.- A broken Flue root explains what must be fixed. OpenComputer does not reinterpret it as another agent type.- An unrecognized root creates nothing. You can choose another folder, fork the Flue starter, or configure a built-in agent manually.- In a monorepo, OpenComputer may suggest bounded candidate folders. You choose one explicitly and review it before deployment.diff --git a/docs/agent-sessions/api-reference.mdx b/docs/agent-sessions/api-reference.mdxindex 957cb17a..c13099d1 100644--- a/docs/agent-sessions/api-reference.mdx+++ b/docs/agent-sessions/api-reference.mdx@@ -451,7 +451,8 @@ the [Deployments & revisions guide](/agent-sessions/revisions).### Review and import a repository agentReview resolves the moving production branch to one exact commit and interprets bounded metadata-without executing repository code. Repository-first import currently accepts the exact Flue result.+without executing repository code. Repository-first import accepts exact `flue-app-v1` and+`flue-prompt-v1` results.`GET /github/deploy-app` returns the installed OpenComputer GitHub App and its pickable repositories.Each repository includes `linked_sources[]` with the owner-scoped `path`, `production_ref`, `status`,@@ -536,6 +537,13 @@ unrecognized root can include up to 20 `candidate_roots` and explicitly reports`exact` includes a deployable `profile` and may proceed to import. No response contains a repositorytoken or source bytes.+For `flue-prompt-v1`, `profile` keeps the same manifest, source, and builder+projection and additionally returns `prompt: { bytes }`,+`skills: { count, bytes, names }`, and+`builder.synthesis_template`. The profile accepts `agent.toml`, `prompt.md`,+and optional `skills/*/SKILL.md`; the server synthesizes the complete Flue app+during the managed build.+The non-exact variants keep the common repository/root/SHA/fingerprint fields shown above and usethese shapes:@@ -559,7 +567,7 @@ these shapes:An unrecognized interpretation has `source_profile: null`, `source_profile_version: null`, and`reason_code: "unrecognized_source"`. Its optional candidate entries are-`{ path, source_profile: "flue-app-v1" | null, summary, marker }`; selecting one always performs a+`{ path, source_profile: "flue-app-v1" | "flue-prompt-v1" | null, summary, marker }`; selecting one always performs anew review. `candidate_roots_truncated` means more matches existed than the bounded response couldreturn, so ask the user to choose a narrower root rather than selecting one automatically.@@ -623,9 +631,9 @@ or repository-root conflict also returns `409` and identifies the existing agentThe source remains linked after import. Its `source_profile`, `source_profile_version`, and`review_fingerprint` describe the reviewed source identity. A later GitHub push that touches the-selected production root automatically creates the next deployment. If that root no longer matches-the imported source profile, the link status becomes `source_profile_changed`; no build starts and-the current active revision remains unchanged.+selected production root automatically creates the next deployment. A `flue-prompt-v1` source may+graduate to `flue-app-v1`. Any other profile change sets the link status to+`source_profile_changed`; no build starts and the current active revision remains unchanged.### Deploy@@ -834,7 +842,7 @@ that deploy auto-activates. Repo/path are server-anchored to the link. Deploymen| `production_ref` | branch that auto-activates on push || `status` | `active`, or a problem: `source_profile_changed`, `path_missing`, `ref_missing` (production branch deleted), `auth_required`, `repo_not_selected`, `app_suspended`, `error` || `latest_seen_sha?` `active_deployed_sha?` | newest sha observed · sha behind the active revision |-| `source_profile?` `source_profile_version?` | server-selected repository interpretation pinned for this link (`flue-app-v1`, version `1`) |+| `source_profile?` `source_profile_version?` | server-selected repository interpretation pinned for this link (`flue-app-v1` or `flue-prompt-v1`, version `1`) || `review_fingerprint?` | digest of the latest accepted, exact-SHA reviewed plan; never source bytes or a credential |## Schedulesdiff --git a/docs/agent-sessions/flue.mdx b/docs/agent-sessions/flue.mdxindex 86e523fd..3b5018ed 100644--- a/docs/agent-sessions/flue.mdx+++ b/docs/agent-sessions/flue.mdx@@ -73,11 +73,47 @@ consumer view used by the dashboard, API, and webhooks. OpenComputer resumes procursor after an interruption, so clients do not need to understand Flue submission ids or streamoffsets.+## Start with a prompt++You do not need to write a Flue application to use its edge runtime. A+prompt-defined Flue repository has this shape:++```text+agent.toml+prompt.md+skills/+ triage/+ SKILL.md+```++Scaffold it with `oc agent init ./support --runtime flue`, or create the files+directly:++```toml agent.toml+name = "support-triage"+model = "anthropic/claude-haiku-4-5"++[runtime]+family = "flue"+```++Import the repository from GitHub. OpenComputer compiles `prompt.md` and up to+32 packaged skills into a pinned Flue application inside the isolated managed+builder. The prompt may be at most 256 KiB; each `SKILL.md` may be at most 256+KiB, with a 2 MiB combined limit. Skill directory names use lowercase letters,+numbers, and hyphens. `mcp.json` is not supported by this profile.++Add `package.json` and a `flue.config.*` file when you need custom tools or+application code. Those full-app markers take precedence over `prompt.md`, and+the next production push graduates the existing agent to the complete Flue app+without replacing its identity or history. Changing the `name` in `agent.toml`+still requires a new agent because it changes the Durable Object lineage.+## Deploy from GitHub-The shortest path for an existing Flue app is the dashboard:+The shortest path for a prompt-defined or complete Flue app is the dashboard:-1. Fork the [Flue starter](https://github.com/diggerhq/oc-flue-starter/fork), or push your own app to GitHub.+1. Push a prompt-defined root to GitHub, fork the [Flue starter](https://github.com/diggerhq/oc-flue-starter/fork), or push your own app.2. Open **Agents → Create agent → Import from GitHub**.3. Install the OpenComputer GitHub App on the repository, then select the repository, production branch, and root directory.4. Choose **Review agent**. OpenComputer resolves one exact commit and checks the root without running repository code.@@ -92,17 +128,20 @@ owning agent, choose another monorepo root, or confirm an inline unlink. Theunlink stops future push deployments for the old agent; it does not delete theagent, active revision, deployment history, or sessions.-The selected root is its own build context and must contain `agent.toml`, `package.json`, and a-committed `package-lock.json`. The package must declare a Node engine compatible with the exact-managed builder version and a semver dependency on the Flue CLI. npm workspaces,-files above the selected root, private registries, submodules, Git LFS, custom install/build-commands, and build-time secrets are not supported.+The selected root is its own build context. A prompt-defined root needs+`agent.toml`, `prompt.md`, and optional `skills/`. A complete app also needs+`package.json` and a committed `package-lock.json`; its package must declare a+Node engine compatible with the exact managed builder version and a semver+dependency on the Flue CLI. npm workspaces, files above the selected root,+private registries, submodules, Git LFS, custom install/build commands, and+build-time secrets are not supported.`agent.toml` is authoritative. If it is malformed, declares an unsupported runtime, or is missingfrom a root that otherwise has strong Flue markers, review returns **This Flue agent needs a fix**.-OpenComputer does not fall back to generated behavior or another runtime. A prompt- or skills-only-folder is unrecognized; use a complete Flue root, choose another folder, fork the starter, or create-a built-in agent manually.+OpenComputer does not fall back to another runtime. A folder containing+`prompt.md` or skills but no `agent.toml` is unrecognized; add the explicit+Flue manifest, choose another folder, fork the starter, or create a built-in+agent manually.For a monorepo, reviewing an unrecognized parent can suggest bounded candidate roots. Selecting acandidate changes the root and performs a fresh review—it never deploys the suggestion automatically.@@ -132,8 +171,9 @@ revision **#1**. **Deploy latest** can manually rebuild its current head after afailure.If a later production push removes or replaces the Flue definition, the deployment stops before-build with `source_profile_changed`; the active revision stays live. Restore the Flue app in the-linked root, or unlink the source and import the repository as a new agent. Unlinking does not delete+build with `source_profile_changed`; the active revision stays live. A prompt-defined root may+graduate to a complete Flue app, but not in the opposite direction. Otherwise restore the previous+profile, or unlink the source and import the repository as a new agent. Unlinking does not deletethe existing agent, its active revision, or its sessions.## Deploy from your machine@@ -141,6 +181,10 @@ the existing agent, its active revision, or its sessions.Requirements: Node 22.19 or newer, the `oc` CLI, and an OpenComputer organization with Managed modelaccess.+Local deployment currently builds a complete Flue app. Import a prompt-defined+root from GitHub; `oc agent deploy` points to that path instead of reporting a+missing npm package.+```shgit clone https://github.com/diggerhq/oc-flue-startercd oc-flue-starterdiff --git a/docs/agent-sessions/repos.mdx b/docs/agent-sessions/repos.mdxindex 1fbe128f..645fe0f7 100644--- a/docs/agent-sessions/repos.mdx+++ b/docs/agent-sessions/repos.mdx@@ -153,7 +153,8 @@ does nothing but Git, and is gone before the next turn.## Use a repo to deploy a Flue agentChoose **Agents → Create agent → Import from GitHub** when the repository is the agent-implementation itself. Repository-first creation currently recognizes a complete Flue application.+implementation itself. Repository-first creation recognizes either a complete Flue application or+an explicit prompt-defined Flue root (`agent.toml` + `prompt.md` + optional `skills/`).The dashboard uses the OpenComputer App to:1. resolve the selected branch and root at one exact commit without running repository code;@@ -176,9 +177,11 @@ names and links the owning agent, and offers an inline confirmed unlink. Unlinkifor the old agent but preserves that agent, its active revision, deployment history, and sessions.Recognition is deterministic. A root-level `agent.toml` is authoritative: if it is malformed or-unsupported, the result is a fixable error rather than a guess. Without a manifest, a root-level-`flue.config.*` file or a Flue package dependency is treated as Flue intent and reports the missing-manifest. A prompt, `skills/` folder, README, or unrelated package is not converted automatically.+unsupported, the result is a fixable error rather than a guess. With `runtime.family = "flue"`,+`prompt.md` selects the prompt-defined profile unless a `package.json` or `flue.config.*` marker+selects the complete-app profile. Without a manifest, Flue configuration or a Flue package+dependency reports the missing manifest. A bare prompt, skills folder, README, or unrelated package+is not converted automatically.If the selected root is unrecognized, the review can scan the same bounded tree of at most 25,000entries and return up to 20 candidate roots no more than six folders deep. Results follow fixed@@ -193,11 +196,11 @@ build commands as an ordinary disposable OpenComputer sandbox, and emits an artideployment credential belongs to another trusted service and is never present during source orbuild work.-Flue repository deployment supports one self-contained npm root with `agent.toml`,-`package.json`, and `package-lock.json`. The initial import links that root to its production branch;-each later push touching the root automatically deploys the branch's new exact head. Other branches-do not create Flue preview deployments. **Deploy latest** remains available for manually rebuilding-the current production head after a transient failure. See+Flue repository deployment supports one selected root: either the prompt-defined shape above or a+self-contained npm root with `agent.toml`, `package.json`, and `package-lock.json`. The initial import+links that root to its production branch; each later push touching the root automatically deploys the+branch's new exact head. Other branches do not create Flue preview deployments. **Deploy latest**+remains available for manually rebuilding the current production head after a transient failure. See[Flue deployment](/agent-sessions/flue#deploy-from-github) for the full build contract and failurejourney.@@ -206,11 +209,11 @@ relevant files. If any of those change before import, OpenComputer returns a souand creates nothing. Review the current commit again rather than assuming the old confirmation stillapplies.-The source link also remembers that the agent was imported as Flue. Normal Flue changes keep-deploying on push. If the linked root stops being a Flue app, the deployment fails before build and-the active revision stays live. Restore the Flue definition, or unlink the source and import it as a-new agent. Unlinking stops push-to-deploy; it does not delete or convert the existing agent, revision,-or sessions.+The source link also remembers the selected Flue profile. Normal changes keep deploying on push, and+a prompt-defined profile may graduate to a complete Flue app. Other profile changes fail before+build while the active revision stays live. Restore the previous definition, or unlink the source+and import it as a new agent. Unlinking stops push-to-deploy; it does not delete or convert the+existing agent, revision, or sessions.Manage this link from the agent's **Overview → Repository** panel. **Configure GitHub** changeswhich repositories the OpenComputer App can access. **Unlink repository** releases this root for adiff --git a/sdks/typescript/src/agents/repository-agents.test.ts b/sdks/typescript/src/agents/repository-agents.test.tsindex ecbdab9d..04db988c 100644--- a/sdks/typescript/src/agents/repository-agents.test.ts+++ b/sdks/typescript/src/agents/repository-agents.test.ts@@ -2,7 +2,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";import { OpenComputer } from "./client.js";import type { RepositorySourceInterpretation } from "./repository-agents.js";-// @ts-expect-error invalid profile identity must be flue-app-v1@1 or null/null+// @ts-expect-error invalid profile identity must be a known profile at v1 or null/nullconst crossedInvalidProfile: RepositorySourceInterpretation = {disposition: "invalid",sourceProfile: "flue-app-v1",@@ -62,6 +62,47 @@ afterEach(() => {});describe("agent repository review/import", () => {+ it("normalizes prompt-profile synthesis metadata", async () => {+ vi.spyOn(globalThis, "fetch").mockResolvedValueOnce(Response.json({+ ...reviewResponse,+ interpretation: {+ ...reviewResponse.interpretation,+ source_profile: "flue-prompt-v1",+ summary: "Prompt-defined Flue agent detected",+ reason_code: "flue_prompt_detected",+ },+ profile: {+ ...reviewResponse.profile,+ source_profile: "flue-prompt-v1",+ builder: {+ node: "22.19.0",+ synthesis_template: "flue-prompt-template-v1",+ },+ prompt: { bytes: 256 },+ skills: { count: 2, bytes: 1024, names: ["review", "triage"] },+ },+ }));+ const oc = new OpenComputer({+ apiKey: "oc_test",+ baseUrl: "https://api.example.test/v3",+ maxRetries: 0,+ });++ const review = await oc.agents.repository.review({+ repo: reviewResponse.repository.id,+ path: reviewResponse.root,+ productionRef: reviewResponse.production_ref,+ });+ expect(review.interpretation.sourceProfile).toBe("flue-prompt-v1");+ expect(review.profile?.sourceProfile).toBe("flue-prompt-v1");+ if (review.profile?.sourceProfile === "flue-prompt-v1") {+ expect(review.profile.builder.synthesisTemplate).toBe(+ "flue-prompt-template-v1",+ );+ expect(review.profile.skills.names).toEqual(["review", "triage"]);+ }+ });+it("normalizes a source-profile review and replays its receipt on import", async () => {const fetchMock = vi.spyOn(globalThis, "fetch")diff --git a/sdks/typescript/src/agents/repository-agents.ts b/sdks/typescript/src/agents/repository-agents.tsindex d30e9a6e..e3640dac 100644--- a/sdks/typescript/src/agents/repository-agents.ts+++ b/sdks/typescript/src/agents/repository-agents.ts@@ -6,7 +6,7 @@ import type { Http } from "./http.js";import type { Agent, CredentialRef } from "./types.js";import type { Deployment, DeploymentSource } from "./deployments.js";-export type SourceProfileId = "flue-app-v1";+export type SourceProfileId = "flue-app-v1" | "flue-prompt-v1";export interface RepositoryAgentSource {type: "github";@@ -42,8 +42,8 @@ export interface RepositoryCandidateRoot {| "flue.config.cjs";}-export interface FlueSourceProfile {- sourceProfile: "flue-app-v1";+interface FlueSourceProfileBase {+ sourceProfile: SourceProfileId;sourceProfileVersion: 1;manifest: {schemaVersion: 1;@@ -59,19 +59,30 @@ export interface FlueSourceProfile {flueCli: string;};lockfile: { version: number };- builder: { node: string };+ builder: { node: string; synthesisTemplate?: string };source: { files: number; bytes: number };variableNames: string[];warnings: RepositoryReviewIssue[];}+export type FlueSourceProfile =+ | (FlueSourceProfileBase & {+ sourceProfile: "flue-app-v1";+ })+ | (FlueSourceProfileBase & {+ sourceProfile: "flue-prompt-v1";+ prompt: { bytes: number };+ skills: { count: number; bytes: number; names: string[] };+ builder: { node: string; synthesisTemplate: string };+ });+export type RepositorySourceInterpretation =| {disposition: "exact";- sourceProfile: "flue-app-v1";+ sourceProfile: SourceProfileId;sourceProfileVersion: 1;summary: string;- reasonCode: "flue_detected";+ reasonCode: "flue_detected" | "flue_prompt_detected";assumptions: string[];agent: { runtime: "flue"; model: string };}diff --git a/web/src/api/client.ts b/web/src/api/client.tsindex 36c7d366..c8a2806e 100644--- a/web/src/api/client.ts+++ b/web/src/api/client.ts@@ -742,7 +742,7 @@ export const importAgentFromGithub = (}review: {sha: string- source_profile: 'flue-app-v1'+ source_profile: 'flue-app-v1' | 'flue-prompt-v1'fingerprint: string}credential: 'managed'diff --git a/web/src/api/repository-inspection-schemas.test.ts b/web/src/api/repository-inspection-schemas.test.tsindex e4f896df..0b3a07a0 100644--- a/web/src/api/repository-inspection-schemas.test.ts+++ b/web/src/api/repository-inspection-schemas.test.ts@@ -18,7 +18,7 @@ const common = {}describe('repository source inspection schema', () => {- it('accepts the sole launch profile without losing its Flue review projection', () => {+ it('accepts a full Flue app without losing its review projection', () => {const parsed = RepositorySourceInspectionSchema.parse({...common,interpretation: {@@ -57,6 +57,55 @@ describe('repository source inspection schema', () => {expect(parsed.review_fingerprint).toBe(reviewFingerprint)})+ it('accepts the bounded prompt-defined Flue profile', () => {+ const parsed = RepositorySourceInspectionSchema.parse({+ ...common,+ interpretation: {+ disposition: 'exact',+ source_profile: 'flue-prompt-v1',+ source_profile_version: 1,+ summary: 'Prompt-defined Flue agent detected',+ reason_code: 'flue_prompt_detected',+ assumptions: [],+ agent: { runtime: 'flue', model: 'anthropic/claude-haiku-4-5' },+ },+ profile: {+ source_profile: 'flue-prompt-v1',+ source_profile_version: 1,+ manifest: {+ schema_version: 1,+ entrypoint: 'support-triage',+ model: 'anthropic/claude-haiku-4-5',+ runtime: { family: 'flue', type: 'default' },+ vars: {},+ },+ package: {+ name: 'opencomputer-flue-prompt-agent',+ node_engine: '>=22.19 <23',+ flue_cli: '1.0.0-beta.9',+ },+ lockfile: { version: 3 },+ builder: {+ node: '22.19.0',+ synthesis_template: 'flue-prompt-template-v1',+ },+ source: { files: 4, bytes: 2048 },+ prompt: { bytes: 256 },+ skills: { count: 2, bytes: 1024, names: ['review', 'triage'] },+ variable_names: [],+ warnings: [],+ },+ })++ expect(parsed.profile?.source_profile).toBe('flue-prompt-v1')+ if (parsed.profile?.source_profile === 'flue-prompt-v1') {+ expect(parsed.profile.skills.names).toEqual(['review', 'triage'])+ expect(parsed.profile.builder.synthesis_template).toBe(+ 'flue-prompt-template-v1',+ )+ }+ })+it('treats broken Flue and unrecognized source as review results', () => {const invalid = RepositorySourceInspectionSchema.parse({...common,diff --git a/web/src/api/schemas.ts b/web/src/api/schemas.tsindex 8c6096b0..9fba4ac1 100644--- a/web/src/api/schemas.ts+++ b/web/src/api/schemas.ts@@ -615,7 +615,7 @@ export const DeploymentSourceSchema = z.object({latest_seen_sha: z.string().nullish(),active_deployed_sha: z.string().nullish(),full_name: z.string().nullish(), // "owner/repo" (joined from the repo row)- source_profile: z.literal('flue-app-v1').nullish(),+ source_profile: z.enum(['flue-app-v1', 'flue-prompt-v1']).nullish(),source_profile_version: z.literal(1).nullish(),review_fingerprint: z.string().nullish(),})@@ -698,7 +698,7 @@ export const RepositoryReviewIssueSchema = z.object({export const RepositoryCandidateRootSchema = z.object({path: z.string(),- source_profile: z.literal('flue-app-v1').nullable(),+ source_profile: z.enum(['flue-app-v1', 'flue-prompt-v1']).nullable(),summary: z.string(),marker: z.enum(['agent.toml',@@ -709,8 +709,7 @@ export const RepositoryCandidateRootSchema = z.object({]),})-export const FlueSourceProfileSchema = z.object({- source_profile: z.literal('flue-app-v1'),+const FlueSourceProfileBaseSchema = z.object({source_profile_version: z.literal(1),manifest: z.object({schema_version: z.literal(1),@@ -728,15 +727,36 @@ export const FlueSourceProfileSchema = z.object({flue_cli: z.string(),}),lockfile: z.object({ version: z.number() }),- builder: z.object({ node: z.string() }),+ builder: z.object({+ node: z.string(),+ synthesis_template: z.string().optional(),+ }),source: z.object({ files: z.number(), bytes: z.number() }),variable_names: z.array(z.string()).default([]),warnings: z.array(RepositoryReviewIssueSchema).default([]),})-const ExactRepositorySourceInterpretationSchema = z.object({+export const FlueSourceProfileSchema = z.union([+ FlueSourceProfileBaseSchema.extend({+ source_profile: z.literal('flue-app-v1'),+ }),+ FlueSourceProfileBaseSchema.extend({+ source_profile: z.literal('flue-prompt-v1'),+ prompt: z.object({ bytes: z.number() }),+ skills: z.object({+ count: z.number(),+ bytes: z.number(),+ names: z.array(z.string()),+ }),+ builder: z.object({+ node: z.string(),+ synthesis_template: z.string(),+ }),+ }),+])++const ExactRepositorySourceInterpretationBase = z.object({disposition: z.literal('exact'),- source_profile: z.literal('flue-app-v1'),source_profile_version: z.literal(1),summary: z.string(),reason_code: z.string(),@@ -747,6 +767,15 @@ const ExactRepositorySourceInterpretationSchema = z.object({}),})+const ExactRepositorySourceInterpretationSchema = z.union([+ ExactRepositorySourceInterpretationBase.extend({+ source_profile: z.literal('flue-app-v1'),+ }),+ ExactRepositorySourceInterpretationBase.extend({+ source_profile: z.literal('flue-prompt-v1'),+ }),+])+const InvalidRepositorySourceInterpretationBase = z.object({disposition: z.literal('invalid'),summary: z.string(),@@ -759,6 +788,10 @@ const InvalidRepositorySourceInterpretationSchema = z.union([source_profile: z.literal('flue-app-v1'),source_profile_version: z.literal(1),}),+ InvalidRepositorySourceInterpretationBase.extend({+ source_profile: z.literal('flue-prompt-v1'),+ source_profile_version: z.literal(1),+ }),InvalidRepositorySourceInterpretationBase.extend({source_profile: z.null(),source_profile_version: z.null(),diff --git a/web/src/lib/repository-onboarding.test.ts b/web/src/lib/repository-onboarding.test.tsindex bf0f58c6..0c8719a3 100644--- a/web/src/lib/repository-onboarding.test.ts+++ b/web/src/lib/repository-onboarding.test.ts@@ -84,7 +84,7 @@ describe('repository onboarding presentation', () => {})})- it('is honest when prompt/skills-only source is unrecognized', () => {+ it('explains how to make an unrecognized folder deployable', () => {const presentation = repositoryReviewPresentation({...common,interpretation: {@@ -96,9 +96,55 @@ describe('repository onboarding presentation', () => {},})- expect(presentation.explanation).toContain(- 'Prompts or skills alone are not converted automatically',- )+ expect(presentation.explanation).toContain('agent.toml')+ })++ it('presents an exact prompt-defined Flue agent without implying source code', () => {+ const presentation = repositoryReviewPresentation({+ ...common,+ interpretation: {+ disposition: 'exact',+ source_profile: 'flue-prompt-v1',+ source_profile_version: 1,+ summary: 'Prompt-defined Flue agent detected',+ reason_code: 'flue_prompt_detected',+ assumptions: [],+ agent: { runtime: 'flue', model: 'anthropic/claude-haiku-4-5' },+ },+ profile: {+ source_profile: 'flue-prompt-v1',+ source_profile_version: 1,+ manifest: {+ schema_version: 1,+ entrypoint: 'support',+ model: 'anthropic/claude-haiku-4-5',+ runtime: { family: 'flue', type: 'default' },+ vars: {},+ },+ package: {+ name: 'opencomputer-flue-prompt-agent',+ node_engine: '>=22.19 <23',+ flue_cli: '1.0.0-beta.9',+ },+ lockfile: { version: 3 },+ builder: {+ node: '22.19.0',+ synthesis_template: 'flue-prompt-template-v1',+ },+ source: { files: 3, bytes: 1024 },+ prompt: { bytes: 128 },+ skills: { count: 1, bytes: 512, names: ['triage'] },+ variable_names: [],+ warnings: [],+ },+ })++ expect(presentation).toEqual({+ heading: 'Prompt-defined Flue agent',+ explanation:+ 'OpenComputer will turn this prompt and its skills into a Flue app at build time.',+ primaryAction: 'deploy',+ })})it('requires a fresh review for the typed source-change conflict', () => {diff --git a/web/src/lib/repository-onboarding.ts b/web/src/lib/repository-onboarding.tsindex 9e7d4a06..83257ad2 100644--- a/web/src/lib/repository-onboarding.ts+++ b/web/src/lib/repository-onboarding.ts@@ -64,11 +64,19 @@ export function repositoryReviewPresentation(): RepositoryReviewPresentation {switch (inspection.interpretation.disposition) {case 'exact':- return {- heading: 'Flue agent detected',- explanation: 'Review the detected entrypoint, model, and agent name.',- primaryAction: 'deploy',- }+ return inspection.interpretation.source_profile === 'flue-prompt-v1'+ ? {+ heading: 'Prompt-defined Flue agent',+ explanation:+ 'OpenComputer will turn this prompt and its skills into a Flue app at build time.',+ primaryAction: 'deploy',+ }+ : {+ heading: 'Flue app detected',+ explanation:+ 'Review the detected entrypoint, model, and agent name.',+ primaryAction: 'deploy',+ }case 'invalid':return {heading: 'This Flue agent needs a fix',@@ -87,7 +95,7 @@ export function repositoryReviewPresentation(: {heading: "We couldn't find an agent definition in this folder",explanation:- 'OpenComputer looked for an agent manifest and strong Flue markers. Prompts or skills alone are not converted automatically.',+ 'Add an agent.toml next to prompt.md, choose another folder, or start from the Flue app template.',primaryAction: 'choose_folder',}}diff --git a/web/src/pages/AgentNew.tsx b/web/src/pages/AgentNew.tsxindex 85114ddd..2add3960 100644--- a/web/src/pages/AgentNew.tsx+++ b/web/src/pages/AgentNew.tsx@@ -788,6 +788,16 @@ function GithubImport({{inspection.profile.manifest.model}</span></PanelDescription>+ {inspection.profile.source_profile === 'flue-prompt-v1' ? (+ <p className="text-muted-foreground mt-2 text-xs">+ prompt.md+ {' · '}+ {inspection.profile.skills.count}{' '}+ {inspection.profile.skills.count === 1 ? 'skill' : 'skills'}+ {' · '}+ built as a Flue app on OpenComputer+ </p>+ ) : null}</div></PanelHeader><PanelContent className="space-y-4">