@opencorelabs/lucidity 0.6.0 → 0.8.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 +18 -3
- package/dist/assets/speech/lucidity-speech +0 -0
- package/dist/automations/agent.d.ts.map +1 -1
- package/dist/automations/agent.js +2 -0
- package/dist/automations/designer.d.ts +1 -1
- package/dist/chat/server.d.ts +1 -0
- package/dist/chat/server.d.ts.map +1 -1
- package/dist/chat/server.js +6 -1
- package/dist/coding/conduct.d.ts +1 -22
- package/dist/coding/conduct.d.ts.map +1 -1
- package/dist/coding/conduct.js +9 -94
- package/dist/coding/runCodeTurn.d.ts +3 -16
- package/dist/coding/runCodeTurn.d.ts.map +1 -1
- package/dist/coding/runCodeTurn.js +157 -165
- package/dist/coding/workspaceRegistry.d.ts +24 -0
- package/dist/coding/workspaceRegistry.d.ts.map +1 -0
- package/dist/coding/workspaceRegistry.js +230 -0
- package/dist/coding/worktree.d.ts +11 -14
- package/dist/coding/worktree.d.ts.map +1 -1
- package/dist/coding/worktree.js +41 -21
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/daemonLease.d.ts +12 -0
- package/dist/daemonLease.d.ts.map +1 -0
- package/dist/daemonLease.js +32 -0
- package/dist/goals/assessment.d.ts +115 -0
- package/dist/goals/assessment.d.ts.map +1 -0
- package/dist/goals/assessment.js +67 -0
- package/dist/goals/notes.d.ts +18 -0
- package/dist/goals/notes.d.ts.map +1 -0
- package/dist/goals/notes.js +72 -0
- package/dist/index.js +63 -15
- package/dist/jobs/goals.d.ts +15 -0
- package/dist/jobs/goals.d.ts.map +1 -0
- package/dist/jobs/goals.js +286 -0
- package/dist/jobs/weeklyReview.d.ts.map +1 -1
- package/dist/jobs/weeklyReview.js +3 -2
- package/dist/queue.d.ts +1 -0
- package/dist/queue.d.ts.map +1 -1
- package/dist/queue.js +4 -0
- package/dist/room/client.d.ts +5 -0
- package/dist/room/client.d.ts.map +1 -1
- package/dist/room/client.js +124 -107
- package/dist/room/computer.d.ts.map +1 -1
- package/dist/room/computer.js +2 -0
- package/dist/room/durablePublish.d.ts +6 -0
- package/dist/room/durablePublish.d.ts.map +1 -0
- package/dist/room/durablePublish.js +19 -0
- package/dist/room/incidents.d.ts +1 -1
- package/dist/room/incidents.d.ts.map +1 -1
- package/dist/room/incidents.js +14 -7
- package/dist/room/turnQueue.d.ts.map +1 -1
- package/dist/room/turnQueue.js +27 -24
- package/dist/runtimeStore.d.ts +44 -0
- package/dist/runtimeStore.d.ts.map +1 -0
- package/dist/runtimeStore.js +188 -0
- package/dist/setup/server.js +1 -1
- package/dist/turnLog.d.ts +10 -40
- package/dist/turnLog.d.ts.map +1 -1
- package/dist/turnLog.js +33 -56
- package/package.json +4 -4
- package/src/automations/agent.ts +2 -0
- package/src/chat/server.ts +7 -1
- package/src/coding/conduct.ts +10 -147
- package/src/coding/runCodeTurn.ts +42 -61
- package/src/coding/workspaceRegistry.ts +210 -0
- package/src/coding/worktree.ts +44 -20
- package/src/config.ts +2 -0
- package/src/daemonLease.ts +33 -0
- package/src/goals/assessment.ts +106 -0
- package/src/goals/notes.ts +88 -0
- package/src/index.ts +63 -18
- package/src/jobs/goals.ts +384 -0
- package/src/jobs/weeklyReview.ts +4 -3
- package/src/queue.ts +4 -0
- package/src/room/client.ts +85 -80
- package/src/room/computer.ts +2 -0
- package/src/room/durablePublish.ts +25 -0
- package/src/room/incidents.ts +16 -8
- package/src/room/turnQueue.ts +26 -27
- package/src/runtimeStore.ts +190 -0
- package/src/setup/server.ts +1 -1
- package/src/turnLog.ts +32 -75
- package/vendor/decisions/dist/dayPlan.d.ts +9 -0
- package/vendor/decisions/dist/dayPlan.js +82 -0
- package/vendor/decisions/dist/index.d.ts +1 -0
- package/vendor/decisions/dist/index.js +1 -0
- package/vendor/decisions/dist/jev.js +3 -1
- package/vendor/decisions/src/dayPlan.ts +80 -0
- package/vendor/decisions/src/index.ts +1 -0
- package/vendor/decisions/src/jev.ts +3 -1
- package/vendor/mcp-server/dist/index.js +2 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts +4 -0
- package/vendor/mcp-server/dist/tools/goals.d.ts.map +1 -0
- package/vendor/mcp-server/dist/tools/goals.js +38 -0
- package/vendor/mcp-server/package.json +1 -1
- package/vendor/mcp-server/src/index.ts +2 -0
- package/vendor/mcp-server/src/tools/goals.ts +62 -0
- package/vendor/runtime/README.md +2 -2
- package/vendor/runtime/dist/executor/asyncQueue.d.ts +1 -0
- package/vendor/runtime/dist/executor/asyncQueue.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/asyncQueue.js +3 -0
- package/vendor/runtime/dist/executor/claudeAgent.d.ts +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/claudeAgent.js +25 -10
- package/vendor/runtime/dist/executor/codex.d.ts +1 -0
- package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codex.js +69 -36
- package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts +6 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts +5 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts +8 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts +11 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.js +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts +4 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +2 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts +4 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts +3 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts +7 -2
- package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts +3 -0
- package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.d.ts +10 -3
- package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/codexRpc.js +18 -3
- package/vendor/runtime/dist/executor/codexSessions.d.ts +30 -0
- package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/codexSessions.js +88 -0
- package/vendor/runtime/dist/executor/health.d.ts +2 -1
- package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/health.js +17 -5
- package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -1
- package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/liveTurns.js +12 -5
- package/vendor/runtime/dist/executor/ownership.d.ts +35 -0
- package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -0
- package/vendor/runtime/dist/executor/ownership.js +99 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts +1 -0
- package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
- package/vendor/runtime/dist/executor/providerRouter.js +5 -0
- package/vendor/runtime/dist/executor/types.d.ts +4 -0
- package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.d.ts +1 -0
- package/vendor/runtime/dist/harness/index.d.ts.map +1 -1
- package/vendor/runtime/dist/harness/index.js +12 -1
- package/vendor/runtime/dist/harness/types.d.ts +2 -1
- package/vendor/runtime/dist/harness/types.d.ts.map +1 -1
- package/vendor/runtime/dist/index.d.ts +1 -0
- package/vendor/runtime/dist/index.d.ts.map +1 -1
- package/vendor/runtime/dist/index.js +1 -0
- package/vendor/runtime/dist/prompts/dayPlanning.d.ts +44 -0
- package/vendor/runtime/dist/prompts/dayPlanning.d.ts.map +1 -0
- package/vendor/runtime/dist/prompts/dayPlanning.js +42 -0
- package/vendor/runtime/src/executor/asyncQueue.ts +3 -0
- package/vendor/runtime/src/executor/claudeAgent.ts +20 -9
- package/vendor/runtime/src/executor/codex.ts +76 -44
- package/vendor/runtime/src/executor/codexProtocol/FunctionCallOutputContentItem.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/Personality.ts +3 -0
- package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +1 -1
- package/vendor/runtime/src/executor/codexProtocol/README.md +2 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/CyberAccessProgram.ts +9 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/GetAccountRateLimitsResponse.ts +5 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/Model.ts +11 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/ModelAccessPrograms.ts +13 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitSnapshot.ts +5 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +2 -0
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadResumeParams.ts +5 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStartParams.ts +4 -1
- package/vendor/runtime/src/executor/codexProtocol/v2/TurnStartParams.ts +7 -2
- package/vendor/runtime/src/executor/codexProtocol/v2/UserInput.ts +1 -1
- package/vendor/runtime/src/executor/codexRpc.ts +22 -4
- package/vendor/runtime/src/executor/codexSessions.ts +108 -0
- package/vendor/runtime/src/executor/health.ts +16 -6
- package/vendor/runtime/src/executor/liveTurns.ts +12 -5
- package/vendor/runtime/src/executor/ownership.ts +76 -0
- package/vendor/runtime/src/executor/providerRouter.ts +6 -0
- package/vendor/runtime/src/executor/types.ts +4 -0
- package/vendor/runtime/src/harness/index.ts +12 -1
- package/vendor/runtime/src/harness/types.ts +2 -1
- package/vendor/runtime/src/index.ts +1 -0
- package/vendor/runtime/src/prompts/dayPlanning.ts +46 -0
- package/vendor/shared/dist/agentCommands.d.ts +1 -0
- package/vendor/shared/dist/agentCommands.d.ts.map +1 -1
- package/vendor/shared/dist/cardStudio.d.ts +41 -0
- package/vendor/shared/dist/cardStudio.d.ts.map +1 -1
- package/vendor/shared/dist/cardStudio.js +13 -3
- package/vendor/shared/dist/commandLocal.d.ts.map +1 -1
- package/vendor/shared/dist/commandLocal.js +2 -0
- package/vendor/shared/dist/commands.d.ts +18 -0
- package/vendor/shared/dist/commands.d.ts.map +1 -1
- package/vendor/shared/dist/commands.js +2 -0
- package/vendor/shared/dist/computer.d.ts +7 -1
- package/vendor/shared/dist/computer.d.ts.map +1 -1
- package/vendor/shared/dist/computer.js +13 -2
- package/vendor/shared/dist/constants.d.ts +3 -3
- package/vendor/shared/dist/constants.d.ts.map +1 -1
- package/vendor/shared/dist/constants.js +5 -4
- package/vendor/shared/dist/dayPlan.d.ts +86 -0
- package/vendor/shared/dist/dayPlan.d.ts.map +1 -0
- package/vendor/shared/dist/dayPlan.js +46 -0
- package/vendor/shared/dist/dayPlanning.d.ts +139 -0
- package/vendor/shared/dist/dayPlanning.d.ts.map +1 -0
- package/vendor/shared/dist/dayPlanning.js +67 -0
- package/vendor/shared/dist/goalNotes.d.ts +4 -0
- package/vendor/shared/dist/goalNotes.d.ts.map +1 -0
- package/vendor/shared/dist/goalNotes.js +23 -0
- package/vendor/shared/dist/goals.d.ts +835 -0
- package/vendor/shared/dist/goals.d.ts.map +1 -0
- package/vendor/shared/dist/goals.js +198 -0
- package/vendor/shared/dist/index.d.ts +5 -0
- package/vendor/shared/dist/index.d.ts.map +1 -1
- package/vendor/shared/dist/index.js +5 -0
- package/vendor/shared/dist/schemas/harness.d.ts +155 -0
- package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
- package/vendor/shared/dist/schemas/harness.js +8 -0
- package/vendor/shared/dist/workspaces.d.ts +138 -0
- package/vendor/shared/dist/workspaces.d.ts.map +1 -0
- package/vendor/shared/dist/workspaces.js +40 -0
- package/vendor/shared/src/agentCommands.ts +1 -0
- package/vendor/shared/src/cardStudio.ts +13 -3
- package/vendor/shared/src/commandLocal.ts +2 -0
- package/vendor/shared/src/commands.ts +2 -0
- package/vendor/shared/src/computer.ts +18 -2
- package/vendor/shared/src/constants.ts +5 -4
- package/vendor/shared/src/dayPlan.ts +81 -0
- package/vendor/shared/src/dayPlanning.ts +77 -0
- package/vendor/shared/src/goalNotes.ts +23 -0
- package/vendor/shared/src/goals.ts +237 -0
- package/vendor/shared/src/index.ts +6 -0
- package/vendor/shared/src/schemas/harness.ts +8 -0
- package/vendor/shared/src/workspaces.ts +48 -0
- package/dist/coding/fleetIntegrate.d.ts +0 -37
- package/dist/coding/fleetIntegrate.d.ts.map +0 -1
- package/dist/coding/fleetIntegrate.js +0 -64
- package/dist/coding/openFleetPr.d.ts +0 -41
- package/dist/coding/openFleetPr.d.ts.map +0 -1
- package/dist/coding/openFleetPr.js +0 -121
- package/src/coding/fleetIntegrate.ts +0 -95
- package/src/coding/openFleetPr.ts +0 -148
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ on your machine for scheduled briefings and interactive chat.
|
|
|
9
9
|
Requires Node.js 22 or newer.
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npm install -g @opencorelabs/lucidity@0.
|
|
12
|
+
npm install -g @opencorelabs/lucidity@0.8.0
|
|
13
13
|
lucidity setup
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -123,15 +123,30 @@ npm run verify:npm -- --local
|
|
|
123
123
|
This builds the agent and its workspace dependencies, vendors the internal
|
|
124
124
|
libraries as local file dependencies with a private Zod 3 copy for MCP, writes the publishable archive to `dist/npm/`, and verifies the CLI
|
|
125
125
|
and MCP server from isolated global and local installations. Publish that
|
|
126
|
-
archive with `npm publish dist/npm/opencorelabs-lucidity-0.
|
|
126
|
+
archive with `npm publish dist/npm/opencorelabs-lucidity-0.8.0.tgz --access public`.
|
|
127
127
|
The private workspace packages do not need separate npm publications.
|
|
128
128
|
|
|
129
|
+
Set `LUCIDITY_NPM_VERIFY_CACHE` to an absolute directory to reuse package downloads between verification runs. Each run still installs into a fresh temporary prefix, refreshes registry metadata and checks package integrity. The cache must be outside that temporary installation and is retained after verification. Without this variable, each run uses its own disposable cache.
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
LUCIDITY_NPM_VERIFY_CACHE="$PWD/.context/npm-verify-cache" npm run verify:npm
|
|
133
|
+
LUCIDITY_NPM_VERIFY_CACHE="$PWD/.context/npm-verify-cache" npm run verify:npm -- --local
|
|
134
|
+
```
|
|
135
|
+
|
|
129
136
|
When the speech helper has been built, the archive includes its executable,
|
|
130
137
|
corresponding Swift source, pinned FluidAudio dependency and third-party notices.
|
|
131
138
|
The helper runs only on Apple Silicon macOS; other platforms retain the regular CLI
|
|
132
139
|
and MCP experience. The install verifier checks its startup without downloading models.
|
|
133
140
|
|
|
134
|
-
The
|
|
141
|
+
The `npm release checks` workflow runs when an `npm-v*` tag is pushed, or when manually started for a release candidate. Ordinary pull requests and branch pushes do not start the cross-platform matrix. To check a candidate on `main` before tagging it:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
gh workflow run npm-package.yml --ref main
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Select the candidate branch or tag with `--ref` when it is elsewhere, and confirm the run's commit matches the source being released. Pushing a release tag already starts a run, so no additional manual dispatch is needed for that tag. Review the complete matrix result before publishing the release archive.
|
|
148
|
+
|
|
149
|
+
The workflow globally and locally installs the same archive on Windows, macOS, and Linux using
|
|
135
150
|
Node.js 22. It verifies CLI/imports, platform-specific provider binaries (and absence
|
|
136
151
|
of foreign-platform binaries), Codex
|
|
137
152
|
app-server initialization, and both MCP entry points without running inference.
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/automations/agent.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/automations/agent.ts"],"names":[],"mappings":"AASA,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAsBlD,qGAAqG;AACrG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC,QAAQ,GAAG,OAAO,EAAE,aAAa,CAAC,CAAC;CACtD;4BAC8B,gBAAgB,EAAE;2BAOjB,eAAe;iBAkBpC,aAAa,UACV,WAAW,GAClB,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;EAiKrC"}
|
|
@@ -8,7 +8,7 @@ export declare function readGuidance(root: string): {
|
|
|
8
8
|
design: string;
|
|
9
9
|
};
|
|
10
10
|
export declare function parseDesignResult(text: string): {
|
|
11
|
-
outcome: "
|
|
11
|
+
outcome: "ready" | "blocked" | "skipped";
|
|
12
12
|
summary: string;
|
|
13
13
|
directions: {
|
|
14
14
|
id: string;
|
package/dist/chat/server.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { LaneQueue } from '../queue.js';
|
|
|
5
5
|
import type { McpWiring } from '../mcp/config.js';
|
|
6
6
|
import type { AutomationService } from '../automations/service.js';
|
|
7
7
|
export interface ChatServerDeps {
|
|
8
|
+
signal?: AbortSignal;
|
|
8
9
|
automations?: AutomationService;
|
|
9
10
|
config: DaemonConfig;
|
|
10
11
|
executor: AgentExecutor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/chat/server.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,MAAM,EAEZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE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S,CAAC;IAClB,uEAAuE;IACvE,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,qFAAqF;IACrF,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAiBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAoO7D"}
|
package/dist/chat/server.js
CHANGED
|
@@ -38,6 +38,11 @@ export function createChatServer(deps) {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
async function handle(req, res) {
|
|
41
|
+
if (deps.signal?.aborted) {
|
|
42
|
+
res.writeHead(503);
|
|
43
|
+
res.end('Lucidity is restarting. Reconnect before sending.');
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
41
46
|
if (req.method === 'GET' && req.url === '/health') {
|
|
42
47
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
43
48
|
res.end(JSON.stringify({ ok: true }));
|
|
@@ -123,7 +128,7 @@ export function createChatServer(deps) {
|
|
|
123
128
|
const input = await buildChatInput();
|
|
124
129
|
for await (const ev of executor.runStream({
|
|
125
130
|
...input,
|
|
126
|
-
signal: ac.signal,
|
|
131
|
+
signal: deps.signal ? AbortSignal.any([ac.signal, deps.signal]) : ac.signal,
|
|
127
132
|
})) {
|
|
128
133
|
if (ev.type === 'session')
|
|
129
134
|
send({ type: 'session', sessionId: ev.sessionId });
|
package/dist/coding/conduct.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import type { AgentExecutor } from '@lucidity/runtime';
|
|
2
2
|
import type { FleetPlan, HarnessImage } from '@lucidity/shared';
|
|
3
3
|
import type { RepoEntry } from '../config.js';
|
|
4
|
-
import { commitSubjects, commitsAhead } from './worktree.js';
|
|
5
|
-
import { openFleetPr } from './openFleetPr.js';
|
|
6
4
|
import { type CodeTurnRequest, type RunCodeTurnDeps } from './runCodeTurn.js';
|
|
7
|
-
/**
|
|
8
|
-
* The conductor: one Lucid "lead" that decomposes a goal, fans it out to isolated worker
|
|
9
|
-
* worktrees, and integrates them back onto lucid/<repo> in order. Daemon-side authority — the
|
|
10
|
-
* daemon owns every worker's resume handle and its lane; the phone is a thin client that sees
|
|
11
|
-
* a plan, approves it, then watches the fleet.
|
|
12
|
-
*
|
|
13
|
-
* Two phases over one turn. `plan` runs a read-only lead turn to produce a FleetPlan (streamed
|
|
14
|
-
* back as a fleet_plan event; nothing is created, so a discarded plan leaves no trace). `run`
|
|
15
|
-
* takes the approved plan and: creates the task graph (worker = subtask), dispatches the workers
|
|
16
|
-
* in parallel up to a cap (isolated worktrees make that safe), then integrates sequentially in
|
|
17
|
-
* merge order — the one place overlap can bite. Each worker's own code frames stream under
|
|
18
|
-
* `requestId === workerId`, so a worker reuses the entire existing code-turn pipeline; this
|
|
19
|
-
* layer only adds the fleet-level events (plan, worker_status, conflict, done).
|
|
20
|
-
*/
|
|
5
|
+
/** Compatibility handler for older phones. Workers persist after every turn. */
|
|
21
6
|
export interface ConductTurnRequest {
|
|
22
7
|
id: string;
|
|
23
8
|
repoId: string;
|
|
@@ -51,12 +36,6 @@ export interface RunConductTurnDeps {
|
|
|
51
36
|
baseDir?: string;
|
|
52
37
|
/** Seam: run one worker's coding turn. Defaults to {@link runCodeTurn}. */
|
|
53
38
|
runWorker?: (req: CodeTurnRequest, deps: RunCodeTurnDeps) => Promise<void>;
|
|
54
|
-
/** Seam: open one worker's PR (push its branch + open/reuse a PR). Defaults to {@link openFleetPr}. */
|
|
55
|
-
openPr?: typeof openFleetPr;
|
|
56
|
-
/** Seam: how many commits a worker's branch carries. Defaults to {@link commitsAhead}. */
|
|
57
|
-
commitsAhead?: typeof commitsAhead;
|
|
58
|
-
/** Seam: the subjects of those commits, for the PR title. Defaults to {@link commitSubjects}. */
|
|
59
|
-
commitSubjects?: typeof commitSubjects;
|
|
60
39
|
}
|
|
61
40
|
/** Count +/- lines and files in a unified diff, for a worker card's "+N −M". */
|
|
62
41
|
export declare function diffStat(diff: string): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conduct.d.ts","sourceRoot":"","sources":["../../src/coding/conduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAgB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"conduct.d.ts","sourceRoot":"","sources":["../../src/coding/conduct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAgB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C,OAAO,EAAe,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE3F,gFAAgF;AAEhF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,KAAK,GAAG,GAAG;IAAE,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAE/E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,mBAAmB,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnH,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAE5E;AAQD,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAWxF;AAoBD,wBAAsB,cAAc,CAClC,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
package/dist/coding/conduct.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { resolveRepo } from './repos.js';
|
|
2
2
|
import { isAbortError } from '../streamDeadline.js';
|
|
3
|
-
import { commitSubjects, commitsAhead, currentBranch, removeWorktree, sessionBranch, sessionWorktreePath, } from './worktree.js';
|
|
4
3
|
import { buildConductPlanPrompt, parseFleetPlan } from './fleetPlan.js';
|
|
5
4
|
import { createFleetTasks, syncWorkerStatus } from './fleetTasks.js';
|
|
6
|
-
import { openFleetPr, workerPrSummary } from './openFleetPr.js';
|
|
7
5
|
import { runCodeTurn } from './runCodeTurn.js';
|
|
8
6
|
const DEFAULT_MAX_PARALLEL = 2;
|
|
9
7
|
function msg(e) {
|
|
@@ -58,9 +56,11 @@ export async function runConductTurn(req, deps) {
|
|
|
58
56
|
return planPhase(req, deps, repo.root);
|
|
59
57
|
if (req.phase === 'setup')
|
|
60
58
|
return setupPhase(req, deps);
|
|
61
|
-
if (req.phase === 'integrate')
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
if (req.phase === 'integrate') {
|
|
60
|
+
deps.send({ type: 'error', requestId: req.id, message: 'Open a worker chat and ask to create or merge its PR. Workers are kept until archived.' });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
return runPhase(req, deps);
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Design-first flow: materialize an approved plan WITHOUT writing any code. Create the task graph
|
|
@@ -100,17 +100,6 @@ async function setupPhase(req, deps) {
|
|
|
100
100
|
text: `Fleet set up: ${plan.workers.length} worker${plan.workers.length === 1 ? '' : 's'} ready to brief.`,
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
/** Design-first flow: deliver the plan's workers as their own PRs on the user's "Deliver" tap.
|
|
104
|
-
* Same per-feature delivery + cleanup as the tail of `run`, run on demand instead. */
|
|
105
|
-
async function integratePhase(req, deps, repoRoot) {
|
|
106
|
-
const plan = req.plan;
|
|
107
|
-
if (!plan) {
|
|
108
|
-
deps.send({ type: 'error', requestId: req.id, message: 'Deliver needs the fleet plan.' });
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const sync = (workerId, status) => deps.api ? syncWorkerStatus(deps.api, workerId, status) : Promise.resolve();
|
|
112
|
-
await deliverAndReport(req, deps, repoRoot, plan, sync);
|
|
113
|
-
}
|
|
114
103
|
/** Read-only lead turn → a FleetPlan, streamed back as a fleet_plan event. Creates nothing. */
|
|
115
104
|
async function planPhase(req, deps, repoRoot) {
|
|
116
105
|
let text = '';
|
|
@@ -167,8 +156,8 @@ async function planPhase(req, deps, repoRoot) {
|
|
|
167
156
|
deps.send({ type: 'fleet_plan', requestId: req.id, plan });
|
|
168
157
|
deps.send({ type: 'done', requestId: req.id, text, sessionId });
|
|
169
158
|
}
|
|
170
|
-
/**
|
|
171
|
-
async function runPhase(req, deps
|
|
159
|
+
/** Run legacy worker requests without publication or workspace cleanup. */
|
|
160
|
+
async function runPhase(req, deps) {
|
|
172
161
|
const plan = req.plan;
|
|
173
162
|
if (!plan) {
|
|
174
163
|
deps.send({
|
|
@@ -209,7 +198,6 @@ async function runPhase(req, deps, repoRoot) {
|
|
|
209
198
|
const runWorker = deps.runWorker ?? runCodeTurn;
|
|
210
199
|
const cap = plan.maxParallel ?? deps.maxParallel ?? DEFAULT_MAX_PARALLEL;
|
|
211
200
|
const diffStats = new Map();
|
|
212
|
-
const failed = new Set();
|
|
213
201
|
await runWithCap(plan.workers, cap, async (w) => {
|
|
214
202
|
// A cancel mid-fleet drops the workers still queued behind the cap — we don't spin up new
|
|
215
203
|
// worktrees for a run the user has already stopped.
|
|
@@ -260,7 +248,6 @@ async function runPhase(req, deps, repoRoot) {
|
|
|
260
248
|
deps.onEnd?.(w.workerId);
|
|
261
249
|
}
|
|
262
250
|
if (sawError) {
|
|
263
|
-
failed.add(w.workerId);
|
|
264
251
|
emitStatus(w.workerId, 'failed', wasCancelled ? { detail: 'Stopped' } : undefined);
|
|
265
252
|
await sync(w.workerId, 'failed');
|
|
266
253
|
}
|
|
@@ -269,80 +256,8 @@ async function runPhase(req, deps, repoRoot) {
|
|
|
269
256
|
await sync(w.workerId, 'review');
|
|
270
257
|
}
|
|
271
258
|
});
|
|
272
|
-
// A cancel during the worker phase must stop here — never mutate git or the backlog for a
|
|
273
|
-
// run the user halted. (Without this, integration would still reset lucid/<repo> and mark
|
|
274
|
-
// every subtask completed.)
|
|
275
259
|
if (deps.signal?.aborted)
|
|
276
260
|
return;
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Per-feature delivery: push each successful worker's OWN branch and open its OWN PR against the
|
|
281
|
-
* base branch, then reclaim its worktree (keeping the branch — the PR points at it). Independent
|
|
282
|
-
* features become independent, separately-reviewable PRs instead of one combined branch, which is
|
|
283
|
-
* how you actually want a set of unrelated changes to land. No cross-worker merge, so nothing
|
|
284
|
-
* conflicts locally (any overlap surfaces when the PRs are merged on GitHub, per-PR, the user's
|
|
285
|
-
* call). Reports a `worker_pr` per delivered worker + `worker_status: merged`, then `fleet_done`
|
|
286
|
-
* (delivered/total) + `done`. Shared by the auto `run` (with the run's `failed` set) and the
|
|
287
|
-
* on-demand `integrate` phase. A failed/no-commit worker can't open a PR — it's skipped and its
|
|
288
|
-
* `worker_pr` carries the reason.
|
|
289
|
-
*/
|
|
290
|
-
async function deliverAndReport(req, deps, repoRoot, plan, sync, failed) {
|
|
291
|
-
const openPr = deps.openPr ?? openFleetPr;
|
|
292
|
-
// Base = the branch each worker forked from (repo HEAD), so a worker's PR is only its own work,
|
|
293
|
-
// not everything the checkout is ahead of the remote default by.
|
|
294
|
-
const base = await currentBranch(repoRoot).then((b) => (b && b !== 'HEAD' ? b : undefined), () => undefined);
|
|
295
|
-
const toDeliver = plan.workers.filter((w) => !failed?.has(w.workerId));
|
|
296
|
-
let delivered = 0;
|
|
297
|
-
for (const w of toDeliver) {
|
|
298
|
-
if (deps.signal?.aborted)
|
|
299
|
-
return;
|
|
300
|
-
const worktree = sessionWorktreePath(req.repoId, deps.baseDir, w.workerId);
|
|
301
|
-
const branch = sessionBranch(req.repoId, w.workerId);
|
|
302
|
-
// A worker that stopped to ask you something never committed anything: its branch still sits
|
|
303
|
-
// on base. Delivering it opens an empty PR that fails, and parks it under DELIVERED wearing
|
|
304
|
-
// that error while it's actually waiting for an answer. Leave it in review, keep its worktree
|
|
305
|
-
// (a steer continues in it), and say nothing — it isn't done, so it isn't delivered.
|
|
306
|
-
if (base && (await (deps.commitsAhead ?? commitsAhead)(worktree, base)) === 0) {
|
|
307
|
-
deps.send({
|
|
308
|
-
type: 'worker_status',
|
|
309
|
-
requestId: req.id,
|
|
310
|
-
workerId: w.workerId,
|
|
311
|
-
status: 'review',
|
|
312
|
-
detail: 'Waiting on you — nothing committed yet.',
|
|
313
|
-
});
|
|
314
|
-
void sync(w.workerId, 'review');
|
|
315
|
-
continue;
|
|
316
|
-
}
|
|
317
|
-
// A worker's commit subjects are the only account of what it actually CHANGED, and they're
|
|
318
|
-
// on its branch in both delivery paths (#308): a spawn delivering itself at the tail of its
|
|
319
|
-
// own run, and a steered worker delivered later from the phone in a different turn, possibly
|
|
320
|
-
// a different daemon process. Nothing from the run survives that second path, git does.
|
|
321
|
-
const subjects = base ? await (deps.commitSubjects ?? commitSubjects)(worktree, base) : [];
|
|
322
|
-
const pr = await openPr(worktree, branch, workerPrSummary(w.title, w.brief, subjects), base).catch((e) => ({ error: msg(e) }));
|
|
323
|
-
if (pr.url)
|
|
324
|
-
delivered++;
|
|
325
|
-
deps.send({
|
|
326
|
-
type: 'worker_pr',
|
|
327
|
-
requestId: req.id,
|
|
328
|
-
workerId: w.workerId,
|
|
329
|
-
...(pr.url ? { url: pr.url } : {}),
|
|
330
|
-
...(pr.error ? { error: pr.error } : {}),
|
|
331
|
-
});
|
|
332
|
-
deps.send({ type: 'worker_status', requestId: req.id, workerId: w.workerId, status: 'merged' });
|
|
333
|
-
void sync(w.workerId, 'merged');
|
|
334
|
-
// Reclaim the worktree, KEEP the branch — the open PR points at it.
|
|
335
|
-
await removeWorktree(repoRoot, { path: worktree, branch, mode: 'worktree' }, { keepBranch: true }).catch(() => { });
|
|
336
|
-
}
|
|
337
|
-
deps.send({
|
|
338
|
-
type: 'fleet_done',
|
|
339
|
-
requestId: req.id,
|
|
340
|
-
delivered,
|
|
341
|
-
total: plan.workers.length,
|
|
342
|
-
});
|
|
343
|
-
deps.send({
|
|
344
|
-
type: 'done',
|
|
345
|
-
requestId: req.id,
|
|
346
|
-
text: `Fleet finished: ${delivered} of ${plan.workers.length} delivered as pull requests.`,
|
|
347
|
-
});
|
|
261
|
+
deps.send({ type: 'fleet_done', requestId: req.id, delivered: 0, total: plan.workers.length });
|
|
262
|
+
deps.send({ type: 'done', requestId: req.id, text: 'Workers are ready for follow-up in their chats.' });
|
|
348
263
|
}
|
|
@@ -2,6 +2,7 @@ import type { AgentExecutor, AgentProvider } from '@lucidity/runtime';
|
|
|
2
2
|
import type { ProviderHandoff } from '@lucidity/shared';
|
|
3
3
|
import { type WorkspaceMode, type HarnessImage } from '@lucidity/shared';
|
|
4
4
|
import type { RepoEntry } from '../config.js';
|
|
5
|
+
import { type Workspace } from './worktree.js';
|
|
5
6
|
export interface CodeTurnRequest {
|
|
6
7
|
id: string;
|
|
7
8
|
repoId: string;
|
|
@@ -26,6 +27,7 @@ export interface CodeTurnRequest {
|
|
|
26
27
|
expectedBranch?: string;
|
|
27
28
|
}
|
|
28
29
|
export interface RunCodeTurnDeps {
|
|
30
|
+
prepareWorkspace?: (request: CodeTurnRequest) => Promise<Workspace>;
|
|
29
31
|
repos: RepoEntry[];
|
|
30
32
|
executor: AgentExecutor;
|
|
31
33
|
mcp?: import('@lucidity/runtime').ExecutorRunInput['mcp'];
|
|
@@ -62,21 +64,6 @@ export interface RunCodeTurnDeps {
|
|
|
62
64
|
* here must be subject / blank / body, in that order.
|
|
63
65
|
*/
|
|
64
66
|
export declare function codeCommitMessage(prompt: string, summary: string): string;
|
|
65
|
-
/**
|
|
66
|
-
* Run one coding turn (M7). Resolves the repo via the allowlist, then works in the
|
|
67
|
-
* session's workspace — by default the PERSISTENT worktree on the stable
|
|
68
|
-
* `lucid/<repoId>` branch at a stable path, where a fresh session (no `resume`)
|
|
69
|
-
* resets to HEAD and a resumed one reuses it so prior turns' commits are present.
|
|
70
|
-
* In `in-place` mode (#121) the workspace is the user's checkout itself, on its live
|
|
71
|
-
* branch, so Lucid picks up their uncommitted work. Runs Claude Code in auto mode
|
|
72
|
-
* (streaming narration + tool_call events) and returns the turn's diff.
|
|
73
|
-
*
|
|
74
|
-
* Continuity has two halves that must agree: `req.resume` threads the *conversation*
|
|
75
|
-
* via `--resume`, and a stable cwd threads both the *files* and — critically — Claude
|
|
76
|
-
* Code's session store, which is keyed by cwd, so `--resume` only resolves when every
|
|
77
|
-
* turn runs in the same directory. Both modes have a stable cwd, but they are DIFFERENT
|
|
78
|
-
* directories, so switching mode strands the old session id; the phone starts a fresh
|
|
79
|
-
* conversation on a switch, and the first-output deadline below catches it if it doesn't.
|
|
80
|
-
*/
|
|
67
|
+
/** Run a turn in an existing checkout or persistent worker without resetting its files. */
|
|
81
68
|
export declare function runCodeTurn(req: CodeTurnRequest, deps: RunCodeTurnDeps): Promise<void>;
|
|
82
69
|
//# sourceMappingURL=runCodeTurn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCodeTurn.d.ts","sourceRoot":"","sources":["../../src/coding/runCodeTurn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"runCodeTurn.d.ts","sourceRoot":"","sources":["../../src/coding/runCodeTurn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAuB,MAAM,mBAAmB,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;A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