@indx-workspace/platforms
v0.6.9
Published
The PlatformTarget port, the per-field verdict model and the conformance kit that every agent-platform translator (Copilot Studio, Foundry, Gemini Enterprise, AgentCore, ...) is built on; pure, no I/O.
Readme
@indx-workspace/platforms
Translators from a PortableProject (@indx-workspace/contracts/portable-agent) to the files an
external agent host takes, and back where the host allows it. The design is
ADR-0133
D6-D8. The package is published in lock-step with @indx-workspace/contracts; six targets ship: claude-managed-agents,
copilot-studio, m365-declarative-agent, microsoft-foundry, gemini-enterprise (compile only)
and aws-agentcore, each at
@indx-workspace/platforms/<target>.
PlatformTargetis the port: an id, a capability matrix, an options schema, a purecompileand an optionalimport.- Every field of the project gets one verdict in the report:
native,mapped, ordroppedwith a drop code. Nothing is dropped silently. Paths aretoolEndpoint, then<agent>.<field>(portableFieldPaths). - Call
compileForPlatform(target, project, options), nottarget.compile: it checks the root agent, validates the options and orders the output. - Production code is pure: no Node built-in, clock, randomness or environment.
platforms-are-pureindependency-cruiser.config.mjsand an ESLint block enforce it. The only npm dependencies are@indx-workspace/contracts,zodandyaml(src/dependencies.test.ts), and the packagetsconfig.jsonhas no Node types;tsconfig.test.jsonadds them for the kit and the tests.
Adding a target
- Add
src/targets/<id>/index.tsexporting aPlatformTargetwhoseidis inPLATFORM_IDS, add it toPLATFORM_TARGETSinsrc/registry.ts(inPLATFORM_IDSorder) and give it a./<id>subpath inpackage.jsonexportsandpublishConfig.exports. - Build its report from
portableFieldPaths,capabilityOfPathand thenative,mappedanddroppedbuilders. - Test it with
@indx-workspace/platforms/testing:runPlatformConformance(target)and a golden fromexpectGoldenFiles(data files) orexpectGoldenBundle(generated source, one.txt).UPDATE_GOLDEN=1rewrites goldens.loadGoldenProjectreads<goldenDir>/input.json. - Regenerate
docs/platform-matrix.mdwithnode tests/platform-matrix/run.mjs;pnpm docs:checkfails while it is stale.
