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
1 change: 1 addition & 0 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ concurrency:

jobs:
audit:
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-effort-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ concurrency:

jobs:
label:
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: ubuntu-24.04
timeout-minutes: 10

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-linux-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
# Not `package`: the Windows lane's job already claims that name, and two
# checks reading `package` on the same pull request cannot be told apart.
package-linux:
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
# x64 only. The arm64 packages are built from the same scripts, the same
# configuration and the same descriptor, so this lane would re-prove all of
# what it can reach and none of what differs — a 16K-page host and its own
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-windows-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ concurrency:

jobs:
package:
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: windows-2025
timeout-minutes: 45
defaults:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-acp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ concurrency:
jobs:
windows_acp:
name: windows_acp
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: windows-2025
timeout-minutes: 45
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ permissions:
jobs:
windows_baseline:
name: windows_baseline (non-blocking)
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: windows-latest
timeout-minutes: 45
continue-on-error: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-recovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ permissions:
jobs:
windows_recovery:
name: windows_recovery
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: windows-latest
timeout-minutes: 45
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-sandbox-w0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ concurrency:
jobs:
protocol:
name: windows_sandbox_w0_protocol
if: github.event_name != 'schedule' || github.repository == 'apache/maka'
runs-on: windows-2025
timeout-minutes: 45
steps:
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/electron-builder.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ const baseDesktopBuilderConfig = {
to: 'status',
},
{
from: 'resources/workers/filesystem-worker.js',
to: 'workers/filesystem-worker.js',
from: 'resources/workers/filesystem-worker.mjs',
to: 'workers/filesystem-worker.mjs',
},
{
from: '../../native/runtime-host-peer/target/release/maka_runtime_host_peer.node',
Expand Down
5 changes: 3 additions & 2 deletions apps/desktop/scripts/copy-runtime-filesystem-worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import { copyFile, mkdir, stat } from 'node:fs/promises';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { FILESYSTEM_WORKER_BUNDLE_NAME } from '../../../packages/runtime/dist/filesystem-worker/resource-resolver.js';

const desktopRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
const source = resolve(desktopRoot, '..', '..', 'packages', 'runtime', 'dist', 'workers', 'filesystem-worker.js');
const target = resolve(desktopRoot, 'resources', 'workers', 'filesystem-worker.js');
const source = resolve(desktopRoot, '..', '..', 'packages', 'runtime', 'dist', 'workers', FILESYSTEM_WORKER_BUNDLE_NAME);
const target = resolve(desktopRoot, 'resources', 'workers', FILESYSTEM_WORKER_BUNDLE_NAME);
const metadata = await stat(source).catch(() => undefined);
if (!metadata?.isFile()) throw new Error(`Runtime filesystem worker bundle is missing: ${source}`);
await mkdir(dirname(target), { recursive: true });
Expand Down
3 changes: 2 additions & 1 deletion packages/runtime/scripts/build-filesystem-worker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import { mkdir } from 'node:fs/promises';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { build } from 'esbuild';
import { FILESYSTEM_WORKER_BUNDLE_NAME } from '../dist/filesystem-worker/resource-resolver.js';

const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
const outfile = resolve(packageRoot, 'dist', 'workers', 'filesystem-worker.js');
const outfile = resolve(packageRoot, 'dist', 'workers', FILESYSTEM_WORKER_BUNDLE_NAME);
const agentsCoreUtils = fileURLToPath(import.meta.resolve('@openai/agents-core/utils'));

await mkdir(dirname(outfile), { recursive: true });
Expand Down
16 changes: 8 additions & 8 deletions packages/runtime/src/__tests__/filesystem-worker-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ function fakeClient(
ok: true,
spec: {
program: '/usr/bin/node',
args: ['/runtime/filesystem-worker.js', '--grep-executable', '/usr/bin/rg'],
args: ['/runtime/filesystem-worker.mjs', '--grep-executable', '/usr/bin/rg'],
env: {},
runtimeReadableRoots: ['/runtime/filesystem-worker.js'],
runtimeReadableRoots: ['/runtime/filesystem-worker.mjs'],
executableRoots: ['/usr/bin/node', '/usr/bin/rg'],
},
};
Expand Down Expand Up @@ -787,9 +787,9 @@ describe('filesystem worker client dispatch classification', () => {
ok: true,
spec: {
program: '/usr/bin/node',
args: ['/runtime/filesystem-worker.js', '--grep-executable', '/usr/bin/rg'],
args: ['/runtime/filesystem-worker.mjs', '--grep-executable', '/usr/bin/rg'],
env: {},
runtimeReadableRoots: ['/runtime/filesystem-worker.js'],
runtimeReadableRoots: ['/runtime/filesystem-worker.mjs'],
executableRoots: ['/usr/bin/node', '/usr/bin/rg'],
},
}),
Expand Down Expand Up @@ -882,9 +882,9 @@ describe('filesystem worker client dispatch classification', () => {
ok: true,
spec: {
program: '/usr/bin/node',
args: ['/runtime/filesystem-worker.js', '--grep-executable', '/usr/bin/rg'],
args: ['/runtime/filesystem-worker.mjs', '--grep-executable', '/usr/bin/rg'],
env: {},
runtimeReadableRoots: ['/runtime/filesystem-worker.js'],
runtimeReadableRoots: ['/runtime/filesystem-worker.mjs'],
executableRoots: ['/usr/bin/node', '/usr/bin/rg'],
},
}),
Expand Down Expand Up @@ -940,9 +940,9 @@ describe('filesystem worker client dispatch classification', () => {
ok: true,
spec: {
program: '/usr/bin/node',
args: ['/runtime/filesystem-worker.js', '--grep-executable', '/usr/bin/rg'],
args: ['/runtime/filesystem-worker.mjs', '--grep-executable', '/usr/bin/rg'],
env: {},
runtimeReadableRoots: ['/runtime/filesystem-worker.js'],
runtimeReadableRoots: ['/runtime/filesystem-worker.mjs'],
executableRoots: ['/usr/bin/node', '/usr/bin/rg'],
},
}),
Expand Down
6 changes: 3 additions & 3 deletions packages/runtime/src/__tests__/linux-sandbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ describe('buildBubblewrapArgv', () => {
const request = workspaceRequest(profile);
const pathContext: SandboxPathContext = {
...request.command.pathContext,
runtimeReadableRoots: ['/runtime/filesystem-worker.js'],
runtimeReadableRoots: ['/runtime/filesystem-worker.mjs'],
executableRoots: ['/opt/node/bin/node', '/opt/rg/bin/rg'],
runtimeWritableRoots: ['/outside'],
};
Expand All @@ -294,8 +294,8 @@ describe('buildBubblewrapArgv', () => {
hasTriple(
argv,
'--ro-bind',
'/runtime/filesystem-worker.js',
'/runtime/filesystem-worker.js',
'/runtime/filesystem-worker.mjs',
'/runtime/filesystem-worker.mjs',
),
);
assert.ok(hasTriple(argv, '--ro-bind', '/opt/node/bin/node', '/opt/node/bin/node'));
Expand Down
4 changes: 3 additions & 1 deletion packages/runtime/src/filesystem-worker/resource-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { realpath, stat } from 'node:fs/promises';
import { dirname, join, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';

export const FILESYSTEM_WORKER_BUNDLE_NAME = 'filesystem-worker.js';
// `.mjs` so Node never looks for a package.json to decide the module type:
// the Windows AppContainer sandbox denies that read and the worker crashes.
export const FILESYSTEM_WORKER_BUNDLE_NAME = 'filesystem-worker.mjs';

export type FilesystemWorkerResourceLocation =
| { kind: 'runtime'; moduleUrl?: string }
Expand Down
6 changes: 3 additions & 3 deletions scripts/release-cli-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const internalPackageNames = workspacePackages
const internalPackageSet = new Set(internalPackageNames);
const buildOrder = orderWorkspaceBuilds(workspacePackages);
const developmentGeneratedFiles = new Map([
['@maka/runtime', new Set(['workers/filesystem-worker.js'])],
['@maka/runtime', new Set(['workers/filesystem-worker.mjs'])],
]);
const strippedInstallScripts = new Map([
// The clean repository install has already produced every generated file and
Expand Down Expand Up @@ -749,7 +749,7 @@ function validateStaging(publishable) {
'DISCLAIMER-WIP',
'RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv',
'RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.js',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs',
'node_modules/@maka/runtime-host/dist/execution-candidate-main.js',
'node_modules/@maka/eval/dist/harbor-external-subject.js',
'node_modules/@maka/eval/harbor/relay_agent.py',
Expand Down Expand Up @@ -862,7 +862,7 @@ function validatePackedFiles(files, expectedDependencyManifests, publishable) {
const requiredPacked = [
'dist/cli.js',
'DISCLAIMER-WIP',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.js',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs',
'node_modules/@maka/runtime-host/dist/execution-candidate-main.js',
'node_modules/@maka/eval/harbor/relay_agent.py',
...(publishable || privateRuntimeHostTarget !== 'none'
Expand Down
2 changes: 1 addition & 1 deletion scripts/smoke-release-cli-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ function validateInstalledRuntimeFiles(packageRoot) {
// Incubator policy: the installed package carries the incubating
// disclaimer next to LICENSE/NOTICE, like every other Maka release.
'DISCLAIMER-WIP',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.js',
'node_modules/@maka/runtime/dist/workers/filesystem-worker.mjs',
'node_modules/@maka/runtime-host/dist/execution-candidate-main.js',
'node_modules/@maka/eval/dist/index.js',
'node_modules/@maka/eval/harbor/relay_agent.py',
Expand Down
2 changes: 1 addition & 1 deletion scripts/verify-macos-dmg.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export async function verifyPackagedMacApp(
}
const executableName = await readPlistValue(run, infoPlist, 'CFBundleExecutable');
const executable = join(contents, 'MacOS', executableName);
const filesystemWorker = join(resources, 'workers', 'filesystem-worker.js');
const filesystemWorker = join(resources, 'workers', 'filesystem-worker.mjs');
const appAsar = join(resources, 'app.asar');

await requirePath(executable);
Expand Down
4 changes: 3 additions & 1 deletion scripts/verify-packaged-app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,13 +1053,15 @@ export async function assertPackagedResources(
// Current Desktop builds ship the direct-peer Client addon beside its Rust
// notices. Upgrade baselines may predate both resources.
requireDirectPeerArtifact = true,
// Upgrade baselines may still ship the worker as `filesystem-worker.js`.
requireMjsFilesystemWorker = true,
} = {},
) {
const required = [
'app.asar',
'bundled-tools.json',
...(requireCanonicalIcon ? [join('assets', 'icon.png')] : []),
join('workers', 'filesystem-worker.js'),
...(requireMjsFilesystemWorker ? [join('workers', 'filesystem-worker.mjs')] : []),
...(requireDirectPeerArtifact
? [
join('runtime-host-peer', 'maka_runtime_host_peer.node'),
Expand Down
2 changes: 2 additions & 0 deletions scripts/verify-packaged-app.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,13 @@ test('the upgrade baseline keeps the Git absence rule while relaxing newer resou
requireCanonicalIcon: false,
requireAppIconCatalog: false,
requireDirectPeerArtifact: false,
requireMjsFilesystemWorker: false,
});

// A pinned baseline may predate any of these; none of them may be demanded
// of bytes that were correct when they shipped.
for (const path of [
join('resources', 'workers', 'filesystem-worker.mjs'),
join('resources', 'assets', 'icon.png'),
join('resources', 'licenses', 'maka', 'DISCLAIMER-WIP'),
join('resources', 'runtime-host-peer', 'maka_runtime_host_peer.node'),
Expand Down
4 changes: 2 additions & 2 deletions scripts/verify-windows-sandbox-e2e.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function assertCondition(condition, message) {
* PACKAGED Windows app: the packaged broker executable enforces the
* AppContainer boundary, the packaged Electron executable is the worker
* runtime (ELECTRON_RUN_AS_NODE, exactly as production launches it) and the
* packaged `resources\workers\filesystem-worker.js` is the worker bundle.
* packaged `resources\workers\filesystem-worker.mjs` is the worker bundle.
* Only the driver (client + launch-spec code) comes from the repository
* build, because the packaged copy lives inside app.asar which plain node
* cannot import; every executed artifact is the shipped one.
Expand All @@ -96,7 +96,7 @@ export async function verifyWindowsSandboxWorkerE2E(appDirectoryPath) {
const appExecutable = join(appDirectory, 'Maka.exe');
const resourcesPath = join(appDirectory, 'resources');
const sandboxExecutable = join(resourcesPath, 'windows-sandbox', 'maka-windows-sandbox.exe');
const workerBundle = join(resourcesPath, 'workers', 'filesystem-worker.js');
const workerBundle = join(resourcesPath, 'workers', 'filesystem-worker.mjs');
for (const [path, label] of [
[appExecutable, 'packaged Electron executable'],
[sandboxExecutable, 'packaged sandbox broker'],
Expand Down
1 change: 1 addition & 0 deletions scripts/verify-windows-x64.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export async function verifyPackagedWindowsApp(
requireCanonicalIcon: requiresCurrentContract,
requireAppIconCatalog: requiresCurrentContract,
requireDirectPeerArtifact: requiresCurrentContract,
requireMjsFilesystemWorker: requiresCurrentContract,
});
// The upgrade baseline is a build that shipped on its own channel, from its
// own commit: its update feed and dependency closure are the ones that were
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows-smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DESKTOP_RUNTIME_WORKER = join(
'desktop',
'resources',
'workers',
'filesystem-worker.js',
'filesystem-worker.mjs',
);
const DESKTOP_SMOKE = join(REPO_ROOT, 'scripts', 'desktop-real-window-smoke.mjs');
const CLI_TIMEOUT_MS = 15_000;
Expand Down
Loading