@asc-agent/runtime 0.5.2 → 0.5.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/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.5.2
10
+ npm install -g @asc-agent/runtime@0.5.3
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
@@ -1555,6 +1555,7 @@ async function detectSetupState(values, entry) {
1555
1555
  const attachedProfile = ascRoot ? await lockedProfileId(ascRoot) : undefined;
1556
1556
  // 이번 계획이 쓸 Profile 하나 — 그것의 결합 선언이 비어 있을 때만 제안을 관측한다.
1557
1557
  const targetProfile = values.profile ?? attachedProfile ?? adoptable.adoptable?.id;
1558
+ const stable = entry === 'bootstrap' ? await detectStableInstall(nodeProcessRunner) : undefined;
1558
1559
  return {
1559
1560
  entry,
1560
1561
  projectRoot,
@@ -1573,11 +1574,11 @@ async function detectSetupState(values, entry) {
1573
1574
  host: [{ id: 'claude', status: hostReport.status }],
1574
1575
  // Profile 이 작업 도구를 선언했으면 그 준비 상태까지 본다 (설계 §9.3).
1575
1576
  ...(await workBindingState(ascRoot, projectRoot)),
1576
- // 이 기계의 지속 등록. **별도 onboarding 을 만들지 않는다** — 같은 계획에 함께 든다.
1577
- ...(await persistentRuntimeState(values)),
1578
1577
  // **bootstrap으로 들어왔을 때만 본다.** 설치된 runtime이 자기를 다시 설치할 이유가
1579
1578
  // 없고, 그 축을 안 그리면 plan은 설치된 `asc` 를 전제하지도 않는다 (C-14 §3.4).
1580
- ...(entry === 'bootstrap' ? { stableRuntime: await detectStableInstall(nodeProcessRunner) } : {}),
1579
+ ...(stable ? { stableRuntime: stable } : {}),
1580
+ // 이 기계의 지속 등록. **별도 onboarding 을 만들지 않는다** — 같은 계획에 함께 든다.
1581
+ ...(await persistentRuntimeState(values, Boolean(stable && stable.status !== 'CURRENT'))),
1581
1582
  };
1582
1583
  }
1583
1584
  /**
@@ -1604,7 +1605,7 @@ function runningFromInstalledPackage() {
1604
1605
  function serviceRegistrationAllowed() {
1605
1606
  if (process.env.ASC_SERVICE === 'off')
1606
1607
  return false;
1607
- return runningFromInstalledPackage();
1608
+ return true;
1608
1609
  }
1609
1610
  /**
1610
1611
  * 이 기계에 ASC runtime 이 등록돼 있는가 (설계 §6, Gate 7).
@@ -1612,7 +1613,7 @@ function serviceRegistrationAllowed() {
1612
1613
  * 물어볼 수 없으면 이 축을 그리지 않는다 — 모르는 것을 "해야 한다"로 적으면 설치되지
1613
1614
  * 않은 기계에서 setup 이 영영 끝나지 않는다.
1614
1615
  */
1615
- async function persistentRuntimeState(values) {
1616
+ async function persistentRuntimeState(values, installing) {
1616
1617
  if (!serviceRegistrationAllowed())
1617
1618
  return {};
1618
1619
  const adapter = serviceAdapter();
@@ -1620,10 +1621,19 @@ async function persistentRuntimeState(values) {
1620
1621
  return {};
1621
1622
  // 등록물이 가리킬 자리가 없으면 이 축을 그리지 않는다 — 깨진 등록을 남기느니 등록하지
1622
1623
  // 않고 그 사실을 말한다 (P0 F1).
1624
+ //
1625
+ // **이번 계획이 그 자리를 만든다면 지금 없는 것은 근거가 아니다.** 첫 설치는 npx 로
1626
+ // 들어와 전역 runtime 을 놓는데, 그 전에 판정하면 "가리킬 것이 없다" 가 되어 등록이
1627
+ // 영영 계획에 들지 않는다 — 사람이 뒤에 명령 하나를 더 쳐야 했던 자리다. 등록 자체는
1628
+ // apply 순서상 맨 마지막이고, 그때 다시 해석한다.
1623
1629
  const runtime = await serviceRuntime();
1624
- if (runtime.kind !== 'STABLE') {
1630
+ if (runtime.kind !== 'STABLE' && !installing) {
1625
1631
  return { persistentRuntime: { action: 'unsupported', adapter: adapter.id, detail: runtime.detail } };
1626
1632
  }
1633
+ if (runtime.kind !== 'STABLE') {
1634
+ // 아직 없다 — 이번에 놓는다. 그러면 등록할 것이 생긴다.
1635
+ return { persistentRuntime: { action: 'install', adapter: adapter.id } };
1636
+ }
1627
1637
  const plan = await planPersistentRuntime(adapter, serviceCommand(serviceInterval(values), runtime)).catch(() => null);
1628
1638
  if (!plan)
1629
1639
  return {};
@@ -3869,7 +3879,9 @@ async function serviceRuntime() {
3869
3879
  const stable = await globalRuntimeEntry();
3870
3880
  const check = await checkNodeRuntime(nodeRuntimeDeps());
3871
3881
  return resolveServiceRuntime({
3872
- runningEntry: fileURLToPath(import.meta.url),
3882
+ // **checkout 은 등록물이 가리킬 자리가 아니다.** 지금 도는 것을 후보로 쓰는 것은 그것이
3883
+ // 설치된 패키지일 때뿐이고, 아니면 전역 설치본만 남는다 — 없으면 등록하지 않는다.
3884
+ runningEntry: runningFromInstalledPackage() ? fileURLToPath(import.meta.url) : '/dev/null/not-installed',
3873
3885
  runningNode: process.execPath,
3874
3886
  runningNodeVersion: process.version,
3875
3887
  ...(stable ? { stableEntry: stable } : {}),
@@ -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.5.2";
5
- export declare const RUNTIME_SPEC = "@asc-agent/runtime@0.5.2";
6
- export declare const BOOTSTRAP_SPEC = "@asc-agent/bootstrap@0.5.2";
4
+ export declare const RELEASE_VERSION = "0.5.3";
5
+ export declare const RUNTIME_SPEC = "@asc-agent/runtime@0.5.3";
6
+ export declare const BOOTSTRAP_SPEC = "@asc-agent/bootstrap@0.5.3";
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.5.2';
12
+ export const RELEASE_VERSION = '0.5.3';
13
13
  export const RUNTIME_SPEC = `${RUNTIME_PACKAGE}@${RELEASE_VERSION}`;
14
14
  export const BOOTSTRAP_SPEC = `${BOOTSTRAP_PACKAGE}@${RELEASE_VERSION}`;
15
15
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asc-agent/runtime",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "ASC (Agent Session Control) \u2014 local-first human-in-the-loop agent control plane: core, CLI, and adapters",
5
5
  "keywords": [
6
6
  "agent",