GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(core): separate out location node functionality and integrat… · koji/opencode@ecdfff5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • core
      • package.json
      • src
        • agent.ts
        • aisdk.ts
        • background-job.ts
        • catalog.ts
        • command.ts
        • config.ts
        • credential.ts
        • cross-spawn-spawner.ts
        • database
          • database.ts
        • effect
          • layer-node-platform.ts
          • layer-node.ts
          • layer-node
            • index.ts
            • layer-node-tree.ts
            • layer-node.ts
          • node-build.ts
          • node.ts
          • scoped-node.ts
        • event.ts
        • file-mutation.ts
        • filesystem.ts
        • filesystem
          • search.ts
          • watcher.ts
        • fs-util.ts
        • git.ts
        • global.ts
        • image.ts
        • instruction-context.ts
        • integration.ts
        • location-layer.ts
        • location-mutation.ts
        • location-service-map.ts
        • location-services.ts
        • location.ts
        • models-dev.ts
        • npm.ts
        • permission.ts
        • permission
          • saved.ts
        • plugin.ts
        • plugin
          • internal.ts
        • policy.ts
        • process.ts
        • project.ts
        • project
          • copy.ts
          • directories.ts
        • pty.ts
        • pty
          • ticket.ts
        • question.ts
        • reference.ts
        • reference
          • guidance.ts
        • repository-cache.ts
        • ripgrep.ts
        • ripgrep
          • binary.ts
        • session.ts
        • session
          • execution.ts
          • execution
            • local.ts
          • projector.ts
          • runner
            • llm.ts
            • model.ts
          • store.ts
          • todo.ts
        • skill.ts
        • skill
          • discovery.ts
          • guidance.ts
        • snapshot.ts
        • system-context
          • builtins.ts
          • registry.ts
        • tool-output-store.ts
        • tool
          • application-tools.ts
          • builtins.ts
          • read-filesystem.ts
          • registry.ts
        • util
          • effect-flock.ts
      • test
        • effect/layer-node
          • layer-node-types.test.ts
          • layer-node.test.ts
          • node-build.test.ts
        • location-layer.test.ts
        • move-session.test.ts
        • permission.test.ts
        • session-create.test.ts
        • session-history.test.ts
        • session-projector.test.ts
        • session-prompt.test.ts
        • session-runner-recorded.test.ts
        • session-runner.test.ts
    • opencode
      • src
        • agent
          • agent.ts
        • cli/cmd/debug
          • file.ts
          • v2.ts
        • server/routes/instance/httpapi
          • handlers
            • file.ts
            • pty.ts
          • server.ts
        • session
          • message-v2.ts
          • session.ts
          • system.ts
      • test
        • agent
          • agent.test.ts
          • plugin-agent-regression.test.ts
        • effect
          • layer-node-tiers-types.test.ts
          • layer-node-tiers.test.ts
          • layer-node-types.test.ts
          • layer-node.test.ts
          • scoped-node-types.test.ts
        • git
          • git.test.ts
        • session
          • compaction.test.ts
          • messages-pagination.test.ts
          • processor-effect.test.ts
          • prompt.test.ts
          • retry.test.ts
          • snapshot-tool-race.test.ts
          • system.test.ts
        • share
          • share-next.test.ts
        • tool
          • registry.test.ts
    • server/src
      • handlers.ts
      • location.ts
      • middleware
        • session-location.ts
      • pty-environment.ts
      • routes.ts
  • specs
    • layer-node-tiers.md

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/core/package.json‎

Copy file name to clipboardExpand all lines: packages/core/package.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"opencode": "./bin/opencode"
1717
},
1818
"exports": {
19+
"./effect/layer-node": "./src/effect/layer-node/index.ts",
20+
"./effect/node": "./src/effect/node.ts",
1921
"./session/runner": "./src/session/runner/index.ts",
2022
"./system-context": "./src/system-context/index.ts",
2123
"./*": "./src/*.ts"
Collapse file

‎packages/core/src/agent.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/agent.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * as AgentV2 from "./agent"
22

3+
import { makeLocationNode } from "./effect/node"
34
import { Array, Context, Effect, Layer, Types } from "effect"
45
import { Agent } from "@opencode-ai/schema/agent"
56
import { State } from "./state"
@@ -106,3 +107,5 @@ export const layer = Layer.effect(
106107
)
107108

108109
export const locationLayer = layer
110+
111+
export const node = makeLocationNode({ service: Service, layer, deps: [] })
Collapse file

‎packages/core/src/aisdk.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/aisdk.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * as AISDK from "./aisdk"
22

3+
import { makeLocationNode } from "./effect/node"
34
import type { LanguageModelV3 } from "@ai-sdk/provider"
45
import { Cause, Context, Effect, Layer, Schema, Scope } from "effect"
56
import { ModelV2 } from "./model"
@@ -231,4 +232,6 @@ export const locationLayer = Layer.effect(
231232
}),
232233
)
233234

235+
export const node = makeLocationNode({ service: Service, layer: locationLayer, deps: [] })
236+
234237
export const defaultLayer = locationLayer
Collapse file

‎packages/core/src/background-job.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/background-job.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export * as BackgroundJob from "./background-job"
22

