@genspark/cli 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/commands/aidrive-contract.generated.d.ts +3 -0
- package/dist/commands/aidrive-contract.generated.d.ts.map +1 -0
- package/dist/commands/aidrive-contract.generated.js +555 -0
- package/dist/commands/aidrive-contract.generated.js.map +1 -0
- package/dist/commands/aidrive-operands.d.ts +2 -0
- package/dist/commands/aidrive-operands.d.ts.map +1 -1
- package/dist/commands/aidrive-operands.js +22 -26
- package/dist/commands/aidrive-operands.js.map +1 -1
- package/dist/commands/aidrive-upload.js +2 -1
- package/dist/commands/aidrive-upload.js.map +1 -1
- package/dist/commands/sb-box-session.d.ts +128 -0
- package/dist/commands/sb-box-session.d.ts.map +1 -0
- package/dist/commands/sb-box-session.js +463 -0
- package/dist/commands/sb-box-session.js.map +1 -0
- package/dist/config.d.ts +42 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +43 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +192 -51
- package/dist/index.js.map +1 -1
- package/dist/object-args.d.ts +4 -0
- package/dist/object-args.d.ts.map +1 -0
- package/dist/object-args.js +34 -0
- package/dist/object-args.js.map +1 -0
- package/dist/serviceActions.d.ts +2 -0
- package/dist/serviceActions.d.ts.map +1 -1
- package/dist/serviceActions.js +13 -1
- package/dist/serviceActions.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/skills.md +10 -9
- package/package.json +1 -1
- package/skills/gsk-aidrive/SKILL.md +104 -16
- package/skills/gsk-audio-transcribe/SKILL.md +5 -2
- package/skills/gsk-calendar-source/SKILL.md +44 -0
- package/skills/gsk-connector/SKILL.md +23 -9
- package/skills/gsk-create-task/SKILL.md +1 -1
- package/skills/gsk-genteam/SKILL.md +3 -1
- package/skills/gsk-github/SKILL.md +4 -3
- package/skills/gsk-gmail/SKILL.md +1 -1
- package/skills/gsk-google-drive/SKILL.md +6 -5
- package/skills/gsk-google-sheets/SKILL.md +1 -1
- package/skills/gsk-image-generation/SKILL.md +2 -1
- package/skills/gsk-meeting/SKILL.md +1 -1
- package/skills/gsk-notion/SKILL.md +2 -2
- package/skills/gsk-onedrive/SKILL.md +6 -4
- package/skills/gsk-outlook-calendar/SKILL.md +1 -1
- package/skills/gsk-outlook-email/SKILL.md +1 -1
- package/skills/gsk-sb-brain/SKILL.md +32 -21
- package/skills/gsk-second-brain/SKILL.md +44 -16
- package/skills/gsk-shared/SKILL.md +7 -1
- package/skills/gsk-sharepoint/SKILL.md +5 -4
- package/skills/gsk-video-generation/SKILL.md +6 -2
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAoBnC,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,6EAA6E;AAC7E,mEAAmE;AACnE,6EAA6E;AAC7E,4EAA4E;AAC5E,0BAA0B;AAC1B,EAAE;AACF,+DAA+D;AAC/D,0EAA0E;AAC1E,6DAA6D;AAC7D,2EAA2E;AAC3E,uDAAuD;AACvD,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,iCAAiC;AACjC,MAAM,CAAC,MAAM,YAAY,GACvB,mHAAmH,CAAA;AAarH,MAAM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MAAM,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,CAAA;IAClE,IAAI,UAAU;QAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAA;IAExE,MAAM,OAAO,GAAG,SAAS;QACvB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,GAAG,CAAC,MAAM;YACV,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAC,MAAM;gBACX,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,SAAS,CAAA;IACjB,MAAM,UAAU,GAAG,CAAC,IAAoB,EAAW,EAAE,CACnD,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,CAAA;IACvE,MAAM,MAAM,GACV,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAC1E,OAAO;QACL,MAAM;QACN,OAAO,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,IAAI,cAAc,CAAC;KAC7D,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG;AAmjBH,KAAK,oBAAoB,GAAG,kBAAkB,GAAG,SAAS,GAAG,SAAS,CAAA;AAEtE,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAA;CAC3B;AAED,kFAAkF;AAClF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EAAE,GACb,mBAAmB,EAAE,CAqBvB"}
|
package/dist/index.js
CHANGED
|
@@ -40,14 +40,15 @@ import { setDebugEnabled, setOutputFormat, debug, info, warn, error as logError,
|
|
|
40
40
|
import { runInteractiveApprovalFlow, shouldPromptForApproval, } from './pendingApproval.js';
|
|
41
41
|
import { isPendingConfirmationEnvelope, LEGACY_SKIP_PARAMS, runPreCallConfirmation, STALE_SCHEMA_CACHE_MESSAGE, } from './confirm.js';
|
|
42
42
|
import { repairJsonArrayArgs } from './arrayArgs.js';
|
|
43
|
-
import {
|
|
43
|
+
import { parseJsonObjectArgs } from './object-args.js';
|
|
44
|
+
import { clearToolsCache, getCachedFeatures, loadConfigFile, getConfigPath, loadToolsCache, normalizeBaseUrl, resolveCredentialPair, saveToolsCache, setConfigPathOverride, updateConfigFile, } from './config.js';
|
|
44
45
|
import { checkForUpdates } from './updater.js';
|
|
45
46
|
import { addRegisteredCommands, collectToolCommandTokens, staleCacheMissingToken, } from './staleCache.js';
|
|
46
47
|
import { shimLegacyTaskInvocation } from './task-shim.js';
|
|
47
48
|
import { getSandboxRuntime } from './runtime.js';
|
|
48
49
|
import { registerDesignCommand } from './commands/design.js';
|
|
49
50
|
import { collectUploadFiles, aidriveUploadHeaders, buildAidriveUploadQuery, mergeShareIntoUpload, normalizeUploadDestination, resolveAidriveUploadOperands, shareArgsFromUpload, uploadConflictFromCli, uploadConflictProblem, uploadPathForDestination, uploadShareRefusal, } from './commands/aidrive-upload.js';
|
|
50
|
-
import { aidriveOperandArgs } from './commands/aidrive-operands.js';
|
|
51
|
+
import { aidriveOperandArgs, canonicalDriveAction, driveArgumentError } from './commands/aidrive-operands.js';
|
|
51
52
|
import { resolveAidriveDownloadOperands, normalizeDrivePath, extractReadableUrl, shouldResolveFileWrapperUrl, } from './commands/aidrive-download.js';
|
|
52
53
|
import { fileNameFromContentDisposition, genteamAttachmentEndpoint, resolveGenteamDownloadDestination, saveBodyToFile, } from './commands/genteam-download.js';
|
|
53
54
|
import { CALL_RECORDING_INFO_HELP, CALL_RECORDING_LOCAL_FILE_HELP, callRecordingEndpoint, defaultRecordingFileName, formatBytes, normalizeRecordingChannels, progressThrottle, RECORDING_CHANNEL_MODES, recordingDestinationOperands, recordingProgressLine, } from './commands/telephony-recording.js';
|
|
@@ -56,11 +57,23 @@ import { defaultPiAgentDir, mergePiModelsConfig, mergePiSettingsConfig, readJson
|
|
|
56
57
|
import { mediaItemsKeyFor, mediaSummaryLines } from './mediaSummary.js';
|
|
57
58
|
import { registerMeshCommand, getMeshInvocation, runMesh, } from './commands/mesh.js';
|
|
58
59
|
import { executeCloneUrl, normalizeCloneUrlForGit, } from './commands/sb-git-clone.js';
|
|
60
|
+
import { afterSessionCall, bindSession, defaultTemplate, resolveSessionKey, SANDBOX_ACTIONS, SessionError, SessionStore, SESSION_ENV, } from './commands/sb-box-session.js';
|
|
59
61
|
import { actionScopedDescription, serviceActionViews, } from './serviceActions.js';
|
|
60
62
|
const require = createRequire(import.meta.url);
|
|
61
63
|
const { version: VERSION } = require('../package.json');
|
|
62
64
|
const DEFAULT_BASE_URL = 'https://www.genspark.ai';
|
|
63
65
|
const DEFAULT_TIMEOUT = 1800000; // 30 minutes (slides/video generation can be slow)
|
|
66
|
+
// `gsk sb-box --session` help (commands/sb-box-session.ts). Env fallbacks
|
|
67
|
+
// are named so a host-spawned shell knows why a bare `run-code` just worked.
|
|
68
|
+
const SB_BOX_SESSION_HELP = 'Bind this session key to a sandbox instead of passing --sandbox_id: the ' +
|
|
69
|
+
'CLI reuses the sandbox it remembers for the key while it is alive ' +
|
|
70
|
+
'(frozen is fine — it resumes) and starts a new one on exec / run-code / ' +
|
|
71
|
+
'write when there is none (--template picks the image; default newest ' +
|
|
72
|
+
'public base; no hard deadline, idle-frozen when quiet). get / read / ls / ' +
|
|
73
|
+
'kill / freeze / … only use an existing binding; `kill` drops it; ' +
|
|
74
|
+
'`create --session` binds the new sandbox. Without the flag the key comes ' +
|
|
75
|
+
`from $${SESSION_ENV}, then CLAUDE_CODE_SESSION_ID (create binds only with the flag). An explicit ` +
|
|
76
|
+
'--sandbox_id always wins. Bindings: <config dir>/sb-box-sessions.json, per API host.';
|
|
64
77
|
const GENTEAM_DOWNLOAD_LOCAL_FILE_HELP = 'download: local destination path (same as a bare operand; a directory ' +
|
|
65
78
|
'receives the server-reported file name; default ./<file_name>)';
|
|
66
79
|
/**
|
|
@@ -294,16 +307,20 @@ function finalizeGlobalPassthrough() {
|
|
|
294
307
|
}
|
|
295
308
|
function getGlobalOptions() {
|
|
296
309
|
const opts = { ...program.opts(), ...activePassthroughOpts };
|
|
297
|
-
// API key
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
310
|
+
// API key and base URL resolve as one pair (#70209) — see the precedence
|
|
311
|
+
// table in config.ts.
|
|
312
|
+
const { apiKey, baseUrl } = resolveCredentialPair({
|
|
313
|
+
cliApiKey: opts.apiKey,
|
|
314
|
+
cliBaseUrl: program.getOptionValueSource('baseUrl') === 'cli'
|
|
315
|
+
? opts.baseUrl
|
|
316
|
+
: undefined,
|
|
317
|
+
env: {
|
|
318
|
+
apiKey: process.env.GSK_API_KEY,
|
|
319
|
+
baseUrl: process.env.GSK_BASE_URL,
|
|
320
|
+
},
|
|
321
|
+
file: { apiKey: fileConfig.api_key, baseUrl: fileConfig.base_url },
|
|
322
|
+
defaultBaseUrl: DEFAULT_BASE_URL,
|
|
323
|
+
});
|
|
307
324
|
// Timeout priority: CLI > config file > default
|
|
308
325
|
const timeout = opts.timeout !== String(DEFAULT_TIMEOUT)
|
|
309
326
|
? parseInt(opts.timeout, 10)
|
|
@@ -383,7 +400,12 @@ const CONTENT_TYPE_MAP = {
|
|
|
383
400
|
'.csv': 'text/csv',
|
|
384
401
|
'.zip': 'application/zip',
|
|
385
402
|
'.mp3': 'audio/mpeg',
|
|
403
|
+
'.m4a': 'audio/mp4',
|
|
404
|
+
'.aac': 'audio/aac',
|
|
405
|
+
'.ogg': 'audio/ogg',
|
|
406
|
+
'.flac': 'audio/flac',
|
|
386
407
|
'.mp4': 'video/mp4',
|
|
408
|
+
'.mov': 'video/quicktime',
|
|
387
409
|
'.wav': 'audio/wav',
|
|
388
410
|
'.webm': 'video/webm',
|
|
389
411
|
};
|
|
@@ -552,7 +574,7 @@ async function uploadLocalFile(filePath, client) {
|
|
|
552
574
|
*
|
|
553
575
|
* This avoids the roundabout blob-upload + download_file two-step approach.
|
|
554
576
|
*/
|
|
555
|
-
async function uploadToAiDrive(filePath, uploadPath, workspace = '
|
|
577
|
+
async function uploadToAiDrive(filePath, uploadPath, workspace = '', source, onConflict, locator) {
|
|
556
578
|
const fileName = pathModule.basename(filePath);
|
|
557
579
|
const ext = pathModule.extname(filePath).toLowerCase();
|
|
558
580
|
const contentType = CONTENT_TYPE_MAP[ext] || 'application/octet-stream';
|
|
@@ -794,6 +816,23 @@ function parseBooleanFlagValue(value) {
|
|
|
794
816
|
return false;
|
|
795
817
|
throw new InvalidArgumentError(`expected true/false. If '${value}' was meant as an argument, place it before the flag or pass an explicit value (--flag true ${value}).`);
|
|
796
818
|
}
|
|
819
|
+
function addAidriveLocalOptions(cmd, action) {
|
|
820
|
+
cmd.addOption(new Option('--workspace [type]', 'Drive location: my_drive (ls default), sb_workspace (bare flag), team_drive, shared_drive (all managed), shared_with_me').preset('sb_workspace'));
|
|
821
|
+
cmd.option('--local_file <path>', action === 'download'
|
|
822
|
+
? 'Local destination path; use --local_file with --id or --url. ' +
|
|
823
|
+
'Otherwise the second operand is the destination.'
|
|
824
|
+
: 'upload: local file path to upload to AI Drive (supports files >5 MB; ' +
|
|
825
|
+
'alternative to --file_content; same as the first operand of ' +
|
|
826
|
+
'`upload <local> <drive folder>/`). download: local destination path ' +
|
|
827
|
+
'(same as the second operand; default ./<basename of the drive path>)');
|
|
828
|
+
// An optional value, as schema booleans take: presence-only, the
|
|
829
|
+
// `false` in `--override false` was left over and the upload overwrote.
|
|
830
|
+
cmd.option('--override [value]', 'Overwrite an existing file at the destination path (used with --local_file)', parseBooleanFlagValue);
|
|
831
|
+
cmd.option('--on-conflict <mode>', 'upload: what to do when the destination name is taken — ' +
|
|
832
|
+
'error | rename | overwrite (default: rename, which lands ' +
|
|
833
|
+
'name(1).ext and reports the path actually written). Use error for ' +
|
|
834
|
+
'idempotent scripts that retry on failure.');
|
|
835
|
+
}
|
|
797
836
|
/**
|
|
798
837
|
* Register one schema parameter as a Commander option.
|
|
799
838
|
*
|
|
@@ -999,6 +1038,10 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
999
1038
|
// accepts its own and rejects wrong-action flags at parse time. Hidden
|
|
1000
1039
|
// legacy forms keep the union view.
|
|
1001
1040
|
const actionViews = cmdOpts?.deprecated ? null : serviceActionViews(tool);
|
|
1041
|
+
// Preserve pre-action flags for old Drive scripts; let subcommands parse
|
|
1042
|
+
// post-action flags themselves so scoped help and local operands both work.
|
|
1043
|
+
if (tool.name === 'aidrive' && actionViews)
|
|
1044
|
+
cmd.enablePositionalOptions();
|
|
1002
1045
|
// If primary_arg is set, make it a positional argument
|
|
1003
1046
|
if (tool.cli.primary_arg && props[tool.cli.primary_arg]) {
|
|
1004
1047
|
const param = props[tool.cli.primary_arg];
|
|
@@ -1023,10 +1066,12 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1023
1066
|
// unknown action names still reach the server) and --args-file.
|
|
1024
1067
|
const aliases = tool.cli.parameter_aliases || {};
|
|
1025
1068
|
for (const [name, param] of Object.entries(props)) {
|
|
1026
|
-
if (actionViews)
|
|
1069
|
+
if (actionViews && tool.name !== 'aidrive')
|
|
1027
1070
|
break;
|
|
1028
1071
|
if (name === tool.cli.primary_arg)
|
|
1029
1072
|
continue;
|
|
1073
|
+
if (tool.name === 'aidrive' && name === 'workspace')
|
|
1074
|
+
continue;
|
|
1030
1075
|
// For create_task, make params optional so --acp mode works without them.
|
|
1031
1076
|
// Validation of required params happens in the action handler. Likewise
|
|
1032
1077
|
// skills_save's `files` is server-required but CLI-populated (from the
|
|
@@ -1116,22 +1161,8 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1116
1161
|
}
|
|
1117
1162
|
// For the aidrive tool, add client-side options used by the --local_file
|
|
1118
1163
|
// upload and by `download`'s local destination.
|
|
1119
|
-
if (tool.name === 'aidrive')
|
|
1120
|
-
|
|
1121
|
-
cmd.option('--workspace <value>', 'AI Drive workspace: my_drive, shared_with_me, or shared_drive');
|
|
1122
|
-
}
|
|
1123
|
-
cmd.option('--local_file <path>', 'upload: local file path to upload to AI Drive (supports files >5 MB; ' +
|
|
1124
|
-
'alternative to --file_content; same as the first operand of ' +
|
|
1125
|
-
'`upload <local> <drive folder>/`). download: local destination path ' +
|
|
1126
|
-
'(same as the second operand; default ./<basename of the drive path>)');
|
|
1127
|
-
// An optional value, as schema booleans take: presence-only, the
|
|
1128
|
-
// `false` in `--override false` was left over and the upload overwrote.
|
|
1129
|
-
cmd.option('--override [value]', 'Overwrite an existing file at the destination path (used with --local_file)', parseBooleanFlagValue);
|
|
1130
|
-
cmd.option('--on-conflict <mode>', 'upload: what to do when the destination name is taken — ' +
|
|
1131
|
-
'error | rename | overwrite (default: rename, which lands ' +
|
|
1132
|
-
'name(1).ext and reports the path actually written). Use error for ' +
|
|
1133
|
-
'idempotent scripts that retry on failure.');
|
|
1134
|
-
}
|
|
1164
|
+
if (tool.name === 'aidrive')
|
|
1165
|
+
addAidriveLocalOptions(cmd);
|
|
1135
1166
|
// genteam download saves the attachment to local disk (client-side: only
|
|
1136
1167
|
// this process can write the local filesystem). The union view takes the
|
|
1137
1168
|
// flag here; the per-action `download` subcommand registers it below.
|
|
@@ -1153,6 +1184,12 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1153
1184
|
if (tool.name === 'sb-git') {
|
|
1154
1185
|
cmd.option('--execute [dest]', 'For action=clone-url: run `git clone` locally to [dest] (default: ./<repo>) instead of just printing the snippet');
|
|
1155
1186
|
}
|
|
1187
|
+
// For sb-box: `--session <key>` binds a session to a sandbox client-side
|
|
1188
|
+
// (commands/sb-box-session.ts): the CLI remembers which sandbox the key
|
|
1189
|
+
// owns, reuses it while alive and starts a new one on exec / run-code /
|
|
1190
|
+
// write when it is gone. CLI-only; the server sees the resolved sandbox_id.
|
|
1191
|
+
if (tool.name === 'sb-box')
|
|
1192
|
+
cmd.option('--session <key>', SB_BOX_SESSION_HELP);
|
|
1156
1193
|
// For skills pull: `--out [dir]` writes the returned skill files to disk.
|
|
1157
1194
|
// Client-side because an HTTP/JSON tool can't materialise a tree on the
|
|
1158
1195
|
// user's machine — same shape as sb-git's `--execute`. Default dest is
|
|
@@ -1186,6 +1223,9 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1186
1223
|
opts = primaryArgValue;
|
|
1187
1224
|
primaryArgValue = undefined;
|
|
1188
1225
|
}
|
|
1226
|
+
if (tool.name === 'aidrive' && invokedCmd !== cmd) {
|
|
1227
|
+
opts = { ...cmd.opts(), ...opts };
|
|
1228
|
+
}
|
|
1189
1229
|
// Global flags written after the tool name arrive here as the
|
|
1190
1230
|
// subcommand's own options: record them for getGlobalOptions and keep
|
|
1191
1231
|
// them out of the tool arguments (they are not server parameters).
|
|
@@ -1436,6 +1476,11 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1436
1476
|
}
|
|
1437
1477
|
}
|
|
1438
1478
|
}
|
|
1479
|
+
const objectError = parseJsonObjectArgs(args, props);
|
|
1480
|
+
if (objectError) {
|
|
1481
|
+
logError(objectError);
|
|
1482
|
+
process.exit(1);
|
|
1483
|
+
}
|
|
1439
1484
|
// Coerce numeric strings to numbers based on schema
|
|
1440
1485
|
for (const [name, param] of Object.entries(props)) {
|
|
1441
1486
|
if (args[name] !== undefined) {
|
|
@@ -1478,29 +1523,34 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1478
1523
|
let aidriveOperands = [];
|
|
1479
1524
|
if (tool.name === 'aidrive' && typeof args.action === 'string') {
|
|
1480
1525
|
const actionNames = props.action?.enum;
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
// "rm" would have removed a path named "ls".
|
|
1526
|
+
const primaryAction = primaryArgValue === undefined
|
|
1527
|
+
? undefined : canonicalDriveAction(primaryArgValue);
|
|
1528
|
+
const action = canonicalDriveAction(args.action);
|
|
1529
|
+
args.action = action;
|
|
1530
|
+
if (primaryAction !== undefined && primaryAction !== action &&
|
|
1531
|
+
(invokedCmd !== cmd || (Array.isArray(actionNames) && actionNames.includes(primaryAction)))) {
|
|
1488
1532
|
logError(`The command line names the action ${primaryArgValue} and ` +
|
|
1489
1533
|
`--args-file names ${args.action}; pass one. Nothing was sent.`);
|
|
1490
1534
|
process.exit(1);
|
|
1491
1535
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1536
|
+
if (Array.isArray(actionNames) && !actionNames.includes(action)) {
|
|
1537
|
+
logError(`Unknown AI Drive action: ${args.action}. Run gsk drive --help for available actions. Nothing was sent.`);
|
|
1538
|
+
process.exit(1);
|
|
1539
|
+
}
|
|
1540
|
+
aidriveOperands = invokedCmd !== cmd ? invokedCmd.args
|
|
1541
|
+
: primaryAction !== undefined && primaryAction === action
|
|
1542
|
+
? invokedCmd.args.slice(1) : invokedCmd.args;
|
|
1543
|
+
const mapped = aidriveOperandArgs(action, aidriveOperands, args);
|
|
1499
1544
|
if (mapped.error) {
|
|
1500
1545
|
logError(mapped.error);
|
|
1501
1546
|
process.exit(1);
|
|
1502
1547
|
}
|
|
1503
1548
|
Object.assign(args, mapped.filled);
|
|
1549
|
+
const argumentError = driveArgumentError(action, args);
|
|
1550
|
+
if (argumentError) {
|
|
1551
|
+
logError(argumentError + ' Nothing was sent.');
|
|
1552
|
+
process.exit(1);
|
|
1553
|
+
}
|
|
1504
1554
|
}
|
|
1505
1555
|
// Pre-call confirmation (confirm.ts): when the cached /tools
|
|
1506
1556
|
// payload advertised interactive_confirm AND the schema marks this
|
|
@@ -1705,10 +1755,7 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1705
1755
|
// Never forwarded to the server, which answers a CLI too old to
|
|
1706
1756
|
// intercept it with the two-call equivalent.
|
|
1707
1757
|
if (tool.name === 'aidrive' && args.action === 'download') {
|
|
1708
|
-
const
|
|
1709
|
-
? invokedCmd.args.slice(1)
|
|
1710
|
-
: invokedCmd.args;
|
|
1711
|
-
const { drivePath: sourceOperand, localPath: operandDest } = resolveAidriveDownloadOperands(operandCandidates, typeof args.path === 'string' ? args.path : undefined);
|
|
1758
|
+
const { drivePath: sourceOperand, localPath: operandDest } = resolveAidriveDownloadOperands(aidriveOperands, typeof args.path === 'string' ? args.path : undefined);
|
|
1712
1759
|
const hasDownloadLocator = !!(args.id || args.url || args.source || args.share);
|
|
1713
1760
|
if (!sourceOperand && !hasDownloadLocator) {
|
|
1714
1761
|
logError('download needs the AI-Drive path: gsk aidrive download ' +
|
|
@@ -1922,7 +1969,7 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
1922
1969
|
// a shared source's sharing has its own verb and admin gate.
|
|
1923
1970
|
const shareAfterUpload = shareArgsFromUpload(args);
|
|
1924
1971
|
const sharesAfterUpload = Object.keys(shareAfterUpload).length > 0;
|
|
1925
|
-
const workspace = args.workspace || 'my_drive';
|
|
1972
|
+
const workspace = args.workspace || (sharesAfterUpload ? 'my_drive' : '');
|
|
1926
1973
|
const source = args.source ||
|
|
1927
1974
|
args.share;
|
|
1928
1975
|
if (!fs.existsSync(localFilePath)) {
|
|
@@ -2088,6 +2135,68 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2088
2135
|
args.file_urls = [...existing, ...fileUrls];
|
|
2089
2136
|
delete args.file; // CLI-only option, not a server parameter
|
|
2090
2137
|
}
|
|
2138
|
+
// sb-box --session: resolve the session's sandbox before the call
|
|
2139
|
+
// (reuse / create), never forward the flag. An explicit sandbox_id
|
|
2140
|
+
// wins and leaves the binding alone; with neither flag the env
|
|
2141
|
+
// fallbacks (GSK_SB_BOX_SESSION, a host agent's session id) apply
|
|
2142
|
+
// to the actions that address a sandbox.
|
|
2143
|
+
let sbBoxSession;
|
|
2144
|
+
let sbBoxBind;
|
|
2145
|
+
let sbBoxStore;
|
|
2146
|
+
if (tool.name === 'sb-box') {
|
|
2147
|
+
const explicitSession = args.session;
|
|
2148
|
+
delete args.session;
|
|
2149
|
+
const action = typeof args.action === 'string' ? args.action : '';
|
|
2150
|
+
const hasSandboxId = typeof args.sandbox_id === 'string' && args.sandbox_id.trim() !== '';
|
|
2151
|
+
const key = resolveSessionKey(explicitSession);
|
|
2152
|
+
// `create` binds only on an EXPLICIT --session: a bare create
|
|
2153
|
+
// inside Claude Code must not silently rebind the conversation's
|
|
2154
|
+
// sandbox (the env fallbacks are for the actions that address one).
|
|
2155
|
+
if (key && action === 'create' && !hasSandboxId) {
|
|
2156
|
+
if (key.source === 'flag')
|
|
2157
|
+
sbBoxSession = key;
|
|
2158
|
+
}
|
|
2159
|
+
else if (key && SANDBOX_ACTIONS.has(action) && !hasSandboxId) {
|
|
2160
|
+
sbBoxSession = key;
|
|
2161
|
+
}
|
|
2162
|
+
// create without --template: newest ready public base (CLI-side).
|
|
2163
|
+
if (action === 'create' &&
|
|
2164
|
+
!(typeof args.template === 'string' && args.template.trim())) {
|
|
2165
|
+
try {
|
|
2166
|
+
args.template = await defaultTemplate(callArgs => client.executeTool('sb-box', callArgs));
|
|
2167
|
+
info(`create: no --template given, using the public base ${args.template}`);
|
|
2168
|
+
}
|
|
2169
|
+
catch (err) {
|
|
2170
|
+
if (err instanceof SessionError) {
|
|
2171
|
+
logError(err.message);
|
|
2172
|
+
process.exit(1);
|
|
2173
|
+
}
|
|
2174
|
+
throw err;
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
if (sbBoxSession) {
|
|
2178
|
+
sbBoxStore = SessionStore.forConfig(getConfigPath(), getGlobalOptions().baseUrl);
|
|
2179
|
+
if (action !== 'create') {
|
|
2180
|
+
try {
|
|
2181
|
+
sbBoxBind = await bindSession({
|
|
2182
|
+
key: sbBoxSession,
|
|
2183
|
+
action,
|
|
2184
|
+
args,
|
|
2185
|
+
call: callArgs => client.executeTool('sb-box', callArgs),
|
|
2186
|
+
store: sbBoxStore,
|
|
2187
|
+
log: info,
|
|
2188
|
+
});
|
|
2189
|
+
}
|
|
2190
|
+
catch (err) {
|
|
2191
|
+
if (err instanceof SessionError) {
|
|
2192
|
+
logError(err.message);
|
|
2193
|
+
process.exit(1);
|
|
2194
|
+
}
|
|
2195
|
+
throw err;
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2091
2200
|
// Resolve local file paths to uploaded URLs
|
|
2092
2201
|
// The drive's --url is the Drive link an entry is addressed by.
|
|
2093
2202
|
const uploadArgs = await resolveUploadFilePaths(args, tool.parameters.properties, source => resolveFileArg(source, client));
|
|
@@ -2098,6 +2207,15 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2098
2207
|
// upgrades the stub into a live SSE follow that exits with the
|
|
2099
2208
|
// run's terminal result — the work still executes server-side.
|
|
2100
2209
|
let result = await client.executeTool(tool.name, resolvedArgs);
|
|
2210
|
+
if (sbBoxSession && sbBoxStore) {
|
|
2211
|
+
afterSessionCall({
|
|
2212
|
+
key: sbBoxSession,
|
|
2213
|
+
action: String(resolvedArgs.action ?? ''),
|
|
2214
|
+
bind: sbBoxBind,
|
|
2215
|
+
result,
|
|
2216
|
+
store: sbBoxStore,
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2101
2219
|
const stubData = result.data;
|
|
2102
2220
|
if (attachTask &&
|
|
2103
2221
|
result.status === 'ok' &&
|
|
@@ -2352,12 +2470,21 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2352
2470
|
const allActionNames = actionViews.map(view => view.name);
|
|
2353
2471
|
for (const view of actionViews) {
|
|
2354
2472
|
const sub = cmd.command(view.name).description(view.description);
|
|
2355
|
-
|
|
2473
|
+
if (tool.name === 'aidrive') {
|
|
2474
|
+
sub.aliases(view.aliases);
|
|
2475
|
+
if (view.example)
|
|
2476
|
+
sub.addHelpText('after', `\nExample: ${view.example}`);
|
|
2477
|
+
}
|
|
2478
|
+
const parameterNames = tool.name === 'aidrive'
|
|
2479
|
+
? Object.keys(props).filter(name => name !== tool.cli.primary_arg) : view.parameters;
|
|
2480
|
+
for (const paramName of parameterNames) {
|
|
2481
|
+
if (tool.name === 'aidrive' && paramName === 'workspace')
|
|
2482
|
+
continue;
|
|
2356
2483
|
addSchemaOption(sub, paramName, props[paramName], {
|
|
2357
2484
|
// Same relaxation as the union path: with --args-file on the
|
|
2358
2485
|
// command line, required params may live in the file, which
|
|
2359
2486
|
// Commander cannot see at parse time.
|
|
2360
|
-
isRequired: argsFileInvoked
|
|
2487
|
+
isRequired: argsFileInvoked || tool.name === 'aidrive'
|
|
2361
2488
|
? false
|
|
2362
2489
|
: view.required.includes(paramName),
|
|
2363
2490
|
shortAlias: aliases[paramName],
|
|
@@ -2367,6 +2494,17 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2367
2494
|
description: actionScopedDescription(props[paramName].description || paramName, view.name, allActionNames),
|
|
2368
2495
|
});
|
|
2369
2496
|
}
|
|
2497
|
+
if (tool.name === 'aidrive') {
|
|
2498
|
+
addAidriveLocalOptions(sub, view.name);
|
|
2499
|
+
const localFlags = view.name === 'upload'
|
|
2500
|
+
? ['local_file', 'override', 'on-conflict']
|
|
2501
|
+
: view.name === 'download' ? ['local_file'] : [];
|
|
2502
|
+
for (const option of sub.options) {
|
|
2503
|
+
const name = option.long?.slice(2) ?? '';
|
|
2504
|
+
if (!view.parameters.includes(name) && !localFlags.includes(name))
|
|
2505
|
+
option.hideHelp();
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2370
2508
|
const actionInfo = tool.actions?.[view.name];
|
|
2371
2509
|
if (actionInfo?.requires_confirmation === true) {
|
|
2372
2510
|
addHiddenLegacySkipOptions(sub, props);
|
|
@@ -2386,6 +2524,9 @@ function registerToolCommand(parentProgram, tool, clientFactory, vdProjectIdDefa
|
|
|
2386
2524
|
if (tool.name === 'genteam' && view.name === 'download') {
|
|
2387
2525
|
sub.option('--local_file <path>', GENTEAM_DOWNLOAD_LOCAL_FILE_HELP);
|
|
2388
2526
|
}
|
|
2527
|
+
if (tool.name === 'sb-box' && (SANDBOX_ACTIONS.has(view.name) || view.name === 'create')) {
|
|
2528
|
+
sub.option('--session <key>', SB_BOX_SESSION_HELP);
|
|
2529
|
+
}
|
|
2389
2530
|
addGlobalPassthroughOptions(sub, props);
|
|
2390
2531
|
sub.action((opts) => runToolInvocation(view.name, opts, sub));
|
|
2391
2532
|
}
|