martty 0.3.2-beta.1 → 0.3.2-beta.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.
@@ -20,12 +20,17 @@ import { downloadFile } from './download.js'
20
20
  export const ACP_REGISTRY_URL = 'https://cdn.agentclientprotocol.com/registry/v1/latest/registry.json'
21
21
 
22
22
  export const OPENMA_PI_ACP = '@openma/pi-acp@latest'
23
+ export const OPENMA_PI_ACP_REPOSITORY = 'https://github.com/openma-ai/pi-acp'
23
24
 
24
25
  function preferMarttyPiAcp(records) {
25
26
  return records.map((record) => record.id === 'pi-acp' ? {
26
27
  ...record,
27
- label: 'Pi (OpenMA)',
28
+ label: 'pi-acp',
28
29
  version: 'latest',
30
+ // The official catalog also lists an unrelated unprefixed pi-acp package;
31
+ // Martty only ever launches @openma/pi-acp, and the repository URL is how
32
+ // users tell the two entries apart.
33
+ repository: OPENMA_PI_ACP_REPOSITORY,
29
34
  distributions: [{
30
35
  type: 'npx', command: 'npx', args: [OPENMA_PI_ACP], env: {},
31
36
  }],
@@ -144,6 +149,7 @@ export function normalizeAcpRegistry(value, options = {}) {
144
149
  ...(typeof agent.icon === 'string' ? { icon: agent.icon } : {}),
145
150
  version: agent.version,
146
151
  description: typeof agent.description === 'string' ? agent.description : '',
152
+ ...(typeof agent.repository === 'string' ? { repository: agent.repository } : {}),
147
153
  distributions,
148
154
  }]
149
155
  })
@@ -41,6 +41,15 @@ function findDescription(entry) {
41
41
  return `found locally · configure · ${commandText(entry)}`
42
42
  }
43
43
 
44
+ // Registry entries carry their repository like the catalog's name /
45
+ // description / repository triple; the URL distinguishes same-named
46
+ // harnesses (e.g. @openma/pi-acp from the unrelated registry pi-acp).
47
+ function describeCandidate(entry) {
48
+ const detail = findDescription(entry)
49
+ const repository = entry.registryRecord?.repository
50
+ return repository === undefined ? detail : `${detail} · ${repository}`
51
+ }
52
+
44
53
  export function apply(ctx, options = {}) {
45
54
  const settingsPath = options.settingsPath
46
55
  let registryPromise
@@ -477,7 +486,7 @@ export function apply(ctx, options = {}) {
477
486
  openSelect({ id: 'harness-find', title: failure ? 'Add Harness · Registry offline' : pending ? 'Add Harness · checking Registry…' : 'Add Harness', searchable: true,
478
487
  value: entries[0]?.id ?? REFRESH,
479
488
  options: [
480
- ...entries.map((entry) => ({ value: entry.id, label: entry.label, description: findDescription(entry),
489
+ ...entries.map((entry) => ({ value: entry.id, label: entry.label, description: describeCandidate(entry),
481
490
  ...currentOption(entry),
482
491
  group: locallyAvailable(entry) ? 'Installed / configured' : entry.status === 'Checking locally' ? 'Catalog' : 'Not downloaded' })),
483
492
  { value: REFRESH, label: failure ? 'Retry Registry' : 'Refresh Registry', description: failure ? errorText(failure) : 'Recheck the catalog and local programs' },
package/lib/harnesses.js CHANGED
@@ -25,6 +25,8 @@ export { fetchAcpRegistry } from './harness-registry.js'
25
25
  const HARNESS_ID = /^[a-z0-9][a-z0-9-]*$/
26
26
  const PI_ACP_LATEST = OPENMA_PI_ACP
27
27
  const PI_ACP_SPEC = /^(?:@openma\/)?pi-acp(?:@.+)?$/
28
+ const PI_ACP_ID = 'pi-acp'
29
+ const PI_ACP_LEGACY_LABEL = 'Pi (OpenMA)'
28
30
  const ANSI = Object.freeze({ reset: '\x1b[0m', bold: '\x1b[1m', dim: '\x1b[2m', cyan: '\x1b[36m', green: '\x1b[32m' })
29
31
 
30
32
  // Kept as a source-compatible empty export. The source of truth is the
@@ -373,11 +375,14 @@ function validateHarness(value) {
373
375
  // through npm, never through a Martty release.
374
376
  .map((arg) => PI_ACP_SPEC.test(arg) ? PI_ACP_LATEST : arg)
375
377
  : [...args]
378
+ const label = typeof value.label === 'string' && value.label.trim().length > 0
379
+ ? value.label
380
+ : value.id
376
381
  return {
377
382
  id: value.id,
378
- label: typeof value.label === 'string' && value.label.trim().length > 0
379
- ? value.label
380
- : value.id,
383
+ // Configs saved when the pi harness was branded "Pi (OpenMA)" keep
384
+ // working; only the stale default display label migrates to the id.
385
+ label: value.id === PI_ACP_ID && label === PI_ACP_LEGACY_LABEL ? PI_ACP_ID : label,
381
386
  command: value.command,
382
387
  args: normalizedArgs,
383
388
  ...(env !== undefined ? { env: { ...env } } : {}),
@@ -529,6 +534,7 @@ function registryRecords(options = {}) {
529
534
  : record.id,
530
535
  version: typeof record.version === 'string' ? record.version : 'unversioned',
531
536
  description: typeof record.description === 'string' ? record.description : '',
537
+ ...(typeof record.repository === 'string' ? { repository: record.repository } : {}),
532
538
  distributions,
533
539
  }]
534
540
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "martty",
3
- "version": "0.3.2-beta.1",
3
+ "version": "0.3.2-beta.3",
4
4
  "description": "Terminal-native ACP client UI; Cordis client tree, any ACP agent",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -77,7 +77,7 @@
77
77
  "dependencies": {
78
78
  "@deepseek-ai/cordis": "^4.0.1",
79
79
  "@lobehub/icons-static-svg": "1.95.0",
80
- "@openma/deepseek-harness-acp": "0.4.37",
80
+ "@openma/deepseek-harness-acp": "0.4.38-beta.1",
81
81
  "@resvg/resvg-js": "2.6.2",
82
82
  "cross-spawn": "^7.0.6",
83
83
  "node-downloader-helper": "2.1.11"
@@ -97,10 +97,10 @@
97
97
  "agent-client-protocol"
98
98
  ],
99
99
  "optionalDependencies": {
100
- "@openma/martty-darwin-arm64": "0.3.2-beta.1",
101
- "@openma/martty-darwin-x64": "0.3.2-beta.1",
102
- "@openma/martty-linux-x64": "0.3.2-beta.1",
103
- "@openma/martty-linux-arm64": "0.3.2-beta.1",
104
- "@openma/martty-win32-x64": "0.3.2-beta.1"
100
+ "@openma/martty-darwin-arm64": "0.3.2-beta.3",
101
+ "@openma/martty-darwin-x64": "0.3.2-beta.3",
102
+ "@openma/martty-linux-x64": "0.3.2-beta.3",
103
+ "@openma/martty-linux-arm64": "0.3.2-beta.3",
104
+ "@openma/martty-win32-x64": "0.3.2-beta.3"
105
105
  }
106
106
  }