anymous 1.0.4 → 1.1.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/LICENSE +21 -0
- package/bin/anymous.cjs +45 -45
- package/package.json +1 -1
- package/{script/postinstall.mjs → postinstall.mjs} +5 -5
- package/src/account/account.ts +5 -5
- package/src/account/repo.ts +5 -5
- package/src/acp/agent.ts +2 -2
- package/src/acp/content.ts +1 -1
- package/src/acp/directory.ts +5 -5
- package/src/acp/event.ts +4 -4
- package/src/acp/permission.ts +2 -2
- package/src/acp/profile.ts +1 -1
- package/src/acp/service.ts +24 -24
- package/src/acp/session.ts +5 -5
- package/src/acp/usage.ts +11 -11
- package/src/agent/agent.ts +13 -13
- package/src/agent/prompt/debug-tools.txt +40 -40
- package/src/agent/prompt/exe-extractor.txt +39 -39
- package/src/agent/prompt/memory-dump.txt +37 -37
- package/src/agent/prompt/reverser-automator.txt +38 -38
- package/src/agent/prompt/reverser-binary.txt +39 -39
- package/src/agent/prompt/reverser-dynamic.txt +36 -36
- package/src/agent/prompt/reverser-source.txt +38 -38
- package/src/agent/prompt/reverser-static.txt +35 -35
- package/src/agent/subagent-permissions.ts +1 -1
- package/src/auth/index.ts +8 -8
- package/src/background/job.ts +3 -3
- package/src/cli/cmd/account.ts +1 -1
- package/src/cli/cmd/acp.ts +3 -3
- package/src/cli/cmd/agent.ts +2 -2
- package/src/cli/cmd/attach.ts +3 -3
- package/src/cli/cmd/db.ts +1 -1
- package/src/cli/cmd/debug/agent.handler.ts +2 -2
- package/src/cli/cmd/debug/file.ts +4 -4
- package/src/cli/cmd/debug/index.ts +5 -5
- package/src/cli/cmd/debug/ripgrep.ts +1 -1
- package/src/cli/cmd/debug/scrap.ts +2 -2
- package/src/cli/cmd/debug/v2.ts +4 -4
- package/src/cli/cmd/export.ts +1 -1
- package/src/cli/cmd/generate.ts +2 -2
- package/src/cli/cmd/github.handler.ts +27 -27
- package/src/cli/cmd/github.shared.ts +1 -1
- package/src/cli/cmd/import.ts +5 -5
- package/src/cli/cmd/mcp.ts +13 -13
- package/src/cli/cmd/models.ts +6 -6
- package/src/cli/cmd/plug.ts +2 -2
- package/src/cli/cmd/pr.ts +6 -6
- package/src/cli/cmd/prompt-display.ts +1 -1
- package/src/cli/cmd/providers.ts +12 -12
- package/src/cli/cmd/run/demo.ts +3 -3
- package/src/cli/cmd/run/footer.command.tsx +2 -2
- package/src/cli/cmd/run/footer.permission.tsx +3 -3
- package/src/cli/cmd/run/footer.prompt.tsx +9 -9
- package/src/cli/cmd/run/footer.question.tsx +1 -1
- package/src/cli/cmd/run/footer.subagent.tsx +3 -3
- package/src/cli/cmd/run/footer.ts +2 -2
- package/src/cli/cmd/run/footer.view.tsx +9 -9
- package/src/cli/cmd/run/permission.shared.ts +3 -3
- package/src/cli/cmd/run/question.shared.ts +1 -1
- package/src/cli/cmd/run/runtime.boot.ts +2 -2
- package/src/cli/cmd/run/runtime.lifecycle.ts +4 -4
- package/src/cli/cmd/run/runtime.ts +6 -6
- package/src/cli/cmd/run/session-data.ts +1 -1
- package/src/cli/cmd/run/session-replay.ts +1 -1
- package/src/cli/cmd/run/splash.ts +13 -5
- package/src/cli/cmd/run/stream.transport.ts +3 -3
- package/src/cli/cmd/run/subagent-data.ts +1 -1
- package/src/cli/cmd/run/theme.ts +2 -2
- package/src/cli/cmd/run/tool.ts +2 -2
- package/src/cli/cmd/run/trace.ts +4 -4
- package/src/cli/cmd/run/types.ts +13 -13
- package/src/cli/cmd/run/variant.shared.ts +5 -5
- package/src/cli/cmd/run.ts +22 -22
- package/src/cli/cmd/serve.ts +4 -4
- package/src/cli/cmd/session.ts +4 -4
- package/src/cli/cmd/stats.ts +2 -2
- package/src/cli/cmd/tui.ts +7 -7
- package/src/cli/cmd/uninstall.ts +21 -21
- package/src/cli/cmd/upgrade.ts +14 -14
- package/src/cli/cmd/web.ts +4 -4
- package/src/cli/error.ts +1 -1
- package/src/cli/heap.ts +3 -3
- package/src/cli/logo.ts +1 -1
- package/src/cli/network.ts +1 -1
- package/src/cli/tui/layer.ts +3 -3
- package/src/cli/tui/validate-session.ts +2 -2
- package/src/cli/ui.ts +12 -9
- package/src/cli/upgrade.ts +11 -11
- package/src/command/index.ts +3 -3
- package/src/command/template/initialize.txt +3 -3
- package/src/config/agent.ts +2 -2
- package/src/config/command.ts +3 -3
- package/src/config/config.ts +49 -49
- package/src/config/managed.ts +6 -6
- package/src/config/markdown.ts +2 -2
- package/src/config/parse.ts +2 -2
- package/src/config/paths.ts +7 -7
- package/src/config/plugin.ts +2 -2
- package/src/config/tui-host-attention.ts +2 -2
- package/src/config/tui-migrate.ts +12 -12
- package/src/config/tui.ts +23 -23
- package/src/config/variable.ts +1 -1
- package/src/control-plane/adapters/index.ts +1 -1
- package/src/control-plane/dev/README.md +5 -5
- package/src/control-plane/dev/debug-workspace-plugin.ts +2 -2
- package/src/control-plane/types.ts +3 -3
- package/src/control-plane/workspace-context.ts +1 -1
- package/src/control-plane/workspace.ts +17 -17
- 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/config-service.ts +3 -3
- package/src/effect/instance-ref.ts +3 -3
- package/src/effect/instance-state.ts +1 -1
- package/src/effect/run-service.ts +2 -2
- package/src/effect/runtime-flags.ts +34 -34
- package/src/env/index.ts +3 -3
- package/src/event-manifest.ts +1 -1
- package/src/event-v2-bridge.ts +7 -7
- package/src/format/formatter.ts +2 -2
- package/src/format/index.ts +4 -4
- package/src/git/index.ts +3 -3
- package/src/ide/index.ts +4 -4
- package/src/image/image.ts +4 -4
- package/src/index.ts +1 -1
- package/src/installation/index.ts +32 -32
- package/src/lsp/lsp.ts +5 -5
- package/src/lsp/server.ts +5 -5
- package/src/mcp/auth.ts +6 -6
- package/src/mcp/browser.ts +2 -2
- package/src/mcp/index.ts +17 -17
- package/src/mcp/oauth-callback.ts +1 -1
- package/src/mcp/oauth-provider.ts +2 -2
- package/src/node.ts +1 -1
- package/src/patch/index.ts +1 -1
- package/src/permission/index.ts +5 -5
- package/src/plugin/azure.ts +1 -1
- package/src/plugin/cloudflare.ts +1 -1
- package/src/plugin/digitalocean.ts +6 -6
- package/src/plugin/github-copilot/copilot.ts +7 -7
- package/src/plugin/github-copilot/models.ts +2 -2
- package/src/plugin/index.ts +7 -7
- package/src/plugin/install.ts +6 -6
- package/src/plugin/loader.ts +3 -3
- package/src/plugin/meta.ts +4 -4
- package/src/plugin/openai/README.md +1 -1
- package/src/plugin/openai/codex.ts +8 -8
- package/src/plugin/openai/ws-pool.ts +1 -1
- package/src/plugin/pty-environment.ts +1 -1
- package/src/plugin/shared.ts +7 -7
- package/src/plugin/snowflake-cortex.ts +6 -6
- package/src/plugin/tui/internal.ts +1 -1
- package/src/plugin/tui/runtime.ts +17 -17
- package/src/plugin/xai.ts +8 -8
- package/src/project/bootstrap-service.ts +1 -1
- package/src/project/bootstrap.ts +1 -1
- package/src/project/instance-context.ts +1 -1
- package/src/project/instance-store.ts +5 -5
- package/src/project/project.ts +18 -18
- package/src/project/vcs.ts +5 -5
- package/src/provider/auth.ts +6 -6
- package/src/provider/error.ts +3 -3
- package/src/provider/model-status.ts +1 -1
- package/src/provider/provider.ts +38 -38
- package/src/provider/transform.ts +4 -4
- package/src/question/index.ts +3 -3
- package/src/question/schema.ts +1 -1
- package/src/server/auth.ts +6 -6
- package/src/server/event.ts +1 -1
- package/src/server/mdns.ts +2 -2
- package/src/server/proxy-util.ts +2 -2
- package/src/server/routes/instance/httpapi/api.ts +10 -10
- package/src/server/routes/instance/httpapi/groups/config.ts +4 -4
- 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 +7 -7
- package/src/server/routes/instance/httpapi/groups/file.ts +3 -3
- package/src/server/routes/instance/httpapi/groups/global.ts +10 -10
- package/src/server/routes/instance/httpapi/groups/instance.ts +6 -6
- package/src/server/routes/instance/httpapi/groups/mcp.ts +2 -2
- package/src/server/routes/instance/httpapi/groups/permission.ts +2 -2
- package/src/server/routes/instance/httpapi/groups/project-copy.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/project.ts +4 -4
- package/src/server/routes/instance/httpapi/groups/provider.ts +2 -2
- package/src/server/routes/instance/httpapi/groups/pty.ts +5 -5
- package/src/server/routes/instance/httpapi/groups/question.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/session.ts +8 -8
- package/src/server/routes/instance/httpapi/groups/sync.ts +3 -3
- package/src/server/routes/instance/httpapi/groups/tui.ts +1 -1
- package/src/server/routes/instance/httpapi/groups/workspace.ts +1 -1
- 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 +3 -3
- package/src/server/routes/instance/httpapi/middleware/error.ts +2 -2
- package/src/server/routes/instance/httpapi/middleware/fence.ts +3 -3
- package/src/server/routes/instance/httpapi/middleware/instance-context.ts +1 -1
- package/src/server/routes/instance/httpapi/middleware/schema-error.ts +1 -1
- package/src/server/routes/instance/httpapi/middleware/workspace-routing.ts +6 -6
- package/src/server/routes/instance/httpapi/public.ts +6 -6
- package/src/server/routes/instance/httpapi/server.ts +27 -27
- package/src/server/routes/instance/httpapi/websocket-tracker.ts +2 -2
- package/src/server/server.ts +3 -3
- package/src/server/shared/fence.ts +4 -4
- package/src/server/shared/pty-ticket.ts +1 -1
- package/src/server/shared/ui.ts +3 -3
- package/src/server/tui-event.ts +1 -1
- package/src/session/compaction.ts +9 -9
- package/src/session/instruction.ts +9 -9
- package/src/session/llm/AGENTS.md +12 -12
- 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 +7 -7
- package/src/session/llm/request.ts +10 -10
- package/src/session/llm.ts +12 -12
- 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 +6 -6
- package/src/session/prompt/anthropic.txt +2 -11
- package/src/session/prompt/beast.txt +147 -147
- package/src/session/prompt/codex.txt +1 -1
- package/src/session/prompt/copilot-gpt-5.txt +1 -1
- package/src/session/prompt/default.txt +1 -7
- package/src/session/prompt/gemini.txt +1 -1
- package/src/session/prompt/gpt.txt +1 -1
- package/src/session/prompt/kimi.txt +1 -1
- package/src/session/prompt/meta.txt +3 -4
- package/src/session/prompt/trinity.txt +1 -1
- package/src/session/prompt.ts +14 -14
- package/src/session/reminders.ts +2 -2
- package/src/session/retry.ts +5 -5
- package/src/session/revert.ts +3 -3
- package/src/session/run-state.ts +3 -3
- package/src/session/schema.ts +2 -2
- package/src/session/session.ts +22 -22
- package/src/session/status.ts +3 -3
- package/src/session/summary.ts +3 -3
- package/src/session/system.ts +7 -7
- package/src/session/todo.ts +5 -5
- package/src/session/tools.ts +3 -3
- package/src/share/session.ts +2 -2
- package/src/share/share-next.ts +11 -11
- package/src/skill/discovery.ts +7 -7
- package/src/skill/index.ts +21 -21
- package/src/snapshot/index.ts +7 -7
- package/src/storage/schema.ts +5 -5
- package/src/storage/storage.ts +5 -5
- package/src/sync/schema.ts +1 -1
- package/src/temporary.ts +4 -4
- 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/lsp.txt +1 -1
- package/src/tool/plan.ts +1 -1
- package/src/tool/read.ts +2 -2
- package/src/tool/registry.ts +13 -13
- package/src/tool/schema.ts +1 -1
- package/src/tool/shell/id.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 +3 -3
- package/src/tool/tool.ts +2 -2
- package/src/tool/truncate.ts +4 -4
- package/src/tool/truncation-dir.ts +1 -1
- package/src/tool/webfetch.ts +1 -1
- package/src/tool/websearch.ts +4 -4
- package/src/tool/write.ts +3 -3
- package/src/util/bom.ts +1 -1
- package/src/util/error.ts +1 -1
- package/src/util/filesystem.ts +2 -2
- package/src/util/locale.ts +2 -2
- package/src/util/process.ts +1 -1
- package/src/util/record.ts +1 -1
- package/src/util/repository.ts +2 -2
- package/src/util/token.ts +1 -1
- package/src/worktree/index.ts +12 -12
package/src/provider/provider.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@anymous-ai/core/effect/layer-node"
|
|
2
2
|
import os from "os"
|
|
3
|
-
import { ConfigV1 } from "@
|
|
3
|
+
import { ConfigV1 } from "@anymous-ai/core/v1/config/config"
|
|
4
4
|
import fuzzysort from "fuzzysort"
|
|
5
5
|
import { Config } from "@/config/config"
|
|
6
6
|
import { mapValues, mergeDeep, omit, pickBy, sortBy } from "remeda"
|
|
7
7
|
import { NoSuchModelError, type Provider as SDK } from "ai"
|
|
8
|
-
import { Npm } from "@
|
|
9
|
-
import { Hash } from "@
|
|
8
|
+
import { Npm } from "@anymous-ai/core/npm"
|
|
9
|
+
import { Hash } from "@anymous-ai/core/util/hash"
|
|
10
10
|
import { Plugin } from "../plugin"
|
|
11
|
-
import { serviceUse } from "@
|
|
11
|
+
import { serviceUse } from "@anymous-ai/core/effect/service-use"
|
|
12
12
|
import { type LanguageModelV3 } from "@ai-sdk/provider"
|
|
13
|
-
import { ModelsDev } from "@
|
|
13
|
+
import { ModelsDev } from "@anymous-ai/core/models-dev"
|
|
14
14
|
import { Auth } from "../auth"
|
|
15
15
|
import { Env } from "../env"
|
|
16
|
-
import { InstallationVersion } from "@
|
|
16
|
+
import { InstallationVersion } from "@anymous-ai/core/installation/version"
|
|
17
17
|
import { iife } from "@/util/iife"
|
|
18
|
-
import { Global } from "@
|
|
18
|
+
import { Global } from "@anymous-ai/core/global"
|
|
19
19
|
import path from "path"
|
|
20
20
|
import { pathToFileURL } from "url"
|
|
21
21
|
import { Effect, Layer, Context, Schema, Types } from "effect"
|
|
22
22
|
import { EffectBridge } from "@/effect/bridge"
|
|
23
23
|
import { InstanceState } from "@/effect/instance-state"
|
|
24
24
|
import { EffectPromise } from "@/effect/promise"
|
|
25
|
-
import { FSUtil } from "@
|
|
25
|
+
import { FSUtil } from "@anymous-ai/core/fs-util"
|
|
26
26
|
import { isRecord } from "@/util/record"
|
|
27
|
-
import { optional } from "@
|
|
27
|
+
import { optional } from "@anymous-ai/core/schema"
|
|
28
28
|
import { ProviderTransform } from "./transform"
|
|
29
|
-
import { ProviderV2 } from "@
|
|
30
|
-
import { ModelV2 } from "@
|
|
29
|
+
import { ProviderV2 } from "@anymous-ai/core/provider"
|
|
30
|
+
import { ModelV2 } from "@anymous-ai/core/model"
|
|
31
31
|
import { ModelStatus } from "./model-status"
|
|
32
32
|
import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
33
33
|
import { ProviderError } from "./error"
|
|
@@ -129,7 +129,7 @@ const BUNDLED_PROVIDERS: Record<string, () => Promise<(opts: any) => BundledSDK>
|
|
|
129
129
|
"@ai-sdk/alibaba": () => import("@ai-sdk/alibaba").then((m) => m.createAlibaba),
|
|
130
130
|
"gitlab-ai-provider": () => import("gitlab-ai-provider").then((m) => m.createGitLab),
|
|
131
131
|
"@ai-sdk/github-copilot": () =>
|
|
132
|
-
import("@
|
|
132
|
+
import("@anymous-ai/core/github-copilot/copilot-provider").then((m) => m.createOpenaiCompatible),
|
|
133
133
|
"venice-ai-sdk-provider": () => import("venice-ai-sdk-provider").then((m) => m.createVenice),
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -176,7 +176,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
176
176
|
},
|
|
177
177
|
},
|
|
178
178
|
}),
|
|
179
|
-
|
|
179
|
+
anymous: Effect.fnUntraced(function* (input: Info) {
|
|
180
180
|
const env = yield* dep.env()
|
|
181
181
|
const hasKey = iife(() => {
|
|
182
182
|
if (input.env.some((item) => env[item])) return true
|
|
@@ -185,7 +185,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
185
185
|
const ok =
|
|
186
186
|
hasKey ||
|
|
187
187
|
Boolean(yield* dep.auth(input.id)) ||
|
|
188
|
-
Boolean((yield* dep.config()).provider?.["
|
|
188
|
+
Boolean((yield* dep.config()).provider?.["anymous"]?.options?.apiKey)
|
|
189
189
|
|
|
190
190
|
if (!ok) {
|
|
191
191
|
for (const [key, value] of Object.entries(input.models)) {
|
|
@@ -375,7 +375,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
// Region resolution precedence (highest to lowest):
|
|
378
|
-
// 1. options.region from
|
|
378
|
+
// 1. options.region from anymous.json provider config
|
|
379
379
|
// 2. defaultRegion from AWS_REGION environment variable
|
|
380
380
|
// 3. Default "us-east-1" (baked into defaultRegion)
|
|
381
381
|
const region = options?.region ?? defaultRegion
|
|
@@ -458,9 +458,9 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
458
458
|
autoload: false,
|
|
459
459
|
options: {
|
|
460
460
|
headers: {
|
|
461
|
-
"HTTP-Referer": "https://
|
|
462
|
-
"X-Title": "
|
|
463
|
-
"X-Source": "
|
|
461
|
+
"HTTP-Referer": "https://anymous-cli.vercel.app/",
|
|
462
|
+
"X-Title": "anymous",
|
|
463
|
+
"X-Source": "anymous",
|
|
464
464
|
},
|
|
465
465
|
},
|
|
466
466
|
}),
|
|
@@ -469,8 +469,8 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
469
469
|
autoload: false,
|
|
470
470
|
options: {
|
|
471
471
|
headers: {
|
|
472
|
-
"HTTP-Referer": "https://
|
|
473
|
-
"X-Title": "
|
|
472
|
+
"HTTP-Referer": "https://anymous-cli.vercel.app/",
|
|
473
|
+
"X-Title": "anymous",
|
|
474
474
|
},
|
|
475
475
|
},
|
|
476
476
|
}),
|
|
@@ -479,9 +479,9 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
479
479
|
autoload: provider.source === "config",
|
|
480
480
|
options: {
|
|
481
481
|
headers: {
|
|
482
|
-
"HTTP-Referer": "https://
|
|
483
|
-
"X-Title": "
|
|
484
|
-
"X-BILLING-INVOKE-ORIGIN": "
|
|
482
|
+
"HTTP-Referer": "https://anymous-cli.vercel.app/",
|
|
483
|
+
"X-Title": "anymous",
|
|
484
|
+
"X-BILLING-INVOKE-ORIGIN": "anymous",
|
|
485
485
|
},
|
|
486
486
|
},
|
|
487
487
|
}),
|
|
@@ -490,8 +490,8 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
490
490
|
autoload: false,
|
|
491
491
|
options: {
|
|
492
492
|
headers: {
|
|
493
|
-
"http-referer": "https://
|
|
494
|
-
"x-title": "
|
|
493
|
+
"http-referer": "https://anymous-cli.vercel.app/",
|
|
494
|
+
"x-title": "anymous",
|
|
495
495
|
},
|
|
496
496
|
},
|
|
497
497
|
}),
|
|
@@ -596,8 +596,8 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
596
596
|
autoload: false,
|
|
597
597
|
options: {
|
|
598
598
|
headers: {
|
|
599
|
-
"HTTP-Referer": "https://
|
|
600
|
-
"X-Title": "
|
|
599
|
+
"HTTP-Referer": "https://anymous-cli.vercel.app/",
|
|
600
|
+
"X-Title": "anymous",
|
|
601
601
|
},
|
|
602
602
|
},
|
|
603
603
|
}),
|
|
@@ -618,7 +618,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
618
618
|
const directory = yield* InstanceState.directory
|
|
619
619
|
|
|
620
620
|
const aiGatewayHeaders = {
|
|
621
|
-
"User-Agent": `
|
|
621
|
+
"User-Agent": `anymous/${InstallationVersion} gitlab-ai-provider/${GITLAB_PROVIDER_VERSION} (${os.platform()} ${os.release()}; ${os.arch()})`,
|
|
622
622
|
"anthropic-beta": "context-1m-2025-08-07",
|
|
623
623
|
...providerConfig?.options?.aiGatewayHeaders,
|
|
624
624
|
}
|
|
@@ -751,7 +751,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
751
751
|
options: {
|
|
752
752
|
apiKey,
|
|
753
753
|
headers: {
|
|
754
|
-
"User-Agent": `
|
|
754
|
+
"User-Agent": `anymous/${InstallationVersion} cloudflare-workers-ai (${os.platform()} ${os.release()}; ${os.arch()})`,
|
|
755
755
|
},
|
|
756
756
|
},
|
|
757
757
|
async getModel(sdk: any, modelID: string) {
|
|
@@ -796,7 +796,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
796
796
|
if (!apiToken) {
|
|
797
797
|
throw new Error(
|
|
798
798
|
"CLOUDFLARE_API_TOKEN (or CF_AIG_TOKEN) is required for Cloudflare AI Gateway. " +
|
|
799
|
-
"Set it via environment variable or run `
|
|
799
|
+
"Set it via environment variable or run `anymous auth cloudflare-ai-gateway`.",
|
|
800
800
|
)
|
|
801
801
|
}
|
|
802
802
|
|
|
@@ -819,7 +819,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
819
819
|
skipCache: input.options?.skipCache,
|
|
820
820
|
collectLog: input.options?.collectLog,
|
|
821
821
|
headers: {
|
|
822
|
-
"User-Agent": `
|
|
822
|
+
"User-Agent": `anymous/${InstallationVersion} cloudflare-ai-gateway (${os.platform()} ${os.release()}; ${os.arch()})`,
|
|
823
823
|
},
|
|
824
824
|
}
|
|
825
825
|
|
|
@@ -845,7 +845,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
845
845
|
autoload: false,
|
|
846
846
|
options: {
|
|
847
847
|
headers: {
|
|
848
|
-
"X-Cerebras-3rd-Party-Integration": "
|
|
848
|
+
"X-Cerebras-3rd-Party-Integration": "anymous",
|
|
849
849
|
},
|
|
850
850
|
},
|
|
851
851
|
}),
|
|
@@ -854,8 +854,8 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
854
854
|
autoload: false,
|
|
855
855
|
options: {
|
|
856
856
|
headers: {
|
|
857
|
-
"HTTP-Referer": "https://
|
|
858
|
-
"X-Title": "
|
|
857
|
+
"HTTP-Referer": "https://anymous-cli.vercel.app/",
|
|
858
|
+
"X-Title": "anymous",
|
|
859
859
|
},
|
|
860
860
|
},
|
|
861
861
|
}),
|
|
@@ -882,7 +882,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
882
882
|
autoload: false,
|
|
883
883
|
async getModel() {
|
|
884
884
|
throw new Error(
|
|
885
|
-
`Snowflake Cortex: missing credentials (${missing}). Provide a bearer token (OAuth, JWT, or PAT) via env var,
|
|
885
|
+
`Snowflake Cortex: missing credentials (${missing}). Provide a bearer token (OAuth, JWT, or PAT) via env var, anymous auth, or provider options.`,
|
|
886
886
|
)
|
|
887
887
|
},
|
|
888
888
|
}
|
|
@@ -1167,7 +1167,7 @@ interface State {
|
|
|
1167
1167
|
varsLoaders: Record<string, CustomVarsLoader>
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
|
-
export class Service extends Context.Service<Service, Interface>()("@
|
|
1170
|
+
export class Service extends Context.Service<Service, Interface>()("@anymous/Provider") {}
|
|
1171
1171
|
|
|
1172
1172
|
export const use = serviceUse(Service)
|
|
1173
1173
|
|
|
@@ -1902,7 +1902,7 @@ const layer = Layer.effect(
|
|
|
1902
1902
|
return undefined
|
|
1903
1903
|
}
|
|
1904
1904
|
|
|
1905
|
-
const priority = providerID.startsWith("
|
|
1905
|
+
const priority = providerID.startsWith("anymous")
|
|
1906
1906
|
? ["gpt-nano"]
|
|
1907
1907
|
: providerID.startsWith("github-copilot")
|
|
1908
1908
|
? ["gpt-mini", ...smallModelFamilyPriority]
|
|
@@ -2,7 +2,7 @@ import type { ModelMessage, ToolResultPart } from "ai"
|
|
|
2
2
|
import { mergeDeep, unique } from "remeda"
|
|
3
3
|
import type { JSONSchema7 } from "@ai-sdk/provider"
|
|
4
4
|
import type * as Provider from "./provider"
|
|
5
|
-
import type * as ModelsDev from "@
|
|
5
|
+
import type * as ModelsDev from "@anymous-ai/core/models-dev"
|
|
6
6
|
import { iife } from "@/util/iife"
|
|
7
7
|
|
|
8
8
|
type Modality = NonNullable<ModelsDev.Model["modalities"]>["input"][number]
|
|
@@ -1177,7 +1177,7 @@ export function options(input: {
|
|
|
1177
1177
|
|
|
1178
1178
|
if (
|
|
1179
1179
|
input.model.providerID === "baseten" ||
|
|
1180
|
-
(input.model.providerID === "
|
|
1180
|
+
(input.model.providerID === "anymous" && ["kimi-k2-thinking", "glm-4.6"].includes(input.model.api.id))
|
|
1181
1181
|
) {
|
|
1182
1182
|
result["chat_template_args"] = { enable_thinking: true }
|
|
1183
1183
|
}
|
|
@@ -1291,7 +1291,7 @@ export function options(input: {
|
|
|
1291
1291
|
result["textVerbosity"] = "low"
|
|
1292
1292
|
}
|
|
1293
1293
|
|
|
1294
|
-
if (input.model.providerID.startsWith("
|
|
1294
|
+
if (input.model.providerID.startsWith("anymous") && input.providerOptions?.setCacheKey !== false) {
|
|
1295
1295
|
result["promptCacheKey"] = input.sessionID
|
|
1296
1296
|
result["include"] = INCLUDE_ENCRYPTED_REASONING
|
|
1297
1297
|
result["reasoningSummary"] = "auto"
|
|
@@ -1507,7 +1507,7 @@ export function schema(model: Provider.Model, schema: JSONSchema7): JSONSchema7
|
|
|
1507
1507
|
|
|
1508
1508
|
if (model.api.npm === "@ai-sdk/openai" || model.api.npm === "@ai-sdk/azure") {
|
|
1509
1509
|
schema = sanitizeOpenAISchema(schema) as JSONSchema7
|
|
1510
|
-
// Codex also applies lossy compaction above 4 KB; defer that until
|
|
1510
|
+
// Codex also applies lossy compaction above 4 KB; defer that until anymous needs the same schema budget.
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
1513
|
if (model.providerID === "moonshotai" || model.api.id.toLowerCase().includes("kimi")) {
|
package/src/question/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { LayerNode } from "@
|
|
1
|
+
import { LayerNode } from "@anymous-ai/core/effect/layer-node"
|
|
2
2
|
import { Deferred, Effect, Layer, Schema, Context } from "effect"
|
|
3
3
|
import { InstanceState } from "@/effect/instance-state"
|
|
4
4
|
import { SessionID } from "@/session/schema"
|
|
5
5
|
import { QuestionID } from "./schema"
|
|
6
6
|
import { EventV2Bridge } from "@/event-v2-bridge"
|
|
7
|
-
import { QuestionV1 } from "@
|
|
7
|
+
import { QuestionV1 } from "@anymous-ai/schema/question-v1"
|
|
8
8
|
|
|
9
9
|
export const Option = QuestionV1.Option
|
|
10
10
|
export type Option = typeof Option.Type
|
|
@@ -59,7 +59,7 @@ export interface Interface {
|
|
|
59
59
|
readonly list: () => Effect.Effect<ReadonlyArray<Request>>
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export class Service extends Context.Service<Service, Interface>()("@
|
|
62
|
+
export class Service extends Context.Service<Service, Interface>()("@anymous/Question") {}
|
|
63
63
|
|
|
64
64
|
const layer = Layer.effect(
|
|
65
65
|
Service,
|
package/src/question/schema.ts
CHANGED
package/src/server/auth.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as ServerAuth from "./auth"
|
|
2
2
|
|
|
3
3
|
import { ConfigService } from "@/effect/config-service"
|
|
4
|
-
import { Flag } from "@
|
|
4
|
+
import { Flag } from "@anymous-ai/core/flag/flag"
|
|
5
5
|
import { Config as EffectConfig, Context, Option, Redacted } from "effect"
|
|
6
6
|
|
|
7
7
|
export type Credentials = {
|
|
@@ -14,9 +14,9 @@ export type DecodedCredentials = {
|
|
|
14
14
|
readonly password: Redacted.Redacted
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export class Config extends ConfigService.Service<Config>()("@
|
|
18
|
-
password: EffectConfig.string("
|
|
19
|
-
username: EffectConfig.string("
|
|
17
|
+
export class Config extends ConfigService.Service<Config>()("@anymous/ServerAuthConfig", {
|
|
18
|
+
password: EffectConfig.string("ANYMOUS_SERVER_PASSWORD").pipe(EffectConfig.option),
|
|
19
|
+
username: EffectConfig.string("ANYMOUS_SERVER_USERNAME").pipe(EffectConfig.withDefault("anymous")),
|
|
20
20
|
}) {}
|
|
21
21
|
|
|
22
22
|
export type Info = Context.Service.Shape<typeof Config>
|
|
@@ -34,10 +34,10 @@ export function authorized(credentials: DecodedCredentials, config: Info) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function header(credentials?: Credentials) {
|
|
37
|
-
const password = credentials?.password ?? Flag.
|
|
37
|
+
const password = credentials?.password ?? Flag.ANYMOUS_SERVER_PASSWORD
|
|
38
38
|
if (!password) return undefined
|
|
39
39
|
|
|
40
|
-
const username = credentials?.username ?? Flag.
|
|
40
|
+
const username = credentials?.username ?? Flag.ANYMOUS_SERVER_USERNAME ?? "anymous"
|
|
41
41
|
return `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`
|
|
42
42
|
}
|
|
43
43
|
|
package/src/server/event.ts
CHANGED
package/src/server/mdns.ts
CHANGED
|
@@ -8,8 +8,8 @@ export function publish(port: number, domain?: string) {
|
|
|
8
8
|
if (bonjour) unpublish()
|
|
9
9
|
|
|
10
10
|
try {
|
|
11
|
-
const host = domain ?? "
|
|
12
|
-
const name = `
|
|
11
|
+
const host = domain ?? "anymous.local"
|
|
12
|
+
const name = `anymous-${port}`
|
|
13
13
|
bonjour = new Bonjour()
|
|
14
14
|
const service = bonjour.publish({
|
|
15
15
|
name,
|
package/src/server/proxy-util.ts
CHANGED
|
@@ -14,8 +14,8 @@ const hop = new Set([
|
|
|
14
14
|
function sanitize(out: Headers) {
|
|
15
15
|
for (const key of hop) out.delete(key)
|
|
16
16
|
out.delete("accept-encoding")
|
|
17
|
-
out.delete("x-
|
|
18
|
-
out.delete("x-
|
|
17
|
+
out.delete("x-anymous-directory")
|
|
18
|
+
out.delete("x-anymous-workspace")
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export function headers(input: Request | HeadersInit | Record<string, string>, extra?: HeadersInit) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
2
|
import { HttpApi } from "effect/unstable/httpapi"
|
|
3
|
-
import { EventV2 } from "@
|
|
3
|
+
import { EventV2 } from "@anymous-ai/core/event"
|
|
4
4
|
import { EventManifest } from "@/event-manifest"
|
|
5
|
-
import { Credential } from "@
|
|
6
|
-
import { Integration } from "@
|
|
7
|
-
import { SkillV2 } from "@
|
|
5
|
+
import { Credential } from "@anymous-ai/core/credential"
|
|
6
|
+
import { Integration } from "@anymous-ai/core/integration"
|
|
7
|
+
import { SkillV2 } from "@anymous-ai/core/skill"
|
|
8
8
|
import { InstanceDisposed } from "@/server/event"
|
|
9
9
|
import { Question } from "@/question"
|
|
10
10
|
import { ConfigApi } from "./groups/config"
|
|
@@ -25,9 +25,9 @@ import { SessionApi } from "./groups/session"
|
|
|
25
25
|
import { SyncApi } from "./groups/sync"
|
|
26
26
|
import { TuiApi } from "./groups/tui"
|
|
27
27
|
import { WorkspaceApi } from "./groups/workspace"
|
|
28
|
-
import { makeApi } from "@
|
|
29
|
-
import { LocationMiddleware } from "@
|
|
30
|
-
import { SessionLocationMiddleware } from "@
|
|
28
|
+
import { makeApi } from "@anymous-ai/protocol/api"
|
|
29
|
+
import { LocationMiddleware } from "@anymous-ai/server/location"
|
|
30
|
+
import { SessionLocationMiddleware } from "@anymous-ai/server/middleware/session-location"
|
|
31
31
|
import { GlobalApi } from "./groups/global"
|
|
32
32
|
import { Authorization } from "./middleware/authorization"
|
|
33
33
|
import { SchemaErrorMiddleware } from "./middleware/schema-error"
|
|
@@ -51,14 +51,14 @@ export const ServerApi = makeApi({
|
|
|
51
51
|
sessionLocationMiddleware: SessionLocationMiddleware,
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
export const RootHttpApi = HttpApi.make("
|
|
54
|
+
export const RootHttpApi = HttpApi.make("anymous-root")
|
|
55
55
|
.addHttpApi(ControlApi)
|
|
56
56
|
.addHttpApi(ControlPlaneApi)
|
|
57
57
|
.addHttpApi(GlobalApi)
|
|
58
58
|
.middleware(SchemaErrorMiddleware)
|
|
59
59
|
.middleware(Authorization)
|
|
60
60
|
|
|
61
|
-
export const InstanceHttpApi = HttpApi.make("
|
|
61
|
+
export const InstanceHttpApi = HttpApi.make("anymous-instance")
|
|
62
62
|
.addHttpApi(ConfigApi)
|
|
63
63
|
.addHttpApi(ExperimentalApi)
|
|
64
64
|
.addHttpApi(FileApi)
|
|
@@ -76,7 +76,7 @@ export const InstanceHttpApi = HttpApi.make("opencode-instance")
|
|
|
76
76
|
.addHttpApi(WorkspaceApi)
|
|
77
77
|
.middleware(SchemaErrorMiddleware)
|
|
78
78
|
|
|
79
|
-
export const
|
|
79
|
+
export const anymousHttpApi = HttpApi.make("anymous")
|
|
80
80
|
.addHttpApi(RootHttpApi)
|
|
81
81
|
.addHttpApi(EventApi)
|
|
82
82
|
.addHttpApi(InstanceHttpApi)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Config } from "@/config/config"
|
|
2
|
-
import { ConfigV1 } from "@
|
|
2
|
+
import { ConfigV1 } from "@anymous-ai/core/v1/config/config"
|
|
3
3
|
import { Provider } from "@/provider/provider"
|
|
4
4
|
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
|
5
5
|
import { Authorization } from "../middleware/authorization"
|
|
@@ -20,7 +20,7 @@ export const ConfigApi = HttpApi.make("config")
|
|
|
20
20
|
OpenApi.annotations({
|
|
21
21
|
identifier: "config.get",
|
|
22
22
|
summary: "Get configuration",
|
|
23
|
-
description: "Retrieve the current
|
|
23
|
+
description: "Retrieve the current anymous configuration settings and preferences.",
|
|
24
24
|
}),
|
|
25
25
|
),
|
|
26
26
|
HttpApiEndpoint.patch("update", root, {
|
|
@@ -32,7 +32,7 @@ export const ConfigApi = HttpApi.make("config")
|
|
|
32
32
|
OpenApi.annotations({
|
|
33
33
|
identifier: "config.update",
|
|
34
34
|
summary: "Update configuration",
|
|
35
|
-
description: "Update
|
|
35
|
+
description: "Update anymous configuration settings and preferences.",
|
|
36
36
|
}),
|
|
37
37
|
),
|
|
38
38
|
HttpApiEndpoint.get("providers", `${root}/providers`, {
|
|
@@ -58,7 +58,7 @@ export const ConfigApi = HttpApi.make("config")
|
|
|
58
58
|
)
|
|
59
59
|
.annotateMerge(
|
|
60
60
|
OpenApi.annotations({
|
|
61
|
-
title: "
|
|
61
|
+
title: "anymous experimental HttpApi",
|
|
62
62
|
version: "0.0.1",
|
|
63
63
|
description: "Experimental HttpApi surface for selected instance routes.",
|
|
64
64
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MoveSession } from "@
|
|
1
|
+
import { MoveSession } from "@anymous-ai/core/control-plane/move-session"
|
|
2
2
|
import { Schema } from "effect"
|
|
3
3
|
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
|
|
4
4
|
import { described } from "./metadata"
|
|
@@ -3,7 +3,7 @@ import { Auth } from "@/auth"
|
|
|
3
3
|
import { Schema } from "effect"
|
|
4
4
|
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
|
5
5
|
import { described } from "./metadata"
|
|
6
|
-
import { ProviderV2 } from "@
|
|
6
|
+
import { ProviderV2 } from "@anymous-ai/core/provider"
|
|
7
7
|
|
|
8
8
|
const AuthParams = Schema.Struct({
|
|
9
9
|
providerID: ProviderV2.ID,
|
|
@@ -4,7 +4,7 @@ import { MCP } from "@/mcp"
|
|
|
4
4
|
import { Session } from "@/session/session"
|
|
5
5
|
import { SessionID } from "@/session/schema"
|
|
6
6
|
import { Worktree } from "@/worktree"
|
|
7
|
-
import { NonNegativeInt } from "@
|
|
7
|
+
import { NonNegativeInt } from "@anymous-ai/core/schema"
|
|
8
8
|
import { Schema } from "effect"
|
|
9
9
|
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
|
|
10
10
|
import { Authorization } from "../middleware/authorization"
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
} from "../middleware/workspace-routing"
|
|
17
17
|
import { described } from "./metadata"
|
|
18
18
|
import { QueryBoolean } from "./query"
|
|
19
|
-
import { ProviderV2 } from "@
|
|
20
|
-
import { ModelV2 } from "@
|
|
19
|
+
import { ProviderV2 } from "@anymous-ai/core/provider"
|
|
20
|
+
import { ModelV2 } from "@anymous-ai/core/model"
|
|
21
21
|
|
|
22
22
|
const ConsoleStateResponse = Schema.Struct({
|
|
23
23
|
consoleManagedProviders: Schema.mutable(Schema.Array(Schema.String)),
|
|
@@ -112,7 +112,7 @@ export const ExperimentalApi = HttpApi.make("experimental")
|
|
|
112
112
|
OpenApi.annotations({
|
|
113
113
|
identifier: "experimental.capabilities.get",
|
|
114
114
|
summary: "Get experimental capabilities",
|
|
115
|
-
description: "Get experimental features enabled on the
|
|
115
|
+
description: "Get experimental features enabled on the anymous server.",
|
|
116
116
|
}),
|
|
117
117
|
),
|
|
118
118
|
HttpApiEndpoint.get("console", ExperimentalPaths.console, {
|
|
@@ -146,7 +146,7 @@ export const ExperimentalApi = HttpApi.make("experimental")
|
|
|
146
146
|
OpenApi.annotations({
|
|
147
147
|
identifier: "experimental.console.switchOrg",
|
|
148
148
|
summary: "Switch active Console org",
|
|
149
|
-
description: "Persist a new active Console account/org selection for the current local
|
|
149
|
+
description: "Persist a new active Console account/org selection for the current local anymous state.",
|
|
150
150
|
}),
|
|
151
151
|
),
|
|
152
152
|
HttpApiEndpoint.get("tool", ExperimentalPaths.tool, {
|
|
@@ -229,7 +229,7 @@ export const ExperimentalApi = HttpApi.make("experimental")
|
|
|
229
229
|
identifier: "experimental.session.list",
|
|
230
230
|
summary: "List sessions",
|
|
231
231
|
description:
|
|
232
|
-
"Get a list of all
|
|
232
|
+
"Get a list of all anymous sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
|
|
233
233
|
}),
|
|
234
234
|
),
|
|
235
235
|
HttpApiEndpoint.post("sessionBackground", ExperimentalPaths.sessionBackground, {
|
|
@@ -268,7 +268,7 @@ export const ExperimentalApi = HttpApi.make("experimental")
|
|
|
268
268
|
)
|
|
269
269
|
.annotateMerge(
|
|
270
270
|
OpenApi.annotations({
|
|
271
|
-
title: "
|
|
271
|
+
title: "anymous experimental HttpApi",
|
|
272
272
|
version: "0.0.1",
|
|
273
273
|
description: "Experimental HttpApi surface for selected instance routes.",
|
|
274
274
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FileSystem } from "@
|
|
2
|
-
import { NonNegativeInt } from "@
|
|
1
|
+
import { FileSystem } from "@anymous-ai/core/filesystem"
|
|
2
|
+
import { NonNegativeInt } from "@anymous-ai/core/schema"
|
|
3
3
|
import { LSP } from "@/lsp/lsp"
|
|
4
4
|
import { Schema } from "effect"
|
|
5
5
|
import { HttpApi, HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
|
@@ -178,7 +178,7 @@ export const FileApi = HttpApi.make("file")
|
|
|
178
178
|
)
|
|
179
179
|
.annotateMerge(
|
|
180
180
|
OpenApi.annotations({
|
|
181
|
-
title: "
|
|
181
|
+
title: "anymous experimental HttpApi",
|
|
182
182
|
version: "0.0.1",
|
|
183
183
|
description: "Experimental HttpApi surface for selected instance routes.",
|
|
184
184
|
}),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ConfigV1 } from "@
|
|
2
|
-
import { EventV2 } from "@
|
|
1
|
+
import { ConfigV1 } from "@anymous-ai/core/v1/config/config"
|
|
2
|
+
import { EventV2 } from "@anymous-ai/core/event"
|
|
3
3
|
import { EventManifest } from "@/event-manifest"
|
|
4
4
|
import { InstanceDisposed } from "@/server/event"
|
|
5
|
-
import "@
|
|
5
|
+
import "@anymous-ai/core/account"
|
|
6
6
|
import "@/server/event"
|
|
7
7
|
import { Schema } from "effect"
|
|
8
8
|
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
|
|
@@ -79,7 +79,7 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
79
79
|
OpenApi.annotations({
|
|
80
80
|
identifier: "global.health",
|
|
81
81
|
summary: "Get health",
|
|
82
|
-
description: "Get health information about the
|
|
82
|
+
description: "Get health information about the anymous server.",
|
|
83
83
|
}),
|
|
84
84
|
),
|
|
85
85
|
HttpApiEndpoint.get("event", GlobalPaths.event, {
|
|
@@ -88,7 +88,7 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
88
88
|
OpenApi.annotations({
|
|
89
89
|
identifier: "global.event",
|
|
90
90
|
summary: "Get global events",
|
|
91
|
-
description: "Subscribe to global events from the
|
|
91
|
+
description: "Subscribe to global events from the anymous system using server-sent events.",
|
|
92
92
|
}),
|
|
93
93
|
),
|
|
94
94
|
HttpApiEndpoint.get("configGet", GlobalPaths.config, {
|
|
@@ -97,7 +97,7 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
97
97
|
OpenApi.annotations({
|
|
98
98
|
identifier: "global.config.get",
|
|
99
99
|
summary: "Get global configuration",
|
|
100
|
-
description: "Retrieve the current global
|
|
100
|
+
description: "Retrieve the current global anymous configuration settings and preferences.",
|
|
101
101
|
}),
|
|
102
102
|
),
|
|
103
103
|
HttpApiEndpoint.patch("configUpdate", GlobalPaths.config, {
|
|
@@ -108,7 +108,7 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
108
108
|
OpenApi.annotations({
|
|
109
109
|
identifier: "global.config.update",
|
|
110
110
|
summary: "Update global configuration",
|
|
111
|
-
description: "Update global
|
|
111
|
+
description: "Update global anymous configuration settings and preferences.",
|
|
112
112
|
}),
|
|
113
113
|
),
|
|
114
114
|
HttpApiEndpoint.post("dispose", GlobalPaths.dispose, {
|
|
@@ -117,7 +117,7 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
117
117
|
OpenApi.annotations({
|
|
118
118
|
identifier: "global.dispose",
|
|
119
119
|
summary: "Dispose instance",
|
|
120
|
-
description: "Clean up and dispose all
|
|
120
|
+
description: "Clean up and dispose all anymous instances, releasing all resources.",
|
|
121
121
|
}),
|
|
122
122
|
),
|
|
123
123
|
HttpApiEndpoint.post("upgrade", GlobalPaths.upgrade, {
|
|
@@ -127,8 +127,8 @@ export const GlobalApi = HttpApi.make("global").add(
|
|
|
127
127
|
}).annotateMerge(
|
|
128
128
|
OpenApi.annotations({
|
|
129
129
|
identifier: "global.upgrade",
|
|
130
|
-
summary: "Upgrade
|
|
131
|
-
description: "Upgrade
|
|
130
|
+
summary: "Upgrade anymous",
|
|
131
|
+
description: "Upgrade anymous to the specified version or latest if not specified.",
|
|
132
132
|
}),
|
|
133
133
|
),
|
|
134
134
|
)
|