fix(cli): preserve scoped space aliases
This commit is contained in:
@@ -405,6 +405,7 @@ var paramAliasRepresentativePayloadCases = map[string]bool{
|
||||
paramAliasPayloadCaseKey("devdoc article search", "current-page"): true, // command override
|
||||
paramAliasPayloadCaseKey("doc +comment-create", "body"): true, // write shortcut content alias
|
||||
paramAliasPayloadCaseKey("doc +copy", "parent-folder-id"): true, // Doc folder role on a write shortcut
|
||||
paramAliasPayloadCaseKey("doc create", "space-id"): true, // published Doc workspace compatibility remains payload-equivalent
|
||||
paramAliasPayloadCaseKey("doc +create", "content-format"): true, // shortcut format alias preserves markdown/jsonml enum
|
||||
paramAliasPayloadCaseKey("doc +create-from-template", "keyword"): true, // template search alias composes with a write workflow
|
||||
paramAliasPayloadCaseKey("doc +create-from-template", "workspace-id"): true, // template target workspace identifier
|
||||
@@ -424,6 +425,7 @@ var paramAliasRepresentativePayloadCases = map[string]bool{
|
||||
paramAliasPayloadCaseKey("doc block insert", "parent-block-id"): true, // scoped block-role alias
|
||||
paramAliasPayloadCaseKey("doc comment delete", "comment-id"): true, // destructive comment-key alias
|
||||
paramAliasPayloadCaseKey("doc comment reply", "mentioned-open-conversation-ids"): true, // list-valued group mention role
|
||||
paramAliasPayloadCaseKey("drive info", "workspace"): true, // published numeric storage-space compatibility remains payload-equivalent
|
||||
paramAliasPayloadCaseKey("mail folder update", "folder-id"): true, // write-command identifier alias
|
||||
paramAliasPayloadCaseKey("report list", "from-date"): true, // date-range concept alias
|
||||
}
|
||||
|
||||
@@ -1893,11 +1893,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"member-role": "role",
|
||||
"node-id": "node",
|
||||
"permission-role": "role",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"url": "node",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "id", "job-id", "name", "parent-id", "permission", "public-permission", "reserve-role", "revision", "space", "space-id", "storage-space-id", "task-id", "template-id", "version"},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "id", "job-id", "name", "parent-id", "permission", "public-permission", "reserve-role", "revision", "storage-space-id", "task-id", "template-id", "version"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +access-grant",
|
||||
@@ -1912,11 +1914,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"member-role": "role",
|
||||
"node-id": "node",
|
||||
"permission-role": "role",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"url": "node",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "id", "job-id", "name", "parent-id", "permission", "public-permission", "reserve-role", "revision", "space", "space-id", "storage-space-id", "target-user-id", "target-user-ids", "task-id", "template-id", "user-id", "user-ids", "version"},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "id", "job-id", "name", "parent-id", "permission", "public-permission", "reserve-role", "revision", "storage-space-id", "target-user-id", "target-user-ids", "task-id", "template-id", "user-id", "user-ids", "version"},
|
||||
Ambiguous: []string{"target-user", "user", "users"},
|
||||
},
|
||||
{
|
||||
@@ -1929,11 +1933,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"file-id": "node",
|
||||
"knowledge-base-id": "workspace",
|
||||
"node-id": "node",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"url": "node",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "folder", "folder-id", "id", "job-id", "name", "parent-id", "revision", "role", "space", "space-id", "storage-space-id", "task-id", "template-id", "version"},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "folder", "folder-id", "id", "job-id", "name", "parent-id", "revision", "role", "storage-space-id", "task-id", "template-id", "version"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +background-delete",
|
||||
@@ -2074,11 +2080,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-folder": "folder",
|
||||
"parent-folder-id": "folder",
|
||||
"parent-node-id": "folder",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"url": "node",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "id", "job-id", "name", "parent-id", "revision", "role", "space", "space-id", "storage-space-id", "task-id", "template-id", "version"},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "id", "job-id", "name", "parent-id", "revision", "role", "storage-space-id", "task-id", "template-id", "version"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +create",
|
||||
@@ -2090,11 +2098,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-folder": "folder",
|
||||
"parent-folder-id": "folder",
|
||||
"parent-node-id": "folder",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"text": "content",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"content-file", "dentry-id", "dingdrive-space-id", "drive-space-id", "export-format", "mime-type", "node", "node-id", "parent-id", "space", "space-id", "storage-space-id", "title"},
|
||||
Blocked: []string{"content-file", "dentry-id", "dingdrive-space-id", "drive-space-id", "export-format", "mime-type", "node", "node-id", "parent-id", "storage-space-id", "title"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +create-from-template",
|
||||
@@ -2108,10 +2118,12 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-node-id": "folder",
|
||||
"q": "query",
|
||||
"search-word": "query",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "parent-id", "space", "space-id", "storage-space-id", "subject", "text", "title"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "parent-id", "storage-space-id", "subject", "text", "title"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +doc-append",
|
||||
@@ -2212,10 +2224,12 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"member-role": "role",
|
||||
"node-id": "node",
|
||||
"permission-role": "role",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "permission", "public-permission", "reserve-role", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "filter-role", "folder", "folder-id", "permission", "public-permission", "reserve-role", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +history-list",
|
||||
@@ -2266,10 +2280,12 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-folder": "folder",
|
||||
"parent-folder-id": "folder",
|
||||
"parent-node-id": "folder",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "parent-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "parent-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +inspect",
|
||||
@@ -2305,12 +2321,14 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-node-id": "folder",
|
||||
"per-page": "limit",
|
||||
"size": "limit",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"take": "limit",
|
||||
"top": "limit",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"count", "dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "offset", "page", "parent-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"count", "dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "offset", "page", "parent-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +media-download",
|
||||
@@ -2371,11 +2389,13 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"parent-folder": "folder",
|
||||
"parent-folder-id": "folder",
|
||||
"parent-node-id": "folder",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"url": "node",
|
||||
"wiki-workspace-id": "workspace",
|
||||
"workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "id", "job-id", "name", "parent-id", "revision", "role", "space", "space-id", "storage-space-id", "task-id", "template-id", "version"},
|
||||
Blocked: []string{"block-id", "comment-id", "comment-key", "dentry-id", "dingdrive-space-id", "drive-space-id", "id", "job-id", "name", "parent-id", "revision", "role", "storage-space-id", "task-id", "template-id", "version"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc +resource-delete",
|
||||
@@ -2691,10 +2711,12 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"body": "content",
|
||||
"doc-format": "content-format",
|
||||
"knowledge-base-id": "workspace",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"text": "content",
|
||||
"wiki-workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "export-format", "folder-id", "mime-type", "node", "node-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "export-format", "folder-id", "mime-type", "node", "node-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc export",
|
||||
@@ -2716,17 +2738,21 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
CLIPath: "doc file create",
|
||||
Aliases: map[string]string{
|
||||
"knowledge-base-id": "workspace",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "folder-id", "node", "node-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "folder-id", "node", "node-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc import",
|
||||
Aliases: map[string]string{
|
||||
"knowledge-base-id": "workspace",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "node", "node-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc import get",
|
||||
@@ -2836,9 +2862,11 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
CLIPath: "doc template apply",
|
||||
Aliases: map[string]string{
|
||||
"knowledge-base-id": "workspace",
|
||||
"space": "workspace",
|
||||
"space-id": "workspace",
|
||||
"wiki-workspace-id": "workspace",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "folder-id", "node", "node-id", "space", "space-id", "storage-space-id"},
|
||||
Blocked: []string{"dentry-id", "dingdrive-space-id", "drive-space-id", "folder-id", "node", "node-id", "storage-space-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "doc template list",
|
||||
@@ -3504,9 +3532,12 @@ var generatedParamAliases = []ParamAliasEntry{
|
||||
"dentry-uuid": "node",
|
||||
"dingdrive-space-id": "space-id",
|
||||
"drive-space-id": "space-id",
|
||||
"space": "space-id",
|
||||
"storage-space-id": "space-id",
|
||||
"workspace": "space-id",
|
||||
"workspace-id": "space-id",
|
||||
},
|
||||
Blocked: []string{"dentry-id", "document-url", "knowledge-base-id", "space", "wiki-workspace-id", "workspace", "workspace-id"},
|
||||
Blocked: []string{"dentry-id", "document-url", "knowledge-base-id", "wiki-workspace-id"},
|
||||
},
|
||||
{
|
||||
CLIPath: "drive list",
|
||||
|
||||
@@ -515,3 +515,68 @@ func TestGeneratedParamAliasesAreWellFormed(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCrossPlatformCoveragePublishedSpaceWorkspaceAliasesRemainExecutable(t *testing.T) {
|
||||
docCommands := []string{
|
||||
"doc +access-change",
|
||||
"doc +access-grant",
|
||||
"doc +access-revoke",
|
||||
"doc +copy",
|
||||
"doc +create",
|
||||
"doc +create-from-template",
|
||||
"doc +grant-and-share",
|
||||
"doc +import",
|
||||
"doc +list",
|
||||
"doc +move",
|
||||
"doc create",
|
||||
"doc file create",
|
||||
"doc import",
|
||||
"doc template apply",
|
||||
}
|
||||
for _, command := range docCommands {
|
||||
entry, ok := LookupParamAlias(command)
|
||||
if !ok {
|
||||
t.Errorf("published Doc command %q has no generated parameter-alias entry", command)
|
||||
continue
|
||||
}
|
||||
for _, emitted := range []string{"space", "space-id"} {
|
||||
target, active := entry.ResolveAlias(emitted)
|
||||
if !active || target != "workspace" {
|
||||
t.Errorf("%s --%s resolution = active:%v target:%q, want --workspace", command, emitted, active, target)
|
||||
}
|
||||
if entry.IsBlocked(emitted) || entry.IsAmbiguous(emitted) {
|
||||
t.Errorf("%s --%s remains protected after restoring its published alias", command, emitted)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
driveInfo, ok := LookupParamAlias("drive info")
|
||||
if !ok {
|
||||
t.Fatal("published drive info command has no generated parameter-alias entry")
|
||||
}
|
||||
for _, emitted := range []string{"space", "workspace", "workspace-id"} {
|
||||
target, active := driveInfo.ResolveAlias(emitted)
|
||||
if !active || target != "space-id" {
|
||||
t.Errorf("drive info --%s resolution = active:%v target:%q, want --space-id", emitted, active, target)
|
||||
}
|
||||
if driveInfo.IsBlocked(emitted) || driveInfo.IsAmbiguous(emitted) {
|
||||
t.Errorf("drive info --%s remains protected after restoring its published alias", emitted)
|
||||
}
|
||||
}
|
||||
|
||||
// Compatibility remains exact-path scoped. Strong type spellings introduced
|
||||
// after the split continue to guard the two value domains elsewhere.
|
||||
for _, test := range []struct {
|
||||
command string
|
||||
emitted string
|
||||
}{
|
||||
{command: "doc create", emitted: "storage-space-id"},
|
||||
{command: "drive +upload", emitted: "workspace-id"},
|
||||
{command: "drive info", emitted: "knowledge-base-id"},
|
||||
} {
|
||||
entry, ok := LookupParamAlias(test.command)
|
||||
if !ok || !entry.IsBlocked(test.emitted) {
|
||||
t.Errorf("%s --%s must remain blocked outside the published compatibility set", test.command, test.emitted)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
"chat message send-by-bot": {"scoped_aliases": {"at-users": "at-user-ids"}, "block": ["user-id", "to-user-id"], "ambiguous": ["at-ids"], "note": "The reviewed @ userId-list alias is exact; singular recipients are not promoted, and bare --at-ids cannot choose an identifier domain."},
|
||||
"doc +export-get": {"block": ["doc-id", "document-id", "file-id", "node", "node-id", "task-id", "url"], "note": "This command queries one export jobId. Document node identifiers and import taskId spellings are different entities and are rejected.", "scoped_aliases": {"export-job-id": "job-id"}, "scope_strict": true},
|
||||
"doc block delete": {"block": ["index"], "note": "index (position) vs node (node id) are different"},
|
||||
"doc +copy": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId."},
|
||||
"doc +list": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId."},
|
||||
"doc +move": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId."},
|
||||
"doc +copy": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId. The command-scoped --space/--space-id aliases preserve the compatibility published before workspace and numeric DingDrive storage-space concepts were split; they do not make those value domains globally equivalent."},
|
||||
"doc +list": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId. The command-scoped --space/--space-id aliases preserve the compatibility published before workspace and numeric DingDrive storage-space concepts were split; they do not make those value domains globally equivalent."},
|
||||
"doc +move": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId. The command-scoped --space/--space-id aliases preserve the compatibility published before workspace and numeric DingDrive storage-space concepts were split; they do not make those value domains globally equivalent."},
|
||||
"doc comment create": {"scoped_aliases": {"mentioned-open-conversation-ids": "mentioned-open-conversation-id", "open-conversation-id": "mentioned-open-conversation-id", "open-conversation-ids": "mentioned-open-conversation-id"}, "block": ["chat-id", "chat-ids", "conversation-id", "conversation-ids", "group-id", "group-ids"], "scope_strict": true, "note": "The target is a list of mentioned openConversationIds. Explicit open-conversation spellings preserve the list value; numeric groupId and role-free conversation spellings are rejected."},
|
||||
"doc comment reply": {"scoped_aliases": {"mentioned-open-conversation-ids": "mentioned-open-conversation-id", "open-conversation-id": "mentioned-open-conversation-id", "open-conversation-ids": "mentioned-open-conversation-id"}, "block": ["chat-id", "chat-ids", "conversation-id", "conversation-ids", "group-id", "group-ids"], "scope_strict": true, "note": "The target is a list of mentioned openConversationIds. Explicit open-conversation spellings preserve the list value; numeric groupId and role-free conversation spellings are rejected."},
|
||||
"doc comment update": {"scoped_aliases": {"mentioned-open-conversation-ids": "mentioned-open-conversation-id", "open-conversation-id": "mentioned-open-conversation-id", "open-conversation-ids": "mentioned-open-conversation-id"}, "block": ["chat-id", "chat-ids", "conversation-id", "conversation-ids", "group-id", "group-ids"], "scope_strict": true, "note": "The target is a list of mentioned openConversationIds. Explicit open-conversation spellings preserve the list value; numeric groupId and role-free conversation spellings are rejected."},
|
||||
@@ -169,10 +169,16 @@
|
||||
"chat +messages-recall-by-bot": {"block": ["msg-id", "message-id", "open-message-id", "msg-ids", "message-ids", "open-message-ids"], "note": "--keys carries processQueryKey values, not openMessageId values."},
|
||||
"chat +messages-reply": {"scoped_aliases": {"msg-id": "ref-msg-id", "open-message-id": "ref-msg-id"}, "block": ["group", "msg-ids", "message-ids", "open-message-ids"], "scope_strict": true, "note": "The observed --group spelling carried a natural group name and is blocked. The only message role is the referenced message; plural IDs are not accepted, while --chat remains a CID alias and native --message-id stays native."},
|
||||
"chat +messages-resource-download": {"block": ["download-dir"], "note": "--output may be a file or directory under workspace safety rules; a download directory cannot be assumed equivalent."},
|
||||
"doc +access-grant": {"block": ["target-user-id", "target-user-ids", "user-id", "user-ids"], "ambiguous": ["target-user", "user", "users"], "scope_strict": true, "note": "The real --to accepts collaborator names and resolves them before granting access. Explicit ID spellings cannot be passed through unchanged, while role-free user spellings do not prove whether their values are names or IDs."},
|
||||
"doc +create": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["content-file", "parent-id"], "scope_strict": true, "note": "--content-format is value-preservingly normalized to --doc-format. A raw --content-file path cannot become --content without adding the required @file transform, so it is blocked with guidance to use @relative-path or stable doc create."},
|
||||
"doc +create-from-template": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId."},
|
||||
"doc +import": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId."},
|
||||
"doc +access-change": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc +access-grant": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "block": ["target-user-id", "target-user-ids", "user-id", "user-ids"], "ambiguous": ["target-user", "user", "users"], "scope_strict": true, "note": "The real --to accepts collaborator names and resolves them before granting access. Explicit ID spellings cannot be passed through unchanged, while role-free user spellings do not prove whether their values are names or IDs. The command-scoped --space/--space-id aliases preserve previously published Doc workspace compatibility without making workspace and numeric DingDrive storage-space values globally equivalent."},
|
||||
"doc +access-revoke": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc +create": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["content-file", "parent-id"], "scope_strict": true, "note": "--content-format is value-preservingly normalized to --doc-format. A raw --content-file path cannot become --content without adding the required @file transform, so it is blocked with guidance to use @relative-path or stable doc create. The command-scoped --space/--space-id aliases preserve previously published Doc workspace compatibility without making workspace and numeric DingDrive storage-space values globally equivalent."},
|
||||
"doc +create-from-template": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId. The command-scoped --space/--space-id aliases preserve previously published Doc workspace compatibility without making workspace and numeric DingDrive storage-space values globally equivalent."},
|
||||
"doc +import": {"scoped_aliases": {"folder-id": "folder", "parent-folder": "folder", "parent-folder-id": "folder", "parent-node-id": "folder", "space": "workspace", "space-id": "workspace"}, "block": ["parent-id"], "scope_strict": true, "note": "This exact Doc command expects a Doc folder nodeId/dentryUuid/URL. Reviewed folder spellings preserve that value; generic --parent-id stays blocked because it may carry a numeric Drive dentryId. The command-scoped --space/--space-id aliases preserve previously published Doc workspace compatibility without making workspace and numeric DingDrive storage-space values globally equivalent."},
|
||||
"doc create": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc file create": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc import": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc template apply": {"scoped_aliases": {"space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "Command-scoped compatibility published before the workspace/storage-space concept split: these spellings keep passing their value unchanged to this Doc command's --workspace flag and do not establish global equivalence with a numeric DingDrive storage space."},
|
||||
"doc +update": {"scoped_aliases": {"mode": "command", "doc-id": "node", "document-id": "node", "file-id": "node", "node-id": "node", "url": "node"}, "block": ["content-file"], "ambiguous": ["element"], "scope_strict": true, "note": "--mode append/overwrite is the same operation selector subset as --command and preserves its value. --content-file is blocked because +update requires @relative-path or stdin and central aliases cannot read/transform a file value. --element cannot choose between document content, a block target, or an insertion reference."},
|
||||
"doc +inspect": {"scoped_aliases": {"include-access": "include-permissions", "include-member": "include-permissions", "include-members": "include-permissions", "include-versions": "include-history"}, "block": ["include", "include-blocks", "include-content", "include-info", "include-meta", "include-metadata"], "scope_strict": true, "note": "Access/member spellings denote the same optional permission list, and versions/history denote the same history section. Generic --include needs value-dependent expansion; base metadata is already returned; block/content reads belong to +fetch, so those spellings stop before fuzzy correction or dispatch."},
|
||||
"doc +fetch": {"scoped_aliases": {"start-block": "start-block-id", "end-block": "end-block-id"}, "block": ["content-format", "doc-format", "range"], "ambiguous": ["block-id"], "scope_strict": true, "note": "Start/end block roles are preserved. A role-free --block-id cannot choose a range/section boundary. --range is an invented composite argument observed alongside --scope range and cannot be split into block IDs by name-only normalization; content-format spellings do not map to the independent --detail contract."},
|
||||
@@ -185,7 +191,7 @@
|
||||
"doc +resource-download": {"scoped_aliases": {"doc": "node", "doc-id": "node", "document-id": "node", "node-id": "node"}, "ambiguous": ["file-id", "url"], "scope_strict": true, "note": "This command downloads a document resource while targeting the document by --node. File and URL spellings do not uniquely identify that document role."},
|
||||
"doc +resource-update": {"scoped_aliases": {"doc": "node", "doc-id": "node", "document-id": "node", "node-id": "node"}, "ambiguous": ["file-id", "url"], "scope_strict": true, "note": "This command has document-node, local-file, and HTTPS image URL roles. Only strong document spellings map to --node; --file-id and --url must stop as ambiguous."},
|
||||
"doc +share": {"block": ["doc", "doc-id", "document-id", "file-id", "id", "node", "node-id"], "note": "The real --url requires a shareable document link. Name-only normalization cannot turn a node identifier into a URL, so identifier spellings are rejected with guidance to provide --url."},
|
||||
"doc +grant-and-share": {"scoped_aliases": {"doc": "node", "doc-id": "node", "document-id": "node", "file-id": "node", "node-id": "node"}, "scope_strict": true, "note": "This workflow has two different real URL roles: --node selects the document for access control and --url is the shareable link sent to recipients. Explicit document-ID spellings map only to --node; --url remains native."},
|
||||
"doc +grant-and-share": {"scoped_aliases": {"doc": "node", "doc-id": "node", "document-id": "node", "file-id": "node", "node-id": "node", "space": "workspace", "space-id": "workspace"}, "scope_strict": true, "note": "This workflow has two different real URL roles: --node selects the document for access control and --url is the shareable link sent to recipients. Explicit document-ID spellings map only to --node; --url remains native. The command-scoped --space/--space-id aliases preserve previously published Doc workspace compatibility without making workspace and numeric DingDrive storage-space values globally equivalent."},
|
||||
"doc +version-save": {"block": ["message", "title"], "scope_strict": true, "note": "The current snapshot API accepts only the document target. Version title/message metadata are unsupported and cannot be represented by another existing flag."},
|
||||
"drive copy": {"scoped_aliases": {"document-id": "node", "dentry-uuid": "node", "directory-id": "folder", "source-node-id": "node", "source-file-id": "node", "target-folder-id": "folder", "destination-folder-id": "folder", "target-workspace-id": "workspace", "destination-workspace-id": "workspace"}, "scope_strict": true, "note": "Source node and destination folder/workspace are different roles; role-free target IDs stop before write dispatch. --name is not a rename field on this command and must not be fuzzy-corrected to --node.", "block": ["dentry-id", "destination-node-id", "dingdrive-space-id", "drive-space-id", "name", "source-folder-id", "space-id", "storage-space-id"], "ambiguous": ["destination-id", "target-id"]},
|
||||
"drive cover": {"scoped_aliases": {"document-id": "node", "dentry-uuid": "node"}, "scope_strict": true, "note": "The command accepts a Drive node ID or URL; native file-id/node-id/doc-id/url aliases stay native and are not duplicated centrally.", "block": ["dentry-id"]},
|
||||
@@ -223,7 +229,7 @@
|
||||
"drive +rename": {"scoped_aliases": {"dentry-uuid": "node", "file-id": "node", "node-id": "node", "doc-id": "node", "document-id": "node", "url": "node", "document-url": "node", "id": "node", "folder": "node", "folder-id": "node", "file-name": "name", "display-name": "name", "new-name": "name"}, "block": ["dentry-id"], "scope_strict": true, "note": "The existing document, file or folder node and the requested new display name are separate required roles. Node ID/URL aliases match drive rename and pass through unchanged; numeric dentryId remains protected."},
|
||||
"drive delete": {"scoped_aliases": {"dentry-uuid": "node"}, "block": ["dentry-id", "document-url"], "scope_strict": true, "note": "This command publicly accepts an ID-only Drive node; dentry spellings preserve the value and URL-specific spellings remain protected."},
|
||||
"drive download": {"scoped_aliases": {"dentry-uuid": "node", "chunk-size": "part-size", "concurrency": "parallel", "parallelism": "parallel"}, "block": ["dentry-id", "document-url", "file", "file-path", "folder", "folder-id", "knowledge-base-id", "wiki-workspace-id", "workspace", "workspace-id"], "scope_strict": true, "note": "Output path, chunk size, and concurrency names preserve values; local input and remote folder roles remain blocked."},
|
||||
"drive info": {"scoped_aliases": {"dentry-uuid": "node"}, "block": ["dentry-id", "document-url", "knowledge-base-id", "wiki-workspace-id", "workspace", "workspace-id"], "scope_strict": true, "note": "This command has only a numeric DingDrive space target; knowledge-base workspace spellings are a different value domain."},
|
||||
"drive info": {"scoped_aliases": {"dentry-uuid": "node", "space": "space-id", "workspace": "space-id", "workspace-id": "space-id"}, "block": ["dentry-id", "document-url", "knowledge-base-id", "wiki-workspace-id"], "scope_strict": true, "note": "This command has only a numeric DingDrive space target. Its command-scoped --space/--workspace/--workspace-id aliases preserve compatibility published before the workspace/storage-space concept split and pass the value unchanged to --space-id; new commands must not infer that knowledge-base workspace IDs and numeric storage-space IDs are globally interchangeable."},
|
||||
"drive commit": {"scoped_aliases": {"directory-id": "folder", "parent-directory-id": "folder", "upload-session-id": "upload-id", "size-bytes": "file-size", "name": "file-name", "display-name": "file-name", "filename": "file-name", "upload-name": "file-name"}, "scope_strict": true, "note": "Upload session, file name, file size in bytes, parent folder, and storage space remain separate roles.", "block": ["knowledge-base-id", "wiki-workspace-id", "workspace", "workspace-id"]},
|
||||
"drive mkdir": {"scoped_aliases": {"directory-id": "folder", "parent-directory-id": "folder", "folder-name": "name", "display-name": "name", "new-name": "name"}, "scope_strict": true, "note": "The name is this exact folder/node display name; search query and local path are different roles.", "block": ["knowledge-base-id", "wiki-workspace-id", "workspace", "workspace-id"]},
|
||||
"drive upload-info": {"scoped_aliases": {"directory-id": "folder", "parent-directory-id": "folder", "content-type": "mime-type", "size-bytes": "file-size", "name": "file-name", "display-name": "file-name", "filename": "file-name", "upload-name": "file-name"}, "scope_strict": true, "note": "File metadata aliases preserve MIME and byte units; file path and upload session are different stages.", "block": ["knowledge-base-id", "wiki-workspace-id", "workspace", "workspace-id"]},
|
||||
@@ -313,7 +319,7 @@
|
||||
{"command": "doc +export-get", "emitted": "node", "expect": "did-you-mean:blocked", "via": "override:block", "occ": 2},
|
||||
{"command": "doc block delete", "emitted": "index", "expect": "did-you-mean:blocked", "via": "override:block", "occ": 2},
|
||||
{"command": "doc block insert", "emitted": "before-block-id", "expect": "did-you-mean:blocked", "via": "guard:requires-multi-parameter-transform", "occ": 2},
|
||||
{"command": "drive info", "emitted": "workspace", "expect": "did-you-mean:blocked", "via": "guard:workspace-vs-numeric-storage-space", "occ": 2},
|
||||
{"command": "drive info", "emitted": "workspace", "expect": "space-id", "via": "override:published-storage-space-compatibility", "occ": 2},
|
||||
{"command": "mail folder update", "emitted": "folder-id", "expect": "id", "via": "override:bind(folder_id)", "occ": 2},
|
||||
{"command": "report outbox list", "emitted": "template-type", "expect": "did-you-mean:blocked", "via": "override:block", "occ": 2},
|
||||
{"command": "chat +group-members", "emitted": "group-name", "expect": "group", "via": "concept:group_name+bind"},
|
||||
@@ -503,7 +509,7 @@
|
||||
{"command": "doc +copy", "emitted": "dentry-uuid", "expect": "node", "via": "concept:doc_node_id"},
|
||||
{"command": "doc info", "emitted": "dentry-id", "expect": "did-you-mean:blocked", "via": "guard:dentry-id-vs-dentry-uuid"},
|
||||
{"command": "doc create", "emitted": "knowledge-base-id", "expect": "workspace", "via": "concept:workspace_id"},
|
||||
{"command": "doc create", "emitted": "space-id", "expect": "did-you-mean:blocked", "via": "guard:storage-space-vs-workspace"},
|
||||
{"command": "doc create", "emitted": "space-id", "expect": "workspace", "via": "override:published-workspace-compatibility"},
|
||||
{"command": "drive list", "emitted": "knowledge-base-id", "expect": "workspace", "via": "concept:workspace_id"},
|
||||
{"command": "drive list", "emitted": "order-field", "expect": "order-by", "via": "override:scoped-sort-field"},
|
||||
{"command": "drive info", "emitted": "dentry-uuid", "expect": "node", "via": "override:scoped-node-id"},
|
||||
|
||||
Reference in New Issue
Block a user