@instafy/cli 0.2.2 → 0.2.3
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 +56 -3
- package/dist/cli.js +2766 -1933
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -31,14 +31,20 @@ Run Instafy spaces locally and connect them back to Instafy Studio — from any
|
|
|
31
31
|
- Works for existing members and pending invites.
|
|
32
32
|
- `builder` means read & write.
|
|
33
33
|
- Fallbacks: `--space <id>` or `--team-id <uuid>` when the folder is not linked yet
|
|
34
|
-
- `instafy conversation search "<keywords>"` —
|
|
35
|
-
- `instafy conversation
|
|
34
|
+
- `instafy conversation search "<keywords>"` — search recent titles/previews and recent messages in at most 12 conversations. Use `grep` for persisted message content beyond those recent pages.
|
|
35
|
+
- `instafy conversation grep "<text>" --json` — search authorized persisted user/assistant messages in the linked space, with snippets and exact message IDs.
|
|
36
|
+
- `instafy conversation context <conversationId> <messageId> --json` — read a bounded window around an exact message, including old messages outside the latest history page.
|
|
37
|
+
- `instafy conversation show "<title-or-id>"` — inspect one conversation’s messages so you can reuse earlier context in a new chat. With no target it reads `INSTAFY_CONVERSATION_ID`, the conversation a runtime job belongs to.
|
|
38
|
+
- Add `--transcript --json` for original user/assistant text with message IDs and timestamps, without tool events or runtime metadata. JSON messages are newest first; `--limit` counts transcript messages (default 80, maximum 200). Each call scans at most 2,000 stored rows. When `hasMore` is true, continue with `--transcript --cursor <nextCursor>`; an empty page can still have older text. This is a text-only view: attachment/card metadata stays available in the unchanged raw `--json` output.
|
|
36
39
|
- `instafy conversation create --parent <conversationId> --thread-kind agent --title "Octo coordination"` — create a linked child thread for conversation-native agent coordination.
|
|
37
40
|
- `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
41
|
- 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.
|
|
39
42
|
- `instafy agents list` — list available top-level agents.
|
|
40
43
|
- `instafy agents context list --query "<topic>"` — inspect optional compact scoped context-card hints for cross-agent coordination.
|
|
41
44
|
- `instafy agents context put --agent @octo "<summary>"` — save/update a compact context card for the current conversation when `INSTAFY_CONVERSATION_ID` is set.
|
|
45
|
+
- `instafy automations create --name "Octo check-in" --mode space_review --schedule-kind hourly --interval-hours 24` — explicitly opt in to private, quiet space reviews; no custom prompt is needed.
|
|
46
|
+
- `instafy recommendations list --limit 200 --json` — inspect the linked space's recommendations, including delivery state and accepted or dismissed outcomes visible to this session.
|
|
47
|
+
- `instafy recommendations submit --file - --json` — read one JSON recommendation from stdin. Add an optional `message` to deliver a normal private Octo chat with source links; omit it for legacy proposal-only behavior. A workspace file can replace `-`. Delivery does not start the suggested work. Delivered, accepted and dismissed keys keep their existing outcome.
|
|
42
48
|
- Context cards are a bounded cache, not the primary collaboration path: the controller keeps the newest 200 cards per user/project/agent.
|
|
43
49
|
- Use context cards for soft work focus and overlap hints, not hard locks: note the agent/thread, topic/path/domain, open questions, and where follow-up should go. Structured `writeScope` metadata remains the safety mechanism for concurrent file edits.
|
|
44
50
|
- `instafy git <args...>` — run git commands against an Instafy canonical checkout (`.instafy/.git`) when present.
|
|
@@ -58,6 +64,14 @@ Run Instafy spaces locally and connect them back to Instafy Studio — from any
|
|
|
58
64
|
signed-in user.
|
|
59
65
|
- `instafy support list` — list only your own support reports.
|
|
60
66
|
- `instafy support show <reportId>` — inspect one of your own support reports.
|
|
67
|
+
- `instafy support messages <reportId>` — read the customer-visible case timeline.
|
|
68
|
+
- `instafy support reply <reportId> "More details"` — add a follow-up as the reporter.
|
|
69
|
+
|
|
70
|
+
`support report` and `support reply` print their request UUID to stderr before sending. Reuse that
|
|
71
|
+
value with `--client-request-id` only when retrying the exact same payload after an uncertain
|
|
72
|
+
network result; using the same UUID for different content is rejected.
|
|
73
|
+
Support list/message JSON includes `hasMore` and a stable `nextCursor`; pass its paired activity or
|
|
74
|
+
message cursor flags to read the next page without skipping reports that share a cursor timestamp.
|
|
61
75
|
- `instafy diagnostics runtime-events` — emit sanitized runtime events for the linked space as
|
|
62
76
|
versioned JSON.
|
|
63
77
|
- `instafy diagnostics run-result <runId>` — emit one authorized persisted run result as
|
|
@@ -69,6 +83,43 @@ Run Instafy spaces locally and connect them back to Instafy Studio — from any
|
|
|
69
83
|
|
|
70
84
|
Run `instafy --help` for the public command list and options.
|
|
71
85
|
|
|
86
|
+
## Search conversation context
|
|
87
|
+
|
|
88
|
+
After `instafy login`, local agents and terminal users can recover earlier chat evidence without
|
|
89
|
+
opening Studio:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
instafy conversation grep "auth session" --json
|
|
93
|
+
instafy conversation grep "auth session" --org <orgId> --limit 20 --json
|
|
94
|
+
instafy conversation context <conversationId> <messageId> --before 20 --after 20 --json
|
|
95
|
+
rg "auth session" .
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Use `grep` for conversation messages and `rg` for local files. `grep` matches literal,
|
|
99
|
+
case-insensitive text (2–200 characters), not regular expressions. It searches the linked space by
|
|
100
|
+
default; choose one of `--space <id>`, `--org <id>`, `--personal`, or `--all` to change scope. Access
|
|
101
|
+
and conversation visibility are enforced by the controller. These reads do not wake a runtime.
|
|
102
|
+
|
|
103
|
+
Results are newest first, with a default page of 30 messages (maximum 50). Repeat the same query
|
|
104
|
+
and scope with `--cursor <nextCursor>` to continue. JSON includes plain-text snippets, UTF-16
|
|
105
|
+
highlight ranges, stable IDs, and pagination. Human output is one escaped line per match:
|
|
106
|
+
`spaceId:conversationId:messageId:role:timestamp: snippet`. Exit codes are 0 for matches, 1 for no
|
|
107
|
+
matches, and 2 for errors, including invalid arguments. JSON no-match output remains a valid empty
|
|
108
|
+
result page.
|
|
109
|
+
|
|
110
|
+
`context` defaults to 20 messages before and after the target (maximum 50 each). JSON retains
|
|
111
|
+
canonical message IDs in newest-first order and provides `olderCursor`/`newerCursor` plus
|
|
112
|
+
`hasOlder`/`hasNewer`. To read farther back, use the older cursor as the next message ID with
|
|
113
|
+
`--before 40 --after 0`; to read forward, use the newer cursor with `--before 0 --after 40`.
|
|
114
|
+
Adjacent pages repeat their anchor; deduplicate by message ID. Human context is chronological and
|
|
115
|
+
marks the requested message with `>`.
|
|
116
|
+
|
|
117
|
+
Both commands require signed-in user credentials from `instafy login`, an explicit user
|
|
118
|
+
`--access-token`, or `INSTAFY_ACCESS_TOKEN`/`SUPABASE_ACCESS_TOKEN`. They do not accept unattended
|
|
119
|
+
runtime-agent, origin, or service credentials and do not mint runtime tokens. Saved logins remain
|
|
120
|
+
bound to their controller origin. The controller must support message search/context; older
|
|
121
|
+
controllers report the unavailable API rather than falling back to a partial recent-message scan.
|
|
122
|
+
|
|
72
123
|
## AI-readable diagnostics
|
|
73
124
|
|
|
74
125
|
`instafy diagnostics` is the machine-readable diagnostics surface for local agents such as Codex
|
|
@@ -96,7 +147,9 @@ explicit user access token), and the controller limits list/show operations to r
|
|
|
96
147
|
that user. Reports use the currently linked space by default; pass `--no-linked-space` to omit that
|
|
97
148
|
context. Diagnostics are opt-in: details, metadata, logs, and screenshots are uploaded only when
|
|
98
149
|
their corresponding flags are supplied, and file inputs must stay within the active workspace.
|
|
99
|
-
|
|
150
|
+
The signed-in account identity, including its email snapshot, is attached for report ownership and
|
|
151
|
+
support contact; it is not part of the optional diagnostic payload. Use `--preview` to inspect the
|
|
152
|
+
upload summary without sending a report.
|
|
100
153
|
Ordinary users receive a minimized owner-only report view; full triage fields and attachment bytes
|
|
101
154
|
require operator/service authorization.
|
|
102
155
|
|