pilotswarm-sdk 0.1.19 → 0.1.21
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 +6 -0
- package/dist/artifact-tools.d.ts.map +1 -1
- package/dist/artifact-tools.js +20 -5
- package/dist/artifact-tools.js.map +1 -1
- package/dist/blob-store.d.ts +6 -4
- package/dist/blob-store.d.ts.map +1 -1
- package/dist/blob-store.js +55 -12
- package/dist/blob-store.js.map +1 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -0
- package/dist/client.js.map +1 -1
- package/dist/cms-migrations.d.ts.map +1 -1
- package/dist/cms-migrations.js +628 -0
- package/dist/cms-migrations.js.map +1 -1
- package/dist/cms.d.ts +145 -0
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +288 -17
- package/dist/cms.js.map +1 -1
- package/dist/facts-migrations.d.ts.map +1 -1
- package/dist/facts-migrations.js +227 -0
- package/dist/facts-migrations.js.map +1 -1
- package/dist/facts-store.d.ts +21 -0
- package/dist/facts-store.d.ts.map +1 -1
- package/dist/facts-store.js +34 -1
- package/dist/facts-store.js.map +1 -1
- package/dist/facts-tools.d.ts +7 -0
- package/dist/facts-tools.d.ts.map +1 -1
- package/dist/facts-tools.js +29 -2
- package/dist/facts-tools.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/inspect-tools.d.ts +42 -0
- package/dist/inspect-tools.d.ts.map +1 -0
- package/dist/inspect-tools.js +800 -0
- package/dist/inspect-tools.js.map +1 -0
- package/dist/managed-session.d.ts.map +1 -1
- package/dist/managed-session.js +76 -35
- package/dist/managed-session.js.map +1 -1
- package/dist/management-client.d.ts +64 -2
- package/dist/management-client.d.ts.map +1 -1
- package/dist/management-client.js +109 -0
- package/dist/management-client.js.map +1 -1
- package/dist/orchestration-registry.d.ts.map +1 -1
- package/dist/orchestration-registry.js +6 -2
- package/dist/orchestration-registry.js.map +1 -1
- package/dist/orchestration-version.d.ts +1 -1
- package/dist/orchestration-version.js +1 -1
- package/dist/orchestration.d.ts +3 -3
- package/dist/orchestration.d.ts.map +1 -1
- package/dist/orchestration.js +27 -4
- package/dist/orchestration.js.map +1 -1
- package/dist/orchestration_1_0_43.d.ts +12 -0
- package/dist/orchestration_1_0_43.d.ts.map +1 -0
- package/dist/orchestration_1_0_43.js +2710 -0
- package/dist/orchestration_1_0_43.js.map +1 -0
- package/dist/orchestration_1_0_44.d.ts +12 -0
- package/dist/orchestration_1_0_44.d.ts.map +1 -0
- package/dist/orchestration_1_0_44.js +2710 -0
- package/dist/orchestration_1_0_44.js.map +1 -0
- package/dist/session-manager.d.ts +9 -0
- package/dist/session-manager.d.ts.map +1 -1
- package/dist/session-manager.js +40 -3
- package/dist/session-manager.js.map +1 -1
- package/dist/session-owner-utils.d.ts +25 -0
- package/dist/session-owner-utils.d.ts.map +1 -0
- package/dist/session-owner-utils.js +82 -0
- package/dist/session-owner-utils.js.map +1 -0
- package/dist/session-proxy.d.ts +5 -1
- package/dist/session-proxy.d.ts.map +1 -1
- package/dist/session-proxy.js +70 -8
- package/dist/session-proxy.js.map +1 -1
- package/dist/session-store.d.ts +38 -6
- package/dist/session-store.d.ts.map +1 -1
- package/dist/session-store.js +187 -9
- package/dist/session-store.js.map +1 -1
- package/dist/types.d.ts +19 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +11 -2
- package/dist/worker.js.map +1 -1
- package/package.json +10 -4
- package/plugins/mgmt/agents/agent-tuner.agent.md +222 -0
- package/plugins/mgmt/agents/facts-manager.agent.md +8 -1
- package/plugins/mgmt/agents/pilotswarm.agent.md +13 -10
- package/plugins/mgmt/agents/resourcemgr.agent.md +11 -4
- package/plugins/mgmt/agents/sweeper.agent.md +5 -4
- package/plugins/mgmt/skills/cost-latency-analysis/SKILL.md +117 -0
- package/plugins/mgmt/skills/orchestration-session-lifecycle/SKILL.md +117 -0
- package/plugins/mgmt/skills/resourcemgr/SKILL.md +1 -1
- package/plugins/mgmt/skills/sweeper/SKILL.md +4 -4
- package/plugins/system/agents/default.agent.md +22 -0
|
@@ -12,11 +12,11 @@ and deleting completed, failed, or orphaned sessions.
|
|
|
12
12
|
|
|
13
13
|
## Default Behavior
|
|
14
14
|
|
|
15
|
-
1. Every
|
|
15
|
+
1. Every 30 minutes, use `scan_completed_sessions` (graceMinutes=5) to find stale sessions.
|
|
16
16
|
2. For each stale session found, use `cleanup_session` to delete it.
|
|
17
17
|
3. Report a brief summary of what was cleaned (just counts and short session IDs).
|
|
18
|
-
4. Every ~10 iterations, call `prune_orchestrations` to bulk-clean duroxide state (old executions, terminal instances older than 6 hours).
|
|
19
|
-
5. Use `cron(seconds=
|
|
18
|
+
4. Every ~10 iterations (about every 5 hours), call `prune_orchestrations` to bulk-clean duroxide state (old executions, terminal instances older than 6 hours).
|
|
19
|
+
5. Use `cron(seconds=1800, reason="scan for stale sessions and prune orchestration history")` to establish the recurring cleanup schedule, then continue on each cron wake-up.
|
|
20
20
|
|
|
21
21
|
## User Configuration
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Users may chat with you to adjust your behavior. Supported adjustments:
|
|
|
24
24
|
|
|
25
25
|
| Parameter | Default | Description |
|
|
26
26
|
|-----------|---------|-------------|
|
|
27
|
-
| Scan interval |
|
|
27
|
+
| Scan interval | 30m | How often to scan for stale sessions |
|
|
28
28
|
| Grace period | 5 min | How long a session must be completed before cleanup |
|
|
29
29
|
| Include orphans | yes | Whether to clean orphaned sub-agents (parent gone) |
|
|
30
30
|
| Pause/resume | running | Pause or resume the cleanup loop |
|
|
@@ -9,6 +9,7 @@ tools:
|
|
|
9
9
|
- store_fact
|
|
10
10
|
- read_facts
|
|
11
11
|
- delete_fact
|
|
12
|
+
- read_agent_events
|
|
12
13
|
- write_artifact
|
|
13
14
|
- export_artifact
|
|
14
15
|
- read_artifact
|
|
@@ -92,6 +93,18 @@ Rules:
|
|
|
92
93
|
9. Prefer facts for short structured memory and artifacts for long narrative outputs, reports, or files.
|
|
93
94
|
10. You can read your sub-agents' session-scoped facts, even if they were not marked `shared`. Pass `session_id="<child-session-id>"` to read a specific child's facts, or use `scope="descendants"` to read all descendants' facts at once. Non-descendant sessions' private facts remain inaccessible.
|
|
94
95
|
|
|
96
|
+
## Session Owners
|
|
97
|
+
|
|
98
|
+
Sessions may carry durable owner metadata for the authenticated user who first created them.
|
|
99
|
+
Treat ownership as part of the authoritative session state when you need to find a user's sessions or reason about usage by person or cohort.
|
|
100
|
+
|
|
101
|
+
- `list_sessions` accepts `owner_query`, `owner_kind`, and `include_system`.
|
|
102
|
+
- Do not add `owner_query` or `owner_kind` when checking general session health, system sessions, or the session tree. Use unfiltered discovery unless the user specifically asks for an owner/user/system/unowned filter.
|
|
103
|
+
- `owner_query` does substring matching across owner display name, email, subject, and provider. It is not a session title, agent name, or task search field.
|
|
104
|
+
- `owner_kind="user"` restricts to authenticated-user sessions. `system` and `unowned` are also valid only when the user specifically asks for that owner bucket.
|
|
105
|
+
- Session listings include an `Owner:` line for each match.
|
|
106
|
+
- Some permanent system agents also have `list_all_sessions`, `read_session_info`, and `read_user_stats` for fleet-wide owner analysis. Use those owner-aware tools when they are available instead of scanning unfiltered fleet output.
|
|
107
|
+
|
|
95
108
|
## Sub-Agent Waiting
|
|
96
109
|
|
|
97
110
|
When you have spawned sub-agents and need to wait for them:
|
|
@@ -105,6 +118,15 @@ When you have spawned sub-agents and need to wait for them:
|
|
|
105
118
|
3. Always summarize results from completed agents as they finish, don't wait for all of them.
|
|
106
119
|
4. After a sub-agent completes, use `read_facts(session_id="<agent-session-id>")` to pull any facts it stored during execution. Sub-agents write important findings, intermediate results, and state as session-scoped facts — retrieve these to get the full picture beyond the agent's final text output. Use `scope="descendants"` to pull facts from all sub-agents at once when you have multiple.
|
|
107
120
|
|
|
121
|
+
## Inspecting Sub-Agent Conversations
|
|
122
|
+
|
|
123
|
+
Prefer `check_agents` for status, `wait_for_agents` for synchronization, and `read_facts(session_id=...)` for the structured findings a child deliberately published. If those are NOT enough — for example you need to see the child's reasoning, what tools it called, why it produced a particular result, or where it went off track — use `read_agent_events`.
|
|
124
|
+
|
|
125
|
+
- `read_agent_events(agent_id="<descendant-session-id>")` returns the most recent page of durable events from a descendant in your spawn tree, newest first within each page.
|
|
126
|
+
- Walk further back in time by passing the returned `prevCursor` as the next call's `cursor`.
|
|
127
|
+
- Pass `event_types=["assistant.message","tool.invoked","turn completed"]` (or a subset) to keep token cost low; very narrow filters may return fewer rows than `limit`.
|
|
128
|
+
- You can only read events for sessions you (directly or transitively) spawned. Non-descendants and system agents are off-limits.
|
|
129
|
+
|
|
108
130
|
## Sub-Agent Task Instructions
|
|
109
131
|
|
|
110
132
|
When spawning sub-agents, write **explicit reporting instructions** in the task description. Sub-agents have no access to your conversation — they only know what you put in the `task` parameter.
|