@mainwave/cli 0.13.1 → 0.15.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 +91 -2
- package/dist/adapters/claude-code.js +4 -21
- package/dist/adapters/codex-cli.js +456 -52
- package/dist/adapters/index.js +4 -2
- package/dist/commands.js +15 -3
- package/dist/core/apply.js +85 -19
- package/dist/core/codecs/toml-profile.js +239 -0
- package/dist/core/codex-trust.js +122 -31
- package/dist/core/detect.js +20 -1
- package/dist/core/doctor.js +72 -12
- package/dist/core/entry-script.js +24 -10
- package/dist/core/install-hooks.js +1 -1
- package/dist/core/markers.js +43 -24
- package/dist/core/pinned-use-case.js +2 -2
- package/dist/core/prompts.js +15 -0
- package/dist/core/remove.js +51 -10
- package/dist/core/setup-removal.js +197 -0
- package/dist/core/status.js +15 -7
- package/dist/core/store.js +37 -0
- package/dist/core/wizard.js +87 -4
- package/dist/main.js +41 -3
- package/hooks/codex-turns.mjs +137 -34
- package/hooks/git-commit-marker.mjs +8 -1
- package/hooks/github-pr-marker.mjs +8 -1
- package/hooks/glab-mr-marker.mjs +8 -1
- package/hooks/jira-ticket-marker.mjs +8 -1
- package/hooks/kiro-otlp.mjs +4 -15
- package/hooks/linear-ticket-marker.mjs +8 -1
- package/hooks/marker-core.mjs +126 -23
- package/hooks/matchers.json +1 -1
- package/hooks/plan-snapshot.mjs +9 -21
- package/package.json +7 -7
package/hooks/matchers.json
CHANGED
|
@@ -202,6 +202,6 @@
|
|
|
202
202
|
"optOut": "markers",
|
|
203
203
|
"hosts": ["codex"],
|
|
204
204
|
"dataClasses": ["session id, turn id and agent id", "working directory", "start and end times"],
|
|
205
|
-
"why": "Closes a turn
|
|
205
|
+
"why": "Closes a turn an earlier run left open when the session resumed (a startup's, fork's or clear's session id is new, and a compaction is the same run, so those close nothing): the turn is sent ending at the last event it saw, never at the new start, so a killed Codex can't stretch a turn across the developer's absence. It also deletes turn state older than 7 days. It takes no matcher, so it runs for every source (the session-start refresh is a separate group that runs for `startup|resume|fork` only). Async."
|
|
206
206
|
}
|
|
207
207
|
]
|
package/hooks/plan-snapshot.mjs
CHANGED
|
@@ -55,21 +55,19 @@
|
|
|
55
55
|
// so a send that hasn't finished when such a run ends is lost.
|
|
56
56
|
|
|
57
57
|
import { createHash } from 'node:crypto'
|
|
58
|
-
import { readFileSync
|
|
58
|
+
import { readFileSync } from 'node:fs'
|
|
59
59
|
|
|
60
60
|
import {
|
|
61
|
+
activityMarkerPath,
|
|
61
62
|
boolAttr,
|
|
62
63
|
buildMarkerPayload,
|
|
63
64
|
doubleAttr,
|
|
64
65
|
emitMarker,
|
|
65
66
|
hookFlag,
|
|
66
67
|
intAttr,
|
|
67
|
-
isOkStatus,
|
|
68
68
|
loadOtelConfig,
|
|
69
|
-
ensureLogDir,
|
|
70
69
|
markerHostSource,
|
|
71
70
|
markerLog,
|
|
72
|
-
markerLogPath,
|
|
73
71
|
markerManagedDir,
|
|
74
72
|
markerOauthAccountPath,
|
|
75
73
|
markerProjectDir,
|
|
@@ -78,6 +76,7 @@ import {
|
|
|
78
76
|
oauthAccountFromRecord,
|
|
79
77
|
onceReaders,
|
|
80
78
|
parseTraceparent,
|
|
79
|
+
stampActivity,
|
|
81
80
|
stringAttr,
|
|
82
81
|
trimmedOrUndefined,
|
|
83
82
|
} from './marker-core.mjs'
|
|
@@ -124,24 +123,12 @@ const LOG_NAME = 'plan-snapshot.log'
|
|
|
124
123
|
* `logOk`); it stamps the success sidecar instead (§ `stampSuccess`). */
|
|
125
124
|
const snapshotLog = (argv) => markerLog(argv, LOG_NAME)
|
|
126
125
|
|
|
127
|
-
/** The sidecar
|
|
128
|
-
|
|
129
|
-
* the last successful send — what `doctor` reports as activity. */
|
|
130
|
-
export const successMarkerPath = (argv) => `${markerLogPath(argv, LOG_NAME)}.ok`
|
|
126
|
+
/** The activity sidecar (§ marker-core `activityMarkerPath`). */
|
|
127
|
+
export const successMarkerPath = (argv) => activityMarkerPath(argv, LOG_NAME)
|
|
131
128
|
|
|
132
|
-
/** Rewrite the
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (!isOkStatus(status)) return false
|
|
136
|
-
try {
|
|
137
|
-
const path = successMarkerPath(argv)
|
|
138
|
-
ensureLogDir(path)
|
|
139
|
-
writeFileSync(path, `${now.toISOString()}\n`, { mode: 0o600 })
|
|
140
|
-
return true
|
|
141
|
-
} catch {
|
|
142
|
-
return false
|
|
143
|
-
}
|
|
144
|
-
}
|
|
129
|
+
/** Rewrite the sidecar on a 2xx (§ marker-core `stampActivity`). */
|
|
130
|
+
export const stampSuccess = (status, argv = process.argv, now = new Date()) =>
|
|
131
|
+
stampActivity(status, argv, LOG_NAME, now)
|
|
145
132
|
|
|
146
133
|
// Non-coding source/service, as for the ticket and PR markers: the span is
|
|
147
134
|
// about the Anthropic account, not a stretch of coding work.
|
|
@@ -499,6 +486,7 @@ export const handle = async (payload, { argv = process.argv, emit = emitMarker }
|
|
|
499
486
|
tool,
|
|
500
487
|
managedDir,
|
|
501
488
|
readers,
|
|
489
|
+
argv,
|
|
502
490
|
)
|
|
503
491
|
if (!endpoint || !bearer) {
|
|
504
492
|
log('skip: collector endpoint/bearer not found in settings or env')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mainwave/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Setup wizard for connecting third-party coding tools to Mainwave AI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"api:generate": "openapi-ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@inquirer/prompts": "8.7.
|
|
48
|
+
"@inquirer/prompts": "8.7.5",
|
|
49
49
|
"picocolors": "1.1.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
53
53
|
"@types/node": "22.20.5",
|
|
54
|
-
"knip": "6.
|
|
55
|
-
"lefthook": "2.2.
|
|
56
|
-
"oxlint": "1.
|
|
54
|
+
"knip": "6.45.0",
|
|
55
|
+
"lefthook": "2.2.2",
|
|
56
|
+
"oxlint": "1.93.0",
|
|
57
57
|
"prettier": "3.9.10",
|
|
58
58
|
"typescript": "6.0.3",
|
|
59
|
-
"vite": "8.3.
|
|
60
|
-
"vitest": "5.0
|
|
59
|
+
"vite": "8.3.7",
|
|
60
|
+
"vitest": "5.1.0",
|
|
61
61
|
"yaml": "2.9.1"
|
|
62
62
|
},
|
|
63
63
|
"keywords": [
|