@dawn-ai/permissions 0.1.8
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/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/pattern-matching.d.ts +12 -0
- package/dist/pattern-matching.d.ts.map +1 -0
- package/dist/pattern-matching.js +21 -0
- package/dist/permissions-store.d.ts +9 -0
- package/dist/permissions-store.d.ts.map +1 -0
- package/dist/permissions-store.js +125 -0
- package/dist/suggested-pattern.d.ts +11 -0
- package/dist/suggested-pattern.d.ts.map +1 -0
- package/dist/suggested-pattern.js +22 -0
- package/dist/types.d.ts +44 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Brian Love
|
|
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/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { matchPermission } from "./pattern-matching.js";
|
|
2
|
+
export { createPermissionsStore } from "./permissions-store.js";
|
|
3
|
+
export { suggestedCommandPattern, suggestedPathPattern } from "./suggested-pattern.js";
|
|
4
|
+
export type { CommandDetail, PathDetail, PermissionDecision, PermissionMode, PermissionRequest, PermissionsFile, PermissionsStore, } from "./types.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACtF,YAAY,EACV,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type PatternMap = Readonly<Record<string, readonly string[]>>;
|
|
2
|
+
/**
|
|
3
|
+
* Match a tool+candidate against allow + deny pattern maps.
|
|
4
|
+
*
|
|
5
|
+
* Semantics:
|
|
6
|
+
* - deny wins over allow
|
|
7
|
+
* - prefix matching: `candidate.startsWith(pattern)`
|
|
8
|
+
* - no entries for tool → "unknown"
|
|
9
|
+
*/
|
|
10
|
+
export declare function matchPermission(tool: string, candidate: string, allow: PatternMap, deny: PatternMap): "allow" | "deny" | "unknown";
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=pattern-matching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-matching.d.ts","sourceRoot":"","sources":["../src/pattern-matching.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;AAE7D;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,UAAU,GACf,OAAO,GAAG,MAAM,GAAG,SAAS,CAU9B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Match a tool+candidate against allow + deny pattern maps.
|
|
3
|
+
*
|
|
4
|
+
* Semantics:
|
|
5
|
+
* - deny wins over allow
|
|
6
|
+
* - prefix matching: `candidate.startsWith(pattern)`
|
|
7
|
+
* - no entries for tool → "unknown"
|
|
8
|
+
*/
|
|
9
|
+
export function matchPermission(tool, candidate, allow, deny) {
|
|
10
|
+
const denyList = deny[tool] ?? [];
|
|
11
|
+
for (const pattern of denyList) {
|
|
12
|
+
if (candidate.startsWith(pattern))
|
|
13
|
+
return "deny";
|
|
14
|
+
}
|
|
15
|
+
const allowList = allow[tool] ?? [];
|
|
16
|
+
for (const pattern of allowList) {
|
|
17
|
+
if (candidate.startsWith(pattern))
|
|
18
|
+
return "allow";
|
|
19
|
+
}
|
|
20
|
+
return "unknown";
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PermissionMode, PermissionsFile, PermissionsStore } from "./types.js";
|
|
2
|
+
interface CreateOptions {
|
|
3
|
+
readonly appRoot: string;
|
|
4
|
+
readonly config: PermissionsFile | undefined;
|
|
5
|
+
readonly mode: PermissionMode;
|
|
6
|
+
}
|
|
7
|
+
export declare function createPermissionsStore(opts: CreateOptions): PermissionsStore;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=permissions-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions-store.d.ts","sourceRoot":"","sources":["../src/permissions-store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAKnF,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAA;IAC5C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAC9B;AA6CD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,CAsF5E"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { matchPermission } from "./pattern-matching.js";
|
|
5
|
+
const PERMISSIONS_DIR = ".dawn";
|
|
6
|
+
const PERMISSIONS_FILE = "permissions.json";
|
|
7
|
+
function emptyState() {
|
|
8
|
+
return { configAllow: {}, configDeny: {}, runtimeAllow: {}, runtimeDeny: {} };
|
|
9
|
+
}
|
|
10
|
+
function cloneMap(src) {
|
|
11
|
+
const out = {};
|
|
12
|
+
for (const [k, v] of Object.entries(src))
|
|
13
|
+
out[k] = [...v];
|
|
14
|
+
return out;
|
|
15
|
+
}
|
|
16
|
+
function effectiveAllow(state, mode) {
|
|
17
|
+
if (mode === "bypass")
|
|
18
|
+
return {};
|
|
19
|
+
const out = {};
|
|
20
|
+
for (const [k, v] of Object.entries(state.configAllow))
|
|
21
|
+
out[k] = [...v];
|
|
22
|
+
if (mode === "interactive") {
|
|
23
|
+
for (const [k, v] of Object.entries(state.runtimeAllow)) {
|
|
24
|
+
out[k] = [...(out[k] ?? []), ...v];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
function effectiveDeny(state, mode) {
|
|
30
|
+
if (mode === "bypass")
|
|
31
|
+
return {};
|
|
32
|
+
const out = {};
|
|
33
|
+
for (const [k, v] of Object.entries(state.configDeny))
|
|
34
|
+
out[k] = [...v];
|
|
35
|
+
if (mode === "interactive") {
|
|
36
|
+
for (const [k, v] of Object.entries(state.runtimeDeny)) {
|
|
37
|
+
out[k] = [...(out[k] ?? []), ...v];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return out;
|
|
41
|
+
}
|
|
42
|
+
export function createPermissionsStore(opts) {
|
|
43
|
+
const { appRoot, config, mode } = opts;
|
|
44
|
+
const state = emptyState();
|
|
45
|
+
if (config) {
|
|
46
|
+
state.configAllow = cloneMap(config.allow);
|
|
47
|
+
state.configDeny = cloneMap(config.deny);
|
|
48
|
+
}
|
|
49
|
+
let writeQueue = Promise.resolve();
|
|
50
|
+
async function loadRuntimeFile() {
|
|
51
|
+
const filePath = join(appRoot, PERMISSIONS_DIR, PERMISSIONS_FILE);
|
|
52
|
+
if (!existsSync(filePath))
|
|
53
|
+
return;
|
|
54
|
+
let raw;
|
|
55
|
+
try {
|
|
56
|
+
raw = await readFile(filePath, "utf8");
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
throw new Error(`Failed to read permissions.json: ${err.message}`);
|
|
60
|
+
}
|
|
61
|
+
let parsed;
|
|
62
|
+
try {
|
|
63
|
+
parsed = JSON.parse(raw);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
throw new Error(`Malformed permissions.json: ${err.message}`);
|
|
67
|
+
}
|
|
68
|
+
const p = parsed;
|
|
69
|
+
if (p.allow && typeof p.allow === "object") {
|
|
70
|
+
state.runtimeAllow = cloneMap(p.allow);
|
|
71
|
+
}
|
|
72
|
+
if (p.deny && typeof p.deny === "object") {
|
|
73
|
+
state.runtimeDeny = cloneMap(p.deny);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async function persistRuntimeFile() {
|
|
77
|
+
const dir = join(appRoot, PERMISSIONS_DIR);
|
|
78
|
+
await mkdir(dir, { recursive: true });
|
|
79
|
+
const file = {
|
|
80
|
+
version: 1,
|
|
81
|
+
allow: state.runtimeAllow,
|
|
82
|
+
deny: state.runtimeDeny,
|
|
83
|
+
};
|
|
84
|
+
await writeFile(join(dir, PERMISSIONS_FILE), `${JSON.stringify(file, null, 2)}\n`, "utf8");
|
|
85
|
+
}
|
|
86
|
+
async function ensureGitignoreEntry() {
|
|
87
|
+
const gitignorePath = join(appRoot, ".gitignore");
|
|
88
|
+
let content = "";
|
|
89
|
+
if (existsSync(gitignorePath)) {
|
|
90
|
+
content = await readFile(gitignorePath, "utf8");
|
|
91
|
+
if (content.split("\n").some((line) => line.trim() === ".dawn/"))
|
|
92
|
+
return;
|
|
93
|
+
if (!content.endsWith("\n") && content.length > 0)
|
|
94
|
+
content += "\n";
|
|
95
|
+
content += ".dawn/\n";
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
content = ".dawn/\n";
|
|
99
|
+
}
|
|
100
|
+
await writeFile(gitignorePath, content, "utf8");
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
mode,
|
|
104
|
+
match(tool, candidate) {
|
|
105
|
+
return matchPermission(tool, candidate, effectiveAllow(state, mode), effectiveDeny(state, mode));
|
|
106
|
+
},
|
|
107
|
+
async load() {
|
|
108
|
+
if (mode === "interactive") {
|
|
109
|
+
await loadRuntimeFile();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
async addAllow(tool, pattern) {
|
|
113
|
+
const job = async () => {
|
|
114
|
+
const list = state.runtimeAllow[tool] ?? [];
|
|
115
|
+
if (!list.includes(pattern))
|
|
116
|
+
list.push(pattern);
|
|
117
|
+
state.runtimeAllow[tool] = list;
|
|
118
|
+
await persistRuntimeFile();
|
|
119
|
+
await ensureGitignoreEntry();
|
|
120
|
+
};
|
|
121
|
+
writeQueue = writeQueue.then(job, job);
|
|
122
|
+
await writeQueue;
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default suggested pattern for a shell command.
|
|
3
|
+
* Returns the first two whitespace-separated tokens.
|
|
4
|
+
*/
|
|
5
|
+
export declare function suggestedCommandPattern(command: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Default suggested pattern for a filesystem path.
|
|
8
|
+
* Returns the parent directory with trailing slash.
|
|
9
|
+
*/
|
|
10
|
+
export declare function suggestedPathPattern(path: string): string;
|
|
11
|
+
//# sourceMappingURL=suggested-pattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggested-pattern.d.ts","sourceRoot":"","sources":["../src/suggested-pattern.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIzD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { dirname } from "node:path";
|
|
2
|
+
/**
|
|
3
|
+
* Default suggested pattern for a shell command.
|
|
4
|
+
* Returns the first two whitespace-separated tokens.
|
|
5
|
+
*/
|
|
6
|
+
export function suggestedCommandPattern(command) {
|
|
7
|
+
const trimmed = command.trim();
|
|
8
|
+
if (trimmed.length === 0)
|
|
9
|
+
return "";
|
|
10
|
+
const tokens = trimmed.split(/\s+/);
|
|
11
|
+
return tokens.slice(0, 2).join(" ");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Default suggested pattern for a filesystem path.
|
|
15
|
+
* Returns the parent directory with trailing slash.
|
|
16
|
+
*/
|
|
17
|
+
export function suggestedPathPattern(path) {
|
|
18
|
+
if (path.endsWith("/"))
|
|
19
|
+
return path;
|
|
20
|
+
const parent = dirname(path);
|
|
21
|
+
return parent === "/" ? "/" : `${parent}/`;
|
|
22
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the Dawn HITL permissions system.
|
|
3
|
+
*
|
|
4
|
+
* The workspace capability calls into a `PermissionsStore` before
|
|
5
|
+
* invoking its filesystem/exec backends. The store consults the
|
|
6
|
+
* runtime file at .dawn/permissions.json plus the config-seeded
|
|
7
|
+
* allow/deny lists and returns one of three decisions: "allow",
|
|
8
|
+
* "deny", or "unknown". On "unknown" in interactive mode the
|
|
9
|
+
* capability emits LangGraph's `interrupt()` with a `PermissionRequest`
|
|
10
|
+
* payload; the resume mechanism returns a `PermissionDecision`.
|
|
11
|
+
*/
|
|
12
|
+
export type PermissionMode = "interactive" | "non-interactive" | "bypass";
|
|
13
|
+
export type PermissionDecision = "once" | "always" | "deny";
|
|
14
|
+
export interface PermissionsFile {
|
|
15
|
+
readonly version: 1;
|
|
16
|
+
readonly allow: Readonly<Record<string, readonly string[]>>;
|
|
17
|
+
readonly deny: Readonly<Record<string, readonly string[]>>;
|
|
18
|
+
}
|
|
19
|
+
export interface CommandDetail {
|
|
20
|
+
readonly command: string;
|
|
21
|
+
readonly suggestedPattern: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PathDetail {
|
|
24
|
+
readonly path: string;
|
|
25
|
+
readonly operation: "readFile" | "writeFile" | "listDir";
|
|
26
|
+
readonly suggestedPattern: string;
|
|
27
|
+
}
|
|
28
|
+
export interface PermissionRequest {
|
|
29
|
+
readonly interruptId: string;
|
|
30
|
+
readonly kind: "command" | "path";
|
|
31
|
+
readonly detail: CommandDetail | PathDetail;
|
|
32
|
+
readonly threadId: string;
|
|
33
|
+
readonly callId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface PermissionsStore {
|
|
36
|
+
/** Loaded once at construction; subsequent loads not exposed in v1. */
|
|
37
|
+
load(): Promise<void>;
|
|
38
|
+
match(tool: string, candidate: string): "allow" | "deny" | "unknown";
|
|
39
|
+
/** Persists an allow entry to disk and updates the in-memory cache. */
|
|
40
|
+
addAllow(tool: string, pattern: string): Promise<void>;
|
|
41
|
+
/** Active mode (resolved from config + env at construction). */
|
|
42
|
+
readonly mode: PermissionMode;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,iBAAiB,GAAG,QAAQ,CAAA;AAEzE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE3D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3D,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAA;CAC3D;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAAA;IACjC,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,CAAA;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;IACpE,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtD,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;CAC9B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the Dawn HITL permissions system.
|
|
3
|
+
*
|
|
4
|
+
* The workspace capability calls into a `PermissionsStore` before
|
|
5
|
+
* invoking its filesystem/exec backends. The store consults the
|
|
6
|
+
* runtime file at .dawn/permissions.json plus the config-seeded
|
|
7
|
+
* allow/deny lists and returns one of three decisions: "allow",
|
|
8
|
+
* "deny", or "unknown". On "unknown" in interactive mode the
|
|
9
|
+
* capability emits LangGraph's `interrupt()` with a `PermissionRequest`
|
|
10
|
+
* payload; the resume mechanism returns a `PermissionDecision`.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dawn-ai/permissions",
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/cacheplane/dawnai/tree/main/packages/permissions#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/cacheplane/dawnai.git",
|
|
11
|
+
"directory": "packages/permissions"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/cacheplane/dawnai/issues"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=22.12.0"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/node": "25.6.0",
|
|
34
|
+
"@dawn-ai/config-typescript": "0.2.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -b tsconfig.json",
|
|
38
|
+
"lint": "biome check --config-path ../config-biome/biome.json package.json src tsconfig.json vitest.config.ts",
|
|
39
|
+
"test": "vitest --run --config vitest.config.ts --passWithNoTests",
|
|
40
|
+
"typecheck": "tsc --noEmit"
|
|
41
|
+
}
|
|
42
|
+
}
|