@allocator-one/infraone 0.0.0-stage → 1.17.1
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 +21 -0
- package/README.md +77 -2
- package/dist/chunk-5THYIKLW.js +95 -0
- package/dist/chunk-67NX7MJ2.js +563 -0
- package/dist/chunk-BHBEIT5I.js +1348 -0
- package/dist/chunk-CEEQW6ZV.js +3793 -0
- package/dist/chunk-WSDFLMO6.js +717 -0
- package/dist/chunk-XA5UDNJI.js +1448 -0
- package/dist/cli.js +3504 -0
- package/dist/infraone-7TAHY4RN.js +593 -0
- package/dist/infraone-SLZXBJCV.js +22133 -0
- package/dist/infraone.js +372 -0
- package/dist/login-page-MFHNVTUV.js +299 -0
- package/dist/server-TRXBTJSA.js +1080 -0
- package/package.json +27 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 allocator.one
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @allocator-one/infraone
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `infraone` CLI: what you can do in [Infra One](https://venture.infra.one),
|
|
4
|
+
from a terminal or a script, with exactly your app rights. It starts with your
|
|
5
|
+
data rooms.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
With npm (Node 20 or later):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm i -g @allocator-one/infraone
|
|
13
|
+
infraone --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or run it without installing:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npx -y @allocator-one/infraone --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With Homebrew, on macOS or Linux:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
brew install allocator-one/tap/infraone
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
As a single binary for macOS or Linux, with no Node needed. The script
|
|
29
|
+
downloads the binary for your machine, checks its SHA-256 checksum, and installs
|
|
30
|
+
it in `~/.local/bin` (set `INFRAONE_INSTALL_DIR` to choose another folder):
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
curl -fsSL https://github.com/allocator-one/homebrew-tap/releases/latest/download/install.sh | sh
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Sign in
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
infraone login
|
|
40
|
+
infraone whoami
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`infraone login` opens Infra One in your browser. You choose the organization
|
|
44
|
+
there, and the CLI stores a credential for it that lasts 30 days. Every command
|
|
45
|
+
then acts as you, in that organization, with the rights you have in the app.
|
|
46
|
+
[Signing in](login.md) covers other organizations, scripts and signing out.
|
|
47
|
+
|
|
48
|
+
## Use it
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
infraone datarooms spaces list
|
|
52
|
+
infraone datarooms spaces list --type personal --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The commands come from the Infra One API, so `infraone --help` always lists
|
|
56
|
+
what the server offers, including commands added after this release. Every
|
|
57
|
+
command takes `--json`. Lists page with `--limit` and `--cursor`, and `--all`
|
|
58
|
+
follows every page. [The command reference](commands.md) lists the commands
|
|
59
|
+
this release knows about.
|
|
60
|
+
|
|
61
|
+
Deleting, revoking access, sharing outside Infra One and emailing people ask
|
|
62
|
+
you to confirm first; [confirmations](confirmations.md) explains how.
|
|
63
|
+
|
|
64
|
+
## AI clients
|
|
65
|
+
|
|
66
|
+
Connect Claude, or any MCP client, to the hosted Infra One MCP at
|
|
67
|
+
`https://mcp.infra.one/mcp`. [Infra One MCP](mcp.md) shows how.
|
|
68
|
+
|
|
69
|
+
## Exit codes
|
|
70
|
+
|
|
71
|
+
| Code | Meaning |
|
|
72
|
+
|---|---|
|
|
73
|
+
| 0 | Done |
|
|
74
|
+
| 1 | The API refused or failed the request |
|
|
75
|
+
| 2 | The command line was wrong, or a confirmation was missing; nothing was sent |
|
|
76
|
+
| 3 | The API could not be reached |
|
|
77
|
+
|
|
78
|
+
stdout carries data only; messages go to stderr.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/version.ts
|
|
4
|
+
import { readFileSync } from "fs";
|
|
5
|
+
var pkg = JSON.parse(
|
|
6
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
|
7
|
+
);
|
|
8
|
+
var CLI_VERSION = pkg.version;
|
|
9
|
+
var CLI_PACKAGE = pkg.name;
|
|
10
|
+
|
|
11
|
+
// src/invocation.ts
|
|
12
|
+
import { basename } from "path";
|
|
13
|
+
var OPERATOR_PACKAGE = "@allocator-one/operator";
|
|
14
|
+
var INFRAONE_PACKAGE = "@allocator-one/infraone";
|
|
15
|
+
var PACKAGES = {
|
|
16
|
+
harness: "@allocator-one/harness-cli",
|
|
17
|
+
operator: OPERATOR_PACKAGE,
|
|
18
|
+
infraone: INFRAONE_PACKAGE
|
|
19
|
+
};
|
|
20
|
+
var operatorMount = false;
|
|
21
|
+
function mountOperatorUnderInfraone() {
|
|
22
|
+
operatorMount = true;
|
|
23
|
+
}
|
|
24
|
+
function operatorMounted() {
|
|
25
|
+
return operatorMount;
|
|
26
|
+
}
|
|
27
|
+
function invokedName(argv1 = process.argv[1], packageName = CLI_PACKAGE, infraoneBinary = typeof __INFRAONE_BINARY__ !== "undefined" && __INFRAONE_BINARY__ === true) {
|
|
28
|
+
if (operatorMount) return "operator";
|
|
29
|
+
if (infraoneBinary) return "infraone";
|
|
30
|
+
const typed = basename(argv1 ?? "").replace(/\.[cm]?js$/i, "").toLowerCase();
|
|
31
|
+
if (typed === "operator" || typed === "harness" || typed === "infraone") return typed;
|
|
32
|
+
if (packageName === OPERATOR_PACKAGE) return "operator";
|
|
33
|
+
return packageName === INFRAONE_PACKAGE ? "infraone" : "harness";
|
|
34
|
+
}
|
|
35
|
+
function named(text, name = invokedName()) {
|
|
36
|
+
if (name === "harness") return text;
|
|
37
|
+
if (name === "operator" && operatorMount) return mountedNamed(text);
|
|
38
|
+
return text.replace(/^harness: /gm, `${name}: `).replace(/(?<![\w@/.-])harness (?=[a-z])(?!disagree)/g, `${name} `).replaceAll(PACKAGES.harness, PACKAGES[name]);
|
|
39
|
+
}
|
|
40
|
+
function mountedNamed(text) {
|
|
41
|
+
return text.replace(/^(?:harness|operator): /gm, "infraone: ").replace(/(?<![\w@/.-])(?<!infraone )(?:harness|operator) (?=[a-z[<])(?!disagree)/g, "infraone operator ").replaceAll(PACKAGES.harness, INFRAONE_PACKAGE).replaceAll(OPERATOR_PACKAGE, INFRAONE_PACKAGE);
|
|
42
|
+
}
|
|
43
|
+
var OPERATOR_COMMANDS = [
|
|
44
|
+
"run",
|
|
45
|
+
"jobs",
|
|
46
|
+
"job",
|
|
47
|
+
"watch",
|
|
48
|
+
"steer",
|
|
49
|
+
"cancel",
|
|
50
|
+
"pause",
|
|
51
|
+
"continue",
|
|
52
|
+
"procedure",
|
|
53
|
+
"plan",
|
|
54
|
+
"gate",
|
|
55
|
+
"conditions",
|
|
56
|
+
"assignments",
|
|
57
|
+
"tools",
|
|
58
|
+
"tool",
|
|
59
|
+
"skills",
|
|
60
|
+
"mcp"
|
|
61
|
+
];
|
|
62
|
+
var GENERAL_COMMANDS = [
|
|
63
|
+
"login",
|
|
64
|
+
"logout",
|
|
65
|
+
"whoami",
|
|
66
|
+
"version",
|
|
67
|
+
"keys"
|
|
68
|
+
];
|
|
69
|
+
var OPERATOR_HEADING = "Operator:";
|
|
70
|
+
var ISSUES_HEADING = "Issues:";
|
|
71
|
+
var GENERAL_HEADING = "General:";
|
|
72
|
+
function layoutOperatorHelp(program) {
|
|
73
|
+
const rank = (name) => {
|
|
74
|
+
const operator = OPERATOR_COMMANDS.indexOf(name);
|
|
75
|
+
if (operator !== -1) return operator;
|
|
76
|
+
return GENERAL_COMMANDS.includes(name) ? 2 * OPERATOR_COMMANDS.length : OPERATOR_COMMANDS.length;
|
|
77
|
+
};
|
|
78
|
+
const heading = (name) => OPERATOR_COMMANDS.includes(name) ? OPERATOR_HEADING : GENERAL_COMMANDS.includes(name) ? GENERAL_HEADING : ISSUES_HEADING;
|
|
79
|
+
for (const command of program.commands) command.helpGroup(heading(command.name()));
|
|
80
|
+
program.commands.sort(
|
|
81
|
+
(left, right) => rank(left.name()) - rank(right.name())
|
|
82
|
+
);
|
|
83
|
+
program.commandsGroup(GENERAL_HEADING).helpCommand(true);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
CLI_VERSION,
|
|
88
|
+
CLI_PACKAGE,
|
|
89
|
+
OPERATOR_PACKAGE,
|
|
90
|
+
mountOperatorUnderInfraone,
|
|
91
|
+
operatorMounted,
|
|
92
|
+
invokedName,
|
|
93
|
+
named,
|
|
94
|
+
layoutOperatorHelp
|
|
95
|
+
};
|