aipctl 2026.9.2 → 2026.9.4
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/build/index.cjs +833 -21
- package/docs/api-contract-inventory.md +8 -7
- package/package.json +10 -10
package/build/index.cjs
CHANGED
|
@@ -89666,11 +89666,11 @@ const runMain = runMain$1;
|
|
|
89666
89666
|
const BUILD_ENVS = ["local", "dev", "qa", "stage", "prod", "test"];
|
|
89667
89667
|
const isBuildEnv = (value) => BUILD_ENVS.includes(value);
|
|
89668
89668
|
|
|
89669
|
-
const injectedBuildEnv = "
|
|
89669
|
+
const injectedBuildEnv = "dev".length > 0 ? "dev" : "local";
|
|
89670
89670
|
if (!isBuildEnv(injectedBuildEnv)) {
|
|
89671
89671
|
throw new Error(`Invalid AIPCTL_BUILD_ENV: ${injectedBuildEnv}`);
|
|
89672
89672
|
}
|
|
89673
|
-
const VERSION = "2026.9.
|
|
89673
|
+
const VERSION = "2026.9.4".length > 0 ? "2026.9.4" : "0.0.0";
|
|
89674
89674
|
const BUILD_ENV = injectedBuildEnv;
|
|
89675
89675
|
const INCLUDE_NATIVE_LOGS = BUILD_ENV !== "prod";
|
|
89676
89676
|
|
|
@@ -89803,6 +89803,802 @@ const normalizeAipArgs = (args) => {
|
|
|
89803
89803
|
];
|
|
89804
89804
|
};
|
|
89805
89805
|
|
|
89806
|
+
const implementedCommandOperationIds = /* @__PURE__ */ new Set([
|
|
89807
|
+
"getCliMe",
|
|
89808
|
+
"getCliUserSettings",
|
|
89809
|
+
"listCliOrganizations",
|
|
89810
|
+
"getCliOrganizationCapabilities",
|
|
89811
|
+
"listCliOrganizationMembers",
|
|
89812
|
+
"listCliModelExecModels",
|
|
89813
|
+
"createCliModelChatExecution"
|
|
89814
|
+
]);
|
|
89815
|
+
const direct = (commands, operation) => commands.map((command) => ({
|
|
89816
|
+
command,
|
|
89817
|
+
tier: "GA_DIRECT",
|
|
89818
|
+
availability: implementedCommandOperationIds.has(operation.operationId ?? "") ? "IMPLEMENTED" : "PLANNED",
|
|
89819
|
+
...operation
|
|
89820
|
+
}));
|
|
89821
|
+
const candidate = (commands, owner, authBoundary, requiredGates) => commands.map((command) => ({
|
|
89822
|
+
command,
|
|
89823
|
+
tier: "GA_CANDIDATE",
|
|
89824
|
+
owner,
|
|
89825
|
+
authBoundary,
|
|
89826
|
+
quotaClass: "endpoint-guard",
|
|
89827
|
+
availability: "GATED",
|
|
89828
|
+
capability: `cli.${command.replaceAll(" ", ".")}`,
|
|
89829
|
+
requiredGates
|
|
89830
|
+
}));
|
|
89831
|
+
const fixedBoundary = (commands, tier, owner, authBoundary) => commands.map((command) => ({
|
|
89832
|
+
command,
|
|
89833
|
+
tier,
|
|
89834
|
+
owner,
|
|
89835
|
+
authBoundary,
|
|
89836
|
+
quotaClass: "none",
|
|
89837
|
+
availability: tier === "INTERNAL_HIDDEN" ? "HIDDEN" : "AVAILABLE"
|
|
89838
|
+
}));
|
|
89839
|
+
const orgPath = "/api/cli/v1/organizations/{organizationSlug}";
|
|
89840
|
+
const commandManifest = [
|
|
89841
|
+
...direct(["auth whoami"], {
|
|
89842
|
+
owner: "backend",
|
|
89843
|
+
authBoundary: "user-oauth",
|
|
89844
|
+
quotaClass: "bootstrap",
|
|
89845
|
+
endpoint: { method: "GET", path: "/api/cli/v1/me" },
|
|
89846
|
+
operationId: "getCliMe",
|
|
89847
|
+
canonicalOperation: "cli.identity.me.read",
|
|
89848
|
+
capability: "cli.identity.me"
|
|
89849
|
+
}),
|
|
89850
|
+
...direct(["org list", "org use", "org select"], {
|
|
89851
|
+
owner: "backend",
|
|
89852
|
+
authBoundary: "user-oauth",
|
|
89853
|
+
quotaClass: "bootstrap",
|
|
89854
|
+
endpoint: { method: "GET", path: "/api/cli/v1/organizations" },
|
|
89855
|
+
operationId: "listCliOrganizations",
|
|
89856
|
+
canonicalOperation: "cli.organization.list",
|
|
89857
|
+
capability: "cli.organization.discovery"
|
|
89858
|
+
}),
|
|
89859
|
+
...direct(["org capabilities"], {
|
|
89860
|
+
owner: "backend",
|
|
89861
|
+
authBoundary: "organization-oauth",
|
|
89862
|
+
quotaClass: "metadata",
|
|
89863
|
+
endpoint: { method: "GET", path: `${orgPath}/capabilities` },
|
|
89864
|
+
operationId: "getCliOrganizationCapabilities",
|
|
89865
|
+
canonicalOperation: "cli.organization.capabilities.read",
|
|
89866
|
+
capability: "cli.organization.capabilities"
|
|
89867
|
+
}),
|
|
89868
|
+
...direct(["org settings"], {
|
|
89869
|
+
owner: "backend",
|
|
89870
|
+
authBoundary: "user-oauth",
|
|
89871
|
+
quotaClass: "bootstrap",
|
|
89872
|
+
endpoint: { method: "GET", path: "/api/cli/v1/me/settings" },
|
|
89873
|
+
operationId: "getCliUserSettings",
|
|
89874
|
+
canonicalOperation: "cli.user.settings.read",
|
|
89875
|
+
capability: "cli.user.settings"
|
|
89876
|
+
}),
|
|
89877
|
+
...direct(["org members"], {
|
|
89878
|
+
owner: "backend",
|
|
89879
|
+
authBoundary: "organization-oauth",
|
|
89880
|
+
quotaClass: "metadata",
|
|
89881
|
+
endpoint: { method: "GET", path: `${orgPath}/members` },
|
|
89882
|
+
operationId: "listCliOrganizationMembers",
|
|
89883
|
+
canonicalOperation: "cli.organization.members.list",
|
|
89884
|
+
capability: "cli.organization.members.read"
|
|
89885
|
+
}),
|
|
89886
|
+
...direct(["org exit"], {
|
|
89887
|
+
owner: "backend",
|
|
89888
|
+
authBoundary: "organization-oauth",
|
|
89889
|
+
quotaClass: "metadata",
|
|
89890
|
+
endpoint: { method: "DELETE", path: `${orgPath}/membership` },
|
|
89891
|
+
operationId: "deleteCliOrganizationMembership",
|
|
89892
|
+
canonicalOperation: "cli.organization.membership.exit",
|
|
89893
|
+
capability: "cli.organization.exit"
|
|
89894
|
+
}),
|
|
89895
|
+
...direct(["admin org invite"], {
|
|
89896
|
+
owner: "backend",
|
|
89897
|
+
authBoundary: "organization-oauth",
|
|
89898
|
+
quotaClass: "metadata",
|
|
89899
|
+
endpoint: { method: "POST", path: `${orgPath}/members/invitations` },
|
|
89900
|
+
operationId: "createCliOrganizationMemberInvitations",
|
|
89901
|
+
canonicalOperation: "cli.organization.members.invite",
|
|
89902
|
+
capability: "cli.organization.members.write"
|
|
89903
|
+
}),
|
|
89904
|
+
...direct(["admin org remove-member"], {
|
|
89905
|
+
owner: "backend",
|
|
89906
|
+
authBoundary: "organization-oauth",
|
|
89907
|
+
quotaClass: "metadata",
|
|
89908
|
+
endpoint: { method: "DELETE", path: `${orgPath}/members` },
|
|
89909
|
+
operationId: "deleteCliOrganizationMembers",
|
|
89910
|
+
canonicalOperation: "cli.organization.members.remove",
|
|
89911
|
+
capability: "cli.organization.members.write"
|
|
89912
|
+
}),
|
|
89913
|
+
...direct(["admin org update-member-role"], {
|
|
89914
|
+
owner: "backend",
|
|
89915
|
+
authBoundary: "organization-oauth",
|
|
89916
|
+
quotaClass: "metadata",
|
|
89917
|
+
endpoint: { method: "PUT", path: `${orgPath}/members/role` },
|
|
89918
|
+
operationId: "updateCliOrganizationMemberRoles",
|
|
89919
|
+
canonicalOperation: "cli.organization.members.role.update",
|
|
89920
|
+
capability: "cli.organization.members.write"
|
|
89921
|
+
}),
|
|
89922
|
+
...direct(["model list"], {
|
|
89923
|
+
owner: "chat",
|
|
89924
|
+
authBoundary: "organization-oauth",
|
|
89925
|
+
quotaClass: "metadata",
|
|
89926
|
+
endpoint: { method: "GET", path: `${orgPath}/models` },
|
|
89927
|
+
operationId: "listCliModels",
|
|
89928
|
+
canonicalOperation: "cli.model.catalog.read",
|
|
89929
|
+
capability: "cli.model.catalog"
|
|
89930
|
+
}),
|
|
89931
|
+
...direct(["model-exec models", "model-exec get", "model-exec sample"], {
|
|
89932
|
+
owner: "chat",
|
|
89933
|
+
authBoundary: "organization-oauth",
|
|
89934
|
+
quotaClass: "metadata",
|
|
89935
|
+
endpoint: { method: "GET", path: `${orgPath}/model-exec/models` },
|
|
89936
|
+
operationId: "listCliModelExecModels",
|
|
89937
|
+
canonicalOperation: "cli.model.catalog.read",
|
|
89938
|
+
capability: "cli.model.catalog"
|
|
89939
|
+
}),
|
|
89940
|
+
...direct(["model-exec chat"], {
|
|
89941
|
+
owner: "chat",
|
|
89942
|
+
authBoundary: "organization-oauth",
|
|
89943
|
+
quotaClass: "text-execution",
|
|
89944
|
+
endpoint: { method: "POST", path: `${orgPath}/model-exec/chat` },
|
|
89945
|
+
operationId: "createCliModelChatExecution",
|
|
89946
|
+
canonicalOperation: "cli.model.text.execute",
|
|
89947
|
+
capability: "cli.model.text.execute"
|
|
89948
|
+
}),
|
|
89949
|
+
...direct(["agent list"], {
|
|
89950
|
+
owner: "backend",
|
|
89951
|
+
authBoundary: "organization-oauth",
|
|
89952
|
+
quotaClass: "metadata",
|
|
89953
|
+
endpoint: { method: "GET", path: `${orgPath}/agents` },
|
|
89954
|
+
operationId: "listCliAgents",
|
|
89955
|
+
canonicalOperation: "cli.agent.list",
|
|
89956
|
+
capability: "cli.agent.read"
|
|
89957
|
+
}),
|
|
89958
|
+
...direct(["agent get"], {
|
|
89959
|
+
owner: "backend",
|
|
89960
|
+
authBoundary: "organization-oauth",
|
|
89961
|
+
quotaClass: "metadata",
|
|
89962
|
+
endpoint: { method: "GET", path: `${orgPath}/agents/{installedAgentId}` },
|
|
89963
|
+
operationId: "getCliAgent",
|
|
89964
|
+
canonicalOperation: "cli.agent.get",
|
|
89965
|
+
capability: "cli.agent.read"
|
|
89966
|
+
}),
|
|
89967
|
+
...direct(["agent enable", "agent disable"], {
|
|
89968
|
+
owner: "backend",
|
|
89969
|
+
authBoundary: "organization-oauth",
|
|
89970
|
+
quotaClass: "metadata",
|
|
89971
|
+
endpoint: { method: "PATCH", path: `${orgPath}/agents/{installedAgentId}/status` },
|
|
89972
|
+
operationId: "updateCliAgentStatus",
|
|
89973
|
+
canonicalOperation: "cli.agent.status.update",
|
|
89974
|
+
capability: "cli.agent.write"
|
|
89975
|
+
}),
|
|
89976
|
+
...direct(["admin agent templates"], {
|
|
89977
|
+
owner: "backend",
|
|
89978
|
+
authBoundary: "organization-oauth",
|
|
89979
|
+
quotaClass: "metadata",
|
|
89980
|
+
endpoint: { method: "GET", path: `${orgPath}/agents/templates` },
|
|
89981
|
+
operationId: "listCliAgentTemplates",
|
|
89982
|
+
canonicalOperation: "cli.agent.templates.list",
|
|
89983
|
+
capability: "cli.agent.read"
|
|
89984
|
+
}),
|
|
89985
|
+
...direct(["admin agent create"], {
|
|
89986
|
+
owner: "backend",
|
|
89987
|
+
authBoundary: "organization-oauth",
|
|
89988
|
+
quotaClass: "metadata",
|
|
89989
|
+
endpoint: { method: "POST", path: `${orgPath}/agents` },
|
|
89990
|
+
operationId: "createCliAgent",
|
|
89991
|
+
canonicalOperation: "cli.agent.create",
|
|
89992
|
+
capability: "cli.agent.write"
|
|
89993
|
+
}),
|
|
89994
|
+
...direct(["admin agent update"], {
|
|
89995
|
+
owner: "backend",
|
|
89996
|
+
authBoundary: "organization-oauth",
|
|
89997
|
+
quotaClass: "metadata",
|
|
89998
|
+
endpoint: { method: "PATCH", path: `${orgPath}/agents/{installedAgentId}` },
|
|
89999
|
+
operationId: "updateCliAgent",
|
|
90000
|
+
canonicalOperation: "cli.agent.update",
|
|
90001
|
+
capability: "cli.agent.write"
|
|
90002
|
+
}),
|
|
90003
|
+
...direct(["admin agent delete"], {
|
|
90004
|
+
owner: "backend",
|
|
90005
|
+
authBoundary: "organization-oauth",
|
|
90006
|
+
quotaClass: "metadata",
|
|
90007
|
+
endpoint: { method: "DELETE", path: `${orgPath}/agents/{installedAgentId}` },
|
|
90008
|
+
operationId: "deleteCliAgent",
|
|
90009
|
+
canonicalOperation: "cli.agent.delete",
|
|
90010
|
+
capability: "cli.agent.write"
|
|
90011
|
+
}),
|
|
90012
|
+
...direct(["admin agent share"], {
|
|
90013
|
+
owner: "backend",
|
|
90014
|
+
authBoundary: "organization-oauth",
|
|
90015
|
+
quotaClass: "metadata",
|
|
90016
|
+
endpoint: { method: "GET", path: `${orgPath}/agents/{installedAgentId}/share` },
|
|
90017
|
+
operationId: "getCliAgentShare",
|
|
90018
|
+
canonicalOperation: "cli.agent.share.read",
|
|
90019
|
+
capability: "cli.agent.read"
|
|
90020
|
+
}),
|
|
90021
|
+
...direct(["skill list"], {
|
|
90022
|
+
owner: "backend",
|
|
90023
|
+
authBoundary: "organization-oauth",
|
|
90024
|
+
quotaClass: "metadata",
|
|
90025
|
+
endpoint: { method: "GET", path: `${orgPath}/skills` },
|
|
90026
|
+
operationId: "listCliSkills",
|
|
90027
|
+
canonicalOperation: "cli.skill.list",
|
|
90028
|
+
capability: "cli.skill.read"
|
|
90029
|
+
}),
|
|
90030
|
+
...direct(["skill get"], {
|
|
90031
|
+
owner: "backend",
|
|
90032
|
+
authBoundary: "organization-oauth",
|
|
90033
|
+
quotaClass: "metadata",
|
|
90034
|
+
endpoint: { method: "GET", path: `${orgPath}/skills/{skillId}` },
|
|
90035
|
+
operationId: "getCliSkill",
|
|
90036
|
+
canonicalOperation: "cli.skill.get",
|
|
90037
|
+
capability: "cli.skill.read"
|
|
90038
|
+
}),
|
|
90039
|
+
...direct(["skill delete"], {
|
|
90040
|
+
owner: "backend",
|
|
90041
|
+
authBoundary: "organization-oauth",
|
|
90042
|
+
quotaClass: "metadata",
|
|
90043
|
+
endpoint: { method: "DELETE", path: `${orgPath}/skills/{skillId}` },
|
|
90044
|
+
operationId: "deleteCliSkill",
|
|
90045
|
+
canonicalOperation: "cli.skill.delete",
|
|
90046
|
+
capability: "cli.skill.write"
|
|
90047
|
+
}),
|
|
90048
|
+
...direct(["skill library"], {
|
|
90049
|
+
owner: "backend",
|
|
90050
|
+
authBoundary: "organization-oauth",
|
|
90051
|
+
quotaClass: "metadata",
|
|
90052
|
+
endpoint: { method: "GET", path: `${orgPath}/skills/library` },
|
|
90053
|
+
operationId: "listCliSkillLibrary",
|
|
90054
|
+
canonicalOperation: "cli.skill.library.list",
|
|
90055
|
+
capability: "cli.skill.read"
|
|
90056
|
+
}),
|
|
90057
|
+
...direct(["skill clone"], {
|
|
90058
|
+
owner: "backend",
|
|
90059
|
+
authBoundary: "organization-oauth",
|
|
90060
|
+
quotaClass: "metadata",
|
|
90061
|
+
endpoint: { method: "POST", path: `${orgPath}/skills/library/clone` },
|
|
90062
|
+
operationId: "createCliSkillClones",
|
|
90063
|
+
canonicalOperation: "cli.skill.library.clone",
|
|
90064
|
+
capability: "cli.skill.write"
|
|
90065
|
+
}),
|
|
90066
|
+
...direct(["skill built-in"], {
|
|
90067
|
+
owner: "backend",
|
|
90068
|
+
authBoundary: "organization-oauth",
|
|
90069
|
+
quotaClass: "metadata",
|
|
90070
|
+
endpoint: { method: "GET", path: `${orgPath}/skills/built-in` },
|
|
90071
|
+
operationId: "listCliBuiltInSkills",
|
|
90072
|
+
canonicalOperation: "cli.skill.built-in.list",
|
|
90073
|
+
capability: "cli.skill.read"
|
|
90074
|
+
}),
|
|
90075
|
+
...direct(["skill clone-built-in"], {
|
|
90076
|
+
owner: "backend",
|
|
90077
|
+
authBoundary: "organization-oauth",
|
|
90078
|
+
quotaClass: "metadata",
|
|
90079
|
+
endpoint: { method: "POST", path: `${orgPath}/skills/built-in/clone` },
|
|
90080
|
+
operationId: "createCliBuiltInSkillClones",
|
|
90081
|
+
canonicalOperation: "cli.skill.built-in.clone",
|
|
90082
|
+
capability: "cli.skill.write"
|
|
90083
|
+
}),
|
|
90084
|
+
...direct(["admin skill list"], {
|
|
90085
|
+
owner: "backend",
|
|
90086
|
+
authBoundary: "organization-oauth",
|
|
90087
|
+
quotaClass: "metadata",
|
|
90088
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/skills` },
|
|
90089
|
+
operationId: "listCliAdminSkills",
|
|
90090
|
+
canonicalOperation: "cli.admin.skill.list",
|
|
90091
|
+
capability: "cli.admin.skill.read"
|
|
90092
|
+
}),
|
|
90093
|
+
...direct(["admin skill get"], {
|
|
90094
|
+
owner: "backend",
|
|
90095
|
+
authBoundary: "organization-oauth",
|
|
90096
|
+
quotaClass: "metadata",
|
|
90097
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/skills/{skillId}` },
|
|
90098
|
+
operationId: "getCliAdminSkill",
|
|
90099
|
+
canonicalOperation: "cli.admin.skill.get",
|
|
90100
|
+
capability: "cli.admin.skill.read"
|
|
90101
|
+
}),
|
|
90102
|
+
...direct(["admin skill delete"], {
|
|
90103
|
+
owner: "backend",
|
|
90104
|
+
authBoundary: "organization-oauth",
|
|
90105
|
+
quotaClass: "metadata",
|
|
90106
|
+
endpoint: { method: "DELETE", path: `${orgPath}/admin/skills/{skillId}` },
|
|
90107
|
+
operationId: "deleteCliAdminSkill",
|
|
90108
|
+
canonicalOperation: "cli.admin.skill.delete",
|
|
90109
|
+
capability: "cli.admin.skill.write"
|
|
90110
|
+
}),
|
|
90111
|
+
...direct(["admin skill publish", "admin skill unpublish"], {
|
|
90112
|
+
owner: "backend",
|
|
90113
|
+
authBoundary: "organization-oauth",
|
|
90114
|
+
quotaClass: "metadata",
|
|
90115
|
+
endpoint: { method: "PATCH", path: `${orgPath}/admin/skills/{skillId}` },
|
|
90116
|
+
operationId: "updateCliAdminSkill",
|
|
90117
|
+
canonicalOperation: "cli.admin.skill.update",
|
|
90118
|
+
capability: "cli.admin.skill.write"
|
|
90119
|
+
}),
|
|
90120
|
+
...direct(["admin skill built-in"], {
|
|
90121
|
+
owner: "backend",
|
|
90122
|
+
authBoundary: "organization-oauth",
|
|
90123
|
+
quotaClass: "metadata",
|
|
90124
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/skills/built-in` },
|
|
90125
|
+
operationId: "listCliAdminBuiltInSkills",
|
|
90126
|
+
canonicalOperation: "cli.admin.skill.built-in.list",
|
|
90127
|
+
capability: "cli.admin.skill.read"
|
|
90128
|
+
}),
|
|
90129
|
+
...direct(["admin skill clone-built-in"], {
|
|
90130
|
+
owner: "backend",
|
|
90131
|
+
authBoundary: "organization-oauth",
|
|
90132
|
+
quotaClass: "metadata",
|
|
90133
|
+
endpoint: { method: "POST", path: `${orgPath}/admin/skills/built-in/clone` },
|
|
90134
|
+
operationId: "createCliAdminBuiltInSkillClones",
|
|
90135
|
+
canonicalOperation: "cli.admin.skill.built-in.clone",
|
|
90136
|
+
capability: "cli.admin.skill.write"
|
|
90137
|
+
}),
|
|
90138
|
+
...direct(["drive list"], {
|
|
90139
|
+
owner: "backend",
|
|
90140
|
+
authBoundary: "organization-oauth",
|
|
90141
|
+
quotaClass: "metadata",
|
|
90142
|
+
endpoint: { method: "GET", path: `${orgPath}/drive/entries` },
|
|
90143
|
+
operationId: "listCliDriveEntries",
|
|
90144
|
+
canonicalOperation: "cli.drive.entries.list",
|
|
90145
|
+
capability: "cli.drive.read"
|
|
90146
|
+
}),
|
|
90147
|
+
...direct(["drive usage"], {
|
|
90148
|
+
owner: "backend",
|
|
90149
|
+
authBoundary: "organization-oauth",
|
|
90150
|
+
quotaClass: "metadata",
|
|
90151
|
+
endpoint: { method: "GET", path: `${orgPath}/drive/usage` },
|
|
90152
|
+
operationId: "getCliDriveUsage",
|
|
90153
|
+
canonicalOperation: "cli.drive.usage.read",
|
|
90154
|
+
capability: "cli.drive.read"
|
|
90155
|
+
}),
|
|
90156
|
+
...direct(["drive mkdir"], {
|
|
90157
|
+
owner: "backend",
|
|
90158
|
+
authBoundary: "organization-oauth",
|
|
90159
|
+
quotaClass: "metadata",
|
|
90160
|
+
endpoint: { method: "POST", path: `${orgPath}/drive/folders` },
|
|
90161
|
+
operationId: "createCliDriveFolder",
|
|
90162
|
+
canonicalOperation: "cli.drive.folder.create",
|
|
90163
|
+
capability: "cli.drive.write"
|
|
90164
|
+
}),
|
|
90165
|
+
...direct(["drive rename"], {
|
|
90166
|
+
owner: "backend",
|
|
90167
|
+
authBoundary: "organization-oauth",
|
|
90168
|
+
quotaClass: "metadata",
|
|
90169
|
+
endpoint: { method: "PATCH", path: `${orgPath}/drive/entries/{entryId}` },
|
|
90170
|
+
operationId: "updateCliDriveEntryName",
|
|
90171
|
+
canonicalOperation: "cli.drive.entry.rename",
|
|
90172
|
+
capability: "cli.drive.write"
|
|
90173
|
+
}),
|
|
90174
|
+
...direct(["drive delete"], {
|
|
90175
|
+
owner: "backend",
|
|
90176
|
+
authBoundary: "organization-oauth",
|
|
90177
|
+
quotaClass: "metadata",
|
|
90178
|
+
endpoint: { method: "POST", path: `${orgPath}/drive/entries/delete` },
|
|
90179
|
+
operationId: "deleteCliDriveEntries",
|
|
90180
|
+
canonicalOperation: "cli.drive.entries.delete",
|
|
90181
|
+
capability: "cli.drive.write"
|
|
90182
|
+
}),
|
|
90183
|
+
...direct(["chat list"], {
|
|
90184
|
+
owner: "chat",
|
|
90185
|
+
authBoundary: "organization-oauth",
|
|
90186
|
+
quotaClass: "metadata",
|
|
90187
|
+
endpoint: { method: "GET", path: `${orgPath}/chats` },
|
|
90188
|
+
operationId: "listCliChats",
|
|
90189
|
+
canonicalOperation: "cli.chat.list",
|
|
90190
|
+
capability: "cli.chat.read"
|
|
90191
|
+
}),
|
|
90192
|
+
...direct(["chat get"], {
|
|
90193
|
+
owner: "chat",
|
|
90194
|
+
authBoundary: "organization-oauth",
|
|
90195
|
+
quotaClass: "metadata",
|
|
90196
|
+
endpoint: { method: "GET", path: `${orgPath}/chats/{conversationId}` },
|
|
90197
|
+
operationId: "getCliChat",
|
|
90198
|
+
canonicalOperation: "cli.chat.get",
|
|
90199
|
+
capability: "cli.chat.read"
|
|
90200
|
+
}),
|
|
90201
|
+
...direct(["chat messages"], {
|
|
90202
|
+
owner: "chat",
|
|
90203
|
+
authBoundary: "organization-oauth",
|
|
90204
|
+
quotaClass: "metadata",
|
|
90205
|
+
endpoint: { method: "GET", path: `${orgPath}/chats/{conversationId}/messages` },
|
|
90206
|
+
operationId: "listCliChatMessages",
|
|
90207
|
+
canonicalOperation: "cli.chat.messages.list",
|
|
90208
|
+
capability: "cli.chat.read"
|
|
90209
|
+
}),
|
|
90210
|
+
...direct(["integration list"], {
|
|
90211
|
+
owner: "backend",
|
|
90212
|
+
authBoundary: "organization-oauth",
|
|
90213
|
+
quotaClass: "metadata",
|
|
90214
|
+
endpoint: { method: "GET", path: `${orgPath}/integrations` },
|
|
90215
|
+
operationId: "listCliIntegrations",
|
|
90216
|
+
canonicalOperation: "cli.integration.list",
|
|
90217
|
+
capability: "cli.integration.read"
|
|
90218
|
+
}),
|
|
90219
|
+
...direct(["admin integration available"], {
|
|
90220
|
+
owner: "backend",
|
|
90221
|
+
authBoundary: "organization-oauth",
|
|
90222
|
+
quotaClass: "metadata",
|
|
90223
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/integrations/available` },
|
|
90224
|
+
operationId: "listCliAvailableIntegrations",
|
|
90225
|
+
canonicalOperation: "cli.admin.integration.available.list",
|
|
90226
|
+
capability: "cli.admin.integration.read"
|
|
90227
|
+
}),
|
|
90228
|
+
...direct(["admin integration get"], {
|
|
90229
|
+
owner: "backend",
|
|
90230
|
+
authBoundary: "organization-oauth",
|
|
90231
|
+
quotaClass: "metadata",
|
|
90232
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/integrations/{integrationId}` },
|
|
90233
|
+
operationId: "getCliAdminIntegration",
|
|
90234
|
+
canonicalOperation: "cli.admin.integration.get",
|
|
90235
|
+
capability: "cli.admin.integration.read"
|
|
90236
|
+
}),
|
|
90237
|
+
...direct(["admin integration tools"], {
|
|
90238
|
+
owner: "backend",
|
|
90239
|
+
authBoundary: "organization-oauth",
|
|
90240
|
+
quotaClass: "metadata",
|
|
90241
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/integrations/{integrationId}/tools` },
|
|
90242
|
+
operationId: "listCliIntegrationTools",
|
|
90243
|
+
canonicalOperation: "cli.admin.integration.tools.list",
|
|
90244
|
+
capability: "cli.admin.integration.read"
|
|
90245
|
+
}),
|
|
90246
|
+
...direct(["automation list"], {
|
|
90247
|
+
owner: "backend",
|
|
90248
|
+
authBoundary: "organization-oauth",
|
|
90249
|
+
quotaClass: "metadata",
|
|
90250
|
+
endpoint: { method: "GET", path: `${orgPath}/automations` },
|
|
90251
|
+
operationId: "listCliAutomations",
|
|
90252
|
+
canonicalOperation: "cli.automation.list",
|
|
90253
|
+
capability: "cli.automation.read"
|
|
90254
|
+
}),
|
|
90255
|
+
...direct(["automation get"], {
|
|
90256
|
+
owner: "backend",
|
|
90257
|
+
authBoundary: "organization-oauth",
|
|
90258
|
+
quotaClass: "metadata",
|
|
90259
|
+
endpoint: { method: "GET", path: `${orgPath}/automations/{automationId}` },
|
|
90260
|
+
operationId: "getCliAutomation",
|
|
90261
|
+
canonicalOperation: "cli.automation.get",
|
|
90262
|
+
capability: "cli.automation.read"
|
|
90263
|
+
}),
|
|
90264
|
+
...direct(["automation triggers"], {
|
|
90265
|
+
owner: "backend",
|
|
90266
|
+
authBoundary: "organization-oauth",
|
|
90267
|
+
quotaClass: "metadata",
|
|
90268
|
+
endpoint: { method: "GET", path: `${orgPath}/automations/triggers` },
|
|
90269
|
+
operationId: "listCliAutomationTriggers",
|
|
90270
|
+
canonicalOperation: "cli.automation.triggers.list",
|
|
90271
|
+
capability: "cli.automation.read"
|
|
90272
|
+
}),
|
|
90273
|
+
...direct(["automation history"], {
|
|
90274
|
+
owner: "backend",
|
|
90275
|
+
authBoundary: "organization-oauth",
|
|
90276
|
+
quotaClass: "metadata",
|
|
90277
|
+
endpoint: { method: "GET", path: `${orgPath}/automations/{automationId}/history` },
|
|
90278
|
+
operationId: "listCliAutomationHistory",
|
|
90279
|
+
canonicalOperation: "cli.automation.history.list",
|
|
90280
|
+
capability: "cli.automation.read"
|
|
90281
|
+
}),
|
|
90282
|
+
...direct(["automation create"], {
|
|
90283
|
+
owner: "backend",
|
|
90284
|
+
authBoundary: "organization-oauth",
|
|
90285
|
+
quotaClass: "metadata",
|
|
90286
|
+
endpoint: { method: "POST", path: `${orgPath}/automations` },
|
|
90287
|
+
operationId: "createCliAutomation",
|
|
90288
|
+
canonicalOperation: "cli.automation.create",
|
|
90289
|
+
capability: "cli.automation.write"
|
|
90290
|
+
}),
|
|
90291
|
+
...direct(["automation update"], {
|
|
90292
|
+
owner: "backend",
|
|
90293
|
+
authBoundary: "organization-oauth",
|
|
90294
|
+
quotaClass: "metadata",
|
|
90295
|
+
endpoint: { method: "PUT", path: `${orgPath}/automations/{automationId}` },
|
|
90296
|
+
operationId: "updateCliAutomation",
|
|
90297
|
+
canonicalOperation: "cli.automation.update",
|
|
90298
|
+
capability: "cli.automation.write"
|
|
90299
|
+
}),
|
|
90300
|
+
...direct(["automation delete"], {
|
|
90301
|
+
owner: "backend",
|
|
90302
|
+
authBoundary: "organization-oauth",
|
|
90303
|
+
quotaClass: "metadata",
|
|
90304
|
+
endpoint: { method: "DELETE", path: `${orgPath}/automations/{automationId}` },
|
|
90305
|
+
operationId: "deleteCliAutomation",
|
|
90306
|
+
canonicalOperation: "cli.automation.delete",
|
|
90307
|
+
capability: "cli.automation.write"
|
|
90308
|
+
}),
|
|
90309
|
+
...direct(["automation enable", "automation disable"], {
|
|
90310
|
+
owner: "backend",
|
|
90311
|
+
authBoundary: "organization-oauth",
|
|
90312
|
+
quotaClass: "metadata",
|
|
90313
|
+
endpoint: { method: "PATCH", path: `${orgPath}/automations/{automationId}/status` },
|
|
90314
|
+
operationId: "updateCliAutomationStatus",
|
|
90315
|
+
canonicalOperation: "cli.automation.status.update",
|
|
90316
|
+
capability: "cli.automation.write"
|
|
90317
|
+
}),
|
|
90318
|
+
...direct(["admin usage credit"], {
|
|
90319
|
+
owner: "backend",
|
|
90320
|
+
authBoundary: "organization-oauth",
|
|
90321
|
+
quotaClass: "metadata",
|
|
90322
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/usage/credit` },
|
|
90323
|
+
operationId: "getCliCreditUsage",
|
|
90324
|
+
canonicalOperation: "cli.admin.usage.credit.read",
|
|
90325
|
+
capability: "cli.admin.usage.read"
|
|
90326
|
+
}),
|
|
90327
|
+
...direct(["admin usage top-users"], {
|
|
90328
|
+
owner: "backend",
|
|
90329
|
+
authBoundary: "organization-oauth",
|
|
90330
|
+
quotaClass: "metadata",
|
|
90331
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/usage/top-users` },
|
|
90332
|
+
operationId: "listCliTopUsers",
|
|
90333
|
+
canonicalOperation: "cli.admin.usage.top-users.read",
|
|
90334
|
+
capability: "cli.admin.usage.read"
|
|
90335
|
+
}),
|
|
90336
|
+
...direct(["admin usage daily-graph"], {
|
|
90337
|
+
owner: "backend",
|
|
90338
|
+
authBoundary: "organization-oauth",
|
|
90339
|
+
quotaClass: "metadata",
|
|
90340
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/usage/daily-graph` },
|
|
90341
|
+
operationId: "getCliDailyUsageGraph",
|
|
90342
|
+
canonicalOperation: "cli.admin.usage.daily-graph.read",
|
|
90343
|
+
capability: "cli.admin.usage.read"
|
|
90344
|
+
}),
|
|
90345
|
+
...direct(["admin usage daily-users"], {
|
|
90346
|
+
owner: "backend",
|
|
90347
|
+
authBoundary: "organization-oauth",
|
|
90348
|
+
quotaClass: "metadata",
|
|
90349
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/usage/daily-users` },
|
|
90350
|
+
operationId: "listCliDailyUsers",
|
|
90351
|
+
canonicalOperation: "cli.admin.usage.daily-users.read",
|
|
90352
|
+
capability: "cli.admin.usage.read"
|
|
90353
|
+
}),
|
|
90354
|
+
...direct(["admin usage mcp-top"], {
|
|
90355
|
+
owner: "backend",
|
|
90356
|
+
authBoundary: "organization-oauth",
|
|
90357
|
+
quotaClass: "metadata",
|
|
90358
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/usage/mcp-top` },
|
|
90359
|
+
operationId: "listCliTopMcpTools",
|
|
90360
|
+
canonicalOperation: "cli.admin.usage.mcp-top.read",
|
|
90361
|
+
capability: "cli.admin.usage.read"
|
|
90362
|
+
}),
|
|
90363
|
+
...direct(["admin audit list"], {
|
|
90364
|
+
owner: "backend",
|
|
90365
|
+
authBoundary: "organization-oauth",
|
|
90366
|
+
quotaClass: "metadata",
|
|
90367
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/audit` },
|
|
90368
|
+
operationId: "listCliAuditLogs",
|
|
90369
|
+
canonicalOperation: "cli.admin.audit.list",
|
|
90370
|
+
capability: "cli.admin.audit.read"
|
|
90371
|
+
}),
|
|
90372
|
+
...direct(["admin audit types"], {
|
|
90373
|
+
owner: "backend",
|
|
90374
|
+
authBoundary: "organization-oauth",
|
|
90375
|
+
quotaClass: "metadata",
|
|
90376
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/audit/types` },
|
|
90377
|
+
operationId: "listCliAuditEventTypes",
|
|
90378
|
+
canonicalOperation: "cli.admin.audit.types.list",
|
|
90379
|
+
capability: "cli.admin.audit.read"
|
|
90380
|
+
}),
|
|
90381
|
+
...direct(["admin preset list"], {
|
|
90382
|
+
owner: "backend",
|
|
90383
|
+
authBoundary: "organization-oauth",
|
|
90384
|
+
quotaClass: "metadata",
|
|
90385
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/presets` },
|
|
90386
|
+
operationId: "listCliPresets",
|
|
90387
|
+
canonicalOperation: "cli.admin.preset.list",
|
|
90388
|
+
capability: "cli.admin.preset.read"
|
|
90389
|
+
}),
|
|
90390
|
+
...direct(["admin preset get"], {
|
|
90391
|
+
owner: "backend",
|
|
90392
|
+
authBoundary: "organization-oauth",
|
|
90393
|
+
quotaClass: "metadata",
|
|
90394
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/presets/{presetId}` },
|
|
90395
|
+
operationId: "getCliPreset",
|
|
90396
|
+
canonicalOperation: "cli.admin.preset.get",
|
|
90397
|
+
capability: "cli.admin.preset.read"
|
|
90398
|
+
}),
|
|
90399
|
+
...direct(["admin preset create"], {
|
|
90400
|
+
owner: "backend",
|
|
90401
|
+
authBoundary: "organization-oauth",
|
|
90402
|
+
quotaClass: "metadata",
|
|
90403
|
+
endpoint: { method: "POST", path: `${orgPath}/admin/presets` },
|
|
90404
|
+
operationId: "createCliPreset",
|
|
90405
|
+
canonicalOperation: "cli.admin.preset.create",
|
|
90406
|
+
capability: "cli.admin.preset.write"
|
|
90407
|
+
}),
|
|
90408
|
+
...direct(["admin preset update"], {
|
|
90409
|
+
owner: "backend",
|
|
90410
|
+
authBoundary: "organization-oauth",
|
|
90411
|
+
quotaClass: "metadata",
|
|
90412
|
+
endpoint: { method: "PUT", path: `${orgPath}/admin/presets/{presetId}` },
|
|
90413
|
+
operationId: "updateCliPreset",
|
|
90414
|
+
canonicalOperation: "cli.admin.preset.update",
|
|
90415
|
+
capability: "cli.admin.preset.write"
|
|
90416
|
+
}),
|
|
90417
|
+
...direct(["admin preset rename"], {
|
|
90418
|
+
owner: "backend",
|
|
90419
|
+
authBoundary: "organization-oauth",
|
|
90420
|
+
quotaClass: "metadata",
|
|
90421
|
+
endpoint: { method: "PATCH", path: `${orgPath}/admin/presets/{presetId}` },
|
|
90422
|
+
operationId: "updateCliPresetName",
|
|
90423
|
+
canonicalOperation: "cli.admin.preset.rename",
|
|
90424
|
+
capability: "cli.admin.preset.write"
|
|
90425
|
+
}),
|
|
90426
|
+
...direct(["admin preset delete"], {
|
|
90427
|
+
owner: "backend",
|
|
90428
|
+
authBoundary: "organization-oauth",
|
|
90429
|
+
quotaClass: "metadata",
|
|
90430
|
+
endpoint: { method: "DELETE", path: `${orgPath}/admin/presets/{presetId}` },
|
|
90431
|
+
operationId: "deleteCliPreset",
|
|
90432
|
+
canonicalOperation: "cli.admin.preset.delete",
|
|
90433
|
+
capability: "cli.admin.preset.write"
|
|
90434
|
+
}),
|
|
90435
|
+
...direct(["admin preset set-default"], {
|
|
90436
|
+
owner: "backend",
|
|
90437
|
+
authBoundary: "organization-oauth",
|
|
90438
|
+
quotaClass: "metadata",
|
|
90439
|
+
endpoint: { method: "PUT", path: `${orgPath}/admin/presets/{presetId}/default` },
|
|
90440
|
+
operationId: "updateCliDefaultPreset",
|
|
90441
|
+
canonicalOperation: "cli.admin.preset.default.set",
|
|
90442
|
+
capability: "cli.admin.preset.write"
|
|
90443
|
+
}),
|
|
90444
|
+
...direct(["admin preset unset-default"], {
|
|
90445
|
+
owner: "backend",
|
|
90446
|
+
authBoundary: "organization-oauth",
|
|
90447
|
+
quotaClass: "metadata",
|
|
90448
|
+
endpoint: { method: "DELETE", path: `${orgPath}/admin/presets/{presetId}/default` },
|
|
90449
|
+
operationId: "deleteCliDefaultPreset",
|
|
90450
|
+
canonicalOperation: "cli.admin.preset.default.unset",
|
|
90451
|
+
capability: "cli.admin.preset.write"
|
|
90452
|
+
}),
|
|
90453
|
+
...direct(["admin tunnel status"], {
|
|
90454
|
+
owner: "backend",
|
|
90455
|
+
authBoundary: "organization-oauth",
|
|
90456
|
+
quotaClass: "metadata",
|
|
90457
|
+
endpoint: { method: "GET", path: `${orgPath}/admin/tunnel/status` },
|
|
90458
|
+
operationId: "getCliTunnelStatus",
|
|
90459
|
+
canonicalOperation: "cli.admin.tunnel.status.read",
|
|
90460
|
+
capability: "cli.admin.tunnel.read"
|
|
90461
|
+
}),
|
|
90462
|
+
...candidate(["agent chat"], "chat", "organization-oauth", [
|
|
90463
|
+
"streaming-performance",
|
|
90464
|
+
"execution-permit-lifetime",
|
|
90465
|
+
"disconnect-cancel-recovery"
|
|
90466
|
+
]),
|
|
90467
|
+
...candidate(["admin agent export"], "backend", "organization-oauth", [
|
|
90468
|
+
"bounded-download",
|
|
90469
|
+
"partial-file-cleanup",
|
|
90470
|
+
"authorization-audit"
|
|
90471
|
+
]),
|
|
90472
|
+
...candidate(["skill upload", "skill download", "admin skill upload", "admin skill download"], "backend", "organization-oauth", [
|
|
90473
|
+
"archive-size-mime-validation",
|
|
90474
|
+
"presigned-host-policy",
|
|
90475
|
+
"abort-complete-recovery"
|
|
90476
|
+
]),
|
|
90477
|
+
...candidate([
|
|
90478
|
+
"admin skill github inspect",
|
|
90479
|
+
"admin skill github import",
|
|
90480
|
+
"admin skill github sync"
|
|
90481
|
+
], "backend", "organization-oauth", [
|
|
90482
|
+
"external-timeout",
|
|
90483
|
+
"repository-size-limit",
|
|
90484
|
+
"duplicate-import-protection",
|
|
90485
|
+
"credential-redaction"
|
|
90486
|
+
]),
|
|
90487
|
+
...candidate([
|
|
90488
|
+
"admin skill github credentials set",
|
|
90489
|
+
"admin skill github credentials clear"
|
|
90490
|
+
], "backend", "organization-oauth", [
|
|
90491
|
+
"secret-redaction",
|
|
90492
|
+
"rotation-revoke-audit"
|
|
90493
|
+
]),
|
|
90494
|
+
...candidate(["drive upload", "drive download"], "backend", "organization-oauth", [
|
|
90495
|
+
"byte-timeout-bound",
|
|
90496
|
+
"presigned-host-policy",
|
|
90497
|
+
"storage-quota",
|
|
90498
|
+
"partial-file-cleanup"
|
|
90499
|
+
]),
|
|
90500
|
+
...candidate(["chat send"], "chat", "organization-oauth", [
|
|
90501
|
+
"conversation-idempotency",
|
|
90502
|
+
"paid-execution-deduplication",
|
|
90503
|
+
"timeout-cancel-recovery"
|
|
90504
|
+
]),
|
|
90505
|
+
...candidate(["integration test"], "backend", "organization-oauth", [
|
|
90506
|
+
"external-timeout",
|
|
90507
|
+
"credential-redaction"
|
|
90508
|
+
]),
|
|
90509
|
+
...candidate(["admin integration update", "admin integration delete"], "backend", "organization-oauth", [
|
|
90510
|
+
"typed-contract",
|
|
90511
|
+
"credential-redaction",
|
|
90512
|
+
"mutation-idempotency"
|
|
90513
|
+
]),
|
|
90514
|
+
...candidate(["automation run", "automation cancel", "automation webhook-regen"], "backend", "organization-oauth", [
|
|
90515
|
+
"operation-idempotency",
|
|
90516
|
+
"state-transition-validation",
|
|
90517
|
+
"execution-quota",
|
|
90518
|
+
"secret-rotation"
|
|
90519
|
+
]),
|
|
90520
|
+
...candidate(["admin preset regen-key", "admin preset regen-static-key"], "backend", "organization-oauth", [
|
|
90521
|
+
"key-redaction",
|
|
90522
|
+
"rotation-audit",
|
|
90523
|
+
"retry-rollback-safety"
|
|
90524
|
+
]),
|
|
90525
|
+
...candidate(["admin tunnel config", "admin tunnel token"], "backend", "organization-oauth", [
|
|
90526
|
+
"sensitive-output-policy",
|
|
90527
|
+
"token-ttl-redaction",
|
|
90528
|
+
"audit"
|
|
90529
|
+
]),
|
|
90530
|
+
{
|
|
90531
|
+
command: "model-exec image generate",
|
|
90532
|
+
tier: "DEFERRED",
|
|
90533
|
+
owner: "chat",
|
|
90534
|
+
authBoundary: "organization-oauth",
|
|
90535
|
+
quotaClass: "endpoint-guard",
|
|
90536
|
+
availability: "DEFERRED",
|
|
90537
|
+
capability: "cli.model.image.generate",
|
|
90538
|
+
requiredGates: ["async-job-lifecycle", "artifact-ttl", "my-drive-output", "cost-reservation"]
|
|
90539
|
+
},
|
|
90540
|
+
...fixedBoundary(["auth login", "auth refresh"], "STANDARD_OAUTH", "backend", "standard-oauth"),
|
|
90541
|
+
...fixedBoundary([
|
|
90542
|
+
"auth status",
|
|
90543
|
+
"auth logout",
|
|
90544
|
+
"config set",
|
|
90545
|
+
"config status",
|
|
90546
|
+
"org current"
|
|
90547
|
+
], "LOCAL_ONLY", "desktop", "local"),
|
|
90548
|
+
...fixedBoundary(["install", "run", "tunnel"], "EXISTING_NATIVE", "native", "native"),
|
|
90549
|
+
...fixedBoundary(["logs"], "INTERNAL_HIDDEN", "native", "hidden")
|
|
90550
|
+
];
|
|
90551
|
+
|
|
90552
|
+
const CUSTOMER_AVAILABILITIES = /* @__PURE__ */ new Set([
|
|
90553
|
+
"IMPLEMENTED",
|
|
90554
|
+
"AVAILABLE"
|
|
90555
|
+
]);
|
|
90556
|
+
const isCustomerAvailable = (entry) => CUSTOMER_AVAILABILITIES.has(entry.availability);
|
|
90557
|
+
const commandSegments = (command) => command.split(" ");
|
|
90558
|
+
const PROD_DISABLED_BUILT_INS = /* @__PURE__ */ new Set(["--completions", "--wizard"]);
|
|
90559
|
+
const isCommandPrefix = (entry, args) => {
|
|
90560
|
+
const segments = commandSegments(entry.command);
|
|
90561
|
+
return segments.length <= args.length && segments.every((segment, index) => args[index] === segment);
|
|
90562
|
+
};
|
|
90563
|
+
const commandPathBeforeOptions = (args) => args.slice(0, args.findIndex((arg) => arg.startsWith("-")) === -1 ? args.length : args.findIndex((arg) => arg.startsWith("-")));
|
|
90564
|
+
const formatUnavailableMessage = (command) => `Command "aipctl ${command}" is not available in this aipctl release. Run "aipctl --help" to see supported commands.`;
|
|
90565
|
+
const formatUnavailableOptionMessage = (option) => `Option "aipctl ${option}" is not available in this aipctl release. Run "aipctl --help" to see supported commands.`;
|
|
90566
|
+
const commandArgsForAvailability = (args) => {
|
|
90567
|
+
const commandArgs = [];
|
|
90568
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
90569
|
+
const arg = args[index];
|
|
90570
|
+
if (arg === "--log-level") {
|
|
90571
|
+
index += 1;
|
|
90572
|
+
continue;
|
|
90573
|
+
}
|
|
90574
|
+
commandArgs.push(arg);
|
|
90575
|
+
}
|
|
90576
|
+
return commandArgs;
|
|
90577
|
+
};
|
|
90578
|
+
const getUnavailableCommandMessage = (args, buildEnv) => {
|
|
90579
|
+
if (buildEnv !== "prod" || args.length === 0) {
|
|
90580
|
+
return null;
|
|
90581
|
+
}
|
|
90582
|
+
const disabledBuiltIn = args.find((arg) => PROD_DISABLED_BUILT_INS.has(arg));
|
|
90583
|
+
if (disabledBuiltIn) {
|
|
90584
|
+
return formatUnavailableOptionMessage(disabledBuiltIn);
|
|
90585
|
+
}
|
|
90586
|
+
const commandArgs = commandArgsForAvailability(args);
|
|
90587
|
+
const entry = commandManifest.filter((candidate) => isCommandPrefix(candidate, commandArgs)).sort((left, right) => commandSegments(right.command).length - commandSegments(left.command).length).at(0);
|
|
90588
|
+
if (entry) {
|
|
90589
|
+
return isCustomerAvailable(entry) ? null : formatUnavailableMessage(entry.command);
|
|
90590
|
+
}
|
|
90591
|
+
const path = commandPathBeforeOptions(commandArgs).join(" ");
|
|
90592
|
+
if (!path) {
|
|
90593
|
+
return null;
|
|
90594
|
+
}
|
|
90595
|
+
const descendants = commandManifest.filter(({ command }) => command.startsWith(`${path} `));
|
|
90596
|
+
if (descendants.length > 0 && descendants.every((candidate) => !isCustomerAvailable(candidate))) {
|
|
90597
|
+
return formatUnavailableMessage(path);
|
|
90598
|
+
}
|
|
90599
|
+
return null;
|
|
90600
|
+
};
|
|
90601
|
+
|
|
89806
90602
|
const NOT_LOGGED_IN_MESSAGE = 'Not logged in. Please run "aipctl auth login" first.';
|
|
89807
90603
|
const SESSION_EXPIRED_MESSAGE = 'Session expired. Run "aipctl auth login" to continue.';
|
|
89808
90604
|
|
|
@@ -94122,11 +94918,11 @@ const ApiServiceLive = effect$1(
|
|
|
94122
94918
|
return {
|
|
94123
94919
|
listOrganizations: () => gen(function* () {
|
|
94124
94920
|
const token = yield* getAccessToken();
|
|
94125
|
-
return yield* makeRequest(baseUrl, "/api/
|
|
94921
|
+
return yield* makeRequest(baseUrl, "/api/cli/v1/organizations", token);
|
|
94126
94922
|
}),
|
|
94127
94923
|
getOrganization: (slug) => gen(function* () {
|
|
94128
94924
|
const token = yield* getAccessToken();
|
|
94129
|
-
const orgs = yield* makeRequest(baseUrl, "/api/
|
|
94925
|
+
const orgs = yield* makeRequest(baseUrl, "/api/cli/v1/organizations", token);
|
|
94130
94926
|
const org = orgs.find((o) => o.slug === slug);
|
|
94131
94927
|
if (!org) {
|
|
94132
94928
|
return yield* fail$3(
|
|
@@ -94465,7 +95261,7 @@ const ApiServiceLive = effect$1(
|
|
|
94465
95261
|
// Phase 4: Monitoring
|
|
94466
95262
|
listOrgMembers: (orgSlug) => gen(function* () {
|
|
94467
95263
|
const token = yield* getAccessToken();
|
|
94468
|
-
const path = `/api/
|
|
95264
|
+
const path = `/api/cli/v1/organizations/${encodeURIComponent(orgSlug)}/members`;
|
|
94469
95265
|
const raw = yield* makeRequest(baseUrl, path, token);
|
|
94470
95266
|
return {
|
|
94471
95267
|
members: raw.members.map((member) => ({
|
|
@@ -94481,22 +95277,22 @@ const ApiServiceLive = effect$1(
|
|
|
94481
95277
|
yield* requireChatBaseUrlEffect();
|
|
94482
95278
|
const token = yield* getAccessToken();
|
|
94483
95279
|
const path = `/api/${encodeURIComponent(orgSlug)}/models`;
|
|
94484
|
-
const
|
|
94485
|
-
return
|
|
95280
|
+
const response = yield* makeRequest(chatBaseUrl, path, token);
|
|
95281
|
+
return response.models.map((id) => ({
|
|
94486
95282
|
id,
|
|
94487
|
-
...
|
|
95283
|
+
...response.defaultModel === id ? { isDefault: true } : {}
|
|
94488
95284
|
}));
|
|
94489
95285
|
}),
|
|
94490
95286
|
listModelExecModels: (orgSlug) => gen(function* () {
|
|
94491
95287
|
yield* requireChatBaseUrlEffect();
|
|
94492
95288
|
const token = yield* getAccessToken();
|
|
94493
|
-
const path = `/api/${encodeURIComponent(orgSlug)}/
|
|
95289
|
+
const path = `/api/cli/v1/organizations/${encodeURIComponent(orgSlug)}/model-exec/models`;
|
|
94494
95290
|
return yield* makeRequest(chatBaseUrl, path, token);
|
|
94495
95291
|
}),
|
|
94496
95292
|
executeModelExecChat: (orgSlug, body) => gen(function* () {
|
|
94497
95293
|
yield* requireChatBaseUrlEffect();
|
|
94498
95294
|
const token = yield* getAccessToken();
|
|
94499
|
-
const path = `/api/${encodeURIComponent(orgSlug)}/
|
|
95295
|
+
const path = `/api/cli/v1/organizations/${encodeURIComponent(orgSlug)}/model-exec/chat`;
|
|
94500
95296
|
return yield* makeRequest(chatBaseUrl, path, token, {
|
|
94501
95297
|
method: "POST",
|
|
94502
95298
|
body
|
|
@@ -94637,7 +95433,7 @@ const ApiServiceLive = effect$1(
|
|
|
94637
95433
|
// Phase 6: Auth enhancements
|
|
94638
95434
|
getMe: () => gen(function* () {
|
|
94639
95435
|
const token = yield* getAccessToken();
|
|
94640
|
-
return yield* makeRequest(baseUrl, "/api/
|
|
95436
|
+
return yield* makeRequest(baseUrl, "/api/cli/v1/me", token);
|
|
94641
95437
|
}),
|
|
94642
95438
|
refreshToken: () => refreshAccessToken({ force: true }),
|
|
94643
95439
|
// Phase 7: Chat (read-only)
|
|
@@ -94818,12 +95614,12 @@ const ApiServiceLive = effect$1(
|
|
|
94818
95614
|
// Org capabilities & user settings
|
|
94819
95615
|
getOrgCapabilities: (orgSlug) => gen(function* () {
|
|
94820
95616
|
const token = yield* getAccessToken();
|
|
94821
|
-
const path = `/api/
|
|
95617
|
+
const path = `/api/cli/v1/organizations/${encodeURIComponent(orgSlug)}/capabilities`;
|
|
94822
95618
|
return yield* makeRequest(baseUrl, path, token);
|
|
94823
95619
|
}),
|
|
94824
95620
|
getUserSettings: () => gen(function* () {
|
|
94825
95621
|
const token = yield* getAccessToken();
|
|
94826
|
-
return yield* makeRequest(baseUrl, "/api/
|
|
95622
|
+
return yield* makeRequest(baseUrl, "/api/cli/v1/me/settings", token);
|
|
94827
95623
|
}),
|
|
94828
95624
|
// Tunnel management
|
|
94829
95625
|
getTunnelStatus: (orgSlug) => gen(function* () {
|
|
@@ -99713,9 +100509,11 @@ const generateCommand = make$4(
|
|
|
99713
100509
|
"Generate an image once and save the first output artifact (5-minute timeout)"
|
|
99714
100510
|
)
|
|
99715
100511
|
);
|
|
100512
|
+
const imageCommandDescription = "Run image-generation model-exec commands";
|
|
100513
|
+
const imageSubcommands = [generateCommand];
|
|
99716
100514
|
const imageCommand = make$4("image", {}).pipe(
|
|
99717
|
-
withDescription(
|
|
99718
|
-
withSubcommands(
|
|
100515
|
+
withDescription(imageCommandDescription),
|
|
100516
|
+
withSubcommands(imageSubcommands)
|
|
99719
100517
|
);
|
|
99720
100518
|
const resolveImageRequest = (model, prompt, input) => gen(function* () {
|
|
99721
100519
|
if (isSome(input)) {
|
|
@@ -100567,6 +101365,8 @@ const HELP_GROUPS = [
|
|
|
100567
101365
|
{ path: ["drive"], description: driveCommandDescription, subcommands: driveSubcommands },
|
|
100568
101366
|
{ path: ["integration"], description: integrationCommandDescription, subcommands: integrationSubcommands },
|
|
100569
101367
|
{ path: ["model"], description: modelCommandDescription, subcommands: modelSubcommands },
|
|
101368
|
+
{ path: ["model-exec"], description: modelExecCommandDescription, subcommands: modelExecSubcommands },
|
|
101369
|
+
{ path: ["model-exec", "image"], description: imageCommandDescription, subcommands: imageSubcommands },
|
|
100570
101370
|
{ path: ["org"], description: orgCommandDescription, subcommands: orgSubcommands },
|
|
100571
101371
|
{ path: ["skill"], description: skillCommandDescription, subcommands: skillSubcommands },
|
|
100572
101372
|
{ path: ["admin", "org"], description: adminOrgCommandDescription, subcommands: adminOrgSubcommands },
|
|
@@ -100593,7 +101393,13 @@ const getCommandName = (command) => {
|
|
|
100593
101393
|
}
|
|
100594
101394
|
return name;
|
|
100595
101395
|
};
|
|
100596
|
-
const
|
|
101396
|
+
const hasCustomerAvailableCommand = (path) => {
|
|
101397
|
+
const commandPath = path.join(" ");
|
|
101398
|
+
return commandManifest.some(
|
|
101399
|
+
(entry) => isCustomerAvailable(entry) && (entry.command === commandPath || entry.command.startsWith(`${commandPath} `))
|
|
101400
|
+
);
|
|
101401
|
+
};
|
|
101402
|
+
const formatCommandList = (path, subcommands, options) => subcommands.map((command) => [...path, getCommandName(command)]).filter((commandPath) => !options.customerOnly || hasCustomerAvailableCommand(commandPath)).map((commandPath) => ` - ${formatCanonicalPath(commandPath)}`).join("\n");
|
|
100597
101403
|
const getHelpPath = (args) => {
|
|
100598
101404
|
const lastArg = args.at(-1);
|
|
100599
101405
|
if (!lastArg || !HELP_FLAGS$1.has(lastArg)) {
|
|
@@ -100602,7 +101408,7 @@ const getHelpPath = (args) => {
|
|
|
100602
101408
|
const path = args.slice(0, -1);
|
|
100603
101409
|
return path.every((segment) => !segment.startsWith("-")) ? path : null;
|
|
100604
101410
|
};
|
|
100605
|
-
const renderGroupHelp = ({ path, description, subcommands }) => {
|
|
101411
|
+
const renderGroupHelp = ({ path, description, subcommands }, options) => {
|
|
100606
101412
|
const canonicalPath = formatCanonicalPath(path);
|
|
100607
101413
|
const usageTarget = path.length === 0 ? "$ aipctl <command>" : `$ ${canonicalPath} <command>`;
|
|
100608
101414
|
return [
|
|
@@ -100618,7 +101424,7 @@ const renderGroupHelp = ({ path, description, subcommands }) => {
|
|
|
100618
101424
|
"",
|
|
100619
101425
|
"COMMANDS",
|
|
100620
101426
|
"",
|
|
100621
|
-
formatCommandList(path, subcommands),
|
|
101427
|
+
formatCommandList(path, subcommands, options),
|
|
100622
101428
|
"",
|
|
100623
101429
|
"OPTIONS",
|
|
100624
101430
|
"",
|
|
@@ -100628,13 +101434,13 @@ const renderGroupHelp = ({ path, description, subcommands }) => {
|
|
|
100628
101434
|
""
|
|
100629
101435
|
].join("\n");
|
|
100630
101436
|
};
|
|
100631
|
-
const renderPublicHelpForArgs = (args) => {
|
|
101437
|
+
const renderPublicHelpForArgs = (args, options = {}) => {
|
|
100632
101438
|
const helpPath = getHelpPath(args);
|
|
100633
101439
|
if (!helpPath) {
|
|
100634
101440
|
return null;
|
|
100635
101441
|
}
|
|
100636
101442
|
const group = HELP_GROUPS.find(({ path }) => isSamePath(path, helpPath));
|
|
100637
|
-
return group ? renderGroupHelp(group) : null;
|
|
101443
|
+
return group ? renderGroupHelp(group, options) : null;
|
|
100638
101444
|
};
|
|
100639
101445
|
|
|
100640
101446
|
const HELP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h"]);
|
|
@@ -100665,7 +101471,13 @@ const runNativeHelpIfRequested = (args, options = {}) => {
|
|
|
100665
101471
|
};
|
|
100666
101472
|
|
|
100667
101473
|
const args = process.argv.slice(2);
|
|
100668
|
-
const
|
|
101474
|
+
const unavailableMessage = getUnavailableCommandMessage(args, BUILD_ENV);
|
|
101475
|
+
if (unavailableMessage) {
|
|
101476
|
+
process.stderr.write(`${unavailableMessage}
|
|
101477
|
+
`);
|
|
101478
|
+
process.exit(2);
|
|
101479
|
+
}
|
|
101480
|
+
const helpOutput = renderPublicHelpForArgs(args, { customerOnly: BUILD_ENV === "prod" });
|
|
100669
101481
|
if (helpOutput) {
|
|
100670
101482
|
process.stdout.write(`${helpOutput}
|
|
100671
101483
|
`);
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
39
39
|
| AUTH-01 | auth | `aipctl auth login` | `src/core/oauth.ts`: `discoverOAuthMetadata` → `registerCliOAuthClient` → `exchangeAuthorizationCode` | api + external browser | `GET /.well-known` → `POST /oauth2/register` → browser `GET /oauth2/authorize` → `POST /oauth2/token` | `/.well-known/oauth-authorization-server`, `/oauth2/register`, `/oauth2/authorize`, `/oauth2/token` | PKCE state/challenge, dynamic client registration body, auth code exchange form | `OAuthMetadata`, `OAuthClientRegistration`, `OAuthTokenResponse` → local `Credentials` | not found in current `resource/oas` for `oauth-authorization-server` / `/oauth2/register` / `/oauth2/token` | none | `oas-missing` | N/A | `legacy-exception` | owner=`backend/api OAuth server`; rationale=`login is required public auth flow but OAuth authorization-server/DCR/token contract is not in current OAS`; removal condition=`official OAuth server contract exists in resource/oas and independent generated contract`; incorporation plan=`add OAuth server metadata/register/token paths or dedicated auth contract fixture, then bind CLI parser/tests` | `AIP-PUB-05` | existing auth tests cover login helpers; needed contract snapshot for OAuth metadata/register/token paths |
|
|
40
40
|
| AUTH-02 | auth | `aipctl auth refresh` | `ApiService.refreshToken` → `refreshAccessToken` → `src/core/oauth.ts#refreshOAuthToken` | api | `POST` | `/oauth2/token` | refresh token form body | refreshed local `Credentials` | not found in current `resource/oas` for `/oauth2/token` | none | `oas-missing` | N/A | `legacy-exception` | owner=`backend/api OAuth server`; rationale=`token refresh is required for session continuity but token endpoint is outside current OAS`; removal condition=`official OAuth token contract exists in resource/oas and independent generated contract`; incorporation plan=`same OAuth server contract as AUTH-01, plus refresh fixture` | `AIP-PUB-05` | existing `src/core/oauth.test.ts`, `src/core/api.test.ts`; needed token refresh path snapshot |
|
|
41
|
-
| AUTH-03 | auth | `aipctl auth whoami` | `ApiService.getMe` | api | `GET` | `/api/
|
|
42
|
-
| ORG-01 | org | `aipctl org list`, `aipctl org use` | `listOrganizations`, `getOrganization` | api | `GET` | `/api/
|
|
43
|
-
| ORG-02 | org | `aipctl org capabilities`, `aipctl org settings`, `aipctl org exit` | `getOrgCapabilities`, `getUserSettings`, `exitOrg` | api | `GET`, `GET`, `POST` | `/api/
|
|
44
|
-
| P0-ORG-01 | org-member | `aipctl org members`; `aipctl admin org invite`, `aipctl admin org remove-member`, `aipctl admin org update-member-role` | `listOrgMembers`, `inviteOrgMembers`, `removeOrgMembers`, `updateOrgMemberRoles` | api | `GET`, `POST`, `DELETE`, `PUT` | `/api/
|
|
41
|
+
| AUTH-03 | auth | `aipctl auth whoami` | `ApiService.getMe` | api | `GET` | `/api/cli/v1/me` | none | local `UserProfile` | `resource/oas/modules/backend/cli/openapi.yaml` | `backend/api/.../cli/generated/api/CliV1Api.kt#getCliMe` | `generated-ready` | N/A | `migrate` | none | N/A | `src/core/api.test.ts` verifies the dedicated path and bearer request; `commands/auth/auth.test.ts` covers command behavior |
|
|
42
|
+
| ORG-01 | org | `aipctl org list`, `aipctl org use`, `aipctl org select` | `listOrganizations`, `getOrganization` | api | `GET` | `/api/cli/v1/organizations`; `use/select` resolve locally from the returned list | none | local `Organization[]` / `Organization` | `resource/oas/modules/backend/cli/openapi.yaml` | `backend/api/.../cli/generated/api/CliV1Api.kt#listCliOrganizations` | `generated-ready` | N/A | `migrate` | none | N/A | `src/core/api.test.ts`, `commands/org/org.test.ts`; covers dedicated path, local slug selection, default/IP-blocked fields |
|
|
43
|
+
| ORG-02 | org | `aipctl org capabilities`, `aipctl org settings`, `aipctl org exit` | `getOrgCapabilities`, `getUserSettings`, `exitOrg` | api | `GET`, `GET`, `POST` | organization v1 `/api/cli/v1/organizations/{organizationSlug}/capabilities`; user-global v1 `/api/cli/v1/me/settings`; legacy `/api/web/organizations/slug/{organizationSlug}/exit` | none | local `OrgCapabilities`, `UserSettings`, `void` | read paths: `resource/oas/modules/backend/cli/openapi.yaml`; exit: `resource/oas/duplo-web.yaml` | read generated `CliOrganizationApi`/`CliV1Api`; exit legacy generated | `legacy-generated` | N/A | `migrate` | owner=`backend`; rationale=`capabilities is organization-owned, settings remains user-global, and exit remains a Wave B mutation`; removal condition=`exit receives its dedicated v1 mutation contract`; incorporation plan=`preserve current membership authorization and non-replay behavior` | task 3.3 | `src/core/api.test.ts` verifies v1 read paths and settings ownership; org tests cover response/error behavior |
|
|
44
|
+
| P0-ORG-01 | org-member | `aipctl org members`; `aipctl admin org invite`, `aipctl admin org remove-member`, `aipctl admin org update-member-role` | `listOrgMembers`, `inviteOrgMembers`, `removeOrgMembers`, `updateOrgMemberRoles` | api | `GET`, `POST`, `DELETE`, `PUT` | list v1 `/api/cli/v1/organizations/{organizationSlug}/members`; mutations remain legacy `/invite`; `/members` | list uses stable CLI member response; mutation bodies preserve `{ emails, role }` and `{ members, role? }` | local `ListMembersResponse`, `InviteOrgMembersResponse`, `void` | list: `resource/oas/modules/backend/cli/openapi.yaml`; mutation: `resource/oas/duplo-web.yaml` | list generated `CliOrganizationApi`; mutation legacy generated | `legacy-generated` | `P0` | `legacy-exception` | owner=`backend`; rationale=`member read is migrated while admin mutations remain Wave B`; removal condition=`invite/remove/role receive dedicated v1 contracts`; incorporation plan=`reuse current admin authorization, audit, stale target validation, and non-replay semantics` | task 3.3 | `src/core/api.test.ts`, `commands/org/members.test.ts`, `commands/org/org-member.test.ts`; covers v1 member read and legacy mutation bodies |
|
|
45
45
|
| P0-ORG-02 | org-admin | hidden from public beta (`aipctl admin org invite-link`, `gen-invite-link`, `revoke-invite-link` removed from command tree) | removed from public surface | api | `GET`, `POST`, `DELETE` | previously `/api/web/organizations/slug/{organizationSlug}/invite/link` | none | hidden | latest: `resource/oas/modules/backend/organization/openapi.yaml` (`/invite/link/v2`); legacy: `resource/oas/duplo-web.yaml` (`/invite/link`) | latest `frontend/packages/api/src/out/modules/organization-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/invite/link/v2"]`; legacy `frontend/packages/api/src/out/user-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/invite/link"]` | `oas-source-only` | `P0` | `hide` | owner=`backend organization module`; rationale=`v2 exists but current CLI UX contract for GET/DELETE parity is not approved for public beta`; removal condition=`public beta continues hiding until a reviewed v2 CLI UX contract exists`; incorporation plan=`reintroduce only after independent organization contract/build and public UX review` | N/A | updated admin org help smoke + command-tree regression to ensure trio is absent |
|
|
46
46
|
| SKILL-01 | skill | `aipctl skill list`, `aipctl skill get`, `aipctl skill delete` | `listSkills`, `getSkill`, `deleteSkill` | api | `GET`, `GET`, `DELETE` | `/api/web/organizations/slug/{organizationSlug}/skills`; `/skills/{skillId}` | query `{ count,cursor,search }`; detail query `{ maxFiles }` | local `ListSkillsResponse`, `SkillDetail`, `void` | `resource/oas/modules/backend/organization/skills/openapi.yaml` | `frontend/packages/api/src/out/modules/organization-skills-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/skills"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/skills/{skillId}"]` | `generated-ready` | N/A | `keep` | none | N/A | existing `commands/skill/*.test.ts`; needed path/type snapshot once independent generation exists |
|
|
47
47
|
| SKILL-02 | skill | `aipctl skill upload` | `createUploadUrl` → `uploadToS3` → `completeUpload` (`abortUpload` on failure) | api + external | `POST` → `PUT` → `POST` | `/skills/upload-url`; external presigned `uploadUrl`; `/skills/{skillId}/complete` | local upload request `{ filename,fileSize,mimeType }`, file buffer, complete body `{ overwrite }` | `CreateSkillUploadUrlResponse`, external `void`, `CompleteSkillUploadResponse` | `resource/oas/modules/backend/organization/skills/openapi.yaml` | `frontend/packages/api/src/out/modules/organization-skills-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/skills/upload-url"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/skills/{skillId}/complete"]` | `external-presigned` | N/A | `keep` | none | N/A | existing skill upload tests; needed presigned URL + complete path snapshot |
|
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
| P0-DRIVE-01 | drive | `aipctl drive list`, `download`, `delete`, `mkdir`, `rename`, `usage` | `listDriveEntries`, `getDriveDownloadUrl`, `deleteDriveEntries`, `createDriveFolder`, `renameDriveEntry`, `getDriveUsage`, `downloadFromUrl` | api + external | `GET`, `POST`, `POST`, `POST`, `PATCH`, `GET`, external `GET` | `/drive/entries?count=200`; `/drive/entries/download-url`; `/drive/entries/delete`; `/drive/entries/{entryId}`; `/drive/usage` | official list `{ path, hasNext, nextCursor, items }`; delete body `{ entryIds[] }`; rename body `{ newName }`; download body `{ entryIds: [id] }` | official drive list/download DTOs + external file buffer | `resource/oas/modules/backend/organization/storage/openapi.yaml` | `frontend/packages/api/src/out/modules/organization-storage-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries/download-url"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries/{entryId}"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries/delete"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/drive/usage"]` | `generated-ready` | `P0` | `migrate` | none | `AIP-PUB-05` | updated `src/core/api.test.ts`, `commands/drive/drive.test.ts`; covers paged list shape, batch download-url request, DTO field rename (`sizeBytes`, `modifiedAt`) |
|
|
58
58
|
| P0-DRIVE-02 | drive | `aipctl drive upload` | `createDriveUploadUrl` → `uploadToS3` → `completeDriveUpload` | api + external | `POST` → `PUT` → `POST` | `/drive/entries/upload-url`; external presigned `uploadUrl`; `/drive/entries/{entryId}/complete` | official upload request `{ parentId: null, filename, fileSize, mimeType }` | official `CreateDriveUploadUrlResponse { id, filename, uploadUrl, headers }` then `void` | `resource/oas/modules/backend/organization/storage/openapi.yaml` | `frontend/packages/api/src/out/modules/organization-storage-types.ts#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries/upload-url"]`, `#paths["/api/web/organizations/slug/{organizationSlug}/drive/entries/{entryId}/complete"]` | `generated-ready` | `P0` | `migrate` | none | `AIP-PUB-05` | updated `src/core/api.test.ts`, `commands/drive/drive.test.ts`; covers `parentId: null` request and response `id`/`filename` usage |
|
|
59
59
|
| P1-INT-01 | integration | `aipctl integration list`, `test`; `aipctl admin integration get`, `update`, `delete`, `tools`, `available` | `listIntegrations`, `testIntegration`, `getIntegration`, `updateIntegration`, `deleteIntegration`, `listIntegrationTools`, `listConfigurableIntegrations` | api | `GET`, `POST`, `GET`, `PUT`, `DELETE`, `GET`, `GET` | `/api/web/integrations/v2`; `/api/web/integration/{integrationId}/test`; `/api/web/admin/organizations/slug/{organizationSlug}/integrations/{integrationId}`; `/{integrationId}/tools`; `/configurable-integrations` | top-level list/test and admin detail/available now follow current/legacy OAS path+body+DTO where available; admin update/delete still accept untyped legacy mutation body/path until admin mutation contract lands | local `Integration`, `IntegrationDetail`, `IntegrationToolsResponse`, `ConfigurableIntegration[]` | legacy admin paths: `resource/oas/duplo-web.yaml`; partial modern source: `resource/oas/modules/backend/integration/openapi.yaml` (does not cover these admin list/CRUD/tools paths) | legacy `frontend/packages/api/src/out/user-types.ts#paths["/api/web/admin/organizations/slug/{organizationSlug}/integrations"]`, `#paths["/api/web/admin/organizations/slug/{organizationSlug}/configurable-integrations"]`; partial current `frontend/packages/api/src/out/modules/integration-types.ts` lacks these admin list/CRUD/tools paths | `legacy-generated` | `P1` | `legacy-exception` | owner=`backend app Integrations / duplo-web legacy OAS`; rationale=`public beta keeps integration list/test/admin detail/tools/available, but admin update/delete still lack an approved current contract outside legacy duplo-web`; removal condition=`independent contract covers user list/test plus admin CRUD/tools/available`; incorporation plan=`extend integration module or independent contract for list/test/admin CRUD/tools/available, then retire legacy path/body mappings and delete/update exception` | N/A | updated `src/core/api.test.ts`, `commands/integration/integration.test.ts`; covers v2 list query, test body `{ organizationSlug }`, admin detail/tools DTO fields, configurable wrapper unwrap, and pinned update/delete legacy paths |
|
|
60
|
-
| P0-MODEL-01 | model | `aipctl model list` | `listModels` | chat | `GET` | `/api/{orgSlug}/models` | none |
|
|
61
|
-
| P1-MODEL-EXEC-01 | model-exec | `aipctl model-exec models`, `get`, `sample`, `chat
|
|
60
|
+
| P0-MODEL-01 | model | `aipctl model list` | `listModels` | chat | `GET` | legacy `/api/{orgSlug}/models`; target `/api/cli/v1/organizations/{orgSlug}/models` | none | legacy `{ models: string[], defaultModel? }` is mapped into `Model[]` and preserves active standard, custom/BYOK, and `etc` catalog IDs | legacy source: `resource/oas/chat.yaml`; target CLI source not implemented | `frontend/packages/api/src/out/chat-types.ts#paths["/api/{orgSlug}/models"]` | `legacy-generated` | `P0` | `keep legacy until parity` | owner=`Chat ModelV1Controller/ModelInternalService`; rationale=`the current model-exec v1 catalog is backed by SharedModel and omits active custom/BYOK and etc models`; removal condition=`the dedicated CLI model catalog preserves legacy visible-model and default semantics with authorization and regression tests`; incorporation plan=`implement GET /api/cli/v1/organizations/{orgSlug}/models from the existing model domain, then mark model list IMPLEMENTED and retire the legacy path` | `AIP-PUB-05` | `src/core/api.test.ts` verifies the legacy path and preserves custom/BYOK and etc IDs; availability tests keep dev/local usable and prod disabled until parity |
|
|
61
|
+
| P1-MODEL-EXEC-01 | model-exec | `aipctl model-exec models`, `get`, `sample`, `chat` | `listModelExecModels`, `executeModelExecChat` | chat | `GET`, `POST` | `/api/cli/v1/organizations/{orgSlug}/model-exec/models`; `/chat` | local `ModelExecChatRequest`; Chat Zod/Swagger DTO source `chat/packages/chat/src/modules/cli-model-exec/interface/dto/cli-model-exec.dto.ts` | local `ModelExecModelCatalog`, `ModelExecChatResponse` | code-first OAS: `chat/packages/chat/src/modules/cli-model-exec/interface/cli-model-exec-v1.interface.controller.ts` | runtime Swagger contract | `oas-source-only` | `P1` | `migrate` | none | `AIP-PUB-05` | `src/core/api.test.ts` verifies both v1 paths; Chat controller contract test verifies operation IDs, request/response schemas, delegation to the existing service, and absence of a v1 image route |
|
|
62
|
+
| P1-MODEL-EXEC-02 | model-exec-image | `aipctl model-exec image generate` | `executeModelExecImageGeneration`; output uses `downloadFromUrl` | chat + external artifact URL | `POST`, external `GET` | legacy `/api/{orgSlug}/cli/model-exec/images/generations`; response `downloadUrl` | local `ModelExecImageGenerationRequest`; Chat DTO source `chat/packages/chat/src/modules/cli-model-exec/interface/dto/cli-model-exec.dto.ts` | local `ModelExecImageGenerationResponse`; image bytes from external URL | no GA OAS; legacy controller only | none | `oas-missing` | deferred | `hide` | owner=`chat CLI Model Exec API`; rationale=`synchronous image execution, external artifact lifetime, and cost recovery require the deferred async design`; removal condition=`image job/artifact/TTL/My Drive/cost gates pass`; incorporation plan=`publish a separate v1 image job contract only after the deferred design is implemented` | follow-up image hardening | existing image request/path test remains on the legacy route; customer capability must stay disabled |
|
|
62
63
|
| USAGE-01 | usage | `aipctl admin usage credit`, `top-users`, `daily-graph`, `daily-users`, `mcp-top` | `getCreditStatistics`, `getCreditTopUsers`, `getCreditDailyGraph`, `getCreditDailyUsers`, `getMcpTopTools` | api | `GET` | `/api/web/admin/organizations/slug/{organizationSlug}/usage/...` | query `{ startDt,endDt,limit,pageNumber,pageSize,userId }` | local usage DTOs, `DailyUsageDetailsResponse.pagination { page,pageSize,total }` | `resource/oas/modules/backend/usage/openapi.yaml` | `frontend/packages/api/src/out/modules/usage-types.ts#paths[...]` | `generated-ready` | N/A | `keep` | none | N/A | existing `commands/usage/usage.test.ts`; needed generated path snapshots |
|
|
63
64
|
| AUDIT-01 | audit | `aipctl admin audit list`, `types` | `listAuditLogs`, `listAuditEventTypes` | api | `GET` | `/api/web/audit/organization/slug/{organizationSlug}`; `/api/web/audit/event/types` | query `{ eventType,page,pageSize }` | local `ListAuditResponse`, `AuditEventType[]` | `resource/oas/modules/backend/audit/openapi.yaml` | `frontend/packages/api/src/out/modules/backend-audit-types.ts#paths[...]` | `generated-ready` | N/A | `keep` | none | N/A | existing `commands/audit/audit.test.ts`; needed generated path snapshots |
|
|
64
65
|
| TUNNEL-01 | tunnel | `aipctl admin tunnel status`, `config`, `token` | `getTunnelStatus`, `getTunnelConfig`, `createTunnelToken` | api | `GET`, `GET`, `POST` | `/api/web/edge-tunnel/v2/organizations/slug/{organizationSlug}/status`; `/config`; `/token` | none | local `TunnelStatus`, `TunnelConfig`, `void` | `resource/oas/modules/backend/tunnel/openapi.yaml` | `frontend/packages/api/src/out/modules/tunnel-types.ts#paths[...]` | `generated-ready` | N/A | `keep` | none | N/A | existing `commands/tunnel/tunnel.test.ts`; needed v2 path snapshot |
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
- `P1-PRESET-01` preset admin namespace/docs + legacy path tests done
|
|
84
85
|
- `P1-SKILL-01` skill JSON/help/docs field sync done
|
|
85
86
|
- `P1-CHAT-01` chat SSE fixture tests added for final/fallback/error cases
|
|
86
|
-
- `P1-MODEL-EXEC-01`
|
|
87
|
+
- `P1-MODEL-EXEC-01` catalog/text moved to the dedicated v1 code-first OAS and CLI path; `P1-MODEL-EXEC-02` image remains deferred on the legacy route
|
|
87
88
|
|
|
88
89
|
## Manual notes
|
|
89
90
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aipctl",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
4
4
|
"description": "QueryPie AIP and MCP CLI tool",
|
|
5
5
|
"author": "QueryPie",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"node": ">=24.18.0"
|
|
23
23
|
},
|
|
24
24
|
"metadata": {
|
|
25
|
-
"contentHash": "
|
|
26
|
-
"wrapperHash": "
|
|
27
|
-
"nativeHash": "
|
|
25
|
+
"contentHash": "324de7cea8dc3fde3a838c4aadd5029fb56b526a8139e7be35b08a3e7de824e4",
|
|
26
|
+
"wrapperHash": "bc687edf26af6780466e1818b26030068995fd234be8ebd80e960121df783158",
|
|
27
|
+
"nativeHash": "006b08c3e391f4571d9b7c0f12d684fe2448106259e7e0581b10f9be362452e9"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"aipctl-darwin-x64": "2026.9.
|
|
31
|
-
"aipctl-darwin-arm64": "2026.9.
|
|
32
|
-
"aipctl-linux-x64": "2026.9.
|
|
33
|
-
"aipctl-linux-arm64": "2026.9.
|
|
34
|
-
"aipctl-windows-x64": "2026.9.
|
|
35
|
-
"aipctl-windows-arm64": "2026.9.
|
|
30
|
+
"aipctl-darwin-x64": "2026.9.1",
|
|
31
|
+
"aipctl-darwin-arm64": "2026.9.1",
|
|
32
|
+
"aipctl-linux-x64": "2026.9.1",
|
|
33
|
+
"aipctl-linux-arm64": "2026.9.1",
|
|
34
|
+
"aipctl-windows-x64": "2026.9.1",
|
|
35
|
+
"aipctl-windows-arm64": "2026.9.1"
|
|
36
36
|
}
|
|
37
37
|
}
|