Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9a1e140
Define the Darkroom app discovery contract
arzafran Dec 4, 2026
eeb6997
Discover verified Darkroom apps on demand
arzafran Dec 4, 2026
487d597
Scope agent MCP discovery to the Programa surface
arzafran Dec 4, 2026
bbc8432
Cover discovery status and scoped agent MCP launches
arzafran Dec 4, 2026
6819ca3
Document automatic app discovery in Programa terminals
arzafran Dec 4, 2026
1332b24
Prepare Programa iPhone Shipit release configuration
arzafran Dec 4, 2026
edc0841
Share typed app discovery between Programa and its CLI
arzafran Dec 4, 2026
5612d85
Show Darkroom app readiness and access in Programa Settings
arzafran Dec 4, 2026
9f800f1
Open canonical conversation links in verified Mesinyer
arzafran Dec 4, 2026
fcd987c
Resolve Windows companion identities without granting access
arzafran Dec 4, 2026
c9ab9d7
Expose Windows companion discovery from the Programa CLI
arzafran Dec 4, 2026
6fd8ca7
Show verified companion status in Windows Integrations
arzafran Dec 4, 2026
1ba357d
Package controlled Programa App Sandbox fixtures
arzafran Dec 4, 2026
c951ef4
Record Programa App Store sandbox feasibility
arzafran Dec 4, 2026
320319b
Compare signed Programa release payloads before cutover
arzafran Dec 4, 2026
dbdf6aa
Keep Programa Store instances, helpers and upgrades separate
arzafran Dec 4, 2026
3763e90
Build Programa terminal and CLI payloads for Microsoft Store
arzafran Dec 4, 2026
e275edf
Share the Windows companion resolver and include Programa’s identity
arzafran Dec 4, 2026
9c57f54
Merge macOS app discovery and Integrations
arzafran Dec 4, 2026
2d5484f
Merge Windows app discovery
arzafran Dec 4, 2026
6cdadb0
Merge Windows Store packaging
arzafran Dec 4, 2026
00725b7
Merge Shipit iPhone manifest
arzafran Dec 4, 2026
bbd63a4
Merge desktop release parity verification
arzafran Dec 4, 2026
1af7447
Merge Programa Mac App Store feasibility evidence
arzafran Dec 4, 2026
d81a7a8
Merge current Programa main into rollout integration
arzafran Dec 4, 2026
1603ebf
Seal and verify Programa Mac payload handoffs
arzafran Dec 4, 2026
61a73cb
Add opt-in Shipit shadow build to Programa releases
arzafran Dec 4, 2026
787aabe
Poll Shipit through Actions REST and verify workflow identity
arzafran Dec 4, 2026
85474b2
Report shadow failures separately from legacy release
arzafran Dec 4, 2026
4854226
Allow Windows discovery to read verified peer policy
arzafran Dec 4, 2026
e8a08c5
Read Browsee outside-access policy from its verified pipe
arzafran Dec 4, 2026
2b61951
Merge branch 'franco/inc-2191-browsee-status' into franco/programa-ro…
arzafran Dec 4, 2026
8503747
Point Browsee access recovery to the selectable settings pane
arzafran Dec 4, 2026
19ff3bc
Test password rotation revokes passive event subscribers
arzafran Dec 4, 2026
946dced
Retain the ready Windows publish folder for optional release evidence
arzafran Dec 4, 2026
9a065c3
Compare Shipit packaging with Programa’s canonical Windows executable
arzafran Dec 4, 2026
6d9aa40
Measure Programa’s native App Sandbox process and socket limits
arzafran Dec 4, 2026
55709ac
Merge commit '19ff3bc6' into franco/programa-rollout-integration
arzafran Dec 4, 2026
c4b1475
Merge commit '9a065c35' into franco/programa-rollout-integration
arzafran Dec 4, 2026
c4d67c4
Keep the Windows Shipit checkout key in the main-only preview environ…
arzafran Dec 4, 2026
056c018
Declare the Programa iPhone app’s local preference API use
arzafran Dec 4, 2026
7b91fae
Add opt-in read-only agent status publisher for Mesinyer
arzafran Dec 4, 2026
bcc7e2a
Cover scoped agent status projection and revocation
arzafran Dec 4, 2026
4075cd2
Match both signed Mesinyer identifiers for agent status
arzafran Dec 4, 2026
f804d26
Discover signed NoteTaker installations without granting access
arzafran Dec 4, 2026
75183f4
Recognize the NoteTaker Windows installation without granting trust
arzafran Dec 4, 2026
903087b
Include NoteTaker in Programa Settings search
arzafran Dec 4, 2026
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
187 changes: 186 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,87 @@ jobs:
echo "Effective build: ${EFFECTIVE_BUILD}"
echo "Release tag: ${RELEASE_TAG}"

