overlord-cli 0.2608191554.0 → 0.2608191901.0

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.
@@ -80,6 +80,34 @@ function booleanProperty(description) {
80
80
  return { type: 'boolean', description };
81
81
  }
82
82
 
83
+ function compactSearchResponse(response) {
84
+ const value = response?.structuredContent;
85
+ if (!value || value.version !== 3 || !Array.isArray(value.results)) return response;
86
+ const compact = {
87
+ ...value,
88
+ results: value.results.map(result => ({
89
+ ...result,
90
+ matches: Array.isArray(result.matches)
91
+ ? result.matches
92
+ .slice(0, 2)
93
+ .map(match => {
94
+ const compactMatch = { ...match };
95
+ delete compactMatch.snippet;
96
+ delete compactMatch.matchedTerms;
97
+ delete compactMatch.createdAt;
98
+ delete compactMatch.updatedAt;
99
+ return compactMatch;
100
+ })
101
+ : result.matches
102
+ }))
103
+ };
104
+ return {
105
+ ...response,
106
+ content: [{ type: 'text', text: JSON.stringify(compact, null, 2) }],
107
+ structuredContent: compact
108
+ };
109
+ }
110
+
83
111
  const tools = [
84
112
  {
85
113
  name: 'overlord_resolve_project',
@@ -134,7 +162,7 @@ const tools = [
134
162
  name: 'overlord_search_missions',
135
163
  title: 'Search Overlord missions',
136
164
  description:
137
- "Search missions across the caller's authorized workspaces in one organization. Returns applied filters and truncation metadata; complete and cancelled missions remain eligible by default.",
165
+ "Search mission anchors with their matching objectives and deliveries across authorized workspaces. An objective displayId can be passed directly to overlord_load_mission_context; matches are matched-only, not the full objective list. Artifacts are not indexed. Use absolute ISO from/to bounds (no relative dates or implicit window), inspect workspaceCounts, entityCounts, and truncatedCandidates before claiming completeness, and treat appliedFilters.mode 'fallback' as a recency listing. Compact detail is default; request full for child snippets and metadata.",
138
166
  inputSchema: objectSchema({
139
167
  query: stringProperty('Search query text.'),
140
168
  status: stringProperty(
@@ -157,6 +185,23 @@ const tools = [
157
185
  limit: {
158
186
  type: 'number',
159
187
  description: 'Maximum result count. Defaults to 25.'
188
+ },
189
+ entityTypes: stringProperty(
190
+ 'Optional comma-separated v3 entity types: mission, objective, delivery.'
191
+ ),
192
+ objectiveStates: stringProperty(
193
+ 'Optional comma-separated v3 objective states for matching objectives.'
194
+ ),
195
+ matchesPerResult: {
196
+ type: 'number',
197
+ description:
198
+ 'Optional v3 child-match cap per mission (default 3, max 10; compact returns at most 2).'
199
+ },
200
+ detail: {
201
+ type: 'string',
202
+ enum: ['compact', 'full'],
203
+ description:
204
+ 'Result detail: compact (default) keeps child navigation fields and removes child snippets/metadata; full returns complete v3 child matches.'
160
205
  }
161
206
  })
162
207
  },
@@ -455,7 +500,7 @@ function missionScopeFlags(args) {
455
500
  };
456
501
  }
457
502
 
458
- function callOverlordTool(name, args) {
503
+ async function callOverlordTool(name, args) {
459
504
  if (name === 'overlord_resolve_project') {
460
505
  return runProtocol('discover-project', {
461
506
  ...(optionalString(args, 'projectId')
@@ -488,8 +533,12 @@ function callOverlordTool(name, args) {
488
533
  });
489
534
  }
490
535
  if (name === 'overlord_search_missions') {
491
- return runProtocol('search-missions', {
492
- 'response-version': '2',
536
+ const detail = optionalString(args, 'detail') || 'compact';
537
+ if (detail !== 'compact' && detail !== 'full') {
538
+ throw new Error("detail must be 'compact' or 'full'");
539
+ }
540
+ const response = await runProtocol('search', {
541
+ 'response-version': '3',
493
542
  ...(optionalString(args, 'query') ? { query: requiredString(args, 'query') } : {}),
494
543
  ...(optionalString(args, 'status') ? { status: requiredString(args, 'status') } : {}),
495
544
  ...(optionalString(args, 'projectId')
@@ -508,8 +557,18 @@ function callOverlordTool(name, args) {
508
557
  ...(optionalString(args, 'to') ? { to: requiredString(args, 'to') } : {}),
509
558
  ...(typeof args.limit === 'number' && Number.isFinite(args.limit)
510
559
  ? { limit: String(Math.trunc(args.limit)) }
560
+ : {}),
561
+ ...(optionalString(args, 'entityTypes')
562
+ ? { 'entity-types': requiredString(args, 'entityTypes') }
563
+ : {}),
564
+ ...(optionalString(args, 'objectiveStates')
565
+ ? { 'objective-states': requiredString(args, 'objectiveStates') }
566
+ : {}),
567
+ ...(typeof args.matchesPerResult === 'number' && Number.isFinite(args.matchesPerResult)
568
+ ? { 'matches-per-result': String(Math.trunc(args.matchesPerResult)) }
511
569
  : {})
512
570
  });
571
+ return detail === 'compact' ? compactSearchResponse(response) : response;
513
572
  }
514
573
  if (name === 'overlord_create_mission') {
515
574
  return runProtocol('create', {
package/dist/index.js CHANGED
@@ -6675,6 +6675,13 @@ var init_resource_paths = __esm({
6675
6675
  }
6676
6676
  });
6677
6677
 
6678
+ // ../packages/contract/dist/search.js
6679
+ var init_search = __esm({
6680
+ "../packages/contract/dist/search.js"() {
6681
+ "use strict";
6682
+ }
6683
+ });
6684
+
6678
6685
  // ../packages/contract/dist/index.js
6679
6686
  var MY_MISSIONS_COLUMNS, MY_MISSIONS_COLUMN_TYPES;
6680
6687
  var init_dist2 = __esm({
@@ -6684,6 +6691,7 @@ var init_dist2 = __esm({
6684
6691
  init_launch_variables();
6685
6692
  init_objective_ref();
6686
6693
  init_resource_paths();
6694
+ init_search();
6687
6695
  MY_MISSIONS_COLUMNS = [
6688
6696
  { type: "next", label: "Next" },
6689
6697
  { type: "execute", label: "Executing" },
@@ -20909,7 +20917,8 @@ Subcommands:
20909
20917
  attach Start a mission session and return full working context
20910
20918
  connect Start a lightweight session without full context assembly
20911
20919
  load-context Read mission context without creating a session
20912
- search-missions Find missions by keyword, status, or project
20920
+ search Find grouped mission/objective/delivery matches (canonical)
20921
+ search-missions Compatibility alias for search
20913
20922
  discuss-objective Mark a draft objective as submitted (does not start execution)
20914
20923
  add-objectives Append ordered objectives to an existing mission
20915
20924
  update-objective Set auto-advance and/or instruction text on an objective
@@ -21018,9 +21027,9 @@ load-context:
21018
21027
  rediscovering the mission's active objective. Required
21019
21028
  on a mission running objectives in parallel.
21020
21029
 
21021
- search-missions:
21030
+ search:
21022
21031
  Purpose:
21023
- Find missions by keyword, status type, or project.
21032
+ Find grouped mission, objective, and delivery matches by keyword, status type, or project.
21024
21033
  Optional:
21025
21034
  --query <text> Free-text search
21026
21035
  --status <csv> Comma-separated status TYPES (e.g. execute,review).
@@ -21042,11 +21051,16 @@ search-missions:
21042
21051
  --from <ISO-8601> Inclusive date/time lower bound
21043
21052
  --to <ISO-8601> Exclusive date/time upper bound
21044
21053
  --limit <n> Max results (default: 25)
21045
- --response-version <1|2> 1 (default) returns the legacy array; 2 returns
21054
+ --response-version <1|2|3> 1 (default) returns the legacy array; 2 returns
21046
21055
  SearchMissionsResponseV2 with snippets, match
21047
- evidence, appliedFilters, and truncation counts
21056
+ evidence, appliedFilters, and truncation counts;
21057
+ 3 returns SearchResponseV3 with grouped objective
21058
+ and delivery matches
21059
+ --entity-types <csv> V3 only: mission,objective,delivery (default all)
21060
+ --objective-states <csv> V3 only: restrict matching objective states
21061
+ --matches-per-result <n> V3 only: child matches per mission (default 3, max 10)
21048
21062
  Returns:
21049
- JSON with matching missions (v1) or the versioned search envelope (v2).
21063
+ JSON with matching missions (v1) or the versioned search envelope (v2/v3).
21050
21064
 
21051
21065
  statuses:
21052
21066
  Purpose:
@@ -21402,6 +21416,7 @@ var init_protocol_help = __esm({
21402
21416
  "record-touched",
21403
21417
  "record-work",
21404
21418
  "resume-follow-up",
21419
+ "search",
21405
21420
  "search-missions",
21406
21421
  "update",
21407
21422
  "update-artifact",
@@ -25031,7 +25046,7 @@ Protocol (JSON output by default):
25031
25046
  ${primaryCommand} protocol heartbeat --mission-id <id> --session-key <key>
25032
25047
  ${primaryCommand} protocol ask --mission-id <id> --session-key <key> --question "..."
25033
25048
  ${primaryCommand} protocol deliver --mission-id <id> --session-key <key> --summary "..."
25034
- ${primaryCommand} protocol search-missions --query "<text>" --status execute,review
25049
+ ${primaryCommand} protocol search --query "<text>" --status execute,review
25035
25050
  ${primaryCommand} protocol statuses --project-id <id|slug|name>
25036
25051
  ${primaryCommand} protocol load-context --mission-id <id>
25037
25052
  ${primaryCommand} protocol help