@wirecat/drive-cli 0.35.0 → 0.36.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.
Files changed (69) hide show
  1. package/dist/api-methods.d.ts +11 -0
  2. package/dist/api-methods.d.ts.map +1 -0
  3. package/dist/api-methods.js +58 -0
  4. package/dist/api-methods.js.map +1 -0
  5. package/dist/commands/config.d.ts.map +1 -1
  6. package/dist/commands/config.js +35 -15
  7. package/dist/commands/config.js.map +1 -1
  8. package/dist/commands/doctor.d.ts +15 -2
  9. package/dist/commands/doctor.d.ts.map +1 -1
  10. package/dist/commands/doctor.js +17 -7
  11. package/dist/commands/doctor.js.map +1 -1
  12. package/dist/commands/remote.d.ts.map +1 -1
  13. package/dist/commands/remote.js +1 -1
  14. package/dist/commands/remote.js.map +1 -1
  15. package/dist/commands/session.d.ts.map +1 -1
  16. package/dist/commands/session.js +6 -5
  17. package/dist/commands/session.js.map +1 -1
  18. package/dist/commands/skill.d.ts.map +1 -1
  19. package/dist/commands/skill.js +4 -8
  20. package/dist/commands/skill.js.map +1 -1
  21. package/dist/commands/sync.js +1 -1
  22. package/dist/commands/sync.js.map +1 -1
  23. package/dist/config.d.ts +13 -8
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +41 -22
  26. package/dist/config.js.map +1 -1
  27. package/dist/contract-overrides.d.ts.map +1 -1
  28. package/dist/contract-overrides.js +0 -13
  29. package/dist/contract-overrides.js.map +1 -1
  30. package/dist/google-api.d.ts +1 -10
  31. package/dist/google-api.d.ts.map +1 -1
  32. package/dist/google-api.js +2 -55
  33. package/dist/google-api.js.map +1 -1
  34. package/dist/google.d.ts +1 -5
  35. package/dist/google.d.ts.map +1 -1
  36. package/dist/google.js +2 -19
  37. package/dist/google.js.map +1 -1
  38. package/dist/policy.d.ts +0 -6
  39. package/dist/policy.d.ts.map +1 -1
  40. package/dist/policy.js +12 -23
  41. package/dist/policy.js.map +1 -1
  42. package/dist/program.d.ts.map +1 -1
  43. package/dist/program.js +23 -13
  44. package/dist/program.js.map +1 -1
  45. package/dist/registry.d.ts.map +1 -1
  46. package/dist/registry.js +1 -0
  47. package/dist/registry.js.map +1 -1
  48. package/dist/scopes.d.ts +5 -0
  49. package/dist/scopes.d.ts.map +1 -0
  50. package/dist/scopes.js +5 -0
  51. package/dist/scopes.js.map +1 -0
  52. package/dist/supported.d.ts +9 -0
  53. package/dist/supported.d.ts.map +1 -0
  54. package/dist/supported.js +22 -0
  55. package/dist/supported.js.map +1 -0
  56. package/dist/sync.d.ts.map +1 -1
  57. package/dist/sync.js +1 -1
  58. package/dist/sync.js.map +1 -1
  59. package/dist/tokens.d.ts +1 -5
  60. package/dist/tokens.d.ts.map +1 -1
  61. package/dist/tokens.js +2 -4
  62. package/dist/tokens.js.map +1 -1
  63. package/dist/version.d.ts +1 -1
  64. package/dist/version.js +1 -1
  65. package/package.json +3 -3
  66. package/dist/config-issues.d.ts +0 -53
  67. package/dist/config-issues.d.ts.map +0 -1
  68. package/dist/config-issues.js +0 -172
  69. package/dist/config-issues.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/drive-cli",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Google Drive and Docs sync, Markdown snapshots and local search",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -64,8 +64,8 @@
64
64
  "@googleapis/driveactivity": "11.0.1",
65
65
  "@googleapis/sheets": "18.1.1",
66
66
  "@modelcontextprotocol/server": "2.3.0",
67
- "@wirecat/cli-base": "0.53.0",
68
- "@wirecat/cli-core": "0.426.0",
67
+ "@wirecat/cli-base": "0.57.0",
68
+ "@wirecat/cli-core": "0.428.0",
69
69
  "commander": "15.0.0",
70
70
  "google-auth-library": "11.2.0",
71
71
  "mammoth": "1.13.0",