# Shadow build only: verify the signed handoff without adding it to assembly or rolling.
shadow-shipit-mac:
needs: release-identity
if: >-
vars.PROGRAMA_MAC_SHIPIT_SHADOW == 'true' &&
github.repository == 'darkroomengineering/programa' &&
github.event_name == 'workflow_run' &&
github.ref == 'refs/heads/main' &&
github.ref_protected &&
needs.release-identity.outputs.superseded != 'true'
runs-on: ubuntu-latest
environment: shipit-preview
timeout-minutes: 100
continue-on-error: true
permissions:
actions: read
contents: read
env:
TARGET_SHA: ${{ needs.release-identity.outputs.target_sha }}
EFFECTIVE_BUILD: ${{ needs.release-identity.outputs.effective_build }}
EFFECTIVE_VERSION: ${{ needs.release-identity.outputs.effective_version }}
CI_RUN_ID: ${{ github.event.workflow_run.id }}
CI_ATTEMPT: ${{ github.event.workflow_run.run_attempt }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.release-identity.outputs.target_sha }}
persist-credentials: false

- name: Record the exact protected release request
run: |
set -euo pipefail
[[ "$(git rev-parse HEAD)" == "$TARGET_SHA" ]]
[[ "$(git ls-remote --exit-code origin refs/heads/main | cut -f1)" == "$TARGET_SHA" ]]
SOURCE_RUN_ID="$GITHUB_RUN_ID" SOURCE_ATTEMPT="$GITHUB_RUN_ATTEMPT" \
node scripts/programa_mac_payload_bridge.js request > "$RUNNER_TEMP/request.json"

- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: programa-macos-request-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/request.json
if-no-files-found: error
retention-days: 7

- name: Dispatch the private build and verify the returned artifact
env:
GH_TOKEN: ${{ secrets.SHIPIT_ACTIONS_TOKEN }}
run: |
set -euo pipefail
: "${GH_TOKEN:?Configure SHIPIT_ACTIONS_TOKEN in the protected shipit-preview environment}"
stage="$(mktemp -d "$RUNNER_TEMP/programa-shadow.XXXXXXXX")"
trap 'rm -rf "$stage"' EXIT
shipit=darkroomengineering/shipit
workflow=programa-mac-signed-preview.yml
jq -cn --arg id "$GITHUB_RUN_ID" --arg attempt "$GITHUB_RUN_ATTEMPT" \
'{ref:"main",inputs:{source_run_id:$id,source_run_attempt:$attempt}}' > "$stage/dispatch.json"
gh api "repos/$shipit/actions/workflows/$workflow/dispatches" --method POST \
-H "X-GitHub-Api-Version: 2026-03-10" --input "$stage/dispatch.json" > "$stage/dispatch-result.json"
run_id="$(jq -er '.workflow_run_id | tostring | select(test("^[1-9][0-9]*$"))' "$stage/dispatch-result.json")"
workflow_id="$(gh api "repos/$shipit/actions/workflows/$workflow" --jq '.id')"
node scripts/programa_mac_payload_bridge.js wait "$run_id" "$workflow_id" > "$stage/run.json"
artifact_name=programa-signed-macos-preview
artifact_id() {
gh api "repos/$shipit/actions/runs/$run_id/artifacts?name=$artifact_name" |
jq -er --arg name "$artifact_name" --arg id "$run_id" \
'.artifacts | map(select(.name == $name and .expired == false and (.workflow_run.id | tostring) == $id)) | select(length == 1) | .[0].id'
}
previous="$(artifact_id)"
[[ "$previous" =~ ^[1-9][0-9]*$ ]]
gh run download "$run_id" --repo "$shipit" --name "$artifact_name" --dir "$stage/received"
[[ "$(artifact_id)" == "$previous" ]]
node scripts/programa_mac_payload_bridge.js verify "$RUNNER_TEMP/request.json" "$run_id" "$workflow_id" "$stage/run.json" \
"$stage/received/payload" "$stage/received/handoff.json"
[[ "$(git ls-remote --exit-code origin refs/heads/main | cut -f1)" == "$TARGET_SHA" ]]

