@openma/common 0.0.0-stage → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +391 -2
- package/dist/acp-artifacts/binary.d.ts +35 -0
- package/dist/acp-artifacts/binary.d.ts.map +1 -0
- package/dist/acp-artifacts/binary.js +120 -0
- package/dist/acp-artifacts/binary.js.map +1 -0
- package/dist/acp-artifacts/index.d.ts +7 -0
- package/dist/acp-artifacts/index.d.ts.map +1 -0
- package/dist/acp-artifacts/index.js +7 -0
- package/dist/acp-artifacts/index.js.map +1 -0
- package/dist/acp-artifacts/node-abi.d.ts +3 -0
- package/dist/acp-artifacts/node-abi.d.ts.map +1 -0
- package/dist/acp-artifacts/node-abi.js +17 -0
- package/dist/acp-artifacts/node-abi.js.map +1 -0
- package/dist/acp-artifacts/npm-cli.d.ts +3 -0
- package/dist/acp-artifacts/npm-cli.d.ts.map +1 -0
- package/dist/acp-artifacts/npm-cli.js +9 -0
- package/dist/acp-artifacts/npm-cli.js.map +1 -0
- package/dist/acp-artifacts/npm.d.ts +37 -0
- package/dist/acp-artifacts/npm.d.ts.map +1 -0
- package/dist/acp-artifacts/npm.js +167 -0
- package/dist/acp-artifacts/npm.js.map +1 -0
- package/dist/acp-artifacts/registry.d.ts +45 -0
- package/dist/acp-artifacts/registry.d.ts.map +1 -0
- package/dist/acp-artifacts/registry.js +206 -0
- package/dist/acp-artifacts/registry.js.map +1 -0
- package/dist/acp-artifacts/shared.d.ts +45 -0
- package/dist/acp-artifacts/shared.d.ts.map +1 -0
- package/dist/acp-artifacts/shared.js +157 -0
- package/dist/acp-artifacts/shared.js.map +1 -0
- package/dist/acp-artifacts/uvx.d.ts +32 -0
- package/dist/acp-artifacts/uvx.d.ts.map +1 -0
- package/dist/acp-artifacts/uvx.js +95 -0
- package/dist/acp-artifacts/uvx.js.map +1 -0
- package/dist/acp-fork/index.d.ts +51 -0
- package/dist/acp-fork/index.d.ts.map +1 -0
- package/dist/acp-fork/index.js +116 -0
- package/dist/acp-fork/index.js.map +1 -0
- package/dist/acp-harnesses/agent-setup.d.ts +118 -0
- package/dist/acp-harnesses/agent-setup.d.ts.map +1 -0
- package/dist/acp-harnesses/agent-setup.js +717 -0
- package/dist/acp-harnesses/agent-setup.js.map +1 -0
- package/dist/acp-harnesses/custom-agents.d.ts +81 -0
- package/dist/acp-harnesses/custom-agents.d.ts.map +1 -0
- package/dist/acp-harnesses/custom-agents.js +361 -0
- package/dist/acp-harnesses/custom-agents.js.map +1 -0
- package/dist/acp-harnesses/headless-launch.d.ts +34 -0
- package/dist/acp-harnesses/headless-launch.d.ts.map +1 -0
- package/dist/acp-harnesses/headless-launch.js +67 -0
- package/dist/acp-harnesses/headless-launch.js.map +1 -0
- package/dist/acp-harnesses/index.d.ts +18 -0
- package/dist/acp-harnesses/index.d.ts.map +1 -0
- package/dist/acp-harnesses/index.js +58 -0
- package/dist/acp-harnesses/index.js.map +1 -0
- package/dist/acp-harnesses/install-state.d.ts +86 -0
- package/dist/acp-harnesses/install-state.d.ts.map +1 -0
- package/dist/acp-harnesses/install-state.js +322 -0
- package/dist/acp-harnesses/install-state.js.map +1 -0
- package/dist/acp-harnesses/installer.d.ts +145 -0
- package/dist/acp-harnesses/installer.d.ts.map +1 -0
- package/dist/acp-harnesses/installer.js +716 -0
- package/dist/acp-harnesses/installer.js.map +1 -0
- package/dist/acp-harnesses/known-agents.d.ts +154 -0
- package/dist/acp-harnesses/known-agents.d.ts.map +1 -0
- package/dist/acp-harnesses/known-agents.js +240 -0
- package/dist/acp-harnesses/known-agents.js.map +1 -0
- package/dist/acp-harnesses/launcher.d.ts +27 -0
- package/dist/acp-harnesses/launcher.d.ts.map +1 -0
- package/dist/acp-harnesses/launcher.js +64 -0
- package/dist/acp-harnesses/launcher.js.map +1 -0
- package/dist/acp-harnesses/registry-fetch.d.ts +42 -0
- package/dist/acp-harnesses/registry-fetch.d.ts.map +1 -0
- package/dist/acp-harnesses/registry-fetch.js +132 -0
- package/dist/acp-harnesses/registry-fetch.js.map +1 -0
- package/dist/acp-harnesses/registry.d.ts +36 -0
- package/dist/acp-harnesses/registry.d.ts.map +1 -0
- package/dist/acp-harnesses/registry.js +307 -0
- package/dist/acp-harnesses/registry.js.map +1 -0
- package/dist/acp-runtime/errors.d.ts +7 -0
- package/dist/acp-runtime/errors.d.ts.map +1 -0
- package/dist/acp-runtime/errors.js +17 -0
- package/dist/acp-runtime/errors.js.map +1 -0
- package/dist/acp-runtime/fork-support.d.ts +8 -0
- package/dist/acp-runtime/fork-support.d.ts.map +1 -0
- package/dist/acp-runtime/fork-support.js +20 -0
- package/dist/acp-runtime/fork-support.js.map +1 -0
- package/dist/acp-runtime/index.d.ts +11 -0
- package/dist/acp-runtime/index.d.ts.map +1 -0
- package/dist/acp-runtime/index.js +6 -0
- package/dist/acp-runtime/index.js.map +1 -0
- package/dist/acp-runtime/probe.d.ts +103 -0
- package/dist/acp-runtime/probe.d.ts.map +1 -0
- package/dist/acp-runtime/probe.js +872 -0
- package/dist/acp-runtime/probe.js.map +1 -0
- package/dist/acp-runtime/runtime.d.ts +7 -0
- package/dist/acp-runtime/runtime.d.ts.map +1 -0
- package/dist/acp-runtime/runtime.js +26 -0
- package/dist/acp-runtime/runtime.js.map +1 -0
- package/dist/acp-runtime/session.d.ts +87 -0
- package/dist/acp-runtime/session.d.ts.map +1 -0
- package/dist/acp-runtime/session.js +1071 -0
- package/dist/acp-runtime/session.js.map +1 -0
- package/dist/acp-runtime/spawners/node.d.ts +5 -0
- package/dist/acp-runtime/spawners/node.d.ts.map +1 -0
- package/dist/acp-runtime/spawners/node.js +244 -0
- package/dist/acp-runtime/spawners/node.js.map +1 -0
- package/dist/acp-runtime/types.d.ts +180 -0
- package/dist/acp-runtime/types.d.ts.map +1 -0
- package/dist/acp-runtime/types.js +2 -0
- package/dist/acp-runtime/types.js.map +1 -0
- package/dist/agent-contract/acp.d.ts +4 -0
- package/dist/agent-contract/acp.d.ts.map +1 -0
- package/dist/agent-contract/acp.js +273 -0
- package/dist/agent-contract/acp.js.map +1 -0
- package/dist/agent-contract/index.d.ts +125 -0
- package/dist/agent-contract/index.d.ts.map +1 -0
- package/dist/agent-contract/index.js +102 -0
- package/dist/agent-contract/index.js.map +1 -0
- package/dist/agent-contract/managed.d.ts +5 -0
- package/dist/agent-contract/managed.d.ts.map +1 -0
- package/dist/agent-contract/managed.js +242 -0
- package/dist/agent-contract/managed.js.map +1 -0
- package/dist/agent-ui/index.d.ts +170 -0
- package/dist/agent-ui/index.d.ts.map +1 -0
- package/dist/agent-ui/index.js +853 -0
- package/dist/agent-ui/index.js.map +1 -0
- package/dist/agent-ui/presentation.d.ts +30 -0
- package/dist/agent-ui/presentation.d.ts.map +1 -0
- package/dist/agent-ui/presentation.js +79 -0
- package/dist/agent-ui/presentation.js.map +1 -0
- package/dist/agent-ui/react.d.ts +50 -0
- package/dist/agent-ui/react.d.ts.map +1 -0
- package/dist/agent-ui/react.js +334 -0
- package/dist/agent-ui/react.js.map +1 -0
- package/dist/brand/index.d.ts +17 -0
- package/dist/brand/index.d.ts.map +1 -0
- package/dist/brand/index.js +119 -0
- package/dist/brand/index.js.map +1 -0
- package/dist/brand/openma-logo-mark.svg +7 -0
- package/dist/brand/tokens.css +77 -0
- package/dist/brand/website.css +67 -0
- package/dist/chat-ui/acp.d.ts +26 -0
- package/dist/chat-ui/acp.d.ts.map +1 -0
- package/dist/chat-ui/acp.js +166 -0
- package/dist/chat-ui/acp.js.map +1 -0
- package/dist/chat-ui/components.d.ts +230 -0
- package/dist/chat-ui/components.d.ts.map +1 -0
- package/dist/chat-ui/components.js +561 -0
- package/dist/chat-ui/components.js.map +1 -0
- package/dist/chat-ui/composer-drafts.d.ts +21 -0
- package/dist/chat-ui/composer-drafts.d.ts.map +1 -0
- package/dist/chat-ui/composer-drafts.js +58 -0
- package/dist/chat-ui/composer-drafts.js.map +1 -0
- package/dist/chat-ui/controller.d.ts +61 -0
- package/dist/chat-ui/controller.d.ts.map +1 -0
- package/dist/chat-ui/controller.js +218 -0
- package/dist/chat-ui/controller.js.map +1 -0
- package/dist/chat-ui/index.d.ts +8 -0
- package/dist/chat-ui/index.d.ts.map +1 -0
- package/dist/chat-ui/index.js +8 -0
- package/dist/chat-ui/index.js.map +1 -0
- package/dist/chat-ui/markdown.d.ts +37 -0
- package/dist/chat-ui/markdown.d.ts.map +1 -0
- package/dist/chat-ui/markdown.js +33 -0
- package/dist/chat-ui/markdown.js.map +1 -0
- package/dist/chat-ui/presentation.d.ts +34 -0
- package/dist/chat-ui/presentation.d.ts.map +1 -0
- package/dist/chat-ui/presentation.js +191 -0
- package/dist/chat-ui/presentation.js.map +1 -0
- package/dist/chat-ui/styles.css +815 -0
- package/dist/chat-ui/utils.d.ts +14 -0
- package/dist/chat-ui/utils.d.ts.map +1 -0
- package/dist/chat-ui/utils.js +71 -0
- package/dist/chat-ui/utils.js.map +1 -0
- package/dist/local-runtime/checkpoint.d.ts +28 -0
- package/dist/local-runtime/checkpoint.d.ts.map +1 -0
- package/dist/local-runtime/checkpoint.js +2 -0
- package/dist/local-runtime/checkpoint.js.map +1 -0
- package/dist/local-runtime/daemon-connection.d.ts +27 -0
- package/dist/local-runtime/daemon-connection.d.ts.map +1 -0
- package/dist/local-runtime/daemon-connection.js +161 -0
- package/dist/local-runtime/daemon-connection.js.map +1 -0
- package/dist/local-runtime/daemon-host.d.ts +39 -0
- package/dist/local-runtime/daemon-host.d.ts.map +1 -0
- package/dist/local-runtime/daemon-host.js +88 -0
- package/dist/local-runtime/daemon-host.js.map +1 -0
- package/dist/local-runtime/index.d.ts +6 -0
- package/dist/local-runtime/index.d.ts.map +1 -0
- package/dist/local-runtime/index.js +5 -0
- package/dist/local-runtime/index.js.map +1 -0
- package/dist/local-runtime/runtime.d.ts +36 -0
- package/dist/local-runtime/runtime.d.ts.map +1 -0
- package/dist/local-runtime/runtime.js +82 -0
- package/dist/local-runtime/runtime.js.map +1 -0
- package/dist/local-runtime/session-host.d.ts +62 -0
- package/dist/local-runtime/session-host.d.ts.map +1 -0
- package/dist/local-runtime/session-host.js +477 -0
- package/dist/local-runtime/session-host.js.map +1 -0
- package/dist/managed-runtime/acp-subagents.d.ts +14 -0
- package/dist/managed-runtime/acp-subagents.d.ts.map +1 -0
- package/dist/managed-runtime/acp-subagents.js +67 -0
- package/dist/managed-runtime/acp-subagents.js.map +1 -0
- package/dist/managed-runtime/claimed-environment-work.d.ts +61 -0
- package/dist/managed-runtime/claimed-environment-work.d.ts.map +1 -0
- package/dist/managed-runtime/claimed-environment-work.js +170 -0
- package/dist/managed-runtime/claimed-environment-work.js.map +1 -0
- package/dist/managed-runtime/contracts.d.ts +31 -0
- package/dist/managed-runtime/contracts.d.ts.map +1 -0
- package/dist/managed-runtime/contracts.js +2 -0
- package/dist/managed-runtime/contracts.js.map +1 -0
- package/dist/managed-runtime/http-control.d.ts +67 -0
- package/dist/managed-runtime/http-control.d.ts.map +1 -0
- package/dist/managed-runtime/http-control.js +465 -0
- package/dist/managed-runtime/http-control.js.map +1 -0
- package/dist/managed-runtime/index.d.ts +89 -0
- package/dist/managed-runtime/index.d.ts.map +1 -0
- package/dist/managed-runtime/index.js +215 -0
- package/dist/managed-runtime/index.js.map +1 -0
- package/dist/managed-runtime/input-identity.d.ts +2 -0
- package/dist/managed-runtime/input-identity.d.ts.map +1 -0
- package/dist/managed-runtime/input-identity.js +2 -0
- package/dist/managed-runtime/input-identity.js.map +1 -0
- package/dist/managed-runtime/managed-event-projector.d.ts +24 -0
- package/dist/managed-runtime/managed-event-projector.d.ts.map +1 -0
- package/dist/managed-runtime/managed-event-projector.js +333 -0
- package/dist/managed-runtime/managed-event-projector.js.map +1 -0
- package/dist/managed-runtime/semantic-recovery.d.ts +61 -0
- package/dist/managed-runtime/semantic-recovery.d.ts.map +1 -0
- package/dist/managed-runtime/semantic-recovery.js +167 -0
- package/dist/managed-runtime/semantic-recovery.js.map +1 -0
- package/dist/project-ui/CreateProjectDialog.d.ts +15 -0
- package/dist/project-ui/CreateProjectDialog.d.ts.map +1 -0
- package/dist/project-ui/CreateProjectDialog.js +87 -0
- package/dist/project-ui/CreateProjectDialog.js.map +1 -0
- package/dist/project-ui/ProjectComposer.d.ts +13 -0
- package/dist/project-ui/ProjectComposer.d.ts.map +1 -0
- package/dist/project-ui/ProjectComposer.js +70 -0
- package/dist/project-ui/ProjectComposer.js.map +1 -0
- package/dist/project-ui/ProjectConversation.d.ts +10 -0
- package/dist/project-ui/ProjectConversation.d.ts.map +1 -0
- package/dist/project-ui/ProjectConversation.js +28 -0
- package/dist/project-ui/ProjectConversation.js.map +1 -0
- package/dist/project-ui/ProjectMessageAttachments.d.ts +4 -0
- package/dist/project-ui/ProjectMessageAttachments.d.ts.map +1 -0
- package/dist/project-ui/ProjectMessageAttachments.js +28 -0
- package/dist/project-ui/ProjectMessageAttachments.js.map +1 -0
- package/dist/project-ui/ProjectSettings.d.ts +8 -0
- package/dist/project-ui/ProjectSettings.d.ts.map +1 -0
- package/dist/project-ui/ProjectSettings.js +65 -0
- package/dist/project-ui/ProjectSettings.js.map +1 -0
- package/dist/project-ui/Projects.d.ts +18 -0
- package/dist/project-ui/Projects.d.ts.map +1 -0
- package/dist/project-ui/Projects.js +377 -0
- package/dist/project-ui/Projects.js.map +1 -0
- package/dist/project-ui/client.d.ts +234 -0
- package/dist/project-ui/client.d.ts.map +1 -0
- package/dist/project-ui/client.js +42 -0
- package/dist/project-ui/client.js.map +1 -0
- package/dist/project-ui/controls.d.ts +15 -0
- package/dist/project-ui/controls.d.ts.map +1 -0
- package/dist/project-ui/controls.js +17 -0
- package/dist/project-ui/controls.js.map +1 -0
- package/dist/project-ui/index.d.ts +20 -0
- package/dist/project-ui/index.d.ts.map +1 -0
- package/dist/project-ui/index.js +17 -0
- package/dist/project-ui/index.js.map +1 -0
- package/dist/project-ui/project-coordinator.d.ts +3 -0
- package/dist/project-ui/project-coordinator.d.ts.map +1 -0
- package/dist/project-ui/project-coordinator.js +12 -0
- package/dist/project-ui/project-coordinator.js.map +1 -0
- package/dist/project-ui/project-goals.d.ts +48 -0
- package/dist/project-ui/project-goals.d.ts.map +1 -0
- package/dist/project-ui/project-goals.js +169 -0
- package/dist/project-ui/project-goals.js.map +1 -0
- package/dist/project-ui/projects-query.d.ts +19 -0
- package/dist/project-ui/projects-query.d.ts.map +1 -0
- package/dist/project-ui/projects-query.js +132 -0
- package/dist/project-ui/projects-query.js.map +1 -0
- package/dist/project-ui/styles.css +847 -0
- package/dist/protocol/acp/index.d.ts +52 -0
- package/dist/protocol/acp/index.d.ts.map +1 -0
- package/dist/protocol/acp/index.js +1056 -0
- package/dist/protocol/acp/index.js.map +1 -0
- package/dist/protocol/cursor-cloud/index.d.ts +74 -0
- package/dist/protocol/cursor-cloud/index.d.ts.map +1 -0
- package/dist/protocol/cursor-cloud/index.js +249 -0
- package/dist/protocol/cursor-cloud/index.js.map +1 -0
- package/dist/protocol/managed/index.d.ts +32 -0
- package/dist/protocol/managed/index.d.ts.map +1 -0
- package/dist/protocol/managed/index.js +646 -0
- package/dist/protocol/managed/index.js.map +1 -0
- package/dist/protocol/managed/input-identity.d.ts +3 -0
- package/dist/protocol/managed/input-identity.d.ts.map +1 -0
- package/dist/protocol/managed/input-identity.js +6 -0
- package/dist/protocol/managed/input-identity.js.map +1 -0
- package/dist/protocol/openai-agents/index.d.ts +102 -0
- package/dist/protocol/openai-agents/index.d.ts.map +1 -0
- package/dist/protocol/openai-agents/index.js +142 -0
- package/dist/protocol/openai-agents/index.js.map +1 -0
- package/dist/session-events/acp-system-notices.d.ts +10 -0
- package/dist/session-events/acp-system-notices.d.ts.map +1 -0
- package/dist/session-events/acp-system-notices.js +46 -0
- package/dist/session-events/acp-system-notices.js.map +1 -0
- package/dist/session-events/acp.d.ts +214 -0
- package/dist/session-events/acp.d.ts.map +1 -0
- package/dist/session-events/acp.js +956 -0
- package/dist/session-events/acp.js.map +1 -0
- package/dist/session-events/managed.d.ts +141 -0
- package/dist/session-events/managed.d.ts.map +1 -0
- package/dist/session-events/managed.js +324 -0
- package/dist/session-events/managed.js.map +1 -0
- package/dist/session-events/openma.d.ts +304 -0
- package/dist/session-events/openma.d.ts.map +1 -0
- package/dist/session-events/openma.js +438 -0
- package/dist/session-events/openma.js.map +1 -0
- package/dist/session-kernel/index.d.ts +118 -0
- package/dist/session-kernel/index.d.ts.map +1 -0
- package/dist/session-kernel/index.js +215 -0
- package/dist/session-kernel/index.js.map +1 -0
- package/dist/session-orchestrator/index.d.ts +71 -0
- package/dist/session-orchestrator/index.d.ts.map +1 -0
- package/dist/session-orchestrator/index.js +177 -0
- package/dist/session-orchestrator/index.js.map +1 -0
- package/dist/session-ui/index.d.ts +96 -0
- package/dist/session-ui/index.d.ts.map +1 -0
- package/dist/session-ui/index.js +277 -0
- package/dist/session-ui/index.js.map +1 -0
- package/package.json +222 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Support. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Open Managed Agents Contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
package/README.md
CHANGED
|
@@ -1,3 +1,392 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OpenMA Common
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared, product-agnostic contracts used by OpenMA Desktop and Open Managed Agents.
|
|
4
|
+
This repository is consumed directly from Git; it is intentionally not published
|
|
5
|
+
to npm.
|
|
6
|
+
|
|
7
|
+
The Agent-facing architecture is additive and vendor-neutral:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
OpenMA Agent Contract
|
|
11
|
+
├── commands, capabilities, session handles, and canonical OpenMA events
|
|
12
|
+
├── ACP wire adapter + existing ACP runtime
|
|
13
|
+
└── Claude Managed Agents wire adapter
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
ACP and Managed Agents remain bindings. Consumers orchestrate against the
|
|
17
|
+
OpenMA Agent Contract instead of leaking either provider's session identifiers
|
|
18
|
+
or wire-event shapes into product state.
|
|
19
|
+
|
|
20
|
+
## Exports
|
|
21
|
+
|
|
22
|
+
- `@openma/common/brand` — canonical token names, light/dark values, and brand RGB.
|
|
23
|
+
- `@openma/common/brand/tokens.css` — matching CSS custom properties.
|
|
24
|
+
- `@openma/common/brand/openma-logo-mark.svg` — canonical OpenMA vector mark.
|
|
25
|
+
- `@openma/common/protocol/managed` — v2 Managed Agents ↔ OpenMA codec, typed against the official Anthropic SDK event unions.
|
|
26
|
+
- `@openma/common/protocol/acp` — ACP v1 ↔ OpenMA codec, typed against the official Agent Client Protocol SDK message unions.
|
|
27
|
+
- `@openma/common/protocol/openai-agents` — OpenAI Agents items, turns, and session stream events decoded into OpenMA events. The mapping matches backchat `direct-agent-runtime` at `64fd74d`.
|
|
28
|
+
- `@openma/common/protocol/cursor-cloud` — Cursor Cloud Agents API v1 run SSE events decoded into OpenMA events.
|
|
29
|
+
- `@openma/common/session-events/managed` — deprecated legacy Managed event projector plus a compatibility re-export of the v2 codec.
|
|
30
|
+
- `@openma/common/session-events/acp` — deprecated ACP parser/turn projector plus a compatibility re-export of the SDK codec.
|
|
31
|
+
- `@openma/common/session-events/openma` — OpenMA canonical event envelope, Vendor/raw records, and WorkItem lifecycle reducer.
|
|
32
|
+
- `@openma/common/agent-contract` — immutable Agent facts, connector commands, and lifecycle helpers.
|
|
33
|
+
- `@openma/common/agent-contract/acp` — ACP wire events translated into Agent facts.
|
|
34
|
+
- `@openma/common/agent-contract/managed` — Claude Managed wire events translated into Agent facts.
|
|
35
|
+
- `@openma/common/agent-ui` — replayable headless Agent UI reducer and subscribable framework-neutral store.
|
|
36
|
+
- `@openma/common/session-kernel` — canonical local/cloud lifecycle, relay commands, and wire conversion.
|
|
37
|
+
- `@openma/common/acp-fork` — browser-safe inclusive ACP fork client API: `forkSupport()`, `acpForkPointsFromMessages()`, `ACP_INCLUSIVE_FORK_CAPABILITY`, capability metadata helpers, and `AcpForkPoint` types. No Node built-ins and no SHA-256 fingerprinting; pass the selected `forkPoint` to the Node runtime (for example via `@openma/common/acp-runtime`) which builds `jetbrains.air.fork` request meta. See [docs/fork-support.md](./docs/fork-support.md).
|
|
38
|
+
- `@openma/common/acp-runtime` — shared ACP session/runtime implementation used by both Backchat and OpenManaged. It exports `sessionConfigOptionsFromResponse()` (legacy `models` catalog → model select), `acpForkRequestMeta()` (`jetbrains.air.fork` v1, Node-only), re-exports the `acp-fork` client helpers, `probeAgentAuthStatus()`, and `authenticateAgent()`. Sessions expose `legacyModels` and `forkSupport`, and accept an optional `clientCapabilityOverlay` and `forkPoint`. See [docs/fork-support.md](./docs/fork-support.md).
|
|
39
|
+
- `@openma/common/acp-runtime/node-spawner` — shared Node subprocess adapter for the ACP runtime. On POSIX it starts each agent in its own process group and signals that group on kill and on host shutdown. A pure Node process with no other listener for that `SIGHUP`, `SIGINT`, or `SIGTERM` re-raises the signal after cleanup, so the process still exits with it. The Electron main process keeps its own handlers; children are reaped from the `exit` hook when that process actually quits.
|
|
40
|
+
- `@openma/common/acp-harnesses` — shared PATH-based ACP harness catalog (`DEFAULT_ACP_HARNESSES`) and persisted-catalog cloning and validation.
|
|
41
|
+
- `@openma/common/acp-harnesses/registry` — official ACP registry fetch/cache plus OpenMA overlay (`known-agents`), and managed-bin / PATH detection.
|
|
42
|
+
- `@openma/common/acp-harnesses/installer` — registry-backed npm/uvx/binary installs into a managed bin directory (host-agnostic `npmCommand` / `npmEnv`).
|
|
43
|
+
- `@openma/common/acp-harnesses/headless-launch` — `buildAcpHeadlessLaunch(entry, options)`: the launch arguments and variables for one unattended run, built from the harness's own recipe (`KnownAgentEntry.headless`). See [Unattended runs and pinned installs](#unattended-runs-and-pinned-installs).
|
|
44
|
+
- `@openma/common/acp-harnesses/agent-setup` — install/upgrade/uninstall and capability inspection service used by Backchat. See [Managed ACP harness installation](#managed-acp-harness-installation).
|
|
45
|
+
- `@openma/common/acp-harnesses/custom-agents` — shared store for custom ACP agent definitions under `~/.oma`: `config.toml` `[[agents]]` override rows plus compatible reads of Martty `settings.json` `harnesses[]` rows (migrated on write). Versions in `args` are kept verbatim.
|
|
46
|
+
- `@openma/common/session-ui` — shared Session turn frame, OpenMA/harness icons, live ACP configuration controls, and status semantics with product-specific content slots.
|
|
47
|
+
|
|
48
|
+
`projectCanonicalChatTurns()` adapts Managed events into the same `TurnRender`
|
|
49
|
+
model used by Backchat. This is the migration seam for a shared Session GUI;
|
|
50
|
+
the current OpenManaged Console can move to it without changing its API wire
|
|
51
|
+
format.
|
|
52
|
+
|
|
53
|
+
Adapters keep wire-protocol differences at the boundary. Consumers may add
|
|
54
|
+
product-specific presentation after normalization, but should not fork the
|
|
55
|
+
shared parsing and reduction logic.
|
|
56
|
+
|
|
57
|
+
The v2 event path is deliberately bidirectional only through the canonical
|
|
58
|
+
protocol; harness adapters never map directly to each other:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Managed SessionEvent / StreamSessionEvents ──decode──┐
|
|
62
|
+
ACP notifications / requests / responses ──decode──┤
|
|
63
|
+
├──▶ OpenMAEvent
|
|
64
|
+
Managed EventParams ◀─encode──┤
|
|
65
|
+
ACP request / notification / response ◀─encode──┘
|
|
66
|
+
│
|
|
67
|
+
▼
|
|
68
|
+
headless AgentUIState
|
|
69
|
+
│
|
|
70
|
+
React / Vue / CLI bindings
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Codec results declare `exact`, `lossy`, or `unsupported` fidelity. Current
|
|
74
|
+
official events without a harness-neutral projection are retained as
|
|
75
|
+
`vendor.event`; unknown future or malformed records are retained as
|
|
76
|
+
`raw.event`, so replay never silently discards evidence. The Anthropic SDK is
|
|
77
|
+
an optional peer and a development dependency: the public codec declarations
|
|
78
|
+
track its official unions without adding a runtime SDK import.
|
|
79
|
+
Every official Managed Session event discriminant is classified explicitly as
|
|
80
|
+
canonical or vendor-preserved, so an SDK union change fails typecheck until the
|
|
81
|
+
mapping policy is reviewed.
|
|
82
|
+
|
|
83
|
+
The `session-events/openma` export is the harness-neutral event boundary. It
|
|
84
|
+
distinguishes canonical events from `vendor.event` records and opaque
|
|
85
|
+
`raw.event` records; vendor/raw records do not imply GUI lifecycle semantics.
|
|
86
|
+
|
|
87
|
+
## ACP inclusive fork
|
|
88
|
+
|
|
89
|
+
Clients ask `forkSupport()` whether an agent can fork a whole session or from one assistant message. They do not hardcode harness names or versions. `SessionOptions.forkPoint` is valid only with `forkFromAcpSessionId`. After `initialize`, the runtime refuses the fork when `forkSupport()` is not `"message"` — it does not fall back to a whole-session fork. The same refusal applies when the caller puts `jetbrains.air.fork` on `sessionRequestMeta` directly. A supported `forkPoint` is deep-merged into that metadata for the `session/fork` request only, so other keys such as `claudeCode` stay in place.
|
|
90
|
+
|
|
91
|
+
Adapters that implement the request advertise `sessionCapabilities.fork` together with `agentCapabilities._meta.jetbrains.air.fork = { "version": 1, "inclusive": true }`. The nested object is the capability. A flat `"jetbrains.air.fork"` key is not. Own adapters copy `ACP_INCLUSIVE_FORK_CAPABILITY` and keep it byte-identical; they do not depend on this private package.
|
|
92
|
+
|
|
93
|
+
Truncation keeps the selected assistant message and everything before it, and drops everything after it. If that message contains tool calls whose results sit after the message, adapters remove those tool calls from the truncated message. The new session stays a legal model transcript, and `session/load` replay still ends on the target message. Tool calls that already completed before that message stay as they were. The contract, client example, and dependency order are in [docs/fork-support.md](./docs/fork-support.md).
|
|
94
|
+
|
|
95
|
+
## Install from npm
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"dependencies": {
|
|
100
|
+
"@openma/common": "^0.9.1"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Release tags are published to npm by CI with provenance. Built `dist/` output
|
|
106
|
+
is what ships, so installs do not run package lifecycle scripts.
|
|
107
|
+
|
|
108
|
+
## Install from Git
|
|
109
|
+
|
|
110
|
+
Git installs keep working for pinned commits. Use an immutable release tag in `package.json`:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"dependencies": {
|
|
115
|
+
"@openma/common": "github:openma-ai/openma-common#v0.9.0"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The lockfile resolves that tag to an exact commit. Built `dist/` output is
|
|
121
|
+
committed, so consumer installs do not run package lifecycle scripts. Never
|
|
122
|
+
move an existing tag; create a new one for every consumer-visible change.
|
|
123
|
+
|
|
124
|
+
## Fast local development
|
|
125
|
+
|
|
126
|
+
No npm or GitHub release is needed while iterating. From this repository, the
|
|
127
|
+
single-command flow links all consumers, starts the common watch build, and
|
|
128
|
+
restores the original dependencies on exit:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm install
|
|
132
|
+
pnpm dev:consumers
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Run the consumer's normal dev server in another terminal, for example
|
|
136
|
+
`pnpm --dir ../openma-desktop dev` or `pnpm --dir ../open-managed-agents/apps/console dev`.
|
|
137
|
+
Press `Ctrl+C` in the common terminal when finished.
|
|
138
|
+
|
|
139
|
+
For more control, `pnpm dev` starts only the common watch build;
|
|
140
|
+
`pnpm link:consumers` and `pnpm unlink:consumers` can be run independently.
|
|
141
|
+
The helper expects `openma-common`, `openma-desktop`, and
|
|
142
|
+
`open-managed-agents` to be siblings. It swaps only each consumer's
|
|
143
|
+
`node_modules/@openma/common` symlink (including the two ACP wrapper packages)
|
|
144
|
+
and never edits a manifest or lockfile.
|
|
145
|
+
|
|
146
|
+
## Change lifecycle
|
|
147
|
+
|
|
148
|
+
1. Add or update tests here before implementation.
|
|
149
|
+
2. Run `pnpm verify`.
|
|
150
|
+
3. Link the package locally and verify both consumers.
|
|
151
|
+
4. Merge the common change, bump `version`, then create an immutable `vX.Y.Z` tag.
|
|
152
|
+
5. Update each consumer's Git ref and lockfile in an ordinary reviewed PR.
|
|
153
|
+
|
|
154
|
+
Compatibility policy:
|
|
155
|
+
|
|
156
|
+
- patch: fixes or additive fields that do not change existing output;
|
|
157
|
+
- minor: new tokens, exports, normalized event variants, or optional behavior;
|
|
158
|
+
- major: removed/renamed tokens, exports, types, or changed reducer semantics.
|
|
159
|
+
|
|
160
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for the release checklist.
|
|
161
|
+
|
|
162
|
+
## Shared local runtime
|
|
163
|
+
|
|
164
|
+
`@openma/common/local-runtime` owns the host-neutral ACP session execution loop,
|
|
165
|
+
checkpoints, daemon connection state and graceful shutdown. CLI and desktop
|
|
166
|
+
adapters provide process spawning, persistence, directory authorization, logging
|
|
167
|
+
and UI. Sharing this code does not give an observer ownership of another process.
|
|
168
|
+
|
|
169
|
+
`@openma/common/managed-runtime` owns the Managed Agents Work lease lifecycle,
|
|
170
|
+
Session HTTP control channel, ACP event projection and semantic recovery. These
|
|
171
|
+
modules use scoped Work credentials and the canonical `/v1/sessions` API. The
|
|
172
|
+
legacy reverse-WebSocket connection remains separate for existing installations;
|
|
173
|
+
importing this package alone does not migrate a daemon to the Work protocol.
|
|
174
|
+
|
|
175
|
+
The runtime modules were extracted from open-managed-agents `af45e233` with their
|
|
176
|
+
behavioral tests. Product adapters must depend on these exports rather than copy
|
|
177
|
+
source snapshots. The package does not install services, select a tenant, or
|
|
178
|
+
start a daemon on import.
|
|
179
|
+
|
|
180
|
+
## Public website design
|
|
181
|
+
|
|
182
|
+
Import `@openma/common/brand/website.css` for the Backchat-led marketing theme.
|
|
183
|
+
It supplies `--site-*` colors, Geist/monospace stacks, 1180px content width,
|
|
184
|
+
10px controls, 14px panels and 160ms transitions. Both public websites consume
|
|
185
|
+
these values; app and Console themes continue using `brand/tokens.css`.
|
|
186
|
+
|
|
187
|
+
Use `data-site-theme="light"` or `"dark"` for explicit selection; otherwise
|
|
188
|
+
the palette follows the OS. Keep editorial content and product components in
|
|
189
|
+
the consuming site. Use coral for the primary action, neutral bordered
|
|
190
|
+
secondary actions, sans-serif headings, thin separators and generous sections.
|
|
191
|
+
|
|
192
|
+
## Versioned ACP artifacts
|
|
193
|
+
|
|
194
|
+
`@openma/common/acp-artifacts` prepares published ACP harnesses independently of
|
|
195
|
+
the environment image. Execution still uses the existing shared ACP runtime.
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
const release = await resolveAcpRelease(
|
|
199
|
+
{ id: "goose", version: "1.50.0" },
|
|
200
|
+
{ type: "registry" },
|
|
201
|
+
);
|
|
202
|
+
// Persist the complete release with the Session before preparing/launching it.
|
|
203
|
+
const prepared = await prepareAcpRelease(release, { root: "/tmp/acp-artifacts", signal });
|
|
204
|
+
// Give command, args and env to the existing ACP runtime.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Supported sources:
|
|
208
|
+
|
|
209
|
+
| Source | Resolution and preparation |
|
|
210
|
+
| --- | --- |
|
|
211
|
+
| `npm` / `npx` | Exact npm version and SHA-512 tarball integrity; isolated local install |
|
|
212
|
+
| `uvx` | Exact PyPI version and artifact SHA-256 hashes; relocatable uv virtual environment |
|
|
213
|
+
| `registry` | Official ACP `agent.json`, including exact historical/preview releases; binary → npx → uvx preference |
|
|
214
|
+
| Binary manifest | Platform-specific archive/command from an ACP manifest; SHA-256 verified before extraction |
|
|
215
|
+
|
|
216
|
+
`parseAcpReleaseSource()` accepts npm package strings for compatibility, or typed
|
|
217
|
+
sources such as `{ type: "uvx", package: "python-agent", command: "agent", python: "3.12" }`.
|
|
218
|
+
A registry source can set `preference: ["uvx", "npx", "binary"]`, or an operator's
|
|
219
|
+
HTTPS `manifestUrl` with `{id}` / `{version}` placeholders. Custom manifests must
|
|
220
|
+
identify the exact requested release. The public registry resolves historical
|
|
221
|
+
versions through GitHub file history; it never substitutes the current version.
|
|
222
|
+
The low-level `resolveNpmAcpRelease`, `resolveUvxAcpRelease` and
|
|
223
|
+
`resolveBinaryAcpRelease` APIs remain available for hosts with their own catalogs.
|
|
224
|
+
|
|
225
|
+
Binary formats: raw executable, zip, tar, tar.gz/tgz, tar.bz2/tbz2 and tar.xz/txz.
|
|
226
|
+
Platform selection follows ACP's OS/architecture keys. Paths are checked before
|
|
227
|
+
extraction; tar links and special files are rejected. Installer formats such as
|
|
228
|
+
dmg, pkg, deb, rpm and msi are not executable distributions. Published checksums
|
|
229
|
+
are verified. For an older registry entry without a checksum, the first HTTPS
|
|
230
|
+
download's SHA-256 is recorded and subsequent preparation verifies that digest;
|
|
231
|
+
this records content identity, rather than claiming publisher attestation.
|
|
232
|
+
|
|
233
|
+
All release records have a digest. `validateAcpRelease()` validates restored
|
|
234
|
+
records, and `acpReleaseMatchesSource()` checks that a Session's catalog binding
|
|
235
|
+
has not changed. Publication is atomic, failed preparation remains unlaunchable,
|
|
236
|
+
and different versions coexist. Caches are separated by OS/CPU; npm adds Node
|
|
237
|
+
ABI and uvx adds Python runtime/interpreter identity. Already-prepared artifacts
|
|
238
|
+
can be used offline. Registry-provided arguments and environment are preserved;
|
|
239
|
+
hosts must still remove their own control-plane secrets from the final agent
|
|
240
|
+
environment. Installer subprocesses receive only the minimal system environment.
|
|
241
|
+
|
|
242
|
+
npm installs accept an optional `nodePath` (any Node-compatible executable) and
|
|
243
|
+
`env` map; the installer runs the bundled `npm` CLI through that executable.
|
|
244
|
+
Hosts that embed Node (for example Electron) pass their executable and whatever
|
|
245
|
+
environment that runtime requires.
|
|
246
|
+
|
|
247
|
+
The host environment needs Node/npm for npm sources when `nodePath` is omitted,
|
|
248
|
+
uv plus a compatible Python interpreter for uvx, and bzip2/xz when those archive
|
|
249
|
+
formats are used. Python
|
|
250
|
+
interpreters may be provisioned with `uv python install`. uvx virtual environments
|
|
251
|
+
use `bin/python` on POSIX and `Scripts\python.exe` on Windows. uvx handles console
|
|
252
|
+
entry points and wheel-packaged scripts, verifies package ownership of the selected
|
|
253
|
+
executable, and keeps entry points valid when a completed virtual environment is published.
|
|
254
|
+
|
|
255
|
+
The release pins the top-level package/artifact. npm/uv resolve transitive
|
|
256
|
+
packages on first installation; identical dependency trees across independently
|
|
257
|
+
prepared sandboxes require bundled/shrinkwrapped or otherwise locked releases.
|
|
258
|
+
A native package may additionally require system libraries from its environment.
|
|
259
|
+
|
|
260
|
+
Artifact integration tests use actual npm/uv processes and local fixture
|
|
261
|
+
registries. Running `pnpm verify` requires uv, Python 3, gzip, bzip2, xz and OpenSSL.
|
|
262
|
+
Archive fixtures are built with the `tar` package. Product extraction uses that
|
|
263
|
+
package as well; it does not shell out to system tar.
|
|
264
|
+
|
|
265
|
+
Artifact installers retain `SSL_CERT_FILE`, `SSL_CERT_DIR` and
|
|
266
|
+
`NODE_EXTRA_CA_CERTS` from the sandbox so its trusted outbound-proxy CA remains
|
|
267
|
+
available. uv uses native TLS trust. Certificate verification stays enabled;
|
|
268
|
+
Work/model credentials and arbitrary host environment variables remain excluded.
|
|
269
|
+
|
|
270
|
+
## Managed ACP harness installation
|
|
271
|
+
|
|
272
|
+
The harness modules vend Backchat's ACP registry and installer into
|
|
273
|
+
`@openma/common` so Clash, Martty, and Backchat can share one implementation.
|
|
274
|
+
`loadRegistry()` merges the official CDN registry with `OVERLAY_AGENTS` (pi/dsh
|
|
275
|
+
npm overlays, featured metadata, and other curated entries). `detect()` /
|
|
276
|
+
`detectAll()` resolve commands from the managed bin directory or system PATH as
|
|
277
|
+
in Backchat.
|
|
278
|
+
|
|
279
|
+
Hosts that bundle their own Node pass `npmCommand`, `npmCommandArgs`, and
|
|
280
|
+
`npmEnv` into `installAcpRegistryAgent()` or `createAcpAgentSetupService()`.
|
|
281
|
+
`@openma/common/acp-artifacts` remains the low-level release resolver for
|
|
282
|
+
session-scoped artifact preparation; the harness installer uses registry
|
|
283
|
+
snapshots and npm shims the same way Backchat does.
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
import { loadRegistry, detect } from "@openma/common/acp-harnesses/registry";
|
|
287
|
+
import { installAcpRegistryAgent } from "@openma/common/acp-harnesses/installer";
|
|
288
|
+
import { createAcpAgentSetupService } from "@openma/common/acp-harnesses/agent-setup";
|
|
289
|
+
|
|
290
|
+
await loadRegistry({ cachePath: "/var/acp/.registry/official.json" });
|
|
291
|
+
const claude = await detect("claude-acp", { managedBinDirs: ["/var/acp/bin"] });
|
|
292
|
+
|
|
293
|
+
await installAcpRegistryAgent({
|
|
294
|
+
registryId: "codex-acp",
|
|
295
|
+
shimName: "openma-codex-acp",
|
|
296
|
+
binDir: "/var/acp/bin",
|
|
297
|
+
npmCommand: "/path/to/node",
|
|
298
|
+
npmCommandArgs: ["/path/to/npm-cli.js"],
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
const setup = createAcpAgentSetupService({
|
|
302
|
+
registryCachePath: "/var/acp/.registry/official.json",
|
|
303
|
+
acpBinDir: "/var/acp/bin",
|
|
304
|
+
acpInstallRoot: "/var/acp/install",
|
|
305
|
+
});
|
|
306
|
+
await setup.warmup();
|
|
307
|
+
await setup.installAgent("pi");
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Unattended runs and pinned installs
|
|
311
|
+
|
|
312
|
+
A host that runs a harness without a person at the keyboard (a benchmark trial,
|
|
313
|
+
a CI job) names the harness id and passes generic options. Flags and variable
|
|
314
|
+
names stay in the registry entry:
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
import { resolveKnownAgent } from "@openma/common/acp-harnesses/registry";
|
|
318
|
+
import { buildAcpHeadlessLaunch } from "@openma/common/acp-harnesses/headless-launch";
|
|
319
|
+
import {
|
|
320
|
+
acpLauncherInvocation,
|
|
321
|
+
installPinnedAcpHarness,
|
|
322
|
+
pinnedAcpHarnessPaths,
|
|
323
|
+
readAcpHarnessPinState,
|
|
324
|
+
} from "@openma/common/acp-harnesses/installer";
|
|
325
|
+
|
|
326
|
+
const entry = resolveKnownAgent("pi-acp")!;
|
|
327
|
+
const { commandPath, version, dependencies } = await installPinnedAcpHarness({ entry, binDir });
|
|
328
|
+
const { args, env, unsupported } = buildAcpHeadlessLaunch(entry, {
|
|
329
|
+
agentDir, // the agent's user-level configuration directory
|
|
330
|
+
sessionDir,
|
|
331
|
+
trustProject: true,
|
|
332
|
+
provider: "deepseek",
|
|
333
|
+
model: "deepseek-v4-pro",
|
|
334
|
+
thinkingLevel: "medium",
|
|
335
|
+
});
|
|
336
|
+
if (unsupported.length > 0) throw new Error(`cannot express: ${unsupported.join(", ")}`);
|
|
337
|
+
const { file, args: argv, windowsVerbatimArguments } = acpLauncherInvocation(commandPath, args);
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**Launch.** `unsupported` lists every requested option the launch does not
|
|
341
|
+
carry: one the recipe has no flag or variable for, and a `provider` or
|
|
342
|
+
`thinkingLevel` given without a `model` (both are written inside the model
|
|
343
|
+
value). A host that depends on an option, such as `agentDir` for isolation,
|
|
344
|
+
must stop when the list is not empty. An entry without a recipe throws.
|
|
345
|
+
|
|
346
|
+
**Pinned install.** `installPinnedAcpHarness` installs `entry.pinned`: the
|
|
347
|
+
adapter package at one exact version, with `entry.pinned.dependencies` written
|
|
348
|
+
as npm `overrides` in the install prefix and checked against what npm
|
|
349
|
+
installed. It fails when a pinned package is missing or at another version,
|
|
350
|
+
including when it reuses an existing install directory. The result carries
|
|
351
|
+
`version` and `dependencies` (the installed versions), which a host should
|
|
352
|
+
record with its run.
|
|
353
|
+
|
|
354
|
+
A pinned install never uses the product install's names. Its launcher is
|
|
355
|
+
`<shim>-pinned` (`openma-acp-pi-acp-pinned`) and its state is
|
|
356
|
+
`registry/<id>-pinned/` (`install.json` and the versioned prefix), from
|
|
357
|
+
`pinnedAcpHarnessPaths(entry, binDir)`. It can share a bin directory and
|
|
358
|
+
install root with a product install without either overwriting the other.
|
|
359
|
+
Hosts should still give benchmark installs a directory of their own.
|
|
360
|
+
|
|
361
|
+
`readAcpHarnessPinState({ entry, shimPath })` compares an existing pinned
|
|
362
|
+
install with the pins from local files only. It returns `null` for an entry
|
|
363
|
+
that pins nothing and throws, like the installer, for pins that are not exact
|
|
364
|
+
versions. Pins are applied in code-point order, so the install directory name
|
|
365
|
+
is the same on every machine.
|
|
366
|
+
|
|
367
|
+
`npmOverrides` on `installAcpRegistryAgent` applies to npm installs only. For
|
|
368
|
+
a harness that installs as a binary or through uvx on the current platform the
|
|
369
|
+
call throws instead of installing an unpinned agent.
|
|
370
|
+
|
|
371
|
+
**Windows.** The pinned launcher is a `.cmd` file
|
|
372
|
+
(`openma-acp-pi-acp-pinned.cmd`) that sets the entry's variables and calls the
|
|
373
|
+
package's `.cmd` bin. A `.cmd` file cannot be started by `CreateProcess`, so
|
|
374
|
+
start it with `acpLauncherInvocation(commandPath, args)`, which returns
|
|
375
|
+
`cmd.exe /d /s /c "<line>"` with `windowsVerbatimArguments` on Windows and the
|
|
376
|
+
launcher itself elsewhere. `npm` given as a bare name or a `.cmd` path runs
|
|
377
|
+
through `cmd.exe` the same way; an executable path such as a bundled
|
|
378
|
+
`node.exe` (`npmCommand` + `npmCommandArgs`) starts directly. The pinned
|
|
379
|
+
install tests run on `verify-windows`. Product installs
|
|
380
|
+
(`installAcpRegistryAgent`, `AcpAgentSetupService`) still write a POSIX shell
|
|
381
|
+
shim and still follow `registryDistribution` and npm's latest.
|
|
382
|
+
|
|
383
|
+
Only `pi-acp` has a recipe and pins today. The pins cover `@openma/pi-acp` and
|
|
384
|
+
the `@earendil-works/*` packages it resolves. Other transitive dependencies
|
|
385
|
+
still follow their own ranges. Update the pins in the same PR that moves the
|
|
386
|
+
adapter to a new Pi SDK.
|
|
387
|
+
|
|
388
|
+
## Coverage
|
|
389
|
+
|
|
390
|
+
`pnpm test:coverage` writes `coverage/lcov.info`. CI uploads it to Codecov,
|
|
391
|
+
and `codecov.yml` requires 100% coverage of the lines a pull request changes
|
|
392
|
+
(`patch` target). The project-wide number is informational.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ArtifactOptions } from "./shared.js";
|
|
2
|
+
export type BinaryFormat = "raw" | "zip" | "tar" | "tar.gz" | "tar.bz2" | "tar.xz";
|
|
3
|
+
export interface BinaryAcpRelease {
|
|
4
|
+
schema: "openma.acp.binary.v1";
|
|
5
|
+
id: string;
|
|
6
|
+
version: string;
|
|
7
|
+
platform: string;
|
|
8
|
+
archive: string;
|
|
9
|
+
sha256: string;
|
|
10
|
+
format: BinaryFormat;
|
|
11
|
+
command: string;
|
|
12
|
+
args: string[];
|
|
13
|
+
env: Record<string, string>;
|
|
14
|
+
digest: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BinaryAcpReleaseInput {
|
|
17
|
+
id: string;
|
|
18
|
+
version: string;
|
|
19
|
+
platform: string;
|
|
20
|
+
archive: string;
|
|
21
|
+
sha256: string;
|
|
22
|
+
format?: string;
|
|
23
|
+
command: string;
|
|
24
|
+
args?: string[];
|
|
25
|
+
env?: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
export declare function binaryFormat(address: string): BinaryFormat;
|
|
28
|
+
export declare function resolveBinaryAcpRelease(input: BinaryAcpReleaseInput): BinaryAcpRelease;
|
|
29
|
+
export declare function validateBinaryAcpRelease(value: unknown): BinaryAcpRelease;
|
|
30
|
+
export declare function prepareBinaryAcpRelease(input: BinaryAcpRelease, options: ArtifactOptions & {
|
|
31
|
+
root: string;
|
|
32
|
+
}): Promise<import("./shared.js").Launch & {
|
|
33
|
+
release: BinaryAcpRelease;
|
|
34
|
+
}>;
|
|
35
|
+
//# sourceMappingURL=binary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../src/acp-artifacts/binary.ts"],"names":[],"mappings":"AAQA,OAAO,EAAkH,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnK,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACnF,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IACvE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAC7D;AACD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjF;AACD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAS1D;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CAWtF;AACD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAMzE;AACD,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;;GAiDjH"}
|