@yanlinglabs/winter-agent-runtime 0.0.27
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/NOTICE +41 -0
- package/README.md +64 -0
- package/dist/checkpoint/file-history.d.ts +81 -0
- package/dist/checkpoint/rewind.d.ts +55 -0
- package/dist/checkpoint/seam.d.ts +47 -0
- package/dist/checkpoint/sink.d.ts +66 -0
- package/dist/commands/builtins-listing.d.ts +40 -0
- package/dist/commands/resolver.d.ts +103 -0
- package/dist/commands/seam.d.ts +53 -0
- package/dist/compaction/controller.d.ts +23 -0
- package/dist/compaction/retention.d.ts +35 -0
- package/dist/compaction/seam.d.ts +115 -0
- package/dist/compaction/summarizer.d.ts +79 -0
- package/dist/context/agent-listing.d.ts +39 -0
- package/dist/context/assembler.d.ts +46 -0
- package/dist/context/attachments.d.ts +104 -0
- package/dist/context/dynamic-sections.d.ts +31 -0
- package/dist/context/git-fixture.d.ts +18 -0
- package/dist/context/git-status.d.ts +16 -0
- package/dist/context/imports.d.ts +22 -0
- package/dist/context/injection.d.ts +53 -0
- package/dist/context/memory-key.d.ts +46 -0
- package/dist/context/memory.d.ts +28 -0
- package/dist/context/minimal-prompt.d.ts +5 -0
- package/dist/context/output-styles.d.ts +68 -0
- package/dist/context/plan-mode.d.ts +29 -0
- package/dist/context/request-layout.d.ts +138 -0
- package/dist/context/rules.d.ts +63 -0
- package/dist/context/seam.d.ts +136 -0
- package/dist/context/tool-epoch.d.ts +118 -0
- package/dist/context/winter-code-preset.d.ts +39 -0
- package/dist/context/winter-md.d.ts +81 -0
- package/dist/embedded-host.d.ts +48 -0
- package/dist/embedded-host.js +155 -0
- package/dist/embedded-protocol.d.ts +44 -0
- package/dist/embedded-worker.d.ts +1 -0
- package/dist/embedded-worker.js +74 -0
- package/dist/embedded.d.ts +34 -0
- package/dist/embedded.js +9 -0
- package/dist/engine.d.ts +1298 -0
- package/dist/hooks/additional-context.d.ts +21 -0
- package/dist/hooks/bounds.d.ts +6 -0
- package/dist/hooks/bridge-invoker.d.ts +3 -0
- package/dist/hooks/command-invoker.d.ts +52 -0
- package/dist/hooks/from-config.d.ts +31 -0
- package/dist/hooks/hook-stage.d.ts +25 -0
- package/dist/hooks/input-validator.d.ts +6 -0
- package/dist/hooks/reducer.d.ts +74 -0
- package/dist/hooks/registry.d.ts +33 -0
- package/dist/hooks/runner.d.ts +105 -0
- package/dist/index-584yahed.js +6037 -0
- package/dist/index-97t2rmtf.js +42 -0
- package/dist/index-9qgkpv56.js +27183 -0
- package/dist/index-bef62z3r.js +437 -0
- package/dist/index-rkhh0457.js +187 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +353 -0
- package/dist/main.d.ts +1 -0
- package/dist/mcp/client.d.ts +105 -0
- package/dist/mcp/control-seam.d.ts +25 -0
- package/dist/mcp/control.d.ts +5 -0
- package/dist/mcp/elicitation.d.ts +35 -0
- package/dist/mcp/env.d.ts +12 -0
- package/dist/mcp/lifecycle.d.ts +142 -0
- package/dist/mcp/output-cap.d.ts +15 -0
- package/dist/mcp/state.d.ts +24 -0
- package/dist/mcp/test-fixtures.d.ts +88 -0
- package/dist/mcp/transports/__fixtures__/stdio-server.d.ts +1 -0
- package/dist/mcp/transports/http.d.ts +5 -0
- package/dist/mcp/transports/sdk.d.ts +5 -0
- package/dist/mcp/transports/sse.d.ts +3 -0
- package/dist/mcp/transports/stdio.d.ts +35 -0
- package/dist/mcp/winter-server.d.ts +2 -0
- package/dist/messaging/reference-adapter.d.ts +88 -0
- package/dist/messaging/router.d.ts +8 -0
- package/dist/paths/project-dir-name.d.ts +2 -0
- package/dist/paths/temp.d.ts +25 -0
- package/dist/permissions/approvals.d.ts +107 -0
- package/dist/permissions/auto/caches.d.ts +53 -0
- package/dist/permissions/auto/config.d.ts +37 -0
- package/dist/permissions/auto/engine.d.ts +74 -0
- package/dist/permissions/auto/envelope.d.ts +45 -0
- package/dist/permissions/auto/inheritance.d.ts +27 -0
- package/dist/permissions/edit-recognition.d.ts +30 -0
- package/dist/permissions/evaluator.d.ts +284 -0
- package/dist/permissions/file-rules.d.ts +384 -0
- package/dist/permissions/grammar.d.ts +113 -0
- package/dist/permissions/paths.d.ts +32 -0
- package/dist/permissions/policy-state.d.ts +64 -0
- package/dist/permissions/prompt-stage.d.ts +3 -0
- package/dist/permissions/protected.d.ts +54 -0
- package/dist/permissions/ruleset.d.ts +134 -0
- package/dist/permissions/shell-structure.d.ts +41 -0
- package/dist/plugins/bundle.d.ts +100 -0
- package/dist/plugins/installed.d.ts +30 -0
- package/dist/plugins/loader.d.ts +56 -0
- package/dist/plugins/manifest.d.ts +115 -0
- package/dist/production-wiring.d.ts +340 -0
- package/dist/protocol/channel.d.ts +22 -0
- package/dist/provider/advisor-route.d.ts +47 -0
- package/dist/provider/bridge.d.ts +124 -0
- package/dist/provider/classifier/model-classifier.d.ts +82 -0
- package/dist/provider/classifier/prompt.d.ts +62 -0
- package/dist/provider/classifier/verdict-schema.d.ts +83 -0
- package/dist/provider/credential-api.d.ts +160 -0
- package/dist/provider/family-listing.d.ts +27 -0
- package/dist/provider/first-party.d.ts +4 -0
- package/dist/provider/keychain-store.d.ts +59 -0
- package/dist/provider/lean-prompt.d.ts +7 -0
- package/dist/provider/mock.d.ts +55 -0
- package/dist/provider/scenario-fake.d.ts +96 -0
- package/dist/provider/selection.d.ts +115 -0
- package/dist/provider/session-provider.d.ts +426 -0
- package/dist/provider/slots.d.ts +120 -0
- package/dist/provider/stream-frames.d.ts +25 -0
- package/dist/provider/tool-secret.d.ts +57 -0
- package/dist/rpc/bridge.d.ts +14 -0
- package/dist/rpc/mcp-control.d.ts +26 -0
- package/dist/runtime.d.ts +14 -0
- package/dist/sandbox/profile.d.ts +249 -0
- package/dist/sandbox/spawn.d.ts +139 -0
- package/dist/settings/env-filter.d.ts +52 -0
- package/dist/settings/loaders/hooks.d.ts +44 -0
- package/dist/settings/loaders/mcp-config.d.ts +83 -0
- package/dist/settings/loaders/plugin-mcp.d.ts +3 -0
- package/dist/settings/loaders/strict-plugin-only.d.ts +13 -0
- package/dist/settings/resolve.d.ts +2 -0
- package/dist/settings/sources.d.ts +2 -0
- package/dist/settings/trust.d.ts +36 -0
- package/dist/skills/attachment.d.ts +25 -0
- package/dist/skills/frontmatter.d.ts +64 -0
- package/dist/skills/index.d.ts +16 -0
- package/dist/skills/listing.d.ts +89 -0
- package/dist/skills/loader.d.ts +104 -0
- package/dist/skills/option.d.ts +68 -0
- package/dist/skills/permission-rules.d.ts +21 -0
- package/dist/skills/runtime.d.ts +21 -0
- package/dist/skills/store.d.ts +163 -0
- package/dist/store/continuation-attach.d.ts +44 -0
- package/dist/store/dialect.d.ts +526 -0
- package/dist/store/provider-state.d.ts +188 -0
- package/dist/store/resume.d.ts +92 -0
- package/dist/structured/ajv-seam.d.ts +7 -0
- package/dist/structured/descriptor.d.ts +9 -0
- package/dist/structured/seam.d.ts +51 -0
- package/dist/structured/validator.d.ts +22 -0
- package/dist/subagents/activity.d.ts +13 -0
- package/dist/subagents/availability.d.ts +30 -0
- package/dist/subagents/builtin-agents.d.ts +37 -0
- package/dist/subagents/child-engine.d.ts +198 -0
- package/dist/subagents/child-handle.d.ts +344 -0
- package/dist/subagents/definitions.d.ts +189 -0
- package/dist/subagents/fork.d.ts +55 -0
- package/dist/subagents/git-root.d.ts +1 -0
- package/dist/subagents/limits.d.ts +28 -0
- package/dist/subagents/notification-queue.d.ts +233 -0
- package/dist/subagents/plugin-agents.d.ts +5 -0
- package/dist/subagents/policy.d.ts +46 -0
- package/dist/subagents/register-default-factory.d.ts +66 -0
- package/dist/subagents/resolution.d.ts +56 -0
- package/dist/subagents/restore.d.ts +9 -0
- package/dist/subagents/roster.d.ts +17 -0
- package/dist/subagents/test-fakes.d.ts +12 -0
- package/dist/subagents/tool-pools.d.ts +69 -0
- package/dist/subagents/watchdog.d.ts +13 -0
- package/dist/subagents/workspace.d.ts +27 -0
- package/dist/testing.d.ts +5 -0
- package/dist/testing.js +194 -0
- package/dist/tools/background-tasks.d.ts +10 -0
- package/dist/tools/descriptors/_shared.d.ts +34 -0
- package/dist/tools/descriptors/advisor.d.ts +1 -0
- package/dist/tools/descriptors/agent.d.ts +47 -0
- package/dist/tools/descriptors/artifact.d.ts +1 -0
- package/dist/tools/descriptors/ask-user-question.d.ts +1 -0
- package/dist/tools/descriptors/bash.d.ts +20 -0
- package/dist/tools/descriptors/claude-design.d.ts +1 -0
- package/dist/tools/descriptors/cron-create.d.ts +1 -0
- package/dist/tools/descriptors/cron-delete.d.ts +1 -0
- package/dist/tools/descriptors/cron-list.d.ts +1 -0
- package/dist/tools/descriptors/edit.d.ts +1 -0
- package/dist/tools/descriptors/end-conversation.d.ts +1 -0
- package/dist/tools/descriptors/enter-plan-mode.d.ts +1 -0
- package/dist/tools/descriptors/enter-worktree.d.ts +1 -0
- package/dist/tools/descriptors/exit-plan-mode.d.ts +1 -0
- package/dist/tools/descriptors/exit-worktree.d.ts +1 -0
- package/dist/tools/descriptors/glob.d.ts +1 -0
- package/dist/tools/descriptors/grep.d.ts +1 -0
- package/dist/tools/descriptors/index.d.ts +59 -0
- package/dist/tools/descriptors/list-agents.d.ts +1 -0
- package/dist/tools/descriptors/list-mcp-resources-tool.d.ts +1 -0
- package/dist/tools/descriptors/lsp.d.ts +1 -0
- package/dist/tools/descriptors/monitor.d.ts +1 -0
- package/dist/tools/descriptors/notebook-edit.d.ts +1 -0
- package/dist/tools/descriptors/powershell.d.ts +1 -0
- package/dist/tools/descriptors/projects.d.ts +1 -0
- package/dist/tools/descriptors/propose-goal.d.ts +1 -0
- package/dist/tools/descriptors/propose-skills.d.ts +1 -0
- package/dist/tools/descriptors/push-notification.d.ts +1 -0
- package/dist/tools/descriptors/read-mcp-resource-dir-tool.d.ts +1 -0
- package/dist/tools/descriptors/read-mcp-resource-tool.d.ts +1 -0
- package/dist/tools/descriptors/read-notifications.d.ts +1 -0
- package/dist/tools/descriptors/read.d.ts +1 -0
- package/dist/tools/descriptors/refresh-mcp-tools.d.ts +1 -0
- package/dist/tools/descriptors/remote-trigger.d.ts +1 -0
- package/dist/tools/descriptors/repl.d.ts +1 -0
- package/dist/tools/descriptors/report-findings.d.ts +1 -0
- package/dist/tools/descriptors/schedule-wakeup.d.ts +1 -0
- package/dist/tools/descriptors/send-feedback.d.ts +1 -0
- package/dist/tools/descriptors/send-message.d.ts +1 -0
- package/dist/tools/descriptors/send-user-file.d.ts +1 -0
- package/dist/tools/descriptors/share-onboarding-guide.d.ts +1 -0
- package/dist/tools/descriptors/show-onboarding-role-picker.d.ts +1 -0
- package/dist/tools/descriptors/skill.d.ts +1 -0
- package/dist/tools/descriptors/structured-output.d.ts +1 -0
- package/dist/tools/descriptors/task-create.d.ts +1 -0
- package/dist/tools/descriptors/task-get.d.ts +1 -0
- package/dist/tools/descriptors/task-list.d.ts +1 -0
- package/dist/tools/descriptors/task-output.d.ts +1 -0
- package/dist/tools/descriptors/task-stop.d.ts +1 -0
- package/dist/tools/descriptors/task-update.d.ts +1 -0
- package/dist/tools/descriptors/todo-write.d.ts +1 -0
- package/dist/tools/descriptors/tool-search.d.ts +1 -0
- package/dist/tools/descriptors/wait-for-mcp-servers.d.ts +1 -0
- package/dist/tools/descriptors/web-fetch.d.ts +8 -0
- package/dist/tools/descriptors/web-search.d.ts +15 -0
- package/dist/tools/descriptors/winter-list-agents.d.ts +1 -0
- package/dist/tools/descriptors/winter-send-message.d.ts +1 -0
- package/dist/tools/descriptors/workflow.d.ts +1 -0
- package/dist/tools/descriptors/write.d.ts +1 -0
- package/dist/tools/impl/_caller.d.ts +14 -0
- package/dist/tools/impl/_domains.d.ts +25 -0
- package/dist/tools/impl/_exa-client.d.ts +122 -0
- package/dist/tools/impl/_exa-session-client.d.ts +23 -0
- package/dist/tools/impl/_inner-model.d.ts +135 -0
- package/dist/tools/impl/_search-budget.d.ts +36 -0
- package/dist/tools/impl/_web-fetch-cache.d.ts +37 -0
- package/dist/tools/impl/_web-fetch-html.d.ts +26 -0
- package/dist/tools/impl/_web-fetch-net.d.ts +99 -0
- package/dist/tools/impl/_web-search-assembler.d.ts +57 -0
- package/dist/tools/impl/advisor.d.ts +37 -0
- package/dist/tools/impl/agent.d.ts +10 -0
- package/dist/tools/impl/ask-user-question.d.ts +5 -0
- package/dist/tools/impl/background-task-runtime.d.ts +272 -0
- package/dist/tools/impl/bash.d.ts +78 -0
- package/dist/tools/impl/cron.d.ts +11 -0
- package/dist/tools/impl/edit.d.ts +1 -0
- package/dist/tools/impl/enter-plan-mode.d.ts +4 -0
- package/dist/tools/impl/enter-worktree.d.ts +25 -0
- package/dist/tools/impl/exit-plan-mode.d.ts +4 -0
- package/dist/tools/impl/exit-worktree.d.ts +4 -0
- package/dist/tools/impl/glob.d.ts +1 -0
- package/dist/tools/impl/grep.d.ts +19 -0
- package/dist/tools/impl/index.d.ts +37 -0
- package/dist/tools/impl/list-agents.d.ts +7 -0
- package/dist/tools/impl/list-mcp-resources-tool.d.ts +9 -0
- package/dist/tools/impl/monitor.d.ts +66 -0
- package/dist/tools/impl/notebook-edit.d.ts +1 -0
- package/dist/tools/impl/push-notification.d.ts +4 -0
- package/dist/tools/impl/read-ladder.d.ts +25 -0
- package/dist/tools/impl/read-mcp-resource-dir-tool.d.ts +9 -0
- package/dist/tools/impl/read-mcp-resource-tool.d.ts +9 -0
- package/dist/tools/impl/read-notifications.d.ts +5 -0
- package/dist/tools/impl/read.d.ts +44 -0
- package/dist/tools/impl/refresh-mcp-tools.d.ts +8 -0
- package/dist/tools/impl/report-findings.d.ts +1 -0
- package/dist/tools/impl/schedule-wakeup.d.ts +2 -0
- package/dist/tools/impl/send-message.d.ts +7 -0
- package/dist/tools/impl/skill.d.ts +5 -0
- package/dist/tools/impl/task-graph.d.ts +1 -0
- package/dist/tools/impl/task-output.d.ts +16 -0
- package/dist/tools/impl/task-stop.d.ts +11 -0
- package/dist/tools/impl/todo-write.d.ts +8 -0
- package/dist/tools/impl/tool-search.d.ts +4 -0
- package/dist/tools/impl/wait-for-mcp-servers.d.ts +29 -0
- package/dist/tools/impl/web-fetch.d.ts +36 -0
- package/dist/tools/impl/web-search.d.ts +30 -0
- package/dist/tools/impl/workflow.d.ts +5 -0
- package/dist/tools/impl/write.d.ts +8 -0
- package/dist/tools/paths-seam.d.ts +6 -0
- package/dist/tools/read-state.d.ts +12 -0
- package/dist/tools/registry.d.ts +423 -0
- package/dist/tools/task-graph-store.d.ts +61 -0
- package/dist/toolsearch/aliases.d.ts +26 -0
- package/dist/toolsearch/exposure.d.ts +30 -0
- package/dist/toolsearch/ranking.d.ts +6 -0
- package/dist/toolsearch/search.d.ts +45 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/web/fetchable-url.d.ts +28 -0
- package/dist/web/preapproved-hosts.d.ts +52 -0
- package/dist/web/private-address.d.ts +55 -0
- package/dist/web/session-runtime.d.ts +86 -0
- package/dist/workflows/bridge.d.ts +87 -0
- package/dist/workflows/budget.d.ts +24 -0
- package/dist/workflows/host-registry.d.ts +142 -0
- package/dist/workflows/journal.d.ts +29 -0
- package/dist/workflows/meta.d.ts +45 -0
- package/dist/workflows/registry.d.ts +24 -0
- package/dist/workflows/runtime.d.ts +254 -0
- package/dist/workflows/sandbox.d.ts +49 -0
- package/dist/workflows/script-api.d.ts +58 -0
- package/dist/workflows/seam.d.ts +92 -0
- package/dist/workflows/semaphore.d.ts +16 -0
- package/dist/workflows/store.d.ts +177 -0
- package/dist/workflows/subprocess-entry.d.ts +38 -0
- package/dist/workflows/subprocess-entry.js +14 -0
- package/dist/workflows/transcript.d.ts +56 -0
- package/dist/workflows/types.d.ts +84 -0
- package/dist/workflows/worker-harness.d.ts +45 -0
- package/package.json +76 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { type BrandProfile, type SettingSource } from "@yanlinglabs/winter-agent-sdk";
|
|
2
|
+
import { type DiscoveredSkill, type SkillScanError, type SkillTier } from "./loader.js";
|
|
3
|
+
import { type StrictPluginOnlyCustomization } from "../settings/loaders/strict-plugin-only.js";
|
|
4
|
+
/**
|
|
5
|
+
* WS-01 §2.4 / WS-11 §4: the PROJECT DOT-DIRECTORY (`brand.projectDirName`) is the canonical plugin
|
|
6
|
+
* name for itself. The official branch loads `<project>/<projectDir>` as a local plugin, so ITS
|
|
7
|
+
* skills are `<projectDir>:<skill>`; native discovery reads the same tree directly as the `project`
|
|
8
|
+
* tier.
|
|
9
|
+
*
|
|
10
|
+
* DISCLOSED JUDGMENT CALL (report): a project skill is therefore given TWO names -- its bare name
|
|
11
|
+
* (its primary identity, what the listing shows and what `/name` uses) and `<projectDir>:<name>` as
|
|
12
|
+
* an ALIAS. Both resolve through `get()`/`load()` and both are matched by a permission rule
|
|
13
|
+
* (permission-rules.ts), which is what WS-11 §4's "permission rules match identically across
|
|
14
|
+
* branches" requires operationally. The alternative readings each break something: bare-only makes
|
|
15
|
+
* a qualified rule written against the official branch inert here, and qualified-only makes
|
|
16
|
+
* `/review` and `Skill("review")` stop working for every project skill.
|
|
17
|
+
*
|
|
18
|
+
* P7a (D19): Winter's OWN value, derived rather than spelled. A session's is
|
|
19
|
+
* `SkillIndexOptions.brand.projectDirName`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PROJECT_PLUGIN_NAME: string;
|
|
22
|
+
export interface SkillMeta {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
source: SkillTier;
|
|
26
|
+
path: string;
|
|
27
|
+
author?: string;
|
|
28
|
+
plugin?: string;
|
|
29
|
+
/** Every OTHER name this skill answers to (see PROJECT_PLUGIN_NAME). Never includes `name`. */
|
|
30
|
+
aliases?: string[];
|
|
31
|
+
}
|
|
32
|
+
/** One plugin's contribution, pre-parsed by plugins/loader.ts -- this file never reads a plugin manifest. */
|
|
33
|
+
export interface PluginSkillContribution {
|
|
34
|
+
plugin: string;
|
|
35
|
+
skills: Array<{
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
path: string;
|
|
39
|
+
author?: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
export interface SkillIndexOptions {
|
|
43
|
+
cwd: string;
|
|
44
|
+
/**
|
|
45
|
+
* The RESOLVED winter root -- i.e. what `resolveWinterHome(env, brand)` /
|
|
46
|
+
* `resolveProductionWinterHome` return, which is `<PREFIX>HOME` when set and
|
|
47
|
+
* `<os home>/<brand.homeDirName>` otherwise.
|
|
48
|
+
*
|
|
49
|
+
* NAMED `winterHome`, NOT `home`, DELIBERATELY. Two conventions exist side by side in this
|
|
50
|
+
* codebase and they are not interchangeable: `ResolveSettingsDetailedOptions.winterHome` is the
|
|
51
|
+
* resolved root itself, while `LoadAgentDefinitionsOptions.home` is the OS home directory and
|
|
52
|
+
* appends the dot-dir internally. Only the first can honour `<PREFIX>HOME` -- an override may
|
|
53
|
+
* point anywhere and need not be named after the brand at all -- and WS-01 §2.5 makes
|
|
54
|
+
* `<PREFIX>HOME` the user tier's address. A field called `home` here would be handed
|
|
55
|
+
* `resolveProductionWinterHome(...)` by a caller reading the settings convention and
|
|
56
|
+
* `ctx.home`/`homedir()` by one reading the agents convention; one of the two silently finds an
|
|
57
|
+
* empty user tier. The name is the only thing that stops that.
|
|
58
|
+
*
|
|
59
|
+
* ALWAYS explicit -- this module never reads `process.env` (a shared-process `bun test` would race).
|
|
60
|
+
*/
|
|
61
|
+
winterHome: string;
|
|
62
|
+
/** P7a (D19): the session's brand -- the project dot-dir and its qualified-skill prefix. Omitted = `WINTER_BRAND`. */
|
|
63
|
+
brand?: Pick<BrandProfile, "projectDirName"> | undefined;
|
|
64
|
+
/** Omitted = all three tiers; `[]` = filesystem discovery disabled. */
|
|
65
|
+
settingSources?: SettingSource[] | undefined;
|
|
66
|
+
plugins?: readonly PluginSkillContribution[] | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The BUILTIN registry seam. Winter ships no bundled skills at P5 -- this is deliberately an empty
|
|
69
|
+
* default rather than a directory scan, so the tier EXISTS (listing, precedence, the
|
|
70
|
+
* `disableBundledSkills` gate) without inventing content. Disclosed in the report.
|
|
71
|
+
*/
|
|
72
|
+
builtinSkills?: readonly DiscoveredSkill[] | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* `Settings.disableBundledSkills` (`sdk.d.ts:5657`). Removes the builtin tier and nothing else.
|
|
75
|
+
*
|
|
76
|
+
* Like every other settings-derived option on this interface, it arrives from `Settings`' INDEX
|
|
77
|
+
* SIGNATURE as `unknown` and must be narrowed by the caller -- see
|
|
78
|
+
* `settings/loaders/strict-plugin-only.ts`'s header for the full list and why.
|
|
79
|
+
*/
|
|
80
|
+
disableBundledSkills?: boolean | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* `Settings.strictPluginOnlyCustomization` (`sdk.d.ts:5988`). When it covers `"skills"`, ONLY
|
|
83
|
+
* plugin-contributed skills load -- project, user, self and builtin are all excluded. Distinct
|
|
84
|
+
* from source gating: `settingSources` says which settings FILES load, this says which
|
|
85
|
+
* customization SOURCES may customize at all.
|
|
86
|
+
*/
|
|
87
|
+
strictPluginOnlyCustomization?: StrictPluginOnlyCustomization | undefined;
|
|
88
|
+
bodyBytes?: number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Fix round 4 (I-E, the router same-view test): a workflow, registered as a SYNTHETIC skill so
|
|
91
|
+
* `Skill("<name>")` and the slash-command surface both run it -- claude's own `m()` turns every
|
|
92
|
+
* discovered workflow into exactly this shape (dump-confirmed: `{type:"prompt", kind:"workflow",
|
|
93
|
+
* ...}`). Unlike every other entry `discover()` finds, a synthetic entry carries its own BODY
|
|
94
|
+
* directly (`load()` returns it as-is, never reading `path` from disk -- there is no SKILL.md a
|
|
95
|
+
* workflow script's own identity could point `load()` at). `path` is still required on the
|
|
96
|
+
* resulting `SkillMeta` (a synthetic, non-filesystem marker -- `workflows/store.ts`'s own
|
|
97
|
+
* `WorkflowListingEntry.path`, the REAL `.js` script path, doubles as it: informative for a
|
|
98
|
+
* listing/debug consumer, never read from by `load()` for a synthetic entry).
|
|
99
|
+
*/
|
|
100
|
+
syntheticSkills?: readonly {
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
body: string;
|
|
104
|
+
source: SkillTier;
|
|
105
|
+
path: string;
|
|
106
|
+
plugin?: string;
|
|
107
|
+
}[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The startup index. Immutable once built: a session's skill surface is resolved at start, never
|
|
111
|
+
* re-scanned mid-turn (the pinned branch reloads on an explicit control request, never on a watcher
|
|
112
|
+
* -- derived-shapes-p5 item (b); Winter's own "no watchers inside the SDK" rule agrees).
|
|
113
|
+
*/
|
|
114
|
+
export declare class SkillIndex {
|
|
115
|
+
private readonly entries;
|
|
116
|
+
private readonly byName;
|
|
117
|
+
private readonly bodyBytes;
|
|
118
|
+
private readonly scanErrors;
|
|
119
|
+
/** Fix round 4 (I-E): a synthetic entry's own body, keyed by its PRIMARY name -- `load()` checks this before ever touching disk. */
|
|
120
|
+
private readonly syntheticBodies;
|
|
121
|
+
private constructor();
|
|
122
|
+
static build(opts: SkillIndexOptions): SkillIndex;
|
|
123
|
+
/**
|
|
124
|
+
* Every SKILL.md that could NOT become an entry, with the reason (A-11).
|
|
125
|
+
*
|
|
126
|
+
* The listing is built from `list()`; this is the parallel channel that stops a broken or oversized
|
|
127
|
+
* skill from simply not existing. A host that surfaces `wiring.warnings` should include these --
|
|
128
|
+
* that wiring is another lane's file in this wave and is named in the report as NEEDS_CONTEXT.
|
|
129
|
+
*/
|
|
130
|
+
errors(): SkillScanError[];
|
|
131
|
+
/** Every skill, in precedence order, by PRIMARY name. Aliases are not separate entries. */
|
|
132
|
+
list(): SkillMeta[];
|
|
133
|
+
/** Primary names only, in precedence order -- the `system/init.skills` producer's input. */
|
|
134
|
+
names(): string[];
|
|
135
|
+
/** Resolve a name OR an alias to its metadata. */
|
|
136
|
+
get(name: string): SkillMeta | undefined;
|
|
137
|
+
/** Every name a skill answers to (primary first) -- what a permission rule is matched against. */
|
|
138
|
+
identities(name: string): string[];
|
|
139
|
+
/**
|
|
140
|
+
* Read a skill's body FROM DISK, byte-capped. `null` for an unknown name and for a skill whose
|
|
141
|
+
* file has since been deleted, moved or made unparseable -- an invocation must degrade to a typed
|
|
142
|
+
* tool error, never crash the turn.
|
|
143
|
+
*
|
|
144
|
+
* Fix round 4 (I-E): a SYNTHETIC entry (a workflow registered as a skill) returns its own
|
|
145
|
+
* pre-built body directly, keyed by the RESOLVED meta's primary name (so an alias lookup still
|
|
146
|
+
* finds it) -- never touching disk at all, since there is no SKILL.md a workflow script's identity
|
|
147
|
+
* could point this at.
|
|
148
|
+
*
|
|
149
|
+
* Fix round 7 (a same-day follow-up to round 6): `isSynthetic` lets a caller (`commands/
|
|
150
|
+
* resolver.ts`'s `resolve()`) tell a synthetic (workflow-backed) body apart from an ordinary,
|
|
151
|
+
* on-disk one -- round 6 put `$ARGUMENTS_JSON` into the SHARED `substituteArguments`, making it a
|
|
152
|
+
* recognised token in EVERY skill/command body; this is the seam that lets the fix scope the JSON
|
|
153
|
+
* substitution to synthetic bodies only, without the resolver having to re-derive "is this a
|
|
154
|
+
* workflow" from the name or path.
|
|
155
|
+
*/
|
|
156
|
+
load(name: string): {
|
|
157
|
+
name: string;
|
|
158
|
+
body: string;
|
|
159
|
+
source: SkillTier;
|
|
160
|
+
path: string;
|
|
161
|
+
isSynthetic: boolean;
|
|
162
|
+
} | null;
|
|
163
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SdkMessage } from "@yanlinglabs/winter-agent-sdk";
|
|
2
|
+
import { type ContinuationChain, type ProviderStateRecord } from "./provider-state.js";
|
|
3
|
+
/** The half of `SessionPersistence` this needs. Narrowed so a caller can hand it a two-method double. */
|
|
4
|
+
export interface ContinuationChainSource {
|
|
5
|
+
loadProviderState?(): Promise<ProviderStateRecord[]>;
|
|
6
|
+
loadProviderIdentity?(): Promise<{
|
|
7
|
+
providerId: string;
|
|
8
|
+
modelKey: string;
|
|
9
|
+
} | undefined>;
|
|
10
|
+
}
|
|
11
|
+
/** The shape this mutates. Deliberately structural rather than importing `ProviderMessage` from `engine.ts` -- that direction is the circular one `store/` must not take. */
|
|
12
|
+
export interface AttachableMessage {
|
|
13
|
+
role: "user" | "assistant" | "tool" | "system";
|
|
14
|
+
uuid?: string;
|
|
15
|
+
origin?: unknown;
|
|
16
|
+
nativeState?: unknown;
|
|
17
|
+
}
|
|
18
|
+
export interface AttachContinuationChainOptions {
|
|
19
|
+
messages: AttachableMessage[];
|
|
20
|
+
store: ContinuationChainSource;
|
|
21
|
+
sessionId: string;
|
|
22
|
+
/** Emits one Winter-only `system/continuity_warning`. Called at most once. */
|
|
23
|
+
warn: (message: SdkMessage) => void;
|
|
24
|
+
/** Injected so a fixture's warning uuid is deterministic. */
|
|
25
|
+
newUuid: () => string;
|
|
26
|
+
/**
|
|
27
|
+
* P6 fix wave (T10 r1 Minor): the persisted identity, ALREADY LOADED by the caller. The engine reads
|
|
28
|
+
* it once for the resume-time switch comparison; without this the zero-records branch below re-read
|
|
29
|
+
* it -- one extra summary I/O per resumed run. Absent -> `store.loadProviderIdentity` as before.
|
|
30
|
+
*/
|
|
31
|
+
identity?: () => Promise<{
|
|
32
|
+
providerId: string;
|
|
33
|
+
modelKey: string;
|
|
34
|
+
} | undefined>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Folds the sidecar chain back onto a resumed history, and REPORTS a gap.
|
|
38
|
+
*
|
|
39
|
+
* An assistant message with no `origin` record degrades to summary-level and the session says so.
|
|
40
|
+
* That is R6-7's own rule, and the reason it cannot be silent is that the degradation is observable
|
|
41
|
+
* to the model: it will not get its exact native replay, so a user who sees a worse continuation than
|
|
42
|
+
* they expected deserves to know why.
|
|
43
|
+
*/
|
|
44
|
+
export declare function attachContinuationChain(opts: AttachContinuationChainOptions): Promise<ContinuationChain>;
|