@neuralnomads/codenomad-dev 0.10.3-dev-20260213-ba418a85 → 0.10.3-dev-20260213-e9f281a6

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 (79) hide show
  1. package/package.json +1 -1
  2. package/public/apple-touch-icon-180x180.png +0 -0
  3. package/public/assets/{main-CSlDZj4f.js → main-crtt5pqm.js} +82 -80
  4. package/public/index.html +1 -1
  5. package/public/sw.js +1 -1
  6. package/public/ui-version.json +1 -1
  7. package/dist/integrations/github/bot-signature.js +0 -11
  8. package/dist/integrations/github/git-ops.js +0 -133
  9. package/dist/integrations/github/github-types.js +0 -1
  10. package/dist/integrations/github/job-runner.js +0 -608
  11. package/dist/integrations/github/octokit.js +0 -58
  12. package/dist/integrations/github/sanitize-webhook.js +0 -42
  13. package/dist/integrations/github/webhook-verify.js +0 -21
  14. package/dist/integrations/github/workspace-context.js +0 -10
  15. package/dist/integrations/github/worktree-context.js +0 -15
  16. package/dist/opencode/request-context.js +0 -39
  17. package/dist/opencode/worktree-directory.js +0 -42
  18. package/dist/opencode-config-template/README.md +0 -32
  19. package/dist/opencode-config-template/opencode.jsonc +0 -3
  20. package/dist/opencode-config-template/plugin/codenomad.ts +0 -40
  21. package/dist/opencode-config-template/plugin/lib/background-process.ts +0 -160
  22. package/dist/opencode-config-template/plugin/lib/client.ts +0 -165
  23. package/dist/server/routes/github-plugin.js +0 -215
  24. package/dist/server/routes/github-webhook.js +0 -32
  25. package/scripts/copy-auth-pages.mjs +0 -22
  26. package/scripts/copy-opencode-config.mjs +0 -61
  27. package/scripts/copy-ui-dist.mjs +0 -21
  28. package/src/api-types.ts +0 -326
  29. package/src/auth/auth-store.ts +0 -175
  30. package/src/auth/http-auth.ts +0 -38
  31. package/src/auth/manager.ts +0 -163
  32. package/src/auth/password-hash.ts +0 -49
  33. package/src/auth/session-manager.ts +0 -23
  34. package/src/auth/token-manager.ts +0 -32
  35. package/src/background-processes/manager.ts +0 -519
  36. package/src/bin.ts +0 -29
  37. package/src/config/binaries.ts +0 -192
  38. package/src/config/location.ts +0 -78
  39. package/src/config/schema.ts +0 -104
  40. package/src/config/store.ts +0 -244
  41. package/src/events/bus.ts +0 -45
  42. package/src/filesystem/__tests__/search-cache.test.ts +0 -61
  43. package/src/filesystem/browser.ts +0 -353
  44. package/src/filesystem/search-cache.ts +0 -66
  45. package/src/filesystem/search.ts +0 -184
  46. package/src/index.ts +0 -540
  47. package/src/launcher.ts +0 -177
  48. package/src/loader.ts +0 -21
  49. package/src/logger.ts +0 -133
  50. package/src/opencode-config.ts +0 -31
  51. package/src/plugins/channel.ts +0 -55
  52. package/src/plugins/handlers.ts +0 -36
  53. package/src/releases/dev-release-monitor.ts +0 -118
  54. package/src/releases/release-monitor.ts +0 -149
  55. package/src/server/http-server.ts +0 -693
  56. package/src/server/network-addresses.ts +0 -75
  57. package/src/server/routes/auth-pages/login.html +0 -134
  58. package/src/server/routes/auth-pages/token.html +0 -93
  59. package/src/server/routes/auth.ts +0 -164
  60. package/src/server/routes/background-processes.ts +0 -85
  61. package/src/server/routes/config.ts +0 -76
  62. package/src/server/routes/events.ts +0 -61
  63. package/src/server/routes/filesystem.ts +0 -54
  64. package/src/server/routes/meta.ts +0 -58
  65. package/src/server/routes/plugin.ts +0 -75
  66. package/src/server/routes/storage.ts +0 -66
  67. package/src/server/routes/workspaces.ts +0 -113
  68. package/src/server/routes/worktrees.ts +0 -195
  69. package/src/server/tls.ts +0 -283
  70. package/src/storage/instance-store.ts +0 -64
  71. package/src/ui/__tests__/remote-ui.test.ts +0 -58
  72. package/src/ui/remote-ui.ts +0 -571
  73. package/src/workspaces/git-worktrees.ts +0 -241
  74. package/src/workspaces/instance-events.ts +0 -226
  75. package/src/workspaces/manager.ts +0 -493
  76. package/src/workspaces/opencode-auth.ts +0 -22
  77. package/src/workspaces/runtime.ts +0 -428
  78. package/src/workspaces/worktree-map.ts +0 -129
  79. package/tsconfig.json +0 -17
