@zq-silk/yui 2.1.0 → 2.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.
Files changed (102) hide show
  1. package/README.md +4 -0
  2. package/dist/cli/commandCatalog.js +24 -3
  3. package/dist/cli/commandDiscovery.js +4 -1
  4. package/dist/cli.js +23 -3078
  5. package/dist/commands/taskCommands.js +79 -21
  6. package/dist/commands/taskIntegrationCommands.js +3 -1
  7. package/dist/commands/taskUpstreamCommands.js +3 -1
  8. package/dist/context/runContextPack.js +132 -5
  9. package/dist/context/sourceRunContext.js +4 -2
  10. package/dist/context/taskContext.js +6 -1
  11. package/dist/controlPlaneCli.js +3092 -0
  12. package/dist/controller/fileSchedulerStoreAdapter.js +19 -6
  13. package/dist/controller/jobControl.js +21 -0
  14. package/dist/executor/agentExecutor.js +1 -1
  15. package/dist/executor/effectiveLaunch.js +18 -5
  16. package/dist/executor/fileRoleLaunchPlanner.js +15 -19
  17. package/dist/integration/gitIntegrationService.js +50 -15
  18. package/dist/message/messageContinuation.js +7 -2
  19. package/dist/nativeAgent/agent.js +176 -74
  20. package/dist/nativeAgent/cliDemo.js +37 -0
  21. package/dist/nativeAgent/codingTools.js +11 -0
  22. package/dist/nativeAgent/commandTool.js +215 -0
  23. package/dist/nativeAgent/compactionDemo.js +158 -0
  24. package/dist/nativeAgent/composition.js +71 -0
  25. package/dist/nativeAgent/context/budget.js +44 -0
  26. package/dist/nativeAgent/context/index.js +339 -0
  27. package/dist/nativeAgent/context/providerCompressor.js +103 -0
  28. package/dist/nativeAgent/demo.js +12 -1
  29. package/dist/nativeAgent/evaluation/cases.js +38 -0
  30. package/dist/nativeAgent/evaluation/checks.js +91 -0
  31. package/dist/nativeAgent/evaluation/demo.js +19 -0
  32. package/dist/nativeAgent/evaluation/files.js +54 -0
  33. package/dist/nativeAgent/evaluation/fixture.js +36 -0
  34. package/dist/nativeAgent/evaluation/index.js +239 -0
  35. package/dist/nativeAgent/executionOwner.js +209 -0
  36. package/dist/nativeAgent/filePatterns.js +170 -0
  37. package/dist/nativeAgent/fileToolsSupport.js +202 -0
  38. package/dist/nativeAgent/index.js +13 -0
  39. package/dist/nativeAgent/interaction/cli.js +358 -0
  40. package/dist/nativeAgent/interaction/contracts.js +1 -0
  41. package/dist/nativeAgent/interaction/index.js +3 -0
  42. package/dist/nativeAgent/interaction/memoryDemo.js +115 -0
  43. package/dist/nativeAgent/interaction/renderer.js +34 -0
  44. package/dist/nativeAgent/localSafety.js +258 -0
  45. package/dist/nativeAgent/model/anthropicMessages.js +204 -0
  46. package/dist/nativeAgent/model/chatCompletions.js +210 -0
  47. package/dist/nativeAgent/model/errors.js +47 -0
  48. package/dist/nativeAgent/model/gateway.js +423 -0
  49. package/dist/nativeAgent/model/index.js +7 -0
  50. package/dist/nativeAgent/model/observationAdapter.js +21 -0
  51. package/dist/nativeAgent/model/protocols.js +19 -0
  52. package/dist/nativeAgent/model/responses.js +263 -0
  53. package/dist/nativeAgent/model/types.js +1 -0
  54. package/dist/nativeAgent/model/wire.js +73 -0
  55. package/dist/nativeAgent/observability/index.js +220 -0
  56. package/dist/nativeAgent/product/catalog.js +82 -0
  57. package/dist/nativeAgent/product/config.js +295 -0
  58. package/dist/nativeAgent/product/facts.js +30 -0
  59. package/dist/nativeAgent/product/index.js +62 -0
  60. package/dist/nativeAgent/product/location.js +44 -0
  61. package/dist/nativeAgent/product/runtime.js +276 -0
  62. package/dist/nativeAgent/product/storage.js +49 -0
  63. package/dist/nativeAgent/product/tools.js +47 -0
  64. package/dist/nativeAgent/product/transport.js +54 -0
  65. package/dist/nativeAgent/projectGuidance/index.js +425 -0
  66. package/dist/nativeAgent/searchTools.js +305 -0
  67. package/dist/nativeAgent/session/backends.js +293 -0
  68. package/dist/nativeAgent/session/catalog.js +97 -0
  69. package/dist/nativeAgent/session/catalogDemo.js +87 -0
  70. package/dist/nativeAgent/session/contracts.js +1 -0
  71. package/dist/nativeAgent/session/format.js +269 -0
  72. package/dist/nativeAgent/session/index.js +5 -0
  73. package/dist/nativeAgent/session/location.js +36 -0
  74. package/dist/nativeAgent/session/sqliteFormat.js +134 -0
  75. package/dist/nativeAgent/session/store.js +248 -0
  76. package/dist/nativeAgent/textTools.js +270 -133
  77. package/dist/nativeAgent/toolManager/executor.js +290 -0
  78. package/dist/nativeAgent/toolManager/index.js +4 -0
  79. package/dist/nativeAgent/validation.js +2 -2
  80. package/dist/task/taskAuthority.js +56 -0
  81. package/dist/web/assets/client/app.js +64 -3
  82. package/dist/web/assets/client/detail.js +6 -6
  83. package/dist/web/assets/client/i18n.js +4 -0
  84. package/dist/web/assets/client/overview.js +12 -9
  85. package/dist/web/assets/client/sidebar.js +31 -2
  86. package/dist/web/assets/shell.js +2 -1
  87. package/dist/web/assets/styles/components.js +2 -0
  88. package/dist/web/assets/styles/layout.js +11 -4
  89. package/dist/web/assets/styles/responsive.js +12 -4
  90. package/dist/web/assets/styles/views.js +16 -13
  91. package/docs/agent-result-consumption.md +16 -0
  92. package/docs/agent-result-consumption.zh-CN.md +13 -0
  93. package/docs/examples/agent-offline.mjs +194 -0
  94. package/docs/native-agent.md +283 -0
  95. package/docs/release-workflow.md +47 -9
  96. package/docs/release-workflow.zh-CN.md +36 -6
  97. package/docs/roles-and-configuration.md +32 -0
  98. package/docs/roles-and-configuration.zh-CN.md +26 -0
  99. package/package.json +1 -1
  100. package/skills/yui-leader/SKILL.md +9 -0
  101. package/skills/yui-reviewer/SKILL.md +5 -0
  102. package/skills/yui-runtime/SKILL.md +7 -0
