@intentic/extension-manifest 1.176.3
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/README.md +74 -0
- package/dist/bundle.d.ts +4 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +22 -0
- package/dist/bundle.js.map +1 -0
- package/dist/contribution-point.d.ts +7 -0
- package/dist/contribution-point.d.ts.map +1 -0
- package/dist/contribution-point.js +2 -0
- package/dist/contribution-point.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema.d.ts +4 -0
- package/dist/json-schema.d.ts.map +1 -0
- package/dist/json-schema.js +33 -0
- package/dist/json-schema.js.map +1 -0
- package/dist/manifest.d.ts +300 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +46 -0
- package/dist/manifest.js.map +1 -0
- package/dist/mark.d.ts +6 -0
- package/dist/mark.d.ts.map +1 -0
- package/dist/mark.js +12 -0
- package/dist/mark.js.map +1 -0
- package/dist/permissions.d.ts +2 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +21 -0
- package/dist/permissions.js.map +1 -0
- package/dist/points/agent.d.ts +13 -0
- package/dist/points/agent.d.ts.map +1 -0
- package/dist/points/agent.js +10 -0
- package/dist/points/agent.js.map +1 -0
- package/dist/points/automation-templates.d.ts +67 -0
- package/dist/points/automation-templates.d.ts.map +1 -0
- package/dist/points/automation-templates.js +47 -0
- package/dist/points/automation-templates.js.map +1 -0
- package/dist/points/bin.d.ts +7 -0
- package/dist/points/bin.d.ts.map +1 -0
- package/dist/points/bin.js +10 -0
- package/dist/points/bin.js.map +1 -0
- package/dist/points/capabilities.d.ts +352 -0
- package/dist/points/capabilities.d.ts.map +1 -0
- package/dist/points/capabilities.js +131 -0
- package/dist/points/capabilities.js.map +1 -0
- package/dist/points/commands.d.ts +21 -0
- package/dist/points/commands.d.ts.map +1 -0
- package/dist/points/commands.js +23 -0
- package/dist/points/commands.js.map +1 -0
- package/dist/points/documents.d.ts +15 -0
- package/dist/points/documents.d.ts.map +1 -0
- package/dist/points/documents.js +14 -0
- package/dist/points/documents.js.map +1 -0
- package/dist/points/environment.d.ts +13 -0
- package/dist/points/environment.d.ts.map +1 -0
- package/dist/points/environment.js +14 -0
- package/dist/points/environment.js.map +1 -0
- package/dist/points/files.d.ts +15 -0
- package/dist/points/files.d.ts.map +1 -0
- package/dist/points/files.js +20 -0
- package/dist/points/files.js.map +1 -0
- package/dist/points/index.d.ts +609 -0
- package/dist/points/index.d.ts.map +1 -0
- package/dist/points/index.js +44 -0
- package/dist/points/index.js.map +1 -0
- package/dist/points/listener.d.ts +51 -0
- package/dist/points/listener.d.ts.map +1 -0
- package/dist/points/listener.js +44 -0
- package/dist/points/listener.js.map +1 -0
- package/dist/points/processes.d.ts +23 -0
- package/dist/points/processes.d.ts.map +1 -0
- package/dist/points/processes.js +15 -0
- package/dist/points/processes.js.map +1 -0
- package/dist/points/settings.d.ts +37 -0
- package/dist/points/settings.d.ts.map +1 -0
- package/dist/points/settings.js +24 -0
- package/dist/points/settings.js.map +1 -0
- package/dist/points/viewers.d.ts +25 -0
- package/dist/points/viewers.d.ts.map +1 -0
- package/dist/points/viewers.js +17 -0
- package/dist/points/viewers.js.map +1 -0
- package/dist/points/views.d.ts +27 -0
- package/dist/points/views.d.ts.map +1 -0
- package/dist/points/views.js +18 -0
- package/dist/points/views.js.map +1 -0
- package/dist/powers-diff.d.ts +8 -0
- package/dist/powers-diff.d.ts.map +1 -0
- package/dist/powers-diff.js +77 -0
- package/dist/powers-diff.js.map +1 -0
- package/intentic-extension.schema.json +1341 -0
- package/package.json +49 -0
- package/src/bundle.ts +41 -0
- package/src/contribution-point.ts +26 -0
- package/src/index.ts +7 -0
- package/src/json-schema.ts +62 -0
- package/src/manifest.ts +104 -0
- package/src/mark.ts +34 -0
- package/src/permissions.ts +36 -0
- package/src/points/agent.ts +17 -0
- package/src/points/automation-templates.ts +84 -0
- package/src/points/bin.ts +15 -0
- package/src/points/capabilities.ts +271 -0
- package/src/points/commands.ts +44 -0
- package/src/points/documents.ts +31 -0
- package/src/points/environment.ts +24 -0
- package/src/points/files.ts +54 -0
- package/src/points/index.ts +73 -0
- package/src/points/listener.ts +81 -0
- package/src/points/processes.ts +20 -0
- package/src/points/settings.ts +31 -0
- package/src/points/viewers.ts +36 -0
- package/src/points/views.ts +33 -0
- package/src/powers-diff.ts +100 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Artur Kurowski
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @intentic/extension-manifest
|
|
2
|
+
|
|
3
|
+
What an extension **declares** — as opposed to what it programs against.
|
|
4
|
+
|
|
5
|
+
This package holds the `intentic-extension.json` schema and the rule that matches a daemon call against the
|
|
6
|
+
manifest's `permissions.sandbox` allowlist. Nothing else: no host API, no Vue, no runtime behaviour. It imports
|
|
7
|
+
zod and nothing more.
|
|
8
|
+
|
|
9
|
+
## Why it is its own package
|
|
10
|
+
|
|
11
|
+
It exists to break a cycle. The daemon's wire contract (`@intentic/sandbox-contract`) has to validate manifests,
|
|
12
|
+
because the daemon serves extension listings and gates installs — so it needs the schema. The host API
|
|
13
|
+
(`@intentic/extension-api`) has to name the daemon's typed client, because that is what an extension calls the
|
|
14
|
+
sandbox through — so it needs the contract. With the schema living in `extension-api`, those two requirements
|
|
15
|
+
formed a loop, and the loop is why `api.sandbox` could only ever offer `request(path)` and `json<T>(path)`: a
|
|
16
|
+
string-shaped door to a fully typed surface, with every extension re-writing the URL, the method and the
|
|
17
|
+
response shape by hand.
|
|
18
|
+
|
|
19
|
+
Splitting the declaration vocabulary out settles it in one direction:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
extension-manifest ← sandbox-contract ← extension-api
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Both of the other packages depend on this one; this one depends on neither. `extension-api` may now name
|
|
26
|
+
contract types, which is what lets `api.sandbox.rpc` be typed.
|
|
27
|
+
|
|
28
|
+
## One point, one file
|
|
29
|
+
|
|
30
|
+
What a manifest may declare is not one schema — it is thirteen independent ones, and they used to share a file
|
|
31
|
+
every feature had to edit to add anything, in two places at once. Each now lives alone under
|
|
32
|
+
[src/points/](src/points), as its key, its shape and **the sentence that explains it to the author**, and
|
|
33
|
+
`contributes` is assembled from the set. Adding a contribution point is a file plus a line.
|
|
34
|
+
|
|
35
|
+
Binding the description to the schema is the part that pays. It used to sit in a `//` comment — read by
|
|
36
|
+
maintainers, never by the one person it was written for — so a manifest was written by copying another
|
|
37
|
+
extension's and guessing. Worse, zod *strips* what it does not declare rather than refusing it, at every level:
|
|
38
|
+
a misspelt `viewers` was not an error, it was a viewer that never appeared, found at install, with the manifest
|
|
39
|
+
parsing perfectly. The descriptions now generate out to `intentic-extension.schema.json`, which an editor reads
|
|
40
|
+
to give completion, hover documentation and a red squiggle on a key nothing declares.
|
|
41
|
+
|
|
42
|
+
That schema is **strict where the runtime is lenient**, deliberately. Authoring is where an unknown key is a
|
|
43
|
+
typo worth shouting about; runtime is where one is a manifest written for a newer host, which an older daemon
|
|
44
|
+
must go on installing with the point it does not understand ignored — otherwise every addition to that list
|
|
45
|
+
would be a breaking change.
|
|
46
|
+
|
|
47
|
+
## Key files
|
|
48
|
+
|
|
49
|
+
- [src/points/](src/points) — one contribution point per file, and the index that collects them into
|
|
50
|
+
`CONTRIBUTION_POINTS` and assembles `contributes` from it.
|
|
51
|
+
- [src/contribution-point.ts](src/contribution-point.ts) — what a point *is*: name, description, schema. The
|
|
52
|
+
reasoning for why the description travels with the schema rather than sitting in a comment.
|
|
53
|
+
- [src/manifest.ts](src/manifest.ts) — the envelope: who the extension is, which host it needs, what code it
|
|
54
|
+
ships, how far it may reach. The manifest is the **approval + gating surface**: the install dialog shows
|
|
55
|
+
exactly the declared contribution points, and the host refuses any runtime registration the approved manifest
|
|
56
|
+
never declared.
|
|
57
|
+
- [src/json-schema.ts](src/json-schema.ts) — the authoring schema, emitted from those points.
|
|
58
|
+
- [src/permissions.ts](src/permissions.ts) — `sandboxRouteAllowed`, the `"<METHOD> <path-glob>"` matcher behind
|
|
59
|
+
`permissions.sandbox`. Kept beside the schema because it is the rule for one of the schema's own fields.
|
|
60
|
+
|
|
61
|
+
## Conventions & gotchas
|
|
62
|
+
|
|
63
|
+
- **Declaration only.** If something here needed to know how the host behaves, it would belong in
|
|
64
|
+
`extension-api` instead. The test is whether the daemon — which has no host and no browser — still needs it.
|
|
65
|
+
- The contribution-point list is read back by the host's surface guard, which compares it against
|
|
66
|
+
`extension-api`'s recorded surface and its README — so adding a contribution point here without bumping the
|
|
67
|
+
SDK version there fails that test rather than shipping a version number that lies about what it supports.
|
|
68
|
+
- **The generated schema is committed, in two copies** — the one shipped in this package and the one the site
|
|
69
|
+
serves at the `$schema` URL. Run `pnpm --filter @intentic/extension-manifest schema` after touching a point
|
|
70
|
+
and commit both; `manifest-schema.test.ts` regenerates and compares, the way `contract.lock.json` is guarded.
|
|
71
|
+
A generated document only guards anything if a diff shows it moving.
|
|
72
|
+
- Points are collected in an explicit list rather than by a module-load side effect. Two committed documents
|
|
73
|
+
are generated from them — that schema and the wire contract's lock — and a registry that filled itself as
|
|
74
|
+
modules happened to load would make both depend on import order.
|
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const HOST_PUBLISHED_SPECIFIERS: readonly ["vue", "@intentic/extension-api", "@intentic/extension-ui", "@tanstack/vue-query"];
|
|
2
|
+
export declare const bundleSpecifiers: (source: string) => string[];
|
|
3
|
+
export declare const bundleProblem: (source: string) => string | undefined;
|
|
4
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,yBAAyB,YAAI,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,qBAAqB,CAAU,CAAC;AAKtI,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAM,EAMvD,CAAC;AAIF,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAAM,GAAG,SAYvD,CAAC"}
|
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const HOST_PUBLISHED_SPECIFIERS = ["vue", "@intentic/extension-api", "@intentic/extension-ui", "@tanstack/vue-query"];
|
|
2
|
+
export const bundleSpecifiers = (source) => [
|
|
3
|
+
...new Set([
|
|
4
|
+
...[...source.matchAll(/(?:^|\n)\s*(?:import|export)[^;\n]*?from\s*["'`]([^"'`]+)["'`]/gu)].map((match) => match[1] ?? ""),
|
|
5
|
+
...[...source.matchAll(/\bimport\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/gu)].map((match) => match[1] ?? ""),
|
|
6
|
+
...[...source.matchAll(/(?:^|\n)\s*import\s*["'`]([^"'`]+)["'`]/gu)].map((match) => match[1] ?? ""),
|
|
7
|
+
]),
|
|
8
|
+
];
|
|
9
|
+
export const bundleProblem = (source) => {
|
|
10
|
+
const specifiers = bundleSpecifiers(source);
|
|
11
|
+
const relative = specifiers.filter((specifier) => specifier.startsWith(".") || specifier.startsWith("/"));
|
|
12
|
+
if (relative.length > 0) {
|
|
13
|
+
return `imports a second file (${relative.join(", ")}) — a bundle is imported from a blob URL, so nothing relative to it can resolve`;
|
|
14
|
+
}
|
|
15
|
+
const published = new Set(HOST_PUBLISHED_SPECIFIERS);
|
|
16
|
+
const unpublished = specifiers.filter((specifier) => !published.has(specifier));
|
|
17
|
+
if (unpublished.length > 0) {
|
|
18
|
+
return `imports ${unpublished.join(", ")}, which the host does not publish — bundle it in, or use one of: ${HOST_PUBLISHED_SPECIFIERS.join(", ")}`;
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,qBAAqB,CAAU,CAAC;AAKtI,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAY,EAAE,CAAC;IAC1D,GAAG,IAAI,GAAG,CAAC;QACP,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,kEAAkE,C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CAAC;IACvJ,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
export interface ContributionPoint<Name extends string = string, Schema extends z.ZodType = z.ZodType> {
|
|
3
|
+
readonly name: Name;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly schema: Schema;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=contribution-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution-point.d.ts","sourceRoot":"","sources":["../src/contribution-point.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAe7B,MAAM,WAAW,iBAAiB,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IAEjG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAIpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution-point.js","sourceRoot":"","sources":["../src/contribution-point.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./bundle.js";
|
|
2
|
+
export * from "./contribution-point.js";
|
|
3
|
+
export * from "./json-schema.js";
|
|
4
|
+
export * from "./manifest.js";
|
|
5
|
+
export * from "./permissions.js";
|
|
6
|
+
export * from "./points/index.js";
|
|
7
|
+
export * from "./powers-diff.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./bundle.js";
|
|
2
|
+
export * from "./contribution-point.js";
|
|
3
|
+
export * from "./json-schema.js";
|
|
4
|
+
export * from "./manifest.js";
|
|
5
|
+
export * from "./permissions.js";
|
|
6
|
+
export * from "./points/index.js";
|
|
7
|
+
export * from "./powers-diff.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const MANIFEST_SCHEMA_URL = "https://intentic.dev/intentic-extension.schema.json";
|
|
2
|
+
export declare const manifestJsonSchema: () => Record<string, unknown>;
|
|
3
|
+
export declare const serializeManifestJsonSchema: (schema: Record<string, unknown>) => string;
|
|
4
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,mBAAmB,wDAAwD,CAAC;AA2BzF,eAAO,MAAM,kBAAkB,QAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAS3D,CAAC;AAIF,eAAO,MAAM,2BAA2B,WAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAqD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ExtensionManifestSchema } from "./manifest.js";
|
|
3
|
+
export const MANIFEST_SCHEMA_URL = "https://intentic.dev/intentic-extension.schema.json";
|
|
4
|
+
const closeToUnknownKeys = (node) => {
|
|
5
|
+
if (Array.isArray(node)) {
|
|
6
|
+
for (const item of node) {
|
|
7
|
+
closeToUnknownKeys(item);
|
|
8
|
+
}
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (typeof node !== "object" || node === null) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const schema = node;
|
|
15
|
+
if (schema["type"] === "object" && schema["properties"] !== undefined && schema["additionalProperties"] === undefined) {
|
|
16
|
+
schema["additionalProperties"] = false;
|
|
17
|
+
}
|
|
18
|
+
for (const value of Object.values(schema)) {
|
|
19
|
+
closeToUnknownKeys(value);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const manifestJsonSchema = () => {
|
|
23
|
+
const schema = z.toJSONSchema(ExtensionManifestSchema, { unrepresentable: "any", io: "input" });
|
|
24
|
+
closeToUnknownKeys(schema);
|
|
25
|
+
return {
|
|
26
|
+
...schema,
|
|
27
|
+
$id: MANIFEST_SCHEMA_URL,
|
|
28
|
+
title: "intentic extension manifest",
|
|
29
|
+
description: "What an intentic extension declares: who it is, which host it needs, what code it ships, and what it contributes.",
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const serializeManifestJsonSchema = (schema) => `${JSON.stringify(schema, undefined, 4)}\n`;
|
|
33
|
+
//# sourceMappingURL=json-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../src/json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAoBxD,MA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AAM,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ExtensionManifestSchema: z.ZodObject<{
|
|
3
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
4
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
5
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
6
|
+
publisher: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
version: z.ZodString;
|
|
9
|
+
category: z.ZodOptional<z.ZodString>;
|
|
10
|
+
engines: z.ZodObject<{
|
|
11
|
+
intentic: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
14
|
+
server: z.ZodOptional<z.ZodString>;
|
|
15
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
sandbox: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
daemon: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
contributes: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
path: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
automationTemplates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
title: z.ZodString;
|
|
26
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
27
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
28
|
+
requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
trigger: z.ZodObject<{
|
|
30
|
+
kind: z.ZodEnum<{
|
|
31
|
+
event: "event";
|
|
32
|
+
listener: "listener";
|
|
33
|
+
schedule: "schedule";
|
|
34
|
+
workspace: "workspace";
|
|
35
|
+
}>;
|
|
36
|
+
cron: z.ZodOptional<z.ZodString>;
|
|
37
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
38
|
+
eventType: z.ZodOptional<z.ZodString>;
|
|
39
|
+
event: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
guard: z.ZodOptional<z.ZodString>;
|
|
42
|
+
holdForSeconds: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
prompt: z.ZodString;
|
|
44
|
+
note: z.ZodOptional<z.ZodString>;
|
|
45
|
+
setup: z.ZodOptional<z.ZodString>;
|
|
46
|
+
description: z.ZodOptional<z.ZodString>;
|
|
47
|
+
offer: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
configure: "configure";
|
|
49
|
+
create: "create";
|
|
50
|
+
}>>;
|
|
51
|
+
chore: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
53
|
+
bin: z.ZodOptional<z.ZodString>;
|
|
54
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
catalog: z.ZodObject<{
|
|
57
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
58
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
description: z.ZodString;
|
|
61
|
+
category: z.ZodString;
|
|
62
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
63
|
+
guide: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
url: z.ZodOptional<z.ZodString>;
|
|
65
|
+
urlFromField: z.ZodOptional<z.ZodString>;
|
|
66
|
+
path: z.ZodOptional<z.ZodString>;
|
|
67
|
+
linkLabel: z.ZodOptional<z.ZodString>;
|
|
68
|
+
scopes: z.ZodOptional<z.ZodString>;
|
|
69
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
kind: z.ZodLiteral<"cli">;
|
|
73
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
74
|
+
key: z.ZodString;
|
|
75
|
+
label: z.ZodString;
|
|
76
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
77
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
82
|
+
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
default: z.ZodOptional<z.ZodString>;
|
|
84
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
85
|
+
value: z.ZodString;
|
|
86
|
+
label: z.ZodString;
|
|
87
|
+
}, z.core.$strip>>>;
|
|
88
|
+
when: z.ZodOptional<z.ZodString>;
|
|
89
|
+
value: z.ZodOptional<z.ZodString>;
|
|
90
|
+
totp: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
93
|
+
skill: z.ZodString;
|
|
94
|
+
fragment: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
catalog: z.ZodObject<{
|
|
98
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
99
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
100
|
+
name: z.ZodString;
|
|
101
|
+
description: z.ZodString;
|
|
102
|
+
category: z.ZodString;
|
|
103
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
104
|
+
guide: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
url: z.ZodOptional<z.ZodString>;
|
|
106
|
+
urlFromField: z.ZodOptional<z.ZodString>;
|
|
107
|
+
path: z.ZodOptional<z.ZodString>;
|
|
108
|
+
linkLabel: z.ZodOptional<z.ZodString>;
|
|
109
|
+
scopes: z.ZodOptional<z.ZodString>;
|
|
110
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
114
|
+
key: z.ZodString;
|
|
115
|
+
label: z.ZodString;
|
|
116
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
117
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
122
|
+
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
default: z.ZodOptional<z.ZodString>;
|
|
124
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
125
|
+
value: z.ZodString;
|
|
126
|
+
label: z.ZodString;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
when: z.ZodOptional<z.ZodString>;
|
|
129
|
+
value: z.ZodOptional<z.ZodString>;
|
|
130
|
+
totp: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
kind: z.ZodLiteral<"browser">;
|
|
133
|
+
loginUrl: z.ZodOptional<z.ZodURL>;
|
|
134
|
+
homeUrl: z.ZodOptional<z.ZodURL>;
|
|
135
|
+
skill: z.ZodString;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
catalog: z.ZodObject<{
|
|
139
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
140
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
description: z.ZodString;
|
|
143
|
+
category: z.ZodString;
|
|
144
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
145
|
+
guide: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
url: z.ZodOptional<z.ZodString>;
|
|
147
|
+
urlFromField: z.ZodOptional<z.ZodString>;
|
|
148
|
+
path: z.ZodOptional<z.ZodString>;
|
|
149
|
+
linkLabel: z.ZodOptional<z.ZodString>;
|
|
150
|
+
scopes: z.ZodOptional<z.ZodString>;
|
|
151
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
155
|
+
key: z.ZodString;
|
|
156
|
+
label: z.ZodString;
|
|
157
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
158
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
163
|
+
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
default: z.ZodOptional<z.ZodString>;
|
|
165
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
+
value: z.ZodString;
|
|
167
|
+
label: z.ZodString;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
169
|
+
when: z.ZodOptional<z.ZodString>;
|
|
170
|
+
value: z.ZodOptional<z.ZodString>;
|
|
171
|
+
totp: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
kind: z.ZodLiteral<"host">;
|
|
174
|
+
skill: z.ZodString;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
id: z.ZodString;
|
|
177
|
+
catalog: z.ZodObject<{
|
|
178
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
179
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
description: z.ZodString;
|
|
182
|
+
category: z.ZodString;
|
|
183
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
184
|
+
guide: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
url: z.ZodOptional<z.ZodString>;
|
|
186
|
+
urlFromField: z.ZodOptional<z.ZodString>;
|
|
187
|
+
path: z.ZodOptional<z.ZodString>;
|
|
188
|
+
linkLabel: z.ZodOptional<z.ZodString>;
|
|
189
|
+
scopes: z.ZodOptional<z.ZodString>;
|
|
190
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
194
|
+
key: z.ZodString;
|
|
195
|
+
label: z.ZodString;
|
|
196
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
197
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
boolean: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
202
|
+
rebuild: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
default: z.ZodOptional<z.ZodString>;
|
|
204
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
205
|
+
value: z.ZodString;
|
|
206
|
+
label: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>>;
|
|
208
|
+
when: z.ZodOptional<z.ZodString>;
|
|
209
|
+
value: z.ZodOptional<z.ZodString>;
|
|
210
|
+
totp: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
kind: z.ZodLiteral<"agent">;
|
|
213
|
+
}, z.core.$strip>], "kind">>>;
|
|
214
|
+
commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
215
|
+
command: z.ZodString;
|
|
216
|
+
title: z.ZodString;
|
|
217
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
218
|
+
keybinding: z.ZodOptional<z.ZodString>;
|
|
219
|
+
when: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>>>;
|
|
221
|
+
documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
label: z.ZodString;
|
|
224
|
+
}, z.core.$strip>>>;
|
|
225
|
+
environment: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
fragment: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
+
path: z.ZodString;
|
|
230
|
+
invalidates: z.ZodArray<z.ZodString>;
|
|
231
|
+
}, z.core.$strip>>>;
|
|
232
|
+
listener: z.ZodOptional<z.ZodObject<{
|
|
233
|
+
provider: z.ZodString;
|
|
234
|
+
events: z.ZodArray<z.ZodObject<{
|
|
235
|
+
type: z.ZodString;
|
|
236
|
+
label: z.ZodString;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
automation: z.ZodObject<{
|
|
239
|
+
label: z.ZodString;
|
|
240
|
+
mentionLabel: z.ZodOptional<z.ZodString>;
|
|
241
|
+
channel: z.ZodObject<{
|
|
242
|
+
label: z.ZodString;
|
|
243
|
+
placeholder: z.ZodString;
|
|
244
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
branchField: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
label: z.ZodString;
|
|
248
|
+
placeholder: z.ZodString;
|
|
249
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
starterPrompt: z.ZodString;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
processes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
command: z.ZodString;
|
|
257
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
258
|
+
port: z.ZodOptional<z.ZodLiteral<"auto">>;
|
|
259
|
+
preview: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
autoStart: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
}, z.core.$strip>>>;
|
|
262
|
+
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
263
|
+
key: z.ZodString;
|
|
264
|
+
type: z.ZodEnum<{
|
|
265
|
+
boolean: "boolean";
|
|
266
|
+
enum: "enum";
|
|
267
|
+
number: "number";
|
|
268
|
+
string: "string";
|
|
269
|
+
}>;
|
|
270
|
+
title: z.ZodString;
|
|
271
|
+
description: z.ZodOptional<z.ZodString>;
|
|
272
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
273
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
env: z.ZodOptional<z.ZodString>;
|
|
276
|
+
}, z.core.$strip>>>;
|
|
277
|
+
viewers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
280
|
+
fetch: z.ZodEnum<{
|
|
281
|
+
blob: "blob";
|
|
282
|
+
text: "text";
|
|
283
|
+
url: "url";
|
|
284
|
+
}>;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
views: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
|
+
id: z.ZodString;
|
|
288
|
+
label: z.ZodString;
|
|
289
|
+
surface: z.ZodEnum<{
|
|
290
|
+
directory: "directory";
|
|
291
|
+
rail: "rail";
|
|
292
|
+
sandbox: "sandbox";
|
|
293
|
+
}>;
|
|
294
|
+
badge: z.ZodOptional<z.ZodBoolean>;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
}, z.core.$strip>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
export type ExtensionManifest = z.infer<typeof ExtensionManifestSchema>;
|
|
299
|
+
export declare const extensionIdOf: (manifest: Pick<ExtensionManifest, "publisher" | "name">) => string;
|
|
300
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqFlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAIxE,eAAO,MAAM,aAAa,aAAc,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,MAAM,CAAC,KAAG,MAAkD,CAAC"}
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { MARK_FIELDS } from "./mark.js";
|
|
3
|
+
import { contributesSchema } from "./points/index.js";
|
|
4
|
+
export const ExtensionManifestSchema = z.object({
|
|
5
|
+
$schema: z.string().optional().describe("The authoring schema, for editor completion and validation. Nothing at runtime reads it."),
|
|
6
|
+
publisher: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
7
|
+
name: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
8
|
+
version: z.string().min(1).describe("Your own semver — display and identity only. The installed code's identity is the pinned commit sha."),
|
|
9
|
+
category: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Which section of the Extensions tab this sits under — a grouping by what it is FOR, which cannot be derived from what it contributes. A section this app has never heard of lands in “Other” rather than failing to install."),
|
|
14
|
+
...MARK_FIELDS,
|
|
15
|
+
engines: z
|
|
16
|
+
.object({ intentic: z.string().min(1) })
|
|
17
|
+
.describe("A semver range over the host's extension API version, checked before your code is activated."),
|
|
18
|
+
entry: z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.refine((value) => !value.split("/").includes(".."), { message: "entry must stay inside the checkout" })
|
|
22
|
+
.optional()
|
|
23
|
+
.describe("Repo-relative path of your prebuilt single-file ESM bundle, built with `vue` and `@intentic/extension-api` as externals. Absent ⇒ an extension with no UI."),
|
|
24
|
+
server: z
|
|
25
|
+
.string()
|
|
26
|
+
.min(1)
|
|
27
|
+
.refine((value) => !value.split("/").includes(".."), { message: "server must stay inside the checkout" })
|
|
28
|
+
.optional()
|
|
29
|
+
.describe("Repo-relative path of your prebuilt single-file node ESM server bundle, exporting `activateServer`. Served under your own route namespace, which the daemon proxies. Nothing is provided at runtime but node builtins, so bundle everything else in. Absent ⇒ no backend."),
|
|
30
|
+
permissions: z
|
|
31
|
+
.object({
|
|
32
|
+
sandbox: z
|
|
33
|
+
.array(z.string())
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Daemon routes your UI half may call. Your own backend namespace needs no entry — its backend is your own code."),
|
|
36
|
+
daemon: z
|
|
37
|
+
.array(z.string())
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("Daemon routes your SERVER half may call. Separate from `sandbox` because the two halves run as different principals — the UI as the owner's session, the backend as a minted per-extension token — so a grant to one must never quietly widen the other."),
|
|
40
|
+
})
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('How far this extension may reach into the daemon, as "<METHOD> <path-glob>" entries where `*` matches one path segment — e.g. "GET /panels", "POST /panels/*/start". The install dialog shows these, the host refuses anything undeclared, and the usage ledger records which were actually earned.'),
|
|
43
|
+
contributes: contributesSchema.optional(),
|
|
44
|
+
});
|
|
45
|
+
export const extensionIdOf = (manifest) => `${manifest.publisher}.${manifest.name}`;
|
|
46
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAWtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAK5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0FAA0F,CAAC;IACnI,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAAC;IAE9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sGAAsG,CAAC;IAO3I,QAAQ,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CACL,8NAA8N,CACjO;IAML,GAAG,WAAW;IAEd,OAAO,EAAE,CAAC;SACL,MAAM,CAA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AE,CAAC"}
|
package/dist/mark.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../src/mark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,WAAW;IAGpB,IAAI;IAOJ,IAAI;CAMP,CAAC"}
|
package/dist/mark.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const MARK_FIELDS = {
|
|
3
|
+
logo: z
|
|
4
|
+
.string()
|
|
5
|
+
.optional()
|
|
6
|
+
.describe('A simple-icons slug, fetched from a CDN — right for standing in for somebody else\'s product. Add a "/<hex>" suffix to force a colour for a mark that vanishes against the surface it lands on. Unreachable in an offline sandbox, so it falls back to `icon`, then to initials.'),
|
|
7
|
+
icon: z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("A name from the host's own icon set, drawn when no simple-icons slug fits. It ships in the image, follows the theme and costs no request — what actually carries a first-party extension. An unknown name falls back to initials rather than to a hole."),
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=mark.js.map
|
package/dist/mark.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.js","sourceRoot":"","sources":["../src/mark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,MAAM,CAAC,MAAM,WAAW,GAAG;IAGvB,IAAI,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,kRAAkR,CACrR;IAEL,IAAI,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,yPAAyP,CAC5P;CACR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,mBAAmB,gBAAiB,SAAS,MAAM,EAAE,UAAU,MAAM,QAAQ,MAAM,KAAG,OAOlG,CAAC"}
|