@@ -1,149 +0,0 @@
1
- import { fetch } from "undici"
2
- import type { LatestReleaseInfo } from "../api-types"
3
- import type { Logger } from "../logger"
4
-
5
- const RELEASES_API_URL = "https://api.github.com/repos/NeuralNomadsAI/CodeNomad/releases/latest"
6
- interface ReleaseMonitorOptions {
7
- currentVersion: string
8
- logger: Logger
9
- onUpdate: (release: LatestReleaseInfo | null) => void
10
- }
11
-
12
- interface GithubReleaseResponse {
13
- tag_name?: string
14
- name?: string
15
- html_url?: string
16
- body?: string
17
- published_at?: string
18
- created_at?: string
19
- prerelease?: boolean
20
- }
21
-
22
- interface NormalizedVersion {
23
- major: number
24
- minor: number
25
- patch: number
26
- prerelease: string | null
27
- }
28
-
29
- export interface ReleaseMonitor {
30
- stop(): void
31
- }
32
-
33
- export function startReleaseMonitor(options: ReleaseMonitorOptions): ReleaseMonitor {
34
- let stopped = false
35
-
36
- const refreshRelease = async () => {
37
- if (stopped) return
38
- try {
39
- const release = await fetchLatestRelease(options)
40
- options.onUpdate(release)
41
- } catch (error) {
42
- options.logger.warn({ err: error }, "Failed to refresh release information")
43
- }
44
- }
45
-
46
- void refreshRelease()
47
-
48
- return {
49
- stop() {
50
- stopped = true
51
- },
52
- }
53
- }
54
-
55
- export function compareVersionStrings(a: string, b: string): number {
56
- const left = parseVersion(a)
57
- const right = parseVersion(b)
58
- return compareVersions(left, right)
59
- }
60
-
61
- async function fetchLatestRelease(options: ReleaseMonitorOptions): Promise<LatestReleaseInfo | null> {
62
- const response = await fetch(RELEASES_API_URL, {
63
- headers: {
64
- Accept: "application/vnd.github+json",
65
- "User-Agent": "CodeNomad-CLI",
66
- },
67
- })
68
-
69
- if (!response.ok) {
70
- throw new Error(`Release API responded with ${response.status}`)
71
- }
72
-
73
- const json = (await response.json()) as GithubReleaseResponse
74
- const tagFromServer = json.tag_name || json.name
75
- if (!tagFromServer) {
76
- return null
77
- }
78
-
79
- const normalizedVersion = stripTagPrefix(tagFromServer)
80
- if (!normalizedVersion) {
81
- return null
82
- }
83
-
84
- const current = parseVersion(options.currentVersion)
85
- const remote = parseVersion(normalizedVersion)
86
-
87
- if (compareVersions(remote, current) <= 0) {
88
- return null
89
- }
90
-
91
- return {
92
- version: normalizedVersion,
93
- tag: tagFromServer,
94
- url: json.html_url ?? `https://github.com/NeuralNomadsAI/CodeNomad/releases/tag/${encodeURIComponent(tagFromServer)}`,
95
- channel: json.prerelease || normalizedVersion.includes("-") ? "dev" : "stable",
96
- publishedAt: json.published_at ?? json.created_at,
97
- notes: json.body,
98
- }
99
- }
100
-
101
- export function stripTagPrefix(tag: string | undefined): string | null {
102
- if (!tag) return null
103
- const trimmed = tag.trim()
104
- if (!trimmed) return null
105
- return trimmed.replace(/^v/i, "")
106
- }
107
-
108
- function parseVersion(value: string): NormalizedVersion {
109
- const normalized = stripTagPrefix(value) ?? "0.0.0"
110
- const dashIndex = normalized.indexOf("-")
111
- const core = dashIndex >= 0 ? normalized.slice(0, dashIndex) : normalized
112
- const prerelease = dashIndex >= 0 ? normalized.slice(dashIndex + 1) : null
113
- const [major = 0, minor = 0, patch = 0] = core.split(".").map((segment) => {
114
- const parsed = Number.parseInt(segment, 10)
115
- return Number.isFinite(parsed) ? parsed : 0
116
- })
117
- return {
118
- major,
119
- minor,
120
- patch,
121
- prerelease,
122
- }
123
- }
124
-
125
- function compareVersions(a: NormalizedVersion, b: NormalizedVersion): number {
126
- if (a.major !== b.major) {
127
- return a.major > b.major ? 1 : -1
128
- }
129
- if (a.minor !== b.minor) {
130
- return a.minor > b.minor ? 1 : -1
131
- }
132
- if (a.patch !== b.patch) {
133
- return a.patch > b.patch ? 1 : -1
134
- }
135
-
136
- const aPre = a.prerelease && a.prerelease.length > 0 ? a.prerelease : null
137
- const bPre = b.prerelease && b.prerelease.length > 0 ? b.prerelease : null
138
-
139
- if (aPre === bPre) {
140
- return 0
141
- }
142
- if (!aPre) {
143
- return 1
144
- }
145
- if (!bPre) {
146
- return -1
147
- }
148
- return aPre.localeCompare(bPre)
149
- }