@memnexus-ai/sdk 1.75.5 → 1.76.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.
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +21 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1396,6 +1396,27 @@ var Memories = class {
|
|
|
1396
1396
|
* matching into a single call. Eliminates the 5+ round-trip pattern agents
|
|
1397
1397
|
* use today.
|
|
1398
1398
|
*
|
|
1399
|
+
* **Project scoping (optional).** Send `scope` as comma-separated
|
|
1400
|
+
* `key:value` pairs (allowed keys: `product`, `service`, `team`, `role`) —
|
|
1401
|
+
* the same format the list and search endpoints accept — to restrict the
|
|
1402
|
+
* briefing to one project. All pairs must match (AND), so each extra key
|
|
1403
|
+
* can only shrink the result set; send the fewest keys that identify the
|
|
1404
|
+
* project (`product:<project>` is the recommended default). An unknown
|
|
1405
|
+
* key, or a `scope` string that yields no valid `key:value` pair at all,
|
|
1406
|
+
* returns 400 — a scope request that cannot be honoured is never
|
|
1407
|
+
* silently downgraded to an unscoped briefing.
|
|
1408
|
+
*
|
|
1409
|
+
* When `scope` is set, memories that carry no `codeContext` at all are
|
|
1410
|
+
* excluded by default: a scoped request returns scoped content only. Send
|
|
1411
|
+
* `includeUnscoped: true` to also include unlabeled memories. Without
|
|
1412
|
+
* `scope` the flag is inert — accepted, no filter runs, and neither field
|
|
1413
|
+
* is echoed in `meta`. Omitting `scope` reproduces today's behavior exactly.
|
|
1414
|
+
*
|
|
1415
|
+
* Two sections cannot be scope-filtered and are named in
|
|
1416
|
+
* `meta.unfilteredSections` on any scoped request rather than being served
|
|
1417
|
+
* as if they had been filtered: `relatedPatterns` (Pattern nodes carry no
|
|
1418
|
+
* `codeContext`) and `commitContext` (an account-wide adoption count).
|
|
1419
|
+
*
|
|
1399
1420
|
* @param body — Request body
|
|
1400
1421
|
*/
|
|
1401
1422
|
async buildContext(body) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1515,6 +1515,10 @@ interface BuildContextRequest {
|
|
|
1515
1515
|
files?: string[];
|
|
1516
1516
|
/** How far back to look for recent activity (hours, default 24) */
|
|
1517
1517
|
recentHours?: number;
|
|
1518
|
+
/** 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. */
|
|
1519
|
+
scope?: string;
|
|
1520
|
+
/** 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. */
|
|
1521
|
+
includeUnscoped?: boolean;
|
|
1518
1522
|
}
|
|
1519
1523
|
/** Most relevant active conversation, or null if none found */
|
|
1520
1524
|
interface BuildContextActiveWork {
|
|
@@ -1574,6 +1578,12 @@ interface BuildContextMeta {
|
|
|
1574
1578
|
contextTerms: string[];
|
|
1575
1579
|
/** Hours window used for recent activity */
|
|
1576
1580
|
recentHours: number;
|
|
1581
|
+
/** The parsed codeContext scope the request was filtered by. Present only when the request sent a scope. */
|
|
1582
|
+
scope?: Record<string, unknown>;
|
|
1583
|
+
/** 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. */
|
|
1584
|
+
includeUnscoped?: boolean;
|
|
1585
|
+
/** 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. */
|
|
1586
|
+
unfilteredSections?: string[];
|
|
1577
1587
|
/** 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'. */
|
|
1578
1588
|
timedOutSections?: string[];
|
|
1579
1589
|
}
|
|
@@ -2865,12 +2875,35 @@ declare class Memories {
|
|
|
2865
2875
|
* matching into a single call. Eliminates the 5+ round-trip pattern agents
|
|
2866
2876
|
* use today.
|
|
2867
2877
|
*
|
|
2878
|
+
* **Project scoping (optional).** Send `scope` as comma-separated
|
|
2879
|
+
* `key:value` pairs (allowed keys: `product`, `service`, `team`, `role`) —
|
|
2880
|
+
* the same format the list and search endpoints accept — to restrict the
|
|
2881
|
+
* briefing to one project. All pairs must match (AND), so each extra key
|
|
2882
|
+
* can only shrink the result set; send the fewest keys that identify the
|
|
2883
|
+
* project (`product:<project>` is the recommended default). An unknown
|
|
2884
|
+
* key, or a `scope` string that yields no valid `key:value` pair at all,
|
|
2885
|
+
* returns 400 — a scope request that cannot be honoured is never
|
|
2886
|
+
* silently downgraded to an unscoped briefing.
|
|
2887
|
+
*
|
|
2888
|
+
* When `scope` is set, memories that carry no `codeContext` at all are
|
|
2889
|
+
* excluded by default: a scoped request returns scoped content only. Send
|
|
2890
|
+
* `includeUnscoped: true` to also include unlabeled memories. Without
|
|
2891
|
+
* `scope` the flag is inert — accepted, no filter runs, and neither field
|
|
2892
|
+
* is echoed in `meta`. Omitting `scope` reproduces today's behavior exactly.
|
|
2893
|
+
*
|
|
2894
|
+
* Two sections cannot be scope-filtered and are named in
|
|
2895
|
+
* `meta.unfilteredSections` on any scoped request rather than being served
|
|
2896
|
+
* as if they had been filtered: `relatedPatterns` (Pattern nodes carry no
|
|
2897
|
+
* `codeContext`) and `commitContext` (an account-wide adoption count).
|
|
2898
|
+
*
|
|
2868
2899
|
* @param body — Request body
|
|
2869
2900
|
*/
|
|
2870
2901
|
buildContext(body: {
|
|
2871
2902
|
context: string;
|
|
2872
2903
|
files?: string[];
|
|
2873
2904
|
recentHours?: number;
|
|
2905
|
+
scope?: string;
|
|
2906
|
+
includeUnscoped?: boolean;
|
|
2874
2907
|
}): Promise<HttpResponse<{
|
|
2875
2908
|
activeWork: BuildContextActiveWork;
|
|
2876
2909
|
relevantFacts: BuildContextFact[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1515,6 +1515,10 @@ interface BuildContextRequest {
|
|
|
1515
1515
|
files?: string[];
|
|
1516
1516
|
/** How far back to look for recent activity (hours, default 24) */
|
|
1517
1517
|
recentHours?: number;
|
|
1518
|
+
/** 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. */
|
|
1519
|
+
scope?: string;
|
|
1520
|
+
/** 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. */
|
|
1521
|
+
includeUnscoped?: boolean;
|
|
1518
1522
|
}
|
|
1519
1523
|
/** Most relevant active conversation, or null if none found */
|
|
1520
1524
|
interface BuildContextActiveWork {
|
|
@@ -1574,6 +1578,12 @@ interface BuildContextMeta {
|
|
|
1574
1578
|
contextTerms: string[];
|
|
1575
1579
|
/** Hours window used for recent activity */
|
|
1576
1580
|
recentHours: number;
|
|
1581
|
+
/** The parsed codeContext scope the request was filtered by. Present only when the request sent a scope. */
|
|
1582
|
+
scope?: Record<string, unknown>;
|
|
1583
|
+
/** 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. */
|
|
1584
|
+
includeUnscoped?: boolean;
|
|
1585
|
+
/** 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. */
|
|
1586
|
+
unfilteredSections?: string[];
|
|
1577
1587
|
/** 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'. */
|
|
1578
1588
|
timedOutSections?: string[];
|
|
1579
1589
|
}
|
|
@@ -2865,12 +2875,35 @@ declare class Memories {
|
|
|
2865
2875
|
* matching into a single call. Eliminates the 5+ round-trip pattern agents
|
|
2866
2876
|
* use today.
|
|
2867
2877
|
*
|
|
2878
|
+
* **Project scoping (optional).** Send `scope` as comma-separated
|
|
2879
|
+
* `key:value` pairs (allowed keys: `product`, `service`, `team`, `role`) —
|
|
2880
|
+
* the same format the list and search endpoints accept — to restrict the
|
|
2881
|
+
* briefing to one project. All pairs must match (AND), so each extra key
|
|
2882
|
+
* can only shrink the result set; send the fewest keys that identify the
|
|
2883
|
+
* project (`product:<project>` is the recommended default). An unknown
|
|
2884
|
+
* key, or a `scope` string that yields no valid `key:value` pair at all,
|
|
2885
|
+
* returns 400 — a scope request that cannot be honoured is never
|
|
2886
|
+
* silently downgraded to an unscoped briefing.
|
|
2887
|
+
*
|
|
2888
|
+
* When `scope` is set, memories that carry no `codeContext` at all are
|
|
2889
|
+
* excluded by default: a scoped request returns scoped content only. Send
|
|
2890
|
+
* `includeUnscoped: true` to also include unlabeled memories. Without
|
|
2891
|
+
* `scope` the flag is inert — accepted, no filter runs, and neither field
|
|
2892
|
+
* is echoed in `meta`. Omitting `scope` reproduces today's behavior exactly.
|
|
2893
|
+
*
|
|
2894
|
+
* Two sections cannot be scope-filtered and are named in
|
|
2895
|
+
* `meta.unfilteredSections` on any scoped request rather than being served
|
|
2896
|
+
* as if they had been filtered: `relatedPatterns` (Pattern nodes carry no
|
|
2897
|
+
* `codeContext`) and `commitContext` (an account-wide adoption count).
|
|
2898
|
+
*
|
|
2868
2899
|
* @param body — Request body
|
|
2869
2900
|
*/
|
|
2870
2901
|
buildContext(body: {
|
|
2871
2902
|
context: string;
|
|
2872
2903
|
files?: string[];
|
|
2873
2904
|
recentHours?: number;
|
|
2905
|
+
scope?: string;
|
|
2906
|
+
includeUnscoped?: boolean;
|
|
2874
2907
|
}): Promise<HttpResponse<{
|
|
2875
2908
|
activeWork: BuildContextActiveWork;
|
|
2876
2909
|
relevantFacts: BuildContextFact[];
|
package/dist/index.js
CHANGED
|
@@ -1369,6 +1369,27 @@ var Memories = class {
|
|
|
1369
1369
|
* matching into a single call. Eliminates the 5+ round-trip pattern agents
|
|
1370
1370
|
* use today.
|
|
1371
1371
|
*
|
|
1372
|
+
* **Project scoping (optional).** Send `scope` as comma-separated
|
|
1373
|
+
* `key:value` pairs (allowed keys: `product`, `service`, `team`, `role`) —
|
|
1374
|
+
* the same format the list and search endpoints accept — to restrict the
|
|
1375
|
+
* briefing to one project. All pairs must match (AND), so each extra key
|
|
1376
|
+
* can only shrink the result set; send the fewest keys that identify the
|
|
1377
|
+
* project (`product:<project>` is the recommended default). An unknown
|
|
1378
|
+
* key, or a `scope` string that yields no valid `key:value` pair at all,
|
|
1379
|
+
* returns 400 — a scope request that cannot be honoured is never
|
|
1380
|
+
* silently downgraded to an unscoped briefing.
|
|
1381
|
+
*
|
|
1382
|
+
* When `scope` is set, memories that carry no `codeContext` at all are
|
|
1383
|
+
* excluded by default: a scoped request returns scoped content only. Send
|
|
1384
|
+
* `includeUnscoped: true` to also include unlabeled memories. Without
|
|
1385
|
+
* `scope` the flag is inert — accepted, no filter runs, and neither field
|
|
1386
|
+
* is echoed in `meta`. Omitting `scope` reproduces today's behavior exactly.
|
|
1387
|
+
*
|
|
1388
|
+
* Two sections cannot be scope-filtered and are named in
|
|
1389
|
+
* `meta.unfilteredSections` on any scoped request rather than being served
|
|
1390
|
+
* as if they had been filtered: `relatedPatterns` (Pattern nodes carry no
|
|
1391
|
+
* `codeContext`) and `commitContext` (an account-wide adoption count).
|
|
1392
|
+
*
|
|
1372
1393
|
* @param body — Request body
|
|
1373
1394
|
*/
|
|
1374
1395
|
async buildContext(body) {
|