@@ -1,53 +0,0 @@
1
- import * as v from "valibot";
2
- export type ConfigIssueKind = "invalid_json" | "unknown_setting" | "unknown_permission" | "missing_setting" | "invalid_value";
3
- /** One problem in a config file, as `doctor` reports it. `what` never quotes a value: a secret may be pasted anywhere. */
4
- export interface ConfigIssue {
5
- kind: ConfigIssueKind;
6
- file: string;
7
- profile?: string;
8
- key?: string;
9
- line?: number;
10
- column?: number;
11
- what: string;
12
- fix?: string;
13
- }
14
- /** An issue with the path in the file that `config unset` removes, which the loader drops too. */
15
- export interface LocatedIssue extends ConfigIssue {
16
- at: string[];
17
- }
18
- /** An issue at `at`, cut to the setting `config unset` removes, with that command as its fix. */
19
- export declare const locate: (kind: ConfigIssueKind, at: readonly string[], context: {
20
- file: string;
21
- tool: string;
22
- }, what: (key: string) => string) => LocatedIssue;
23
- /** The file's JSON, or the one issue that says where it stopped parsing. */
24
- export declare const parseConfigText: (text: string, file: string) => {
25
- raw: unknown;
26
- } | {
27
- issue: LocatedIssue;
28
- };
29
- /** Every problem the schema finds, never only the first, each cut to the setting that holds it. */
30
- export declare const schemaIssues: (raw: unknown, schema: v.GenericSchema, context: {
31
- file: string;
32
- tool: string;
33
- }) => LocatedIssue[];
34
- /** Every saved permission key, in every section and profile of the file — not only the ones that win. */
35
- export declare const savedPermissionKeys: (raw: unknown) => {
36
- key: string;
37
- at: string[];
38
- }[];
39
- /** A saved key no command checks would do nothing: one issue per key, wherever it is saved. */
40
- export declare const permissionIssues: (saved: readonly {
41
- key: string;
42
- at: readonly string[];
43
- }[], known: ReadonlySet<string>, context: {
44
- file: string;
45
- tool: string;
46
- }) => LocatedIssue[];
47
- /** The file without the settings the issues name: what still loads, and what `config unset` would leave. */
48
- export declare const withoutIssues: (raw: unknown, issues: readonly LocatedIssue[]) => unknown;
49
- /** The public shape: where in the file is the loader's own business. */
50
- export declare const publicIssue: ({ at: _, ...issue }: LocatedIssue) => ConfigIssue;
51
- /** One line for a command that refuses to run on the file: the first problem, how to fix it, and how many more. */
52
- export declare const issueMessage: (issues: readonly ConfigIssue[]) => string;
53
- //# sourceMappingURL=config-issues.d.ts.map
@@ -1 +0,0 @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E,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,EAAE,CAAA;CAAE,EAK7E,CAAA;AAEH,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,UACpB,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAAE,SACjD,WAAW,CAAC,MAAM,CAAC,WACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KACtC,YAAY,EAGoF,CAAA;AAEnG,4GAA4G;AAC5G,eAAO,MAAM,aAAa,QAAS,OAAO,UAAU,SAAS,YAAY,EAAE,KAAG,OAQ7E,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,WAAW,wBAAyB,YAAY,KAAG,WAAoB,CAAA;AAEpF,mHAAmH;AACnH,eAAO,MAAM,YAAY,WAAY,SAAS,WAAW,EAAE,KAAG,MAS7D,CAAA"}
@@ -1,172 +0,0 @@
1
- import * as v from "valibot";
2
- const isNode = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3
- const SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
4
- /** Where a path of the file sits: the profile and the flags `config unset` needs, and the setting under it. */
5
- const scopeOf = (at) => {
6
- const [first, second] = at;
7
- if (first === "profiles" && second !== undefined && at.length > 2)
8
- return { profile: second, flags: "", rest: at.slice(2) };
9
- if (first === "defaults" && at.length > 1)
10
- return { flags: " --defaults", rest: at.slice(1) };
11
- return { flags: "", rest: [...at] };
12
- };
13
- /** The part of a scope's path `config unset` takes as one setting: a permission key, a model field, or the setting. */
14
- const settingPath = (rest) => {
15
- if (rest[0] === "permissions" && rest.length > 1)
16
- return rest.slice(0, 2);
17
- if (rest[0] === "models" && rest.length > 1)
18
- return rest.slice(0, 3);
19
- return rest.slice(0, 1);
20
- };
21
- const settingOf = (path) => path[0] === "permissions" && path.length > 1 ? `permissions.${path[1]}` : path.join(".");
22
- /** An issue at `at`, cut to the setting `config unset` removes, with that command as its fix. */
23
- export const locate = (kind, at, context, what) => {
24
- const { profile, flags, rest } = scopeOf(at);
25
- const inScope = rest.length < at.length;
26
- // Outside a section the path itself is the key: `profiles.work` with the wrong type is removed alone.
27
- const setting = inScope ? settingPath(rest) : [...rest];
28
- const key = inScope ? settingOf(setting) : setting.join(".");
29
- const prefix = at.slice(0, at.length - rest.length);
30
- return {
31
- kind,
32
- file: context.file,
33
- ...(profile === undefined ? {} : { profile }),
34
- key,
35
- what: what(key),
36
- // A fix runs exactly as written; a name a shell would split or expand gets none.
37
- ...([key, profile ?? ""].every((word) => SHELL_SAFE.test(word))
38
- ? { fix: `${context.tool}${profile === undefined ? "" : ` ${profile}`} config unset${flags} ${key}` }
39
- : {}),
40
- at: [...prefix, ...setting],
41
- };
42
- };
43
- /** Node prints `(line 3 column 5)`, older runtimes only `position 41`, and Bun neither. */
44
- const placeOf = (message, text) => {
45
- const said = /line (\d+) column (\d+)/.exec(message);
46
- if (said)
47
- return { line: Number(said[1]), column: Number(said[2]) };
48
- const position = /position (\d+)/.exec(message);
49
- if (!position)
50
- return {};
51
- const before = text.slice(0, Number(position[1])).split("\n");
52
- return { line: before.length, column: (before.at(-1)?.length ?? 0) + 1 };
53
- };
54
- /** The file's JSON, or the one issue that says where it stopped parsing. */
55
- export const parseConfigText = (text, file) => {
56
- try {
57
- return { raw: JSON.parse(text) };
58
- }
59
- catch (error) {
60
- const place = placeOf(error instanceof Error ? error.message : "", text);
61
- const where = place.line === undefined ? "" : ` at line ${place.line}, column ${place.column}`;
62
- return { issue: { kind: "invalid_json", file, ...place, what: `the file is not valid JSON${where}`, at: [] } };
63
- }
64
- };
65
- const keyOfPath = (issue) => (issue.path ?? []).map((item) => String(item.key));
66
- /** A key the schema does not know: valibot says it expected nothing there. */
67
- const isUnknownKey = (issue) => issue.expected === "never";
68
- /** A `permissions` key refused by its pattern, rather than its level. */
69
- const isPermissionKey = (issue, at) => {
70
- const last = issue.path?.at(-1);
71
- return at.at(-2) === "permissions" && last !== undefined && "origin" in last && last.origin === "key";
72
- };
73
- const isMissing = (issue) => {
74
- const last = issue.path?.at(-1);
75
- return last !== undefined && "origin" in last && last.origin === "key" && issue.input === undefined;
76
- };
77
- /**
78
- * What a value has to be, never what it was: the schema's own "has to be …" without its ", not <value>", else
79
- * the type or choices valibot expected.
80
- */
81
- const ruleOf = (issue) => {
82
- const own = /^(has to be [\s\S]*?)(, not [\s\S]*)?$/.exec(issue.message);
83
- if (own?.[1])
84
- return own[1];
85
- if (issue.type === "picklist")
86
- return `has to be one of ${issue.expected}`;
87
- // valibot's own messages start "Invalid" and quote the value; a schema's own words do not.
88
- if (!issue.message.startsWith("Invalid "))
89
- return `is refused: ${issue.message}`;
90
- if (issue.kind === "schema")
91
- return `has to be of type ${issue.expected}`;
92
- return issue.expected === null ? "has a value it does not take" : `has to be ${issue.expected}`;
93
- };
94
- /** One pass of the schema: valibot names only the first unknown key of each object. */
95
- const onePass = (raw, schema, context) => {
96
- const result = v.safeParse(schema, raw);
97
- if (result.success)
98
- return [];
99
- return result.issues.map((issue) => {
100
- const at = keyOfPath(issue);
101
- const located = isPermissionKey(issue, at)
102
- ? locate("unknown_permission", at, context, (key) => `${key} names no command`)
103
- : isUnknownKey(issue)
104
- ? locate("unknown_setting", at, context, (key) => `setting ${key} is not a setting of ${context.tool}`)
105
- : isMissing(issue)
106
- ? locate("missing_setting", at, context, (key) => `setting ${key} is missing`)
107
- : locate("invalid_value", at, context, (key) => at.length === 0 ? "the file has to be an object, in braces" : `setting ${key} ${ruleOf(issue)}`);
108
- if (located.kind === "missing_setting" || at.length === 0)
109
- delete located.fix;
110
- return located;
111
- });
112
- };
113
- /** Every problem the schema finds, never only the first, each cut to the setting that holds it. */
114
- export const schemaIssues = (raw, schema, context) => {
115
- const found = new Map();
116
- for (;;) {
117
- const fresh = onePass(withoutIssues(raw, [...found.values()]), schema, context).filter((issue) => !found.has(issue.at.join("\u0000")));
118
- if (fresh.length === 0)
119
- return [...found.values()];
120
- for (const issue of fresh)
121
- found.set(issue.at.join("\u0000"), issue);
122
- // A missing setting cannot be removed, so another pass would find it again.
123
- if (fresh.every((issue) => issue.kind === "missing_setting" || issue.at.length === 0))
124
- return [...found.values()];
125
- }
126
- };
127
- /** Every section of the file that may hold `permissions`, with its path. */
128
- const scopes = (raw) => {
129
- if (!isNode(raw))
130
- return [];
131
- const out = [];
132
- if (isNode(raw.defaults))
133
- out.push([["defaults"], raw.defaults]);
134
- if (isNode(raw.profiles))
135
- for (const [name, scope] of Object.entries(raw.profiles))
136
- if (isNode(scope))
137
- out.push([["profiles", name], scope]);
138
- return out;
139
- };
140
- /** Every saved permission key, in every section and profile of the file — not only the ones that win. */
141
- export const savedPermissionKeys = (raw) => scopes(raw).flatMap(([path, scope]) => isNode(scope.permissions)
142
- ? Object.keys(scope.permissions).map((key) => ({ key, at: [...path, "permissions", key] }))
143
- : []);
144
- /** A saved key no command checks would do nothing: one issue per key, wherever it is saved. */
145
- export const permissionIssues = (saved, known, context) => saved
146
- .filter(({ key }) => !known.has(key))
147
- .map(({ at }) => locate("unknown_permission", at, context, (key) => `${key} names no command`));
148
- /** The file without the settings the issues name: what still loads, and what `config unset` would leave. */
149
- export const withoutIssues = (raw, issues) => {
150
- if (issues.some((issue) => issue.at.length === 0))
151
- return {};
152
- const copy = structuredClone(raw);
153
- for (const { at } of issues) {
154
- const parent = at.slice(0, -1).reduce((node, key) => (isNode(node) ? node[key] : undefined), copy);
155
- if (isNode(parent))
156
- delete parent[at.at(-1)];
157
- }
158
- return copy;
159
- };
160
- /** The public shape: where in the file is the loader's own business. */
161
- export const publicIssue = ({ at: _, ...issue }) => issue;
162
- /** One line for a command that refuses to run on the file: the first problem, how to fix it, and how many more. */
163
- export const issueMessage = (issues) => {
164
- const [first] = issues;
165
- if (!first)
166
- return "";
167
- const more = issues.length - 1;
168
- return (`${first.file}: ${first.what}` +
169
- (first.fix ? ` — remove it with \`${first.fix}\`` : "") +
170
- (more === 0 ? "" : ` (and ${more} more problem${more === 1 ? "" : "s"} — \`doctor\` lists them all)`));
171
- };
172
- //# sourceMappingURL=config-issues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-issues.js","sourceRoot":"","sources":["../src/config-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA8B5B,MAAM,MAAM,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEtH,MAAM,UAAU,GAAG,qBAAqB,CAAA;AAExC,+GAA+G;AAC/G,MAAM,OAAO,GAAG,CAAC,EAAqB,EAAE,EAAE;IACxC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,CAAA;IAC1B,IAAI,KAAK,KAAK,UAAU,IAAI,MAAM,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1D,IAAI,KAAK,KAAK,UAAU,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7F,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,uHAAuH;AACvH,MAAM,WAAW,GAAG,CAAC,IAAuB,EAAY,EAAE;IACxD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CA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