@notis_ai/cli 0.2.0-beta.117.1 → 0.2.0-beta.120.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/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: notis-cli
|
|
3
3
|
description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
|
|
4
|
+
feature_flag: cli_access
|
|
5
|
+
mcp_resource: true
|
|
6
|
+
mcp_tool_patterns: []
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# Notis CLI Skill
|
|
@@ -561,6 +561,14 @@ export async function ensureDevInstall({
|
|
|
561
561
|
const skills = resolveConfiguredAppSkills(appConfig, projectDir);
|
|
562
562
|
let linkedState = readLinkedState(projectDir);
|
|
563
563
|
let linkedApp = null;
|
|
564
|
+
if (linkedState?.dev_app_id) {
|
|
565
|
+
const devApp = await getAccessibleApp(ctx.runtime, linkedState.dev_app_id, runTool);
|
|
566
|
+
if (!devApp || devApp.manifest?.is_dev !== true) {
|
|
567
|
+
const { dev_app_id: _devAppId, dev_linked_at: _devLinkedAt, ...rest } = linkedState;
|
|
568
|
+
linkedState = rest;
|
|
569
|
+
writeLinkedState(projectDir, linkedState);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
564
572
|
if (linkedState?.app_id) {
|
|
565
573
|
linkedApp = await getAccessibleApp(ctx.runtime, linkedState.app_id, runTool);
|
|
566
574
|
if (linkedApp?.manifest?.is_dev === true) {
|
|
@@ -631,7 +639,7 @@ async function getAccessibleApp(runtime, appId, runTool = runToolCommand) {
|
|
|
631
639
|
const result = await runTool({
|
|
632
640
|
runtime,
|
|
633
641
|
toolName: GET_APP_TOOL,
|
|
634
|
-
arguments_: { app_id: appId },
|
|
642
|
+
arguments_: { app_id: appId, include_documents: false },
|
|
635
643
|
});
|
|
636
644
|
if (result.payload?.app) {
|
|
637
645
|
return {
|
|
@@ -640,7 +648,11 @@ async function getAccessibleApp(runtime, appId, runTool = runToolCommand) {
|
|
|
640
648
|
};
|
|
641
649
|
}
|
|
642
650
|
const message = typeof result.payload?.message === 'string' ? result.payload.message : '';
|
|
643
|
-
|
|
651
|
+
const errorCode = result.payload?.code || result.payload?.error?.code;
|
|
652
|
+
if (
|
|
653
|
+
result.payload?.status === 'error'
|
|
654
|
+
&& (errorCode === 'app_not_found' || /^App not found\.?$/i.test(message.trim()))
|
|
655
|
+
) {
|
|
644
656
|
return null;
|
|
645
657
|
}
|
|
646
658
|
throw usageError(`Could not verify access to app ${appId}${message ? `: ${message}` : '.'}`);
|