@knowlearning/agents 0.9.59 → 0.9.61

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.
@@ -18,7 +18,7 @@ export default function browserAgent(options={}) {
18
18
 
19
19
  const originalUpload = newAgent.upload
20
20
  newAgent.upload = async info => {
21
- if (info.browser) {
21
+ if (info && info.browser) {
22
22
  const file = await selectFile()
23
23
  if (!file) return
24
24
 
@@ -90,7 +90,8 @@ export default function Agent({ host, token, WebSocket, protocol='ws', uuid, fet
90
90
  await tag(tag_type, target)
91
91
  }
92
92
 
93
- async function upload({ name, type, data, id=uuid() }) {
93
+ async function upload(info) {
94
+ const { name, type, data, id=uuid() } = info || {}
94
95
  create({
95
96
  active_type: UPLOAD_TYPE,
96
97
  active: { id, type, name },
package/browser.js CHANGED
@@ -1,2 +1,3 @@
1
- export { default as GenericAgent } from './agents/generic/index.js'
2
- export { default as browserAgent } from './agents/browser/initialize.js'
1
+ import browserAgent from './agents/browser/initialize.js'
2
+
3
+ export default browserAgent()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.59",
3
+ "version": "0.9.61",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",
@@ -1,5 +1,5 @@
1
1
  import { watchEffect, defineAsyncComponent } from 'vue'
2
- import { browserAgent } from '../../../browser.js'
2
+ import browserAgent from '../../../agents/browser/initialize.js'
3
3
 
4
4
  // TODO: probably want to make this a util, and better fleshed out (with white instead of blacklist)
5
5
  function isScopeSerializable(v) {