@tpsdev-ai/cli 0.1.0 → 0.2.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/dist/bin/tps.js +154 -7
- package/dist/bin/tps.js.map +1 -1
- package/dist/src/commands/backup.d.ts +19 -0
- package/dist/src/commands/backup.d.ts.map +1 -0
- package/dist/src/commands/backup.js +595 -0
- package/dist/src/commands/backup.js.map +1 -0
- package/dist/src/commands/bootstrap.d.ts +7 -0
- package/dist/src/commands/bootstrap.d.ts.map +1 -0
- package/dist/src/commands/bootstrap.js +255 -0
- package/dist/src/commands/bootstrap.js.map +1 -0
- package/dist/src/commands/git.d.ts +8 -0
- package/dist/src/commands/git.d.ts.map +1 -0
- package/dist/src/commands/git.js +53 -0
- package/dist/src/commands/git.js.map +1 -0
- package/dist/src/commands/identity.d.ts +1 -1
- package/dist/src/commands/identity.d.ts.map +1 -1
- package/dist/src/commands/identity.js +6 -6
- package/dist/src/commands/identity.js.map +1 -1
- package/dist/src/commands/mail.d.ts +1 -1
- package/dist/src/commands/mail.d.ts.map +1 -1
- package/dist/src/commands/mail.js +33 -7
- package/dist/src/commands/mail.js.map +1 -1
- package/dist/src/commands/office-manager.d.ts +147 -0
- package/dist/src/commands/office-manager.d.ts.map +1 -0
- package/dist/src/commands/office-manager.js +171 -0
- package/dist/src/commands/office-manager.js.map +1 -0
- package/dist/src/commands/office.d.ts +4 -11
- package/dist/src/commands/office.d.ts.map +1 -1
- package/dist/src/commands/office.js +266 -384
- package/dist/src/commands/office.js.map +1 -1
- package/dist/src/commands/secrets.d.ts +9 -0
- package/dist/src/commands/secrets.d.ts.map +1 -0
- package/dist/src/commands/secrets.js +54 -0
- package/dist/src/commands/secrets.js.map +1 -0
- package/dist/src/commands/status.d.ts +33 -0
- package/dist/src/commands/status.d.ts.map +1 -0
- package/dist/src/commands/status.js +407 -0
- package/dist/src/commands/status.js.map +1 -0
- package/dist/src/generators/brief.d.ts +6 -0
- package/dist/src/generators/brief.d.ts.map +1 -0
- package/dist/src/generators/brief.js +33 -0
- package/dist/src/generators/brief.js.map +1 -0
- package/dist/src/generators/claude-code.d.ts +1 -0
- package/dist/src/generators/claude-code.d.ts.map +1 -1
- package/dist/src/generators/claude-code.js +5 -0
- package/dist/src/generators/claude-code.js.map +1 -1
- package/dist/src/generators/codex.d.ts +1 -0
- package/dist/src/generators/codex.d.ts.map +1 -1
- package/dist/src/generators/codex.js +5 -0
- package/dist/src/generators/codex.js.map +1 -1
- package/dist/src/generators/openclaw.d.ts.map +1 -1
- package/dist/src/generators/openclaw.js +4 -0
- package/dist/src/generators/openclaw.js.map +1 -1
- package/dist/src/schema/manifest.d.ts +191 -44
- package/dist/src/schema/manifest.d.ts.map +1 -1
- package/dist/src/schema/manifest.js +58 -55
- package/dist/src/schema/manifest.js.map +1 -1
- package/dist/src/schema/sanitizer.d.ts.map +1 -1
- package/dist/src/schema/sanitizer.js +3 -1
- package/dist/src/schema/sanitizer.js.map +1 -1
- package/dist/src/utils/agent-info.js +1 -1
- package/dist/src/utils/agent-info.js.map +1 -1
- package/dist/src/utils/archive.d.ts +2 -9
- package/dist/src/utils/archive.d.ts.map +1 -1
- package/dist/src/utils/archive.js +90 -62
- package/dist/src/utils/archive.js.map +1 -1
- package/dist/src/utils/identity.d.ts +13 -3
- package/dist/src/utils/identity.d.ts.map +1 -1
- package/dist/src/utils/identity.js +109 -16
- package/dist/src/utils/identity.js.map +1 -1
- package/dist/src/utils/mail-handler.js +2 -2
- package/dist/src/utils/mail-handler.js.map +1 -1
- package/dist/src/utils/manifest.d.ts.map +1 -1
- package/dist/src/utils/manifest.js +17 -14
- package/dist/src/utils/manifest.js.map +1 -1
- package/dist/src/utils/noise-ik-transport.js +1 -1
- package/dist/src/utils/noise-ik-transport.js.map +1 -1
- package/dist/src/utils/nono.d.ts +1 -1
- package/dist/src/utils/nono.d.ts.map +1 -1
- package/dist/src/utils/nono.js.map +1 -1
- package/dist/src/utils/plain-tcp-transport.js +1 -1
- package/dist/src/utils/plain-tcp-transport.js.map +1 -1
- package/dist/src/utils/provision.d.ts.map +1 -1
- package/dist/src/utils/provision.js +8 -1
- package/dist/src/utils/provision.js.map +1 -1
- package/dist/src/utils/relay.js +4 -4
- package/dist/src/utils/relay.js.map +1 -1
- package/dist/src/utils/vault.d.ts +21 -0
- package/dist/src/utils/vault.d.ts.map +1 -0
- package/dist/src/utils/vault.js +67 -0
- package/dist/src/utils/vault.js.map +1 -0
- package/dist/src/utils/workspace.d.ts +14 -0
- package/dist/src/utils/workspace.d.ts.map +1 -0
- package/dist/src/utils/workspace.js +53 -0
- package/dist/src/utils/workspace.js.map +1 -0
- package/dist/src/utils/ws-noise-transport.js +2 -2
- package/dist/src/utils/ws-noise-transport.js.map +1 -1
- package/nono-profiles/tps-backup.toml +18 -0
- package/nono-profiles/tps-bootstrap.toml +20 -0
- package/nono-profiles/tps-office-manager.toml +21 -0
- package/nono-profiles/tps-restore.toml +18 -0
- package/nono-profiles/tps-status.toml +19 -0
- package/package.json +7 -27
- package/LICENSE +0 -201
- package/README.md +0 -79
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { sanitizeIdentifier } from "../schema/sanitizer.js";
|
|
5
|
+
/**
|
|
6
|
+
* Get the root directory where branch-office workspaces are stored.
|
|
7
|
+
*/
|
|
8
|
+
export function branchRoot() {
|
|
9
|
+
return join(process.env.HOME || homedir(), ".tps", "branch-office");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolves the logical team ID for an agent. If the agent is part of a team,
|
|
13
|
+
* returns the team's ID. If standalone, returns the agent's ID.
|
|
14
|
+
*/
|
|
15
|
+
export function resolveTeamId(agentId) {
|
|
16
|
+
const safeId = sanitizeIdentifier(agentId);
|
|
17
|
+
const root = branchRoot();
|
|
18
|
+
const teamPath = join(root, safeId);
|
|
19
|
+
const teamSidecar = join(teamPath, "team.json");
|
|
20
|
+
if (existsSync(teamSidecar)) {
|
|
21
|
+
return safeId; // The provided ID is already a team
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const teams = readdirSync(root).filter((d) => {
|
|
25
|
+
return existsSync(join(root, d, "team.json"));
|
|
26
|
+
});
|
|
27
|
+
for (const team of teams) {
|
|
28
|
+
const sidecarPath = join(root, team, "team.json");
|
|
29
|
+
const sidecar = JSON.parse(readFileSync(sidecarPath, "utf-8"));
|
|
30
|
+
// Note: team.json uses 'members' for agent IDs
|
|
31
|
+
if (Array.isArray(sidecar.members) && sidecar.members.includes(safeId)) {
|
|
32
|
+
return team; // Agent is a member of this team
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// Fallback
|
|
38
|
+
}
|
|
39
|
+
return safeId; // Standalone agent
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Resolve the workspace path for an agent, accounting for team sidecars.
|
|
43
|
+
*/
|
|
44
|
+
export function workspacePath(agentId) {
|
|
45
|
+
const teamId = resolveTeamId(agentId);
|
|
46
|
+
const teamPath = join(branchRoot(), teamId);
|
|
47
|
+
// If it's a team directory, the actual workspace is in /workspace
|
|
48
|
+
if (existsSync(join(teamPath, "team.json"))) {
|
|
49
|
+
return join(teamPath, "workspace");
|
|
50
|
+
}
|
|
51
|
+
return teamPath;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../src/utils/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,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,CAAC;IAAC,MAAM,CAAC;QACP,WAAW;IACb,CAAC;IAED,OAAO,MAAM,CAAC,CAAC,mBAAmB;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAC;IAE5C,kEAAkE;IAClE,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { WebSocketServer, WebSocket } from "ws";
|
|
|
4
4
|
import Noise from "noise-handshake/noise.js";
|
|
5
5
|
import Cipher from "noise-handshake/cipher.js";
|
|
6
6
|
import { decodeWireMessage, encodeWireMessage } from "./wire-frame.js";
|
|
7
|
-
import { fingerprint, lookupBranch } from "./identity.js";
|
|
7
|
+
import { fingerprint, loadHostIdentity, lookupBranch } from "./identity.js";
|
|
8
8
|
import { JoinCompleteBodySchema, MSG_JOIN_COMPLETE } from "./wire-mail.js";
|
|
9
9
|
import { handleGithubWebhook } from "./github-webhook.js";
|
|
10
10
|
const PROLOGUE = Buffer.from("tps-v1");
|
|
@@ -139,7 +139,7 @@ export class WsNoiseTransport {
|
|
|
139
139
|
this.hostKeyPair = hostKeyPair;
|
|
140
140
|
}
|
|
141
141
|
async listen(port) {
|
|
142
|
-
const host = this.hostKeyPair ??
|
|
142
|
+
const host = this.hostKeyPair ?? await loadHostIdentity();
|
|
143
143
|
const httpServer = createServer((_req, res) => {
|
|
144
144
|
res.statusCode = 404;
|
|
145
145
|
res.end();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-noise-transport.js","sourceRoot":"","sources":["../../../src/ut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EAAE,EAAE;YACpC,GAAG,CAAC,KAAK,EAAE,CAAC;YACZ,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[meta]
|
|
2
|
+
name = "tps-backup"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Backup agent workspace for portability and recovery."
|
|
5
|
+
|
|
6
|
+
[workdir]
|
|
7
|
+
access = "readwrite"
|
|
8
|
+
|
|
9
|
+
[filesystem]
|
|
10
|
+
paths = [
|
|
11
|
+
{ path = "/workspace", access = "readwrite" },
|
|
12
|
+
{ path = "/tmp", access = "readwrite" },
|
|
13
|
+
{ path = "/home", access = "readwrite" }
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[network]
|
|
17
|
+
# Backup creation stays local.
|
|
18
|
+
block = true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[meta]
|
|
2
|
+
name = "tps-bootstrap"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Bootstrap protocol checks and health verification."
|
|
5
|
+
|
|
6
|
+
[workdir]
|
|
7
|
+
access = "readwrite"
|
|
8
|
+
|
|
9
|
+
[filesystem]
|
|
10
|
+
# Workspace write access for generated files and health checks
|
|
11
|
+
paths = [
|
|
12
|
+
{ path = "/workspace", access = "readwrite" },
|
|
13
|
+
{ path = "/tmp", access = "readwrite" },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
# Restrict network to local gateway verification only.
|
|
17
|
+
[network]
|
|
18
|
+
block = false
|
|
19
|
+
# NOTE: nono parser expects allowlist entries in policy tests; keep explicit local host scope.
|
|
20
|
+
allow = ["127.0.0.1"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[meta]
|
|
2
|
+
name = "tps-office-manager"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "tps office manager — installs dependencies and tools."
|
|
5
|
+
|
|
6
|
+
[workdir]
|
|
7
|
+
access = "readwrite"
|
|
8
|
+
|
|
9
|
+
[filesystem]
|
|
10
|
+
# Allow read/write to system binary and package directories to install tools
|
|
11
|
+
paths = [
|
|
12
|
+
{ path = "/usr/local/bin", access = "readwrite" },
|
|
13
|
+
{ path = "/usr/bin", access = "readwrite" },
|
|
14
|
+
{ path = "/usr/lib/node_modules", access = "readwrite" },
|
|
15
|
+
{ path = "/var/cache/apk", access = "readwrite" },
|
|
16
|
+
{ path = "/lib/apk", access = "readwrite" },
|
|
17
|
+
{ path = "/etc/apk", access = "readwrite" }
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[network]
|
|
21
|
+
block = false # Must allow network to download packages
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[meta]
|
|
2
|
+
name = "tps-restore"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Restore agent workspace and run post-restore health check."
|
|
5
|
+
|
|
6
|
+
[workdir]
|
|
7
|
+
access = "readwrite"
|
|
8
|
+
|
|
9
|
+
[filesystem]
|
|
10
|
+
paths = [
|
|
11
|
+
{ path = "/tmp", access = "readwrite" },
|
|
12
|
+
{ path = "/home", access = "readwrite" }
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[network]
|
|
16
|
+
# Health checks may hit local gateway.
|
|
17
|
+
block = false
|
|
18
|
+
allow = ["127.0.0.1", "localhost"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[meta]
|
|
2
|
+
name = "tps-status"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Agent status/heartbeat updates and dashboard reads for sandbox-safe host reporting."
|
|
5
|
+
|
|
6
|
+
[workdir]
|
|
7
|
+
access = "readwrite"
|
|
8
|
+
|
|
9
|
+
[filesystem]
|
|
10
|
+
paths = [
|
|
11
|
+
{ path = "/workspace", access = "readwrite" },
|
|
12
|
+
{ path = "$HOME/.tps/status/nodes/$TPS_AGENT_ID", access = "readwrite" },
|
|
13
|
+
{ path = "$HOME/.tps/status/archive", access = "write" }
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[network]
|
|
17
|
+
# Status collection may read local gateway/ping only.
|
|
18
|
+
block = false
|
|
19
|
+
allow = ["127.0.0.1", "localhost"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpsdev-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "TPS Report CLI — because every agent needs the proper paperwork.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,21 +14,15 @@
|
|
|
14
14
|
"lint": "biome lint ./src ./bin",
|
|
15
15
|
"lint:ci": "biome lint ./src ./bin --max-diagnostics=200",
|
|
16
16
|
"pretest": "tsc",
|
|
17
|
-
"test": "bun test"
|
|
18
|
-
"test:unit": "bun test --filter unit",
|
|
19
|
-
"test:integration": "docker compose run --rm test"
|
|
17
|
+
"test": "bun test"
|
|
20
18
|
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"cli",
|
|
23
|
-
"agents",
|
|
24
|
-
"openclaw",
|
|
25
|
-
"tps"
|
|
26
|
-
],
|
|
19
|
+
"keywords": ["cli", "agents", "openclaw", "tps"],
|
|
27
20
|
"license": "Apache-2.0",
|
|
28
21
|
"dependencies": {
|
|
29
22
|
"@noble/curves": "^2.0.1",
|
|
30
23
|
"@noble/ed25519": "^3.0.0",
|
|
31
24
|
"@noble/hashes": "^2.0.1",
|
|
25
|
+
"@node-rs/argon2": "^2.0.2",
|
|
32
26
|
"@types/ws": "^8.18.1",
|
|
33
27
|
"handlebars": "^4.7.8",
|
|
34
28
|
"ink": "^5.2.0",
|
|
@@ -45,24 +39,10 @@
|
|
|
45
39
|
"@types/js-yaml": "^4.0.9",
|
|
46
40
|
"@types/node": "^22.0.0",
|
|
47
41
|
"@types/react": "^18.3.0",
|
|
42
|
+
"fast-check": "^4.5.3",
|
|
48
43
|
"typescript": "^5.7.0"
|
|
49
44
|
},
|
|
50
|
-
"
|
|
51
|
-
"type": "git",
|
|
52
|
-
"url": "git+https://github.com/tpsdev-ai/cli.git"
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://github.com/tpsdev-ai/cli#readme",
|
|
55
|
-
"bugs": {
|
|
56
|
-
"url": "https://github.com/tpsdev-ai/cli/issues"
|
|
57
|
-
},
|
|
58
|
-
"files": [
|
|
59
|
-
"dist",
|
|
60
|
-
"nono-profiles",
|
|
61
|
-
"personas",
|
|
62
|
-
"reports"
|
|
63
|
-
],
|
|
45
|
+
"files": ["dist", "nono-profiles", "personas", "reports"],
|
|
64
46
|
"author": "tpsdev-ai",
|
|
65
|
-
"publishConfig": {
|
|
66
|
-
"access": "public"
|
|
67
|
-
}
|
|
47
|
+
"publishConfig": { "access": "public" }
|
|
68
48
|
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
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 reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and 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 Additional Liability. 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 additional liability.
|
|
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 [yyyy] [name of copyright owner]
|
|
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.
|
package/README.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# TPS (Team Provisioning System)
|
|
2
|
-
|
|
3
|
-
> "Yeah... I'm gonna need you to go ahead and come in on Saturday. We lost some people this week and we need to sort of play catch-up."
|
|
4
|
-
|
|
5
|
-
**TPS is an Agent OS CLI for managing isolated AI agents in remote branch offices.** It provides the secure primitives for agents to exist, discover each other, communicate asynchronously, and run in isolated environments (Docker sandboxes or remote VMs).
|
|
6
|
-
|
|
7
|
-
If you want your AI agents to stop stepping on each other's toes and actually get some work done, you're going to need them to file their TPS reports.
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
## Why TPS?
|
|
12
|
-
|
|
13
|
-
Most agent frameworks assume all agents run in the same memory space. TPS assumes agents are employees: they work in different offices, they have different security clearances, and they communicate via mail.
|
|
14
|
-
|
|
15
|
-
- **The Branch Office**: Agents run in secure, remote sandboxes (VMs or Docker). Host keys never leave the host.
|
|
16
|
-
- **The Mailroom**: Async, persistent, cross-boundary messaging.
|
|
17
|
-
- **Wire Security**: All traffic over `wss://` is E2E encrypted and mutually authenticated using the **Noise_IK** protocol.
|
|
18
|
-
- **The TPS Report**: One `tps.yaml` file defines an agent's identity, capabilities, and mail handlers.
|
|
19
|
-
|
|
20
|
-
> "I have eight different bosses right now. So that means that when I make a mistake, I have eight different people coming by to tell me about it." — Make your agents communicate through a single, auditable mail interface instead.
|
|
21
|
-
|
|
22
|
-
## Quickstart
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
# 1. Install
|
|
26
|
-
npm install -g @tpsdev-ai/cli
|
|
27
|
-
|
|
28
|
-
# 2. Init your host identity
|
|
29
|
-
tps identity init
|
|
30
|
-
|
|
31
|
-
# 3. Create a branch office on a remote VM
|
|
32
|
-
# (On the VM)
|
|
33
|
-
npm install -g @tpsdev-ai/cli
|
|
34
|
-
tps branch init --listen 6458 --host my-vm.example.com
|
|
35
|
-
|
|
36
|
-
# 4. Join the branch office
|
|
37
|
-
# (On your host)
|
|
38
|
-
tps office join my-vm "tps://join?host=my-vm.example.com..."
|
|
39
|
-
|
|
40
|
-
# 5. Connect the persistent relay
|
|
41
|
-
tps office connect my-vm &
|
|
42
|
-
|
|
43
|
-
# 6. Send a memo
|
|
44
|
-
tps mail send my-vm "Did you get the memo about the TPS reports?"
|
|
45
|
-
|
|
46
|
-
# 7. Check the branch status
|
|
47
|
-
tps mail send my-vm "status"
|
|
48
|
-
tps mail check
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## The Three-Channel Model
|
|
52
|
-
|
|
53
|
-
Agents shouldn't do everything over a single chat thread. TPS enforces:
|
|
54
|
-
1. **Mail** for messages (commands, status, notifications).
|
|
55
|
-
2. **Git** for artifacts (code, specs, docs).
|
|
56
|
-
3. **APIs** for external data.
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
## Plugins & Handlers
|
|
61
|
-
|
|
62
|
-
Agents can declare `mailHandlers` in their `tps.yaml` manifest. The TPS branch daemon will automatically route incoming mail to the right handler based on regex patterns or sender allowlists.
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
name: deploy-bot
|
|
66
|
-
capabilities:
|
|
67
|
-
mail_handler:
|
|
68
|
-
exec: ./handler.sh
|
|
69
|
-
match:
|
|
70
|
-
bodyPattern: "^(deploy|status)"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Architecture
|
|
74
|
-
|
|
75
|
-
Read [ARCHITECTURE.md](ARCHITECTURE.md) for details on the Noise_IK implementation, hub-and-spoke topology, and security boundaries.
|
|
76
|
-
|
|
77
|
-
## License
|
|
78
|
-
|
|
79
|
-
Apache 2.0
|