package/README.md CHANGED
@@ -42,6 +42,10 @@ not from terminal windows you juggle or details you have to remember.
42
42
 
43
43
  ## Quick start
44
44
 
45
+ For the self-built coding Agent (without a Controller or Yui Home), see
46
+ [`yui agent`](docs/native-agent.md). Its explicit configuration and product state
47
+ are separate from the orchestration setup below.
48
+
45
49
  You need Linux x64 (glibc) or macOS (x64 or Apple Silicon), Git, tmux, and
46
50
  Node.js `^20.17.0`, `^22.9.0`, `^24.0.0` or `^26.0.0`. On macOS install tmux with
47
51
  `brew install tmux`. For the simplest setup, have Codex CLI or Claude Code CLI
@@ -1,5 +1,7 @@
1
1
  import { supportedAgentAdapterIds } from "../agent/adapterCatalog.js";
2
2
  import { supportedAgentExecutionComponentIds } from "../agent/executionComponents.js";
3
+ import { productConfigurationOptions } from "../nativeAgent/product/config.js";
4
+ import { catalogCommands, catalogCommandOptions } from "../nativeAgent/product/catalog.js";
3
5
  import { CONFIG_DEFINITIONS, CONFIG_DOMAINS, configDefinitionsForDomain } from "../config/configCatalog.js";
