Repository navigation
Conversation
…gacy REST SDK md-indexer used @inferedge-rest/moss, which calls moss-control's legacy /manage createIndex/deleteIndex. moss-control is retiring the /manage write actions (usemoss/infra-moss-tf#317), and indexes built that way carry no model artifact identity, so current SDKs refuse text queries on them. The moss_vitepress demo site rebuilds its index through this package on every push to main, and is the only steady /manage write caller left. Swap the client for MossClient from @moss-dev/moss, which builds indexes in moss-index-manager. Behaviour is unchanged: delete the index if present, then create it with the configured model. The client is now closed after use. Bumps the package to 1.0.0-beta.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/moss-md-indexer/package.json">
<violation number="1" location="packages/moss-md-indexer/package.json:26">
P2: This manifest change leaves the tracked npm lockfile on beta.3 and `@inferedge-rest/moss`, so `npm ci` cannot reproduce the new dependency set. Regenerate or remove `packages/moss-md-indexer/package-lock.json` to keep the repository’s install metadata consistent.</violation>
<violation number="2" location="packages/moss-md-indexer/package.json:26">
P2: `@moss-dev/moss@1.7.1` requires Node 20.4+, but this package still documents Node 18+ and does not declare an engine requirement. Update the runtime documentation and package `engines`, or choose an SDK compatible with Node 18.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Turn on auto-fix | Re-trigger cubic
| }, | ||
| "dependencies": { | ||
| "@inferedge-rest/moss": ">=1.0.0-beta.3", | ||
| "@moss-dev/moss": "^1.7.1", |
There was a problem hiding this comment.
P2: This manifest change leaves the tracked npm lockfile on beta.3 and @inferedge-rest/moss, so npm ci cannot reproduce the new dependency set. Regenerate or remove packages/moss-md-indexer/package-lock.json to keep the repository’s install metadata consistent.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/moss-md-indexer/package.json, line 26:
<comment>This manifest change leaves the tracked npm lockfile on beta.3 and `@inferedge-rest/moss`, so `npm ci` cannot reproduce the new dependency set. Regenerate or remove `packages/moss-md-indexer/package-lock.json` to keep the repository’s install metadata consistent.</comment>
<file context>
@@ -23,7 +23,7 @@
},
"dependencies": {
- "@inferedge-rest/moss": ">=1.0.0-beta.3",
+ "@moss-dev/moss": "^1.7.1",
"cheerio": "^1.0.0",
"dotenv": "^16.4.5",
</file context>
| }, | ||
| "dependencies": { | ||
| "@inferedge-rest/moss": ">=1.0.0-beta.3", | ||
| "@moss-dev/moss": "^1.7.1", |
There was a problem hiding this comment.
P2: @moss-dev/moss@1.7.1 requires Node 20.4+, but this package still documents Node 18+ and does not declare an engine requirement. Update the runtime documentation and package engines, or choose an SDK compatible with Node 18.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/moss-md-indexer/package.json, line 26:
<comment>`@moss-dev/moss@1.7.1` requires Node 20.4+, but this package still documents Node 18+ and does not declare an engine requirement. Update the runtime documentation and package `engines`, or choose an SDK compatible with Node 18.</comment>
<file context>
@@ -23,7 +23,7 @@
},
"dependencies": {
- "@inferedge-rest/moss": ">=1.0.0-beta.3",
+ "@moss-dev/moss": "^1.7.1",
"cheerio": "^1.0.0",
"dotenv": "^16.4.5",
</file context>
Pull Request Checklist
Description
@moss-tools/md-indexeruploads through@inferedge-rest/moss, a pre-1.0 SDK that calls moss-control's legacy/managedeleteIndex+createIndex. That blocks the moss-control release:/managewrite actions (they answer 410). Its precondition is no write traffic left on/manage./managewrite caller is themoss_vitepressVercel project (rootpackages/vitepress-plugin-moss/demo-site). On every push tomainits build runsvitepress-plugin-moss→ md-indexer 1.0.0-beta.3 →deleteIndexthencreateIndexon indexfilter, twice per build. Once release: Moss iOS SDK v0.6.0 #317 ships, the delete would still succeed and the create would fail, leaving the docs site with no search index.This PR swaps the client for
MossClientfrom@moss-js/moss(1.21.0, the current JS SDK;@moss-dev/mossis the older name, still at 1.7.1). It builds indexes in moss-index-manager (service.usemoss.dev/index) and never calls moss-control.Behaviour is otherwise unchanged: delete the index if present, then create it with the configured model (
modelId). The public API (uploadDocuments,createIndex,sync,buildJsonDocs, types) is the same. The client is now closed after use.This covers the same SDK migration as #528, kept to the minimum needed to unblock the moss-control release. #528 also switches to a non-destructive upsert. That's worth doing as a follow-up, but as written it would throw on the live
filterindex (it was built by the old SDK, so it has no model version) instead of rebuilding it. Thanks to @PredictiveManish for flagging the legacy dependency.Type of Change
How I tested
pnpm build(tsc) passes;dist/has no reference to@inferedge-rest/moss.@moss-js/mossmocked (Node 24,node:test):{ modelId }, then closes the client.Moss Upload Failed: …and the client is still closed.@moss-js/mossnative module under Node 24.22.1 and opened and closed a client.moss_vitepressbuild after step 3 below.Rollout (needed for the docs site to pick this up)
1.0.0-beta.4. Its last two runs in April failed. The logs have expired, but they most likely tried to republish1.0.0-beta.3, and the version bump avoids that.packages/vitepress-plugin-moss/pnpm-lock.yamlto md-indexer1.0.0-beta.4. The demo site installs the plugin's dependencies from that lockfile, so^1.0.0-beta.3alone keeps resolvingbeta.3.moss_vitepressbuild log, and confirm moss-control's CloudWatch shows no/managewrites from that project.package-lock.jsonin this package was already stale. Regenerating it churns about 1,900 lines, so I left it alone; publishing usespnpm-lock.yaml.🤖 Generated with Claude Code
Summary by CodeRabbit
/managewrite actions are being retired; use current SDKs to manage indexes.