@memnexus-ai/typescript-sdk 1.75.6 → 1.76.1
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/dist/index.cjs +34 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -2
- package/dist/index.d.ts +63 -2
- package/dist/index.js +34 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2430,7 +2430,7 @@ var MemoriesService = class extends BaseService {
|
|
|
2430
2430
|
* @param topics - Comma-separated topic names. Memories must have at least one matching topic.
|
|
2431
2431
|
* @param excludeTopics - Comma-separated topic names. Memories with any matching topic are excluded.
|
|
2432
2432
|
* @param conversationId - Filter to memories belonging to the given conversation.
|
|
2433
|
-
* @param scope - Filter by codeContext scope. Comma-separated key:value pairs (e.g. scope=product:memnexus,team:retrieval). Memories must match ALL specified scope pairs. Allowed keys, product, service, team, role — unknown keys return 400.
|
|
2433
|
+
* @param scope - Filter by codeContext scope. Comma-separated key:value pairs (e.g. scope=product:memnexus,team:retrieval). Memories must match ALL specified scope pairs. Allowed keys, product, service, team, role — unknown keys, or input that yields no valid pairs, return 400.
|
|
2434
2434
|
*/
|
|
2435
2435
|
async listMemories(options) {
|
|
2436
2436
|
const request = new Request({
|
|
@@ -2698,7 +2698,7 @@ var MemoriesService = class extends BaseService {
|
|
|
2698
2698
|
* @param claimsWeight - Weight for claims vector branch in hybrid search
|
|
2699
2699
|
* @param includeFacets - Include facet aggregation (topics, memoryType, effectiveState) in response
|
|
2700
2700
|
* @param embeddingProvider - Which embedding provider to use for query-time embedding generation and vector index lookup. `voyage` is the canonical name for the secondary provider (Voyage voyage-3.5, 1024d); `openai` is accepted as a legacy alias and now also resolves to Voyage after v1.66 P0-EMBED-SWAP. Falls back to ollama when the secondary provider is unavailable.
|
|
2701
|
-
* @param scope - Filter by codeContext scope. Comma-separated key:value pairs (e.g. scope=product:memnexus,service:core-api). Memories must match ALL specified scope pairs. Allowed keys, product, service, team, role — unknown keys return 400.
|
|
2701
|
+
* @param scope - Filter by codeContext scope. Comma-separated key:value pairs (e.g. scope=product:memnexus,service:core-api). Memories must match ALL specified scope pairs. Allowed keys, product, service, team, role — unknown keys, or input that yields no valid pairs, return 400.
|
|
2702
2702
|
* @param taskId - Task-scoped retrieval: returns own-history first, fills remainder with cross-task results.
|
|
2703
2703
|
* @param outcomeFilter - Filter by task outcome. Use 'resolved' to find successful approaches from past tasks.
|
|
2704
2704
|
*/
|
|
@@ -3357,6 +3357,27 @@ var MemoriesService = class extends BaseService {
|
|
|
3357
3357
|
matching into a single call. Eliminates the 5+ round-trip pattern agents
|
|
3358
3358
|
use today.
|
|
3359
3359
|
|
|
3360
|
+
**Project scoping (optional).** Send `scope` as comma-separated
|
|
3361
|
+
`key:value` pairs (allowed keys: `product`, `service`, `team`, `role`) —
|
|
3362
|
+
the same format the list and search endpoints accept — to restrict the
|
|
3363
|
+
briefing to one project. All pairs must match (AND), so each extra key
|
|
3364
|
+
can only shrink the result set; send the fewest keys that identify the
|
|
3365
|
+
project (`product:<project>` is the recommended default). An unknown
|
|
3366
|
+
key, or a `scope` string that yields no valid `key:value` pair at all,
|
|
3367
|
+
returns 400 — a scope request that cannot be honoured is never
|
|
3368
|
+
silently downgraded to an unscoped briefing.
|
|
3369
|
+
|
|
3370
|
+
When `scope` is set, memories that carry no `codeContext` at all are
|
|
3371
|
+
excluded by default: a scoped request returns scoped content only. Send
|
|
3372
|
+
`includeUnscoped: true` to also include unlabeled memories. Without
|
|
3373
|
+
`scope` the flag is inert — accepted, no filter runs, and neither field
|
|
3374
|
+
is echoed in `meta`. Omitting `scope` reproduces today's behavior exactly.
|
|
3375
|
+
|
|
3376
|
+
Two sections cannot be scope-filtered and are named in
|
|
3377
|
+
`meta.unfilteredSections` on any scoped request rather than being served
|
|
3378
|
+
as if they had been filtered: `relatedPatterns` (Pattern nodes carry no
|
|
3379
|
+
`codeContext`) and `commitContext` (an account-wide adoption count).
|
|
3380
|
+
|
|
3360
3381
|
* @param body - Request body
|
|
3361
3382
|
*/
|
|
3362
3383
|
async buildContext(body) {
|
|
@@ -7894,7 +7915,11 @@ var buildContextRequest = import_zod.z.object({
|
|
|
7894
7915
|
/** File paths you will be touching */
|
|
7895
7916
|
files: import_zod.z.array(import_zod.z.string()).optional(),
|
|
7896
7917
|
/** How far back to look for recent activity (hours, default 24) */
|
|
7897
|
-
recentHours: import_zod.z.number().min(1).max(720).optional()
|
|
7918
|
+
recentHours: import_zod.z.number().min(1).max(720).optional(),
|
|
7919
|
+
/** Comma-separated codeContext key:value pairs to filter by. Allowed keys: product, service, team, role. All pairs must match (AND), so each extra key can only shrink the result set — a key your memories do not consistently carry will silently empty the brief. Send the fewest keys that identify the project; product:<project> alone is the recommended default. An unknown key, or a string that yields no valid key:value pair at all, returns 400 rather than an unscoped brief. */
|
|
7920
|
+
scope: import_zod.z.string().max(200).optional(),
|
|
7921
|
+
/** When scope is set, whether to also return memories that carry no codeContext at all. Defaults to false when scope is set — a scoped request returns scoped content only. Send true to also include memories that carry no codeContext. Inert when scope is absent. */
|
|
7922
|
+
includeUnscoped: import_zod.z.boolean().optional()
|
|
7898
7923
|
});
|
|
7899
7924
|
var buildContextActiveWork = import_zod.z.object({
|
|
7900
7925
|
/** Conversation ID */
|
|
@@ -7954,6 +7979,12 @@ var buildContextMeta = import_zod.z.object({
|
|
|
7954
7979
|
contextTerms: import_zod.z.array(import_zod.z.string()),
|
|
7955
7980
|
/** Hours window used for recent activity */
|
|
7956
7981
|
recentHours: import_zod.z.number(),
|
|
7982
|
+
/** The parsed codeContext scope the request was filtered by. Present only when the request sent a scope. */
|
|
7983
|
+
scope: import_zod.z.object({}).catchall(import_zod.z.string()).optional(),
|
|
7984
|
+
/** The RESOLVED includeUnscoped value the request ran with — false when the caller sent scope and omitted the field. Present only when the request sent a scope; without scope the flag is inert and is not echoed. */
|
|
7985
|
+
includeUnscoped: import_zod.z.boolean().optional(),
|
|
7986
|
+
/** Sections the scope filter did not constrain, so a caller never has to assume a section was filtered when it was not. relatedPatterns cannot be scoped (Pattern nodes carry no codeContext and no path back to a source memory); commitContext is an account-wide adoption count by design. Present only when the request sent a scope. */
|
|
7987
|
+
unfilteredSections: import_zod.z.array(import_zod.z.string()).optional(),
|
|
7957
7988
|
/** Sections whose backing query exceeded the per-branch timeout and were returned empty. Present only when at least one branch timed out, so an empty section can otherwise be read as 'no data'. */
|
|
7958
7989
|
timedOutSections: import_zod.z.array(import_zod.z.string()).optional()
|
|
7959
7990
|
});
|