@asm-agent/governance 0.9.1 → 0.9.3
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/router.d.ts +1 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +1 -1
- package/dist/router.js.map +1 -1
- package/package.json +3 -3
package/dist/router.d.ts
CHANGED
package/dist/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,eAAe,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;CACxB;AAED,qBAAa,wBAAwB;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAnC,YAA6B,MAAM,EAAE,SAAS,kBAAkB,EAAE,EAAI;IAEtE,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,CAAC,EAAE,aAAa,GAAG,UAAU,CAK5E;CACD","sourcesContent":["export type LoginProvider = \"openai-codex\" | \"anthropic\" | \"google\" | \"gemini\";\nexport type RoutingPurpose = \"intent_parse\" | \"intent_repair\";\n\nexport interface AuthenticatedModel {\n\tprovider: LoginProvider;\n\tmodelId: string;\n\tpurposes: readonly RoutingPurpose[];\n}\n\nexport interface ModelRoute {\n\tprovider: LoginProvider;\n\tmodelId: string;\n\tpurpose: RoutingPurpose;\n}\n\nexport class AuthenticatedModelRouter {\n\tconstructor(private readonly models: readonly AuthenticatedModel[]) {}\n\n\troute(purpose: RoutingPurpose, preferredProvider?: LoginProvider): ModelRoute {\n\t\tconst candidates = this.models.filter((model) => model.purposes.includes(purpose));\n\t\tconst selected = candidates.find((model) => model.provider === preferredProvider) ?? candidates[0];\n\t\tif (!selected) throw new Error(`No authenticated Codex, Claude, or Gemini model supports ${purpose}`);\n\t\treturn { provider: selected.provider, modelId: selected.modelId, purpose };\n\t}\n}\n"]}
|
package/dist/router.js
CHANGED
|
@@ -7,7 +7,7 @@ export class AuthenticatedModelRouter {
|
|
|
7
7
|
const candidates = this.models.filter((model) => model.purposes.includes(purpose));
|
|
8
8
|
const selected = candidates.find((model) => model.provider === preferredProvider) ?? candidates[0];
|
|
9
9
|
if (!selected)
|
|
10
|
-
throw new Error(`No authenticated Codex or
|
|
10
|
+
throw new Error(`No authenticated Codex, Claude, or Gemini model supports ${purpose}`);
|
|
11
11
|
return { provider: selected.provider, modelId: selected.modelId, purpose };
|
|
12
12
|
}
|
|
13
13
|
}
|
package/dist/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,wBAAwB;IACP,MAAM;IAAnC,YAA6B,MAAqC,EAAE;sBAAvC,MAAM;IAAkC,CAAC;IAEtE,KAAK,CAAC,OAAuB,EAAE,iBAAiC,EAAc;QAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,iBAAiB,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QACnG,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,wBAAwB;IACP,MAAM;IAAnC,YAA6B,MAAqC,EAAE;sBAAvC,MAAM;IAAkC,CAAC;IAEtE,KAAK,CAAC,OAAuB,EAAE,iBAAiC,EAAc;QAC7E,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACnF,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,iBAAiB,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QACnG,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,4DAA4D,OAAO,EAAE,CAAC,CAAC;QACtG,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;IAAA,CAC3E;CACD","sourcesContent":["export type LoginProvider = \"openai-codex\" | \"anthropic\" | \"google\" | \"gemini\";\nexport type RoutingPurpose = \"intent_parse\" | \"intent_repair\";\n\nexport interface AuthenticatedModel {\n\tprovider: LoginProvider;\n\tmodelId: string;\n\tpurposes: readonly RoutingPurpose[];\n}\n\nexport interface ModelRoute {\n\tprovider: LoginProvider;\n\tmodelId: string;\n\tpurpose: RoutingPurpose;\n}\n\nexport class AuthenticatedModelRouter {\n\tconstructor(private readonly models: readonly AuthenticatedModel[]) {}\n\n\troute(purpose: RoutingPurpose, preferredProvider?: LoginProvider): ModelRoute {\n\t\tconst candidates = this.models.filter((model) => model.purposes.includes(purpose));\n\t\tconst selected = candidates.find((model) => model.provider === preferredProvider) ?? candidates[0];\n\t\tif (!selected) throw new Error(`No authenticated Codex, Claude, or Gemini model supports ${purpose}`);\n\t\treturn { provider: selected.provider, modelId: selected.modelId, purpose };\n\t}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asm-agent/governance",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Versioned intent parsing, policy, approval, and governed execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"prepublishOnly": "npm run clean && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@asm-agent/contracts": "^0.9.
|
|
27
|
-
"@asm-agent/postgres": "^0.9.
|
|
26
|
+
"@asm-agent/contracts": "^0.9.3",
|
|
27
|
+
"@asm-agent/postgres": "^0.9.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^24.3.0",
|