@stjbrown/agent-knowledge 0.1.0-beta.7 → 0.1.0-beta.8
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/dist/{chunk-LQOMGCIP.js → chunk-3O3M2KG6.js} +2 -2
- package/dist/{chunk-GR2RFQE4.js → chunk-K2TO22OI.js} +3 -2
- package/dist/chunk-K2TO22OI.js.map +1 -0
- package/dist/{chunk-PRZR6RDP.js → chunk-UIDPQHJI.js} +3 -2
- package/dist/chunk-UIDPQHJI.js.map +1 -0
- package/dist/headless.js +2 -2
- package/dist/index.js +2 -2
- package/dist/main.js +4 -4
- package/dist/{tui-QMMAC7W7.js → tui-WYFA6QZ2.js} +3 -3
- package/package.json +4 -4
- package/dist/chunk-GR2RFQE4.js.map +0 -1
- package/dist/chunk-PRZR6RDP.js.map +0 -1
- /package/dist/{chunk-LQOMGCIP.js.map → chunk-3O3M2KG6.js.map} +0 -0
- /package/dist/{tui-QMMAC7W7.js.map → tui-WYFA6QZ2.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
hasAwsCredentials,
|
|
7
7
|
hasGoogleCredentials,
|
|
8
8
|
loadSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K2TO22OI.js";
|
|
10
10
|
|
|
11
11
|
// src/onboarding/providers.ts
|
|
12
12
|
var CODEX_MODELS = [
|
|
@@ -48,6 +48,7 @@ function availableModels() {
|
|
|
48
48
|
if (hasGoogleCredentials()) {
|
|
49
49
|
const via = "Vertex AI (ADC)";
|
|
50
50
|
out.push(
|
|
51
|
+
{ id: "vertex/claude-opus-5", label: "Claude Opus 5", via },
|
|
51
52
|
{ id: "vertex/claude-opus-4-8", label: "Claude Opus 4.8", via },
|
|
52
53
|
{ id: "vertex/claude-sonnet-4-5", label: "Claude Sonnet 4.5", via },
|
|
53
54
|
{ id: "vertex/gemini-2.5-pro", label: "Gemini 2.5 Pro", via }
|
|
@@ -91,4 +92,4 @@ export {
|
|
|
91
92
|
normalizeModelSelection,
|
|
92
93
|
availableModels
|
|
93
94
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-UIDPQHJI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/onboarding/providers.ts"],"sourcesContent":["import { hasGoogleCredentials } from \"../gateways/vertex.js\";\nimport { hasAwsCredentials } from \"../gateways/bedrock.js\";\nimport { getAuthStorage } from \"../gateways/oauth/claude-max.js\";\nimport { loadSettings } from \"./settings.js\";\n\nexport interface ModelChoice {\n /** Full model id, e.g. \"vertex/claude-opus-5\". */\n id: string;\n /** Short human label, e.g. \"Claude Opus 5\". */\n label: string;\n /** How this provider is reached, e.g. \"Vertex AI (ADC)\". */\n via: string;\n}\n\n/**\n * Models offered when signed in to a ChatGPT/Codex subscription (OAuth). The\n * Codex `responses` backend accepts the model id verbatim, so this is a\n * convenience lineup — ANY id also works via `/model openai/<id>`. Edit here as\n * OpenAI's Codex catalog changes.\n */\nexport const CODEX_MODELS: ReadonlyArray<{ id: string; label: string }> = [\n { id: \"gpt-5.6-sol\", label: \"GPT-5.6 Sol\" },\n { id: \"gpt-5.6-terra\", label: \"GPT-5.6 Terra\" },\n { id: \"gpt-5.6-luna\", label: \"GPT-5.6 Luna\" },\n { id: \"gpt-5.5\", label: \"GPT-5.5\" },\n { id: \"gpt-5.4\", label: \"GPT-5.4\" },\n { id: \"gpt-5.4-mini\", label: \"GPT-5.4 Mini\" },\n];\n\nconst LEGACY_CODEX_MODEL_IDS: Readonly<Record<string, string>> = {\n \"gpt-5.6-codex\": \"openai/gpt-5.6-sol\",\n \"openai/gpt-5.6-codex\": \"openai/gpt-5.6-sol\",\n \"gpt-5.5-codex\": \"openai/gpt-5.5\",\n \"openai/gpt-5.5-codex\": \"openai/gpt-5.5\",\n};\n\n/**\n * Resolve a hand-typed or previously persisted model name to Mastra's required\n * `provider/model` form when the active provider catalog makes it unambiguous.\n * Also migrates the invalid Codex aliases Janet advertised before v0.1.0.\n */\nexport function normalizeModelSelection(\n modelId: string,\n choices: ReadonlyArray<ModelChoice>,\n): string {\n const id = modelId.trim();\n const legacy = LEGACY_CODEX_MODEL_IDS[id];\n if (legacy) return legacy;\n if (!id || id.includes(\"/\")) return id;\n\n const matches = choices.filter((choice) => choice.id.endsWith(`/${id}`));\n return matches.length === 1 ? matches[0]!.id : id;\n}\n\nfunction hasOAuth(provider: string): boolean {\n try {\n const s = getAuthStorage();\n s.reload();\n return s.get(provider)?.type === \"oauth\";\n } catch {\n return false;\n }\n}\n\nfunction hasEnv(...vars: string[]): boolean {\n return vars.some((v) => !!process.env[v]);\n}\n\n/**\n * Enumerate concrete model choices from the providers that are actually\n * reachable on this machine right now (env keys, ADC, AWS chain, stored OAuth).\n * Ordered best-first. Empty when nothing is configured.\n */\nexport function availableModels(): ModelChoice[] {\n const out: ModelChoice[] = [];\n\n if (hasGoogleCredentials()) {\n const via = \"Vertex AI (ADC)\";\n out.push(\n { id: \"vertex/claude-opus-5\", label: \"Claude Opus 5\", via },\n { id: \"vertex/claude-opus-4-8\", label: \"Claude Opus 4.8\", via },\n { id: \"vertex/claude-sonnet-4-5\", label: \"Claude Sonnet 4.5\", via },\n { id: \"vertex/gemini-2.5-pro\", label: \"Gemini 2.5 Pro\", via },\n );\n }\n if (hasEnv(\"ANTHROPIC_API_KEY\") || hasOAuth(\"anthropic\")) {\n const via = hasOAuth(\"anthropic\") ? \"Anthropic (Claude Max)\" : \"Anthropic (API key)\";\n out.push(\n { id: \"anthropic/claude-opus-4-6\", label: \"Claude Opus 4.6\", via },\n { id: \"anthropic/claude-sonnet-4-5\", label: \"Claude Sonnet 4.5\", via },\n );\n }\n if (hasOAuth(\"openai-codex\")) {\n // Signed in to a ChatGPT/Codex subscription — offer the full Codex lineup.\n const via = \"OpenAI (ChatGPT/Codex)\";\n for (const m of CODEX_MODELS) out.push({ id: `openai/${m.id}`, label: m.label, via });\n } else if (hasEnv(\"OPENAI_API_KEY\")) {\n out.push({ id: \"openai/gpt-5.5\", label: \"GPT-5.5\", via: \"OpenAI (API key)\" });\n }\n if (hasAwsCredentials()) {\n const via = \"Amazon Bedrock (AWS)\";\n out.push(\n { id: \"amazon-bedrock/anthropic.claude-opus-4-1-20250805-v1:0\", label: \"Claude Opus 4.1\", via },\n { id: \"amazon-bedrock/anthropic.claude-sonnet-4-20250514-v1:0\", label: \"Claude Sonnet 4\", via },\n );\n }\n if (hasEnv(\"GOOGLE_GENERATIVE_AI_API_KEY\")) {\n out.push({ id: \"google/gemini-2.5-pro\", label: \"Gemini 2.5 Pro\", via: \"Google (API key)\" });\n }\n\n // Models the user has used directly (via /model or --model) that aren't\n // already listed — keeps the picker current as providers ship new models.\n const known = new Set(out.map((m) => m.id));\n for (const savedId of loadSettings().customModels ?? []) {\n const id = normalizeModelSelection(savedId, out);\n if (!known.has(id)) {\n out.push({ id, label: id.split(\"/\").pop() ?? id, via: \"saved\" });\n known.add(id);\n }\n }\n\n return out;\n}\n"],"mappings":";;;;;;;;;;;AAoBO,IAAM,eAA6D;AAAA,EACxE,EAAE,IAAI,eAAe,OAAO,cAAc;AAAA,EAC1C,EAAE,IAAI,iBAAiB,OAAO,gBAAgB;AAAA,EAC9C,EAAE,IAAI,gBAAgB,OAAO,eAAe;AAAA,EAC5C,EAAE,IAAI,WAAW,OAAO,UAAU;AAAA,EAClC,EAAE,IAAI,WAAW,OAAO,UAAU;AAAA,EAClC,EAAE,IAAI,gBAAgB,OAAO,eAAe;AAC9C;AAEA,IAAM,yBAA2D;AAAA,EAC/D,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,EACxB,iBAAiB;AAAA,EACjB,wBAAwB;AAC1B;AAOO,SAAS,wBACd,SACA,SACQ;AACR,QAAM,KAAK,QAAQ,KAAK;AACxB,QAAM,SAAS,uBAAuB,EAAE;AACxC,MAAI,OAAQ,QAAO;AACnB,MAAI,CAAC,MAAM,GAAG,SAAS,GAAG,E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BAAkB,OAAO,WAAW,KAAK,mBAAmB,CAAC;AAAA,EAC9E;AACA,MAAI,kBAAkB,GAAG;AACvB,UAAM,MAAM;AACZ,QAAI;AAAA,MACF,EAAE,IAAI,0DAA0D,OAAO,mBAAmB,IAAI;AAAA,MAC9F,EAAE,IAAI,0DAA0D,OAAO,mBAAmB,IAAI;AAAA,IAChG;AAAA,EACF;AACA,MAAI,OAAO,8BAA8B,GAAG;AAC1C,QAAI,KAAK,EAAE,IAAI,yBAAyB,OAAO,kBAAkB,KAAK,mBAAmB,CAAC;AAAA,EAC5F;AAIA,QAAM,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;AAC1C,aAAW,WAAW,aAAa,EAAE,gBAAgB,CAAC,GAAG;AACvD,UAAM,KAAK,wBAAwB,SAAS,GAAG;AAC/C,QAAI,CAAC,MAAM,IAAI,EAAE,GAAG;AAClB,UAAI,KAAK,EAAE,IAAI,OAAO,GAAG,MAAM,GAAG,EAAE,IAAI,KAAK,IAAI,KAAK,QAAQ,CAAC;AAC/D,YAAM,IAAI,EAAE;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/headless.js
CHANGED
|
@@ -3,8 +3,8 @@ import { createRequire as __janetCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __janetCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
runHeadless
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-3O3M2KG6.js";
|
|
7
|
+
import "./chunk-K2TO22OI.js";
|
|
8
8
|
export {
|
|
9
9
|
runHeadless
|
|
10
10
|
};
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { createRequire as __janetCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __janetCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
runHeadless
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3O3M2KG6.js";
|
|
7
7
|
import {
|
|
8
8
|
bootJanet,
|
|
9
9
|
resolveProjectPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K2TO22OI.js";
|
|
11
11
|
export {
|
|
12
12
|
bootJanet,
|
|
13
13
|
resolveProjectPaths,
|
package/dist/main.js
CHANGED
|
@@ -3,17 +3,17 @@ import { createRequire as __janetCreateRequire } from "node:module";
|
|
|
3
3
|
const require = __janetCreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
runHeadless
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3O3M2KG6.js";
|
|
7
7
|
import {
|
|
8
8
|
availableModels,
|
|
9
9
|
normalizeModelSelection
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UIDPQHJI.js";
|
|
11
11
|
import {
|
|
12
12
|
GREETING,
|
|
13
13
|
loadSettings,
|
|
14
14
|
packageVersion,
|
|
15
15
|
resolveProjectPaths
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K2TO22OI.js";
|
|
17
17
|
|
|
18
18
|
// src/main.ts
|
|
19
19
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -299,7 +299,7 @@ async function main(argv) {
|
|
|
299
299
|
const sub = parsed.subcommand;
|
|
300
300
|
if (!sub) {
|
|
301
301
|
if (!headless) {
|
|
302
|
-
const { runTui } = await import("./tui-
|
|
302
|
+
const { runTui } = await import("./tui-WYFA6QZ2.js");
|
|
303
303
|
if (modelId && !process.env["JANET_MODEL"]) process.env["JANET_MODEL"] = modelId;
|
|
304
304
|
return runTui({ dir, bundle: bundleOverride, threadId });
|
|
305
305
|
}
|
|
@@ -4,7 +4,7 @@ const require = __janetCreateRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
availableModels,
|
|
6
6
|
normalizeModelSelection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UIDPQHJI.js";
|
|
8
8
|
import {
|
|
9
9
|
GREETING,
|
|
10
10
|
bootJanet,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
rememberObservability,
|
|
18
18
|
resolveObservabilityConfig,
|
|
19
19
|
safeObservabilityEndpoint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-K2TO22OI.js";
|
|
21
21
|
|
|
22
22
|
// src/tui/index.ts
|
|
23
23
|
import {
|
|
@@ -993,4 +993,4 @@ Ask me anything in the bundle, or say what to ingest. /help for commands.`
|
|
|
993
993
|
export {
|
|
994
994
|
runTui
|
|
995
995
|
};
|
|
996
|
-
//# sourceMappingURL=tui-
|
|
996
|
+
//# sourceMappingURL=tui-WYFA6QZ2.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stjbrown/agent-knowledge",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "Janet builds and maintains portable LLM wikis in plain Markdown using OKF.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"test": "vitest run"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@ai-sdk/amazon-bedrock": "
|
|
50
|
-
"@ai-sdk/anthropic": "3.0.
|
|
51
|
-
"@ai-sdk/google-vertex": "
|
|
49
|
+
"@ai-sdk/amazon-bedrock": "4.0.143",
|
|
50
|
+
"@ai-sdk/anthropic": "3.0.103",
|
|
51
|
+
"@ai-sdk/google-vertex": "4.0.173",
|
|
52
52
|
"@ai-sdk/openai": "3.0.85",
|
|
53
53
|
"@ai-sdk/openai-compatible": "2.0.61",
|
|
54
54
|
"@aws-sdk/credential-providers": "3.1088.0",
|