pi-fabric 0.136.0 → 0.137.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/chunks/{chunk-K4VRQ7WZ.js → chunk-4Q6BMC7D.js} +313 -19
- package/dist/chunks/chunk-4Q6BMC7D.js.map +7 -0
- package/dist/chunks/{chunk-PPTFUSAA.js → chunk-6NNL5LOG.js} +2 -2
- package/dist/chunks/{chunk-WYLBWFAO.js → chunk-KPGIX546.js} +6 -5
- package/dist/chunks/chunk-KPGIX546.js.map +7 -0
- package/dist/chunks/{chunk-QYGCBTG4.js → chunk-LJDI3EVA.js} +1 -1
- package/dist/chunks/{chunk-JSNTEGU6.js → chunk-RFNYH7S7.js} +1 -1
- package/dist/chunks/{chunk-JQRYL27I.js → chunk-V5RZK45W.js} +24 -1
- package/dist/chunks/{chunk-JQRYL27I.js.map → chunk-V5RZK45W.js.map} +2 -2
- package/dist/chunks/{chunk-OILZ4PDY.js → chunk-XNFJ3ONW.js} +2 -2
- package/dist/durable-extension.js +1 -1
- package/dist/durable-extension.js.map +1 -1
- package/dist/extension-bootstrap.js +1 -1
- package/dist/fabric-runtime-state.js +5 -3
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/jev.js +1 -1
- package/dist/memory/expand-service.d.ts.map +1 -1
- package/dist/memory/file-worker.js +1 -1
- package/dist/memory/outline-service.d.ts +7 -0
- package/dist/memory/outline-service.d.ts.map +1 -0
- package/dist/memory/request-cache.d.ts +3 -1
- package/dist/memory/request-cache.d.ts.map +1 -1
- package/dist/memory/request-context.d.ts +1 -0
- package/dist/memory/request-context.d.ts.map +1 -1
- package/dist/memory/request-limits.d.ts +2 -0
- package/dist/memory/request-limits.d.ts.map +1 -1
- package/dist/memory/worker-provider.d.ts.map +1 -1
- package/dist/memory/worker-provider.js +2 -2
- package/dist/memory.js +2 -2
- package/dist/providers/jev-provider.js +1 -1
- package/dist/providers/memory-provider.d.ts +4 -0
- package/dist/providers/memory-provider.d.ts.map +1 -1
- package/dist/providers/memory-provider.js +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/typescript-kernel.js +2 -2
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/speculation/eligibility.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/docs/memory-recall.md +35 -0
- package/package.json +1 -1
- package/skillsets/python/fabric-guide/SKILL.md +1 -0
- package/skillsets/python/fabric-memory/SKILL.md +82 -0
- package/skillsets/typescript/fabric-exec/SKILL.md +1 -0
- package/skillsets/typescript/fabric-guide/SKILL.md +1 -0
- package/skillsets/typescript/fabric-memory/SKILL.md +87 -0
- package/dist/chunks/chunk-K4VRQ7WZ.js.map +0 -7
- package/dist/chunks/chunk-WYLBWFAO.js.map +0 -7
- /package/dist/chunks/{chunk-PPTFUSAA.js.map → chunk-6NNL5LOG.js.map} +0 -0
- /package/dist/chunks/{chunk-QYGCBTG4.js.map → chunk-LJDI3EVA.js.map} +0 -0
- /package/dist/chunks/{chunk-JSNTEGU6.js.map → chunk-RFNYH7S7.js.map} +0 -0
- /package/dist/chunks/{chunk-OILZ4PDY.js.map → chunk-XNFJ3ONW.js.map} +0 -0
|
@@ -245,6 +245,8 @@ var EXPAND_DEFAULT_MAX_ENTRIES = 10;
|
|
|
245
245
|
var EXPAND_MAX_ENTRIES = 20;
|
|
246
246
|
var EXPAND_MAX_CONTEXT = 100;
|
|
247
247
|
var EXPAND_MAX_EXACT_SELECTORS = 100;
|
|
248
|
+
var OUTLINE_MAX_ENTRIES = 200;
|
|
249
|
+
var OUTLINE_PREVIEW_CHARS = 120;
|
|
248
250
|
var SESSIONS_MAX = 500;
|
|
249
251
|
|
|
250
252
|
// src/memory/request-context.ts
|
|
@@ -254,8 +256,15 @@ var parseBranches = (value, action) => {
|
|
|
254
256
|
if (value === "active" || value === "all") return value;
|
|
255
257
|
throw new Error(`${action} branches must be "active" or "all"`);
|
|
256
258
|
};
|
|
259
|
+
var parseRoleFilter = (value, action) => {
|
|
260
|
+
if (value === void 0) return void 0;
|
|
261
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
262
|
+
throw new Error(`${action} role must be a non-empty normalized role string`);
|
|
263
|
+
}
|
|
264
|
+
return value;
|
|
265
|
+
};
|
|
257
266
|
var resolveIndexOptions = (config, agentDir, branches, liveBranchForFile) => ({
|
|
258
|
-
indexDir: config.indexDir ??
|
|
267
|
+
indexDir: config.indexDir ?? path.join(agentDir, "fabric", "memory-index"),
|
|
259
268
|
maxEntryChars: config.maxEntryChars,
|
|
260
269
|
branches,
|
|
261
270
|
indexThinking: config.indexThinking ?? false,
|
|
@@ -1160,6 +1169,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1160
1169
|
const expectedSourceHash = typeof args.expectedSourceHash === "string" ? args.expectedSourceHash : void 0;
|
|
1161
1170
|
const expectedLineageFingerprint = typeof args.expectedLineageFingerprint === "string" ? args.expectedLineageFingerprint : void 0;
|
|
1162
1171
|
const branches = parseBranches(args.branches, "memory.expand");
|
|
1172
|
+
const role = parseRoleFilter(args.role, "memory.expand");
|
|
1163
1173
|
const rawIndices = args.indices;
|
|
1164
1174
|
if (rawIndices !== void 0 && !Array.isArray(rawIndices)) {
|
|
1165
1175
|
throw new Error("memory.expand indices must be an array");
|
|
@@ -1304,6 +1314,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1304
1314
|
lineageFingerprint: finalLineage2.fingerprint,
|
|
1305
1315
|
observation: finalObservation,
|
|
1306
1316
|
entries: normalized,
|
|
1317
|
+
indexCoverage: normalizedFull.indexCoverage,
|
|
1307
1318
|
selections: /* @__PURE__ */ new Map(),
|
|
1308
1319
|
touchedAt: Date.now()
|
|
1309
1320
|
};
|
|
@@ -1400,7 +1411,19 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1400
1411
|
resolved
|
|
1401
1412
|
);
|
|
1402
1413
|
}
|
|
1403
|
-
const selected = resolved.entries;
|
|
1414
|
+
const selected = role === void 0 ? resolved.entries : resolved.entries.filter((entry) => entry.role === role);
|
|
1415
|
+
if (selected.length === 0) {
|
|
1416
|
+
cache.forgetExpansionSnapshot(snapshot);
|
|
1417
|
+
return {
|
|
1418
|
+
session: ref.file,
|
|
1419
|
+
sourceHash: snapshot.sourceHash,
|
|
1420
|
+
branches,
|
|
1421
|
+
lineageFingerprint: snapshot.lineageFingerprint,
|
|
1422
|
+
entryCount,
|
|
1423
|
+
entries: [],
|
|
1424
|
+
next: null
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1404
1427
|
const canonicalSelection = resolved.canonical;
|
|
1405
1428
|
const anchorIndex = resolved.anchorIndex;
|
|
1406
1429
|
const finalState = snapshot;
|
|
@@ -1498,6 +1521,7 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1498
1521
|
expectedLineageFingerprint: finalLineage.fingerprint,
|
|
1499
1522
|
branches,
|
|
1500
1523
|
...canonicalSelection,
|
|
1524
|
+
...role !== void 0 ? { role } : {},
|
|
1501
1525
|
entryOffset: cursor2.position,
|
|
1502
1526
|
...cursor2.textOffset > 0 ? { textOffset: cursor2.textOffset } : {},
|
|
1503
1527
|
maxChars,
|
|
@@ -1603,6 +1627,189 @@ async function processMemoryExpand(args, context, cache, signal) {
|
|
|
1603
1627
|
return response;
|
|
1604
1628
|
}
|
|
1605
1629
|
|
|
1630
|
+
// src/memory/outline-service.ts
|
|
1631
|
+
var outlinePreview = (text) => {
|
|
1632
|
+
const firstLine = text.split("\n", 1)[0] ?? "";
|
|
1633
|
+
const collapsed = firstLine.replace(/\s+/g, " ").trim();
|
|
1634
|
+
if (collapsed.length <= OUTLINE_PREVIEW_CHARS) return collapsed;
|
|
1635
|
+
let end = OUTLINE_PREVIEW_CHARS - 1;
|
|
1636
|
+
const boundary = collapsed.charCodeAt(end - 1);
|
|
1637
|
+
if (boundary >= 55296 && boundary <= 56319) end -= 1;
|
|
1638
|
+
return `${collapsed.slice(0, end)}\u2026`;
|
|
1639
|
+
};
|
|
1640
|
+
var OUTLINE_TOOL_CHARS = 512;
|
|
1641
|
+
var outlineTool = (tool) => tool.length <= OUTLINE_TOOL_CHARS ? tool : `${tool.slice(0, OUTLINE_TOOL_CHARS - 1)}\u2026`;
|
|
1642
|
+
var outlineRow = (entry) => ({
|
|
1643
|
+
index: entry.index,
|
|
1644
|
+
type: entry.type,
|
|
1645
|
+
...entry.role !== null ? { role: entry.role } : {},
|
|
1646
|
+
...entry.toolName !== null ? { tool: outlineTool(entry.toolName) } : {},
|
|
1647
|
+
preview: outlinePreview(entry.text),
|
|
1648
|
+
size: entry.text.length
|
|
1649
|
+
});
|
|
1650
|
+
async function processMemoryOutline(args, context, cache, signal) {
|
|
1651
|
+
const session = typeof args.session === "string" ? args.session : "";
|
|
1652
|
+
const sourceId = typeof args.source === "string" && args.source.length > 0 ? args.source : void 0;
|
|
1653
|
+
const expectedSourceHash = typeof args.expectedSourceHash === "string" ? args.expectedSourceHash : void 0;
|
|
1654
|
+
const expectedLineageFingerprint = typeof args.expectedLineageFingerprint === "string" ? args.expectedLineageFingerprint : void 0;
|
|
1655
|
+
const branches = parseBranches(args.branches, "memory.outline");
|
|
1656
|
+
const role = parseRoleFilter(args.role, "memory.outline");
|
|
1657
|
+
const maxEntries = typeof args.maxEntries === "number" && Number.isSafeInteger(args.maxEntries) && args.maxEntries >= 1 ? Math.min(args.maxEntries, OUTLINE_MAX_ENTRIES) : OUTLINE_MAX_ENTRIES;
|
|
1658
|
+
if (!session) throw new Error("memory.outline requires a session");
|
|
1659
|
+
let access;
|
|
1660
|
+
if (sourceId !== void 0) {
|
|
1661
|
+
try {
|
|
1662
|
+
access = await hostExpansionAccess(sourceId, session, context, signal);
|
|
1663
|
+
} catch (error) {
|
|
1664
|
+
const failure = memorySourceFailure(error);
|
|
1665
|
+
if (!failure) throw error;
|
|
1666
|
+
return { session, error: failure, entries: [] };
|
|
1667
|
+
}
|
|
1668
|
+
} else {
|
|
1669
|
+
access = fileExpansionAccess(session, context);
|
|
1670
|
+
}
|
|
1671
|
+
if (!access) {
|
|
1672
|
+
return {
|
|
1673
|
+
session,
|
|
1674
|
+
error: { code: "session_not_found", message: `Session not found: ${session}` },
|
|
1675
|
+
entries: []
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
const ref = access.ref;
|
|
1679
|
+
const observedSource = access.observe(branches);
|
|
1680
|
+
let snapshot = cache.cachedExpansionSnapshot(ref.file, branches, observedSource, context.fabricScope?.digest);
|
|
1681
|
+
if (snapshot) {
|
|
1682
|
+
const sourceChanged = expectedSourceHash !== void 0 && snapshot.sourceHash !== expectedSourceHash;
|
|
1683
|
+
const lineageChanged = expectedLineageFingerprint !== void 0 && snapshot.lineageFingerprint !== expectedLineageFingerprint;
|
|
1684
|
+
if (!pointerCurrent(!sourceChanged, !lineageChanged)) {
|
|
1685
|
+
return {
|
|
1686
|
+
session: ref.file,
|
|
1687
|
+
branches,
|
|
1688
|
+
error: stalePointerError(
|
|
1689
|
+
ref.file,
|
|
1690
|
+
expectedSourceHash,
|
|
1691
|
+
snapshot.sourceHash,
|
|
1692
|
+
expectedLineageFingerprint,
|
|
1693
|
+
snapshot.lineageFingerprint
|
|
1694
|
+
),
|
|
1695
|
+
entries: []
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
if (!snapshot) {
|
|
1700
|
+
const initialState = access.state();
|
|
1701
|
+
if (!initialState) {
|
|
1702
|
+
return {
|
|
1703
|
+
session: ref.file,
|
|
1704
|
+
error: { code: "source_unavailable", message: `Session source is unavailable: ${ref.file}` },
|
|
1705
|
+
entries: []
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
const initialLineage = access.lineage(branches);
|
|
1709
|
+
const sourceChanged = expectedSourceHash !== void 0 && initialState.sourceHash !== expectedSourceHash;
|
|
1710
|
+
const lineageChanged = expectedLineageFingerprint !== void 0 && initialLineage.fingerprint !== expectedLineageFingerprint;
|
|
1711
|
+
if (!pointerCurrent(!sourceChanged, !lineageChanged)) {
|
|
1712
|
+
return {
|
|
1713
|
+
session: ref.file,
|
|
1714
|
+
branches,
|
|
1715
|
+
error: stalePointerError(
|
|
1716
|
+
ref.file,
|
|
1717
|
+
expectedSourceHash,
|
|
1718
|
+
initialState.sourceHash,
|
|
1719
|
+
expectedLineageFingerprint,
|
|
1720
|
+
initialLineage.fingerprint
|
|
1721
|
+
),
|
|
1722
|
+
entries: []
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
const normalizedFull = access.normalizeFull(
|
|
1726
|
+
branches,
|
|
1727
|
+
{ indexThinking: true, indexToolOutput: true },
|
|
1728
|
+
initialLineage
|
|
1729
|
+
);
|
|
1730
|
+
if (!normalizedFull) {
|
|
1731
|
+
return {
|
|
1732
|
+
session: ref.file,
|
|
1733
|
+
error: stalePointerError(
|
|
1734
|
+
ref.file,
|
|
1735
|
+
expectedSourceHash ?? initialState.sourceHash,
|
|
1736
|
+
initialState.sourceHash,
|
|
1737
|
+
expectedLineageFingerprint ?? initialLineage.fingerprint,
|
|
1738
|
+
initialLineage.fingerprint
|
|
1739
|
+
),
|
|
1740
|
+
entries: []
|
|
1741
|
+
};
|
|
1742
|
+
}
|
|
1743
|
+
const normalized = normalizedFull.entries;
|
|
1744
|
+
const finalState = access.state();
|
|
1745
|
+
const finalLineage = access.lineage(branches);
|
|
1746
|
+
const finalObservation = access.observe(branches);
|
|
1747
|
+
if (!finalState || !finalObservation || !pointerCurrent(finalState.sourceHash === initialState.sourceHash, finalLineage.fingerprint === initialLineage.fingerprint)) {
|
|
1748
|
+
return {
|
|
1749
|
+
session: ref.file,
|
|
1750
|
+
error: stalePointerError(
|
|
1751
|
+
ref.file,
|
|
1752
|
+
expectedSourceHash ?? initialState.sourceHash,
|
|
1753
|
+
finalState?.sourceHash ?? "",
|
|
1754
|
+
expectedLineageFingerprint ?? initialLineage.fingerprint,
|
|
1755
|
+
finalLineage.fingerprint
|
|
1756
|
+
),
|
|
1757
|
+
entries: []
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
snapshot = {
|
|
1761
|
+
file: ref.file,
|
|
1762
|
+
branches,
|
|
1763
|
+
...context.fabricScope ? { scopeDigest: context.fabricScope.digest } : {},
|
|
1764
|
+
sourceHash: finalState.sourceHash,
|
|
1765
|
+
lineageFingerprint: finalLineage.fingerprint,
|
|
1766
|
+
observation: finalObservation,
|
|
1767
|
+
entries: normalized,
|
|
1768
|
+
indexCoverage: normalizedFull.indexCoverage,
|
|
1769
|
+
selections: /* @__PURE__ */ new Map(),
|
|
1770
|
+
touchedAt: Date.now()
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
const all = snapshot.entries;
|
|
1774
|
+
const filtered = role === void 0 ? all : all.filter((entry) => entry.role === role);
|
|
1775
|
+
const rows = filtered.slice(0, maxEntries).map(outlineRow);
|
|
1776
|
+
const coverage = snapshot.indexCoverage;
|
|
1777
|
+
const response = {
|
|
1778
|
+
session: ref.file,
|
|
1779
|
+
sourceHash: snapshot.sourceHash,
|
|
1780
|
+
branches,
|
|
1781
|
+
lineageFingerprint: snapshot.lineageFingerprint,
|
|
1782
|
+
entryCount: all.length,
|
|
1783
|
+
total: filtered.length,
|
|
1784
|
+
truncated: filtered.length > rows.length,
|
|
1785
|
+
// Partial host-source coverage must never pose as a complete session: an
|
|
1786
|
+
// incomplete normalizer coverage surfaces here (same complete/reasons
|
|
1787
|
+
// shape the index reports), surviving the snapshot cache on both paths.
|
|
1788
|
+
...coverage !== void 0 && !coverage.complete ? { coverage: { complete: false, reasons: [...coverage.reasons] } } : {},
|
|
1789
|
+
entries: rows
|
|
1790
|
+
};
|
|
1791
|
+
const endingObservation = access.observe(branches);
|
|
1792
|
+
cache.forgetExpansionSnapshot(snapshot);
|
|
1793
|
+
if (!endingObservation || !sameSourceObservation(snapshot.observation, endingObservation)) {
|
|
1794
|
+
const actualState = access.state();
|
|
1795
|
+
const actualLineage = access.lineage(branches);
|
|
1796
|
+
if (!actualState || !endingObservation || !pointerCurrent(actualState.sourceHash === snapshot.sourceHash, actualLineage.fingerprint === snapshot.lineageFingerprint)) {
|
|
1797
|
+
return {
|
|
1798
|
+
session: ref.file,
|
|
1799
|
+
error: stalePointerError(
|
|
1800
|
+
ref.file,
|
|
1801
|
+
expectedSourceHash ?? snapshot.sourceHash,
|
|
1802
|
+
actualState?.sourceHash ?? "",
|
|
1803
|
+
expectedLineageFingerprint ?? snapshot.lineageFingerprint,
|
|
1804
|
+
actualLineage.fingerprint
|
|
1805
|
+
),
|
|
1806
|
+
entries: []
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
return response;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1606
1813
|
// src/memory/sessions-service.ts
|
|
1607
1814
|
async function processMemorySessions(args, context, signal) {
|
|
1608
1815
|
const sourceId = typeof args.source === "string" && args.source.length > 0 ? args.source : void 0;
|
|
@@ -1868,6 +2075,61 @@ var expandOutputSchema = {
|
|
|
1868
2075
|
},
|
|
1869
2076
|
required: ["entries"]
|
|
1870
2077
|
};
|
|
2078
|
+
var outlineOutputSchema = {
|
|
2079
|
+
type: "object",
|
|
2080
|
+
description: "Ordered entry skeleton: one bounded row per entry \u2014 the map before expand.",
|
|
2081
|
+
properties: {
|
|
2082
|
+
session: { type: "string" },
|
|
2083
|
+
sourceHash: { type: "string" },
|
|
2084
|
+
branches: { type: "string", enum: ["active", "all"] },
|
|
2085
|
+
lineageFingerprint: { type: "string" },
|
|
2086
|
+
entryCount: {
|
|
2087
|
+
type: "number",
|
|
2088
|
+
description: "Entries in the resolved session, before any role filter."
|
|
2089
|
+
},
|
|
2090
|
+
total: {
|
|
2091
|
+
type: "number",
|
|
2092
|
+
description: "Skeleton rows after the role filter; equals entries.length unless truncated."
|
|
2093
|
+
},
|
|
2094
|
+
truncated: { type: "boolean" },
|
|
2095
|
+
coverage: {
|
|
2096
|
+
type: "object",
|
|
2097
|
+
description: "Present only when the resolved session's index coverage is incomplete: entries and total may describe a partial session.",
|
|
2098
|
+
properties: {
|
|
2099
|
+
complete: { type: "boolean" },
|
|
2100
|
+
reasons: {
|
|
2101
|
+
type: "array",
|
|
2102
|
+
items: { type: "string" },
|
|
2103
|
+
description: "Stable machine-readable incompleteness codes; empty when complete is true."
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
required: ["complete", "reasons"]
|
|
2107
|
+
},
|
|
2108
|
+
entries: {
|
|
2109
|
+
type: "array",
|
|
2110
|
+
items: {
|
|
2111
|
+
type: "object",
|
|
2112
|
+
properties: {
|
|
2113
|
+
index: { type: "number" },
|
|
2114
|
+
type: { type: "string" },
|
|
2115
|
+
role: { type: "string" },
|
|
2116
|
+
tool: { type: "string" },
|
|
2117
|
+
preview: {
|
|
2118
|
+
type: "string",
|
|
2119
|
+
description: "First line of the entry text, whitespace-collapsed, bounded to 120 characters."
|
|
2120
|
+
},
|
|
2121
|
+
size: {
|
|
2122
|
+
type: "number",
|
|
2123
|
+
description: "Rendered entry-text length; the size memory.expand returns for this index."
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
required: ["index", "type", "preview", "size"]
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
error: errorOutputSchema
|
|
2130
|
+
},
|
|
2131
|
+
required: ["entries"]
|
|
2132
|
+
};
|
|
1871
2133
|
var sessionsOutputSchema = {
|
|
1872
2134
|
type: "object",
|
|
1873
2135
|
properties: {
|
|
@@ -1960,22 +2222,7 @@ var memoryActionDescriptors = [
|
|
|
1960
2222
|
},
|
|
1961
2223
|
role: {
|
|
1962
2224
|
type: "string",
|
|
1963
|
-
|
|
1964
|
-
"assistant",
|
|
1965
|
-
"bashExecution",
|
|
1966
|
-
"branchCustomMessage",
|
|
1967
|
-
"branchSummary",
|
|
1968
|
-
"branchUser",
|
|
1969
|
-
"compaction",
|
|
1970
|
-
"compactionSummary",
|
|
1971
|
-
"custom",
|
|
1972
|
-
"fabricOperation",
|
|
1973
|
-
"fabricPhase",
|
|
1974
|
-
"fabricRun",
|
|
1975
|
-
"toolResult",
|
|
1976
|
-
"user"
|
|
1977
|
-
],
|
|
1978
|
-
description: "Exact normalized entry role to filter by: the closed set the session normalizer can produce."
|
|
2225
|
+
description: "Exact normalized entry role to filter by (e.g. user, assistant, toolResult). The normalizer keeps any nonempty message role, so other values are accepted."
|
|
1979
2226
|
},
|
|
1980
2227
|
tool: { type: "string" },
|
|
1981
2228
|
ref: {
|
|
@@ -2038,6 +2285,10 @@ var memoryActionDescriptors = [
|
|
|
2038
2285
|
enum: ["active", "all"],
|
|
2039
2286
|
description: "Expand on the active parent-linked path (default) or across every branch."
|
|
2040
2287
|
},
|
|
2288
|
+
role: {
|
|
2289
|
+
type: "string",
|
|
2290
|
+
description: "Exact normalized entry role (e.g. user, assistant, toolResult); filters the resolved selection before chunking and rides the continuation. Any nonempty role the normalizer keeps is accepted."
|
|
2291
|
+
},
|
|
2041
2292
|
indices: { type: "array", maxItems: EXPAND_MAX_EXACT_SELECTORS, items: { type: "number", minimum: 0 } },
|
|
2042
2293
|
entryIds: { type: "array", maxItems: EXPAND_MAX_EXACT_SELECTORS, items: { type: "string", maxLength: 512 } },
|
|
2043
2294
|
operationAddresses: { type: "array", maxItems: EXPAND_MAX_EXACT_SELECTORS, items: { type: "string", maxLength: 512 } },
|
|
@@ -2096,6 +2347,46 @@ var memoryActionDescriptors = [
|
|
|
2096
2347
|
risk: "read",
|
|
2097
2348
|
namespace: "memory"
|
|
2098
2349
|
},
|
|
2350
|
+
{
|
|
2351
|
+
name: "outline",
|
|
2352
|
+
description: "Ordered entry skeleton for one resolved session: per entry \u2014 index, type, role, tool, a bounded one-line preview, and the rendered size. The map before expand reads the territory.",
|
|
2353
|
+
inputSchema: {
|
|
2354
|
+
type: "object",
|
|
2355
|
+
properties: {
|
|
2356
|
+
source: SOURCE_ARG_SCHEMA,
|
|
2357
|
+
session: { type: "string", description: "Exact session file path, unambiguous id, or source session key." },
|
|
2358
|
+
expectedSourceHash: {
|
|
2359
|
+
type: "string",
|
|
2360
|
+
description: "SHA-256 from a prior pointer; stale sources are refused."
|
|
2361
|
+
},
|
|
2362
|
+
expectedLineageFingerprint: {
|
|
2363
|
+
type: "string",
|
|
2364
|
+
description: "Active-lineage fingerprint from a prior pointer; changed leaves are refused."
|
|
2365
|
+
},
|
|
2366
|
+
branches: {
|
|
2367
|
+
type: "string",
|
|
2368
|
+
enum: ["active", "all"],
|
|
2369
|
+
description: "Outline the active parent-linked path (default) or every branch."
|
|
2370
|
+
},
|
|
2371
|
+
role: {
|
|
2372
|
+
type: "string",
|
|
2373
|
+
description: "Exact normalized entry role; filters the skeleton. Any nonempty role the normalizer keeps is accepted (e.g. user, assistant, toolResult, developer)."
|
|
2374
|
+
},
|
|
2375
|
+
maxEntries: {
|
|
2376
|
+
type: "number",
|
|
2377
|
+
minimum: 1,
|
|
2378
|
+
maximum: OUTLINE_MAX_ENTRIES,
|
|
2379
|
+
default: OUTLINE_MAX_ENTRIES,
|
|
2380
|
+
description: "Maximum skeleton rows returned; total and truncated describe the role-filtered rows before this cap, entryCount the unfiltered session."
|
|
2381
|
+
}
|
|
2382
|
+
},
|
|
2383
|
+
required: ["session"],
|
|
2384
|
+
additionalProperties: false
|
|
2385
|
+
},
|
|
2386
|
+
outputSchema: outlineOutputSchema,
|
|
2387
|
+
risk: "read",
|
|
2388
|
+
namespace: "memory"
|
|
2389
|
+
},
|
|
2099
2390
|
{
|
|
2100
2391
|
name: "sessions",
|
|
2101
2392
|
description: "List known sessions in scope with id, file, cwd, mtime, entry count, and hot/cold tier.",
|
|
@@ -2172,6 +2463,8 @@ var MemoryProvider = class {
|
|
|
2172
2463
|
return await processMemoryRecall(args, invocationContext, context, this.cache);
|
|
2173
2464
|
case "expand":
|
|
2174
2465
|
return await processMemoryExpand(args, context, this.cache, invocationContext.signal);
|
|
2466
|
+
case "outline":
|
|
2467
|
+
return await processMemoryOutline(args, context, this.cache, invocationContext.signal);
|
|
2175
2468
|
case "sessions":
|
|
2176
2469
|
return await processMemorySessions(args, context, invocationContext.signal);
|
|
2177
2470
|
default:
|
|
@@ -2187,6 +2480,7 @@ var MemoryProvider = class {
|
|
|
2187
2480
|
};
|
|
2188
2481
|
if (actionName === "recall") return recallFailure(detail);
|
|
2189
2482
|
if (actionName === "expand") return { entries: [], next: null, error: detail };
|
|
2483
|
+
if (actionName === "outline") return { entries: [], error: detail };
|
|
2190
2484
|
return { error: detail };
|
|
2191
2485
|
}
|
|
2192
2486
|
throw error;
|
|
@@ -2208,4 +2502,4 @@ export {
|
|
|
2208
2502
|
memoryActionSchemas,
|
|
2209
2503
|
MemoryProvider
|
|
2210
2504
|
};
|
|
2211
|
-
//# sourceMappingURL=chunk-
|
|
2505
|
+
//# sourceMappingURL=chunk-4Q6BMC7D.js.map
|