@asc-agent/runtime 0.7.0 → 0.7.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/README.md +1 -1
- package/dist/cli/asc.js +41 -11
- package/dist/core/distribution/release.d.ts +3 -3
- package/dist/core/distribution/release.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ proceed-by-default, escalation, audit, the external-write guard, host integratio
|
|
|
7
7
|
here.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g @asc-agent/runtime@0.7.
|
|
10
|
+
npm install -g @asc-agent/runtime@0.7.1
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
npm owns the executable link (on Windows, npm's own `asc.cmd`). This package never edits
|
package/dist/cli/asc.js
CHANGED
|
@@ -2518,8 +2518,14 @@ async function runHost(provider, command, target, values) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
const claimed = await bindings.claim(spec, at);
|
|
2520
2520
|
if (!claimed.ok) {
|
|
2521
|
-
|
|
2522
|
-
|
|
2521
|
+
// 부딪힌 상대가 **어느 세션인지** 말한다. 같은 Run 이 다른 세션을 잡고 있는 경우와
|
|
2522
|
+
// 이 세션을 다른 Run 이 잡고 있는 경우는 사람이 할 일이 다르다.
|
|
2523
|
+
const other = claimed.current.logicalSessionId;
|
|
2524
|
+
console.error(other === target
|
|
2525
|
+
? `RUNTIME_CONFLICT: ${target} 은 이미 ${claimed.current.physicalSessionId} 가 잡고 있다. ` +
|
|
2526
|
+
'죽은 세션이 확실하면 --force 로 rebind하라.'
|
|
2527
|
+
: `RUNTIME_CONFLICT: 이 Run(${physical}) 은 지금 ${other} 을 잡고 있다. ` +
|
|
2528
|
+
`한 Run 은 한 세션만 잡는다 — 먼저 놓아라: asc host claude release ${other} --physical ${physical}`);
|
|
2523
2529
|
return 1;
|
|
2524
2530
|
}
|
|
2525
2531
|
await recordExecution('host bind');
|
|
@@ -4055,15 +4061,14 @@ async function applyUpdate(plan, values) {
|
|
|
4055
4061
|
console.log(`installed: ${RUNTIME_PACKAGE}@${target}`);
|
|
4056
4062
|
let worst = 0;
|
|
4057
4063
|
// host 설치물은 버전마다 내용이 바뀐다. 새 runtime 에 낡은 hook 을 남기지 않는다.
|
|
4058
|
-
//
|
|
4059
|
-
//
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
}
|
|
4064
|
+
//
|
|
4065
|
+
// **새로 설치된 build 가 자기 내용을 쓴다.** 이 프로세스는 아직 갈아 끼우기 **전의**
|
|
4066
|
+
// build 이고, 그 build 의 `hookScript()` 는 옛 내용을 만든다 — 실기계에서 update 가
|
|
4067
|
+
// "host: …/SKILL.md" 를 적고 끝났는데 probe 는 여전히 INSTALLED_STALE 이었다. 갱신했다고
|
|
4068
|
+
// 말하면서 옛 내용을 다시 쓴 것이다.
|
|
4069
|
+
//
|
|
4070
|
+
// 사람이 고친 것을 덮지 않는 규칙은 그쪽(`host claude install`)이 그대로 진다.
|
|
4071
|
+
worst = Math.max(worst, await refreshHost());
|
|
4067
4072
|
// 등록물이 낡았으면 지금 형태로 수렴시킨다. 기존 STALE→수렴 경로를 그대로 쓴다.
|
|
4068
4073
|
worst = Math.max(worst, await convergeService(values));
|
|
4069
4074
|
// 마지막은 언제나 확인이다.
|
|
@@ -4123,6 +4128,31 @@ function diffState(before, after) {
|
|
|
4123
4128
|
changed.push(path);
|
|
4124
4129
|
return changed.sort();
|
|
4125
4130
|
}
|
|
4131
|
+
/**
|
|
4132
|
+
* 새 build 에게 host 설치물을 자기 내용으로 맞추게 한다.
|
|
4133
|
+
*
|
|
4134
|
+
* 지금 도는 프로세스로 부르지 않는 이유는 하나다 — 이 프로세스는 교체되기 전의 build 다.
|
|
4135
|
+
* 전역 실행물을 못 찾으면 갱신하지 않고 그 사실을 말한다. 조용히 건너뛰면 낡은 hook 이
|
|
4136
|
+
* 새 runtime 옆에 남고, 그 조합은 아무도 시험한 적이 없다.
|
|
4137
|
+
*/
|
|
4138
|
+
async function refreshHost() {
|
|
4139
|
+
const entry = await globalRuntimeEntry();
|
|
4140
|
+
if (!entry) {
|
|
4141
|
+
console.error('host: could not find the installed runtime to refresh with — run `asc host claude install`');
|
|
4142
|
+
return 1;
|
|
4143
|
+
}
|
|
4144
|
+
const child = spawnSync(process.execPath, [entry, 'host', 'claude', 'install'], { encoding: 'utf8' });
|
|
4145
|
+
const output = `${child.stdout ?? ''}${child.stderr ?? ''}`;
|
|
4146
|
+
for (const line of output.split('\n')) {
|
|
4147
|
+
if (line.startsWith('installed:') || line.startsWith('skipped:'))
|
|
4148
|
+
console.log(`host: ${line}`);
|
|
4149
|
+
}
|
|
4150
|
+
if (child.status !== 0) {
|
|
4151
|
+
console.error(`host: refresh failed${output.trim() ? ` — ${output.trim().split('\n').at(-1)}` : ''}`);
|
|
4152
|
+
return 1;
|
|
4153
|
+
}
|
|
4154
|
+
return 0;
|
|
4155
|
+
}
|
|
4126
4156
|
/**
|
|
4127
4157
|
* 되돌린다. **되돌릴 자리가 있을 때만** — 없던 것으로 되돌릴 수는 없고, 그때는 돌던 것이
|
|
4128
4158
|
* 없었다는 사실을 그대로 말한다.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const RUNTIME_PACKAGE = "@asc-agent/runtime";
|
|
2
2
|
export declare const BOOTSTRAP_PACKAGE = "@asc-agent/bootstrap";
|
|
3
3
|
/** runtime과 bootstrap은 초기 release에서 lockstep이다. */
|
|
4
|
-
export declare const RELEASE_VERSION = "0.7.
|
|
5
|
-
export declare const RUNTIME_SPEC = "@asc-agent/runtime@0.7.
|
|
6
|
-
export declare const BOOTSTRAP_SPEC = "@asc-agent/bootstrap@0.7.
|
|
4
|
+
export declare const RELEASE_VERSION = "0.7.1";
|
|
5
|
+
export declare const RUNTIME_SPEC = "@asc-agent/runtime@0.7.1";
|
|
6
|
+
export declare const BOOTSTRAP_SPEC = "@asc-agent/bootstrap@0.7.1";
|
|
7
7
|
/**
|
|
8
8
|
* 아직 설치되지 않은 machine에서 그대로 실행되는 형태 (C-14 §3.4).
|
|
9
9
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export const RUNTIME_PACKAGE = '@asc-agent/runtime';
|
|
10
10
|
export const BOOTSTRAP_PACKAGE = '@asc-agent/bootstrap';
|
|
11
11
|
/** runtime과 bootstrap은 초기 release에서 lockstep이다. */
|
|
12
|
-
export const RELEASE_VERSION = '0.7.
|
|
12
|
+
export const RELEASE_VERSION = '0.7.1';
|
|
13
13
|
export const RUNTIME_SPEC = `${RUNTIME_PACKAGE}@${RELEASE_VERSION}`;
|
|
14
14
|
export const BOOTSTRAP_SPEC = `${BOOTSTRAP_PACKAGE}@${RELEASE_VERSION}`;
|
|
15
15
|
/**
|