Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .surface
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ CMD basecamp connect doctor
CMD basecamp connect import
CMD basecamp connect redispatch
CMD basecamp connect release
CMD basecamp connect service
CMD basecamp connect service install
CMD basecamp connect service uninstall
CMD basecamp connect setup
CMD basecamp connect shadow
CMD basecamp connect shadow promote
Expand Down Expand Up @@ -5486,6 +5489,72 @@ FLAG basecamp connect release --stats type=bool
FLAG basecamp connect release --styled type=bool
FLAG basecamp connect release --todolist type=string
FLAG basecamp connect release --verbose type=count
FLAG basecamp connect service --account type=string
FLAG basecamp connect service --agent type=bool
FLAG basecamp connect service --cache-dir type=string
FLAG basecamp connect service --count type=bool
FLAG basecamp connect service --help type=bool
FLAG basecamp connect service --hints type=bool
FLAG basecamp connect service --ids-only type=bool
FLAG basecamp connect service --in type=string
FLAG basecamp connect service --jq type=string
FLAG basecamp connect service --json type=bool
FLAG basecamp connect service --markdown type=bool
FLAG basecamp connect service --md type=bool
FLAG basecamp connect service --no-hints type=bool
FLAG basecamp connect service --no-stats type=bool
FLAG basecamp connect service --profile type=string
FLAG basecamp connect service --project type=string
FLAG basecamp connect service --quiet type=bool
FLAG basecamp connect service --stats type=bool
FLAG basecamp connect service --styled type=bool
FLAG basecamp connect service --todolist type=string
FLAG basecamp connect service --verbose type=count
FLAG basecamp connect service install --account type=string
FLAG basecamp connect service install --agent type=bool
FLAG basecamp connect service install --cache-dir type=string
FLAG basecamp connect service install --count type=bool
FLAG basecamp connect service install --help type=bool
FLAG basecamp connect service install --hints type=bool
FLAG basecamp connect service install --hold type=bool
FLAG basecamp connect service install --ids-only type=bool
FLAG basecamp connect service install --in type=string
FLAG basecamp connect service install --jq type=string
FLAG basecamp connect service install --json type=bool
FLAG basecamp connect service install --markdown type=bool
FLAG basecamp connect service install --md type=bool
FLAG basecamp connect service install --no-enable type=bool
FLAG basecamp connect service install --no-hints type=bool
FLAG basecamp connect service install --no-stats type=bool
FLAG basecamp connect service install --profile type=string
FLAG basecamp connect service install --project type=string
FLAG basecamp connect service install --quiet type=bool
FLAG basecamp connect service install --shadow type=bool
FLAG basecamp connect service install --stats type=bool
FLAG basecamp connect service install --styled type=bool
FLAG basecamp connect service install --todolist type=string
FLAG basecamp connect service install --verbose type=count
FLAG basecamp connect service uninstall --account type=string
FLAG basecamp connect service uninstall --agent type=bool
FLAG basecamp connect service uninstall --cache-dir type=string
FLAG basecamp connect service uninstall --count type=bool
FLAG basecamp connect service uninstall --help type=bool
FLAG basecamp connect service uninstall --hints type=bool
FLAG basecamp connect service uninstall --ids-only type=bool
FLAG basecamp connect service uninstall --in type=string
FLAG basecamp connect service uninstall --jq type=string
FLAG basecamp connect service uninstall --json type=bool
FLAG basecamp connect service uninstall --markdown type=bool
FLAG basecamp connect service uninstall --md type=bool
FLAG basecamp connect service uninstall --no-hints type=bool
FLAG basecamp connect service uninstall --no-stats type=bool
FLAG basecamp connect service uninstall --profile type=string
FLAG basecamp connect service uninstall --project type=string
FLAG basecamp connect service uninstall --quiet type=bool
FLAG basecamp connect service uninstall --stats type=bool
FLAG basecamp connect service uninstall --styled type=bool
FLAG basecamp connect service uninstall --todolist type=string
FLAG basecamp connect service uninstall --verbose type=count
FLAG basecamp connect setup --account type=string
FLAG basecamp connect setup --agent type=bool
FLAG basecamp connect setup --allow type=stringArray
Expand Down Expand Up @@ -18790,6 +18859,9 @@ SUB basecamp connect doctor
SUB basecamp connect import
SUB basecamp connect redispatch
SUB basecamp connect release
SUB basecamp connect service
SUB basecamp connect service install
SUB basecamp connect service uninstall
SUB basecamp connect setup
SUB basecamp connect shadow
SUB basecamp connect shadow promote
Expand Down
8 changes: 8 additions & 0 deletions e2e/smoke/smoke_lifecycle.bats
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ load smoke_helper
mark_out_of_scope "Applies a reconciliation file to a local connector ledger — covered by Go tests in internal/commands and internal/connector"
}