- name: Report shadow handoff failure
if: failure()
run: |
echo "### Shipit shadow handoff failed" >> "$GITHUB_STEP_SUMMARY"
echo "The legacy release jobs run independently. Inspect this job before enabling a producer switch." >> "$GITHUB_STEP_SUMMARY"

build-sign-notarize:
needs: [release-identity]
if: >-
Expand Down Expand Up @@ -526,6 +607,7 @@ jobs:
EFFECTIVE_BUILD: ${{ needs.release-identity.outputs.effective_build }}
EFFECTIVE_MARKETING_VERSION: ${{ needs.release-identity.outputs.effective_version }}
TARGET_SHA: ${{ needs.release-identity.outputs.target_sha }}
WINDOWS_SHIPIT_PREVIEW: ${{ github.repository == 'darkroomengineering/programa' && github.event_name == 'workflow_run' && vars.PROGRAMA_WINDOWS_SHIPIT_REV != '' }}
steps:
- name: Checkout release revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
Expand Down Expand Up @@ -595,11 +677,15 @@ jobs:
$ErrorActionPreference = "Stop"
$output = Join-Path $env:RUNNER_TEMP "programa-windows-payload"
New-Item -ItemType Directory -Path $output | Out-Null
$preview = @{}
if ($env:WINDOWS_SHIPIT_PREVIEW -eq 'true') {
$preview.PreviewPublishDirectory = Join-Path $env:RUNNER_TEMP "programa-windows-ready-$env:GITHUB_RUN_ID-$env:GITHUB_RUN_ATTEMPT"
}
& ./scripts/build-windows.ps1 `
-Version $env:EFFECTIVE_MARKETING_VERSION `
-Build $env:EFFECTIVE_BUILD `
-Commit $env:TARGET_SHA `
-OutputDirectory $output
-OutputDirectory $output @preview

$stableName = "programa-windows.exe"
$immutableName = "programa-windows-$($env:EFFECTIVE_BUILD).exe"
Expand Down Expand Up @@ -648,6 +734,105 @@ jobs:
if-no-files-found: error
retention-days: 7

- name: Keep the ready Windows build for the Shipit comparison
if: env.WINDOWS_SHIPIT_PREVIEW == 'true'
continue-on-error: true
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: programa-windows-ready-${{ github.run_id }}
overwrite: true
path: ${{ runner.temp }}/programa-windows-ready-${{ github.run_id }}-${{ github.run_attempt }}/
if-no-files-found: error
retention-days: 7

shadow-shipit-windows:
needs: [release-identity, build-windows]
if: >-
github.repository == 'darkroomengineering/programa' &&
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_repository.full_name == github.repository &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.conclusion == 'success' &&
needs.release-identity.outputs.target_sha == github.event.workflow_run.head_sha &&
vars.PROGRAMA_WINDOWS_SHIPIT_REV != ''
permissions:
contents: read
# Programa is public. The current Darky Body Windows runner group excludes public repositories.
runs-on: windows-latest
environment: shipit-preview
timeout-minutes: 25
env:
EFFECTIVE_BUILD: ${{ needs.release-identity.outputs.effective_build }}
EFFECTIVE_MARKETING_VERSION: ${{ needs.release-identity.outputs.effective_version }}
TARGET_SHA: ${{ needs.release-identity.outputs.target_sha }}
SHIPIT_REV: ${{ vars.PROGRAMA_WINDOWS_SHIPIT_REV }}
steps:
- name: Validate the Shipit pin
shell: pwsh
run: |
if ($env:SHIPIT_REV -cnotmatch '^[0-9a-f]{40}$') { throw 'Expected an immutable Shipit commit SHA.' }

- name: Check out the verified Programa release revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ needs.release-identity.outputs.target_sha }}
persist-credentials: false

- name: Check out the pinned Shipit staging code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: darkroomengineering/shipit
ref: ${{ vars.PROGRAMA_WINDOWS_SHIPIT_REV }}
ssh-key: ${{ secrets.SHIPIT_SSH_KEY }}
path: .shipit-windows-preview
persist-credentials: false

- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6
with:
dotnet-version: '10.0.x'

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.4

- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: programa-windows-${{ github.run_id }}
path: ${{ runner.temp }}/programa-windows-legacy

- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
with:
name: programa-windows-ready-${{ github.run_id }}
path: ${{ runner.temp }}/programa-windows-ready

