@apotech-os/cli 7.1.0 → 7.2.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/index.js +36 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ apotech-os data list _core/shopify-order --filter '{"name":{"contains":"1001"}}'
|
|
|
93
93
|
|
|
94
94
|
`--filter` / `--search` / `--sort` are the server's own JSON grammar, passed
|
|
95
95
|
through untouched; operators are `eq neq contains ncontains gt lt gte lte empty
|
|
96
|
-
nempty
|
|
96
|
+
nempty in` (`in` takes an array of at most 500 values). `--limit` is a total row count (default 50, max 1000) — the command
|
|
97
97
|
pages for you. `--json` prints the raw `{items, nextCursor}` envelope, which is
|
|
98
98
|
what a script or an agent should read.
|
|
99
99
|
|
package/dist/index.js
CHANGED
|
@@ -7382,11 +7382,11 @@ function createPattern(matcher) {
|
|
|
7382
7382
|
if (matcher.path === string4)
|
|
7383
7383
|
return true;
|
|
7384
7384
|
if (matcher.recursive) {
|
|
7385
|
-
const
|
|
7386
|
-
if (!
|
|
7385
|
+
const relative4 = sysPath2.relative(matcher.path, string4);
|
|
7386
|
+
if (!relative4) {
|
|
7387
7387
|
return false;
|
|
7388
7388
|
}
|
|
7389
|
-
return !
|
|
7389
|
+
return !relative4.startsWith("..") && !sysPath2.isAbsolute(relative4);
|
|
7390
7390
|
}
|
|
7391
7391
|
return false;
|
|
7392
7392
|
};
|
|
@@ -22671,7 +22671,8 @@ var VIEW_FILTER_OPS = [
|
|
|
22671
22671
|
"gte",
|
|
22672
22672
|
"lte",
|
|
22673
22673
|
"empty",
|
|
22674
|
-
"nempty"
|
|
22674
|
+
"nempty",
|
|
22675
|
+
"in"
|
|
22675
22676
|
];
|
|
22676
22677
|
var ViewFilterSchema = external_exports.object({
|
|
22677
22678
|
field: external_exports.string(),
|
|
@@ -22827,6 +22828,21 @@ var FunctionTriggerSchema = external_exports.discriminatedUnion("type", [
|
|
|
22827
22828
|
* treated as exposing the function to no other app.
|
|
22828
22829
|
*/
|
|
22829
22830
|
exposedToApps: external_exports.array(external_exports.string()).optional()
|
|
22831
|
+
}),
|
|
22832
|
+
/**
|
|
22833
|
+
* A read-only tool the OS exposes over its MCP server. Never wired to an
|
|
22834
|
+
* Inngest event, cron or HTTP route: it is invoked synchronously, by the OS
|
|
22835
|
+
* only, with a derived token (no writes, capabilities, integrations, prompts
|
|
22836
|
+
* or variables). Its exposed name is the function name with `-` replaced by `_`.
|
|
22837
|
+
*/
|
|
22838
|
+
external_exports.object({
|
|
22839
|
+
type: external_exports.literal("mcpTool"),
|
|
22840
|
+
/** What the MCP client shows to the model and the user. */
|
|
22841
|
+
description: external_exports.string().min(1),
|
|
22842
|
+
/** Mandatory literal in v1; documents the intent, the platform enforces it. */
|
|
22843
|
+
readOnly: external_exports.literal(true),
|
|
22844
|
+
/** `false` marks an internal tool only the OS calls (never listed over MCP). */
|
|
22845
|
+
exposed: external_exports.boolean().optional()
|
|
22830
22846
|
})
|
|
22831
22847
|
]);
|
|
22832
22848
|
var FunctionDefFieldsSchema = external_exports.object({
|
|
@@ -22872,12 +22888,13 @@ var FunctionDefFieldsSchema = external_exports.object({
|
|
|
22872
22888
|
severity: external_exports.enum(["info", "warning", "critical"]).optional()
|
|
22873
22889
|
}).optional(),
|
|
22874
22890
|
/**
|
|
22875
|
-
* Lot 4 — Optional input schema for the
|
|
22876
|
-
* controlled rather than platform-shaped: `uiInvoke` (a browser session)
|
|
22877
|
-
* `httpRoute` (an external HTTP caller)
|
|
22878
|
-
* as `records[].fields` and `settings.fields` —
|
|
22879
|
-
* one field vocabulary across the whole contract
|
|
22880
|
-
* more expressive free-form JSON Schema surface
|
|
22891
|
+
* Lot 4 — Optional input schema for the triggers whose payload is caller-
|
|
22892
|
+
* controlled rather than platform-shaped: `uiInvoke` (a browser session),
|
|
22893
|
+
* `httpRoute` (an external HTTP caller) and `mcpTool` (an MCP client). Reuses
|
|
22894
|
+
* the same `FieldDef` vocabulary as `records[].fields` and `settings.fields` —
|
|
22895
|
+
* a deliberate decision to keep one field vocabulary across the whole contract
|
|
22896
|
+
* instead of adding a second, more expressive free-form JSON Schema surface
|
|
22897
|
+
* (see spec "Décisions prises").
|
|
22881
22898
|
*
|
|
22882
22899
|
* Validated server-side with the existing `fieldDefsToZod` before the handler
|
|
22883
22900
|
* runs; a violating payload is rejected `422 INVALID_INPUT` and the handler is
|
|
@@ -22906,12 +22923,17 @@ var FunctionDefFieldsSchema = external_exports.object({
|
|
|
22906
22923
|
description: external_exports.string().min(1)
|
|
22907
22924
|
}).optional()
|
|
22908
22925
|
});
|
|
22926
|
+
var TRIGGERS_ACCEPTING_INPUT = /* @__PURE__ */ new Set([
|
|
22927
|
+
"uiInvoke",
|
|
22928
|
+
"httpRoute",
|
|
22929
|
+
"mcpTool"
|
|
22930
|
+
]);
|
|
22909
22931
|
var FunctionDefSchema = FunctionDefFieldsSchema.superRefine((fn, ctx) => {
|
|
22910
|
-
if (fn.input &&
|
|
22932
|
+
if (fn.input && !TRIGGERS_ACCEPTING_INPUT.has(fn.trigger.type)) {
|
|
22911
22933
|
ctx.addIssue({
|
|
22912
22934
|
code: "custom",
|
|
22913
22935
|
path: ["input"],
|
|
22914
|
-
message: `"input" is only allowed on uiInvoke and
|
|
22936
|
+
message: `"input" is only allowed on uiInvoke, httpRoute and mcpTool triggers, not "${fn.trigger.type}"`
|
|
22915
22937
|
});
|
|
22916
22938
|
}
|
|
22917
22939
|
if (fn.trigger.type === "httpRoute" && fn.trigger.isAuthRequired === false && fn.trigger.minRole !== void 0) {
|
|
@@ -38350,7 +38372,7 @@ function findUndeclaredScopeCalls(manifest, projectRoot) {
|
|
|
38350
38372
|
const missing = required2.filter((scope) => !granted.has(scope));
|
|
38351
38373
|
if (missing.length === 0) continue;
|
|
38352
38374
|
findings.push({
|
|
38353
|
-
file:
|
|
38375
|
+
file: (0, import_path.relative)(projectRoot, file2).split(import_path.sep).join("/"),
|
|
38354
38376
|
line: contents.slice(0, match.index ?? 0).split("\n").length,
|
|
38355
38377
|
provider,
|
|
38356
38378
|
action,
|
|
@@ -40001,7 +40023,7 @@ function failTriggerGate(appSlug, candidates, message) {
|
|
|
40001
40023
|
fail(3, message, formatTriggerableList(appSlug, candidates));
|
|
40002
40024
|
}
|
|
40003
40025
|
function notTriggerableMessage(appSlug, functionName) {
|
|
40004
|
-
return `Error: no triggerable function "${functionName}" in app "${appSlug}" \u2014 it may not exist, or it may be a uiInvoke function (those run inline
|
|
40026
|
+
return `Error: no triggerable function "${functionName}" in app "${appSlug}" \u2014 it may not exist, or it may be a uiInvoke or mcpTool function (those run inline, for the app UI or an MCP client; the CLI cannot start them).`;
|
|
40005
40027
|
}
|
|
40006
40028
|
async function resolveFunction(baseUrl, apiKey, appSlug, functionName) {
|
|
40007
40029
|
const { jobs } = await fetchJobs({ baseUrl, apiKey });
|