You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May a transient npx invocation own a Runtime Host that outlives that invocation because of durable work? If so, what persistent artifact and installation authority owns that Host after the npm cache entry is no longer a reliable deployment root?
Current evidence
Current
npx --yes maka-agent@next runs the exact package selected by the npm dist-tag or version.
The local CLI resolves its Runtime Host candidate entrypoint from that package and may launch a detached ephemeral Host.
/exit disconnects the TUI Surface. Durable residency may intentionally keep the Host alive afterward.
Therefore a Host launched from an _npx cache path can outlive the invocation that supplied its code.
Current managed-service setup avoids this problem by copying an exact package into a Maka-owned persistent deployment. Direct persistent service installation from a temporary npx path is rejected.
Decision to make
Choose one explicit ownership model; do not retain the current ambiguous middle state.
Option A — invocation-owned
An npx TUI may launch an owned local Host, but that Host must retire when the invocation ends. Background Scheduled Tasks and other durable work do not continue while no installed Maka owner is running.
Option B — managed local artifact
Before enabling Host work that may outlive npx, copy and verify the exact release into a versioned Maka-owned local deployment. The durable deployment—not the npm cache entry—becomes installation owner and later updates use #3231 retirement semantics.
Option C — connect-only
An npx invocation may connect to an existing compatible Host but cannot create a durable local Host. When none exists, it directs the user to install Maka or explicitly create a managed deployment.
Proposed direction
Planned — pending maintainer confirmation
The two user intents should not be forced into one global option:
Direct npx maka uses the invocation-owned rule from Option A. It may connect to an existing compatible Host or start an invocation-owned ephemeral Host, but a Host it starts retires when the invocation ends; durable background work does not continue without a persistent owner.
Explicit npx ... runtime-host setup uses the managed-artifact rule from Option B because the user deliberately requested persistent hosting. Setup resolves and verifies the exact invoked release, copies it into a Maka-owned persistent deployment, then installs systemd or LaunchAgent from that durable path. The _npx cache never becomes the service executable.
A verified persistent Desktop/CLI/service installation may establish the initial owner when no owner exists. A different durable owner must use an explicit transfer; last-launch-wins, package path, PID, version, epoch compatibility, and ordinary Client access are not transfer authority.
This preserves user choice without allowing a transient cache entry to become durable authority. It is the product rule to carry into #3709; the issue remains open until the owner record, transfer protocol, invocation-liveness behavior, and released-package qualification are accepted and implemented.
English
Question
May a transient
npxinvocation own a Runtime Host that outlives that invocation because of durable work? If so, what persistent artifact and installation authority owns that Host after the npm cache entry is no longer a reliable deployment root?Current evidence
Current
npx --yes maka-agent@nextruns the exact package selected by the npm dist-tag or version./exitdisconnects the TUI Surface. Durable residency may intentionally keep the Host alive afterward._npxcache path can outlive the invocation that supplied its code.npxpath is rejected.Decision to make
Choose one explicit ownership model; do not retain the current ambiguous middle state.
Option A — invocation-owned
An
npxTUI may launch an owned local Host, but that Host must retire when the invocation ends. Background Scheduled Tasks and other durable work do not continue while no installed Maka owner is running.Option B — managed local artifact
Before enabling Host work that may outlive
npx, copy and verify the exact release into a versioned Maka-owned local deployment. The durable deployment—not the npm cache entry—becomes installation owner and later updates use #3231 retirement semantics.Option C — connect-only
An
npxinvocation may connect to an existing compatible Host but cannot create a durable local Host. When none exists, it directs the user to install Maka or explicitly create a managed deployment.Proposed direction
Planned — pending maintainer confirmation
The two user intents should not be forced into one global option:
npx makauses the invocation-owned rule from Option A. It may connect to an existing compatible Host or start an invocation-owned ephemeral Host, but a Host it starts retires when the invocation ends; durable background work does not continue without a persistent owner.npx ... runtime-host setupuses the managed-artifact rule from Option B because the user deliberately requested persistent hosting. Setup resolves and verifies the exact invoked release, copies it into a Maka-owned persistent deployment, then installs systemd or LaunchAgent from that durable path. The_npxcache never becomes the service executable.This preserves user choice without allowing a transient cache entry to become durable authority. It is the product rule to carry into #3709; the issue remains open until the owner record, transfer protocol, invocation-liveness behavior, and released-package qualification are accepted and implemented.
Refs #3709
Required evaluation
npxproduct promise: disposable trial, full local product, or operator/setup toolStable constraints
npxnever silently updates a managed remote Host.Success criteria
npxexits.npxcannot repeatedly replace one another's compatible Host merely because their releases differ.Part of #3231. The chosen model will constrain the installed-CLI update work and the TUI lifecycle UX.
简体中文
问题
临时
npxinvocation 是否可以拥有一个因 durable work 而在 invocation 结束后继续运行的 Runtime Host?如果可以,当 npm cache entry 不再是可靠 deployment root 后,哪一份持久 artifact 和哪一个 installation authority 继续拥有该 Host?当前证据
Current
npx --yes maka-agent@next会运行 npm dist-tag 或精确版本选择的 package。/exit只断开 TUI Surface;durable residency 可以有意让 Host 此后继续运行。_npxcache 路径启动的 Host 可能比提供其代码的 invocation 活得更久。npx路径安装 persistent service 会被拒绝。需要作出的决策
必须明确选择一种 ownership model,不能保留当前模糊的中间状态。
方案 A:invocation-owned
npxTUI 可以启动 owned local Host,但 invocation 结束时 Host 必须退场。没有 installed Maka owner 运行时,后台 Scheduled Task 和其他 durable work 不继续执行。方案 B:managed local artifact
在允许 Host work 超过
npx生命周期前,将精确 release 复制并验证到版本化的 Maka-owned local deployment。由该 durable deployment 而不是 npm cache entry 成为 installation owner,后续更新复用 #3231 retirement 语义。方案 C:connect-only
npx可以连接已有兼容 Host,但不能创建 durable local Host。没有 Host 时,引导用户安装 Maka 或明确创建 managed deployment。建议方向
Planned——等待 maintainer 确认
两种用户意图不应被强制压成一个全局选项:
npx maka采用方案 A 的 invocation-owned 规则。它可以连接已有 compatible Host,或启动 invocation-owned ephemeral Host;但由它启动的 Host 必须随 invocation 结束而退场。没有 persistent owner 时,durable background work 不继续运行。npx ... runtime-host setup时采用方案 B 的 managed-artifact 规则,因为用户主动选择了持久托管。Setup 解析并验证本次调用的精确 release,将它复制到 Maka-owned 持久 deployment,再从该持久路径安装 systemd 或 LaunchAgent;_npxcache 永远不成为 service executable。这个方向既保留用户选择,也不允许临时 cache entry 获得 durable authority。它应作为 #3709 后续实现采用的产品规则;在 owner record、transfer protocol、invocation liveness 与 released-package qualification 被接受并实现前,本 Issue 保持开放。
关联 #3709
必须评估
npx的产品承诺:一次性试用、完整本地产品,还是 operator/setup 工具稳定约束
npx不会静默更新 managed remote Host。完成标准
npx退出后 durable work 是否继续。npx不会仅因 release 不同而反复替换彼此兼容的 Host。属于 #3231。最终选择会约束 installed-CLI update 工作和 TUI lifecycle UX。
AI assistance disclosure
This discussion was investigated and drafted with Codex using current source, live npm registry metadata, and isolated
npx/Runtime Host experiments.