@wirecat/cli-core 0.403.0 → 0.404.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 +6 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/setup-answers.d.ts +2 -0
- package/dist/cli/setup-answers.js +4 -1
- package/dist/sends/index.d.ts +1 -1
- package/dist/sends/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ shape of this file.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 0.404.0 — 24.10.2026
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`setupPermissionCeiling(env)` and `CEILING_KEY`** let a tool that keeps its own permission levels (zm, drive, memo) honour the shared first-run "read only" answer: add the ceiling to its levels under `CEILING_KEY`, and `levelFor` caps every key.
|
|
15
|
+
|
|
10
16
|
## 0.403.0 — 24.10.2026
|
|
11
17
|
|
|
12
18
|
### Added
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export { createProgram, type ProgramDefinition, type ProgramOptions, type RunOpt
|
|
|
129
129
|
export { fieldsOf, projectFields } from "./result-fields.js";
|
|
130
130
|
export { runsCommand } from "./runs/command.js";
|
|
131
131
|
export { type Config, type Configuration, count, first, flag, fromFile, type GlobalFlags, NONE_NAMED, type ProfileKind, plain, type ResolveOptions, type Settings, type SettingsExtension, type SettingsExtensionContext, type Source, settingsFor, } from "./settings.js";
|
|
132
|
-
export { type PermissionAnswer, readSetupAnswers, type SetupAnswers } from "./setup-answers.js";
|
|
132
|
+
export { type PermissionAnswer, readSetupAnswers, type SetupAnswers, setupPermissionCeiling } from "./setup-answers.js";
|
|
133
133
|
export { AGENTS, type Agent, agentFor, screenFor } from "./setup-screen.js";
|
|
134
134
|
export { skillCommand } from "./skill-command.js";
|
|
135
135
|
export { runnable, withSafety } from "./steps.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -124,7 +124,7 @@ export { createProgram, run } from "./program.js";
|
|
|
124
124
|
export { fieldsOf, projectFields } from "./result-fields.js";
|
|
125
125
|
export { runsCommand } from "./runs/command.js";
|
|
126
126
|
export { count, first, flag, fromFile, NONE_NAMED, plain, settingsFor, } from "./settings.js";
|
|
127
|
-
export { readSetupAnswers } from "./setup-answers.js";
|
|
127
|
+
export { readSetupAnswers, setupPermissionCeiling } from "./setup-answers.js";
|
|
128
128
|
export { AGENTS, agentFor, screenFor } from "./setup-screen.js";
|
|
129
129
|
export { skillCommand } from "./skill-command.js";
|
|
130
130
|
export { runnable, withSafety } from "./steps.js";
|
|
@@ -22,3 +22,5 @@ export declare const writeSetupAnswers: (path: string, answers: SetupAnswers) =>
|
|
|
22
22
|
* are. A file that cannot be read keeps everything read-only: reads still work, and `setup` writes it again.
|
|
23
23
|
*/
|
|
24
24
|
export declare const permissionCeiling: (path: string) => Level | undefined;
|
|
25
|
+
/** `permissionCeiling` of this machine's shared config, for a tool that keeps its own levels: add it as `CEILING_KEY`. */
|
|
26
|
+
export declare const setupPermissionCeiling: (env?: NodeJS.ProcessEnv) => Level | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
import {
|
|
2
|
+
import { storePath } from "../store/path.js";
|
|
3
|
+
import { readSharedSection, sharedConfigPath, writeSharedSection } from "../store/shared-config.js";
|
|
3
4
|
/** "allow" leaves every profile as its own configuration says. */
|
|
4
5
|
export const PERMISSION_ANSWERS = ["readonly", "ask", "allow"];
|
|
5
6
|
export const QUESTIONS = ["languages", "tools", "permissions"];
|
|
@@ -45,3 +46,5 @@ export const permissionCeiling = (path) => {
|
|
|
45
46
|
}
|
|
46
47
|
return answer === "allow" ? undefined : answer;
|
|
47
48
|
};
|
|
49
|
+
/** `permissionCeiling` of this machine's shared config, for a tool that keeps its own levels: add it as `CEILING_KEY`. */
|
|
50
|
+
export const setupPermissionCeiling = (env = process.env) => permissionCeiling(sharedConfigPath(storePath(env), env));
|
package/dist/sends/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { type FloodDeadline, FloodMemory, type FloodState, FROZEN_HOLD_MS, flood
|
|
|
3
3
|
export { type Asker, type GuardRequest, guardFor, type SendGuard, type SendGuardOptions, sendGuard, sharedJournal, } from "./guard.js";
|
|
4
4
|
export { currentOperation, guardedWrite, type Operated } from "./guarded.js";
|
|
5
5
|
export { type AccountAction, type ChatAction, type SendEntry, SendJournal, type SendKind, type SendOutcome, sendsPathFor, } from "./journal.js";
|
|
6
|
-
export { assertStatsPermissionsCurrent, DEFAULT_PERMISSIONS, keyForCommand, keyForWrite, LEVELS, type Level, layerPermissions, levelFor, PERMISSIONS, type Permission, type PermissionKey, permissionFor, permissionOverrides, readKeysForCommand, skipFlagFor, WRITE_KEYS, } from "./permissions.js";
|
|
6
|
+
export { assertStatsPermissionsCurrent, CEILING_KEY, DEFAULT_PERMISSIONS, keyForCommand, keyForWrite, LEVELS, type Level, layerPermissions, levelFor, PERMISSIONS, type Permission, type PermissionKey, permissionFor, permissionOverrides, readKeysForCommand, skipFlagFor, WRITE_KEYS, } from "./permissions.js";
|
|
7
7
|
export { type Recipient, RecipientList, recipientsPathFor } from "./recipients.js";
|
|
8
8
|
export { newOperationId, newSendId } from "./send-id.js";
|
|
9
9
|
export { MAX_BUFFERED_UPLOAD_BYTES, readUpload, refusedPlace, uploadBlob, uploadBytes, uploadSize, } from "./upload.js";
|
package/dist/sends/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { FloodMemory, FROZEN_HOLD_MS, floodPathFor, LIMITED_HOLD_MS, } from "./f
|
|
|
2
2
|
export { guardFor, sendGuard, sharedJournal, } from "./guard.js";
|
|
3
3
|
export { currentOperation, guardedWrite } from "./guarded.js";
|
|
4
4
|
export { SendJournal, sendsPathFor, } from "./journal.js";
|
|
5
|
-
export { assertStatsPermissionsCurrent, DEFAULT_PERMISSIONS, keyForCommand, keyForWrite, LEVELS, layerPermissions, levelFor, PERMISSIONS, permissionFor, permissionOverrides, readKeysForCommand, skipFlagFor, WRITE_KEYS, } from "./permissions.js";
|
|
5
|
+
export { assertStatsPermissionsCurrent, CEILING_KEY, DEFAULT_PERMISSIONS, keyForCommand, keyForWrite, LEVELS, layerPermissions, levelFor, PERMISSIONS, permissionFor, permissionOverrides, readKeysForCommand, skipFlagFor, WRITE_KEYS, } from "./permissions.js";
|
|
6
6
|
export { RecipientList, recipientsPathFor } from "./recipients.js";
|
|
7
7
|
export { newOperationId, newSendId } from "./send-id.js";
|
|
8
8
|
export { MAX_BUFFERED_UPLOAD_BYTES, readUpload, refusedPlace, uploadBlob, uploadBytes, uploadSize, } from "./upload.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.404.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|