From d91e6d16889dc391b27748dfa1fa33f288699386 Mon Sep 17 00:00:00 2001 From: Ion Alpha Date: Thu, 2 Jul 2026 03:05:44 +0000 Subject: [PATCH] refactor: move the mechanism band under internal/ Top level now reads as the module's API surface: the agent facade, the ports a host implements or consumes, and the domain nouns. The 28 mechanism packages (parsers, guards, stores, probes, adapters) move to internal/, removing them from the public import surface before any external importers exist. The public set was derived mechanically, not by intuition: a go/types audit over the declared Band 1/2 packages found seven mechanism packages referenced in exported signatures (approval, brakes, bus, harness, hlc, jobs, netguard), which therefore stay public, and the audit closes at a fixed point with no further leaks. driver and inbox stay public as ports third parties implement; instance and archetype move internal because their kinds surface through the controlplane API as JSON, not Go types. Also updates the depguard deny path for spinesink, the rigor gate's grandfather and fuzz-required package keys, and rewrites the ARCHITECTURE.md sections that framed internal/ as deferred to v1.0: surface (internal/) and structure (depguard) are complementary controls, and the move is cheapest before ignition. --- .golangci.yml | 2 +- ARCHITECTURE.md | 83 +++++++++++++------ README.md | 4 +- agent.go | 2 +- agent_agentkind_test.go | 2 +- cmd/flynn/auth.go | 2 +- cmd/flynn/catalog.go | 10 +-- cmd/flynn/consent.go | 2 +- cmd/flynn/consent_test.go | 2 +- cmd/flynn/credentials.go | 4 +- cmd/flynn/credentials_test.go | 4 +- cmd/flynn/deploy.go | 4 +- cmd/flynn/deps.go | 4 +- cmd/flynn/get.go | 10 +-- cmd/flynn/get_test.go | 4 +- cmd/flynn/main.go | 2 +- cmd/flynn/modelbless.go | 8 +- cmd/flynn/modelbless_test.go | 4 +- cmd/flynn/modelcheck.go | 4 +- cmd/flynn/modelcmds.go | 8 +- cmd/flynn/modelfetch.go | 6 +- cmd/flynn/modelfetch_test.go | 2 +- cmd/flynn/modelgate_test.go | 2 +- cmd/flynn/modelinstall.go | 4 +- cmd/flynn/modelpool.go | 6 +- cmd/flynn/modelpool_test.go | 4 +- cmd/flynn/modelprobe_test.go | 6 +- cmd/flynn/modelrun.go | 18 ++-- cmd/flynn/modelrun_grammar_test.go | 2 +- cmd/flynn/modelrun_test.go | 4 +- cmd/flynn/modelrun_vllm.go | 10 +-- cmd/flynn/modelrun_vllm_test.go | 4 +- cmd/flynn/models.go | 6 +- cmd/flynn/models_reliability_test.go | 2 +- cmd/flynn/modelsearch.go | 2 +- cmd/flynn/onboard.go | 2 +- cmd/flynn/pipeline_defense_test.go | 8 +- cmd/flynn/playbook.go | 10 +-- cmd/flynn/ps.go | 2 +- cmd/flynn/ps_test.go | 2 +- cmd/flynn/run.go | 16 ++-- cmd/flynn/serve.go | 14 ++-- cmd/flynn/serve_test.go | 2 +- cmd/flynn/spine.go | 2 +- extension/catalog/gate_test.go | 4 +- extension/catalog/github_test.go | 6 +- {acquire => internal/acquire}/acquire.go | 2 +- {acquire => internal/acquire}/acquire_test.go | 2 +- {acquire => internal/acquire}/fuzz_test.go | 0 .../acquire}/property_test.go | 0 .../archetype}/archetype.go | 0 .../archetype}/archetype_test.go | 2 +- {archetype => internal/archetype}/resolve.go | 0 .../archetype}/resolve_test.go | 2 +- .../bindguard}/bindguard.go | 0 .../bindguard}/bindguard_test.go | 0 {catalog => internal/catalog}/catalog.go | 0 {catalog => internal/catalog}/catalog_test.go | 0 {catalog => internal/catalog}/fit.go | 0 {catalog => internal/catalog}/fit_test.go | 0 {catalog => internal/catalog}/models.json | 0 .../credential}/credential.go | 0 .../credential}/credential_test.go | 0 .../credential}/property_test.go | 0 {credential => internal/credential}/store.go | 0 .../credential}/store_test.go | 0 .../dependency}/catalog.go | 0 .../dependency}/catalog_test.go | 0 .../dependency}/dependency.go | 0 .../dependency}/gate_test.go | 2 +- .../dependency}/manager.go | 6 +- .../dependency}/manager_test.go | 2 +- {dependency => internal/dependency}/prober.go | 0 .../dependency}/property_test.go | 0 .../dependency}/specs/flyctl.json | 0 {exposure => internal/exposure}/exposure.go | 2 +- .../exposure}/exposure_test.go | 2 +- {fetch => internal/fetch}/chaos_test.go | 0 {fetch => internal/fetch}/fetch.go | 0 {fetch => internal/fetch}/fetch_test.go | 0 {fetch => internal/fetch}/fuzz_test.go | 0 {flow => internal/flow}/actions.go | 0 {flow => internal/flow}/eval.go | 0 {flow => internal/flow}/expr.go | 0 {flow => internal/flow}/expr_test.go | 0 {flow => internal/flow}/flow.go | 0 {flow => internal/flow}/flow_test.go | 0 {flow => internal/flow}/fuzz_test.go | 0 {flow => internal/flow}/interp.go | 0 {flow => internal/flow}/interp_test.go | 0 {flow => internal/flow}/newops_test.go | 0 {flow => internal/flow}/observe.go | 0 {flow => internal/flow}/property_test.go | 0 {flow => internal/flow}/template.go | 0 {flow => internal/flow}/template_test.go | 0 {gbnf => internal/gbnf}/dialect_test.go | 0 {gbnf => internal/gbnf}/equiv_test.go | 0 {gbnf => internal/gbnf}/fuzz_test.go | 0 {gbnf => internal/gbnf}/gbnf.go | 0 {gbnf => internal/gbnf}/gbnf_test.go | 0 {gbnf => internal/gbnf}/lint.go | 0 {gbnf => internal/gbnf}/rapid_test.go | 0 {gbnf => internal/gbnf}/recognize.go | 0 {gbnf => internal/gbnf}/schema.go | 0 {gbnf => internal/gbnf}/toolcall.go | 0 {gguf => internal/gguf}/gguf.go | 0 {gguf => internal/gguf}/gguf_test.go | 0 {gguf => internal/gguf}/property_test.go | 0 {gguf => internal/gguf}/template.go | 0 {grade => internal/grade}/grade.go | 0 {grade => internal/grade}/grade_test.go | 2 +- {grade => internal/grade}/property_test.go | 2 +- {grade => internal/grade}/record.go | 0 {grade => internal/grade}/record_test.go | 2 +- {hardware => internal/hardware}/hardware.go | 0 .../hardware}/hardware_test.go | 0 {hardware => internal/hardware}/ram_darwin.go | 0 {hardware => internal/hardware}/ram_linux.go | 0 {hardware => internal/hardware}/ram_other.go | 0 .../hardware}/ram_windows.go | 0 .../huggingface}/huggingface.go | 0 .../huggingface}/huggingface_test.go | 0 .../huggingface}/rapid_test.go | 0 {inference => internal/inference}/advisory.go | 0 .../inference}/inference.go | 0 .../inference}/inference_test.go | 0 .../inference}/launch/chaos_test.go | 0 .../inference}/launch/fuzz_test.go | 2 +- .../inference}/launch/inspect.go | 2 +- .../inference}/launch/launch.go | 2 +- .../inference}/launch/launch_test.go | 2 +- .../inference}/launch/property_test.go | 0 .../inference}/modelsource/fuzz_test.go | 0 .../inference}/modelsource/property_test.go | 0 .../inference}/modelsource/provenance.go | 0 .../inference}/modelsource/provenance_test.go | 0 .../inference}/modelsource/publishers.go | 0 .../inference}/modelsource/risk.go | 0 .../inference}/modelsource/risk_test.go | 0 .../inference}/modelsource/source.go | 0 .../inference}/modelsource/source_test.go | 0 .../inference}/orchestrate/controller.go | 0 .../orchestrate/controller_chaos_test.go | 0 .../orchestrate/controller_recovery_test.go | 0 .../inference}/orchestrate/controller_test.go | 0 .../inference}/orchestrate/recover.go | 0 .../orchestrate/recover_fuzz_test.go | 0 .../orchestrate/recover_property_test.go | 0 .../inference}/orchestrate/recover_test.go | 0 .../inference}/orchestrate/schedule.go | 0 .../orchestrate/schedule_draft_test.go | 0 .../orchestrate/schedule_fuzz_test.go | 0 .../orchestrate/schedule_property_test.go | 0 .../inference}/orchestrate/schedule_test.go | 0 .../inference}/orchestrate/serve_adapter.go | 2 +- .../fuzz/FuzzSchedule/484cdffd9319ec51 | 0 ...DraftCoResidency-20260627225841-21732.fail | 0 .../inference}/property_test.go | 0 .../inference}/provision/chaos_test.go | 4 +- .../inference}/provision/property_test.go | 0 .../inference}/provision/provision.go | 6 +- .../inference}/provision/provision_test.go | 6 +- .../inference}/provision/provisioner.go | 4 +- .../inference}/provision/provisioner_test.go | 2 +- .../inference}/provision/registry.go | 2 +- .../inference}/provision/vllm.go | 2 +- .../inference}/provision/weights.go | 4 +- .../inference}/provision/weights_test.go | 2 +- .../inference}/serve/chaos_test.go | 0 .../serve/container_serve_integration_test.go | 2 +- .../inference}/serve/container_serve_test.go | 0 .../inference}/serve/fuzz_test.go | 0 .../inference}/serve/property_test.go | 0 .../inference}/serve/registry.go | 0 .../inference}/serve/serve.go | 2 +- .../inference}/serve/serve_test.go | 2 +- .../inference}/serve/stats.go | 0 .../inference}/serve/stats_chaos_test.go | 0 .../inference}/serve/stats_fuzz_test.go | 0 .../inference}/serve/stats_http_test.go | 0 .../inference}/serve/stats_property_test.go | 0 .../inference}/serve/stats_test.go | 0 .../inference}/serve/wiring.go | 0 .../instance}/effective_test.go | 2 +- {instance => internal/instance}/heartbeat.go | 0 .../instance}/heartbeat_test.go | 0 {instance => internal/instance}/instance.go | 0 .../instance}/instance_test.go | 2 +- .../instance}/property_test.go | 2 +- .../integrations}/auth/auth.go | 0 .../integrations}/auth/auth_test.go | 2 +- .../integrations}/auth/fuzz_test.go | 2 +- .../integrations}/auth/oauth2.go | 0 .../integrations}/auth/oauth2_test.go | 2 +- .../integrations}/auth/property_test.go | 2 +- .../integrations}/credential_test.go | 4 +- .../integrations}/doer.go | 8 +- .../integrations}/oauth2_test.go | 4 +- .../integrations}/property_test.go | 0 .../integrations}/request/chaos_test.go | 2 +- .../integrations}/request/classify.go | 0 .../integrations}/request/fuzz_test.go | 0 .../integrations}/request/property_test.go | 2 +- .../integrations}/request/ratelimit.go | 0 .../request/ratelimit_internal_test.go | 0 .../integrations}/request/request.go | 0 .../integrations}/request/request_test.go | 2 +- .../request/secure_default_test.go | 2 +- .../fuzz/FuzzParseRetryAfter/c97e4d372704b843 | 0 .../integrations}/surface.go | 8 +- .../integrations}/surface_test.go | 2 +- {migrate => internal/migrate}/migrate.go | 0 {migrate => internal/migrate}/migrate_test.go | 2 +- .../migrate}/property_test.go | 2 +- .../modelformat}/modelformat.go | 0 .../modelformat}/modelformat_test.go | 0 .../modelformat}/property_test.go | 0 .../modeltrust}/modeltrust.go | 2 +- .../modeltrust}/modeltrust_test.go | 2 +- .../modeltrust}/property_test.go | 2 +- {ops => internal/ops}/driver.go | 2 +- {ops => internal/ops}/driver_test.go | 4 +- {ops => internal/ops}/ops.go | 4 +- {ops => internal/ops}/ops_test.go | 4 +- {ops => internal/ops}/property_test.go | 4 +- {playbook => internal/playbook}/catalog.go | 0 {playbook => internal/playbook}/gate_test.go | 0 {playbook => internal/playbook}/playbook.go | 4 +- .../playbook}/property_test.go | 0 {playbook => internal/playbook}/runner.go | 6 +- .../playbook}/runner_test.go | 4 +- {playbook => internal/playbook}/sink.go | 2 +- .../playbook}/sink_property_test.go | 0 {playbook => internal/playbook}/sink_test.go | 0 .../playbook}/specs/fly-app.json | 0 .../profilestore}/profilestore.go | 0 .../profilestore}/profilestore_test.go | 0 .../profilestore}/property_test.go | 0 .../profilestore}/source.go | 0 .../reliability}/battery.go | 0 .../reliability}/context.go | 0 .../reliability}/context_test.go | 0 .../reliability}/property_test.go | 0 .../reliability}/quantfloor.go | 0 .../reliability}/quantfloor_test.go | 0 .../reliability}/reliability.go | 0 .../reliability}/reliability_test.go | 0 internal/rigor/rigor.go | 26 +++--- .../service}/property_test.go | 0 {service => internal/service}/service.go | 0 {service => internal/service}/service_test.go | 0 {service => internal/service}/supervisor.go | 0 .../service}/supervisor_test.go | 0 .../source}/signalcli/signalcli.go | 0 .../source}/signalcli/signalcli_test.go | 0 .../source}/telegram/property_test.go | 0 .../source}/telegram/telegram.go | 0 .../source}/telegram/telegram_test.go | 0 {spinesink => internal/spinesink}/sink.go | 0 .../spinesink}/sink_test.go | 2 +- internal/sqlitex/sqlitex.go | 2 +- internal/testkit/chaos.go | 2 +- {vault => internal/vault}/keyring.go | 0 {vault => internal/vault}/seal.go | 0 {vault => internal/vault}/vault.go | 0 {vault => internal/vault}/vault_test.go | 0 llm/openai/grammar.go | 2 +- llm/openai/grammar_test.go | 2 +- orchestration/named_test.go | 2 +- orchestration/spawner.go | 2 +- sandbox/egress.go | 2 +- spine/fuzz_test.go | 2 +- spine/property_test.go | 2 +- 273 files changed, 280 insertions(+), 245 deletions(-) rename {acquire => internal/acquire}/acquire.go (99%) rename {acquire => internal/acquire}/acquire_test.go (99%) rename {acquire => internal/acquire}/fuzz_test.go (100%) rename {acquire => internal/acquire}/property_test.go (100%) rename {archetype => internal/archetype}/archetype.go (100%) rename {archetype => internal/archetype}/archetype_test.go (98%) rename {archetype => internal/archetype}/resolve.go (100%) rename {archetype => internal/archetype}/resolve_test.go (99%) rename {bindguard => internal/bindguard}/bindguard.go (100%) rename {bindguard => internal/bindguard}/bindguard_test.go (100%) rename {catalog => internal/catalog}/catalog.go (100%) rename {catalog => internal/catalog}/catalog_test.go (100%) rename {catalog => internal/catalog}/fit.go (100%) rename {catalog => internal/catalog}/fit_test.go (100%) rename {catalog => internal/catalog}/models.json (100%) rename {credential => internal/credential}/credential.go (100%) rename {credential => internal/credential}/credential_test.go (100%) rename {credential => internal/credential}/property_test.go (100%) rename {credential => internal/credential}/store.go (100%) rename {credential => internal/credential}/store_test.go (100%) rename {dependency => internal/dependency}/catalog.go (100%) rename {dependency => internal/dependency}/catalog_test.go (100%) rename {dependency => internal/dependency}/dependency.go (100%) rename {dependency => internal/dependency}/gate_test.go (98%) rename {dependency => internal/dependency}/manager.go (98%) rename {dependency => internal/dependency}/manager_test.go (99%) rename {dependency => internal/dependency}/prober.go (100%) rename {dependency => internal/dependency}/property_test.go (100%) rename {dependency => internal/dependency}/specs/flyctl.json (100%) rename {exposure => internal/exposure}/exposure.go (99%) rename {exposure => internal/exposure}/exposure_test.go (98%) rename {fetch => internal/fetch}/chaos_test.go (100%) rename {fetch => internal/fetch}/fetch.go (100%) rename {fetch => internal/fetch}/fetch_test.go (100%) rename {fetch => internal/fetch}/fuzz_test.go (100%) rename {flow => internal/flow}/actions.go (100%) rename {flow => internal/flow}/eval.go (100%) rename {flow => internal/flow}/expr.go (100%) rename {flow => internal/flow}/expr_test.go (100%) rename {flow => internal/flow}/flow.go (100%) rename {flow => internal/flow}/flow_test.go (100%) rename {flow => internal/flow}/fuzz_test.go (100%) rename {flow => internal/flow}/interp.go (100%) rename {flow => internal/flow}/interp_test.go (100%) rename {flow => internal/flow}/newops_test.go (100%) rename {flow => internal/flow}/observe.go (100%) rename {flow => internal/flow}/property_test.go (100%) rename {flow => internal/flow}/template.go (100%) rename {flow => internal/flow}/template_test.go (100%) rename {gbnf => internal/gbnf}/dialect_test.go (100%) rename {gbnf => internal/gbnf}/equiv_test.go (100%) rename {gbnf => internal/gbnf}/fuzz_test.go (100%) rename {gbnf => internal/gbnf}/gbnf.go (100%) rename {gbnf => internal/gbnf}/gbnf_test.go (100%) rename {gbnf => internal/gbnf}/lint.go (100%) rename {gbnf => internal/gbnf}/rapid_test.go (100%) rename {gbnf => internal/gbnf}/recognize.go (100%) rename {gbnf => internal/gbnf}/schema.go (100%) rename {gbnf => internal/gbnf}/toolcall.go (100%) rename {gguf => internal/gguf}/gguf.go (100%) rename {gguf => internal/gguf}/gguf_test.go (100%) rename {gguf => internal/gguf}/property_test.go (100%) rename {gguf => internal/gguf}/template.go (100%) rename {grade => internal/grade}/grade.go (100%) rename {grade => internal/grade}/grade_test.go (99%) rename {grade => internal/grade}/property_test.go (97%) rename {grade => internal/grade}/record.go (100%) rename {grade => internal/grade}/record_test.go (97%) rename {hardware => internal/hardware}/hardware.go (100%) rename {hardware => internal/hardware}/hardware_test.go (100%) rename {hardware => internal/hardware}/ram_darwin.go (100%) rename {hardware => internal/hardware}/ram_linux.go (100%) rename {hardware => internal/hardware}/ram_other.go (100%) rename {hardware => internal/hardware}/ram_windows.go (100%) rename {huggingface => internal/huggingface}/huggingface.go (100%) rename {huggingface => internal/huggingface}/huggingface_test.go (100%) rename {huggingface => internal/huggingface}/rapid_test.go (100%) rename {inference => internal/inference}/advisory.go (100%) rename {inference => internal/inference}/inference.go (100%) rename {inference => internal/inference}/inference_test.go (100%) rename {inference => internal/inference}/launch/chaos_test.go (100%) rename {inference => internal/inference}/launch/fuzz_test.go (96%) rename {inference => internal/inference}/launch/inspect.go (96%) rename {inference => internal/inference}/launch/launch.go (99%) rename {inference => internal/inference}/launch/launch_test.go (99%) rename {inference => internal/inference}/launch/property_test.go (100%) rename {inference => internal/inference}/modelsource/fuzz_test.go (100%) rename {inference => internal/inference}/modelsource/property_test.go (100%) rename {inference => internal/inference}/modelsource/provenance.go (100%) rename {inference => internal/inference}/modelsource/provenance_test.go (100%) rename {inference => internal/inference}/modelsource/publishers.go (100%) rename {inference => internal/inference}/modelsource/risk.go (100%) rename {inference => internal/inference}/modelsource/risk_test.go (100%) rename {inference => internal/inference}/modelsource/source.go (100%) rename {inference => internal/inference}/modelsource/source_test.go (100%) rename {inference => internal/inference}/orchestrate/controller.go (100%) rename {inference => internal/inference}/orchestrate/controller_chaos_test.go (100%) rename {inference => internal/inference}/orchestrate/controller_recovery_test.go (100%) rename {inference => internal/inference}/orchestrate/controller_test.go (100%) rename {inference => internal/inference}/orchestrate/recover.go (100%) rename {inference => internal/inference}/orchestrate/recover_fuzz_test.go (100%) rename {inference => internal/inference}/orchestrate/recover_property_test.go (100%) rename {inference => internal/inference}/orchestrate/recover_test.go (100%) rename {inference => internal/inference}/orchestrate/schedule.go (100%) rename {inference => internal/inference}/orchestrate/schedule_draft_test.go (100%) rename {inference => internal/inference}/orchestrate/schedule_fuzz_test.go (100%) rename {inference => internal/inference}/orchestrate/schedule_property_test.go (100%) rename {inference => internal/inference}/orchestrate/schedule_test.go (100%) rename {inference => internal/inference}/orchestrate/serve_adapter.go (98%) rename {inference => internal/inference}/orchestrate/testdata/fuzz/FuzzSchedule/484cdffd9319ec51 (100%) rename {inference => internal/inference}/orchestrate/testdata/rapid/TestDraftCoResidency/TestDraftCoResidency-20260627225841-21732.fail (100%) rename {inference => internal/inference}/property_test.go (100%) rename {inference => internal/inference}/provision/chaos_test.go (97%) rename {inference => internal/inference}/provision/property_test.go (100%) rename {inference => internal/inference}/provision/provision.go (96%) rename {inference => internal/inference}/provision/provision_test.go (98%) rename {inference => internal/inference}/provision/provisioner.go (99%) rename {inference => internal/inference}/provision/provisioner_test.go (99%) rename {inference => internal/inference}/provision/registry.go (98%) rename {inference => internal/inference}/provision/vllm.go (97%) rename {inference => internal/inference}/provision/weights.go (97%) rename {inference => internal/inference}/provision/weights_test.go (98%) rename {inference => internal/inference}/serve/chaos_test.go (100%) rename {inference => internal/inference}/serve/container_serve_integration_test.go (98%) rename {inference => internal/inference}/serve/container_serve_test.go (100%) rename {inference => internal/inference}/serve/fuzz_test.go (100%) rename {inference => internal/inference}/serve/property_test.go (100%) rename {inference => internal/inference}/serve/registry.go (100%) rename {inference => internal/inference}/serve/serve.go (99%) rename {inference => internal/inference}/serve/serve_test.go (99%) rename {inference => internal/inference}/serve/stats.go (100%) rename {inference => internal/inference}/serve/stats_chaos_test.go (100%) rename {inference => internal/inference}/serve/stats_fuzz_test.go (100%) rename {inference => internal/inference}/serve/stats_http_test.go (100%) rename {inference => internal/inference}/serve/stats_property_test.go (100%) rename {inference => internal/inference}/serve/stats_test.go (100%) rename {inference => internal/inference}/serve/wiring.go (100%) rename {instance => internal/instance}/effective_test.go (99%) rename {instance => internal/instance}/heartbeat.go (100%) rename {instance => internal/instance}/heartbeat_test.go (100%) rename {instance => internal/instance}/instance.go (100%) rename {instance => internal/instance}/instance_test.go (98%) rename {instance => internal/instance}/property_test.go (98%) rename {integrations => internal/integrations}/auth/auth.go (100%) rename {integrations => internal/integrations}/auth/auth_test.go (99%) rename {integrations => internal/integrations}/auth/fuzz_test.go (97%) rename {integrations => internal/integrations}/auth/oauth2.go (100%) rename {integrations => internal/integrations}/auth/oauth2_test.go (99%) rename {integrations => internal/integrations}/auth/property_test.go (98%) rename {integrations => internal/integrations}/credential_test.go (98%) rename {integrations => internal/integrations}/doer.go (98%) rename {integrations => internal/integrations}/oauth2_test.go (95%) rename {integrations => internal/integrations}/property_test.go (100%) rename {integrations => internal/integrations}/request/chaos_test.go (97%) rename {integrations => internal/integrations}/request/classify.go (100%) rename {integrations => internal/integrations}/request/fuzz_test.go (100%) rename {integrations => internal/integrations}/request/property_test.go (98%) rename {integrations => internal/integrations}/request/ratelimit.go (100%) rename {integrations => internal/integrations}/request/ratelimit_internal_test.go (100%) rename {integrations => internal/integrations}/request/request.go (100%) rename {integrations => internal/integrations}/request/request_test.go (99%) rename {integrations => internal/integrations}/request/secure_default_test.go (96%) rename {integrations => internal/integrations}/request/testdata/fuzz/FuzzParseRetryAfter/c97e4d372704b843 (100%) rename {integrations => internal/integrations}/surface.go (98%) rename {integrations => internal/integrations}/surface_test.go (99%) rename {migrate => internal/migrate}/migrate.go (100%) rename {migrate => internal/migrate}/migrate_test.go (98%) rename {migrate => internal/migrate}/property_test.go (98%) rename {modelformat => internal/modelformat}/modelformat.go (100%) rename {modelformat => internal/modelformat}/modelformat_test.go (100%) rename {modelformat => internal/modelformat}/property_test.go (100%) rename {modeltrust => internal/modeltrust}/modeltrust.go (98%) rename {modeltrust => internal/modeltrust}/modeltrust_test.go (97%) rename {modeltrust => internal/modeltrust}/property_test.go (97%) rename {ops => internal/ops}/driver.go (99%) rename {ops => internal/ops}/driver_test.go (98%) rename {ops => internal/ops}/ops.go (98%) rename {ops => internal/ops}/ops_test.go (96%) rename {ops => internal/ops}/property_test.go (95%) rename {playbook => internal/playbook}/catalog.go (100%) rename {playbook => internal/playbook}/gate_test.go (100%) rename {playbook => internal/playbook}/playbook.go (98%) rename {playbook => internal/playbook}/property_test.go (100%) rename {playbook => internal/playbook}/runner.go (98%) rename {playbook => internal/playbook}/runner_test.go (99%) rename {playbook => internal/playbook}/sink.go (98%) rename {playbook => internal/playbook}/sink_property_test.go (100%) rename {playbook => internal/playbook}/sink_test.go (100%) rename {playbook => internal/playbook}/specs/fly-app.json (100%) rename {profilestore => internal/profilestore}/profilestore.go (100%) rename {profilestore => internal/profilestore}/profilestore_test.go (100%) rename {profilestore => internal/profilestore}/property_test.go (100%) rename {profilestore => internal/profilestore}/source.go (100%) rename {reliability => internal/reliability}/battery.go (100%) rename {reliability => internal/reliability}/context.go (100%) rename {reliability => internal/reliability}/context_test.go (100%) rename {reliability => internal/reliability}/property_test.go (100%) rename {reliability => internal/reliability}/quantfloor.go (100%) rename {reliability => internal/reliability}/quantfloor_test.go (100%) rename {reliability => internal/reliability}/reliability.go (100%) rename {reliability => internal/reliability}/reliability_test.go (100%) rename {service => internal/service}/property_test.go (100%) rename {service => internal/service}/service.go (100%) rename {service => internal/service}/service_test.go (100%) rename {service => internal/service}/supervisor.go (100%) rename {service => internal/service}/supervisor_test.go (100%) rename {source => internal/source}/signalcli/signalcli.go (100%) rename {source => internal/source}/signalcli/signalcli_test.go (100%) rename {source => internal/source}/telegram/property_test.go (100%) rename {source => internal/source}/telegram/telegram.go (100%) rename {source => internal/source}/telegram/telegram_test.go (100%) rename {spinesink => internal/spinesink}/sink.go (100%) rename {spinesink => internal/spinesink}/sink_test.go (98%) rename {vault => internal/vault}/keyring.go (100%) rename {vault => internal/vault}/seal.go (100%) rename {vault => internal/vault}/vault.go (100%) rename {vault => internal/vault}/vault_test.go (100%) diff --git a/.golangci.yml b/.golangci.yml index e7e9c04..9614e43 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -123,7 +123,7 @@ linters: desc: "core may not import the engine (layer inversion); see ARCHITECTURE.md" - pkg: "github.com/ionalpha/flynn/skill" desc: "core may not import the engine (layer inversion); see ARCHITECTURE.md" - - pkg: "github.com/ionalpha/flynn/spinesink" + - pkg: "github.com/ionalpha/flynn/internal/spinesink" desc: "core may not import the engine (layer inversion); see ARCHITECTURE.md" - pkg: "github.com/ionalpha/flynn/goal" desc: "core may not import the engine (layer inversion); see ARCHITECTURE.md" diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 33ed18b..f0116e2 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -38,7 +38,7 @@ package is one plus the highest layer it imports. | L1 primitives | `spine`, `hlc`, `ids`, `sandbox`, `bus`, `llm/anthropic`, `llm/openai` | Event-log port, hybrid logical clock, seeded id generator, isolation port, in-process event bus, concrete model adapters. | | L2 core data | `state`, `resource`, `provider` | The host persistence boundary, the event-sourced resource store, the model-adapter registry. | | L3 mechanisms | `dispatch`, `reconcile`, `jobs`, `memory`, `skill`, `chain` | The governance waist, the reconcile loop, the leased job queue, durable memory and skill stores, the verifiable-record encoder and signer over spine events. | -| L4 governance + domain | `capability`, `budget`, `spinesink`, `goal`, `learn`, `storage/sqlite` | Capability grants, the per-run spend ceiling, the dispatch-to-spine sink, the goal controller, the learning loop, the SQLite backend. | +| L4 governance + domain | `capability`, `budget`, `internal/spinesink`, `goal`, `learn`, `storage/sqlite` | Capability grants, the per-run spend ceiling, the dispatch-to-spine sink, the goal controller, the learning loop, the SQLite backend. | | L5 orchestration | `mission`, `runtime` | The conversation executor, the wired-up runtime. | | L6 composition | `tools`, `session` | The default toolset, the conversational session/stream front door. | | L7 entry | `cmd/flynn`, root `agent` | The binary and the embedding facade. | @@ -48,16 +48,38 @@ reach up into a domain package; that inversion is what turns a clean graph into ball of mud. The direction is enforced by `depguard` (see Invariants), so the table cannot silently rot. -### Why flat, not nested - -Packages stay at the top level rather than nested under `infra/`, `agent/`, etc. -In Go a directory *is* a package and its import identity; nesting changes import -paths and (for a public module) breaks importers, but it does not change the -dependency graph. The graph is what matters, and we enforce it directly with the -layer rule above. So the layering lives in `depguard`, not in folders, and the -top level stays scannable. The two adapter families that genuinely cluster -(`llm/*`, `storage/*`) are the only nesting, because they are alternative -implementations of one port. +### Surface and structure are two different controls + +Two separate questions get conflated in most repo layouts, and Flynn answers +them with two separate mechanisms: + +- **Internal structure** (which package may import which) is governed by the + `depguard` layer rules above. Folders cannot express import *direction*, so + nesting packages under an `infra/`-style taxonomy would change import paths + without changing the graph. The layering lives in the linter, not in folders. +- **External API surface** (what the module promises importers) is governed by + `internal/`. A public Go module's every exported package is formally API; + `internal/` is the one language-level tool that removes a package from that + promise. It is not about visibility - the code stays world-readable on + GitHub - it only removes importability, i.e. the semver promise. + +They are complementary, not alternatives. So the top level holds only the +surface a visitor or embedder should see: the root `agent` facade, the ports a +host implements or consumes, and the domain nouns of the product. The +machinery those are built from (parsers, guards, stores, probes, adapters) +lives under `internal/`, one level flat for the same scannability reason - no +`internal/infra/...` taxonomy. Within each band the packages stay flat, and +the only nesting is adapter families that are alternative implementations of +one port (`llm/*`, `storage/*`). + +The mechanical criterion for what stays public: a package is top-level iff +(a) it appears in the exported signatures of a public package (checked with a +`go/types` audit over the declared public set - an internal type leaking +through a public signature compiles but is broken API), or (b) it is a port +third parties implement (`sandbox` backends, `state` stores, `llm` adapters, +`driver` loops, `inbox` sources), or (c) it is a standard's reference +implementation (`chain`, for Provetrail). Everything else is a mechanism and +goes under `internal/`. ## Ports (the interfaces that keep it swappable) @@ -220,21 +242,27 @@ evidence. ## Stability tiers Flynn is a public Go module, so every exported package is, in principle, a -promise. Until v1.0 the promise is deliberately scoped: +promise. The layout makes the tiers physical: - **Stable surface** (the embedding contract): the root `agent` facade and the ports a host implements or consumes, `state`, `observe`, `llm`, `capability`, - `fault`, `tools`. Keep these small and guarded; breaking them is a major-version - event. -- **Engine** (`goal`, `mission`, `reconcile`, `resource`, `dispatch`, `session`, - `runtime`, `learn`, ...): importable and visible, but **unstable while pre-1.0**. - These churn as the orchestration graph and router land. Power users may import - them with that understanding. - -Pre-1.0 Go semver already permits breaking changes, so the engine stays -refactorable while the top level stays visible. The decision to physically move -the engine under `internal/` is deferred to the v1.0 cut, when this tier list -says exactly what must lock. + `fault`, `tools`, `sandbox`, `secret`, `spine`, `clock`, `ids`, `provider`, + `storage/sqlite`, and `chain` (the Provetrail reference implementation, which + external verifiers must be able to import). Keep these small and guarded; + breaking them is a major-version event. +- **Domain surface** (`goal`, `mission`, `reconcile`, `resource`, `dispatch`, + `session`, `runtime`, `learn`, `budget`, `memory`, `skill`, `extension`, + `controlplane`, `orchestration`, ...): importable and visible, but **unstable + while pre-1.0**. These churn as the orchestration graph and router land. + Power users may import them with that understanding. +- **Mechanisms** (`internal/...`): not importable, no promise at all. Parsers, + guards, stores, probes, and adapters the surfaces are built from. + +Pre-1.0 Go semver already permits breaking changes, so the domain surface stays +refactorable while remaining visible. The mechanism band moved under +`internal/` pre-launch, while the module had no external importers - the +cheapest such a move can ever be - so godoc shows exactly the curated surface +and nothing below it ever enters the compatibility promise. ## Concurrency and lifecycle @@ -262,7 +290,8 @@ is part of CI). - **`resource`** event-sourced state of record; **`spine`** the raw event log; **`storage/sqlite`** the durable backend; **`state`** the host boundary. - **`dispatch`** the governance waist; **`capability`** grants; **`budget`** the - per-run spend ceiling; **`spinesink`** routes dispatched actions onto the spine. + per-run spend ceiling; **`internal/spinesink`** routes dispatched actions onto + the spine. - **`chain`** the verifiable-record layer: canonical CBOR encoding, the RFC 9162 Merkle log, COSE signing, sealed run records, and the verifier behind `flynn spine verify`. @@ -273,3 +302,9 @@ is part of CI). - **`clock`**, **`ids`**, **`hlc`** the determinism ports; **`fault`** the error taxonomy; **`observe`** logging/tracing; **`bus`** the in-process event bus; **`jobs`** the leased job queue. +- **`internal/...`** the mechanism band: model plumbing (`inference`, `gguf`, + `gbnf`, `modelformat`, `modeltrust`, `huggingface`, `hardware`, `acquire`), + network and credential guards (`bindguard`, `vault`, `credential`), the + extension machinery (`integrations`, `catalog`, `flow`, `ops`, `service`, + `playbook`, `dependency`, `fetch`, `source`), and the rest of the plumbing. + Not importable; see Stability tiers. diff --git a/README.md b/README.md index 73ad741..64cc19e 100644 --- a/README.md +++ b/README.md @@ -364,13 +364,13 @@ skill/, memory/ durable skill and memory stores llm/, provider/ the model port and concrete adapters tools/ the default agentic toolset sandbox/ the isolation boundary for command execution -integrations/ data-driven integration and plugin engine clock/, ids/, hlc/ determinism: time source, sortable ids, write ordering fault/ typed, classified error model runtime/ wires controller, worker, store, and bus together session/ conversational front door and event stream storage/sqlite/ the durable SQLite backend -internal/ build and runtime internals +internal/ the mechanism band: model plumbing, guards, the + integration/extension engine, and other non-API machinery ``` See [ARCHITECTURE.md](ARCHITECTURE.md) for the full layer map, the ports a host diff --git a/agent.go b/agent.go index 2c67633..69726b2 100644 --- a/agent.go +++ b/agent.go @@ -17,12 +17,12 @@ import ( "strings" "time" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/brakes" "github.com/ionalpha/flynn/bus" "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/driver" "github.com/ionalpha/flynn/goal" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/jobs" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/mission" diff --git a/agent_agentkind_test.go b/agent_agentkind_test.go index 53d7bec..1041699 100644 --- a/agent_agentkind_test.go +++ b/agent_agentkind_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/ionalpha/flynn/archetype" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/llm/llmtest" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/auth.go b/cmd/flynn/auth.go index 79217d6..7026ca4 100644 --- a/cmd/flynn/auth.go +++ b/cmd/flynn/auth.go @@ -9,9 +9,9 @@ import ( "golang.org/x/term" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/provider" "github.com/ionalpha/flynn/secret" - "github.com/ionalpha/flynn/vault" ) // runAuth implements the `flynn auth` command group: managing the credentials the diff --git a/cmd/flynn/catalog.go b/cmd/flynn/catalog.go index ab69e7d..92b43a8 100644 --- a/cmd/flynn/catalog.go +++ b/cmd/flynn/catalog.go @@ -9,15 +9,15 @@ import ( "sort" "strings" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/extension/catalog" - "github.com/ionalpha/flynn/integrations" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/ops" + "github.com/ionalpha/flynn/internal/service" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/mission" - "github.com/ionalpha/flynn/ops" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" - "github.com/ionalpha/flynn/vault" ) // runIntegrations implements `flynn integrations `: the catalog of diff --git a/cmd/flynn/consent.go b/cmd/flynn/consent.go index 4e84785..9f64c23 100644 --- a/cmd/flynn/consent.go +++ b/cmd/flynn/consent.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/inference/modelsource" ) // requireConsent is the no-footgun gate: before a risky model run proceeds, the user must diff --git a/cmd/flynn/consent_test.go b/cmd/flynn/consent_test.go index ac67ad0..9c17548 100644 --- a/cmd/flynn/consent_test.go +++ b/cmd/flynn/consent_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/inference/modelsource" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/credentials.go b/cmd/flynn/credentials.go index ae8d630..8d21994 100644 --- a/cmd/flynn/credentials.go +++ b/cmd/flynn/credentials.go @@ -8,9 +8,9 @@ import ( "os" "strings" - "github.com/ionalpha/flynn/credential" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/secret" - "github.com/ionalpha/flynn/vault" ) // openCredentialStore opens the durable store and returns a credential facade over diff --git a/cmd/flynn/credentials_test.go b/cmd/flynn/credentials_test.go index 14f16f4..57fe520 100644 --- a/cmd/flynn/credentials_test.go +++ b/cmd/flynn/credentials_test.go @@ -5,10 +5,10 @@ import ( "errors" "testing" - "github.com/ionalpha/flynn/credential" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/secret" - "github.com/ionalpha/flynn/vault" ) // memKeyring is an in-memory vault.Keyring for tests, so the vault uses its diff --git a/cmd/flynn/deploy.go b/cmd/flynn/deploy.go index 05e1c53..84cb644 100644 --- a/cmd/flynn/deploy.go +++ b/cmd/flynn/deploy.go @@ -12,10 +12,10 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/extension" + "github.com/ionalpha/flynn/internal/ops" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/mission" - "github.com/ionalpha/flynn/ops" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) // runDeploy implements `flynn deploy [flags] [json-input]`. It runs a diff --git a/cmd/flynn/deps.go b/cmd/flynn/deps.go index bb5999a..420ee3b 100644 --- a/cmd/flynn/deps.go +++ b/cmd/flynn/deps.go @@ -7,8 +7,8 @@ import ( "os" "text/tabwriter" - "github.com/ionalpha/flynn/dependency" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/dependency" + "github.com/ionalpha/flynn/internal/fetch" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/get.go b/cmd/flynn/get.go index 42fb8dd..8db03d1 100644 --- a/cmd/flynn/get.go +++ b/cmd/flynn/get.go @@ -10,16 +10,16 @@ import ( "strings" "text/tabwriter" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/controlplane" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/goal" "github.com/ionalpha/flynn/inbox" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/archetype" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/instance" + "github.com/ionalpha/flynn/internal/profilestore" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/internal/version" - "github.com/ionalpha/flynn/profilestore" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) // cpKind binds a resource kind to how the read surface displays it. diff --git a/cmd/flynn/get_test.go b/cmd/flynn/get_test.go index 3a470fd..071fe2c 100644 --- a/cmd/flynn/get_test.go +++ b/cmd/flynn/get_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/controlplane" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/archetype" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/main.go b/cmd/flynn/main.go index 9f0453c..9acb920 100644 --- a/cmd/flynn/main.go +++ b/cmd/flynn/main.go @@ -19,12 +19,12 @@ import ( "strings" "github.com/ionalpha/flynn/harness" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/internal/version" "github.com/ionalpha/flynn/learn" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/provider" "github.com/ionalpha/flynn/secret" - "github.com/ionalpha/flynn/vault" ) // dataDirCommands are the subcommands whose only state is the data directory. diff --git a/cmd/flynn/modelbless.go b/cmd/flynn/modelbless.go index 6d18272..7ca5ae7 100644 --- a/cmd/flynn/modelbless.go +++ b/cmd/flynn/modelbless.go @@ -12,10 +12,10 @@ import ( "sort" "strings" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/huggingface" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/huggingface" + "github.com/ionalpha/flynn/internal/inference/modelsource" ) // runModelBless implements `flynn models bless `: resolve a Hugging Face diff --git a/cmd/flynn/modelbless_test.go b/cmd/flynn/modelbless_test.go index 2acc510..a681dce 100644 --- a/cmd/flynn/modelbless_test.go +++ b/cmd/flynn/modelbless_test.go @@ -3,8 +3,8 @@ package main import ( "testing" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/huggingface" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/huggingface" ) func TestSelectServeFilesKeepsWeightsDropsDocs(t *testing.T) { diff --git a/cmd/flynn/modelcheck.go b/cmd/flynn/modelcheck.go index bd34c21..fa83697 100644 --- a/cmd/flynn/modelcheck.go +++ b/cmd/flynn/modelcheck.go @@ -8,8 +8,8 @@ import ( gruntime "runtime" "strings" - "github.com/ionalpha/flynn/inference" - "github.com/ionalpha/flynn/inference/provision" + "github.com/ionalpha/flynn/internal/inference" + "github.com/ionalpha/flynn/internal/inference/provision" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/modelcmds.go b/cmd/flynn/modelcmds.go index 3592ef0..4c0f871 100644 --- a/cmd/flynn/modelcmds.go +++ b/cmd/flynn/modelcmds.go @@ -11,12 +11,12 @@ import ( "strings" "time" - "github.com/ionalpha/flynn/catalog" "github.com/ionalpha/flynn/harness" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/inference/modelsource" + "github.com/ionalpha/flynn/internal/profilestore" + "github.com/ionalpha/flynn/internal/reliability" "github.com/ionalpha/flynn/llm" - "github.com/ionalpha/flynn/profilestore" - "github.com/ionalpha/flynn/reliability" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/modelfetch.go b/cmd/flynn/modelfetch.go index 467b3f9..41a3c43 100644 --- a/cmd/flynn/modelfetch.go +++ b/cmd/flynn/modelfetch.go @@ -11,9 +11,9 @@ import ( "path/filepath" "strings" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference/launch" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference/launch" ) // runModelFetch implements `flynn models fetch `: download a catalog model's diff --git a/cmd/flynn/modelfetch_test.go b/cmd/flynn/modelfetch_test.go index 65d30dc..2942877 100644 --- a/cmd/flynn/modelfetch_test.go +++ b/cmd/flynn/modelfetch_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" ) func TestRunModelFetchBranches(t *testing.T) { diff --git a/cmd/flynn/modelgate_test.go b/cmd/flynn/modelgate_test.go index 8933912..2e88164 100644 --- a/cmd/flynn/modelgate_test.go +++ b/cmd/flynn/modelgate_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/inference/modelsource" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/modelinstall.go b/cmd/flynn/modelinstall.go index 845fcbb..2557116 100644 --- a/cmd/flynn/modelinstall.go +++ b/cmd/flynn/modelinstall.go @@ -10,8 +10,8 @@ import ( "runtime" "strings" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference/provision" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference/provision" ) // runRuntimeInstall implements `flynn models install [runtime]`: fetch a pinned, gated diff --git a/cmd/flynn/modelpool.go b/cmd/flynn/modelpool.go index dca8345..aac7535 100644 --- a/cmd/flynn/modelpool.go +++ b/cmd/flynn/modelpool.go @@ -10,10 +10,10 @@ import ( "os/signal" "strings" - "github.com/ionalpha/flynn/catalog" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/inference/modelsource" - "github.com/ionalpha/flynn/inference/orchestrate" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/inference/modelsource" + "github.com/ionalpha/flynn/internal/inference/orchestrate" ) // runModelPool implements `flynn models pool [--vram GB] [--pin id,...] ...`: keep a diff --git a/cmd/flynn/modelpool_test.go b/cmd/flynn/modelpool_test.go index 0b57d8a..faba557 100644 --- a/cmd/flynn/modelpool_test.go +++ b/cmd/flynn/modelpool_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/inference/orchestrate" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/inference/orchestrate" ) func TestClassifyLaunchFailure(t *testing.T) { diff --git a/cmd/flynn/modelprobe_test.go b/cmd/flynn/modelprobe_test.go index b1d6a0c..d9237b2 100644 --- a/cmd/flynn/modelprobe_test.go +++ b/cmd/flynn/modelprobe_test.go @@ -5,10 +5,10 @@ import ( "io" "testing" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/profilestore" + "github.com/ionalpha/flynn/internal/reliability" "github.com/ionalpha/flynn/llm" - "github.com/ionalpha/flynn/profilestore" - "github.com/ionalpha/flynn/reliability" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/modelrun.go b/cmd/flynn/modelrun.go index aeed9ec..f366a37 100644 --- a/cmd/flynn/modelrun.go +++ b/cmd/flynn/modelrun.go @@ -9,18 +9,18 @@ import ( "runtime" "strings" - "github.com/ionalpha/flynn/bindguard" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/hardware" "github.com/ionalpha/flynn/harness" - "github.com/ionalpha/flynn/inference/launch" - "github.com/ionalpha/flynn/inference/modelsource" - "github.com/ionalpha/flynn/inference/provision" - "github.com/ionalpha/flynn/inference/serve" + "github.com/ionalpha/flynn/internal/bindguard" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/hardware" + "github.com/ionalpha/flynn/internal/inference/launch" + "github.com/ionalpha/flynn/internal/inference/modelsource" + "github.com/ionalpha/flynn/internal/inference/provision" + "github.com/ionalpha/flynn/internal/inference/serve" + "github.com/ionalpha/flynn/internal/profilestore" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/llm/openai" - "github.com/ionalpha/flynn/profilestore" "github.com/ionalpha/flynn/sandbox" "github.com/ionalpha/flynn/secret" ) diff --git a/cmd/flynn/modelrun_grammar_test.go b/cmd/flynn/modelrun_grammar_test.go index edfc781..d2cb290 100644 --- a/cmd/flynn/modelrun_grammar_test.go +++ b/cmd/flynn/modelrun_grammar_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/ionalpha/flynn/harness" - "github.com/ionalpha/flynn/inference/serve" + "github.com/ionalpha/flynn/internal/inference/serve" "github.com/ionalpha/flynn/llm" ) diff --git a/cmd/flynn/modelrun_test.go b/cmd/flynn/modelrun_test.go index 3c8ec7c..080282a 100644 --- a/cmd/flynn/modelrun_test.go +++ b/cmd/flynn/modelrun_test.go @@ -6,8 +6,8 @@ import ( "errors" "testing" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/inference/serve" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/inference/serve" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/modelrun_vllm.go b/cmd/flynn/modelrun_vllm.go index 841fed5..acda090 100644 --- a/cmd/flynn/modelrun_vllm.go +++ b/cmd/flynn/modelrun_vllm.go @@ -7,11 +7,11 @@ import ( "strings" "time" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference/launch" - "github.com/ionalpha/flynn/inference/provision" - "github.com/ionalpha/flynn/inference/serve" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference/launch" + "github.com/ionalpha/flynn/internal/inference/provision" + "github.com/ionalpha/flynn/internal/inference/serve" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/modelrun_vllm_test.go b/cmd/flynn/modelrun_vllm_test.go index 5537a2f..3278679 100644 --- a/cmd/flynn/modelrun_vllm_test.go +++ b/cmd/flynn/modelrun_vllm_test.go @@ -3,8 +3,8 @@ package main import ( "testing" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/inference/launch" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/inference/launch" ) func st(format catalog.Format, name string, size int64) catalog.Quant { diff --git a/cmd/flynn/models.go b/cmd/flynn/models.go index faf6619..f32007c 100644 --- a/cmd/flynn/models.go +++ b/cmd/flynn/models.go @@ -10,10 +10,10 @@ import ( "strings" "text/tabwriter" - "github.com/ionalpha/flynn/catalog" - "github.com/ionalpha/flynn/hardware" "github.com/ionalpha/flynn/harness" - "github.com/ionalpha/flynn/reliability" + "github.com/ionalpha/flynn/internal/catalog" + "github.com/ionalpha/flynn/internal/hardware" + "github.com/ionalpha/flynn/internal/reliability" ) // runModels implements `flynn models`: browse the curated model catalog and filter diff --git a/cmd/flynn/models_reliability_test.go b/cmd/flynn/models_reliability_test.go index 819ae0b..39229a9 100644 --- a/cmd/flynn/models_reliability_test.go +++ b/cmd/flynn/models_reliability_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/catalog" "github.com/ionalpha/flynn/harness" + "github.com/ionalpha/flynn/internal/catalog" ) // TestReliabilityColMeasured proves a probed model shows its measured tool-call reliability. diff --git a/cmd/flynn/modelsearch.go b/cmd/flynn/modelsearch.go index aac467d..0ee86f0 100644 --- a/cmd/flynn/modelsearch.go +++ b/cmd/flynn/modelsearch.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/ionalpha/flynn/huggingface" + "github.com/ionalpha/flynn/internal/huggingface" ) // runModelSearch implements `flynn models search `: find models on the Hugging diff --git a/cmd/flynn/onboard.go b/cmd/flynn/onboard.go index 386ee8a..3df3eff 100644 --- a/cmd/flynn/onboard.go +++ b/cmd/flynn/onboard.go @@ -11,10 +11,10 @@ import ( "golang.org/x/term" "github.com/ionalpha/flynn/harness" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/provider" "github.com/ionalpha/flynn/secret" - "github.com/ionalpha/flynn/vault" ) // resolveModelOrOnboard resolves the model and, when the requested provider has no diff --git a/cmd/flynn/pipeline_defense_test.go b/cmd/flynn/pipeline_defense_test.go index a2650ab..e877ec1 100644 --- a/cmd/flynn/pipeline_defense_test.go +++ b/cmd/flynn/pipeline_defense_test.go @@ -5,10 +5,10 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/gguf" - "github.com/ionalpha/flynn/inference" - "github.com/ionalpha/flynn/inference/launch" - "github.com/ionalpha/flynn/inference/modelsource" + "github.com/ionalpha/flynn/internal/gguf" + "github.com/ionalpha/flynn/internal/inference" + "github.com/ionalpha/flynn/internal/inference/launch" + "github.com/ionalpha/flynn/internal/inference/modelsource" "github.com/ionalpha/flynn/sandbox" ) diff --git a/cmd/flynn/playbook.go b/cmd/flynn/playbook.go index 0843202..9b16e13 100644 --- a/cmd/flynn/playbook.go +++ b/cmd/flynn/playbook.go @@ -11,13 +11,13 @@ import ( "strings" "text/tabwriter" - "github.com/ionalpha/flynn/dependency" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/flow" - "github.com/ionalpha/flynn/playbook" + "github.com/ionalpha/flynn/internal/dependency" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/playbook" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/sandbox" - "github.com/ionalpha/flynn/service" ) // terminalConfirmer asks the operator to approve a playbook's confirm steps at the diff --git a/cmd/flynn/ps.go b/cmd/flynn/ps.go index e881ff3..3e626d3 100644 --- a/cmd/flynn/ps.go +++ b/cmd/flynn/ps.go @@ -11,7 +11,7 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/controlplane" "github.com/ionalpha/flynn/goal" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/ps_test.go b/cmd/flynn/ps_test.go index 39bc383..5a62b7d 100644 --- a/cmd/flynn/ps_test.go +++ b/cmd/flynn/ps_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/ionalpha/flynn/goal" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/run.go b/cmd/flynn/run.go index 274ea26..260dd87 100644 --- a/cmd/flynn/run.go +++ b/cmd/flynn/run.go @@ -12,35 +12,35 @@ import ( "sync" "time" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/brakes" "github.com/ionalpha/flynn/bus" "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/chain" - "github.com/ionalpha/flynn/credential" - "github.com/ionalpha/flynn/dependency" "github.com/ionalpha/flynn/dispatch" "github.com/ionalpha/flynn/driver" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/goal" "github.com/ionalpha/flynn/harness" "github.com/ionalpha/flynn/inbox" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/archetype" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/dependency" + "github.com/ionalpha/flynn/internal/instance" + "github.com/ionalpha/flynn/internal/playbook" + "github.com/ionalpha/flynn/internal/profilestore" + "github.com/ionalpha/flynn/internal/service" + "github.com/ionalpha/flynn/internal/spinesink" "github.com/ionalpha/flynn/jobs" "github.com/ionalpha/flynn/learn" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/mission" "github.com/ionalpha/flynn/orchestration" - "github.com/ionalpha/flynn/playbook" - "github.com/ionalpha/flynn/profilestore" "github.com/ionalpha/flynn/provider" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/runtime" "github.com/ionalpha/flynn/sandbox" - "github.com/ionalpha/flynn/service" "github.com/ionalpha/flynn/session" "github.com/ionalpha/flynn/spine" - "github.com/ionalpha/flynn/spinesink" "github.com/ionalpha/flynn/state" "github.com/ionalpha/flynn/storage/sqlite" "github.com/ionalpha/flynn/tools" diff --git a/cmd/flynn/serve.go b/cmd/flynn/serve.go index 22d9531..7b642c8 100644 --- a/cmd/flynn/serve.go +++ b/cmd/flynn/serve.go @@ -10,23 +10,23 @@ import ( "os/signal" "time" - "github.com/ionalpha/flynn/bindguard" "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/controlplane" - "github.com/ionalpha/flynn/exposure" "github.com/ionalpha/flynn/goal" "github.com/ionalpha/flynn/ids" "github.com/ionalpha/flynn/inbox" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/bindguard" + "github.com/ionalpha/flynn/internal/exposure" + "github.com/ionalpha/flynn/internal/instance" + "github.com/ionalpha/flynn/internal/ops" + "github.com/ionalpha/flynn/internal/service" + "github.com/ionalpha/flynn/internal/source/signalcli" + "github.com/ionalpha/flynn/internal/source/telegram" "github.com/ionalpha/flynn/internal/version" - "github.com/ionalpha/flynn/ops" "github.com/ionalpha/flynn/reconcile" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/runtime" - "github.com/ionalpha/flynn/service" - "github.com/ionalpha/flynn/source/signalcli" - "github.com/ionalpha/flynn/source/telegram" ) // runServe runs the agent as a long-lived service. It answers messages from chat diff --git a/cmd/flynn/serve_test.go b/cmd/flynn/serve_test.go index ac0aa97..3f24b60 100644 --- a/cmd/flynn/serve_test.go +++ b/cmd/flynn/serve_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/ionalpha/flynn/goal" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/cmd/flynn/spine.go b/cmd/flynn/spine.go index ab4546b..f7408a7 100644 --- a/cmd/flynn/spine.go +++ b/cmd/flynn/spine.go @@ -13,9 +13,9 @@ import ( "github.com/ionalpha/flynn/chain" "github.com/ionalpha/flynn/controlplane" + "github.com/ionalpha/flynn/internal/vault" "github.com/ionalpha/flynn/spine" "github.com/ionalpha/flynn/storage/sqlite" - "github.com/ionalpha/flynn/vault" ) // recordEventType is the event a sealed run's signed record is stored under, on the diff --git a/extension/catalog/gate_test.go b/extension/catalog/gate_test.go index f1054d6..2a3599a 100644 --- a/extension/catalog/gate_test.go +++ b/extension/catalog/gate_test.go @@ -7,8 +7,8 @@ import ( "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/extension/catalog" - "github.com/ionalpha/flynn/integrations" - "github.com/ionalpha/flynn/ops" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/ops" "github.com/ionalpha/flynn/resource" ) diff --git a/extension/catalog/github_test.go b/extension/catalog/github_test.go index 0fc7f84..251c1ff 100644 --- a/extension/catalog/github_test.go +++ b/extension/catalog/github_test.go @@ -7,12 +7,12 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/extension/catalog" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/mission" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/secret" diff --git a/acquire/acquire.go b/internal/acquire/acquire.go similarity index 99% rename from acquire/acquire.go rename to internal/acquire/acquire.go index f316337..49889e9 100644 --- a/acquire/acquire.go +++ b/internal/acquire/acquire.go @@ -25,7 +25,7 @@ import ( "strings" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/fetch" ) // ArchiveKind is the container format a release ships in. Both are handled with the diff --git a/acquire/acquire_test.go b/internal/acquire/acquire_test.go similarity index 99% rename from acquire/acquire_test.go rename to internal/acquire/acquire_test.go index 654a967..788ebf2 100644 --- a/acquire/acquire_test.go +++ b/internal/acquire/acquire_test.go @@ -16,7 +16,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/fetch" ) func buildZip(t *testing.T, files map[string]string) []byte { diff --git a/acquire/fuzz_test.go b/internal/acquire/fuzz_test.go similarity index 100% rename from acquire/fuzz_test.go rename to internal/acquire/fuzz_test.go diff --git a/acquire/property_test.go b/internal/acquire/property_test.go similarity index 100% rename from acquire/property_test.go rename to internal/acquire/property_test.go diff --git a/archetype/archetype.go b/internal/archetype/archetype.go similarity index 100% rename from archetype/archetype.go rename to internal/archetype/archetype.go diff --git a/archetype/archetype_test.go b/internal/archetype/archetype_test.go similarity index 98% rename from archetype/archetype_test.go rename to internal/archetype/archetype_test.go index e6047d4..9965ed8 100644 --- a/archetype/archetype_test.go +++ b/internal/archetype/archetype_test.go @@ -7,7 +7,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/archetype" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/resource" ) diff --git a/archetype/resolve.go b/internal/archetype/resolve.go similarity index 100% rename from archetype/resolve.go rename to internal/archetype/resolve.go diff --git a/archetype/resolve_test.go b/internal/archetype/resolve_test.go similarity index 99% rename from archetype/resolve_test.go rename to internal/archetype/resolve_test.go index 8740796..ff102a7 100644 --- a/archetype/resolve_test.go +++ b/internal/archetype/resolve_test.go @@ -8,8 +8,8 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/fault" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/resource" ) diff --git a/bindguard/bindguard.go b/internal/bindguard/bindguard.go similarity index 100% rename from bindguard/bindguard.go rename to internal/bindguard/bindguard.go diff --git a/bindguard/bindguard_test.go b/internal/bindguard/bindguard_test.go similarity index 100% rename from bindguard/bindguard_test.go rename to internal/bindguard/bindguard_test.go diff --git a/catalog/catalog.go b/internal/catalog/catalog.go similarity index 100% rename from catalog/catalog.go rename to internal/catalog/catalog.go diff --git a/catalog/catalog_test.go b/internal/catalog/catalog_test.go similarity index 100% rename from catalog/catalog_test.go rename to internal/catalog/catalog_test.go diff --git a/catalog/fit.go b/internal/catalog/fit.go similarity index 100% rename from catalog/fit.go rename to internal/catalog/fit.go diff --git a/catalog/fit_test.go b/internal/catalog/fit_test.go similarity index 100% rename from catalog/fit_test.go rename to internal/catalog/fit_test.go diff --git a/catalog/models.json b/internal/catalog/models.json similarity index 100% rename from catalog/models.json rename to internal/catalog/models.json diff --git a/credential/credential.go b/internal/credential/credential.go similarity index 100% rename from credential/credential.go rename to internal/credential/credential.go diff --git a/credential/credential_test.go b/internal/credential/credential_test.go similarity index 100% rename from credential/credential_test.go rename to internal/credential/credential_test.go diff --git a/credential/property_test.go b/internal/credential/property_test.go similarity index 100% rename from credential/property_test.go rename to internal/credential/property_test.go diff --git a/credential/store.go b/internal/credential/store.go similarity index 100% rename from credential/store.go rename to internal/credential/store.go diff --git a/credential/store_test.go b/internal/credential/store_test.go similarity index 100% rename from credential/store_test.go rename to internal/credential/store_test.go diff --git a/dependency/catalog.go b/internal/dependency/catalog.go similarity index 100% rename from dependency/catalog.go rename to internal/dependency/catalog.go diff --git a/dependency/catalog_test.go b/internal/dependency/catalog_test.go similarity index 100% rename from dependency/catalog_test.go rename to internal/dependency/catalog_test.go diff --git a/dependency/dependency.go b/internal/dependency/dependency.go similarity index 100% rename from dependency/dependency.go rename to internal/dependency/dependency.go diff --git a/dependency/gate_test.go b/internal/dependency/gate_test.go similarity index 98% rename from dependency/gate_test.go rename to internal/dependency/gate_test.go index ac62acc..a1d0cf2 100644 --- a/dependency/gate_test.go +++ b/internal/dependency/gate_test.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "testing" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/inference" "github.com/ionalpha/flynn/resource" ) diff --git a/dependency/manager.go b/internal/dependency/manager.go similarity index 98% rename from dependency/manager.go rename to internal/dependency/manager.go index dfc8f39..77f2fca 100644 --- a/dependency/manager.go +++ b/internal/dependency/manager.go @@ -7,10 +7,10 @@ import ( "runtime" "strings" - "github.com/ionalpha/flynn/acquire" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/acquire" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference" ) // Prober runs a present program's version command and returns its output. It is a narrow diff --git a/dependency/manager_test.go b/internal/dependency/manager_test.go similarity index 99% rename from dependency/manager_test.go rename to internal/dependency/manager_test.go index fb86b8d..b0a0da4 100644 --- a/dependency/manager_test.go +++ b/internal/dependency/manager_test.go @@ -13,7 +13,7 @@ import ( "os" "testing" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/fetch" "github.com/ionalpha/flynn/resource" ) diff --git a/dependency/prober.go b/internal/dependency/prober.go similarity index 100% rename from dependency/prober.go rename to internal/dependency/prober.go diff --git a/dependency/property_test.go b/internal/dependency/property_test.go similarity index 100% rename from dependency/property_test.go rename to internal/dependency/property_test.go diff --git a/dependency/specs/flyctl.json b/internal/dependency/specs/flyctl.json similarity index 100% rename from dependency/specs/flyctl.json rename to internal/dependency/specs/flyctl.json diff --git a/exposure/exposure.go b/internal/exposure/exposure.go similarity index 99% rename from exposure/exposure.go rename to internal/exposure/exposure.go index c6ed18c..cb3d7c8 100644 --- a/exposure/exposure.go +++ b/internal/exposure/exposure.go @@ -22,9 +22,9 @@ import ( "sync" "time" - "github.com/ionalpha/flynn/bindguard" "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/ids" + "github.com/ionalpha/flynn/internal/bindguard" "github.com/ionalpha/flynn/observe" ) diff --git a/exposure/exposure_test.go b/internal/exposure/exposure_test.go similarity index 98% rename from exposure/exposure_test.go rename to internal/exposure/exposure_test.go index 74c082d..9d18050 100644 --- a/exposure/exposure_test.go +++ b/internal/exposure/exposure_test.go @@ -7,8 +7,8 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/bindguard" "github.com/ionalpha/flynn/clock" + "github.com/ionalpha/flynn/internal/bindguard" ) func TestListenRegistersAndDeregistersOnClose(t *testing.T) { diff --git a/fetch/chaos_test.go b/internal/fetch/chaos_test.go similarity index 100% rename from fetch/chaos_test.go rename to internal/fetch/chaos_test.go diff --git a/fetch/fetch.go b/internal/fetch/fetch.go similarity index 100% rename from fetch/fetch.go rename to internal/fetch/fetch.go diff --git a/fetch/fetch_test.go b/internal/fetch/fetch_test.go similarity index 100% rename from fetch/fetch_test.go rename to internal/fetch/fetch_test.go diff --git a/fetch/fuzz_test.go b/internal/fetch/fuzz_test.go similarity index 100% rename from fetch/fuzz_test.go rename to internal/fetch/fuzz_test.go diff --git a/flow/actions.go b/internal/flow/actions.go similarity index 100% rename from flow/actions.go rename to internal/flow/actions.go diff --git a/flow/eval.go b/internal/flow/eval.go similarity index 100% rename from flow/eval.go rename to internal/flow/eval.go diff --git a/flow/expr.go b/internal/flow/expr.go similarity index 100% rename from flow/expr.go rename to internal/flow/expr.go diff --git a/flow/expr_test.go b/internal/flow/expr_test.go similarity index 100% rename from flow/expr_test.go rename to internal/flow/expr_test.go diff --git a/flow/flow.go b/internal/flow/flow.go similarity index 100% rename from flow/flow.go rename to internal/flow/flow.go diff --git a/flow/flow_test.go b/internal/flow/flow_test.go similarity index 100% rename from flow/flow_test.go rename to internal/flow/flow_test.go diff --git a/flow/fuzz_test.go b/internal/flow/fuzz_test.go similarity index 100% rename from flow/fuzz_test.go rename to internal/flow/fuzz_test.go diff --git a/flow/interp.go b/internal/flow/interp.go similarity index 100% rename from flow/interp.go rename to internal/flow/interp.go diff --git a/flow/interp_test.go b/internal/flow/interp_test.go similarity index 100% rename from flow/interp_test.go rename to internal/flow/interp_test.go diff --git a/flow/newops_test.go b/internal/flow/newops_test.go similarity index 100% rename from flow/newops_test.go rename to internal/flow/newops_test.go diff --git a/flow/observe.go b/internal/flow/observe.go similarity index 100% rename from flow/observe.go rename to internal/flow/observe.go diff --git a/flow/property_test.go b/internal/flow/property_test.go similarity index 100% rename from flow/property_test.go rename to internal/flow/property_test.go diff --git a/flow/template.go b/internal/flow/template.go similarity index 100% rename from flow/template.go rename to internal/flow/template.go diff --git a/flow/template_test.go b/internal/flow/template_test.go similarity index 100% rename from flow/template_test.go rename to internal/flow/template_test.go diff --git a/gbnf/dialect_test.go b/internal/gbnf/dialect_test.go similarity index 100% rename from gbnf/dialect_test.go rename to internal/gbnf/dialect_test.go diff --git a/gbnf/equiv_test.go b/internal/gbnf/equiv_test.go similarity index 100% rename from gbnf/equiv_test.go rename to internal/gbnf/equiv_test.go diff --git a/gbnf/fuzz_test.go b/internal/gbnf/fuzz_test.go similarity index 100% rename from gbnf/fuzz_test.go rename to internal/gbnf/fuzz_test.go diff --git a/gbnf/gbnf.go b/internal/gbnf/gbnf.go similarity index 100% rename from gbnf/gbnf.go rename to internal/gbnf/gbnf.go diff --git a/gbnf/gbnf_test.go b/internal/gbnf/gbnf_test.go similarity index 100% rename from gbnf/gbnf_test.go rename to internal/gbnf/gbnf_test.go diff --git a/gbnf/lint.go b/internal/gbnf/lint.go similarity index 100% rename from gbnf/lint.go rename to internal/gbnf/lint.go diff --git a/gbnf/rapid_test.go b/internal/gbnf/rapid_test.go similarity index 100% rename from gbnf/rapid_test.go rename to internal/gbnf/rapid_test.go diff --git a/gbnf/recognize.go b/internal/gbnf/recognize.go similarity index 100% rename from gbnf/recognize.go rename to internal/gbnf/recognize.go diff --git a/gbnf/schema.go b/internal/gbnf/schema.go similarity index 100% rename from gbnf/schema.go rename to internal/gbnf/schema.go diff --git a/gbnf/toolcall.go b/internal/gbnf/toolcall.go similarity index 100% rename from gbnf/toolcall.go rename to internal/gbnf/toolcall.go diff --git a/gguf/gguf.go b/internal/gguf/gguf.go similarity index 100% rename from gguf/gguf.go rename to internal/gguf/gguf.go diff --git a/gguf/gguf_test.go b/internal/gguf/gguf_test.go similarity index 100% rename from gguf/gguf_test.go rename to internal/gguf/gguf_test.go diff --git a/gguf/property_test.go b/internal/gguf/property_test.go similarity index 100% rename from gguf/property_test.go rename to internal/gguf/property_test.go diff --git a/gguf/template.go b/internal/gguf/template.go similarity index 100% rename from gguf/template.go rename to internal/gguf/template.go diff --git a/grade/grade.go b/internal/grade/grade.go similarity index 100% rename from grade/grade.go rename to internal/grade/grade.go diff --git a/grade/grade_test.go b/internal/grade/grade_test.go similarity index 99% rename from grade/grade_test.go rename to internal/grade/grade_test.go index 1fea4e6..f187bb0 100644 --- a/grade/grade_test.go +++ b/internal/grade/grade_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/ionalpha/flynn/grade" + "github.com/ionalpha/flynn/internal/grade" "github.com/ionalpha/flynn/spine" ) diff --git a/grade/property_test.go b/internal/grade/property_test.go similarity index 97% rename from grade/property_test.go rename to internal/grade/property_test.go index 0cc2232..ece2483 100644 --- a/grade/property_test.go +++ b/internal/grade/property_test.go @@ -6,7 +6,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/grade" + "github.com/ionalpha/flynn/internal/grade" ) // TestProp_CumulativeScoreIsLeadingPassFraction checks the defining invariant of a diff --git a/grade/record.go b/internal/grade/record.go similarity index 100% rename from grade/record.go rename to internal/grade/record.go diff --git a/grade/record_test.go b/internal/grade/record_test.go similarity index 97% rename from grade/record_test.go rename to internal/grade/record_test.go index 9ecb7ad..ed1d1f3 100644 --- a/grade/record_test.go +++ b/internal/grade/record_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/ionalpha/flynn/grade" + "github.com/ionalpha/flynn/internal/grade" "github.com/ionalpha/flynn/spine" ) diff --git a/hardware/hardware.go b/internal/hardware/hardware.go similarity index 100% rename from hardware/hardware.go rename to internal/hardware/hardware.go diff --git a/hardware/hardware_test.go b/internal/hardware/hardware_test.go similarity index 100% rename from hardware/hardware_test.go rename to internal/hardware/hardware_test.go diff --git a/hardware/ram_darwin.go b/internal/hardware/ram_darwin.go similarity index 100% rename from hardware/ram_darwin.go rename to internal/hardware/ram_darwin.go diff --git a/hardware/ram_linux.go b/internal/hardware/ram_linux.go similarity index 100% rename from hardware/ram_linux.go rename to internal/hardware/ram_linux.go diff --git a/hardware/ram_other.go b/internal/hardware/ram_other.go similarity index 100% rename from hardware/ram_other.go rename to internal/hardware/ram_other.go diff --git a/hardware/ram_windows.go b/internal/hardware/ram_windows.go similarity index 100% rename from hardware/ram_windows.go rename to internal/hardware/ram_windows.go diff --git a/huggingface/huggingface.go b/internal/huggingface/huggingface.go similarity index 100% rename from huggingface/huggingface.go rename to internal/huggingface/huggingface.go diff --git a/huggingface/huggingface_test.go b/internal/huggingface/huggingface_test.go similarity index 100% rename from huggingface/huggingface_test.go rename to internal/huggingface/huggingface_test.go diff --git a/huggingface/rapid_test.go b/internal/huggingface/rapid_test.go similarity index 100% rename from huggingface/rapid_test.go rename to internal/huggingface/rapid_test.go diff --git a/inference/advisory.go b/internal/inference/advisory.go similarity index 100% rename from inference/advisory.go rename to internal/inference/advisory.go diff --git a/inference/inference.go b/internal/inference/inference.go similarity index 100% rename from inference/inference.go rename to internal/inference/inference.go diff --git a/inference/inference_test.go b/internal/inference/inference_test.go similarity index 100% rename from inference/inference_test.go rename to internal/inference/inference_test.go diff --git a/inference/launch/chaos_test.go b/internal/inference/launch/chaos_test.go similarity index 100% rename from inference/launch/chaos_test.go rename to internal/inference/launch/chaos_test.go diff --git a/inference/launch/fuzz_test.go b/internal/inference/launch/fuzz_test.go similarity index 96% rename from inference/launch/fuzz_test.go rename to internal/inference/launch/fuzz_test.go index 349c0ac..8d154b6 100644 --- a/inference/launch/fuzz_test.go +++ b/internal/inference/launch/fuzz_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" ) // FuzzBuildPlan asserts that no configuration, however malformed its strings, can make diff --git a/inference/launch/inspect.go b/internal/inference/launch/inspect.go similarity index 96% rename from inference/launch/inspect.go rename to internal/inference/launch/inspect.go index 8bf9126..2ab38c4 100644 --- a/inference/launch/inspect.go +++ b/internal/inference/launch/inspect.go @@ -4,7 +4,7 @@ import ( "os" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/gguf" + "github.com/ionalpha/flynn/internal/gguf" ) // InspectTemplate reads the weights' GGUF metadata with the hardened reader, never the diff --git a/inference/launch/launch.go b/internal/inference/launch/launch.go similarity index 99% rename from inference/launch/launch.go rename to internal/inference/launch/launch.go index ad5792b..59c8d63 100644 --- a/inference/launch/launch.go +++ b/internal/inference/launch/launch.go @@ -17,8 +17,8 @@ import ( "fmt" "strconv" - "github.com/ionalpha/flynn/catalog" "github.com/ionalpha/flynn/fault" + "github.com/ionalpha/flynn/internal/catalog" ) // loopbackHost is the only address a local model server is bound to. Binding anywhere diff --git a/inference/launch/launch_test.go b/internal/inference/launch/launch_test.go similarity index 99% rename from inference/launch/launch_test.go rename to internal/inference/launch/launch_test.go index 718a31f..cdb811c 100644 --- a/inference/launch/launch_test.go +++ b/internal/inference/launch/launch_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" ) // localModel is a minimal local catalog entry for building plans in tests. diff --git a/inference/launch/property_test.go b/internal/inference/launch/property_test.go similarity index 100% rename from inference/launch/property_test.go rename to internal/inference/launch/property_test.go diff --git a/inference/modelsource/fuzz_test.go b/internal/inference/modelsource/fuzz_test.go similarity index 100% rename from inference/modelsource/fuzz_test.go rename to internal/inference/modelsource/fuzz_test.go diff --git a/inference/modelsource/property_test.go b/internal/inference/modelsource/property_test.go similarity index 100% rename from inference/modelsource/property_test.go rename to internal/inference/modelsource/property_test.go diff --git a/inference/modelsource/provenance.go b/internal/inference/modelsource/provenance.go similarity index 100% rename from inference/modelsource/provenance.go rename to internal/inference/modelsource/provenance.go diff --git a/inference/modelsource/provenance_test.go b/internal/inference/modelsource/provenance_test.go similarity index 100% rename from inference/modelsource/provenance_test.go rename to internal/inference/modelsource/provenance_test.go diff --git a/inference/modelsource/publishers.go b/internal/inference/modelsource/publishers.go similarity index 100% rename from inference/modelsource/publishers.go rename to internal/inference/modelsource/publishers.go diff --git a/inference/modelsource/risk.go b/internal/inference/modelsource/risk.go similarity index 100% rename from inference/modelsource/risk.go rename to internal/inference/modelsource/risk.go diff --git a/inference/modelsource/risk_test.go b/internal/inference/modelsource/risk_test.go similarity index 100% rename from inference/modelsource/risk_test.go rename to internal/inference/modelsource/risk_test.go diff --git a/inference/modelsource/source.go b/internal/inference/modelsource/source.go similarity index 100% rename from inference/modelsource/source.go rename to internal/inference/modelsource/source.go diff --git a/inference/modelsource/source_test.go b/internal/inference/modelsource/source_test.go similarity index 100% rename from inference/modelsource/source_test.go rename to internal/inference/modelsource/source_test.go diff --git a/inference/orchestrate/controller.go b/internal/inference/orchestrate/controller.go similarity index 100% rename from inference/orchestrate/controller.go rename to internal/inference/orchestrate/controller.go diff --git a/inference/orchestrate/controller_chaos_test.go b/internal/inference/orchestrate/controller_chaos_test.go similarity index 100% rename from inference/orchestrate/controller_chaos_test.go rename to internal/inference/orchestrate/controller_chaos_test.go diff --git a/inference/orchestrate/controller_recovery_test.go b/internal/inference/orchestrate/controller_recovery_test.go similarity index 100% rename from inference/orchestrate/controller_recovery_test.go rename to internal/inference/orchestrate/controller_recovery_test.go diff --git a/inference/orchestrate/controller_test.go b/internal/inference/orchestrate/controller_test.go similarity index 100% rename from inference/orchestrate/controller_test.go rename to internal/inference/orchestrate/controller_test.go diff --git a/inference/orchestrate/recover.go b/internal/inference/orchestrate/recover.go similarity index 100% rename from inference/orchestrate/recover.go rename to internal/inference/orchestrate/recover.go diff --git a/inference/orchestrate/recover_fuzz_test.go b/internal/inference/orchestrate/recover_fuzz_test.go similarity index 100% rename from inference/orchestrate/recover_fuzz_test.go rename to internal/inference/orchestrate/recover_fuzz_test.go diff --git a/inference/orchestrate/recover_property_test.go b/internal/inference/orchestrate/recover_property_test.go similarity index 100% rename from inference/orchestrate/recover_property_test.go rename to internal/inference/orchestrate/recover_property_test.go diff --git a/inference/orchestrate/recover_test.go b/internal/inference/orchestrate/recover_test.go similarity index 100% rename from inference/orchestrate/recover_test.go rename to internal/inference/orchestrate/recover_test.go diff --git a/inference/orchestrate/schedule.go b/internal/inference/orchestrate/schedule.go similarity index 100% rename from inference/orchestrate/schedule.go rename to internal/inference/orchestrate/schedule.go diff --git a/inference/orchestrate/schedule_draft_test.go b/internal/inference/orchestrate/schedule_draft_test.go similarity index 100% rename from inference/orchestrate/schedule_draft_test.go rename to internal/inference/orchestrate/schedule_draft_test.go diff --git a/inference/orchestrate/schedule_fuzz_test.go b/internal/inference/orchestrate/schedule_fuzz_test.go similarity index 100% rename from inference/orchestrate/schedule_fuzz_test.go rename to internal/inference/orchestrate/schedule_fuzz_test.go diff --git a/inference/orchestrate/schedule_property_test.go b/internal/inference/orchestrate/schedule_property_test.go similarity index 100% rename from inference/orchestrate/schedule_property_test.go rename to internal/inference/orchestrate/schedule_property_test.go diff --git a/inference/orchestrate/schedule_test.go b/internal/inference/orchestrate/schedule_test.go similarity index 100% rename from inference/orchestrate/schedule_test.go rename to internal/inference/orchestrate/schedule_test.go diff --git a/inference/orchestrate/serve_adapter.go b/internal/inference/orchestrate/serve_adapter.go similarity index 98% rename from inference/orchestrate/serve_adapter.go rename to internal/inference/orchestrate/serve_adapter.go index 5e2ceb5..e204879 100644 --- a/inference/orchestrate/serve_adapter.go +++ b/internal/inference/orchestrate/serve_adapter.go @@ -3,7 +3,7 @@ package orchestrate import ( "context" - "github.com/ionalpha/flynn/inference/serve" + "github.com/ionalpha/flynn/internal/inference/serve" ) // LaunchLevel is how aggressively a launch shrinks a model's footprint to make it fit. It diff --git a/inference/orchestrate/testdata/fuzz/FuzzSchedule/484cdffd9319ec51 b/internal/inference/orchestrate/testdata/fuzz/FuzzSchedule/484cdffd9319ec51 similarity index 100% rename from inference/orchestrate/testdata/fuzz/FuzzSchedule/484cdffd9319ec51 rename to internal/inference/orchestrate/testdata/fuzz/FuzzSchedule/484cdffd9319ec51 diff --git a/inference/orchestrate/testdata/rapid/TestDraftCoResidency/TestDraftCoResidency-20260627225841-21732.fail b/internal/inference/orchestrate/testdata/rapid/TestDraftCoResidency/TestDraftCoResidency-20260627225841-21732.fail similarity index 100% rename from inference/orchestrate/testdata/rapid/TestDraftCoResidency/TestDraftCoResidency-20260627225841-21732.fail rename to internal/inference/orchestrate/testdata/rapid/TestDraftCoResidency/TestDraftCoResidency-20260627225841-21732.fail diff --git a/inference/property_test.go b/internal/inference/property_test.go similarity index 100% rename from inference/property_test.go rename to internal/inference/property_test.go diff --git a/inference/provision/chaos_test.go b/internal/inference/provision/chaos_test.go similarity index 97% rename from inference/provision/chaos_test.go rename to internal/inference/provision/chaos_test.go index ad3fac6..8fca4f5 100644 --- a/inference/provision/chaos_test.go +++ b/internal/inference/provision/chaos_test.go @@ -9,8 +9,8 @@ import ( "path/filepath" "testing" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference" ) // faultyBody yields data until failAfter bytes, then injects a read error: a download diff --git a/inference/provision/property_test.go b/internal/inference/provision/property_test.go similarity index 100% rename from inference/provision/property_test.go rename to internal/inference/provision/property_test.go diff --git a/inference/provision/provision.go b/internal/inference/provision/provision.go similarity index 96% rename from inference/provision/provision.go rename to internal/inference/provision/provision.go index 4ddaa70..1487ec6 100644 --- a/inference/provision/provision.go +++ b/internal/inference/provision/provision.go @@ -18,9 +18,9 @@ import ( "context" "path/filepath" - "github.com/ionalpha/flynn/acquire" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/acquire" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference" ) // ArchiveKind is the container format a runtime release ships in. Its values match diff --git a/inference/provision/provision_test.go b/internal/inference/provision/provision_test.go similarity index 98% rename from inference/provision/provision_test.go rename to internal/inference/provision/provision_test.go index 190ce0d..b0bb8ed 100644 --- a/inference/provision/provision_test.go +++ b/internal/inference/provision/provision_test.go @@ -15,9 +15,9 @@ import ( "runtime" "testing" - "github.com/ionalpha/flynn/acquire" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/acquire" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference" ) // buildZip returns a zip archive whose entries are the given name->content map, plus diff --git a/inference/provision/provisioner.go b/internal/inference/provision/provisioner.go similarity index 99% rename from inference/provision/provisioner.go rename to internal/inference/provision/provisioner.go index f7a1aca..4226df0 100644 --- a/inference/provision/provisioner.go +++ b/internal/inference/provision/provisioner.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/fetch" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/fetch" + "github.com/ionalpha/flynn/internal/inference" ) // This file generalizes acquisition. Install (the rest of this package) obtains one shape diff --git a/inference/provision/provisioner_test.go b/internal/inference/provision/provisioner_test.go similarity index 99% rename from inference/provision/provisioner_test.go rename to internal/inference/provision/provisioner_test.go index 3bca748..f2dc658 100644 --- a/inference/provision/provisioner_test.go +++ b/internal/inference/provision/provisioner_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/inference" + "github.com/ionalpha/flynn/internal/inference" ) // pinnedTestDigest is a well-formed sha256 image digest for building container specs. diff --git a/inference/provision/registry.go b/internal/inference/provision/registry.go similarity index 98% rename from inference/provision/registry.go rename to internal/inference/provision/registry.go index a0d9ba4..cca8bb0 100644 --- a/inference/provision/registry.go +++ b/internal/inference/provision/registry.go @@ -1,6 +1,6 @@ package provision -import "github.com/ionalpha/flynn/inference" +import "github.com/ionalpha/flynn/internal/inference" // llamaCppVersion is the pinned llama.cpp build Flynn installs. It is above the // runtime's minimum-supported floor, so every entry below passes the version gate. The diff --git a/inference/provision/vllm.go b/internal/inference/provision/vllm.go similarity index 97% rename from inference/provision/vllm.go rename to internal/inference/provision/vllm.go index 59c9e55..29a319d 100644 --- a/inference/provision/vllm.go +++ b/internal/inference/provision/vllm.go @@ -1,6 +1,6 @@ package provision -import "github.com/ionalpha/flynn/inference" +import "github.com/ionalpha/flynn/internal/inference" // This file pins the vLLM container image Flynn runs the GPU serving path on. A container // runtime is acquired as a digest-pinned image rather than a binary archive: the digest is diff --git a/inference/provision/weights.go b/internal/inference/provision/weights.go similarity index 97% rename from inference/provision/weights.go rename to internal/inference/provision/weights.go index 6d71f6a..85a2e69 100644 --- a/inference/provision/weights.go +++ b/internal/inference/provision/weights.go @@ -5,9 +5,9 @@ import ( "fmt" "os" - "github.com/ionalpha/flynn/acquire" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/acquire" + "github.com/ionalpha/flynn/internal/fetch" ) // This file acquires a multi-file model: a directory of weight shards plus the tokenizer and diff --git a/inference/provision/weights_test.go b/internal/inference/provision/weights_test.go similarity index 98% rename from inference/provision/weights_test.go rename to internal/inference/provision/weights_test.go index 86d8807..baf229a 100644 --- a/inference/provision/weights_test.go +++ b/internal/inference/provision/weights_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/fetch" + "github.com/ionalpha/flynn/internal/fetch" ) // serveFiles starts a TLS server serving a set of named files and a downloader that trusts diff --git a/inference/serve/chaos_test.go b/internal/inference/serve/chaos_test.go similarity index 100% rename from inference/serve/chaos_test.go rename to internal/inference/serve/chaos_test.go diff --git a/inference/serve/container_serve_integration_test.go b/internal/inference/serve/container_serve_integration_test.go similarity index 98% rename from inference/serve/container_serve_integration_test.go rename to internal/inference/serve/container_serve_integration_test.go index 5064e1a..3dd518f 100644 --- a/inference/serve/container_serve_integration_test.go +++ b/internal/inference/serve/container_serve_integration_test.go @@ -18,7 +18,7 @@ import ( "testing" "time" - "github.com/ionalpha/flynn/bindguard" + "github.com/ionalpha/flynn/internal/bindguard" "github.com/ionalpha/flynn/sandbox" ) diff --git a/inference/serve/container_serve_test.go b/internal/inference/serve/container_serve_test.go similarity index 100% rename from inference/serve/container_serve_test.go rename to internal/inference/serve/container_serve_test.go diff --git a/inference/serve/fuzz_test.go b/internal/inference/serve/fuzz_test.go similarity index 100% rename from inference/serve/fuzz_test.go rename to internal/inference/serve/fuzz_test.go diff --git a/inference/serve/property_test.go b/internal/inference/serve/property_test.go similarity index 100% rename from inference/serve/property_test.go rename to internal/inference/serve/property_test.go diff --git a/inference/serve/registry.go b/internal/inference/serve/registry.go similarity index 100% rename from inference/serve/registry.go rename to internal/inference/serve/registry.go diff --git a/inference/serve/serve.go b/internal/inference/serve/serve.go similarity index 99% rename from inference/serve/serve.go rename to internal/inference/serve/serve.go index cdcf76c..b8e0ae0 100644 --- a/inference/serve/serve.go +++ b/internal/inference/serve/serve.go @@ -18,7 +18,7 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/inference/launch" + "github.com/ionalpha/flynn/internal/inference/launch" "github.com/ionalpha/flynn/sandbox" ) diff --git a/inference/serve/serve_test.go b/internal/inference/serve/serve_test.go similarity index 99% rename from inference/serve/serve_test.go rename to internal/inference/serve/serve_test.go index bab805d..ea68ae5 100644 --- a/inference/serve/serve_test.go +++ b/internal/inference/serve/serve_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/inference/launch" + "github.com/ionalpha/flynn/internal/inference/launch" "github.com/ionalpha/flynn/sandbox" ) diff --git a/inference/serve/stats.go b/internal/inference/serve/stats.go similarity index 100% rename from inference/serve/stats.go rename to internal/inference/serve/stats.go diff --git a/inference/serve/stats_chaos_test.go b/internal/inference/serve/stats_chaos_test.go similarity index 100% rename from inference/serve/stats_chaos_test.go rename to internal/inference/serve/stats_chaos_test.go diff --git a/inference/serve/stats_fuzz_test.go b/internal/inference/serve/stats_fuzz_test.go similarity index 100% rename from inference/serve/stats_fuzz_test.go rename to internal/inference/serve/stats_fuzz_test.go diff --git a/inference/serve/stats_http_test.go b/internal/inference/serve/stats_http_test.go similarity index 100% rename from inference/serve/stats_http_test.go rename to internal/inference/serve/stats_http_test.go diff --git a/inference/serve/stats_property_test.go b/internal/inference/serve/stats_property_test.go similarity index 100% rename from inference/serve/stats_property_test.go rename to internal/inference/serve/stats_property_test.go diff --git a/inference/serve/stats_test.go b/internal/inference/serve/stats_test.go similarity index 100% rename from inference/serve/stats_test.go rename to internal/inference/serve/stats_test.go diff --git a/inference/serve/wiring.go b/internal/inference/serve/wiring.go similarity index 100% rename from inference/serve/wiring.go rename to internal/inference/serve/wiring.go diff --git a/instance/effective_test.go b/internal/instance/effective_test.go similarity index 99% rename from instance/effective_test.go rename to internal/instance/effective_test.go index a3b83f0..aad917d 100644 --- a/instance/effective_test.go +++ b/internal/instance/effective_test.go @@ -7,7 +7,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/instance/heartbeat.go b/internal/instance/heartbeat.go similarity index 100% rename from instance/heartbeat.go rename to internal/instance/heartbeat.go diff --git a/instance/heartbeat_test.go b/internal/instance/heartbeat_test.go similarity index 100% rename from instance/heartbeat_test.go rename to internal/instance/heartbeat_test.go diff --git a/instance/instance.go b/internal/instance/instance.go similarity index 100% rename from instance/instance.go rename to internal/instance/instance.go diff --git a/instance/instance_test.go b/internal/instance/instance_test.go similarity index 98% rename from instance/instance_test.go rename to internal/instance/instance_test.go index 4e349f1..cc2e256 100644 --- a/instance/instance_test.go +++ b/internal/instance/instance_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/instance/property_test.go b/internal/instance/property_test.go similarity index 98% rename from instance/property_test.go rename to internal/instance/property_test.go index f6f6397..3307192 100644 --- a/instance/property_test.go +++ b/internal/instance/property_test.go @@ -6,7 +6,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/instance" + "github.com/ionalpha/flynn/internal/instance" "github.com/ionalpha/flynn/resource" ) diff --git a/integrations/auth/auth.go b/internal/integrations/auth/auth.go similarity index 100% rename from integrations/auth/auth.go rename to internal/integrations/auth/auth.go diff --git a/integrations/auth/auth_test.go b/internal/integrations/auth/auth_test.go similarity index 99% rename from integrations/auth/auth_test.go rename to internal/integrations/auth/auth_test.go index a63ea99..ed62e70 100644 --- a/integrations/auth/auth_test.go +++ b/internal/integrations/auth/auth_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/auth" "github.com/ionalpha/flynn/secret" ) diff --git a/integrations/auth/fuzz_test.go b/internal/integrations/auth/fuzz_test.go similarity index 97% rename from integrations/auth/fuzz_test.go rename to internal/integrations/auth/fuzz_test.go index 85f406f..92e0220 100644 --- a/integrations/auth/fuzz_test.go +++ b/internal/integrations/auth/fuzz_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/auth" ) // FuzzApply throws hostile bytes at every field an integration spec and a vault diff --git a/integrations/auth/oauth2.go b/internal/integrations/auth/oauth2.go similarity index 100% rename from integrations/auth/oauth2.go rename to internal/integrations/auth/oauth2.go diff --git a/integrations/auth/oauth2_test.go b/internal/integrations/auth/oauth2_test.go similarity index 99% rename from integrations/auth/oauth2_test.go rename to internal/integrations/auth/oauth2_test.go index 9e923da..70600c9 100644 --- a/integrations/auth/oauth2_test.go +++ b/internal/integrations/auth/oauth2_test.go @@ -11,7 +11,7 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/auth" ) // fakeExchanger is a scripted token endpoint: it records each request and returns a diff --git a/integrations/auth/property_test.go b/internal/integrations/auth/property_test.go similarity index 98% rename from integrations/auth/property_test.go rename to internal/integrations/auth/property_test.go index 0905206..1027c60 100644 --- a/integrations/auth/property_test.go +++ b/internal/integrations/auth/property_test.go @@ -8,7 +8,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/auth" ) // drawBytes draws an arbitrary byte string, including control bytes and high diff --git a/integrations/credential_test.go b/internal/integrations/credential_test.go similarity index 98% rename from integrations/credential_test.go rename to internal/integrations/credential_test.go index 4d62a0a..02b0dbb 100644 --- a/integrations/credential_test.go +++ b/internal/integrations/credential_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/ionalpha/flynn/capability" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/resource" ) diff --git a/integrations/doer.go b/internal/integrations/doer.go similarity index 98% rename from integrations/doer.go rename to internal/integrations/doer.go index 285e781..2857eca 100644 --- a/integrations/doer.go +++ b/internal/integrations/doer.go @@ -10,12 +10,12 @@ import ( "strings" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/flow" - "github.com/ionalpha/flynn/integrations/auth" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/secret" ) diff --git a/integrations/oauth2_test.go b/internal/integrations/oauth2_test.go similarity index 95% rename from integrations/oauth2_test.go rename to internal/integrations/oauth2_test.go index e4bb295..272f595 100644 --- a/integrations/oauth2_test.go +++ b/internal/integrations/oauth2_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/integrations/request" ) // TestOAuth2IntegrationEndToEnd proves an oauth2 integration obtains a token from the diff --git a/integrations/property_test.go b/internal/integrations/property_test.go similarity index 100% rename from integrations/property_test.go rename to internal/integrations/property_test.go diff --git a/integrations/request/chaos_test.go b/internal/integrations/request/chaos_test.go similarity index 97% rename from integrations/request/chaos_test.go rename to internal/integrations/request/chaos_test.go index 9ce2cf1..2fcd110 100644 --- a/integrations/request/chaos_test.go +++ b/internal/integrations/request/chaos_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/internal/testkit" ) diff --git a/integrations/request/classify.go b/internal/integrations/request/classify.go similarity index 100% rename from integrations/request/classify.go rename to internal/integrations/request/classify.go diff --git a/integrations/request/fuzz_test.go b/internal/integrations/request/fuzz_test.go similarity index 100% rename from integrations/request/fuzz_test.go rename to internal/integrations/request/fuzz_test.go diff --git a/integrations/request/property_test.go b/internal/integrations/request/property_test.go similarity index 98% rename from integrations/request/property_test.go rename to internal/integrations/request/property_test.go index 1520ebf..e6218a4 100644 --- a/integrations/request/property_test.go +++ b/internal/integrations/request/property_test.go @@ -10,7 +10,7 @@ import ( "pgregory.net/rapid" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" ) // outcome is a generated per-call result: a status code, or a network error. diff --git a/integrations/request/ratelimit.go b/internal/integrations/request/ratelimit.go similarity index 100% rename from integrations/request/ratelimit.go rename to internal/integrations/request/ratelimit.go diff --git a/integrations/request/ratelimit_internal_test.go b/internal/integrations/request/ratelimit_internal_test.go similarity index 100% rename from integrations/request/ratelimit_internal_test.go rename to internal/integrations/request/ratelimit_internal_test.go diff --git a/integrations/request/request.go b/internal/integrations/request/request.go similarity index 100% rename from integrations/request/request.go rename to internal/integrations/request/request.go diff --git a/integrations/request/request_test.go b/internal/integrations/request/request_test.go similarity index 99% rename from integrations/request/request_test.go rename to internal/integrations/request/request_test.go index 3b53fbc..a434fca 100644 --- a/integrations/request/request_test.go +++ b/internal/integrations/request/request_test.go @@ -11,7 +11,7 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" ) // step is one scripted outcome of a doer call as plain data: either an error, or a diff --git a/integrations/request/secure_default_test.go b/internal/integrations/request/secure_default_test.go similarity index 96% rename from integrations/request/secure_default_test.go rename to internal/integrations/request/secure_default_test.go index 058f1be..49fb704 100644 --- a/integrations/request/secure_default_test.go +++ b/internal/integrations/request/secure_default_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" ) // TestDefaultTransportRefusesPrivateEgress proves the secure default: a Transport diff --git a/integrations/request/testdata/fuzz/FuzzParseRetryAfter/c97e4d372704b843 b/internal/integrations/request/testdata/fuzz/FuzzParseRetryAfter/c97e4d372704b843 similarity index 100% rename from integrations/request/testdata/fuzz/FuzzParseRetryAfter/c97e4d372704b843 rename to internal/integrations/request/testdata/fuzz/FuzzParseRetryAfter/c97e4d372704b843 diff --git a/integrations/surface.go b/internal/integrations/surface.go similarity index 98% rename from integrations/surface.go rename to internal/integrations/surface.go index 41f72e8..8aa76d0 100644 --- a/integrations/surface.go +++ b/internal/integrations/surface.go @@ -21,12 +21,12 @@ import ( "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/credential" "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/flow" - "github.com/ionalpha/flynn/integrations/auth" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/credential" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/integrations/auth" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/mission" "github.com/ionalpha/flynn/secret" diff --git a/integrations/surface_test.go b/internal/integrations/surface_test.go similarity index 99% rename from integrations/surface_test.go rename to internal/integrations/surface_test.go index d6885ad..c1875cb 100644 --- a/integrations/surface_test.go +++ b/internal/integrations/surface_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/ionalpha/flynn/extension" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/secret" ) diff --git a/migrate/migrate.go b/internal/migrate/migrate.go similarity index 100% rename from migrate/migrate.go rename to internal/migrate/migrate.go diff --git a/migrate/migrate_test.go b/internal/migrate/migrate_test.go similarity index 98% rename from migrate/migrate_test.go rename to internal/migrate/migrate_test.go index 8c7a9c3..a085ae5 100644 --- a/migrate/migrate_test.go +++ b/internal/migrate/migrate_test.go @@ -8,7 +8,7 @@ import ( _ "modernc.org/sqlite" // registers the pure-Go "sqlite" driver - "github.com/ionalpha/flynn/migrate" + "github.com/ionalpha/flynn/internal/migrate" ) // openMem returns an in-memory SQLite handle pinned to a single connection, so diff --git a/migrate/property_test.go b/internal/migrate/property_test.go similarity index 98% rename from migrate/property_test.go rename to internal/migrate/property_test.go index ea7a79c..b4b8a77 100644 --- a/migrate/property_test.go +++ b/internal/migrate/property_test.go @@ -9,7 +9,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/migrate" + "github.com/ionalpha/flynn/internal/migrate" ) // buildMigrations returns n migrations 0001..000n, each creating table t. diff --git a/modelformat/modelformat.go b/internal/modelformat/modelformat.go similarity index 100% rename from modelformat/modelformat.go rename to internal/modelformat/modelformat.go diff --git a/modelformat/modelformat_test.go b/internal/modelformat/modelformat_test.go similarity index 100% rename from modelformat/modelformat_test.go rename to internal/modelformat/modelformat_test.go diff --git a/modelformat/property_test.go b/internal/modelformat/property_test.go similarity index 100% rename from modelformat/property_test.go rename to internal/modelformat/property_test.go diff --git a/modeltrust/modeltrust.go b/internal/modeltrust/modeltrust.go similarity index 98% rename from modeltrust/modeltrust.go rename to internal/modeltrust/modeltrust.go index 1205cad..1ab45d0 100644 --- a/modeltrust/modeltrust.go +++ b/internal/modeltrust/modeltrust.go @@ -14,7 +14,7 @@ package modeltrust import ( - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" "github.com/ionalpha/flynn/sandbox" ) diff --git a/modeltrust/modeltrust_test.go b/internal/modeltrust/modeltrust_test.go similarity index 97% rename from modeltrust/modeltrust_test.go rename to internal/modeltrust/modeltrust_test.go index 8d06522..7136a74 100644 --- a/modeltrust/modeltrust_test.go +++ b/internal/modeltrust/modeltrust_test.go @@ -3,7 +3,7 @@ package modeltrust import ( "testing" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" "github.com/ionalpha/flynn/sandbox" ) diff --git a/modeltrust/property_test.go b/internal/modeltrust/property_test.go similarity index 97% rename from modeltrust/property_test.go rename to internal/modeltrust/property_test.go index 75c6256..d0a07a8 100644 --- a/modeltrust/property_test.go +++ b/internal/modeltrust/property_test.go @@ -5,7 +5,7 @@ import ( "pgregory.net/rapid" - "github.com/ionalpha/flynn/catalog" + "github.com/ionalpha/flynn/internal/catalog" "github.com/ionalpha/flynn/sandbox" ) diff --git a/ops/driver.go b/internal/ops/driver.go similarity index 99% rename from ops/driver.go rename to internal/ops/driver.go index 4ade0d6..5d0745d 100644 --- a/ops/driver.go +++ b/internal/ops/driver.go @@ -8,8 +8,8 @@ import ( "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) // Driver supervises deployed workloads by running their provider's hosting-contract diff --git a/ops/driver_test.go b/internal/ops/driver_test.go similarity index 98% rename from ops/driver_test.go rename to internal/ops/driver_test.go index 17da191..f9584ad 100644 --- a/ops/driver_test.go +++ b/internal/ops/driver_test.go @@ -7,9 +7,9 @@ import ( "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) // driverFixture builds a resource store holding one hosting extension and a loader diff --git a/ops/ops.go b/internal/ops/ops.go similarity index 98% rename from ops/ops.go rename to internal/ops/ops.go index abec44a..607195b 100644 --- a/ops/ops.go +++ b/internal/ops/ops.go @@ -21,9 +21,9 @@ import ( "github.com/ionalpha/flynn/extension" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/integrations" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/mission" - "github.com/ionalpha/flynn/service" ) // OpDeploy is the one operation every hosting provider must declare: it stands a diff --git a/ops/ops_test.go b/internal/ops/ops_test.go similarity index 96% rename from ops/ops_test.go rename to internal/ops/ops_test.go index 7bfb47f..11ef7de 100644 --- a/ops/ops_test.go +++ b/internal/ops/ops_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/ionalpha/flynn/extension" - "github.com/ionalpha/flynn/integrations" - "github.com/ionalpha/flynn/service" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/service" ) // returnFlow is a deploy flow with no network step: it returns a literal result, so diff --git a/ops/property_test.go b/internal/ops/property_test.go similarity index 95% rename from ops/property_test.go rename to internal/ops/property_test.go index a9ae24a..b883652 100644 --- a/ops/property_test.go +++ b/internal/ops/property_test.go @@ -8,8 +8,8 @@ import ( "pgregory.net/rapid" "github.com/ionalpha/flynn/extension" - "github.com/ionalpha/flynn/integrations" - "github.com/ionalpha/flynn/service" + "github.com/ionalpha/flynn/internal/integrations" + "github.com/ionalpha/flynn/internal/service" ) // TestPropDeployContract asserts the hosting contract across any set of declared diff --git a/playbook/catalog.go b/internal/playbook/catalog.go similarity index 100% rename from playbook/catalog.go rename to internal/playbook/catalog.go diff --git a/playbook/gate_test.go b/internal/playbook/gate_test.go similarity index 100% rename from playbook/gate_test.go rename to internal/playbook/gate_test.go diff --git a/playbook/playbook.go b/internal/playbook/playbook.go similarity index 98% rename from playbook/playbook.go rename to internal/playbook/playbook.go index a2aa658..0fe9999 100644 --- a/playbook/playbook.go +++ b/internal/playbook/playbook.go @@ -18,9 +18,9 @@ import ( "fmt" "sort" - "github.com/ionalpha/flynn/flow" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) const ( diff --git a/playbook/property_test.go b/internal/playbook/property_test.go similarity index 100% rename from playbook/property_test.go rename to internal/playbook/property_test.go diff --git a/playbook/runner.go b/internal/playbook/runner.go similarity index 98% rename from playbook/runner.go rename to internal/playbook/runner.go index 6670cee..68f821b 100644 --- a/playbook/runner.go +++ b/internal/playbook/runner.go @@ -5,11 +5,11 @@ import ( "time" "github.com/ionalpha/flynn/clock" - "github.com/ionalpha/flynn/dependency" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/flow" + "github.com/ionalpha/flynn/internal/dependency" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/sandbox" - "github.com/ionalpha/flynn/service" ) // Result is the outcome of a playbook run: the flow's return value, and the supervised diff --git a/playbook/runner_test.go b/internal/playbook/runner_test.go similarity index 99% rename from playbook/runner_test.go rename to internal/playbook/runner_test.go index a7d3d8b..d88105d 100644 --- a/playbook/runner_test.go +++ b/internal/playbook/runner_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" - "github.com/ionalpha/flynn/flow" + "github.com/ionalpha/flynn/internal/flow" + "github.com/ionalpha/flynn/internal/service" "github.com/ionalpha/flynn/resource" - "github.com/ionalpha/flynn/service" ) // stores builds a memory store registered for both the Playbook and Service kinds, with a diff --git a/playbook/sink.go b/internal/playbook/sink.go similarity index 98% rename from playbook/sink.go rename to internal/playbook/sink.go index 8f0d482..54d443d 100644 --- a/playbook/sink.go +++ b/internal/playbook/sink.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/ionalpha/flynn/fault" - "github.com/ionalpha/flynn/flow" + "github.com/ionalpha/flynn/internal/flow" "github.com/ionalpha/flynn/sandbox" "github.com/ionalpha/flynn/secret" ) diff --git a/playbook/sink_property_test.go b/internal/playbook/sink_property_test.go similarity index 100% rename from playbook/sink_property_test.go rename to internal/playbook/sink_property_test.go diff --git a/playbook/sink_test.go b/internal/playbook/sink_test.go similarity index 100% rename from playbook/sink_test.go rename to internal/playbook/sink_test.go diff --git a/playbook/specs/fly-app.json b/internal/playbook/specs/fly-app.json similarity index 100% rename from playbook/specs/fly-app.json rename to internal/playbook/specs/fly-app.json diff --git a/profilestore/profilestore.go b/internal/profilestore/profilestore.go similarity index 100% rename from profilestore/profilestore.go rename to internal/profilestore/profilestore.go diff --git a/profilestore/profilestore_test.go b/internal/profilestore/profilestore_test.go similarity index 100% rename from profilestore/profilestore_test.go rename to internal/profilestore/profilestore_test.go diff --git a/profilestore/property_test.go b/internal/profilestore/property_test.go similarity index 100% rename from profilestore/property_test.go rename to internal/profilestore/property_test.go diff --git a/profilestore/source.go b/internal/profilestore/source.go similarity index 100% rename from profilestore/source.go rename to internal/profilestore/source.go diff --git a/reliability/battery.go b/internal/reliability/battery.go similarity index 100% rename from reliability/battery.go rename to internal/reliability/battery.go diff --git a/reliability/context.go b/internal/reliability/context.go similarity index 100% rename from reliability/context.go rename to internal/reliability/context.go diff --git a/reliability/context_test.go b/internal/reliability/context_test.go similarity index 100% rename from reliability/context_test.go rename to internal/reliability/context_test.go diff --git a/reliability/property_test.go b/internal/reliability/property_test.go similarity index 100% rename from reliability/property_test.go rename to internal/reliability/property_test.go diff --git a/reliability/quantfloor.go b/internal/reliability/quantfloor.go similarity index 100% rename from reliability/quantfloor.go rename to internal/reliability/quantfloor.go diff --git a/reliability/quantfloor_test.go b/internal/reliability/quantfloor_test.go similarity index 100% rename from reliability/quantfloor_test.go rename to internal/reliability/quantfloor_test.go diff --git a/reliability/reliability.go b/internal/reliability/reliability.go similarity index 100% rename from reliability/reliability.go rename to internal/reliability/reliability.go diff --git a/reliability/reliability_test.go b/internal/reliability/reliability_test.go similarity index 100% rename from reliability/reliability_test.go rename to internal/reliability/reliability_test.go diff --git a/internal/rigor/rigor.go b/internal/rigor/rigor.go index a807b71..6faff32 100644 --- a/internal/rigor/rigor.go +++ b/internal/rigor/rigor.go @@ -46,21 +46,21 @@ type Policy struct { func DefaultPolicy() Policy { return Policy{ Grandfathered: map[string]bool{ - "clock": true, - "dispatch": true, - "ids": true, - "internal/sqlitex": true, - "observe": true, - "spinesink": true, + "clock": true, + "dispatch": true, + "ids": true, + "internal/sqlitex": true, + "internal/spinesink": true, + "observe": true, }, FuzzRequired: map[string]bool{ - "bus": true, - "fault": true, - "jobs": true, - "spine": true, - "resource": true, - "fetch": true, - "netguard": true, + "bus": true, + "fault": true, + "jobs": true, + "spine": true, + "resource": true, + "internal/fetch": true, + "netguard": true, }, } } diff --git a/service/property_test.go b/internal/service/property_test.go similarity index 100% rename from service/property_test.go rename to internal/service/property_test.go diff --git a/service/service.go b/internal/service/service.go similarity index 100% rename from service/service.go rename to internal/service/service.go diff --git a/service/service_test.go b/internal/service/service_test.go similarity index 100% rename from service/service_test.go rename to internal/service/service_test.go diff --git a/service/supervisor.go b/internal/service/supervisor.go similarity index 100% rename from service/supervisor.go rename to internal/service/supervisor.go diff --git a/service/supervisor_test.go b/internal/service/supervisor_test.go similarity index 100% rename from service/supervisor_test.go rename to internal/service/supervisor_test.go diff --git a/source/signalcli/signalcli.go b/internal/source/signalcli/signalcli.go similarity index 100% rename from source/signalcli/signalcli.go rename to internal/source/signalcli/signalcli.go diff --git a/source/signalcli/signalcli_test.go b/internal/source/signalcli/signalcli_test.go similarity index 100% rename from source/signalcli/signalcli_test.go rename to internal/source/signalcli/signalcli_test.go diff --git a/source/telegram/property_test.go b/internal/source/telegram/property_test.go similarity index 100% rename from source/telegram/property_test.go rename to internal/source/telegram/property_test.go diff --git a/source/telegram/telegram.go b/internal/source/telegram/telegram.go similarity index 100% rename from source/telegram/telegram.go rename to internal/source/telegram/telegram.go diff --git a/source/telegram/telegram_test.go b/internal/source/telegram/telegram_test.go similarity index 100% rename from source/telegram/telegram_test.go rename to internal/source/telegram/telegram_test.go diff --git a/spinesink/sink.go b/internal/spinesink/sink.go similarity index 100% rename from spinesink/sink.go rename to internal/spinesink/sink.go diff --git a/spinesink/sink_test.go b/internal/spinesink/sink_test.go similarity index 98% rename from spinesink/sink_test.go rename to internal/spinesink/sink_test.go index 44078ed..0aadbb2 100644 --- a/spinesink/sink_test.go +++ b/internal/spinesink/sink_test.go @@ -8,8 +8,8 @@ import ( "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/dispatch" + "github.com/ionalpha/flynn/internal/spinesink" "github.com/ionalpha/flynn/spine" - "github.com/ionalpha/flynn/spinesink" ) // TestSinkRecordsDispatchOntoSpine wires the dispatch waist to the spine and diff --git a/internal/sqlitex/sqlitex.go b/internal/sqlitex/sqlitex.go index 15c67e3..8c377c9 100644 --- a/internal/sqlitex/sqlitex.go +++ b/internal/sqlitex/sqlitex.go @@ -15,7 +15,7 @@ import ( _ "modernc.org/sqlite" // registers the pure-Go "sqlite" driver - "github.com/ionalpha/flynn/migrate" + "github.com/ionalpha/flynn/internal/migrate" ) // Open opens (creating if needed) a SQLite database at dsn, applies the standard diff --git a/internal/testkit/chaos.go b/internal/testkit/chaos.go index 0464786..8a0c26d 100644 --- a/internal/testkit/chaos.go +++ b/internal/testkit/chaos.go @@ -18,7 +18,7 @@ import ( "github.com/ionalpha/flynn/bus" "github.com/ionalpha/flynn/dispatch" "github.com/ionalpha/flynn/goal" - "github.com/ionalpha/flynn/integrations/request" + "github.com/ionalpha/flynn/internal/integrations/request" "github.com/ionalpha/flynn/llm" "github.com/ionalpha/flynn/resource" "github.com/ionalpha/flynn/secret" diff --git a/vault/keyring.go b/internal/vault/keyring.go similarity index 100% rename from vault/keyring.go rename to internal/vault/keyring.go diff --git a/vault/seal.go b/internal/vault/seal.go similarity index 100% rename from vault/seal.go rename to internal/vault/seal.go diff --git a/vault/vault.go b/internal/vault/vault.go similarity index 100% rename from vault/vault.go rename to internal/vault/vault.go diff --git a/vault/vault_test.go b/internal/vault/vault_test.go similarity index 100% rename from vault/vault_test.go rename to internal/vault/vault_test.go diff --git a/llm/openai/grammar.go b/llm/openai/grammar.go index f82d200..375c253 100644 --- a/llm/openai/grammar.go +++ b/llm/openai/grammar.go @@ -1,7 +1,7 @@ package openai import ( - "github.com/ionalpha/flynn/gbnf" + "github.com/ionalpha/flynn/internal/gbnf" "github.com/ionalpha/flynn/llm" ) diff --git a/llm/openai/grammar_test.go b/llm/openai/grammar_test.go index ee2a7ef..7c064a5 100644 --- a/llm/openai/grammar_test.go +++ b/llm/openai/grammar_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/ionalpha/flynn/gbnf" + "github.com/ionalpha/flynn/internal/gbnf" "github.com/ionalpha/flynn/llm" ) diff --git a/orchestration/named_test.go b/orchestration/named_test.go index 2e560f0..4dfa067 100644 --- a/orchestration/named_test.go +++ b/orchestration/named_test.go @@ -6,10 +6,10 @@ import ( "sort" "testing" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/budget" "github.com/ionalpha/flynn/fault" "github.com/ionalpha/flynn/goal" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/mission" "github.com/ionalpha/flynn/orchestration" "github.com/ionalpha/flynn/resource" diff --git a/orchestration/spawner.go b/orchestration/spawner.go index 0459be1..3a91065 100644 --- a/orchestration/spawner.go +++ b/orchestration/spawner.go @@ -16,11 +16,11 @@ import ( "fmt" "sync" - "github.com/ionalpha/flynn/archetype" "github.com/ionalpha/flynn/budget" "github.com/ionalpha/flynn/capability" "github.com/ionalpha/flynn/fault" "github.com/ionalpha/flynn/goal" + "github.com/ionalpha/flynn/internal/archetype" "github.com/ionalpha/flynn/mission" "github.com/ionalpha/flynn/resource" ) diff --git a/sandbox/egress.go b/sandbox/egress.go index df57953..421a658 100644 --- a/sandbox/egress.go +++ b/sandbox/egress.go @@ -9,8 +9,8 @@ import ( "strings" "sync" - "github.com/ionalpha/flynn/bindguard" "github.com/ionalpha/flynn/fault" + "github.com/ionalpha/flynn/internal/bindguard" "github.com/ionalpha/flynn/netguard" ) diff --git a/spine/fuzz_test.go b/spine/fuzz_test.go index d2b7480..e6c4a60 100644 --- a/spine/fuzz_test.go +++ b/spine/fuzz_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/ionalpha/flynn/dispatch" + "github.com/ionalpha/flynn/internal/spinesink" "github.com/ionalpha/flynn/spine" - "github.com/ionalpha/flynn/spinesink" "github.com/ionalpha/flynn/state" ) diff --git a/spine/property_test.go b/spine/property_test.go index d804376..71ee1ef 100644 --- a/spine/property_test.go +++ b/spine/property_test.go @@ -10,9 +10,9 @@ import ( "github.com/ionalpha/flynn/clock" "github.com/ionalpha/flynn/dispatch" "github.com/ionalpha/flynn/fault" + "github.com/ionalpha/flynn/internal/spinesink" "github.com/ionalpha/flynn/internal/testkit" "github.com/ionalpha/flynn/spine" - "github.com/ionalpha/flynn/spinesink" "github.com/ionalpha/flynn/state" )