@test "connect service install is out of scope" {
mark_out_of_scope "Writes a systemd user unit and asks systemctl to start it, which the smoke runner has no session for — covered by Go tests in internal/commands"
}

@test "connect service uninstall is out of scope" {
mark_out_of_scope "Stops a systemd user unit and removes it, which the smoke runner has no session for — covered by Go tests in internal/commands"
}

@test "auth refresh is out of scope" {
mark_out_of_scope "Requires OAuth credentials"
}
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func CommandCategories() []CommandCategory {
{Name: "bonfire", Category: "additional", Description: "Multi-chat orchestration", Actions: []string{"split", "layout"}, Experimental: true, DevOnly: true},
{Name: "api", Category: "additional", Description: "Raw API access"},
{Name: "mcp", Category: "additional", Description: "Serve Basecamp to MCP clients over stdio"},
{Name: "connect", Category: "additional", Description: "Run a local agent connector for a Basecamp agent, and see and decide what it runs", Actions: []string{"setup", "show", "status", "doctor", "redispatch", "discard", "release", "shadow", "import"}},
{Name: "connect", Category: "additional", Description: "Run a local agent connector for a Basecamp agent, and see and decide what it runs", Actions: []string{"setup", "show", "status", "doctor", "redispatch", "discard", "release", "shadow", "import", "service"}},
{Name: "help", Category: "additional", Description: "Show help"},
{Name: "version", Category: "additional", Description: "Show version"},
},
Expand Down
6 changes: 4 additions & 2 deletions internal/commands/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ wait for review, until basecamp connect release. Linux only.
basecamp connect discard <id> close a record without running it
basecamp connect release clear the hold
basecamp connect shadow promote make the shadow ledger the connector's, held
basecamp connect import <file> apply a cutover reconciliation file`,
basecamp connect import <file> apply a cutover reconciliation file
basecamp connect service install have the OS keep it running`,
Example: ` basecamp connect setup -P agent --operator-profile me --serve 12345
basecamp connect -P agent
basecamp connect -P agent --project 12345 --shadow`,
Expand All @@ -75,7 +76,8 @@ wait for review, until basecamp connect release. Linux only.
}
addConnectRunFlags(cmd, &run)
cmd.AddCommand(newConnectSetupCmd(), newConnectWorkerMCPCmd(), newConnectShowCmd(), newConnectStatusCmd(), newConnectDoctorCmd(),
newConnectRedispatchCmd(), newConnectDiscardCmd(), newConnectReleaseCmd(), newConnectShadowCmd(), newConnectImportCmd())
newConnectRedispatchCmd(), newConnectDiscardCmd(), newConnectReleaseCmd(), newConnectShadowCmd(), newConnectImportCmd(),
newConnectServiceCmd())
Comment thread
jorgemanrubia marked this conversation as resolved.
return cmd
}

Expand Down
11 changes: 8 additions & 3 deletions internal/commands/connect_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,15 @@ func connectSupportedOS(goos string) bool {
// then the other is not told two different stories about their machine.
const connectLinuxOnlyReason = "the task token reaches a worker's MCP server over an inherited descriptor, and Linux is the only platform that seals the descriptors a process inherits"

// connectUnsupportedOSError is the run command's refusal on a platform the
// connector does not run on.
// connectUnsupportedOSError is the refusal on a platform the connector does
// not run on, given by the run command and by `service install`, which would
// otherwise write a unit that supervises a process that cannot start.
//
// It opens on the connector rather than on "basecamp connect ..." because a
// refusal is prose, not a command to run, and a hint that begins like a
// command is read as one — by a person, and by TestHintCommandsResolve.
func connectUnsupportedOSError(goos string) error {
return output.ErrUsage(fmt.Sprintf("basecamp connect runs on Linux only, not %s: %s", goos, connectLinuxOnlyReason))
return output.ErrUsage(fmt.Sprintf("The connector runs on Linux only, not %s: %s", goos, connectLinuxOnlyReason))
}

// connectServed is connect.json's served projects as they are now, not as
Expand Down
Loading
Loading