@jini-ai/agent-plugins 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/LICENSE +201 -0
- package/README.md +261 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/lifecycle/activation.d.ts +177 -0
- package/dist/lifecycle/activation.js +874 -0
- package/dist/lifecycle/bundled-digests.d.ts +27 -0
- package/dist/lifecycle/bundled-digests.js +149 -0
- package/dist/lifecycle/bundled-source-archive.d.ts +13 -0
- package/dist/lifecycle/bundled-source-archive.js +96 -0
- package/dist/lifecycle/capability-projection.d.ts +11 -0
- package/dist/lifecycle/capability-projection.js +60 -0
- package/dist/lifecycle/fetch-archive.d.ts +88 -0
- package/dist/lifecycle/fetch-archive.js +215 -0
- package/dist/lifecycle/index.d.ts +174 -0
- package/dist/lifecycle/index.js +94 -0
- package/dist/lifecycle/install-from-url.d.ts +78 -0
- package/dist/lifecycle/install-from-url.js +73 -0
- package/dist/lifecycle/install.d.ts +52 -0
- package/dist/lifecycle/install.js +286 -0
- package/dist/lifecycle/layout.d.ts +20 -0
- package/dist/lifecycle/layout.js +30 -0
- package/dist/lifecycle/manifest.d.ts +214 -0
- package/dist/lifecycle/manifest.js +409 -0
- package/dist/lifecycle/mcp-provisioning.d.ts +20 -0
- package/dist/lifecycle/mcp-provisioning.js +14 -0
- package/dist/lifecycle/node.d.ts +11 -0
- package/dist/lifecycle/node.js +34 -0
- package/dist/lifecycle/package-paths.d.ts +12 -0
- package/dist/lifecycle/package-paths.js +74 -0
- package/dist/lifecycle/ports.d.ts +81 -0
- package/dist/lifecycle/ports.js +2 -0
- package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +18 -0
- package/dist/lifecycle/resolve-agent-plugin-refs.js +143 -0
- package/dist/lifecycle/retire-bundled.d.ts +36 -0
- package/dist/lifecycle/retire-bundled.js +69 -0
- package/dist/lifecycle/search.d.ts +23 -0
- package/dist/lifecycle/search.js +50 -0
- package/dist/lifecycle/seed-bundled.d.ts +29 -0
- package/dist/lifecycle/seed-bundled.js +118 -0
- package/dist/lifecycle/set-enabled.d.ts +21 -0
- package/dist/lifecycle/set-enabled.js +39 -0
- package/dist/lifecycle/trusted-plugin-files.d.ts +29 -0
- package/dist/lifecycle/trusted-plugin-files.js +82 -0
- package/dist/lifecycle/types.d.ts +20 -0
- package/dist/lifecycle/types.js +2 -0
- package/dist/lifecycle/uninstall.d.ts +41 -0
- package/dist/lifecycle/uninstall.js +148 -0
- package/dist/lifecycle/yauzl-archive-reader.d.ts +62 -0
- package/dist/lifecycle/yauzl-archive-reader.js +73 -0
- package/dist/manifest.d.ts +68 -0
- package/dist/manifest.js +38 -0
- package/package.json +92 -0
- package/ui-ux-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
- package/ui-ux-design/mcp.json +4 -0
- package/ui-ux-design/plugin.json +5 -0
- package/ui-ux-design/skills/frontend-accessibility/SKILL.md +60 -0
- package/ui-ux-design/skills/gstack-design/SKILL.md +53 -0
- package/ui-ux-design/skills/gstack-design/references/consultation.md +30 -0
- package/ui-ux-design/skills/gstack-design/references/html.md +29 -0
- package/ui-ux-design/skills/gstack-design/references/review.md +28 -0
- package/ui-ux-design/skills/gstack-design/references/shotgun.md +33 -0
- package/ui-ux-design/skills/gstack-design/references/upstream-notes.md +23 -0
- package/ui-ux-design/skills/interface-design/ORIGINAL.md +16 -0
- package/ui-ux-design/skills/interface-design/SKILL.md +41 -0
- package/ui-ux-design/skills/interface-design/references/commands/audit.md +40 -0
- package/ui-ux-design/skills/interface-design/references/commands/critique.md +21 -0
- package/ui-ux-design/skills/interface-design/references/commands/extract.md +34 -0
- package/ui-ux-design/skills/interface-design/references/commands/init.md +31 -0
- package/ui-ux-design/skills/interface-design/references/commands/status.md +22 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-precision.md +29 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-warmth.md +29 -0
- package/ui-ux-design/skills/interface-design/references/system-template.md +57 -0
- package/ui-ux-design/skills/shadcn-ui/README.md +244 -0
- package/ui-ux-design/skills/shadcn-ui/SKILL.md +326 -0
- package/ui-ux-design/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/ui-ux-design/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/ui-ux-design/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/ui-ux-design/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/ui-ux-design/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/ui-ux-design/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/ui-ux-design/skills/ui-ux-design/SKILL.md +77 -0
- package/ui-ux-design/skills/ui-ux-design/references/brand-and-voice.md +72 -0
- package/ui-ux-design/skills/ui-ux-design/references/components-and-states.md +107 -0
- package/ui-ux-design/skills/ui-ux-design/references/delight-and-motion.md +65 -0
- package/ui-ux-design/skills/ui-ux-design/references/foundations.md +144 -0
- package/ui-ux-design/skills/ui-ux-design/references/inclusive-ai-imagery.md +57 -0
- package/ui-ux-design/skills/ui-ux-design/references/kole-jain-uiux-concepts.md +102 -0
- package/ui-ux-design/skills/ui-ux-design/references/openai-frontend-skill.md +139 -0
- package/ui-ux-design/skills/ui-ux-design/references/premium-ui.md +63 -0
- package/ui-ux-design/skills/ui-ux-design/references/research-and-validation.md +78 -0
- package/ui-ux-design/skills/ui-ux-design/references/sam-crawford-premium-websites.md +93 -0
- package/ui-ux-design/skills/ui-ux-design/references/self-made-web-designer-core-skills.md +123 -0
- package/ui-ux-design/skills/ui-ux-design/references/visual-storytelling.md +57 -0
- package/ui-ux-design/skills/vercel-web-design-guidelines/SKILL.md +39 -0
- package/ui-ux-design/skills/web-compliance/SKILL.md +129 -0
- package/ui-ux-design/skills/web-compliance/references/audit-evidence.md +59 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { type FileLockHolder } from "@jini-ai/platform/fs/file-lock";
|
|
2
|
+
import type { AgentPluginLifecyclePorts } from "./ports.js";
|
|
3
|
+
/**
|
|
4
|
+
* Where a workspace's activation record lives, relative to its own agent-plugin root.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ACTIVATIONS_FILENAME = "activations.json";
|
|
7
|
+
/**
|
|
8
|
+
* The cross-process lock every writer below takes before touching {@link ACTIVATIONS_FILENAME} —
|
|
9
|
+
* see this file's header, "Concurrency", ACROSS processes.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ACTIVATIONS_LOCK_FILENAME = "activations.json.lock";
|
|
12
|
+
/**
|
|
13
|
+
* How a package came to be on disk. The whole reason the record is not just a boolean: it is what
|
|
14
|
+
* lets an operator (and a future admin screen) tell "the host shipped this, you have not enabled it"
|
|
15
|
+
* apart from "you installed this and then turned it off".
|
|
16
|
+
*/
|
|
17
|
+
export type AgentPluginOrigin = "bundled" | "operator-installed";
|
|
18
|
+
export interface AgentPluginActivationRecord {
|
|
19
|
+
readonly enabled: boolean;
|
|
20
|
+
readonly origin: AgentPluginOrigin;
|
|
21
|
+
readonly updatedAt: string;
|
|
22
|
+
readonly updatedBy: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Who last changed it — an operator identifier, or `"system:seed"` for the seeder's own initial
|
|
26
|
+
* disabled record. Audit breadcrumb; never used for authorization.
|
|
27
|
+
*/
|
|
28
|
+
export interface AgentPluginActivations {
|
|
29
|
+
readonly schemaVersion: 1;
|
|
30
|
+
readonly plugins: Readonly<Record<string, AgentPluginActivationRecord>>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A WRITER (or the strict provenance read) found the activations file present but unreadable, and
|
|
34
|
+
* refused rather than rewrite it — see this file's header, "Writers never rewrite what they could
|
|
35
|
+
* not read". `message` names the host path: keep it in a server-side log, never in a model- or
|
|
36
|
+
* user-facing payload.
|
|
37
|
+
*/
|
|
38
|
+
export declare class AgentPluginActivationsUnreadableError extends Error {
|
|
39
|
+
readonly filePath: string;
|
|
40
|
+
readonly reason: string;
|
|
41
|
+
constructor({ filePath, reason }: {
|
|
42
|
+
readonly filePath: string;
|
|
43
|
+
readonly reason: string;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A WRITER could not take (or lost) the cross-process write lock in time — see this file's header,
|
|
48
|
+
* "Concurrency", ACROSS processes, and `exclusive-file-lock.ts`. `lost: true` means the lock WAS
|
|
49
|
+
* acquired but was judged stale by another process before this writer's own rename; `lost: false`
|
|
50
|
+
* means the initial acquisition itself timed out. Either way NOTHING was written. `message` names
|
|
51
|
+
* the host lock path: keep it in a server-side log, never in a model- or user-facing payload.
|
|
52
|
+
*/
|
|
53
|
+
export declare class AgentPluginActivationsBusyError extends Error {
|
|
54
|
+
readonly lockPath: string;
|
|
55
|
+
readonly holder: FileLockHolder | undefined;
|
|
56
|
+
readonly lost: boolean;
|
|
57
|
+
constructor({ lockPath, holder, lost }: {
|
|
58
|
+
readonly lockPath: string;
|
|
59
|
+
readonly holder: FileLockHolder | undefined;
|
|
60
|
+
readonly lost: boolean;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* One plugin's activation state, or the explicit third answer the other two readers cannot give:
|
|
65
|
+
* the operator's decisions could not be established at all.
|
|
66
|
+
*/
|
|
67
|
+
export type AgentPluginActivationVerdict = {
|
|
68
|
+
readonly verdict: "active";
|
|
69
|
+
} | {
|
|
70
|
+
readonly verdict: "inactive";
|
|
71
|
+
} | {
|
|
72
|
+
readonly verdict: "undetermined";
|
|
73
|
+
readonly reason: string;
|
|
74
|
+
};
|
|
75
|
+
export interface SetAgentPluginActivationRequired {
|
|
76
|
+
readonly workspaceRoot: string;
|
|
77
|
+
readonly pluginId: string;
|
|
78
|
+
readonly enabled: boolean;
|
|
79
|
+
readonly actor: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Recorded as `updatedBy`. An operator identifier at a real call site.
|
|
83
|
+
*/
|
|
84
|
+
export interface SetAgentPluginActivationOptional {
|
|
85
|
+
readonly origin?: (AgentPluginOrigin) | undefined;
|
|
86
|
+
readonly now?: ((required: Record<string, never>) => Date) | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* What {@link enableBundledAgentPluginUnlessOperatorDisabled} found and did.
|
|
90
|
+
*/
|
|
91
|
+
export type BundledAgentPluginEnableOutcome = "enabled" | "already-enabled" | "left-disabled-by-operator";
|
|
92
|
+
export interface DeleteAgentPluginActivationRequired {
|
|
93
|
+
readonly workspaceRoot: string;
|
|
94
|
+
readonly pluginId: string;
|
|
95
|
+
}
|
|
96
|
+
type ActivationPorts = Pick<AgentPluginLifecyclePorts, "filesystem" | "clock" | "ids" | "process" | "onEvent">;
|
|
97
|
+
/** Internal composition; one state/queue instance per injected host context. */
|
|
98
|
+
export declare function createActivationModule(ports: ActivationPorts): {
|
|
99
|
+
isAgentPluginActive: (activations: AgentPluginActivations, pluginId: string) => boolean;
|
|
100
|
+
filterActiveAgentPlugins: <T>(activations: AgentPluginActivations, items: readonly T[], pluginIdOf: (item: T) => string) => readonly T[];
|
|
101
|
+
readAgentPluginActivations: (workspaceRoot: string) => Promise<AgentPluginActivations>;
|
|
102
|
+
assertAgentPluginActivationsWritable: (workspaceRoot: string) => Promise<void>;
|
|
103
|
+
isAgentPluginRecordedAsBundled: (workspaceRoot: string, pluginId: string) => Promise<boolean>;
|
|
104
|
+
resolveAgentPluginActivation: (workspaceRoot: string, pluginId: string) => Promise<AgentPluginActivationVerdict>;
|
|
105
|
+
normalizeActivations: (value: unknown) => AgentPluginActivations;
|
|
106
|
+
setAgentPluginActivation: (required: SetAgentPluginActivationRequired, optional?: SetAgentPluginActivationOptional) => Promise<AgentPluginActivations>;
|
|
107
|
+
recordBundledAgentPluginIfAbsent: (required: {
|
|
108
|
+
readonly workspaceRoot: string;
|
|
109
|
+
readonly pluginId: string;
|
|
110
|
+
}, optional?: {
|
|
111
|
+
readonly now?: ((required: Record<string, never>) => Date) | undefined;
|
|
112
|
+
readonly enabled?: boolean;
|
|
113
|
+
}) => Promise<{
|
|
114
|
+
readonly recorded: boolean;
|
|
115
|
+
}>;
|
|
116
|
+
enableBundledAgentPluginUnlessOperatorDisabled: (required: {
|
|
117
|
+
readonly workspaceRoot: string;
|
|
118
|
+
readonly pluginId: string;
|
|
119
|
+
readonly actor: string;
|
|
120
|
+
readonly now?: ((required: Record<string, never>) => Date) | undefined;
|
|
121
|
+
}) => Promise<BundledAgentPluginEnableOutcome>;
|
|
122
|
+
deleteAgentPluginActivation: (required: DeleteAgentPluginActivationRequired) => Promise<void>;
|
|
123
|
+
};
|
|
124
|
+
/** Bind activation effects once per host process. Required effects stay stable so every caller
|
|
125
|
+
* shares the same per-workspace write queue; discovery stays lenient, capability checks and writes
|
|
126
|
+
* refuse unreadable decisions. No network, package-layout or provisioning port is needed here.
|
|
127
|
+
* @complexity O(1) composition; reads/writes are O(p) in recorded plugins.
|
|
128
|
+
*/
|
|
129
|
+
export declare function createAgentPluginActivations(required: Omit<ActivationPorts, "onEvent">, optional?: Pick<ActivationPorts, "onEvent">): {
|
|
130
|
+
setAgentPluginActivation: (required: SetAgentPluginActivationRequired, optional?: SetAgentPluginActivationOptional) => Promise<AgentPluginActivations>;
|
|
131
|
+
recordBundledAgentPluginIfAbsent: (required: {
|
|
132
|
+
readonly workspaceRoot: string;
|
|
133
|
+
readonly pluginId: string;
|
|
134
|
+
}, optional?: {
|
|
135
|
+
readonly now?: ((required: Record<string, never>) => Date) | undefined;
|
|
136
|
+
readonly enabled?: boolean;
|
|
137
|
+
}) => Promise<{
|
|
138
|
+
readonly recorded: boolean;
|
|
139
|
+
}>;
|
|
140
|
+
enableBundledAgentPluginUnlessOperatorDisabled: (required: {
|
|
141
|
+
readonly workspaceRoot: string;
|
|
142
|
+
readonly pluginId: string;
|
|
143
|
+
readonly actor: string;
|
|
144
|
+
readonly now?: ((required: Record<string, never>) => Date) | undefined;
|
|
145
|
+
}) => Promise<BundledAgentPluginEnableOutcome>;
|
|
146
|
+
deleteAgentPluginActivation: (required: DeleteAgentPluginActivationRequired) => Promise<void>;
|
|
147
|
+
isAgentPluginActive: (input: {
|
|
148
|
+
readonly activations: AgentPluginActivations;
|
|
149
|
+
readonly pluginId: string;
|
|
150
|
+
}, _optional?: Record<string, never>) => boolean;
|
|
151
|
+
filterActiveAgentPlugins: <T>(input: {
|
|
152
|
+
readonly activations: AgentPluginActivations;
|
|
153
|
+
readonly items: readonly T[];
|
|
154
|
+
readonly pluginIdOf: (required: {
|
|
155
|
+
readonly item: T;
|
|
156
|
+
}) => string;
|
|
157
|
+
}, _optional?: Record<string, never>) => readonly T[];
|
|
158
|
+
readAgentPluginActivations: (input: {
|
|
159
|
+
readonly workspaceRoot: string;
|
|
160
|
+
}, _optional?: Record<string, never>) => Promise<AgentPluginActivations>;
|
|
161
|
+
assertAgentPluginActivationsWritable: (input: {
|
|
162
|
+
readonly workspaceRoot: string;
|
|
163
|
+
}, _optional?: Record<string, never>) => Promise<void>;
|
|
164
|
+
isAgentPluginRecordedAsBundled: (input: {
|
|
165
|
+
readonly workspaceRoot: string;
|
|
166
|
+
readonly pluginId: string;
|
|
167
|
+
}, _optional?: Record<string, never>) => Promise<boolean>;
|
|
168
|
+
resolveAgentPluginActivation: (input: {
|
|
169
|
+
readonly workspaceRoot: string;
|
|
170
|
+
readonly pluginId: string;
|
|
171
|
+
}, _optional?: Record<string, never>) => Promise<AgentPluginActivationVerdict>;
|
|
172
|
+
normalizeActivations: (input: {
|
|
173
|
+
readonly value: unknown;
|
|
174
|
+
}, _optional?: Record<string, never>) => AgentPluginActivations;
|
|
175
|
+
};
|
|
176
|
+
export {};
|
|
177
|
+
//# sourceMappingURL=activation.d.ts.map
|