@hexis-ai/engram-sdk 0.14.0 → 0.16.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/admin.d.ts CHANGED
@@ -44,7 +44,10 @@ export interface CreateWorkspaceInput {
44
44
  keyName?: string;
45
45
  }
46
46
  export interface CreateWorkspaceResult {
47
- workspace: Workspace;
47
+ /** Always carries `orgId` post-v0.15 — every workspace is org-scoped. */
48
+ workspace: Workspace & {
49
+ orgId: string;
50
+ };
48
51
  /** Present when `issueKey !== false`. */
49
52
  key?: IssuedKey;
50
53
  }
@@ -79,15 +82,6 @@ export interface OrgWorkspace {
79
82
  export declare class EngramAdmin {
80
83
  private readonly http;
81
84
  constructor(opts: AdminClientOptions);
82
- createWorkspace(input?: CreateWorkspaceInput): Promise<CreateWorkspaceResult>;
83
- listWorkspaces(): Promise<Workspace[]>;
84
- getWorkspace(id: string): Promise<Workspace>;
85
- deleteWorkspace(id: string): Promise<void>;
86
- issueKey(workspaceId: string, opts?: {
87
- name?: string;
88
- }): Promise<IssuedKey>;
89
- listKeys(workspaceId: string): Promise<ApiKey[]>;
90
- revokeKey(workspaceId: string, keyId: string): Promise<void>;
91
85
  createOrg(input?: CreateOrgInput): Promise<Org>;
92
86
  listOrgs(): Promise<Org[]>;
93
87
  getOrg(id: string): Promise<Org>;
package/dist/admin.js CHANGED
@@ -19,30 +19,7 @@ export class EngramAdmin {
19
19
  errorPrefix: "engram-admin",
20
20
  });
21
21
  }
22
- async createWorkspace(input = {}) {
23
- return this.request("POST", "/admin/v1/workspaces", input);
24
- }
25
- async listWorkspaces() {
26
- const r = await this.request("GET", "/admin/v1/workspaces");
27
- return r.workspaces;
28
- }
29
- async getWorkspace(id) {
30
- return this.request("GET", `/admin/v1/workspaces/${encodeURIComponent(id)}`);
31
- }
32
- async deleteWorkspace(id) {
33
- await this.request("DELETE", `/admin/v1/workspaces/${encodeURIComponent(id)}`);
34
- }
35
- async issueKey(workspaceId, opts = {}) {
36
- return this.request("POST", `/admin/v1/workspaces/${encodeURIComponent(workspaceId)}/keys`, opts);
37
- }
38
- async listKeys(workspaceId) {
39
- const r = await this.request("GET", `/admin/v1/workspaces/${encodeURIComponent(workspaceId)}/keys`);
40
- return r.keys;
41
- }
42
- async revokeKey(workspaceId, keyId) {
43
- await this.request("DELETE", `/admin/v1/workspaces/${encodeURIComponent(workspaceId)}/keys/${encodeURIComponent(keyId)}`);
44
- }
45
- // ---------- orgs (Wave G) ---------------------------------
22
+ // ---------- orgs ------------------------------------------
46
23
  async createOrg(input = {}) {
47
24
  const r = await this.request("POST", "/admin/v1/orgs", input);
48
25
  return r.org;
package/dist/types.d.ts CHANGED
@@ -39,6 +39,17 @@ export interface SessionInit {
39
39
  trigger_conversation_id?: string | null;
40
40
  /** Causal lineage — an external event (e.g. calendar event id). */
41
41
  trigger_event_id?: string | null;
42
+ /**
43
+ * Host-defined "why was this side-conversation started" — set when
44
+ * a parent session opens a side-conv with a stated goal. Opaque to
45
+ * engram; the host's agent reads it back to drive resume behaviour.
46
+ */
47
+ trigger_purpose?: string | null;
48
+ /**
49
+ * Host-defined "what condition should make us resume the parent" —
50
+ * paired with `trigger_purpose`. Opaque to engram.
51
+ */
52
+ trigger_resume_hint?: string | null;
42
53
  }
43
54
  /** Patch for `updateSession`. */
44
55
  export interface SessionUpdate {
@@ -49,6 +60,8 @@ export interface SessionUpdate {
49
60
  model?: string | null;
50
61
  trigger_conversation_id?: string | null;
51
62
  trigger_event_id?: string | null;
63
+ trigger_purpose?: string | null;
64
+ trigger_resume_hint?: string | null;
52
65
  }
53
66
  export interface SessionAck {
54
67
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexis-ai/engram-sdk",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "author": "hexis ltd.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "main": "dist/index.js",
11
11
  "dependencies": {
12
- "@hexis-ai/engram-core": "^0.2.0"
12
+ "@hexis-ai/engram-core": "^0.3.0"
13
13
  },
14
14
  "exports": {
15
15
  ".": {