4
6
  function buildNode(input, parentPath = []) {
5
7
  const path = [...parentPath, input.name];
@@ -794,8 +796,8 @@ const taskChildren = [
794
796
  {
795
797
  name: "dispatch", discovery: { surface: "managed", audiences: ["operator", "leader"] },
796
798
  summary: "Dispatch a work item to its Role.",
797
- usage: "yui task work dispatch <task>/<work> [--input <text>] [--lane-role <role> ...]",
798
- options: ["--input", "--lane-role"]
799
+ usage: "yui task work dispatch <task>/<work> [--input <text>] [--context-ref <store/refId@digest> ...] [--lane-role <role> ...]",
800
+ options: ["--input", "--context-ref", "--lane-role"]
799
801
  },
800
802
  {
801
803
  name: "synthesize", discovery: { surface: "managed", audiences: ["operator", "leader"] },
@@ -1113,13 +1115,32 @@ export const ROOT_COMMAND = buildNode({
1113
1115
  { id: "general", title: "General", entries: [
1114
1116
  "help", "version", "update", "upgrade", "setup", "start", "doctor"
1115
1117
  ] },
1116
- { id: "workflow", title: "Workflow", entries: ["operator", "role", "project", "task"] },
1118
+ { id: "workflow", title: "Workflow", entries: ["agent", "operator", "role", "project", "task"] },
1117
1119
  { id: "configuration", title: "Configuration", entries: ["config"] },
1118
1120
  { id: "operations", title: "Operations", entries: ["web", "controller", "session", "execution", "capability", "job", "jobs", "telemetry", "release"] },
1119
1121
  { id: "resources", title: "Resources", entries: ["resources"] },
1120
1122
  { id: "internal", title: "Internal", entries: ["internal"] }
1121
1123
  ],
1122
1124
  children: [
1125
+ {
1126
+ name: "agent", discovery: { surface: "public", audiences: ["public", "operator"] },
1127
+ summary: "Run the independent coding Agent without a Controller or Yui Home.",
1128
+ sections: [{ id: "product", title: "Independent Agent", entries: ["check-config", "start", "run", ...catalogCommands] }],
1129
+ children: [
1130
+ { name: "check-config", discovery: { surface: "public", audiences: ["public", "operator"] },
1131
+ summary: "Validate explicit configuration without model requests or state initialization.",
1132
+ options: productConfigurationOptions, fileOptions: ["--config"] },
1133
+ { name: "start", discovery: { surface: "public", audiences: ["public", "operator"] },
1134
+ summary: "Open a foreground line UI; select --session ID to resume saved history.",
1135
+ options: [...productConfigurationOptions, "--session"], fileOptions: ["--config"] },
1136
+ { name: "run", discovery: { surface: "public", audiences: ["public", "operator"] },
1137
+ summary: "Submit one input and return real result/save evidence as JSON.",
1138
+ options: [...productConfigurationOptions, "--session", "--input"], fileOptions: ["--config"] },
1139
+ ...catalogCommands.map(name => ({ name, discovery: { surface: "public", audiences: ["public", "operator"] },
1140
+ summary: "Use the real persistent Session catalog without starting execution.",
1141
+ options: catalogCommandOptions(name) }))
1142
+ ]
1143
+ },
1123
1144
  {
1124
1145
  name: "role", discovery: { surface: "public", audiences: ["public", "operator"] },
1125
1146
  summary: "Queue input or control an exact current Global Role Turn.",
@@ -5,7 +5,10 @@ import { hasManagedIdentity } from "../runtime/managedIdentity.js";
5
5
  export function discoveryAudience(env) {
6
6
  if (!hasManagedIdentity(env))
7
7
  return "public";
8
- if (!env.YUI_ROLE || !env.YUI_NATIVE_SESSION_ID)
8
+ const nativeSessionId = env.YUI_ADAPTER_ID === "codex"
9
+ ? env.CODEX_THREAD_ID ?? env.YUI_NATIVE_SESSION_ID : env.YUI_NATIVE_SESSION_ID;
10
+ if (!env.YUI_ROLE || !nativeSessionId || nativeSessionId.trim() !== nativeSessionId
11
+ || nativeSessionId.includes("\0"))
9
12
  return "unbound";
10
13
  if (env.YUI_SESSION_SCOPE === "global")
11
14
  return env.YUI_ROLE === "operator" ? "operator" : "global";