@notis_ai/cli 0.2.0-beta.122.1 → 0.2.0-beta.124.1
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/dist/scaffolds.json
CHANGED
package/package.json
CHANGED
|
@@ -134,13 +134,13 @@ This is the main escape hatch for:
|
|
|
134
134
|
### Tool access workflow
|
|
135
135
|
|
|
136
136
|
1. List available toolkit namespaces:
|
|
137
|
-
- `npx --package @notis_ai/cli@latest -- notis tools toolkits`
|
|
137
|
+
- `npx --package @notis_ai/cli@latest -- notis tools toolkits --timeout-ms 90000`
|
|
138
138
|
2. Search for the capability you need using natural language:
|
|
139
|
-
- `npx --package @notis_ai/cli@latest -- notis tools search "<query>"`
|
|
139
|
+
- `npx --package @notis_ai/cli@latest -- notis tools search "<query>" --timeout-ms 90000`
|
|
140
140
|
- optionally add known field hints with `--known-fields "<key:value>"`
|
|
141
141
|
3. If needed, inspect the exact tool and parameter schema:
|
|
142
|
-
- `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name
|
|
143
|
-
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --get-schema`
|
|
142
|
+
- `npx --package @notis_ai/cli@latest -- notis tools describe <tool-name> --timeout-ms 90000`
|
|
143
|
+
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --get-schema --timeout-ms 90000`
|
|
144
144
|
4. Validate arguments before execution when the tool is mutating or the schema is non-trivial:
|
|
145
145
|
- `npx --package @notis_ai/cli@latest -- notis tools exec <tool-name> --dry-run --arguments '<json>'`
|
|
146
146
|
5. Execute the tool:
|
|
@@ -151,6 +151,22 @@ This is the main escape hatch for:
|
|
|
151
151
|
- `npx --package @notis_ai/cli@latest -- notis tools link <toolkit>`
|
|
152
152
|
- For a revoked or invalid credential-based connection, reconnect with credential JSON on stdin: `npx --package @notis_ai/cli@latest -- notis tools link <toolkit> --reconnect --credentials -`
|
|
153
153
|
|
|
154
|
+
### Discovery latency and caching
|
|
155
|
+
|
|
156
|
+
The discovery bridge may query several connected MCP servers on a cold run and
|
|
157
|
+
can legitimately take longer than the CLI's general 30-second timeout. Always
|
|
158
|
+
use `--timeout-ms 90000` for `tools toolkits`, `tools search`, `tools describe`,
|
|
159
|
+
and schema-only discovery calls. If a discovery call returns `network_timeout`,
|
|
160
|
+
retry that same command once with `--timeout-ms 90000`; do not start a new
|
|
161
|
+
query, invent a tool name, or loop on the default 30-second command.
|
|
162
|
+
|
|
163
|
+
Discovery is idempotent but should be bounded: run the toolkit listing once per
|
|
164
|
+
task, run one natural-language search per distinct capability, and cache the
|
|
165
|
+
returned canonical tool names and schemas for the rest of the current turn.
|
|
166
|
+
After a successful search/schema response, call the returned canonical tool
|
|
167
|
+
directly (with a dry-run before mutations) instead of repeating the same
|
|
168
|
+
discovery request before every connected-service action.
|
|
169
|
+
|
|
154
170
|
### Tool access rules
|
|
155
171
|
|
|
156
172
|
- Never guess tool names. Discover them with `npx --package @notis_ai/cli@latest -- notis tools search` first.
|
|
@@ -24,7 +24,7 @@ const BUNDLE_DIR = join(OUTPUT_DIR, 'bundle');
|
|
|
24
24
|
const MANIFEST_FILE = join(OUTPUT_DIR, 'manifest.json');
|
|
25
25
|
const METADATA_DIR = 'metadata';
|
|
26
26
|
const CLI_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
|
|
27
|
-
const
|
|
27
|
+
const MONOREPO_SCAFFOLDS_DIR = resolve(CLI_ROOT, '../..', 'scaffolds');
|
|
28
28
|
const DIST_DIR = join(CLI_ROOT, 'dist');
|
|
29
29
|
const SCAFFOLD_CATALOG_FILE = join(DIST_DIR, 'scaffolds.json');
|
|
30
30
|
const SCAFFOLD_SOURCE_DIR = join(DIST_DIR, 'scaffolds');
|
|
@@ -1075,7 +1075,7 @@ function resolveScaffoldSourceDir(fromSlug) {
|
|
|
1075
1075
|
if (existsSync(bundledDir)) {
|
|
1076
1076
|
return bundledDir;
|
|
1077
1077
|
}
|
|
1078
|
-
const monorepoDir = join(
|
|
1078
|
+
const monorepoDir = join(MONOREPO_SCAFFOLDS_DIR, fromSlug);
|
|
1079
1079
|
if (existsSync(join(monorepoDir, 'notis.config.ts'))) {
|
|
1080
1080
|
return monorepoDir;
|
|
1081
1081
|
}
|
|
@@ -1083,15 +1083,15 @@ function resolveScaffoldSourceDir(fromSlug) {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
1085
|
function loadMonorepoScaffoldCatalog() {
|
|
1086
|
-
if (!existsSync(
|
|
1086
|
+
if (!existsSync(MONOREPO_SCAFFOLDS_DIR)) {
|
|
1087
1087
|
return [];
|
|
1088
1088
|
}
|
|
1089
1089
|
const scaffolds = [];
|
|
1090
|
-
for (const entry of readdirSync(
|
|
1090
|
+
for (const entry of readdirSync(MONOREPO_SCAFFOLDS_DIR, { withFileTypes: true })) {
|
|
1091
1091
|
if (!entry.isDirectory() || entry.name.startsWith('.') || entry.name.startsWith('_')) {
|
|
1092
1092
|
continue;
|
|
1093
1093
|
}
|
|
1094
|
-
const configPath = join(
|
|
1094
|
+
const configPath = join(MONOREPO_SCAFFOLDS_DIR, entry.name, 'notis.config.ts');
|
|
1095
1095
|
if (!existsSync(configPath)) {
|
|
1096
1096
|
continue;
|
|
1097
1097
|
}
|