@yagni-app/code 1.0.5 → 1.0.7
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/README.md +89 -27
- package/dist/claudeCompat.d.ts +59 -0
- package/dist/claudeCompat.js +109 -2
- package/dist/claudePlugins.d.ts +45 -3
- package/dist/claudePlugins.js +129 -19
- package/dist/cli.js +28 -4
- package/dist/doctor.d.ts +42 -4
- package/dist/doctor.js +150 -15
- package/dist/extension/condensedTools.d.ts +12 -1
- package/dist/extension/condensedTools.js +17 -9
- package/dist/extension/index.d.ts +18 -5
- package/dist/extension/index.js +319 -72
- package/dist/extension/mcp/approval.d.ts +45 -0
- package/dist/extension/mcp/approval.js +164 -0
- package/dist/extension/mcp/auth.d.ts +124 -0
- package/dist/extension/mcp/auth.js +560 -0
- package/dist/extension/mcp/authStore.d.ts +61 -0
- package/dist/extension/mcp/authStore.js +105 -0
- package/dist/extension/mcp/callbackPage.d.ts +31 -0
- package/dist/extension/mcp/callbackPage.js +222 -0
- package/dist/extension/mcp/cliConfig.d.ts +12 -0
- package/dist/extension/mcp/cliConfig.js +12 -0
- package/dist/extension/mcp/config.d.ts +153 -0
- package/dist/extension/mcp/config.js +381 -0
- package/dist/extension/mcp/log.d.ts +28 -0
- package/dist/extension/mcp/log.js +82 -0
- package/dist/extension/mcp/manager.d.ts +100 -0
- package/dist/extension/mcp/manager.js +273 -0
- package/dist/extension/mcp/names.d.ts +25 -0
- package/dist/extension/mcp/names.js +40 -0
- package/dist/extension/mcp/panel.d.ts +33 -0
- package/dist/extension/mcp/panel.js +268 -0
- package/dist/extension/mcp/prompts.d.ts +23 -0
- package/dist/extension/mcp/prompts.js +93 -0
- package/dist/extension/mcp/startup.d.ts +55 -0
- package/dist/extension/mcp/startup.js +152 -0
- package/dist/extension/mcp/tools.d.ts +31 -0
- package/dist/extension/mcp/tools.js +117 -0
- package/dist/extension/mcp/transports.d.ts +17 -0
- package/dist/extension/mcp/transports.js +44 -0
- package/dist/extension/permission/gate.d.ts +104 -2
- package/dist/extension/permission/gate.js +387 -31
- package/dist/extension/permission/guardian.d.ts +24 -5
- package/dist/extension/permission/guardian.js +162 -24
- package/dist/extension/permissionRules/bashFileArgs.d.ts +39 -0
- package/dist/extension/permissionRules/bashFileArgs.js +236 -0
- package/dist/extension/permissionRules/engine.d.ts +50 -0
- package/dist/extension/permissionRules/engine.js +238 -0
- package/dist/extension/permissionRules/loadConfig.d.ts +53 -0
- package/dist/extension/permissionRules/loadConfig.js +90 -0
- package/dist/extension/permissionRules/parser.d.ts +38 -0
- package/dist/extension/permissionRules/parser.js +136 -0
- package/dist/extension/permissionRules/pathRules.d.ts +58 -0
- package/dist/extension/permissionRules/pathRules.js +120 -0
- package/dist/extension/permissionRules/shellRules.d.ts +52 -0
- package/dist/extension/permissionRules/shellRules.js +221 -0
- package/dist/extension/pipeline/invocation.d.ts +3 -6
- package/dist/extension/pipeline/invocation.js +3 -6
- package/dist/extension/pipeline/personas.js +5 -0
- package/dist/extension/pipeline/runner.d.ts +0 -1
- package/dist/extension/pipeline/runner.js +6 -14
- package/dist/extension/plugins/inventory.d.ts +88 -0
- package/dist/extension/plugins/inventory.js +144 -0
- package/dist/extension/plugins/panel.d.ts +45 -0
- package/dist/extension/plugins/panel.js +293 -0
- package/dist/extension/sandbox/bash.d.ts +99 -0
- package/dist/extension/sandbox/bash.js +190 -0
- package/dist/extension/sandbox/config.d.ts +114 -0
- package/dist/extension/sandbox/config.js +366 -0
- package/dist/extension/sandbox/manager.d.ts +98 -0
- package/dist/extension/sandbox/manager.js +216 -0
- package/dist/extension/sandbox/panel.d.ts +111 -0
- package/dist/extension/sandbox/panel.js +342 -0
- package/dist/extension/sandbox/session.d.ts +85 -0
- package/dist/extension/sandbox/session.js +775 -0
- package/dist/extension/telemetry/attrs.d.ts +96 -0
- package/dist/extension/telemetry/attrs.js +149 -0
- package/dist/extension/telemetry/config.d.ts +99 -0
- package/dist/extension/telemetry/config.js +193 -0
- package/dist/extension/telemetry/index.d.ts +7 -0
- package/dist/extension/telemetry/index.js +7 -0
- package/dist/extension/telemetry/probe.d.ts +29 -0
- package/dist/extension/telemetry/probe.js +122 -0
- package/dist/extension/telemetry/register.d.ts +40 -0
- package/dist/extension/telemetry/register.js +192 -0
- package/dist/extension/telemetry/sdk.d.ts +63 -0
- package/dist/extension/telemetry/sdk.js +207 -0
- package/dist/extension/telemetry/tracker.d.ts +131 -0
- package/dist/extension/telemetry/tracker.js +551 -0
- package/dist/extension/vendor/IGNORE-LICENSE-MIT +21 -0
- package/dist/extension/vendor/ignore.d.ts +86 -0
- package/dist/extension/vendor/ignore.js +788 -0
- package/dist/goHeadless.d.ts +1 -1
- package/dist/goHeadless.js +2 -2
- package/dist/launch.d.ts +4 -3
- package/dist/launch.js +7 -4
- package/dist/mcpCommand.d.ts +122 -0
- package/dist/mcpCommand.js +787 -0
- package/dist/otel.d.ts +69 -63
- package/dist/otel.js +154 -119
- package/dist/paths.d.ts +13 -0
- package/dist/paths.js +18 -0
- package/dist/pluginCommand.d.ts +43 -0
- package/dist/pluginCommand.js +499 -0
- package/dist/pluginStore.d.ts +170 -0
- package/dist/pluginStore.js +554 -0
- package/dist/upgrade.d.ts +11 -2
- package/dist/upgrade.js +48 -8
- package/package.json +20 -3
- package/dist/extension/mcpTools.d.ts +0 -57
- package/dist/extension/mcpTools.js +0 -132
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YAGNI Code's own plugin ledger — the state behind `yagni plugin …`.
|
|
3
|
+
*
|
|
4
|
+
* Layout under `~/.yagni-code/plugins/` (Claude Code's shape, our own files —
|
|
5
|
+
* we never write into `~/.claude`, whose ledger format is versioned and
|
|
6
|
+
* undocumented; we only read it, see claudePlugins.ts):
|
|
7
|
+
*
|
|
8
|
+
* known_marketplaces.json marketplace name → source + local checkout
|
|
9
|
+
* installed_plugins.json `name@marketplace` → installed entries
|
|
10
|
+
* marketplaces/<name>/ git checkout of a marketplace repo
|
|
11
|
+
* cache/<mp>/<plugin>/<ver>/ the installed copy of a plugin
|
|
12
|
+
*
|
|
13
|
+
* Marketplace sources: `owner/repo` (GitHub over HTTPS, the developer's own
|
|
14
|
+
* git credentials), any git URL (ssh or https), or a local directory (its
|
|
15
|
+
* catalog is read in place; installs still copy into the cache, so edits land
|
|
16
|
+
* on the next `plugin update`). Only marketplace entries with relative-path
|
|
17
|
+
* sources install;
|
|
18
|
+
* object sources (github/url/npm/archive) are network installs of a second
|
|
19
|
+
* repo and are reported as unsupported rather than fetched.
|
|
20
|
+
*
|
|
21
|
+
* All git calls go through an injectable runner so tests never touch the
|
|
22
|
+
* network. Writes are atomic (temp + rename).
|
|
23
|
+
*/
|
|
24
|
+
import { type Marketplace, type MarketplaceEntry } from "./claudePlugins.js";
|
|
25
|
+
export type MarketplaceSource = {
|
|
26
|
+
source: "github";
|
|
27
|
+
repo: string;
|
|
28
|
+
} | {
|
|
29
|
+
source: "git";
|
|
30
|
+
url: string;
|
|
31
|
+
} | {
|
|
32
|
+
source: "directory";
|
|
33
|
+
path: string;
|
|
34
|
+
};
|
|
35
|
+
export interface KnownMarketplace {
|
|
36
|
+
source: MarketplaceSource;
|
|
37
|
+
/** Marketplace root: the checkout (git) or the directory itself. */
|
|
38
|
+
installLocation: string;
|
|
39
|
+
addedAt: string;
|
|
40
|
+
}
|
|
41
|
+
export type PluginInstallScope = "user" | "project";
|
|
42
|
+
export interface InstalledPlugin {
|
|
43
|
+
scope: PluginInstallScope;
|
|
44
|
+
/** Absolute path of the installed copy (cache dir). */
|
|
45
|
+
installPath: string;
|
|
46
|
+
version: string;
|
|
47
|
+
/** Repo root the project-scope install applies to. */
|
|
48
|
+
projectPath?: string;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
installedAt: string;
|
|
51
|
+
}
|
|
52
|
+
export interface PluginLedger {
|
|
53
|
+
version: 1;
|
|
54
|
+
plugins: Record<string, InstalledPlugin[]>;
|
|
55
|
+
}
|
|
56
|
+
export interface GitResult {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
stdout: string;
|
|
59
|
+
stderr: string;
|
|
60
|
+
}
|
|
61
|
+
export type GitRunner = (args: string[], opts: {
|
|
62
|
+
cwd?: string;
|
|
63
|
+
}) => Promise<GitResult>;
|
|
64
|
+
export declare const defaultGit: GitRunner;
|
|
65
|
+
export declare class PluginStoreError extends Error {
|
|
66
|
+
}
|
|
67
|
+
export declare function pluginsHome(env?: NodeJS.ProcessEnv, userHome?: string): string;
|
|
68
|
+
export declare function readKnownMarketplaces(home: string): Record<string, KnownMarketplace>;
|
|
69
|
+
export declare function writeKnownMarketplaces(home: string, value: Record<string, KnownMarketplace>): void;
|
|
70
|
+
export declare function readLedger(home: string): PluginLedger;
|
|
71
|
+
export declare function writeLedger(home: string, ledger: PluginLedger): void;
|
|
72
|
+
/** Interpret the `marketplace add` argument. Null when it is none of the shapes. */
|
|
73
|
+
export declare function parseMarketplaceSource(input: string, cwd: string): MarketplaceSource | null;
|
|
74
|
+
export declare function cloneUrl(source: MarketplaceSource): string | null;
|
|
75
|
+
export declare function describeSource(source: MarketplaceSource): string;
|
|
76
|
+
export interface StoreDeps {
|
|
77
|
+
home: string;
|
|
78
|
+
git?: GitRunner;
|
|
79
|
+
now?: () => Date;
|
|
80
|
+
}
|
|
81
|
+
export declare function addMarketplace(source: MarketplaceSource, deps: StoreDeps): Promise<{
|
|
82
|
+
name: string;
|
|
83
|
+
marketplace: Marketplace;
|
|
84
|
+
installLocation: string;
|
|
85
|
+
}>;
|
|
86
|
+
export declare function knownMarketplaceOrThrow(name: string, deps: StoreDeps): KnownMarketplace;
|
|
87
|
+
/** Pull a git marketplace; a directory marketplace is always current. Returns whether anything changed. */
|
|
88
|
+
export declare function updateMarketplace(name: string, deps: StoreDeps): Promise<{
|
|
89
|
+
changed: boolean;
|
|
90
|
+
head: string | null;
|
|
91
|
+
}>;
|
|
92
|
+
export declare function removeMarketplace(name: string, deps: StoreDeps): {
|
|
93
|
+
removedPlugins: string[];
|
|
94
|
+
};
|
|
95
|
+
export declare function splitKey(key: string): {
|
|
96
|
+
plugin: string;
|
|
97
|
+
marketplace: string | null;
|
|
98
|
+
};
|
|
99
|
+
export interface ResolvedPlugin {
|
|
100
|
+
key: string;
|
|
101
|
+
plugin: string;
|
|
102
|
+
marketplace: string;
|
|
103
|
+
marketplaceRoot: string;
|
|
104
|
+
entry: MarketplaceEntry;
|
|
105
|
+
/** Plugin source dir inside the marketplace checkout. */
|
|
106
|
+
sourceRoot: string;
|
|
107
|
+
version: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Find `<plugin>[@marketplace]` across known marketplaces. Without an
|
|
111
|
+
* explicit marketplace the name must be unique across them.
|
|
112
|
+
*/
|
|
113
|
+
export declare function resolvePluginSpec(spec: string, deps: StoreDeps): Promise<ResolvedPlugin>;
|
|
114
|
+
export interface InstallOptions {
|
|
115
|
+
scope: PluginInstallScope;
|
|
116
|
+
/** Required for scope "project": the repo root the install applies to. */
|
|
117
|
+
projectPath?: string;
|
|
118
|
+
}
|
|
119
|
+
export declare function installPlugin(spec: string, opts: InstallOptions, deps: StoreDeps): Promise<{
|
|
120
|
+
resolved: ResolvedPlugin;
|
|
121
|
+
installPath: string;
|
|
122
|
+
replaced: InstalledPlugin | null;
|
|
123
|
+
}>;
|
|
124
|
+
/** The ledger key an uninstall/enable/disable spec refers to; must be unambiguous. */
|
|
125
|
+
export declare function resolveInstalledKey(spec: string, deps: StoreDeps): string;
|
|
126
|
+
export interface UninstallOptions {
|
|
127
|
+
scope?: PluginInstallScope;
|
|
128
|
+
projectPath?: string;
|
|
129
|
+
}
|
|
130
|
+
export declare function uninstallPlugin(spec: string, opts: UninstallOptions, deps: StoreDeps): {
|
|
131
|
+
key: string;
|
|
132
|
+
removed: InstalledPlugin[];
|
|
133
|
+
};
|
|
134
|
+
export declare function setPluginEnabled(spec: string, enabled: boolean, deps: StoreDeps): {
|
|
135
|
+
key: string;
|
|
136
|
+
count: number;
|
|
137
|
+
};
|
|
138
|
+
export interface UpdateReport {
|
|
139
|
+
key: string;
|
|
140
|
+
from: string;
|
|
141
|
+
to: string;
|
|
142
|
+
/** Files re-synced from the marketplace even when the version string is unchanged. */
|
|
143
|
+
refreshed: boolean;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Refresh marketplaces and re-sync installed plugins from them. Every
|
|
147
|
+
* installed plugin is re-copied (a content change with no version bump still
|
|
148
|
+
* lands), and version changes are reported.
|
|
149
|
+
*/
|
|
150
|
+
export declare function updatePlugins(spec: string | undefined, deps: StoreDeps): Promise<{
|
|
151
|
+
marketplaces: {
|
|
152
|
+
name: string;
|
|
153
|
+
changed: boolean;
|
|
154
|
+
}[];
|
|
155
|
+
plugins: UpdateReport[];
|
|
156
|
+
errors: string[];
|
|
157
|
+
}>;
|
|
158
|
+
/** Marketplace catalog entries with their install status (for `plugin list --available`). */
|
|
159
|
+
export declare function catalog(deps: StoreDeps): {
|
|
160
|
+
marketplace: string;
|
|
161
|
+
entries: {
|
|
162
|
+
name: string;
|
|
163
|
+
version: string | null;
|
|
164
|
+
description: string | null;
|
|
165
|
+
installable: boolean;
|
|
166
|
+
}[];
|
|
167
|
+
}[];
|
|
168
|
+
/** Remove empty cache parents left behind by uninstalls (best effort). */
|
|
169
|
+
export declare function pruneCache(home: string): void;
|
|
170
|
+
//# sourceMappingURL=pluginStore.d.ts.map
|