33
import { Cause, Clock, Context, Deferred, Effect, Exit, Layer, Scope, SynchronizedRef } from "effect"
44
import { Identifier } from "./id/id"
5+
import { makeGlobalNode } from "./effect/node"
56

67
export type Status = "running" | "completed" | "error" | "cancelled"
78

@@ -362,3 +363,5 @@ export const make = Effect.gen(function* () {
362363
export const layer = Layer.effect(Service, make)
363364

364365
export const defaultLayer = layer
366+
367+
export const node = makeGlobalNode({ service: Service, layer, deps: [] })
Collapse file

‎packages/core/src/catalog.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/catalog.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * as Catalog from "./catalog"
22

3+
import { makeLocationNode } from "./effect/node"
34
import { Array, Context, Effect, Layer, Option, Order, pipe, Schema } from "effect"
45
import { Catalog } from "@opencode-ai/schema/catalog"
56
import { ModelV2 } from "./model"
@@ -296,3 +297,5 @@ export const locationLayer = layer.pipe(
296297
Layer.provideMerge(Integration.locationLayer),
297298
Layer.provideMerge(Policy.locationLayer),
298299
)
300+
301+
export const node = makeLocationNode({ service: Service, layer, deps: [EventV2.node, Policy.node, Integration.node] })
Collapse file

‎packages/core/src/command.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/command.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * as CommandV2 from "./command"
22

3+
import { makeLocationNode } from "./effect/node"
34
import { Context, Effect, Layer, Types } from "effect"
45
import { Command } from "@opencode-ai/schema/command"
56
import { State } from "./state"
@@ -59,3 +60,5 @@ export const layer = Layer.effect(
5960
)
6061

6162
export const locationLayer = layer
63+
64+
export const node = makeLocationNode({ service: Service, layer, deps: [] })
Collapse file

‎packages/core/src/config.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/config.ts
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * as Config from "./config"
22

3+
import { makeLocationNode } from "./effect/node"
34
import path from "path"
45
import { type ParseError, parse } from "jsonc-parser"
56
import { Context, Effect, Layer, Option, Schema } from "effect"
@@ -218,3 +219,9 @@ export const layer = Layer.effect(
218219
)
219220

220221
export const locationLayer = layer.pipe(Layer.provideMerge(Policy.locationLayer))
222+
223+
export const node = makeLocationNode({
224+
service: Service,
225+
layer,
226+
deps: [FSUtil.node, Global.node, Location.node, Policy.node],
227+
})
Collapse file

‎packages/core/src/credential.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/credential.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Context, Effect, Layer, Schema } from "effect"
55
import { Credential } from "@opencode-ai/schema/credential"
66
import { Integration } from "@opencode-ai/schema/integration"
77
import { Database } from "./database/database"
8+
import { makeGlobalNode } from "./effect/node"
89
import { CredentialTable } from "./credential/sql"
910

1011
export const ID = Credential.ID
@@ -135,3 +136,5 @@ export const layer = Layer.effect(
135136
)
136137

137138
export const defaultLayer = layer.pipe(Layer.provide(Database.defaultLayer))
139+
140+
export const node = makeGlobalNode({ service: Service, layer, deps: [Database.node] })
Collapse file

‎packages/core/src/cross-spawn-spawner.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/cross-spawn-spawner.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
import * as NodeChildProcess from "node:child_process"
2525
import { PassThrough } from "node:stream"
2626
import launch from "cross-spawn"
27-
import { LayerNode } from "./effect/layer-node"
27+
import { makeGlobalNode } from "./effect/node"
2828
import { filesystem, path } from "./effect/layer-node-platform"
2929

3030
const toError = (err: unknown): Error => (err instanceof globalThis.Error ? err : new globalThis.Error(String(err)))
@@ -503,6 +503,6 @@ export const layer: Layer.Layer<ChildProcessSpawner, never, FileSystem.FileSyste
503503
)
504504

505505
export const defaultLayer = layer.pipe(Layer.provide(NodeFileSystem.layer), Layer.provide(NodePath.layer))
506-
export const node = LayerNode.make({ service: ChildProcessSpawner, layer, deps: [filesystem, path] })
506+
export const node = makeGlobalNode({ service: ChildProcessSpawner, layer, deps: [filesystem, path] })
507507

508508
export * as CrossSpawnSpawner from "./cross-spawn-spawner"
Collapse file

‎packages/core/src/database/database.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/database/database.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Flag } from "../flag/flag"
88
import { isAbsolute, join } from "path"
99
import { DatabaseMigration } from "./migration"
1010
import { InstallationChannel } from "../installation/version"
11-
import { LayerNode } from "../effect/layer-node"
11+
import { makeGlobalNode } from "../effect/node"
1212

1313
const makeDatabase = EffectDrizzleSqlite.makeWithDefaults()
1414
type DatabaseShape = Effect.Success<typeof makeDatabase>
@@ -60,4 +60,4 @@ export const defaultLayer = Layer.unwrap(
6060
}),
6161
).pipe(Layer.provide(Global.defaultLayer))
6262

63-
export const node = LayerNode.make({ service: Service, layer: layerFromPath(path()), deps: [] })
63+
export const node = makeGlobalNode({ service: Service, layer: layerFromPath(path()), deps: [] })

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.