soraacode 0.1.0 → 0.1.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/package.json +12 -20
- package/parsers-config.ts +1 -1
- package/script/bench-search.ts +3 -3
- package/script/build.ts +1 -1
- package/script/publish.ts +1 -1
- package/script/schema.ts +2 -2
- package/specs/tui-plugins.md +7 -7
- package/specs/v2/api.ts +2 -2
- package/src/account/account.ts +3 -3
- package/src/account/repo.ts +4 -4
- package/src/acp/agent.ts +1 -1
- package/src/acp/content.ts +1 -1
- package/src/acp/directory.ts +3 -3
- package/src/acp/event.ts +1 -1
- package/src/acp/permission.ts +1 -1
- package/src/acp/service.ts +5 -5
- package/src/acp/session.ts +4 -4
- package/src/acp/usage.ts +5 -5
- package/src/agent/agent.ts +11 -11
- package/src/agent/subagent-permissions.ts +1 -1
- package/src/auth/index.ts +4 -4
- package/src/background/job.ts +3 -3
- package/src/cli/cmd/serve.ts +1 -1
- package/src/cli/error.ts +1 -1
- package/src/cli/heap.ts +2 -2
- package/src/cli/network.ts +1 -1
- package/src/command/index.ts +2 -2
- package/src/config/agent.ts +2 -2
- package/src/config/command.ts +3 -3
- package/src/config/config.ts +15 -15
- package/src/config/markdown.ts +2 -2
- package/src/config/parse.ts +2 -2
- package/src/config/paths.ts +3 -3
- package/src/config/plugin.ts +2 -2
- package/src/config/v2-compat.ts +4 -4
- package/src/config/variable.ts +1 -1
- package/src/control-plane/adapters/index.ts +1 -1
- package/src/control-plane/dev/debug-workspace-plugin.ts +1 -1
- package/src/control-plane/types.ts +3 -3
- package/src/control-plane/workspace-context.ts +1 -1
- package/src/control-plane/workspace.ts +13 -13
- package/src/effect/app-node-builder-v1.ts +2 -2
- package/src/effect/app-runtime.ts +9 -9
- package/src/effect/bootstrap-runtime.ts +4 -4
- package/src/effect/bridge.ts +1 -1
- package/src/effect/instance-ref.ts +1 -1
- package/src/effect/run-service.ts +2 -2
- package/src/effect/runtime-flags.ts +1 -1
- package/src/env/index.ts +2 -2
- package/src/event-manifest.ts +1 -1
- package/src/event-v2-bridge.ts +5 -5
- package/src/format/formatter.ts +2 -2
- package/src/format/index.ts +3 -3
- package/src/git/index.ts +2 -2
- package/src/ide/index.ts +2 -2
- package/src/image/image.ts +2 -2
- package/src/index-headless.ts +1 -1
- package/src/index.ts +1 -1
- package/src/installation/index.ts +9 -9
- package/src/lsp/lsp.ts +4 -4
- package/src/lsp/server.ts +4 -4
- package/src/mcp/auth.ts +5 -5
- package/src/mcp/browser.ts +1 -1
- package/src/mcp/index.ts +9 -9
- package/src/mcp/oauth-callback.ts +1 -1
- package/src/node.ts +1 -1
- package/src/patch/index.ts +1 -1
- package/src/permission/index.ts +4 -4
- package/src/plugin/github-copilot/copilot.ts +3 -3
- package/src/plugin/github-copilot/models.ts +1 -1
- package/src/plugin/index.ts +5 -5
- package/src/plugin/install.ts +2 -2
- package/src/plugin/loader.ts +2 -2
- package/src/plugin/meta.ts +3 -3
- package/src/plugin/openai/codex.ts +3 -3
- package/src/plugin/pty-environment.ts +1 -1
- package/src/plugin/shared.ts +1 -1
- package/src/project/bootstrap.ts +1 -1
- package/src/project/instance-context.ts +1 -1
- package/src/project/instance-store.ts +4 -4
- package/src/project/project.ts +16 -16
- package/src/project/vcs.ts +4 -4
- package/src/provider/auth.ts +5 -5
- package/src/provider/error.ts +2 -2
- package/src/provider/model-status.ts +1 -1
- package/src/provider/provider.ts +13 -13
- package/src/provider/transform.ts +1 -1
- package/src/question/index.ts +2 -2
- package/src/question/schema.ts +1 -1
- package/src/server/auth.ts +1 -1
- package/src/server/event.ts +1 -1
- package/src/server/routes/instance/httpapi/api.ts +7 -7
- package/src/server/routes/instance/httpapi/groups/config.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/control-plane.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/control.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/experimental.ts +3 -3
- package/src/server/routes/instance/httpapi/groups/file.ts +2 -2
- package/src/server/routes/instance/httpapi/groups/global.ts +3 -3
- package/src/server/routes/instance/httpapi/groups/mcp.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/permission.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/project-copy.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/project.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/provider.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/pty.ts +3 -3
- package/src/server/routes/instance/httpapi/groups/session.ts +4 -4
- package/src/server/routes/instance/httpapi/groups/sync.ts +2 -2
- package/src/server/routes/instance/httpapi/handlers/control-plane.ts +2 -2
- package/src/server/routes/instance/httpapi/handlers/control.ts +1 -1
- package/src/server/routes/instance/httpapi/handlers/event.ts +1 -1
- package/src/server/routes/instance/httpapi/handlers/file.ts +6 -6
- package/src/server/routes/instance/httpapi/handlers/global.ts +2 -2
- package/src/server/routes/instance/httpapi/handlers/instance.ts +1 -1
- package/src/server/routes/instance/httpapi/handlers/permission.ts +1 -1
- package/src/server/routes/instance/httpapi/handlers/project-copy.ts +2 -2
- package/src/server/routes/instance/httpapi/handlers/project.ts +1 -1
- package/src/server/routes/instance/httpapi/handlers/provider.ts +2 -2
- package/src/server/routes/instance/httpapi/handlers/pty.ts +9 -9
- package/src/server/routes/instance/httpapi/handlers/session.ts +3 -3
- package/src/server/routes/instance/httpapi/handlers/sync.ts +3 -3
- package/src/server/routes/instance/httpapi/middleware/authorization.ts +1 -1
- package/src/server/routes/instance/httpapi/middleware/error.ts +2 -2
- package/src/server/routes/instance/httpapi/middleware/fence.ts +2 -2
- package/src/server/routes/instance/httpapi/middleware/workspace-routing.ts +2 -2
- package/src/server/routes/instance/httpapi/server.ts +27 -27
- package/src/server/routes/instance/httpapi/websocket-tracker.ts +1 -1
- package/src/server/server.ts +2 -2
- package/src/server/shared/fence.ts +3 -3
- package/src/server/shared/ui.ts +1 -1
- package/src/server/tui-event.ts +1 -1
- package/src/session/compaction.ts +8 -8
- package/src/session/instruction.ts +6 -6
- package/src/session/llm/AGENTS.md +8 -8
- package/src/session/llm/ai-sdk.ts +2 -2
- package/src/session/llm/native-request.ts +4 -4
- package/src/session/llm/native-runtime.ts +4 -4
- package/src/session/llm/request.ts +3 -3
- package/src/session/llm.ts +10 -10
- package/src/session/message-error.ts +1 -1
- package/src/session/message-v2.ts +7 -7
- package/src/session/message.ts +3 -3
- package/src/session/overflow.ts +2 -2
- package/src/session/processor.ts +5 -5
- package/src/session/prompt.ts +13 -13
- package/src/session/reminders.ts +2 -2
- package/src/session/retry.ts +2 -2
- package/src/session/revert.ts +2 -2
- package/src/session/run-state.ts +2 -2
- package/src/session/schema.ts +2 -2
- package/src/session/session.ts +20 -20
- package/src/session/status.ts +2 -2
- package/src/session/summary.ts +2 -2
- package/src/session/system.ts +6 -6
- package/src/session/todo.ts +4 -4
- package/src/session/tools.ts +3 -3
- package/src/share/session.ts +1 -1
- package/src/share/share-next.ts +9 -9
- package/src/skill/discovery.ts +4 -4
- package/src/skill/index.ts +7 -7
- package/src/snapshot/index.ts +6 -6
- package/src/storage/schema.ts +5 -5
- package/src/storage/storage.ts +4 -4
- package/src/sync/schema.ts +1 -1
- package/src/temporary.ts +1 -1
- package/src/tool/apply_patch.ts +3 -3
- package/src/tool/code-mode.ts +1 -1
- package/src/tool/edit.ts +3 -3
- package/src/tool/external-directory.ts +1 -1
- package/src/tool/glob.ts +2 -2
- package/src/tool/grep.ts +2 -2
- package/src/tool/lsp.ts +1 -1
- package/src/tool/plan.ts +1 -1
- package/src/tool/read.ts +2 -2
- package/src/tool/registry.ts +11 -11
- package/src/tool/schema.ts +1 -1
- package/src/tool/shell/prompt.ts +2 -2
- package/src/tool/shell.ts +2 -2
- package/src/tool/skill.ts +1 -1
- package/src/tool/task.ts +2 -2
- package/src/tool/tool.ts +2 -2
- package/src/tool/truncate.ts +2 -2
- package/src/tool/truncation-dir.ts +1 -1
- package/src/tool/websearch.ts +2 -2
- package/src/tool/write.ts +3 -3
- package/src/util/bom.ts +1 -1
- package/src/util/filesystem.ts +2 -2
- package/src/util/repository.ts +1 -1
- package/src/util/token.ts +1 -1
- package/src/worktree/index.ts +10 -10
package/src/session/revert.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { Effect, Layer, Context, Schema } from "effect"
|
|
3
|
-
import { SessionV1 } from "@
|
|
3
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
4
4
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
5
5
|
import { Snapshot } from "../snapshot"
|
|
6
6
|
import { Storage } from "@/storage/storage"
|
package/src/session/run-state.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { InstanceState } from "@/effect/instance-state"
|
|
3
|
-
import { SessionV1 } from "@
|
|
3
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
4
4
|
import { Runner } from "@/effect/runner"
|
|
5
5
|
import { BackgroundJob } from "@/background/job"
|
|
6
6
|
import { Effect, Latch, Layer, Scope, Context } from "effect"
|
package/src/session/schema.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
2
|
|
|
3
3
|
import { Identifier } from "@/id/id"
|
|
4
|
-
import { SessionV2 } from "@
|
|
5
|
-
import { statics } from "@
|
|
4
|
+
import { SessionV2 } from "@soraacode/core/session"
|
|
5
|
+
import { statics } from "@soraacode/core/schema"
|
|
6
6
|
|
|
7
7
|
export const SessionID = SessionV2.ID
|
|
8
8
|
export type SessionID = Schema.Schema.Type<typeof SessionID>
|
package/src/session/session.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
2
|
-
import { PermissionV1 } from "@
|
|
3
|
-
import { Slug } from "@
|
|
4
|
-
import { SessionV1 } from "@
|
|
5
|
-
import { serviceUse } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
|
+
import { PermissionV1 } from "@soraacode/core/v1/permission"
|
|
3
|
+
import { Slug } from "@soraacode/core/util/slug"
|
|
4
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
5
|
+
import { serviceUse } from "@soraacode/core/effect/service-use"
|
|
6
6
|
import path from "path"
|
|
7
7
|
import { BackgroundJob } from "@/background/job"
|
|
8
8
|
import { Decimal } from "decimal.js"
|
|
9
|
-
import type { ProviderMetadata, Usage } from "@
|
|
10
|
-
import { InstallationVersion } from "@
|
|
11
|
-
import { Database } from "@
|
|
9
|
+
import type { ProviderMetadata, Usage } from "@soraacode/llm"
|
|
10
|
+
import { InstallationVersion } from "@soraacode/core/installation/version"
|
|
11
|
+
import { Database } from "@soraacode/core/database/database"
|
|
12
12
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
13
|
-
import { SessionV2 } from "@
|
|
14
|
-
import * as SessionExecutionLocal from "@
|
|
15
|
-
import { locationServiceMapLayer } from "@
|
|
13
|
+
import { SessionV2 } from "@soraacode/core/session"
|
|
14
|
+
import * as SessionExecutionLocal from "@soraacode/core/session/execution/local"
|
|
15
|
+
import { locationServiceMapLayer } from "@soraacode/core/location-services"
|
|
16
16
|
|
|
17
17
|
import { NotFoundError } from "@/storage/storage"
|
|
18
18
|
import { eq } from "drizzle-orm"
|
|
@@ -26,24 +26,24 @@ import { inArray } from "drizzle-orm"
|
|
|
26
26
|
import { lt } from "drizzle-orm"
|
|
27
27
|
import { or } from "drizzle-orm"
|
|
28
28
|
import type { SQL } from "drizzle-orm"
|
|
29
|
-
import { PartTable, SessionTable } from "@
|
|
30
|
-
import { ProjectTable } from "@
|
|
29
|
+
import { PartTable, SessionTable } from "@soraacode/core/session/sql"
|
|
30
|
+
import { ProjectTable } from "@soraacode/core/project/sql"
|
|
31
31
|
import { MessageV2 } from "./message-v2"
|
|
32
32
|
import type { InstanceContext } from "../project/instance-context"
|
|
33
33
|
import { InstanceState } from "@/effect/instance-state"
|
|
34
34
|
import { Snapshot } from "@/snapshot"
|
|
35
|
-
import { ProjectV2 } from "@
|
|
36
|
-
import { WorkspaceV2 } from "@
|
|
35
|
+
import { ProjectV2 } from "@soraacode/core/project"
|
|
36
|
+
import { WorkspaceV2 } from "@soraacode/core/workspace"
|
|
37
37
|
import { SessionID, MessageID, PartID } from "./schema"
|
|
38
38
|
|
|
39
39
|
import type { Provider } from "@/provider/provider"
|
|
40
|
-
import { Global } from "@
|
|
40
|
+
import { Global } from "@soraacode/core/global"
|
|
41
41
|
import { Effect, Layer, Option, Context, Schema, Types } from "effect"
|
|
42
|
-
import { NonNegativeInt, optional } from "@
|
|
42
|
+
import { NonNegativeInt, optional } from "@soraacode/core/schema"
|
|
43
43
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
44
|
-
import { ProviderV2 } from "@
|
|
45
|
-
import { ModelV2 } from "@
|
|
46
|
-
import { SessionMessage } from "@
|
|
44
|
+
import { ProviderV2 } from "@soraacode/core/provider"
|
|
45
|
+
import { ModelV2 } from "@soraacode/core/model"
|
|
46
|
+
import { SessionMessage } from "@soraacode/schema/session-message"
|
|
47
47
|
|
|
48
48
|
const parentTitlePrefix = "New session - "
|
|
49
49
|
const childTitlePrefix = "Child session - "
|
package/src/session/status.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { InstanceState } from "@/effect/instance-state"
|
|
3
3
|
import { SessionID } from "./schema"
|
|
4
4
|
import { Effect, Layer, Context } from "effect"
|
|
5
5
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
6
|
-
import { SessionStatusEvent } from "@
|
|
6
|
+
import { SessionStatusEvent } from "@soraacode/schema/session-status-event"
|
|
7
7
|
|
|
8
8
|
export const Info = SessionStatusEvent.Info
|
|
9
9
|
export type Info = SessionStatusEvent.Info
|
package/src/session/summary.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { Effect, Layer, Context, Schema } from "effect"
|
|
3
|
-
import { SessionV1 } from "@
|
|
3
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
4
4
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
5
5
|
import { Snapshot } from "@/snapshot"
|
|
6
6
|
import { Session } from "./session"
|
package/src/session/system.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { Context, Effect, Layer } from "effect"
|
|
3
3
|
|
|
4
4
|
import { InstanceState } from "@/effect/instance-state"
|
|
@@ -8,12 +8,12 @@ import type { Provider } from "@/provider/provider"
|
|
|
8
8
|
import type { Agent } from "@/agent/agent"
|
|
9
9
|
import { Permission } from "@/permission"
|
|
10
10
|
import { Skill } from "@/skill"
|
|
11
|
-
import { AbsolutePath } from "@
|
|
12
|
-
import { Location } from "@
|
|
13
|
-
import { LocationServiceMap, locationServiceMapLayer } from "@
|
|
14
|
-
import { Reference } from "@
|
|
11
|
+
import { AbsolutePath } from "@soraacode/core/schema"
|
|
12
|
+
import { Location } from "@soraacode/core/location"
|
|
13
|
+
import { LocationServiceMap, locationServiceMapLayer } from "@soraacode/core/location-services"
|
|
14
|
+
import { Reference } from "@soraacode/core/reference"
|
|
15
15
|
import { MCP } from "@/mcp"
|
|
16
|
-
import { PermissionV1 } from "@
|
|
16
|
+
import { PermissionV1 } from "@soraacode/core/v1/permission"
|
|
17
17
|
|
|
18
18
|
export function provider(model: Provider.Model) {
|
|
19
19
|
return [PROMPT_DEFAULT]
|
package/src/session/todo.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { SessionID } from "./schema"
|
|
3
3
|
import { Effect, Layer, Context } from "effect"
|
|
4
|
-
import { Database } from "@
|
|
4
|
+
import { Database } from "@soraacode/core/database/database"
|
|
5
5
|
import { eq } from "drizzle-orm"
|
|
6
6
|
import { asc } from "drizzle-orm"
|
|
7
|
-
import { TodoTable } from "@
|
|
7
|
+
import { TodoTable } from "@soraacode/core/session/sql"
|
|
8
8
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
9
|
-
import { SessionTodo } from "@
|
|
9
|
+
import { SessionTodo } from "@soraacode/schema/session-todo"
|
|
10
10
|
|
|
11
11
|
export const Info = SessionTodo.Info
|
|
12
12
|
export type Info = SessionTodo.Info
|
package/src/session/tools.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Agent } from "@/agent/agent"
|
|
2
|
-
import { SessionV1 } from "@
|
|
2
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
3
3
|
import { Provider } from "@/provider/provider"
|
|
4
4
|
import { ProviderTransform } from "@/provider/transform"
|
|
5
5
|
import { MCP } from "@/mcp"
|
|
@@ -19,8 +19,8 @@ import { Session } from "./session"
|
|
|
19
19
|
import { SessionProcessor } from "./processor"
|
|
20
20
|
import { PartID } from "./schema"
|
|
21
21
|
import { EffectBridge } from "@/effect/bridge"
|
|
22
|
-
import { ProviderV2 } from "@
|
|
23
|
-
import { ModelV2 } from "@
|
|
22
|
+
import { ProviderV2 } from "@soraacode/core/provider"
|
|
23
|
+
import { ModelV2 } from "@soraacode/core/model"
|
|
24
24
|
import { isRecord } from "@/util/record"
|
|
25
25
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
26
26
|
|
package/src/share/session.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { Session } from "@/session/session"
|
|
3
3
|
import { SessionID } from "@/session/schema"
|
|
4
4
|
import { Effect, Layer, Scope, Context } from "effect"
|
package/src/share/share-next.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
2
|
-
import { httpClient } from "@
|
|
3
|
-
import type * as SDK from "@
|
|
4
|
-
import { serviceUse } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
|
+
import { httpClient } from "@soraacode/core/effect/app-node-platform"
|
|
3
|
+
import type * as SDK from "@soraacode/sdk/v2"
|
|
4
|
+
import { serviceUse } from "@soraacode/core/effect/service-use"
|
|
5
5
|
import { Effect, Exit, Layer, Option, Schema, Scope, Context, Stream } from "effect"
|
|
6
6
|
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"
|
|
7
7
|
import { Account } from "@/account/account"
|
|
@@ -12,13 +12,13 @@ import { Provider } from "@/provider/provider"
|
|
|
12
12
|
import { Session } from "@/session/session"
|
|
13
13
|
import { MessageV2 } from "@/session/message-v2"
|
|
14
14
|
import type { SessionID } from "@/session/schema"
|
|
15
|
-
import { Database } from "@
|
|
15
|
+
import { Database } from "@soraacode/core/database/database"
|
|
16
16
|
import { eq } from "drizzle-orm"
|
|
17
17
|
import { Config } from "@/config/config"
|
|
18
|
-
import { SessionShareTable } from "@
|
|
19
|
-
import { ProviderV2 } from "@
|
|
20
|
-
import { ModelV2 } from "@
|
|
21
|
-
import { EventV2 } from "@
|
|
18
|
+
import { SessionShareTable } from "@soraacode/core/share/sql"
|
|
19
|
+
import { ProviderV2 } from "@soraacode/core/provider"
|
|
20
|
+
import { ModelV2 } from "@soraacode/core/model"
|
|
21
|
+
import { EventV2 } from "@soraacode/core/event"
|
|
22
22
|
|
|
23
23
|
const disabled = process.env["OPENCODE_DISABLE_SHARE"] === "true" || process.env["OPENCODE_DISABLE_SHARE"] === "1"
|
|
24
24
|
|
package/src/skill/discovery.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
2
|
-
import { httpClient, path } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
|
+
import { httpClient, path } from "@soraacode/core/effect/app-node-platform"
|
|
3
3
|
import { NodePath } from "@effect/platform-node"
|
|
4
4
|
import { Effect, Layer, Path, Schema, Context } from "effect"
|
|
5
5
|
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http"
|
|
6
6
|
import { withTransientReadRetry } from "@/util/effect-http-client"
|
|
7
|
-
import { FSUtil } from "@
|
|
8
|
-
import { Global } from "@
|
|
7
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
8
|
+
import { Global } from "@soraacode/core/global"
|
|
9
9
|
|
|
10
10
|
const skillConcurrency = 4
|
|
11
11
|
const fileConcurrency = 8
|
package/src/skill/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import path from "path"
|
|
3
3
|
import { Effect, Layer, Context, Schema } from "effect"
|
|
4
|
-
import { NamedError } from "@
|
|
4
|
+
import { NamedError } from "@soraacode/core/util/error"
|
|
5
5
|
import type { Agent } from "@/agent/agent"
|
|
6
6
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
7
7
|
import { InstanceState } from "@/effect/instance-state"
|
|
8
|
-
import { Global } from "@
|
|
9
|
-
import { SkillPlugin } from "@
|
|
8
|
+
import { Global } from "@soraacode/core/global"
|
|
9
|
+
import { SkillPlugin } from "@soraacode/core/plugin/skill"
|
|
10
10
|
import { Permission } from "@/permission"
|
|
11
|
-
import { FSUtil } from "@
|
|
11
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
12
12
|
import { Config } from "@/config/config"
|
|
13
|
-
import { FrontmatterError } from "@
|
|
13
|
+
import { FrontmatterError } from "@soraacode/core/v1/config/error"
|
|
14
14
|
import { ConfigMarkdown } from "@/config/markdown"
|
|
15
15
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
16
|
-
import { Glob } from "@
|
|
16
|
+
import { Glob } from "@soraacode/core/util/glob"
|
|
17
17
|
import { Discovery } from "./discovery"
|
|
18
18
|
import { isRecord } from "@/util/record"
|
|
19
19
|
import { escapeHtml } from "@/util/html"
|
package/src/snapshot/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { Cause, Duration, Effect, Layer, Schedule, Schema, Semaphore, Context } from "effect"
|
|
3
3
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
|
|
4
4
|
import { formatPatch, structuredPatch } from "diff"
|
|
5
5
|
import path from "path"
|
|
6
|
-
import { AppProcess } from "@
|
|
6
|
+
import { AppProcess } from "@soraacode/core/process"
|
|
7
7
|
import { InstanceState } from "@/effect/instance-state"
|
|
8
|
-
import { FSUtil } from "@
|
|
9
|
-
import { Hash } from "@
|
|
8
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
9
|
+
import { Hash } from "@soraacode/core/util/hash"
|
|
10
10
|
import { Config } from "@/config/config"
|
|
11
|
-
import { Global } from "@
|
|
12
|
-
import { Info } from "@
|
|
11
|
+
import { Global } from "@soraacode/core/global"
|
|
12
|
+
import { Info } from "@soraacode/schema/file-diff"
|
|
13
13
|
|
|
14
14
|
export const Patch = Schema.Struct({
|
|
15
15
|
hash: Schema.String,
|
package/src/storage/schema.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AccountTable, AccountStateTable, ControlAccountTable } from "@
|
|
2
|
-
export { ProjectTable } from "@
|
|
3
|
-
export { SessionTable, MessageTable, PartTable, TodoTable } from "@
|
|
4
|
-
export { SessionShareTable } from "@
|
|
5
|
-
export { WorkspaceTable } from "@
|
|
1
|
+
export { AccountTable, AccountStateTable, ControlAccountTable } from "@soraacode/core/account/sql"
|
|
2
|
+
export { ProjectTable } from "@soraacode/core/project/sql"
|
|
3
|
+
export { SessionTable, MessageTable, PartTable, TodoTable } from "@soraacode/core/session/sql"
|
|
4
|
+
export { SessionShareTable } from "@soraacode/core/share/sql"
|
|
5
|
+
export { WorkspaceTable } from "@soraacode/core/control-plane/workspace.sql"
|
package/src/storage/storage.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import path from "path"
|
|
3
|
-
import { Global } from "@
|
|
4
|
-
import { FSUtil } from "@
|
|
3
|
+
import { Global } from "@soraacode/core/global"
|
|
4
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
5
5
|
import { Effect, Exit, Layer, Option, RcMap, Schema, Context, TxReentrantLock } from "effect"
|
|
6
|
-
import { NonNegativeInt } from "@
|
|
6
|
+
import { NonNegativeInt } from "@soraacode/core/schema"
|
|
7
7
|
import { Git } from "@/git"
|
|
8
8
|
|
|
9
9
|
type Migration = (dir: string, fs: FSUtil.Interface, git: Git.Interface) => Effect.Effect<void, FSUtil.Error>
|
package/src/sync/schema.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
2
|
|
|
3
3
|
import { Identifier } from "@/id/id"
|
|
4
|
-
import { statics } from "@
|
|
4
|
+
import { statics } from "@soraacode/core/schema"
|
|
5
5
|
|
|
6
6
|
export const EventID = Schema.String.check(Schema.isStartsWith("evt")).pipe(
|
|
7
7
|
Schema.brand("EventID"),
|
package/src/temporary.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import yargs from "yargs"
|
|
2
2
|
import { TuiThreadCommand } from "./cli/cmd/tui"
|
|
3
|
-
import { InstallationVersion } from "@
|
|
3
|
+
import { InstallationVersion } from "@soraacode/core/installation/version"
|
|
4
4
|
import { hideBin } from "yargs/helpers"
|
|
5
5
|
const cli = yargs(hideBin(process.argv))
|
|
6
6
|
.parserConfiguration({ "populate--": true })
|
package/src/tool/apply_patch.ts
CHANGED
|
@@ -2,16 +2,16 @@ import * as path from "path"
|
|
|
2
2
|
import { Effect, Schema } from "effect"
|
|
3
3
|
import * as Tool from "./tool"
|
|
4
4
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
5
|
-
import { Watcher } from "@
|
|
5
|
+
import { Watcher } from "@soraacode/core/filesystem/watcher"
|
|
6
6
|
import { InstanceState } from "@/effect/instance-state"
|
|
7
7
|
import { Patch } from "../patch"
|
|
8
8
|
import { createTwoFilesPatch, diffLines } from "diff"
|
|
9
9
|
import { assertExternalDirectoryEffect } from "./external-directory"
|
|
10
10
|
import { trimDiff } from "./edit"
|
|
11
11
|
import { LSP } from "@/lsp/lsp"
|
|
12
|
-
import { FSUtil } from "@
|
|
12
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
13
13
|
import DESCRIPTION from "./apply_patch.txt"
|
|
14
|
-
import { FileSystem } from "@
|
|
14
|
+
import { FileSystem } from "@soraacode/core/filesystem"
|
|
15
15
|
import { Format } from "../format"
|
|
16
16
|
import * as Bom from "@/util/bom"
|
|
17
17
|
|
package/src/tool/code-mode.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Tool from "./tool"
|
|
2
2
|
import { CallToolResultSchema, type CallToolResult } from "@modelcontextprotocol/sdk/types.js"
|
|
3
3
|
import { Cause, Effect, Schema } from "effect"
|
|
4
|
-
import { CodeMode, Tool as SandboxTool, toolError } from "@
|
|
4
|
+
import { CodeMode, Tool as SandboxTool, toolError } from "@soraacode/codemode"
|
|
5
5
|
import { MCP } from "@/mcp"
|
|
6
6
|
import { McpCatalog } from "@/mcp/catalog"
|
|
7
7
|
import { Agent } from "@/agent/agent"
|
package/src/tool/edit.ts
CHANGED
|
@@ -9,14 +9,14 @@ import * as Tool from "./tool"
|
|
|
9
9
|
import { LSP } from "@/lsp/lsp"
|
|
10
10
|
import { createTwoFilesPatch, diffLines } from "diff"
|
|
11
11
|
import DESCRIPTION from "./edit.txt"
|
|
12
|
-
import { FileSystem } from "@
|
|
13
|
-
import { Watcher } from "@
|
|
12
|
+
import { FileSystem } from "@soraacode/core/filesystem"
|
|
13
|
+
import { Watcher } from "@soraacode/core/filesystem/watcher"
|
|
14
14
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
15
15
|
import { Format } from "../format"
|
|
16
16
|
import { InstanceState } from "@/effect/instance-state"
|
|
17
17
|
import { Snapshot } from "@/snapshot"
|
|
18
18
|
import { assertExternalDirectoryEffect } from "./external-directory"
|
|
19
|
-
import { FSUtil } from "@
|
|
19
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
20
20
|
import * as Bom from "@/util/bom"
|
|
21
21
|
|
|
22
22
|
function normalizeLineEndings(text: string): string {
|
|
@@ -3,7 +3,7 @@ import { Effect } from "effect"
|
|
|
3
3
|
import { InstanceState } from "@/effect/instance-state"
|
|
4
4
|
import type * as Tool from "./tool"
|
|
5
5
|
import { containsPath } from "../project/instance-context"
|
|
6
|
-
import { FSUtil } from "@
|
|
6
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
7
7
|
|
|
8
8
|
type Kind = "file" | "directory"
|
|
9
9
|
|
package/src/tool/glob.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "path"
|
|
2
2
|
import { Effect, Schema } from "effect"
|
|
3
3
|
import { InstanceState } from "@/effect/instance-state"
|
|
4
|
-
import { FSUtil } from "@
|
|
5
|
-
import { Ripgrep } from "@
|
|
4
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
5
|
+
import { Ripgrep } from "@soraacode/core/ripgrep"
|
|
6
6
|
import { assertExternalDirectoryEffect } from "./external-directory"
|
|
7
7
|
import DESCRIPTION from "./glob.txt"
|
|
8
8
|
import * as Tool from "./tool"
|
package/src/tool/grep.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path from "path"
|
|
2
2
|
import { Effect, Schema } from "effect"
|
|
3
3
|
import { InstanceState } from "@/effect/instance-state"
|
|
4
|
-
import { FSUtil } from "@
|
|
5
|
-
import { Ripgrep } from "@
|
|
4
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
5
|
+
import { Ripgrep } from "@soraacode/core/ripgrep"
|
|
6
6
|
import { assertExternalDirectoryEffect } from "./external-directory"
|
|
7
7
|
import DESCRIPTION from "./grep.txt"
|
|
8
8
|
import * as Tool from "./tool"
|
package/src/tool/lsp.ts
CHANGED
|
@@ -6,7 +6,7 @@ import DESCRIPTION from "./lsp.txt"
|
|
|
6
6
|
import { InstanceState } from "@/effect/instance-state"
|
|
7
7
|
import { pathToFileURL } from "url"
|
|
8
8
|
import { assertExternalDirectoryEffect } from "./external-directory"
|
|
9
|
-
import { FSUtil } from "@
|
|
9
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
10
10
|
|
|
11
11
|
const operations = [
|
|
12
12
|
"goToDefinition",
|
package/src/tool/plan.ts
CHANGED
package/src/tool/read.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect, Option, Schema, Scope, Stream } from "effect"
|
|
2
|
-
import { NonNegativeInt } from "@
|
|
2
|
+
import { NonNegativeInt } from "@soraacode/core/schema"
|
|
3
3
|
import * as path from "path"
|
|
4
4
|
import * as Tool from "./tool"
|
|
5
|
-
import { FSUtil } from "@
|
|
5
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
6
6
|
import { LSP } from "@/lsp/lsp"
|
|
7
7
|
import DESCRIPTION from "./read.txt"
|
|
8
8
|
import { InstanceState } from "@/effect/instance-state"
|
package/src/tool/registry.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
2
|
-
import { httpClient } from "@
|
|
3
|
-
import { Ripgrep } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
|
+
import { httpClient } from "@soraacode/core/effect/app-node-platform"
|
|
3
|
+
import { Ripgrep } from "@soraacode/core/ripgrep"
|
|
4
4
|
import { PlanExitTool } from "./plan"
|
|
5
5
|
import { Session } from "@/session/session"
|
|
6
6
|
import { QuestionTool } from "./question"
|
|
@@ -10,7 +10,7 @@ import { GlobTool } from "./glob"
|
|
|
10
10
|
import { GrepTool } from "./grep"
|
|
11
11
|
import { ReadTool } from "./read"
|
|
12
12
|
import { TaskTool } from "./task"
|
|
13
|
-
import { Database } from "@
|
|
13
|
+
import { Database } from "@soraacode/core/database/database"
|
|
14
14
|
import { TodoWriteTool } from "./todo"
|
|
15
15
|
import { WebFetchTool } from "./webfetch"
|
|
16
16
|
import { WriteTool } from "./write"
|
|
@@ -18,7 +18,7 @@ import { InvalidTool } from "./invalid"
|
|
|
18
18
|
import { SkillTool } from "./skill"
|
|
19
19
|
import * as Tool from "./tool"
|
|
20
20
|
import { Config } from "@/config/config"
|
|
21
|
-
import { type ToolContext as PluginToolContext, type ToolDefinition } from "@
|
|
21
|
+
import { type ToolContext as PluginToolContext, type ToolDefinition } from "@soraacode/plugin"
|
|
22
22
|
import type { JSONSchema7, JSONSchema7Definition } from "@ai-sdk/provider"
|
|
23
23
|
import { Schema } from "effect"
|
|
24
24
|
import z from "zod"
|
|
@@ -29,12 +29,12 @@ import { WebSearchTool } from "./websearch"
|
|
|
29
29
|
import { LspTool } from "./lsp"
|
|
30
30
|
import * as Truncate from "./truncate"
|
|
31
31
|
import { ApplyPatchTool } from "./apply_patch"
|
|
32
|
-
import { Glob } from "@
|
|
32
|
+
import { Glob } from "@soraacode/core/util/glob"
|
|
33
33
|
import path from "path"
|
|
34
34
|
import { pathToFileURL } from "url"
|
|
35
35
|
import { Effect, Layer, Context } from "effect"
|
|
36
36
|
import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner"
|
|
37
|
-
import { CrossSpawnSpawner } from "@
|
|
37
|
+
import { CrossSpawnSpawner } from "@soraacode/core/cross-spawn-spawner"
|
|
38
38
|
import { Format } from "../format"
|
|
39
39
|
import { InstanceState } from "@/effect/instance-state"
|
|
40
40
|
import { EffectBridge } from "@/effect/bridge"
|
|
@@ -42,17 +42,17 @@ import { Question } from "../question"
|
|
|
42
42
|
import { Todo } from "../session/todo"
|
|
43
43
|
import { LSP } from "@/lsp/lsp"
|
|
44
44
|
import { Instruction } from "../session/instruction"
|
|
45
|
-
import { FSUtil } from "@
|
|
45
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
46
46
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
47
47
|
import { Agent } from "../agent/agent"
|
|
48
48
|
import { Skill } from "../skill"
|
|
49
49
|
import { Permission } from "@/permission"
|
|
50
50
|
import { BackgroundJob } from "@/background/job"
|
|
51
51
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
52
|
-
import { ProviderV2 } from "@
|
|
53
|
-
import { ModelV2 } from "@
|
|
52
|
+
import { ProviderV2 } from "@soraacode/core/provider"
|
|
53
|
+
import { ModelV2 } from "@soraacode/core/model"
|
|
54
54
|
import { MCP } from "@/mcp"
|
|
55
|
-
import { PermissionV1 } from "@
|
|
55
|
+
import { PermissionV1 } from "@soraacode/core/v1/permission"
|
|
56
56
|
import { McpCatalog } from "@/mcp/catalog"
|
|
57
57
|
|
|
58
58
|
export function webSearchEnabled(providerID: ProviderV2.ID, flags = { exa: false, parallel: false }) {
|
package/src/tool/schema.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
2
|
|
|
3
3
|
import { Identifier } from "@/id/id"
|
|
4
|
-
import { statics } from "@
|
|
4
|
+
import { statics } from "@soraacode/core/schema"
|
|
5
5
|
|
|
6
6
|
const toolIdSchema = Schema.String.check(Schema.isStartsWith("tool")).pipe(Schema.brand("ToolID"))
|
|
7
7
|
|
package/src/tool/shell/prompt.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
2
|
import DESCRIPTION from "./shell.txt"
|
|
3
|
-
import { PositiveInt } from "@
|
|
4
|
-
import { Global } from "@
|
|
3
|
+
import { PositiveInt } from "@soraacode/core/schema"
|
|
4
|
+
import { Global } from "@soraacode/core/global"
|
|
5
5
|
import { ShellID } from "./id"
|
|
6
6
|
|
|
7
7
|
const PS = new Set(["powershell", "pwsh"])
|
package/src/tool/shell.ts
CHANGED
|
@@ -8,11 +8,11 @@ import { InstanceState } from "@/effect/instance-state"
|
|
|
8
8
|
import { lazy } from "@/util/lazy"
|
|
9
9
|
import { Language, type Node } from "web-tree-sitter"
|
|
10
10
|
|
|
11
|
-
import { FSUtil } from "@
|
|
11
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
12
12
|
import { fileURLToPath } from "url"
|
|
13
13
|
import { Config } from "@/config/config"
|
|
14
14
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
15
|
-
import { Shell } from "@
|
|
15
|
+
import { Shell } from "@soraacode/core/shell"
|
|
16
16
|
import { ShellID } from "./shell/id"
|
|
17
17
|
|
|
18
18
|
import * as Truncate from "./truncate"
|
package/src/tool/skill.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "path"
|
|
2
2
|
import { Effect, Schema } from "effect"
|
|
3
|
-
import { Ripgrep } from "@
|
|
3
|
+
import { Ripgrep } from "@soraacode/core/ripgrep"
|
|
4
4
|
import { Skill } from "../skill"
|
|
5
5
|
import * as Tool from "./tool"
|
|
6
6
|
import DESCRIPTION from "./skill.txt"
|
package/src/tool/task.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Tool from "./tool"
|
|
2
2
|
import DESCRIPTION from "./task.txt"
|
|
3
3
|
import { ToolJsonSchema } from "./json-schema"
|
|
4
|
-
import { SessionV1 } from "@
|
|
4
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
5
5
|
import { BackgroundJob } from "@/background/job"
|
|
6
6
|
import { Session } from "@/session/session"
|
|
7
7
|
import { SessionID, MessageID } from "../session/schema"
|
|
@@ -13,7 +13,7 @@ import { Config } from "@/config/config"
|
|
|
13
13
|
import { Effect, Exit, Schema, Scope } from "effect"
|
|
14
14
|
import { EffectBridge } from "@/effect/bridge"
|
|
15
15
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
16
|
-
import { Database } from "@
|
|
16
|
+
import { Database } from "@soraacode/core/database/database"
|
|
17
17
|
|
|
18
18
|
export interface TaskPromptOps {
|
|
19
19
|
cancel(sessionID: SessionID): Effect.Effect<void>
|
package/src/tool/tool.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PermissionV1 } from "@
|
|
1
|
+
import { PermissionV1 } from "@soraacode/core/v1/permission"
|
|
2
2
|
import { Effect, Schema } from "effect"
|
|
3
|
-
import { SessionV1 } from "@
|
|
3
|
+
import { SessionV1 } from "@soraacode/core/v1/session"
|
|
4
4
|
import type { JSONSchema7 } from "@ai-sdk/provider"
|
|
5
5
|
import type { MessageV2 } from "../session/message-v2"
|
|
6
6
|
import type { Permission } from "../permission"
|
package/src/tool/truncate.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@soraacode/core/effect/layer-node"
|
|
2
2
|
import { NodePath } from "@effect/platform-node"
|
|
3
3
|
import { Cause, Duration, Effect, Layer, Option, Schedule, Context } from "effect"
|
|
4
4
|
import path from "path"
|
|
5
5
|
import type { Agent } from "../agent/agent"
|
|
6
|
-
import { FSUtil } from "@
|
|
6
|
+
import { FSUtil } from "@soraacode/core/fs-util"
|
|
7
7
|
import { evaluate } from "@/permission/evaluate"
|
|
8
8
|
import { Config } from "@/config/config"
|
|
9
9
|
import { ToolID } from "./schema"
|