- name: Stage and verify the installer from the canonical executable
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
if ((git rev-parse HEAD) -cne $env:TARGET_SHA) { throw 'Programa source checkout differs from the release revision.' }
if ((git -C .shipit-windows-preview rev-parse HEAD) -cne $env:SHIPIT_REV) {
throw 'Shipit source checkout differs from the release pin.'
}
$legacy = Join-Path $env:RUNNER_TEMP programa-windows-legacy
$stable = Get-FileHash -Algorithm SHA256 -LiteralPath (Join-Path $legacy 'programa-windows.exe')
$immutable = Get-FileHash -Algorithm SHA256 -LiteralPath (Join-Path $legacy "programa-windows-$env:EFFECTIVE_BUILD.exe")
if ($stable.Hash -cne $immutable.Hash) { throw 'The canonical release executables differ.' }
bun .shipit-windows-preview/src/cli.ts stage-windows-package `
--input (Join-Path $env:RUNNER_TEMP 'programa-windows-ready') `
--output (Join-Path $env:RUNNER_TEMP 'programa-windows-shipit-preview') `
--version $env:EFFECTIVE_MARKETING_VERSION --build $env:EFFECTIVE_BUILD `
--commit $env:TARGET_SHA --sha256 ($stable.Hash.ToLowerInvariant())
if ($LASTEXITCODE -ne 0) { throw 'Shipit could not verify the ready Windows payload.' }

- name: Keep the verified Windows Shipit preview
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: programa-windows-shipit-preview-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/programa-windows-shipit-preview/
if-no-files-found: error
retention-days: 7

# Second half of the supersession check: a newer main commit landing while the builds ran
# means this run must not stage or promote. It ends successfully with a notice; the newer
# commit's own run ships. (The reconciler re-checks main before every public mutation.)
Expand Down
7 changes: 4 additions & 3 deletions CLI/CLI+AgentWrappers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ extension ProgramaCLI {
)
}

/// Resolves the `codex` CLI executable from PATH. Unlike Claude, Programa does not
/// ship a codex wrapper, so no skip predicate is needed.
func resolveCodexExecutable(searchPath: String?) -> String? {
resolveExecutableInSearchPath("codex", searchPath: searchPath)
let bundledWrapper = resolvedExecutableURL()?.deletingLastPathComponent().appendingPathComponent("codex").path
return resolveExecutableInSearchPath("codex", searchPath: searchPath) { path in
URL(fileURLWithPath: path).resolvingSymlinksInPath().path == bundledWrapper
}
}

