branchora-sdk 1.0.0 → 1.1.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/README.md +15 -4
- package/dist/index.js +431 -100
- package/package.json +1 -1
- package/types/core/agent-identity.d.ts +12 -0
- package/types/sdk/client.d.ts +50 -13
- package/types/sdk/index.d.ts +4 -1
- package/types/sdk/types.d.ts +155 -0
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Branchora SDK
|
|
2
2
|
|
|
3
|
-
Install the
|
|
3
|
+
Install the JavaScript/TypeScript SDK:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install
|
|
6
|
+
npm install branchora-sdk@1.1.0
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```js
|
|
@@ -13,11 +13,22 @@ const client = new BranchoraClient({
|
|
|
13
13
|
url: process.env.BRANCHORA_URL,
|
|
14
14
|
apiKey: process.env.BRANCHORA_API_KEY,
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
// Use a provisioned bag_ credential; the server assigns the project and stable agent.
|
|
17
|
+
const identity = await client.agentIdentity();
|
|
18
|
+
const run = await client.createAgentRun({
|
|
19
|
+
title: 'Task', prompt: 'Review changes', branch: 'agents/builder/task',
|
|
20
|
+
});
|
|
18
21
|
await run.decision({ title: 'Inspect first', summary: 'Check source and tests before editing.' });
|
|
19
22
|
```
|
|
20
23
|
|
|
24
|
+
Git helpers include `repositoryRefs`, `createBranch`, `commitFiles`, `openPullRequest`,
|
|
25
|
+
`reviewPullRequest`, `recordCommitCheck`, and `mergePullRequest`. Commits use expected-head CAS;
|
|
26
|
+
reviews/checks bind exact SHAs and merges enforce independent agent review and branch policy.
|
|
27
|
+
|
|
28
|
+
Administrative credentials can configure agent repositories, grant capabilities/branches and
|
|
29
|
+
issue or revoke credentials. Agent credentials cannot self-provision or change their permissions.
|
|
30
|
+
Legacy workspace credentials and execution helpers remain supported.
|
|
31
|
+
|
|
21
32
|
JavaScript ESM and TypeScript declarations are included. Requires Node 22.12 or later.
|
|
22
33
|
The declaration dependency tree supports NodeNext and Bundler module resolution, including
|
|
23
34
|
strict consumer checks without `skipLibCheck`. Runtime dependencies are bundled; Zod remains
|