@xcanwin/manyoyo 8.1.0 → 8.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/README.md +1 -1
- package/bin/manyoyo.js +1 -1
- package/lib/app-update.js +22 -0
- package/lib/web/index.html +1 -1
- package/package.json +3 -2
- package/lib/dev-release.js +0 -142
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcanwin/manyoyo",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"imageVersion": "2.1.0-common",
|
|
5
5
|
"playwrightCliVersion": "0.1.21",
|
|
6
6
|
"description": "AI Agent CLI Security Sandbox for Docker and Podman",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"start": "node bin/manyoyo.js",
|
|
34
34
|
"serve:dev": "node bin/manyoyo.js serve 127.0.0.1:3000",
|
|
35
|
-
"
|
|
35
|
+
"release": "node scripts/release/index.js",
|
|
36
|
+
"build:release": "node scripts/web.js build-release",
|
|
36
37
|
"build:web": "node scripts/web.js build",
|
|
37
38
|
"dev:web": "node scripts/web.js dev",
|
|
38
39
|
"test:web": "node scripts/web.js test",
|
package/lib/dev-release.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
const { extractAgentMessageFromCodexJsonl } = require('./codex-output');
|
|
2
|
-
|
|
3
|
-
function parseReleaseVersion(version) {
|
|
4
|
-
const match = String(version || '').trim().match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
5
|
-
if (!match) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
major: Number(match[1]),
|
|
10
|
-
minor: Number(match[2]),
|
|
11
|
-
patch: Number(match[3])
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function formatReleaseVersion(parts) {
|
|
16
|
-
return `${parts.major}.${parts.minor}.${parts.patch}`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function compareReleaseVersions(left, right) {
|
|
20
|
-
const a = typeof left === 'string' ? parseReleaseVersion(left) : left;
|
|
21
|
-
const b = typeof right === 'string' ? parseReleaseVersion(right) : right;
|
|
22
|
-
if (!a || !b) {
|
|
23
|
-
return 0;
|
|
24
|
-
}
|
|
25
|
-
if (a.major !== b.major) return a.major - b.major;
|
|
26
|
-
if (a.minor !== b.minor) return a.minor - b.minor;
|
|
27
|
-
return a.patch - b.patch;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function buildVersionSuggestions(version) {
|
|
31
|
-
const parsed = parseReleaseVersion(version);
|
|
32
|
-
if (!parsed) {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
return [
|
|
36
|
-
{
|
|
37
|
-
key: 'major',
|
|
38
|
-
label: '第1段 +1 (major)',
|
|
39
|
-
version: formatReleaseVersion({
|
|
40
|
-
major: parsed.major + 1,
|
|
41
|
-
minor: 0,
|
|
42
|
-
patch: 0
|
|
43
|
-
}),
|
|
44
|
-
recommended: false
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: 'minor',
|
|
48
|
-
label: '第2段 +1 (minor)',
|
|
49
|
-
version: formatReleaseVersion({
|
|
50
|
-
major: parsed.major,
|
|
51
|
-
minor: parsed.minor + 1,
|
|
52
|
-
patch: 0
|
|
53
|
-
}),
|
|
54
|
-
recommended: false
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
key: 'patch',
|
|
58
|
-
label: '第3段 +1 (patch)',
|
|
59
|
-
version: formatReleaseVersion({
|
|
60
|
-
major: parsed.major,
|
|
61
|
-
minor: parsed.minor,
|
|
62
|
-
patch: parsed.patch + 1
|
|
63
|
-
}),
|
|
64
|
-
recommended: true
|
|
65
|
-
}
|
|
66
|
-
];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function findRecommendedChoiceIndex(options, fallbackIndex = 0) {
|
|
70
|
-
const list = Array.isArray(options) ? options : [];
|
|
71
|
-
const matchedIndex = list.findIndex(option => option && option.recommended === true);
|
|
72
|
-
return matchedIndex >= 0 ? matchedIndex : fallbackIndex;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function pickLatestVersionTag(tags) {
|
|
76
|
-
let latest = null;
|
|
77
|
-
for (const rawTag of (tags || [])) {
|
|
78
|
-
const tag = String(rawTag || '').trim();
|
|
79
|
-
if (!tag) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
const normalized = tag.startsWith('v') ? tag.slice(1) : tag;
|
|
83
|
-
const parsed = parseReleaseVersion(normalized);
|
|
84
|
-
if (!parsed) {
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
if (!latest || compareReleaseVersions(parsed, latest.parsed) > 0) {
|
|
88
|
-
latest = {
|
|
89
|
-
tag,
|
|
90
|
-
version: normalized,
|
|
91
|
-
parsed
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
return latest ? { tag: latest.tag, version: latest.version } : null;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function normalizeCommitMessage(text) {
|
|
99
|
-
const lines = String(text || '').replace(/\r/g, '').split('\n');
|
|
100
|
-
if (!lines.length) {
|
|
101
|
-
return '';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
let start = 0;
|
|
105
|
-
let end = lines.length;
|
|
106
|
-
|
|
107
|
-
while (start < end && lines[start].trim() === '') {
|
|
108
|
-
start += 1;
|
|
109
|
-
}
|
|
110
|
-
while (end > start && lines[end - 1].trim() === '') {
|
|
111
|
-
end -= 1;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (start < end && lines[start].trim().startsWith('```')) {
|
|
115
|
-
start += 1;
|
|
116
|
-
while (start < end && lines[start].trim() === '') {
|
|
117
|
-
start += 1;
|
|
118
|
-
}
|
|
119
|
-
if (end > start && lines[end - 1].trim() === '```') {
|
|
120
|
-
end -= 1;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
while (start < end && lines[start].trim() === '') {
|
|
125
|
-
start += 1;
|
|
126
|
-
}
|
|
127
|
-
while (end > start && lines[end - 1].trim() === '') {
|
|
128
|
-
end -= 1;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return lines.slice(start, end).join('\n').trim();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
module.exports = {
|
|
135
|
-
parseReleaseVersion,
|
|
136
|
-
compareReleaseVersions,
|
|
137
|
-
buildVersionSuggestions,
|
|
138
|
-
findRecommendedChoiceIndex,
|
|
139
|
-
pickLatestVersionTag,
|
|
140
|
-
normalizeCommitMessage,
|
|
141
|
-
extractAgentMessageFromCodexJsonl
|
|
142
|
-
};
|