git mv packages/business -> packages/organization (@mosaic/organization). The old package stays as one-line re-export shims of each moved module, with src/business.mjs re-exporting src/organization-config.mjs and src/cli.mjs forwarding to the moved executable. BusinessError is OrganizationConfigError (one constructor, name kept BusinessError); OrganizationError stays distinct. The bus adapter gains organization-context.mjs (busOrganization), with business.mjs (busBusiness) as the same function. Import consumers, manifests, the lockfile, scripts/mosaic, stack-copy.sh COPY_PATHS (both roots), seat sandbox RUNNER_FILES and the copy closure walker (organization-imports.mjs, both roots required) move to the new path. v1 serialization, v1 writers and the stage A fixtures are unchanged; the stage A contract tests stay where they were and pass as before.
19 lines
916 B
JavaScript
19 lines
916 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { ACTIONS, GATED_ONLY } from '../src/vocabulary.mjs';
|
|
import { loadRole } from '../src/index.mjs';
|
|
import { REPO_ROLES } from './helpers.mjs';
|
|
const ROLES = ['assistant', 'chief-executive-officer', 'chief-financial-officer',
|
|
'chief-information-officer', 'chief-information-security-officer', 'chief-marketing-officer',
|
|
'chief-of-staff', 'coder', 'cto', 'pm', 'reviewer'];
|
|
test('record.write is within-role for the eleven approved v2 agents, never gated-only', () => {
|
|
assert.ok(ACTIONS.includes('record.write'));
|
|
assert.ok(!GATED_ONLY.includes('record.write'));
|
|
for (const name of ROLES) {
|
|
const role = loadRole(REPO_ROLES, name);
|
|
assert.equal(role.roleVersion, 2);
|
|
assert.ok(role.authority.withinRole.includes('record.write'), name);
|
|
assert.ok(!role.authority.crossRole.includes('record.write'), name);
|
|
}
|
|
});
|