@hexis-ai/engram-sdk 0.8.0 → 0.9.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/client.d.ts CHANGED
@@ -177,6 +177,21 @@ export declare class Engram {
177
177
  /** Look up by ref. Returns 404 if the ref is unknown. */
178
178
  get: (ref: string) => Promise<IdentityInfo>;
179
179
  };
180
+ /**
181
+ * Workspace-wide alias lookup. `persons.aliases(id)` answers "what
182
+ * does this person go by"; this answers the inverse — "which
183
+ * person(s) does this name resolve to?" — without pre-knowing the
184
+ * owner. Match is case-insensitive; multiple persons can share an
185
+ * alias, so the response is an array ordered by `last_used` desc.
186
+ * Inlined `persons` map saves a round-trip for the typical
187
+ * candidate-picker UI.
188
+ */
189
+ readonly aliases: {
190
+ findByName: (name: string) => Promise<{
191
+ aliases: AliasInfo[];
192
+ persons: PersonMap;
193
+ }>;
194
+ };
180
195
  /** Internal: ship an event batch to the server. */
181
196
  sendBatch(sessionId: string, batch: EventBatch): Promise<void>;
182
197
  /** Internal accessor used by EngramSession to honor SDK config. */
package/dist/client.js CHANGED
@@ -131,6 +131,18 @@ export class Engram {
131
131
  /** Look up by ref. Returns 404 if the ref is unknown. */
132
132
  get: (ref) => this.request("GET", `/v1/identities/${encodeURIComponent(ref)}`),
133
133
  };
134
+ /**
135
+ * Workspace-wide alias lookup. `persons.aliases(id)` answers "what
136
+ * does this person go by"; this answers the inverse — "which
137
+ * person(s) does this name resolve to?" — without pre-knowing the
138
+ * owner. Match is case-insensitive; multiple persons can share an
139
+ * alias, so the response is an array ordered by `last_used` desc.
140
+ * Inlined `persons` map saves a round-trip for the typical
141
+ * candidate-picker UI.
142
+ */
143
+ aliases = {
144
+ findByName: (name) => this.request("GET", `/v1/aliases?name=${encodeURIComponent(name)}`),
145
+ };
134
146
  /** Internal: ship an event batch to the server. */
135
147
  async sendBatch(sessionId, batch) {
136
148
  if (batch.events.length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexis-ai/engram-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "Host SDK for engram. Records agent session steps and ships them to an engram server.",
5
5
  "keywords": [
6
6
  "engram",
@@ -46,7 +46,7 @@
46
46
  "type-check": "tsc --noEmit"
47
47
  },
48
48
  "dependencies": {
49
- "@hexis-ai/engram-core": "^0.1.5"
49
+ "@hexis-ai/engram-core": "^0.2.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"