martin-loop 0.1.2 → 0.1.3
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 +362 -344
- package/dist/bin/martin-loop.js +23 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +31 -0
- package/dist/vendor/adapters/claude-cli.d.ts +89 -0
- package/dist/vendor/adapters/claude-cli.js +555 -0
- package/dist/vendor/adapters/cli-bridge.d.ts +28 -0
- package/dist/vendor/adapters/cli-bridge.js +127 -0
- package/dist/vendor/adapters/direct-provider.d.ts +10 -0
- package/dist/vendor/adapters/direct-provider.js +41 -0
- package/dist/vendor/adapters/index.d.ts +5 -0
- package/dist/vendor/adapters/index.js +5 -0
- package/dist/vendor/adapters/runtime-support.d.ts +14 -0
- package/dist/vendor/adapters/runtime-support.js +52 -0
- package/dist/vendor/adapters/stub-agent-cli.d.ts +8 -0
- package/dist/vendor/adapters/stub-agent-cli.js +41 -0
- package/dist/vendor/adapters/stub-direct-provider.d.ts +8 -0
- package/dist/vendor/adapters/stub-direct-provider.js +10 -0
- package/dist/vendor/cli/bin/martin.d.ts +2 -0
- package/dist/vendor/cli/bin/martin.js +19 -0
- package/dist/vendor/cli/index.d.ts +39 -0
- package/dist/vendor/cli/index.js +634 -0
- package/dist/vendor/cli/persistence.d.ts +34 -0
- package/dist/vendor/cli/persistence.js +71 -0
- package/dist/vendor/contracts/governance.d.ts +21 -0
- package/dist/vendor/contracts/governance.js +12 -0
- package/dist/vendor/contracts/index.d.ts +330 -0
- package/dist/vendor/contracts/index.js +203 -0
- package/dist/vendor/core/compiler.d.ts +50 -0
- package/dist/vendor/core/compiler.js +47 -0
- package/dist/vendor/core/grounding.d.ts +37 -0
- package/dist/vendor/core/grounding.js +270 -0
- package/dist/vendor/core/index.d.ts +145 -0
- package/dist/vendor/core/index.js +1099 -0
- package/dist/vendor/core/leash.d.ts +48 -0
- package/dist/vendor/core/leash.js +408 -0
- package/dist/vendor/core/persistence/compiler.d.ts +18 -0
- package/dist/vendor/core/persistence/compiler.js +35 -0
- package/dist/vendor/core/persistence/index.d.ts +6 -0
- package/dist/vendor/core/persistence/index.js +4 -0
- package/dist/vendor/core/persistence/ledger.d.ts +23 -0
- package/dist/vendor/core/persistence/ledger.js +10 -0
- package/dist/vendor/core/persistence/store.d.ts +77 -0
- package/dist/vendor/core/persistence/store.js +84 -0
- package/dist/vendor/core/policy.d.ts +126 -0
- package/dist/vendor/core/policy.js +625 -0
- package/dist/vendor/core/rollback.d.ts +11 -0
- package/dist/vendor/core/rollback.js +219 -0
- package/docs/oss/EXAMPLES.md +126 -126
- package/docs/oss/OSS-BOUNDARY-REPORT.json +113 -113
- package/docs/oss/OSS-BOUNDARY-REPORT.md +48 -48
- package/docs/oss/QUICKSTART.md +135 -135
- package/docs/oss/README.md +93 -93
- package/docs/oss/RELEASE-SURFACE-REPORT.json +45 -45
- package/docs/oss/RELEASE-SURFACE-REPORT.md +35 -35
- package/package.json +56 -54
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
{
|
|
2
|
-
"generatedAt": "2026-04-
|
|
3
|
-
"verdict": "go",
|
|
4
|
-
"publicSurface": {
|
|
5
|
-
"packageName": "martin-loop",
|
|
6
|
-
"canonicalPackageManager": "npm",
|
|
7
|
-
"installCommand": "npm install martin-loop",
|
|
8
|
-
"npxCommand": "npx martin-loop",
|
|
9
|
-
"sdkImportPath": "martin-loop",
|
|
10
|
-
"supportsNpxCommand": true,
|
|
11
|
-
"supportsSdkImport": true
|
|
12
|
-
},
|
|
13
|
-
"ossCorePackages": [
|
|
14
|
-
{
|
|
15
|
-
"name": "@martin/contracts",
|
|
16
|
-
"path": "packages/contracts",
|
|
17
|
-
"private": true,
|
|
18
|
-
"publishAccess": null,
|
|
19
|
-
"workspaceDependencies": [],
|
|
20
|
-
"classification": "oss_core",
|
|
21
|
-
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "@martin/core",
|
|
25
|
-
"path": "packages/core",
|
|
26
|
-
"private": true,
|
|
27
|
-
"publishAccess": null,
|
|
28
|
-
"workspaceDependencies": [
|
|
29
|
-
"@martin/contracts"
|
|
30
|
-
],
|
|
31
|
-
"classification": "oss_core",
|
|
32
|
-
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "@martin/adapters",
|
|
36
|
-
"path": "packages/adapters",
|
|
37
|
-
"private": true,
|
|
38
|
-
"publishAccess": null,
|
|
39
|
-
"workspaceDependencies": [
|
|
40
|
-
"@martin/core"
|
|
41
|
-
],
|
|
42
|
-
"classification": "oss_core",
|
|
43
|
-
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "@martin/cli",
|
|
47
|
-
"path": "packages/cli",
|
|
48
|
-
"private": false,
|
|
49
|
-
"publishAccess": "public",
|
|
50
|
-
"workspaceDependencies": [
|
|
51
|
-
"@martin/adapters",
|
|
52
|
-
"@martin/contracts",
|
|
53
|
-
"@martin/core"
|
|
54
|
-
],
|
|
55
|
-
"classification": "oss_core",
|
|
56
|
-
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "@martin/mcp",
|
|
60
|
-
"path": "packages/mcp",
|
|
61
|
-
"private": false,
|
|
62
|
-
"publishAccess": "public",
|
|
63
|
-
"workspaceDependencies": [
|
|
64
|
-
"@martin/adapters",
|
|
65
|
-
"@martin/contracts",
|
|
66
|
-
"@martin/core"
|
|
67
|
-
],
|
|
68
|
-
"classification": "oss_core",
|
|
69
|
-
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"nonOssWorkspacePackages": [
|
|
73
|
-
{
|
|
74
|
-
"name": "@martin/control-plane",
|
|
75
|
-
"path": "apps/control-plane",
|
|
76
|
-
"private": true,
|
|
77
|
-
"publishAccess": null,
|
|
78
|
-
"workspaceDependencies": [
|
|
79
|
-
"@martin/contracts"
|
|
80
|
-
],
|
|
81
|
-
"classification": "non_oss_workspace",
|
|
82
|
-
"classificationReason": "Managed or RC-only workspace surface that stays out of the initial OSS boundary."
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "@martin/benchmarks",
|
|
86
|
-
"path": "benchmarks",
|
|
87
|
-
"private": true,
|
|
88
|
-
"publishAccess": null,
|
|
89
|
-
"workspaceDependencies": [
|
|
90
|
-
"@martin/adapters",
|
|
91
|
-
"@martin/contracts",
|
|
92
|
-
"@martin/core"
|
|
93
|
-
],
|
|
94
|
-
"classification": "non_oss_workspace",
|
|
95
|
-
"classificationReason": "Managed or RC-only workspace surface that stays out of the initial OSS boundary."
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"localOnlySurfaces": [
|
|
99
|
-
{
|
|
100
|
-
"path": "apps/local-dashboard",
|
|
101
|
-
"reason": "Local read-model viewer that is not yet packaged as a publishable OSS workspace."
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"dependencyLeaks": [],
|
|
105
|
-
"summary": {
|
|
106
|
-
"ossCoreCount": 5,
|
|
107
|
-
"nonOssWorkspaceCount": 2,
|
|
108
|
-
"localOnlySurfaceCount": 1,
|
|
109
|
-
"dependencyLeakCount": 0,
|
|
110
|
-
"privateOssCoreCount": 3,
|
|
111
|
-
"publishReadyOssCoreCount": 2
|
|
112
|
-
}
|
|
113
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"generatedAt": "2026-04-22T11:35:54.851Z",
|
|
3
|
+
"verdict": "go",
|
|
4
|
+
"publicSurface": {
|
|
5
|
+
"packageName": "martin-loop",
|
|
6
|
+
"canonicalPackageManager": "npm",
|
|
7
|
+
"installCommand": "npm install martin-loop",
|
|
8
|
+
"npxCommand": "npx martin-loop",
|
|
9
|
+
"sdkImportPath": "martin-loop",
|
|
10
|
+
"supportsNpxCommand": true,
|
|
11
|
+
"supportsSdkImport": true
|
|
12
|
+
},
|
|
13
|
+
"ossCorePackages": [
|
|
14
|
+
{
|
|
15
|
+
"name": "@martin/contracts",
|
|
16
|
+
"path": "packages/contracts",
|
|
17
|
+
"private": true,
|
|
18
|
+
"publishAccess": null,
|
|
19
|
+
"workspaceDependencies": [],
|
|
20
|
+
"classification": "oss_core",
|
|
21
|
+
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "@martin/core",
|
|
25
|
+
"path": "packages/core",
|
|
26
|
+
"private": true,
|
|
27
|
+
"publishAccess": null,
|
|
28
|
+
"workspaceDependencies": [
|
|
29
|
+
"@martin/contracts"
|
|
30
|
+
],
|
|
31
|
+
"classification": "oss_core",
|
|
32
|
+
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "@martin/adapters",
|
|
36
|
+
"path": "packages/adapters",
|
|
37
|
+
"private": true,
|
|
38
|
+
"publishAccess": null,
|
|
39
|
+
"workspaceDependencies": [
|
|
40
|
+
"@martin/core"
|
|
41
|
+
],
|
|
42
|
+
"classification": "oss_core",
|
|
43
|
+
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "@martin/cli",
|
|
47
|
+
"path": "packages/cli",
|
|
48
|
+
"private": false,
|
|
49
|
+
"publishAccess": "public",
|
|
50
|
+
"workspaceDependencies": [
|
|
51
|
+
"@martin/adapters",
|
|
52
|
+
"@martin/contracts",
|
|
53
|
+
"@martin/core"
|
|
54
|
+
],
|
|
55
|
+
"classification": "oss_core",
|
|
56
|
+
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "@martin/mcp",
|
|
60
|
+
"path": "packages/mcp",
|
|
61
|
+
"private": false,
|
|
62
|
+
"publishAccess": "public",
|
|
63
|
+
"workspaceDependencies": [
|
|
64
|
+
"@martin/adapters",
|
|
65
|
+
"@martin/contracts",
|
|
66
|
+
"@martin/core"
|
|
67
|
+
],
|
|
68
|
+
"classification": "oss_core",
|
|
69
|
+
"classificationReason": "Intended Phase 13 OSS core surface."
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"nonOssWorkspacePackages": [
|
|
73
|
+
{
|
|
74
|
+
"name": "@martin/control-plane",
|
|
75
|
+
"path": "apps/control-plane",
|
|
76
|
+
"private": true,
|
|
77
|
+
"publishAccess": null,
|
|
78
|
+
"workspaceDependencies": [
|
|
79
|
+
"@martin/contracts"
|
|
80
|
+
],
|
|
81
|
+
"classification": "non_oss_workspace",
|
|
82
|
+
"classificationReason": "Managed or RC-only workspace surface that stays out of the initial OSS boundary."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "@martin/benchmarks",
|
|
86
|
+
"path": "benchmarks",
|
|
87
|
+
"private": true,
|
|
88
|
+
"publishAccess": null,
|
|
89
|
+
"workspaceDependencies": [
|
|
90
|
+
"@martin/adapters",
|
|
91
|
+
"@martin/contracts",
|
|
92
|
+
"@martin/core"
|
|
93
|
+
],
|
|
94
|
+
"classification": "non_oss_workspace",
|
|
95
|
+
"classificationReason": "Managed or RC-only workspace surface that stays out of the initial OSS boundary."
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"localOnlySurfaces": [
|
|
99
|
+
{
|
|
100
|
+
"path": "apps/local-dashboard",
|
|
101
|
+
"reason": "Local read-model viewer that is not yet packaged as a publishable OSS workspace."
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"dependencyLeaks": [],
|
|
105
|
+
"summary": {
|
|
106
|
+
"ossCoreCount": 5,
|
|
107
|
+
"nonOssWorkspaceCount": 2,
|
|
108
|
+
"localOnlySurfaceCount": 1,
|
|
109
|
+
"dependencyLeakCount": 0,
|
|
110
|
+
"privateOssCoreCount": 3,
|
|
111
|
+
"publishReadyOssCoreCount": 2
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
# Martin Loop Phase 13 OSS Core Boundary
|
|
2
|
-
|
|
3
|
-
Generated: 2026-04-
|
|
4
|
-
|
|
5
|
-
## Verdict
|
|
6
|
-
**GO**
|
|
7
|
-
|
|
8
|
-
## Summary
|
|
9
|
-
- Public package target: martin-loop
|
|
10
|
-
- Canonical public package manager: npm
|
|
11
|
-
- Intended OSS core packages: 5
|
|
12
|
-
- Non-OSS workspace packages: 2
|
|
13
|
-
- Local-only surfaces: 1
|
|
14
|
-
- Private OSS-core packages still gated from publish: 3
|
|
15
|
-
- OSS-core packages already publish-configured: 2
|
|
16
|
-
- Dependency leaks: 0
|
|
17
|
-
- No workspace dependency leaks detected between the intended OSS core and the non-OSS workspace surfaces.
|
|
18
|
-
|
|
19
|
-
## Public Package Surface
|
|
20
|
-
- Install target: `npm install martin-loop`
|
|
21
|
-
- CLI target: `npx martin-loop`
|
|
22
|
-
- SDK target: `import { MartinLoop } from 'martin-loop'`
|
|
23
|
-
- Root `npx martin-loop` support shipped: yes
|
|
24
|
-
- Root SDK import shipped: yes
|
|
25
|
-
|
|
26
|
-
## Intended OSS Core Packages
|
|
27
|
-
| Package | Path | Private | Publish Access | Workspace Deps |
|
|
28
|
-
|---|---|---|---|---|
|
|
29
|
-
| @martin/contracts | packages/contracts | yes | n/a | none |
|
|
30
|
-
| @martin/core | packages/core | yes | n/a | @martin/contracts |
|
|
31
|
-
| @martin/adapters | packages/adapters | yes | n/a | @martin/core |
|
|
32
|
-
| @martin/cli | packages/cli | no | public | @martin/adapters, @martin/contracts, @martin/core |
|
|
33
|
-
| @martin/mcp | packages/mcp | no | public | @martin/adapters, @martin/contracts, @martin/core |
|
|
34
|
-
|
|
35
|
-
## Non-OSS Workspace Packages
|
|
36
|
-
| Package | Path | Reason |
|
|
37
|
-
|---|---|---|
|
|
38
|
-
| @martin/control-plane | apps/control-plane | Managed or RC-only workspace surface that stays out of the initial OSS boundary. |
|
|
39
|
-
| @martin/benchmarks | benchmarks | Managed or RC-only workspace surface that stays out of the initial OSS boundary. |
|
|
40
|
-
|
|
41
|
-
## Local-Only Surfaces
|
|
42
|
-
| Path | Reason |
|
|
43
|
-
|---|---|
|
|
44
|
-
| apps/local-dashboard | Local read-model viewer that is not yet packaged as a publishable OSS workspace. |
|
|
45
|
-
|
|
46
|
-
## Dependency Leak Review
|
|
47
|
-
- No workspace dependency leaks detected.
|
|
48
|
-
|
|
1
|
+
# Martin Loop Phase 13 OSS Core Boundary
|
|
2
|
+
|
|
3
|
+
Generated: 2026-04-22T11:35:54.851Z
|
|
4
|
+
|
|
5
|
+
## Verdict
|
|
6
|
+
**GO**
|
|
7
|
+
|
|
8
|
+
## Summary
|
|
9
|
+
- Public package target: martin-loop
|
|
10
|
+
- Canonical public package manager: npm
|
|
11
|
+
- Intended OSS core packages: 5
|
|
12
|
+
- Non-OSS workspace packages: 2
|
|
13
|
+
- Local-only surfaces: 1
|
|
14
|
+
- Private OSS-core packages still gated from publish: 3
|
|
15
|
+
- OSS-core packages already publish-configured: 2
|
|
16
|
+
- Dependency leaks: 0
|
|
17
|
+
- No workspace dependency leaks detected between the intended OSS core and the non-OSS workspace surfaces.
|
|
18
|
+
|
|
19
|
+
## Public Package Surface
|
|
20
|
+
- Install target: `npm install martin-loop`
|
|
21
|
+
- CLI target: `npx martin-loop`
|
|
22
|
+
- SDK target: `import { MartinLoop } from 'martin-loop'`
|
|
23
|
+
- Root `npx martin-loop` support shipped: yes
|
|
24
|
+
- Root SDK import shipped: yes
|
|
25
|
+
|
|
26
|
+
## Intended OSS Core Packages
|
|
27
|
+
| Package | Path | Private | Publish Access | Workspace Deps |
|
|
28
|
+
|---|---|---|---|---|
|
|
29
|
+
| @martin/contracts | packages/contracts | yes | n/a | none |
|
|
30
|
+
| @martin/core | packages/core | yes | n/a | @martin/contracts |
|
|
31
|
+
| @martin/adapters | packages/adapters | yes | n/a | @martin/core |
|
|
32
|
+
| @martin/cli | packages/cli | no | public | @martin/adapters, @martin/contracts, @martin/core |
|
|
33
|
+
| @martin/mcp | packages/mcp | no | public | @martin/adapters, @martin/contracts, @martin/core |
|
|
34
|
+
|
|
35
|
+
## Non-OSS Workspace Packages
|
|
36
|
+
| Package | Path | Reason |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| @martin/control-plane | apps/control-plane | Managed or RC-only workspace surface that stays out of the initial OSS boundary. |
|
|
39
|
+
| @martin/benchmarks | benchmarks | Managed or RC-only workspace surface that stays out of the initial OSS boundary. |
|
|
40
|
+
|
|
41
|
+
## Local-Only Surfaces
|
|
42
|
+
| Path | Reason |
|
|
43
|
+
|---|---|
|
|
44
|
+
| apps/local-dashboard | Local read-model viewer that is not yet packaged as a publishable OSS workspace. |
|
|
45
|
+
|
|
46
|
+
## Dependency Leak Review
|
|
47
|
+
- No workspace dependency leaks detected.
|
|
48
|
+
|
package/docs/oss/QUICKSTART.md
CHANGED
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
# Quickstart
|
|
2
|
-
|
|
3
|
-
This quickstart is intentionally conservative. It is written for a fresh engineer validating the current Phase 13 release-candidate state, not for a hypothetical future public release.
|
|
4
|
-
|
|
5
|
-
## Public launch target vs current RC path
|
|
6
|
-
|
|
7
|
-
The frozen public launch target is:
|
|
8
|
-
|
|
9
|
-
- `npm install martin-loop`
|
|
10
|
-
- `npx martin-loop ...`
|
|
11
|
-
- `import { MartinLoop } from "martin-loop"`
|
|
12
|
-
|
|
13
|
-
That launch surface is now implemented in the root package facade and smoke-validated from a clean temporary install. This quickstart still documents the honest RC-from-source path because public registry publication is a later release step.
|
|
14
|
-
|
|
15
|
-
## Prerequisites
|
|
16
|
-
|
|
17
|
-
- Node.js 20+ recommended
|
|
18
|
-
- `pnpm` 10.x
|
|
19
|
-
- A clean local checkout of this repo
|
|
20
|
-
|
|
21
|
-
Optional for live runs:
|
|
22
|
-
|
|
23
|
-
- Claude Code CLI for the Claude adapter path
|
|
24
|
-
- OpenAI Codex CLI plus credentials for the Codex adapter path
|
|
25
|
-
|
|
26
|
-
## Install and build
|
|
27
|
-
|
|
28
|
-
From the repo root:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
pnpm install
|
|
32
|
-
pnpm build
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Run the RC validation matrix
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
pnpm rc:validate
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
What this does:
|
|
42
|
-
|
|
43
|
-
- creates an isolated temporary home or profile directory
|
|
44
|
-
- points Martin run artifacts at that clean location
|
|
45
|
-
- runs the current build, lint, test, benchmark, and certification matrix
|
|
46
|
-
- writes step logs into a temp `martin-rc-validation-*` directory
|
|
47
|
-
|
|
48
|
-
Use this when you want to answer, "Can a fresh environment still reproduce the current RC baseline?"
|
|
49
|
-
|
|
50
|
-
## RC gate commands
|
|
51
|
-
|
|
52
|
-
The current Phase 13 RC gate is made of these commands:
|
|
53
|
-
|
|
54
|
-
- `pnpm oss:validate`
|
|
55
|
-
- `pnpm public:smoke`
|
|
56
|
-
- `pnpm repo:smoke`
|
|
57
|
-
- `pnpm rc:validate`
|
|
58
|
-
- `pnpm pilot:prep:validate`
|
|
59
|
-
- `pnpm release:matrix:local`
|
|
60
|
-
|
|
61
|
-
Recommended order for a fresh local reviewer:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
pnpm oss:validate
|
|
65
|
-
pnpm public:smoke
|
|
66
|
-
pnpm repo:smoke
|
|
67
|
-
pnpm rc:validate
|
|
68
|
-
pnpm release:matrix:local
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
`pnpm release:matrix:local` runs the full local OS lane for the current machine. The repository also defines Windows, macOS, and Linux CI lanes in `.github/workflows/phase13-release-matrix.yml`.
|
|
72
|
-
|
|
73
|
-
## Stub-safe CLI run
|
|
74
|
-
|
|
75
|
-
This is the safest first run because it avoids real provider spend.
|
|
76
|
-
|
|
77
|
-
### PowerShell
|
|
78
|
-
|
|
79
|
-
```powershell
|
|
80
|
-
$env:MARTIN_LIVE='false'
|
|
81
|
-
pnpm run:cli -- run --objective "Summarize the current runtime state" --verify "pnpm --filter @martin/core test"
|
|
82
|
-
Remove-Item Env:MARTIN_LIVE
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Bash
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
MARTIN_LIVE=false pnpm run:cli -- run --objective "Summarize the current runtime state" --verify "pnpm --filter @martin/core test"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
This path uses the stub adapter and still exercises the loop, persistence, and policy surfaces.
|
|
92
|
-
|
|
93
|
-
## Config-driven run
|
|
94
|
-
|
|
95
|
-
The repo ships an example config at `martin.config.example.yaml`.
|
|
96
|
-
|
|
97
|
-
Martin auto-looks for `martin.config.yaml` in the invocation root, or you can pass `--config <path>`.
|
|
98
|
-
|
|
99
|
-
Example:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
pnpm run:cli -- run --config martin.config.example.yaml --objective "Run with repo defaults" --verify "pnpm --filter @martin/core test"
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Inspect a saved run
|
|
106
|
-
|
|
107
|
-
Martin persists runs under `~/.martin/runs/` by default, or under `MARTIN_RUNS_DIR` if you override it.
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
pnpm run:cli -- inspect --file path/to/loop-record.json
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
For persisted run folders, inspect the `contract.json`, `state.json`, `ledger.jsonl`, and `artifacts/attempt-XXX/` files together. Those artifacts are the source of truth for runtime behavior.
|
|
114
|
-
|
|
115
|
-
## MCP server
|
|
116
|
-
|
|
117
|
-
Build first, then start the server from the workspace:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
pnpm --filter @martin/mcp build
|
|
121
|
-
node packages/mcp/dist/server.js
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
The current MCP tools are:
|
|
125
|
-
|
|
126
|
-
- `martin_run`
|
|
127
|
-
- `martin_inspect`
|
|
128
|
-
- `martin_status`
|
|
129
|
-
|
|
130
|
-
## Notes for reviewers
|
|
131
|
-
|
|
132
|
-
- Fresh-home behavior matters. Do not rely only on a long-lived `~/.martin` directory.
|
|
133
|
-
- Exact-versus-estimated cost labels are meaningful and should not be merged in docs or dashboards.
|
|
134
|
-
- The repo contains control-plane code, but the public OSS boundary is still being finalized during Phase 13.
|
|
135
|
-
- The benchmark harness remains a workspace-level RC surface; `martin bench` is not part of the publishable CLI boundary yet.
|
|
1
|
+
# Quickstart
|
|
2
|
+
|
|
3
|
+
This quickstart is intentionally conservative. It is written for a fresh engineer validating the current Phase 13 release-candidate state, not for a hypothetical future public release.
|
|
4
|
+
|
|
5
|
+
## Public launch target vs current RC path
|
|
6
|
+
|
|
7
|
+
The frozen public launch target is:
|
|
8
|
+
|
|
9
|
+
- `npm install martin-loop`
|
|
10
|
+
- `npx martin-loop ...`
|
|
11
|
+
- `import { MartinLoop } from "martin-loop"`
|
|
12
|
+
|
|
13
|
+
That launch surface is now implemented in the root package facade and smoke-validated from a clean temporary install. This quickstart still documents the honest RC-from-source path because public registry publication is a later release step.
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- Node.js 20+ recommended
|
|
18
|
+
- `pnpm` 10.x
|
|
19
|
+
- A clean local checkout of this repo
|
|
20
|
+
|
|
21
|
+
Optional for live runs:
|
|
22
|
+
|
|
23
|
+
- Claude Code CLI for the Claude adapter path
|
|
24
|
+
- OpenAI Codex CLI plus credentials for the Codex adapter path
|
|
25
|
+
|
|
26
|
+
## Install and build
|
|
27
|
+
|
|
28
|
+
From the repo root:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm install
|
|
32
|
+
pnpm build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Run the RC validation matrix
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm rc:validate
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
What this does:
|
|
42
|
+
|
|
43
|
+
- creates an isolated temporary home or profile directory
|
|
44
|
+
- points Martin run artifacts at that clean location
|
|
45
|
+
- runs the current build, lint, test, benchmark, and certification matrix
|
|
46
|
+
- writes step logs into a temp `martin-rc-validation-*` directory
|
|
47
|
+
|
|
48
|
+
Use this when you want to answer, "Can a fresh environment still reproduce the current RC baseline?"
|
|
49
|
+
|
|
50
|
+
## RC gate commands
|
|
51
|
+
|
|
52
|
+
The current Phase 13 RC gate is made of these commands:
|
|
53
|
+
|
|
54
|
+
- `pnpm oss:validate`
|
|
55
|
+
- `pnpm public:smoke`
|
|
56
|
+
- `pnpm repo:smoke`
|
|
57
|
+
- `pnpm rc:validate`
|
|
58
|
+
- `pnpm pilot:prep:validate`
|
|
59
|
+
- `pnpm release:matrix:local`
|
|
60
|
+
|
|
61
|
+
Recommended order for a fresh local reviewer:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm oss:validate
|
|
65
|
+
pnpm public:smoke
|
|
66
|
+
pnpm repo:smoke
|
|
67
|
+
pnpm rc:validate
|
|
68
|
+
pnpm release:matrix:local
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`pnpm release:matrix:local` runs the full local OS lane for the current machine. The repository also defines Windows, macOS, and Linux CI lanes in `.github/workflows/phase13-release-matrix.yml`.
|
|
72
|
+
|
|
73
|
+
## Stub-safe CLI run
|
|
74
|
+
|
|
75
|
+
This is the safest first run because it avoids real provider spend.
|
|
76
|
+
|
|
77
|
+
### PowerShell
|
|
78
|
+
|
|
79
|
+
```powershell
|
|
80
|
+
$env:MARTIN_LIVE='false'
|
|
81
|
+
pnpm run:cli -- run --objective "Summarize the current runtime state" --verify "pnpm --filter @martin/core test"
|
|
82
|
+
Remove-Item Env:MARTIN_LIVE
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Bash
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
MARTIN_LIVE=false pnpm run:cli -- run --objective "Summarize the current runtime state" --verify "pnpm --filter @martin/core test"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This path uses the stub adapter and still exercises the loop, persistence, and policy surfaces.
|
|
92
|
+
|
|
93
|
+
## Config-driven run
|
|
94
|
+
|
|
95
|
+
The repo ships an example config at `martin.config.example.yaml`.
|
|
96
|
+
|
|
97
|
+
Martin auto-looks for `martin.config.yaml` in the invocation root, or you can pass `--config <path>`.
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pnpm run:cli -- run --config martin.config.example.yaml --objective "Run with repo defaults" --verify "pnpm --filter @martin/core test"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Inspect a saved run
|
|
106
|
+
|
|
107
|
+
Martin persists runs under `~/.martin/runs/` by default, or under `MARTIN_RUNS_DIR` if you override it.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pnpm run:cli -- inspect --file path/to/loop-record.json
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
For persisted run folders, inspect the `contract.json`, `state.json`, `ledger.jsonl`, and `artifacts/attempt-XXX/` files together. Those artifacts are the source of truth for runtime behavior.
|
|
114
|
+
|
|
115
|
+
## MCP server
|
|
116
|
+
|
|
117
|
+
Build first, then start the server from the workspace:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm --filter @martin/mcp build
|
|
121
|
+
node packages/mcp/dist/server.js
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The current MCP tools are:
|
|
125
|
+
|
|
126
|
+
- `martin_run`
|
|
127
|
+
- `martin_inspect`
|
|
128
|
+
- `martin_status`
|
|
129
|
+
|
|
130
|
+
## Notes for reviewers
|
|
131
|
+
|
|
132
|
+
- Fresh-home behavior matters. Do not rely only on a long-lived `~/.martin` directory.
|
|
133
|
+
- Exact-versus-estimated cost labels are meaningful and should not be merged in docs or dashboards.
|
|
134
|
+
- The repo contains control-plane code, but the public OSS boundary is still being finalized during Phase 13.
|
|
135
|
+
- The benchmark harness remains a workspace-level RC surface; `martin bench` is not part of the publishable CLI boundary yet.
|