private func claudeTeamsHasExplicitTeammateMode(commandArgs: [String]) -> Bool {
Expand Down
127 changes: 127 additions & 0 deletions CLI/CLI+AppLinkAgents.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import Foundation

extension ProgramaCLI {
func printAppLinkAgentConfig(for client: String) throws {
let environment = ProcessInfo.processInfo.environment
guard let surface = environment["PROGRAMA_SURFACE_ID"].flatMap(UUID.init(uuidString:)),
let executable = resolvedExecutableURL()?.path else { return }
let session = "programa-\(surface.uuidString)"
let peers = DarkroomPeer.allCases.filter { peer in
guard peer.supportsAgentMCP else { return false }
if peer == .browsee { return browseeInstallation() != nil }
guard let install = peer.installation() else { return false }
return install.entryPoint != nil && install.advertisesStatus
}
let encoder = JSONEncoder()
encoder.outputFormatting = [.sortedKeys, .withoutEscapingSlashes]
switch client {
case "claude":
guard let existing = claudeAppLinkRegistrations(environment: environment) else { return }
var servers: [String: [String: StringOrArguments]] = [:]
if FileManager.default.isExecutableFile(atPath: (executable as NSString).deletingLastPathComponent + "/programa-mcp") {
servers["programa"] = ["command": .string((executable as NSString).deletingLastPathComponent + "/programa-mcp")]
}
for peer in peers where existing[peer.rawValue]?.allSatisfy({ isOwnedBrowseeRegistration($0, peer: peer, executable: executable) }) != false {
servers[peer.rawValue] = [
"command": .string(executable),
"args": .args(["apps", "mcp", peer.rawValue, "--session", session])
]
}
guard !servers.isEmpty else { return }
print(String(decoding: try encoder.encode(["mcpServers": servers]), as: UTF8.self))
case "codex":
guard !peers.isEmpty,
let codex = resolveCodexExecutable(searchPath: environment["PATH"]),
let data = DarkroomPeer.readCommand(URL(fileURLWithPath: codex), arguments: ["mcp", "list", "--json"], byteLimit: 524_288),
let existing = try? JSONSerialization.jsonObject(with: data) as? [[String: Any]] else { return }
for peer in peers {
let args = String(decoding: try encoder.encode(["apps", "mcp", peer.rawValue, "--session", session]), as: UTF8.self)
if let entry = existing.first(where: { $0["name"] as? String == peer.rawValue }) {
guard entry["enabled"] as? Bool != false,
let transport = entry["transport"] as? [String: Any],
isOwnedBrowseeRegistration(transport, peer: peer, executable: executable) else { continue }
print("mcp_servers.\(peer.rawValue).args=\(args)")
continue
}
let command = String(decoding: try encoder.encode(executable), as: UTF8.self)
print("mcp_servers.\(peer.rawValue)={ command = \(command), args = \(args) }")
}
default:
throw CLIError(message: "Unknown MCP agent client: \(client)")
}
}

private enum StringOrArguments: Encodable {
case string(String)
case args([String])

func encode(to encoder: Encoder) throws {
var container = encoder.singleValueContainer()
switch self {
case .string(let value): try container.encode(value)
case .args(let value): try container.encode(value)
}
}
}

/// The installer previously used a shared Codex session. Only replace that
/// exact registration (or its Claude counterpart) for this invocation.
private func isOwnedBrowseeRegistration(_ entry: [String: Any], peer: DarkroomPeer, executable: String) -> Bool {
guard peer == .browsee, let command = entry["command"] as? String,
URL(fileURLWithPath: command).resolvingSymlinksInPath().path == executable,
let args = entry["args"] as? [String],
(entry["env"] as? [String: String] ?? [:]).isEmpty,
(entry["env_vars"] as? [String] ?? []).isEmpty,
entry["cwd"] is NSNull || entry["cwd"] == nil,
entry["type"] == nil || entry["type"] as? String == "stdio" else { return false }
return args == ["browsee", "mcp"] || args == ["browsee", "mcp", "--session", "programa"]
}

private func claudeAppLinkRegistrations(environment: [String: String]) -> [String: [[String: Any]]]? {
let fm = FileManager.default
let home = environment["CLAUDE_CONFIG_DIR"].flatMap { $0.isEmpty ? nil : Self.integrationExpandTilde($0) }
?? Self.integrationExpandTilde("~")
var registrations: [String: [[String: Any]]] = [:]
func collect(_ root: [String: Any]) {
for (name, entry) in root["mcpServers"] as? [String: Any] ?? [:] {
registrations[name, default: []].append(entry as? [String: Any] ?? [:])
}
for key in ["disabledMcpServers", "disabledMcpjsonServers"] {
for name in root[key] as? [String] ?? [] {
registrations[name, default: []].append([:])
}
}
}
func readConfig(_ path: String) -> [String: Any]? {
guard fm.fileExists(atPath: path) else { return [:] }
guard let attributes = try? fm.attributesOfItem(atPath: path),
let size = attributes[.size] as? Int, size < 16 * 1024 * 1024,
let data = fm.contents(atPath: path) else { return nil }
return (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
}
guard let user = readConfig((home as NSString).appendingPathComponent(".claude.json")) else { return nil }
collect(user)
let settingsHome = environment["CLAUDE_CONFIG_DIR"].flatMap { $0.isEmpty ? nil : Self.integrationExpandTilde($0) }
?? Self.integrationExpandTilde("~/.claude")
guard let settings = readConfig((settingsHome as NSString).appendingPathComponent("settings.json")),
let managed = readConfig("/Library/Application Support/ClaudeCode/managed-mcp.json") else { return nil }
collect(settings)
collect(managed)
let cwd = URL(fileURLWithPath: fm.currentDirectoryPath).resolvingSymlinksInPath()
let projects = user["projects"] as? [String: [String: Any]] ?? [:]
for (path, configuration) in projects where cwd.path == path || cwd.path.hasPrefix(path + "/") {
collect(configuration)
}
var folder = cwd
while true {
for name in [".mcp.json", ".claude/settings.json", ".claude/settings.local.json"] {
guard let config = readConfig(folder.appendingPathComponent(name).path) else { return nil }
collect(config)
}
let parent = folder.deletingLastPathComponent()
if parent.path == folder.path || folder.path == "/" { break }
folder = parent
}
return registrations
}
}
Loading
Loading