@qvac/harness 0.2.7 → 0.2.9
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/harness.bundle +70 -16
- package/dist/prebuilds-manifest.json +8 -0
- package/dist-lib/index.d.ts +2 -1
- package/dist-lib/index.js +60 -59
- package/dist-lib/lib/audio-transcode-bare.js +2 -2
- package/dist-lib/lib/capabilities/completion.d.ts +35 -2
- package/dist-lib/lib/capabilities/completion.js +114 -48
- package/dist-lib/lib/capabilities/download.js +2 -2
- package/dist-lib/lib/capabilities/speech-text.js +1 -1
- package/dist-lib/lib/capabilities/tool-prompt-log.js +1 -1
- package/dist-lib/lib/capabilities/tool-selection.js +2 -2
- package/dist-lib/lib/capabilities/tool-turns.js +1 -1
- package/dist-lib/lib/capabilities/usage-breakdown.js +1 -1
- package/dist-lib/lib/capabilities/voice.js +3 -3
- package/dist-lib/lib/connect.js +12 -11
- package/dist-lib/lib/context-window.js +1 -1
- package/dist-lib/lib/contract-types.d.ts +1 -0
- package/dist-lib/lib/docx/index.js +3 -3
- package/dist-lib/lib/hardware/capability-probe.js +3 -3
- package/dist-lib/lib/hardware/gpu-probe-addon.js +2 -2
- package/dist-lib/lib/hardware/gpu-probe-entry.js +1 -1
- package/dist-lib/lib/helpers/markup-stream-filter.js +1 -1
- package/dist-lib/lib/helpers/run-outcome.js +1 -1
- package/dist-lib/lib/helpers/spawn-path.d.ts +1 -1
- package/dist-lib/lib/helpers/thinking.js +2 -2
- package/dist-lib/lib/helpers/tool-intent.js +1 -1
- package/dist-lib/lib/helpers/tool-label.js +3 -3
- package/dist-lib/lib/hooks/built-in/arg-repair.d.ts +1 -1
- package/dist-lib/lib/hooks/built-in/arg-repair.js +1 -1
- package/dist-lib/lib/hooks/built-in/egress.d.ts +1 -1
- package/dist-lib/lib/hooks/built-in/egress.js +2 -2
- package/dist-lib/lib/hooks/built-in/index.js +3 -3
- package/dist-lib/lib/hooks/built-in/skill-catalog.d.ts +1 -1
- package/dist-lib/lib/hooks/pipeline.js +4 -4
- package/dist-lib/lib/hooks/registry.js +1 -1
- package/dist-lib/lib/hooks/run.js +1 -1
- package/dist-lib/lib/models/model-catalog.js +4 -4
- package/dist-lib/lib/models/model-delete.js +1 -1
- package/dist-lib/lib/models/model-handle.js +1 -1
- package/dist-lib/lib/models/model-list.js +1 -1
- package/dist-lib/lib/models/model-pool.js +8 -8
- package/dist-lib/lib/models/model-source.js +1 -1
- package/dist-lib/lib/models/music-catalog.d.ts +1 -1
- package/dist-lib/lib/no-redirect-fetch-bare.js +3 -3
- package/dist-lib/lib/no-redirect-fetch-impl.js +1 -1
- package/dist-lib/lib/no-redirect-fetch-node.js +2 -2
- package/dist-lib/lib/resolution-detector.js +1 -1
- package/dist-lib/lib/sdk-loader.js +2 -2
- package/dist-lib/lib/sdk-storage.js +1 -1
- package/dist-lib/lib/serve.js +11 -10
- package/dist-lib/lib/spawn.js +3 -3
- package/dist-lib/lib/staging.js +1 -1
- package/dist-lib/lib/tools/catalog.js +1 -1
- package/dist-lib/lib/tools/create-documents.js +2 -2
- package/dist-lib/lib/tools/edit-documents.js +2 -2
- package/dist-lib/lib/tools/edit-image.js +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/attachments.js +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/create-effect.js +1 -1
- package/dist-lib/lib/tools/exec/adapters/python/loader.js +1 -1
- package/dist-lib/lib/tools/exec/adapters/python/memfs.js +2 -2
- package/dist-lib/lib/tools/exec/adapters/python/pyodide.js +6 -6
- package/dist-lib/lib/tools/exec/adapters/python/python-adapter.js +3 -3
- package/dist-lib/lib/tools/exec/adapters/python/run-session.js +5 -5
- package/dist-lib/lib/tools/exec/adapters/python/wheels.js +1 -1
- package/dist-lib/lib/tools/exec/adapters/python/worker/client.js +3 -3
- package/dist-lib/lib/tools/exec/adapters/python/worker/entry.js +4 -4
- package/dist-lib/lib/tools/exec/adapters/shell/shell-adapter.js +1 -1
- package/dist-lib/lib/tools/exec/obsidian/cli-process.js +2 -2
- package/dist-lib/lib/tools/exec/obsidian/cli.js +4 -4
- package/dist-lib/lib/tools/exec/obsidian/command.js +1 -1
- package/dist-lib/lib/tools/exec/obsidian/route.js +7 -7
- package/dist-lib/lib/tools/exec/obsidian/vault-create.js +2 -2
- package/dist-lib/lib/tools/exec/obsidian/vault-fs.js +6 -6
- package/dist-lib/lib/tools/exec/obsidian/vault-paths.js +2 -2
- package/dist-lib/lib/tools/exec/obsidian/vault-read.js +1 -1
- package/dist-lib/lib/tools/exec/obsidian/vault-write.js +2 -2
- package/dist-lib/lib/tools/exec/runner.js +1 -1
- package/dist-lib/lib/tools/exec.js +13 -13
- package/dist-lib/lib/tools/file-glob.js +3 -3
- package/dist-lib/lib/tools/fs/local.js +1 -1
- package/dist-lib/lib/tools/fs/remote.js +1 -1
- package/dist-lib/lib/tools/fs/walk.js +2 -2
- package/dist-lib/lib/tools/generate-image.js +4 -4
- package/dist-lib/lib/tools/generate-music.js +6 -6
- package/dist-lib/lib/tools/grep.js +6 -6
- package/dist-lib/lib/tools/http-request/truncate-response.js +1 -1
- package/dist-lib/lib/tools/http-request.js +9 -9
- package/dist-lib/lib/tools/mcp/utils.js +1 -1
- package/dist-lib/lib/tools/mcp-call.js +8 -8
- package/dist-lib/lib/tools/operations/builders.d.ts +1 -1
- package/dist-lib/lib/tools/operations/builders.js +1 -1
- package/dist-lib/lib/tools/operations/compile.js +1 -1
- package/dist-lib/lib/tools/operations/manifest.d.ts +16 -16
- package/dist-lib/lib/tools/operations/manifest.js +1 -1
- package/dist-lib/lib/tools/outbound-guard.js +1 -1
- package/dist-lib/lib/tools/rag-search.js +1 -1
- package/dist-lib/lib/tools/read-files.js +3 -3
- package/dist-lib/lib/tools/skill.js +8 -8
- package/dist-lib/lib/tools/skills/auth-resolver.js +2 -2
- package/dist-lib/lib/tools/skills/bin-check.js +1 -1
- package/dist-lib/lib/tools/skills/bundled-dir.js +2 -2
- package/dist-lib/lib/tools/skills/catalog.js +10 -10
- package/dist-lib/lib/tools/skills/cli-schema-check.js +1 -1
- package/dist-lib/lib/tools/skills/cli-schema-load.js +1 -1
- package/dist-lib/lib/tools/skills/cli-schema.js +4 -4
- package/dist-lib/lib/tools/skills/credential-check.js +3 -3
- package/dist-lib/lib/tools/skills/credential-grants.js +1 -1
- package/dist-lib/lib/tools/skills/credential-health.js +2 -2
- package/dist-lib/lib/tools/skills/frontmatter-parser.js +1 -1
- package/dist-lib/lib/tools/skills/index.js +5 -5
- package/dist-lib/lib/tools/skills/mention.js +1 -1
- package/dist-lib/lib/tools/skills/overlay-crud.js +1 -1
- package/dist-lib/lib/tools/skills/setup-routes.js +1 -1
- package/dist-lib/lib/tools/skills/skill-settings.js +1 -1
- package/dist-lib/lib/tools/skills/skill-state-constants.d.ts +8 -8
- package/dist-lib/lib/tools/skills/skill-state.js +9 -9
- package/dist-lib/lib/tools/toolsets.d.ts +1 -1
- package/dist-lib/lib/tools/url-guard.js +2 -2
- package/dist-lib/lib/tools/weather-lookup/place.d.ts +11 -0
- package/dist-lib/lib/tools/weather-lookup/place.js +152 -0
- package/dist-lib/lib/tools/weather-lookup/report.d.ts +37 -0
- package/dist-lib/lib/tools/weather-lookup/report.js +56 -0
- package/dist-lib/lib/tools/weather-lookup.d.ts +8 -0
- package/dist-lib/lib/tools/weather-lookup.js +110 -0
- package/dist-lib/lib/tools/web-fetch.js +10 -10
- package/dist-lib/lib/tools/web-search.js +2 -2
- package/dist-lib/lib/transport.js +1 -1
- package/dist-lib/lib/validating-lookup.js +1 -1
- package/dist-lib/lib/web-fetch/embedded-state.js +1 -1
- package/dist-lib/lib/web-fetch/extract.js +1 -1
- package/dist-lib/lib/web-fetch/images.js +1 -1
- package/dist-lib/lib/web-fetch/video.js +1 -1
- package/dist-lib/lib/web-search/engine-registry.js +7 -7
- package/dist-lib/lib/web-search/engines/aol.js +3 -3
- package/dist-lib/lib/web-search/engines/bing.js +4 -4
- package/dist-lib/lib/web-search/engines/brave.js +2 -2
- package/dist-lib/lib/web-search/engines/duckduckgo.js +3 -3
- package/dist-lib/lib/web-search/engines/google.js +4 -4
- package/dist-lib/lib/web-search/engines/wikipedia.js +2 -2
- package/dist-lib/lib/web-search/engines/yahoo.js +3 -3
- package/dist-lib/lib/web-search/fetch-html.js +1 -1
- package/dist-lib/lib/web-search/merge-results.js +1 -1
- package/dist-lib/lib/web-search/orchestrator.js +3 -3
- package/dist-lib/lib/wire.js +28 -0
- package/dist-lib/schema/baseline.js +1 -1
- package/dist-lib/schema/build.js +3 -3
- package/dist-lib/schema/harness.js +5 -2
- package/dist-lib/schema/release-tags.d.ts +2 -1
- package/dist-lib/schema/release-tags.js +9 -7
- package/dist-lib/spec/hrpc/messages.js +22 -7
- package/dist-lib/spec/hyperschema/index.js +22 -7
- package/dist-lib/spec/hyperschema/schema.json +14 -1
- package/dist-lib/spec/hyperschema/types.d.ts +3 -2
- package/package.json +21 -8
- package/worker/harness-sidecar.mjs +2 -0
- package/.claude/skills/asana/SKILL.md +0 -86
- package/.claude/skills/gh-stack/SKILL.md +0 -181
- package/.claude/skills/gh-stack/references/commands.md +0 -177
- package/.claude/skills/gh-stack/references/stack-design.md +0 -97
- package/.claude/skills/gh-stack/references/troubleshooting.md +0 -159
- package/.claude/skills/js-house-style/SKILL.md +0 -671
- package/.claude/skills/kvcache/SKILL.md +0 -171
- package/.claude/skills/pr-create/SKILL.md +0 -180
- package/.claude/skills/pr-review/SKILL.md +0 -217
- package/CLAUDE.md +0 -39
- package/docs/decisions/2026-05-29-kvcache-tool-turns.md +0 -75
- package/docs/decisions/2026-06-02-kvcache-tool-turns-reenabled.md +0 -127
- package/docs/decisions/2026-06-23-android-cpu-llm-defaults.md +0 -126
- package/docs/decisions/2026-07-29-assistant-owned-storage-layout.md +0 -88
- package/docs/decisions/2026-08-04-sidecar-orphan-reaping.md +0 -79
- package/docs/decisions/2026-08-11-pyodide-worker-thread.md +0 -68
- package/docs/decisions/2026-08-17-harness-hook-pipeline.md +0 -84
- package/docs/decisions/2026-08-17-harness-outbound-egress-guard.md +0 -176
- package/docs/decisions/2026-08-20-chat-prompt-prefix-is-stable.md +0 -95
- package/docs/decisions/2026-08-20-kvcache-static-placement.md +0 -109
- package/docs/decisions/2026-08-21-vendored-python-wheels.md +0 -85
- package/docs/decisions/2026-08-26-exec-is-not-gated-by-skills.md +0 -64
- package/docs/decisions/2026-08-27-writable-skills-overlay.md +0 -56
- package/docs/decisions/2026-09-01-skill-operation-manifests.md +0 -53
- package/docs/decisions/2026-09-01-usage-breakdown-is-measured.md +0 -78
- package/docs/decisions/2026-09-03-usage-breakdown-reported-by-the-harness.md +0 -136
- package/docs/decisions/INDEX.md +0 -38
- package/docs/decisions/TEMPLATE.md +0 -32
- package/docs/kvcache-reference.md +0 -655
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import process from 'process';
|
|
2
|
-
import { credentialRecord } from
|
|
3
|
-
import { isObsidianVaultPath, isSandboxedWorkbenchInstall, OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from
|
|
4
|
-
import { capOutput, MAX_OUTPUT_CHARS } from
|
|
5
|
-
import { runObsidianCli } from
|
|
6
|
-
import { normalizeObsidianCommand, parseObsidianCommand } from
|
|
7
|
-
import { OBSIDIAN_DESKTOP_AGENT_REQUIRED, OBSIDIAN_NO_SHELL_FALLBACK, OBSIDIAN_VAULT_SETUP_REQUIRED } from
|
|
8
|
-
import { executeVaultFsAction } from
|
|
2
|
+
import { credentialRecord } from '../../skills/auth-resolver.js';
|
|
3
|
+
import { isObsidianVaultPath, isSandboxedWorkbenchInstall, OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from '../../skills/obsidian-readiness.js';
|
|
4
|
+
import { capOutput, MAX_OUTPUT_CHARS } from '../runner.js';
|
|
5
|
+
import { runObsidianCli } from './cli.js';
|
|
6
|
+
import { normalizeObsidianCommand, parseObsidianCommand } from './command.js';
|
|
7
|
+
import { OBSIDIAN_DESKTOP_AGENT_REQUIRED, OBSIDIAN_NO_SHELL_FALLBACK, OBSIDIAN_VAULT_SETUP_REQUIRED } from './guidance.js';
|
|
8
|
+
import { executeVaultFsAction } from './vault-fs.js';
|
|
9
9
|
const DESKTOP_PLATFORMS = new Set(['darwin', 'linux', 'win32']);
|
|
10
10
|
function limitResult(result, maxOutputChars) {
|
|
11
11
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { markdownFileName } from
|
|
4
|
-
import { ensureWithinRoot, getArg, getContentArg, writeNewFileText } from
|
|
3
|
+
import { markdownFileName } from './note-name.js';
|
|
4
|
+
import { ensureWithinRoot, getArg, getContentArg, writeNewFileText } from './vault-paths.js';
|
|
5
5
|
function markdownPath(vaultPath, target) {
|
|
6
6
|
const notePath = target.endsWith('.md') ? target : `${target}.md`;
|
|
7
7
|
return ensureWithinRoot(vaultPath, notePath);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { handleCreate } from
|
|
2
|
-
import { todayStamp } from
|
|
3
|
-
import { handleDailyRead, handleFiles, handleFolders, handleOutline, handleProperties, handleRead, handleSearch, handleTags, handleVault, handleVaults, handleWordcount } from
|
|
4
|
-
import { handleAppend, handleDailyAppend, handleDelete, handleMove, handlePrepend, handlePropertySet, handleRename } from
|
|
5
|
-
export { parseObsidianCommand, normalizeObsidianCommand } from
|
|
6
|
-
export { ensureWithinRoot } from
|
|
1
|
+
import { handleCreate } from './vault-create.js';
|
|
2
|
+
import { todayStamp } from './vault-paths.js';
|
|
3
|
+
import { handleDailyRead, handleFiles, handleFolders, handleOutline, handleProperties, handleRead, handleSearch, handleTags, handleVault, handleVaults, handleWordcount } from './vault-read.js';
|
|
4
|
+
import { handleAppend, handleDailyAppend, handleDelete, handleMove, handlePrepend, handlePropertySet, handleRename } from './vault-write.js';
|
|
5
|
+
export { parseObsidianCommand, normalizeObsidianCommand } from './command.js';
|
|
6
|
+
export { ensureWithinRoot } from './vault-paths.js';
|
|
7
7
|
export function executeVaultFsAction(vaultPath, action, args) {
|
|
8
8
|
switch (action) {
|
|
9
9
|
case 'vault':
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { ensureWithinRoot, isSymlink, writeNewFileText } from
|
|
4
|
-
export { ensureWithinRoot, writeNewFileText } from
|
|
3
|
+
import { ensureWithinRoot, isSymlink, writeNewFileText } from './safe-path.js';
|
|
4
|
+
export { ensureWithinRoot, writeNewFileText } from './safe-path.js';
|
|
5
5
|
export const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
6
6
|
export function resolveNotePath(vaultPath, args) {
|
|
7
7
|
const fileArg = args.find((a) => a.startsWith('file='));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { dailyCandidates, ensureWithinRoot, FRONTMATTER_RE, getArg, listFolders, listMarkdownFiles, parseFrontmatter, readFileText, resolveNotePath, todayStamp } from
|
|
3
|
+
import { dailyCandidates, ensureWithinRoot, FRONTMATTER_RE, getArg, listFolders, listMarkdownFiles, parseFrontmatter, readFileText, resolveNotePath, todayStamp } from './vault-paths.js';
|
|
4
4
|
export function handleVault(vaultPath) {
|
|
5
5
|
return JSON.stringify({ name: path.basename(vaultPath), path: vaultPath });
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { markdownFileName } from
|
|
4
|
-
import { appendToFile, dailyCandidates, ensureWithinRoot, FRONTMATTER_RE, getArg, getContentArg, moveFile, readFileSnapshot, resolveNotePath, todayStamp, updateFileText, writeIfUnchanged } from
|
|
3
|
+
import { markdownFileName } from './note-name.js';
|
|
4
|
+
import { appendToFile, dailyCandidates, ensureWithinRoot, FRONTMATTER_RE, getArg, getContentArg, moveFile, readFileSnapshot, resolveNotePath, todayStamp, updateFileText, writeIfUnchanged } from './vault-paths.js';
|
|
5
5
|
export function handleAppend(vaultPath, args) {
|
|
6
6
|
const notePath = resolveNotePath(vaultPath, args);
|
|
7
7
|
if (!notePath || !fs.existsSync(notePath)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import process from 'process';
|
|
2
|
-
import { AbortedError } from
|
|
2
|
+
import { AbortedError } from '../../helpers/race-abort.js';
|
|
3
3
|
const DEFAULT_TIMEOUT_MS = 120_000;
|
|
4
4
|
export const MAX_OUTPUT_CHARS = 8_192;
|
|
5
5
|
export const MAX_OUTPUT_CHARS_LIMIT = 65_536;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { AbortedError } from
|
|
4
|
-
import { spawnEnv } from
|
|
5
|
-
import { checkPdfBuildSource, checkBareLengthArgs, checkPptxBuildSource, checkPythonSource, checkUnstagedRead, createPythonAdapter, isPythonLanguage, looksLikePythonSource, parseInputs, parseOutputs, parsePackages, parseWorkdir, runsThroughPyodide, unwrapPythonSource } from
|
|
6
|
-
import { pythonCreateEffect } from
|
|
7
|
-
import { createShellAdapter } from
|
|
8
|
-
import { routeObsidianCommand } from
|
|
9
|
-
import { MAX_OUTPUT_CHARS_LIMIT } from
|
|
10
|
-
import { bareBin, firstCommandToken, sanitizeCommand } from
|
|
11
|
-
import { shellArgv } from
|
|
12
|
-
import { canonicalDenyRoots, defaultRealpath, hostPath, resolveKey } from
|
|
13
|
-
import { unquoteArg } from
|
|
14
|
-
import { settingsEnv } from
|
|
15
|
-
import { checkCliOps } from
|
|
3
|
+
import { AbortedError } from '../helpers/race-abort.js';
|
|
4
|
+
import { spawnEnv } from '../helpers/spawn-path.js';
|
|
5
|
+
import { checkPdfBuildSource, checkBareLengthArgs, checkPptxBuildSource, checkPythonSource, checkUnstagedRead, createPythonAdapter, isPythonLanguage, looksLikePythonSource, parseInputs, parseOutputs, parsePackages, parseWorkdir, runsThroughPyodide, unwrapPythonSource } from './exec/adapters/python/python-adapter.js';
|
|
6
|
+
import { pythonCreateEffect } from './exec/adapters/python/create-effect.js';
|
|
7
|
+
import { createShellAdapter } from './exec/adapters/shell/shell-adapter.js';
|
|
8
|
+
import { routeObsidianCommand } from './exec/obsidian/route.js';
|
|
9
|
+
import { MAX_OUTPUT_CHARS_LIMIT } from './exec/runner.js';
|
|
10
|
+
import { bareBin, firstCommandToken, sanitizeCommand } from './exec/scope.js';
|
|
11
|
+
import { shellArgv } from './exec/shell-argv.js';
|
|
12
|
+
import { canonicalDenyRoots, defaultRealpath, hostPath, resolveKey } from './fs/scope.js';
|
|
13
|
+
import { unquoteArg } from './model-args.js';
|
|
14
|
+
import { settingsEnv } from './skills/skill-settings.js';
|
|
15
|
+
import { checkCliOps } from './skills/cli-schema.js';
|
|
16
16
|
function parsePositiveInt(value, name, max) {
|
|
17
17
|
if (value === undefined || value === null || value === '')
|
|
18
18
|
return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { compileGlob } from
|
|
2
|
-
import { NO_DIRS_GRANTED, canonicalDenyRoots, defaultRealpath, isDeniedPath, resolveKey } from
|
|
3
|
-
import { walkFiles } from
|
|
1
|
+
import { compileGlob } from './fs/glob.js';
|
|
2
|
+
import { NO_DIRS_GRANTED, canonicalDenyRoots, defaultRealpath, isDeniedPath, resolveKey } from './fs/scope.js';
|
|
3
|
+
import { walkFiles } from './fs/walk.js';
|
|
4
4
|
export const DEFAULT_GLOB_MATCHES = 100;
|
|
5
5
|
export const MAX_GLOB_MATCHES = 1000;
|
|
6
6
|
export async function searchTargets(dir, roots, realpath, deny) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { Writable } from 'streamx';
|
|
4
|
-
import { STAGING_DIR } from
|
|
4
|
+
import { STAGING_DIR } from '../../staging.js';
|
|
5
5
|
export const DRIVE_CALL_TIMEOUT_MS = 20_000;
|
|
6
6
|
export const MAX_DRIVE_BYTES = 8 * 1024 * 1024;
|
|
7
7
|
export const DRIVE_LIST_PAGE = 256;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hlog } from
|
|
2
|
-
import { displayPath } from
|
|
1
|
+
import { hlog } from '../../log.js';
|
|
2
|
+
import { displayPath } from './scope.js';
|
|
3
3
|
export const WALK_SKIP_DIRS = new Set(['.git', 'node_modules']);
|
|
4
4
|
export const MAX_WALK_ENTRIES = 10_000;
|
|
5
5
|
export const MAX_WALK_MS = 30_000;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ScopeLock from 'scope-lock';
|
|
2
|
-
import { AbortedError, raceAbort } from
|
|
3
|
-
import { DIFFUSION_CATALOG, imageModelFor } from
|
|
4
|
-
import { createLoadTracker } from
|
|
5
|
-
import { resolveModelSrc } from
|
|
2
|
+
import { AbortedError, raceAbort } from '../helpers/race-abort.js';
|
|
3
|
+
import { DIFFUSION_CATALOG, imageModelFor } from '../models/model-catalog.js';
|
|
4
|
+
import { createLoadTracker } from '../models/model-pool.js';
|
|
5
|
+
import { resolveModelSrc } from '../models/model-source.js';
|
|
6
6
|
export const MAX_DIM = 1024;
|
|
7
7
|
export const DIM_STEP = 64;
|
|
8
8
|
const DEFAULT_DIM = 512;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import process from 'process';
|
|
2
2
|
import ScopeLock from 'scope-lock';
|
|
3
|
-
import { AbortedError, raceAbort } from
|
|
4
|
-
import { hdiag } from
|
|
5
|
-
import { AUDIOGEN_CATALOG, musicChoiceForDit, musicDefaultSteps, musicModelSet } from
|
|
6
|
-
import { GENERATE_MUSIC_TOOL } from
|
|
7
|
-
import { createLoadTracker } from
|
|
8
|
-
import { resolveModelSrc } from
|
|
3
|
+
import { AbortedError, raceAbort } from '../helpers/race-abort.js';
|
|
4
|
+
import { hdiag } from '../log.js';
|
|
5
|
+
import { AUDIOGEN_CATALOG, musicChoiceForDit, musicDefaultSteps, musicModelSet } from '../models/model-catalog.js';
|
|
6
|
+
import { GENERATE_MUSIC_TOOL } from '../models/music-catalog.js';
|
|
7
|
+
import { createLoadTracker } from '../models/model-pool.js';
|
|
8
|
+
import { resolveModelSrc } from '../models/model-source.js';
|
|
9
9
|
export const MAX_DURATION_SECONDS = 300;
|
|
10
10
|
export const MIN_DURATION_SECONDS = 1;
|
|
11
11
|
export const MAX_STEPS = 60;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { hlog } from
|
|
2
|
-
import { searchTargets } from
|
|
3
|
-
import { readLines } from
|
|
4
|
-
import { isDriveReadTruncated } from
|
|
5
|
-
import { canonicalDenyRoots, defaultRealpath, isDeniedPath } from
|
|
6
|
-
import { walkFiles } from
|
|
1
|
+
import { hlog } from '../log.js';
|
|
2
|
+
import { searchTargets } from './file-glob.js';
|
|
3
|
+
import { readLines } from './fs/read.js';
|
|
4
|
+
import { isDriveReadTruncated } from './fs/remote.js';
|
|
5
|
+
import { canonicalDenyRoots, defaultRealpath, isDeniedPath } from './fs/scope.js';
|
|
6
|
+
import { walkFiles } from './fs/walk.js';
|
|
7
7
|
export const DEFAULT_GREP_MATCHES = 200;
|
|
8
8
|
export const MAX_GREP_MATCHES = 1000;
|
|
9
9
|
const MAX_LINE_CHARS = 500;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import defaultFetch from '#no-redirect-fetch';
|
|
2
2
|
import { AbortController } from 'bare-abort-controller';
|
|
3
|
-
import { lookupHost } from
|
|
4
|
-
import { READ_METHODS } from
|
|
5
|
-
import { encodeDeclaredFields } from
|
|
6
|
-
import { truncateResponseBody } from
|
|
7
|
-
import { AbortedError } from
|
|
8
|
-
import { applyQuery, buildHeaders, contentTypeOf, encodeBody, isRedirectStatus, parseJsonBody, parseObjectArg, TIMEOUT_MS } from
|
|
9
|
-
import { parseAuth, resolveBearerHeader, resolveRedirectBearerHeader } from
|
|
10
|
-
import { recordCredentialHealth } from
|
|
11
|
-
import { resolveOutboundUrl } from
|
|
3
|
+
import { lookupHost } from '../dns-lookup.js';
|
|
4
|
+
import { READ_METHODS } from './http-methods.js';
|
|
5
|
+
import { encodeDeclaredFields } from './http-request/encode-fields.js';
|
|
6
|
+
import { truncateResponseBody } from './http-request/truncate-response.js';
|
|
7
|
+
import { AbortedError } from '../helpers/race-abort.js';
|
|
8
|
+
import { applyQuery, buildHeaders, contentTypeOf, encodeBody, isRedirectStatus, parseJsonBody, parseObjectArg, TIMEOUT_MS } from './http-request/utils.js';
|
|
9
|
+
import { parseAuth, resolveBearerHeader, resolveRedirectBearerHeader } from './skills/auth-resolver.js';
|
|
10
|
+
import { recordCredentialHealth } from './skills/credential-health.js';
|
|
11
|
+
import { resolveOutboundUrl } from './url-guard.js';
|
|
12
12
|
const MAX_REDIRECTS = 5;
|
|
13
13
|
export function createHttpRequestTool({ fetch: fetchImpl, credentialStore, credentialAllowList, resolveHost = lookupHost } = {}) {
|
|
14
14
|
return {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import defaultFetch from '#no-redirect-fetch';
|
|
2
2
|
import { AbortController } from 'bare-abort-controller';
|
|
3
|
-
import { MCP_CALL_TOOL_NAME } from
|
|
4
|
-
import { lookupHost } from
|
|
5
|
-
import { AbortedError } from
|
|
6
|
-
import { isRedirectStatus, parseObjectArg } from
|
|
7
|
-
import { cacheSession, deleteSession, establishSession, flattenMcpResponse, getSession, isNotification, needsSession, normalizeMethod, post, readBody, sessionKey, TIMEOUT_MS } from
|
|
8
|
-
import { parseAuth, resolveBearerHeader } from
|
|
9
|
-
import { recordCredentialHealth } from
|
|
10
|
-
import { resolveOutboundUrl } from
|
|
3
|
+
import { MCP_CALL_TOOL_NAME } from '../capabilities/tool-names.js';
|
|
4
|
+
import { lookupHost } from '../dns-lookup.js';
|
|
5
|
+
import { AbortedError } from '../helpers/race-abort.js';
|
|
6
|
+
import { isRedirectStatus, parseObjectArg } from './http-request/utils.js';
|
|
7
|
+
import { cacheSession, deleteSession, establishSession, flattenMcpResponse, getSession, isNotification, needsSession, normalizeMethod, post, readBody, sessionKey, TIMEOUT_MS } from './mcp/utils.js';
|
|
8
|
+
import { parseAuth, resolveBearerHeader } from './skills/auth-resolver.js';
|
|
9
|
+
import { recordCredentialHealth } from './skills/credential-health.js';
|
|
10
|
+
import { resolveOutboundUrl } from './url-guard.js';
|
|
11
11
|
function nestedUrl(params) {
|
|
12
12
|
return typeof params?.url === 'string' && params.url.length > 0 ? params.url : undefined;
|
|
13
13
|
}
|
|
@@ -12,6 +12,6 @@ export type BuilderOutcome = {
|
|
|
12
12
|
export interface OperationBuilder {
|
|
13
13
|
build: (args: Record<string, unknown>) => BuilderOutcome;
|
|
14
14
|
}
|
|
15
|
-
export declare const BUILDER_NAMES: readonly [
|
|
15
|
+
export declare const BUILDER_NAMES: readonly ['gmail-send', 'gmail-draft', 'calendar-meet-event', 'calendar-add-meet', 'docs-create', 'docs-append-text', 'sheets-create', 'sheets-write-values', 'sheets-append-values', 'drive-create-folder', 'drive-trash', 'notion-create-page', 'notion-insert-content'];
|
|
16
16
|
export type BuilderName = (typeof BUILDER_NAMES)[number];
|
|
17
17
|
export declare const BUILDERS: Record<BuilderName, OperationBuilder>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomBytes } from 'crypto';
|
|
2
2
|
import b4a from 'b4a';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { buildGmailMessage, GmailEnvelopeSchema } from
|
|
4
|
+
import { buildGmailMessage, GmailEnvelopeSchema } from './gmail-message.js';
|
|
5
5
|
export const BUILDER_NAMES = [
|
|
6
6
|
'gmail-send',
|
|
7
7
|
'gmail-draft',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BUILDERS } from
|
|
1
|
+
import { BUILDERS } from './builders.js';
|
|
2
2
|
export function compileOperationTools(catalog, { httpRequestTool, mcpCallTool }) {
|
|
3
3
|
return catalog.flatMap((entry) => (entry.operations ?? []).flatMap((operation) => {
|
|
4
4
|
const transport = operation.request.transport === 'mcp' ? mcpCallTool : httpRequestTool;
|
|
@@ -9,46 +9,46 @@ declare const OperationSchema: z.ZodObject<{
|
|
|
9
9
|
method: z.ZodString;
|
|
10
10
|
url: z.ZodString;
|
|
11
11
|
builder: z.ZodEnum<{
|
|
12
|
-
"gmail-send": "gmail-send";
|
|
13
|
-
"gmail-draft": "gmail-draft";
|
|
14
|
-
"calendar-meet-event": "calendar-meet-event";
|
|
15
12
|
"calendar-add-meet": "calendar-add-meet";
|
|
16
|
-
"
|
|
13
|
+
"calendar-meet-event": "calendar-meet-event";
|
|
17
14
|
"docs-append-text": "docs-append-text";
|
|
18
|
-
"
|
|
19
|
-
"sheets-write-values": "sheets-write-values";
|
|
20
|
-
"sheets-append-values": "sheets-append-values";
|
|
15
|
+
"docs-create": "docs-create";
|
|
21
16
|
"drive-create-folder": "drive-create-folder";
|
|
22
17
|
"drive-trash": "drive-trash";
|
|
18
|
+
"gmail-draft": "gmail-draft";
|
|
19
|
+
"gmail-send": "gmail-send";
|
|
23
20
|
"notion-create-page": "notion-create-page";
|
|
24
21
|
"notion-insert-content": "notion-insert-content";
|
|
22
|
+
"sheets-append-values": "sheets-append-values";
|
|
23
|
+
"sheets-create": "sheets-create";
|
|
24
|
+
"sheets-write-values": "sheets-write-values";
|
|
25
25
|
}>;
|
|
26
26
|
}, z.core.$strip>, z.ZodObject<{
|
|
27
27
|
transport: z.ZodOptional<z.ZodLiteral<"http">>;
|
|
28
28
|
method: z.ZodEnum<{
|
|
29
|
+
DELETE: "DELETE";
|
|
29
30
|
GET: "GET";
|
|
31
|
+
PATCH: "PATCH";
|
|
30
32
|
POST: "POST";
|
|
31
33
|
PUT: "PUT";
|
|
32
|
-
PATCH: "PATCH";
|
|
33
|
-
DELETE: "DELETE";
|
|
34
34
|
}>;
|
|
35
35
|
url: z.ZodString;
|
|
36
36
|
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
37
37
|
urlDefaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
38
38
|
builder: z.ZodEnum<{
|
|
39
|
-
"gmail-send": "gmail-send";
|
|
40
|
-
"gmail-draft": "gmail-draft";
|
|
41
|
-
"calendar-meet-event": "calendar-meet-event";
|
|
42
39
|
"calendar-add-meet": "calendar-add-meet";
|
|
43
|
-
"
|
|
40
|
+
"calendar-meet-event": "calendar-meet-event";
|
|
44
41
|
"docs-append-text": "docs-append-text";
|
|
45
|
-
"
|
|
46
|
-
"sheets-write-values": "sheets-write-values";
|
|
47
|
-
"sheets-append-values": "sheets-append-values";
|
|
42
|
+
"docs-create": "docs-create";
|
|
48
43
|
"drive-create-folder": "drive-create-folder";
|
|
49
44
|
"drive-trash": "drive-trash";
|
|
45
|
+
"gmail-draft": "gmail-draft";
|
|
46
|
+
"gmail-send": "gmail-send";
|
|
50
47
|
"notion-create-page": "notion-create-page";
|
|
51
48
|
"notion-insert-content": "notion-insert-content";
|
|
49
|
+
"sheets-append-values": "sheets-append-values";
|
|
50
|
+
"sheets-create": "sheets-create";
|
|
51
|
+
"sheets-write-values": "sheets-write-values";
|
|
52
52
|
}>;
|
|
53
53
|
}, z.core.$strip>]>;
|
|
54
54
|
response: z.ZodOptional<z.ZodObject<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BUILDER_NAMES } from
|
|
2
|
+
import { BUILDER_NAMES } from './builders.js';
|
|
3
3
|
const ParameterType = z.enum(['string', 'number', 'boolean', 'object', 'integer', 'array', 'null']);
|
|
4
4
|
const ParameterSchema = z.lazy(() => z.object({
|
|
5
5
|
type: z.union([ParameterType, z.array(ParameterType).min(1)]),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { grounded } from 'asenion';
|
|
2
2
|
import { decodeBase64, printableRatio, strings } from 'asenion/guards';
|
|
3
|
-
import { READ_METHODS } from
|
|
3
|
+
import { READ_METHODS } from './http-methods.js';
|
|
4
4
|
const ADDRESS = /[^\s<>,;:"'\\]{1,64}@[^\s<>,;:"'\\]{1,255}\.[A-Za-z]{2,24}/g;
|
|
5
5
|
const PRINTABLE_RATIO = 0.9;
|
|
6
6
|
const RESERVED_DOMAINS = new Set(['example.com', 'example.net', 'example.org']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readLines } from
|
|
2
|
-
import { isDriveReadTruncated } from
|
|
3
|
-
import { canonicalDenyRoots, defaultRealpath, resolveKey } from
|
|
1
|
+
import { readLines } from './fs/read.js';
|
|
2
|
+
import { isDriveReadTruncated } from './fs/remote.js';
|
|
3
|
+
import { canonicalDenyRoots, defaultRealpath, resolveKey } from './fs/scope.js';
|
|
4
4
|
export const DEFAULT_READ_CHARS = 8192;
|
|
5
5
|
export const MAX_READ_CHARS = 65_536;
|
|
6
6
|
function lineIndex(value) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import b4a from 'b4a';
|
|
3
3
|
import Localdrive from 'localdrive';
|
|
4
|
-
import { OBSIDIAN_VAULT_MODE_NOTE } from
|
|
5
|
-
import { unquoteArg } from
|
|
6
|
-
import { credentialRecord } from
|
|
7
|
-
import { resolveSkillsOverlayDir } from
|
|
8
|
-
import { parseSkillFrontMatter } from
|
|
9
|
-
import { parseToolGrant } from
|
|
10
|
-
import { shellEscapeArg } from
|
|
11
|
-
import { isObsidianVaultPath, OBSIDIAN_SKILL_NAME, OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from
|
|
4
|
+
import { OBSIDIAN_VAULT_MODE_NOTE } from './exec/obsidian/guidance.js';
|
|
5
|
+
import { unquoteArg } from './model-args.js';
|
|
6
|
+
import { credentialRecord } from './skills/auth-resolver.js';
|
|
7
|
+
import { resolveSkillsOverlayDir } from './skills/overlay-dir.js';
|
|
8
|
+
import { parseSkillFrontMatter } from './skills/frontmatter-parser.js';
|
|
9
|
+
import { parseToolGrant } from './skills/tool-grants.js';
|
|
10
|
+
import { shellEscapeArg } from './exec/shell-argv.js';
|
|
11
|
+
import { isObsidianVaultPath, OBSIDIAN_SKILL_NAME, OBSIDIAN_VAULT_PATH_CREDENTIAL_KEY } from './skills/obsidian-readiness.js';
|
|
12
12
|
const MAIN_FILE = 'SKILL.md';
|
|
13
13
|
function resolveSkillDir(root, name) {
|
|
14
14
|
if (!root)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { raceAbort } from
|
|
2
|
-
import { parseObjectArg } from
|
|
1
|
+
import { raceAbort } from '../../helpers/race-abort.js';
|
|
2
|
+
import { parseObjectArg } from '../http-request/utils.js';
|
|
3
3
|
export function credentialRecord(value) {
|
|
4
4
|
if (typeof value === 'string')
|
|
5
5
|
return value ? { token: value } : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import process from 'process';
|
|
4
|
-
import { withHomebrewPath } from
|
|
4
|
+
import { withHomebrewPath } from '../../helpers/spawn-path.js';
|
|
5
5
|
const SAFE_BIN_NAME = /^[A-Za-z0-9._-]+$/;
|
|
6
6
|
function envPath() {
|
|
7
7
|
return process.env.PATH ?? process.env.Path ?? '';
|
|
@@ -2,8 +2,8 @@ import fs from 'fs';
|
|
|
2
2
|
import os from 'os';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import process from 'process';
|
|
5
|
-
import { userTmpPath } from
|
|
6
|
-
import { hashBundledSkills } from
|
|
5
|
+
import { userTmpPath } from '../../tmp-path.js';
|
|
6
|
+
import { hashBundledSkills } from './bundled-hash.js';
|
|
7
7
|
import { SKILLS as BUNDLED_SKILLS } from '@qvac/skills/bundled';
|
|
8
8
|
import { SKILLS_HASH as BUNDLED_SKILLS_HASH } from '@qvac/skills/hash';
|
|
9
9
|
let inflight = null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { platform } from 'os';
|
|
3
3
|
import path from 'path';
|
|
4
|
-
import { parseSkillFrontMatter } from
|
|
5
|
-
import { buildCliValidator, loadSkillCli } from
|
|
6
|
-
import { isModelCompatible, isStub, isToolSupported, resolveSkillState, SKILL_STATE, supportsPlatform } from
|
|
7
|
-
import { validateCredentialChecks } from
|
|
8
|
-
import { OBSIDIAN_SKILL_NAME } from
|
|
9
|
-
import { parseToolGrant } from
|
|
10
|
-
import { deriveSetup } from
|
|
11
|
-
import { resolveSkillsOverlayDir } from
|
|
12
|
-
import { parseOperationsManifest } from
|
|
13
|
-
import { hlog } from
|
|
4
|
+
import { parseSkillFrontMatter } from './frontmatter-parser.js';
|
|
5
|
+
import { buildCliValidator, loadSkillCli } from './cli-schema.js';
|
|
6
|
+
import { isModelCompatible, isStub, isToolSupported, resolveSkillState, SKILL_STATE, supportsPlatform } from './skill-state.js';
|
|
7
|
+
import { validateCredentialChecks } from './credential-check.js';
|
|
8
|
+
import { OBSIDIAN_SKILL_NAME } from './obsidian-readiness.js';
|
|
9
|
+
import { parseToolGrant } from './tool-grants.js';
|
|
10
|
+
import { deriveSetup } from './setup-routes.js';
|
|
11
|
+
import { resolveSkillsOverlayDir } from './overlay-dir.js';
|
|
12
|
+
import { parseOperationsManifest } from '../operations/manifest.js';
|
|
13
|
+
import { hlog } from '../../log.js';
|
|
14
14
|
export function skillSupportsPlatform(entry, platform) {
|
|
15
15
|
return supportsPlatform(entry, platform);
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { argvToObject, isObjectSchema, objectProps, walkCommands } from
|
|
2
|
+
import { argvToObject, isObjectSchema, objectProps, walkCommands } from './cli-argv.js';
|
|
3
3
|
export function buildSchemaAnnotation(schema) {
|
|
4
4
|
const resourceEffects = schema['x-resource-effects'];
|
|
5
5
|
return (argv) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { CLI_SCHEMA_FILENAME } from
|
|
3
|
+
import { CLI_SCHEMA_FILENAME } from './cli-schema-types.js';
|
|
4
4
|
export async function resolveCliSchema(skillDir, bin, readFile = (p) => fs.promises.readFile(p, 'utf8')) {
|
|
5
5
|
const full = path.join(skillDir, CLI_SCHEMA_FILENAME);
|
|
6
6
|
let raw;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { CLI_SCHEMA_FILENAME } from
|
|
2
|
-
export { argvToObject } from
|
|
3
|
-
export { loadSkillCli, resolveCliSchema, execBinFromTools } from
|
|
4
|
-
import { buildSchemaAnnotation, buildSchemaCheck } from
|
|
1
|
+
export { CLI_SCHEMA_FILENAME } from './cli-schema-types.js';
|
|
2
|
+
export { argvToObject } from './cli-argv.js';
|
|
3
|
+
export { loadSkillCli, resolveCliSchema, execBinFromTools } from './cli-schema-load.js';
|
|
4
|
+
import { buildSchemaAnnotation, buildSchemaCheck } from './cli-schema-check.js';
|
|
5
5
|
export function buildCliValidator(def) {
|
|
6
6
|
const bin = def.bin.toLowerCase();
|
|
7
7
|
if (!def.schema) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fetch from '#fetch';
|
|
2
2
|
import { Headers } from '#headers';
|
|
3
3
|
import { AbortController } from 'bare-abort-controller';
|
|
4
|
-
import { DEFAULT_USER_AGENT } from
|
|
5
|
-
import { credentialRecord, isCredentialUrlAllowed } from
|
|
6
|
-
import { credentialLastProbedAt, markCredentialRejected, markCredentialValid, setCredentialLastProbedAt } from
|
|
4
|
+
import { DEFAULT_USER_AGENT } from '../../user-agent.js';
|
|
5
|
+
import { credentialRecord, isCredentialUrlAllowed } from './auth-resolver.js';
|
|
6
|
+
import { credentialLastProbedAt, markCredentialRejected, markCredentialValid, setCredentialLastProbedAt } from './credential-health.js';
|
|
7
7
|
const TIMEOUT_MS = 5_000;
|
|
8
8
|
export const CREDENTIAL_CHECK_TTL_MS = 45_000;
|
|
9
9
|
const inflight = new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hlog } from
|
|
2
|
-
import { scopeKey } from
|
|
1
|
+
import { hlog } from '../../log.js';
|
|
2
|
+
import { scopeKey } from './scope-key.js';
|
|
3
3
|
const rejected = new Set();
|
|
4
4
|
const lastProbedAt = new Map();
|
|
5
5
|
function scopedKey(key, agentId, skill) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseManifestBlock } from
|
|
1
|
+
import { parseManifestBlock } from './manifest-parse.js';
|
|
2
2
|
const FRONT_MATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/;
|
|
3
3
|
const FIELD_RE = /^([A-Za-z_][\w-]*):(.*)$/;
|
|
4
4
|
const LIST_FIELDS = new Set(['tools', 'platform', 'credentials', 'allow_list', 'aliases']);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './auth-resolver.js';
|
|
2
|
+
export * from './catalog.js';
|
|
3
|
+
export * from './cli-schema.js';
|
|
4
|
+
export * from './credential-grants.js';
|
|
5
|
+
export * from './frontmatter-parser.js';
|