@instafy/cli 0.2.1 → 0.2.2
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 -0
- package/dist/cli.js +10 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Run Instafy spaces locally and connect them back to Instafy Studio — from any
|
|
|
35
35
|
- `instafy conversation show "<title-or-id>"` — inspect one conversation’s messages so you can reuse earlier context in a new chat.
|
|
36
36
|
- `instafy conversation create --parent <conversationId> --thread-kind agent --title "Octo coordination"` — create a linked child thread for conversation-native agent coordination.
|
|
37
37
|
- `instafy chat --conversation <threadId> "@octo ..." --no-wait` — involve another agent by posting a normal message into a normal conversation/thread. Use non-blocking posts from inside an active runtime turn.
|
|
38
|
+
- Like an ordinary Studio chat, the CLI marks the turn as potentially workspace-writing. Controller and member permissions still apply, and read-only questions do not require a file change.
|
|
38
39
|
- `instafy agents list` — list available top-level agents.
|
|
39
40
|
- `instafy agents context list --query "<topic>"` — inspect optional compact scoped context-card hints for cross-agent coordination.
|
|
40
41
|
- `instafy agents context put --agent @octo "<summary>"` — save/update a compact context card for the current conversation when `INSTAFY_CONVERSATION_ID` is set.
|
package/dist/cli.js
CHANGED
|
@@ -7299,17 +7299,17 @@ function extractMentionedAgentHandles(prompt) {
|
|
|
7299
7299
|
}
|
|
7300
7300
|
return handles;
|
|
7301
7301
|
}
|
|
7302
|
-
function buildPromptMetadata(prompt) {
|
|
7302
|
+
function buildPromptMetadata(prompt, intent) {
|
|
7303
7303
|
const mentionedHandles = extractMentionedAgentHandles(prompt);
|
|
7304
|
+
const metadata = intent.toLowerCase() === "terminal_command" ? {} : { writeIntent: true };
|
|
7304
7305
|
if (mentionedHandles.length === 0) {
|
|
7305
|
-
return
|
|
7306
|
+
return metadata;
|
|
7306
7307
|
}
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
mentions: mentionedHandles
|
|
7311
|
-
}
|
|
7308
|
+
metadata.agentSelection = {
|
|
7309
|
+
active: mentionedHandles,
|
|
7310
|
+
mentions: mentionedHandles
|
|
7312
7311
|
};
|
|
7312
|
+
return metadata;
|
|
7313
7313
|
}
|
|
7314
7314
|
function normalizeBooleanEnv(value) {
|
|
7315
7315
|
const normalized = value?.trim().toLowerCase();
|
|
@@ -7419,10 +7419,11 @@ async function sleep(ms) {
|
|
|
7419
7419
|
}
|
|
7420
7420
|
async function dispatchPrompt(options) {
|
|
7421
7421
|
const prompt = normalizePrompt(options.prompt);
|
|
7422
|
+
const intent = options.intent?.trim() || "feature";
|
|
7422
7423
|
const payload = {
|
|
7423
7424
|
promptText: prompt,
|
|
7424
|
-
intent
|
|
7425
|
-
metadata: buildPromptMetadata(prompt)
|
|
7425
|
+
intent,
|
|
7426
|
+
metadata: buildPromptMetadata(prompt, intent)
|
|
7426
7427
|
};
|
|
7427
7428
|
if (options.conversation?.trim()) {
|
|
7428
7429
|
const conversationId2 = options.conversation.trim();
|